 Today's lecture is on computer aided data acquisition. As you know in the last class we saw to analyze the signal we particularly for the frequency domain analysis we need to know the signal mathematically by a function y t x t whatever be it. But the problem is you know no real world signal we can represent it in in a mathematics or in a mathematical expression or equation. So, we need to capture this real world signal into the computer. So, that a digital approximation of this analog signal can be made and then we can do the analysis. We will come to the analysis later on, but today let us discuss mostly about what this computer aided data acquisition is. For example, this is my real analog signal which is measured by a transducer. The objective is like you plot graph and excel etcetera. Suppose I sample this points marked in red and so on. And if I join this red points I will get back my original analog signal right, but these are my digital sample data. So, if I lay down this digital sampling data successfully one or two other and join them I should get my analog signal all of you must understand that. But the question is who is doing this sampling? So, this sampling is done by an hardware which is actually known as an A to D converter or known as an analog to digital converter. In this class we will not focus on the electronics of the analog to digital converter that is from for our friends from the electronics department to wonder about. But let us see how we can or rather what are the features of this A to D converter and how we can use it to successfully represent the analog signal which was measured by a transducer. Because if I was to draw back your attention we have more machine because as you will realize our primary objective in this course is to find out the health of this machine. So, on this machine if I put a transducer I will get an analog signal and to do any analysis on this analog signal I have to have a computer, but this computer does not understand analog signal. So, it has to be given digital signal by digitalized signal I mean such digitally sample data. So, this is where my A to D converter comes in. So, now I am interested in what is this conversion how is this conversion happening? What are the features of this converter? What are the properties we should have in this converter and what could be the possible errors while we are sampling this data? Because my computer would like to get the data which is actually measured by the transducer. A to D converter is just a device which is helping me to convert the analog signal to the digital signal. I would not like this A to D converter to distort the signal in any way, otherwise you know I will not have a two representation of my machine. Now, with this object is let us see what possibly could be going wrong in this A to D converter. One you will realize is this sample data and the rate at which I am sampling the data. Another is what kind of values I am giving to this data? Suppose this was some say x volts in the analog signal. I want this data in the digital also to corresponds to x amount of volts. It should not be x plus x plus minus some delta it should not be. So, then this is the error in the amplitude estimation. I should be almost equal to x, but then you will see there are the limitations that I will never be equal to the real analog signal or the amplitude of the analog signal unless I do something and that is what we are going to discuss primarily in this A to D converter. So, two things you will keep in mind while doing this data acquisition is and these are the most two important features of a data acquisition system. One is the discretely sampled in time. Another is analog data quantized to discrete amplitude values. Suppose I take my signal and then I sampled it once here once here and so on where this interval is fixed and this is denoted by delta t and this is known as the sampling interval. Inverse of the sampling interval is known as the sampling frequency denoted by f sub s which is reciprocal of the sampling interval and this is in the time domain and this is the amplitude. We will come to the amplitude later, but suppose and this sampling interval is fixed by the A to D converter and it is hardware set that means I cannot change this f s at well. When I go to the market to buy an A to D converter it will come with a maximum sampling frequency. Now, it is so happens that my sampling frequency of the A to D converter is such that I want sample here shown by the green circle, another here, another here, here so on. So, my computer and they are fixed at some other new interval say this interval now is delta t star where delta t star is greater than delta t. So, this is a higher sampling interval shown by the green circles. Now, if I ask my computer to understand what the original analog red signal is this is my or I will put it as measured analog signal. So, what my computer is going to understand is you know it is going to assume that there is no other data points between these two successive green samples and thus the computer will interpret the original measured signal analog signal shown in red by this green signal. So, this is my digitally sampled green signal. So, that means the original blue I had shown with delta t it had a sampling rate f s and the new one is at sampling rate much or lesser than f s, f s is greater than f s star. So, you see here that obviously this sampling interval or sampling frequency plays a role in the representation of the actual measured analog signal. If my sampling frequency is less I have a distorted green signal and so if my computer will try to understand the red signal as a green signal I have a problem I am not able to correctly or faithfully represent my original red signal by having a sampling rate lower than the required amount of sampling. So, we have to decide the higher the sampling rate is good, but then there are limitations later on we will see. So, if such a process occurs wherein if my signal frequency signal has a maximum frequency of f max there is a theorem which says I should sample at a times at least twice of f max. So, that this kind of errors are avoided errors in sampling are avoided, but now you know sometimes people do over sampling and the sample that not just twice f max, but you know 6 times, 8 times, 10 times over sampling is done. You must have a sample that is not just twice f max, but you know 6 times, 8 times, 10 times over sampling is done. You must have seen in the CD players etcetera you know it is written 8 times over sampling because see what is the CD player? The CD player you know I will just relate to you this because we have in a CD the datas are set by you know there are if you look at a CD very closely there are lot of pits and which is read by an optical light because of the light the reflections of the optical light and pulse will be obtained and then you will be having 1s and 0s and this sampling here because our human audio range is 20 to 20,000 hertz. So, if my maximum frequency of interest is 20,000 hertz I should at least sample it at 40,000 hertz and so on, but sometimes the sample at 44, 98 kilo hertz and so on. So, they are doing some amount of over sampling and because the original signal is 20 kilo hertz and that has been reproduced we have a better fidelity or frequency response from CD players than the original tape cassettes because of this reasons. The full frequency range of the audio signal is reproduced in a CD as opposed to the earlier tape you must have seen there are there is to be cassette tapes or magnetic is the right word wherein you had normal bias metal bias and if you have we call that chromium bias etcetera they all had different frequency ranges and typically they were anywhere from 14 kilo hertz to about 17 kilo hertz metal being the highest, but with the cassette tapes and magnetic tapes came the CDs and CDs you can faithfully store to 20 kilo hertz and then you can sample this data digitally and then get a very good reproduction of the high frequencies and so that you know in a CD when you listen to a guitar or a string instrument you will hear it to be much clearer and pleasant than in a cassette tape because the high frequencies are reproduced in a much better way in a CD. So, that all relates to the sampling frequency, but coming back to our machines. So, if my sampling frequency is not adequate I will have what is known as this signal aliasing because in signal aliasing what happens the computer will erroneously sample a high frequency signal as a low frequency signal. I will go back to the previous example or the figure which I had drawn. If you look here the original yellow green sorry red signal will be misunderstood as a low frequency signal if your sampling is not adequate and then the FFT will have lot of low frequency peaks in the frequency domain. So, this has to have avoided I mean we will be thinking that sampling frequency whatever the computer has obtained by this sampling is correct, but that cannot be true. So, to ensure that the sampling theorem is obeyed we have to consider the have to do certain things. For example, I do not know f max why because I am measuring this from a machine I have not analyzed the signal. So, I would not know what f max is. So, for an unknown machine how do I ensure that the signal aliasing is not occurring while I am sampling through an a to d converter. So, we have to do a little hardware modifications to this in the sense this is my machine my transducer I am having this analog signal and then I am having my a to d converter and then I am having a digital signal computer where all this data is being stored and analyzed this is my digital signal. Now, this a to d has a maximum sampling frequency of f s. So, how do I ensure that any signal which is coming on to the a d card or a d device is not going to have a aliasing problem. If I can ensure that the signal coming in here has a maximum frequency of f s by 2 I am going to ensure that f s is always greater than equal to twice of f max. So, if I limit my f max to f s by 2 I will then obey the sampling theorem. So, what I will do is here very important is I will put an analog because this is an analog domain a digital only happens here after the a to d converter. So, I will have analog low pass known as an anti aliasing filter where this is your cutoff is f s by 2. So, there are many a to d devices wherein in the front end before the a to d conversion we will have an analog low pass anti aliasing filter. So, that the Shannon sampling theorem is obeyed and I will not have any aliasing problem. So, not all a to d cards or a to d devices come with anti aliasing filter because I will tell you regarding the signals. Now, signals could be static could be dynamic we will take static signals as to mathematically. That means, they are not fluctuating or changing with time. For example, temperature in this room that is almost a constant with time. Now, the entire duration of the class this temperature is almost a constant. So, this can be an example of a temperature in a classroom. So, almost a not a time varying signal. For example, dynamic while I am speaking my voice signal sometimes I am speaking sometimes I am speaking louder sometimes I am pausing. So, it is changing with time and this is almost a constant. So, one is a DC signal or static signal and another is a dynamic signal. So, if a DC signal I pausing through an I want to do a sampling process you see the this is my DC signal I can sample it here I can sample it here I can sample it at a much lower rates, but the signal is not going to change is not it because it is a DC signal. So, temperature signals need not have a low pass anti-aliasing filter unless of course, the process is such that the temperature is changing very fast the pressure is changing very fast. For example, the combustion pressure in an engine inside an engine it is fluctuating those are dynamic signals vibration signals noise signals. So, in in such dynamic signals I have to be careful that the aliasing is avoided and I need to have a low pass anti-aliasing filter. So, whenever you are talking about machinery condition monitoring where we are going to use vibration signals as a monitoring parameter we would be mostly dealing with dynamic signals and then thus we need to have a low pass anti-aliasing filter. And another thumb rule I should tell you right now while we are getting into machinery condition monitoring and signal analysis. For example, in IC engines because as an engineer if we do not have an estimate of f max we may not be having a clue as to what sort of sampling frequency I should select in my A to D card. IC engines in a we are good enough if the max and frequencies are up to 5000 hertz. If I want to any analyze any audio signals it will up to 20,000 hertz. I want to analyze any ultrasonics for machines they can go up to know 1 to 2 mega hertz. I am talking about you know very say temperature signals low frequency almost constant. So, these kind of these kind of these kind of so for example, gear boxes, pumps etcetera bearings we are good up to 5000 hertz I would say. So, these are typical f max of signals. So, when I am going to analyze such signals I know that this is the level or amount of f max which possibly could be there in the signal. So, I can then decide on the hardware which will decide on the sampling frequency. So, I hope I am clear on this regarding how to avoid the aliasing by having a low pass anti-aliasing filter and the problem of if you have an aliasing a signal will be misrepresented as a low frequency signal. But this is what we have talked about the x axis there is another issue to this data equation and this is this analog data which is quantized it has to have a discrete amplitude value. So, what kind of value do I give to the data which has been sampled for example, this is my sample this is my signal rather and this has certain amplitude x. Now, as you know in computer data's are stored either as 1's or 0's and say for example, if it is a 3 bit machine it can possibly have 2 to the power 3 combinations of 1's and 0's and then this gives a maximum 8 values so that means a 3 bit machine of course, you know this is a no machine is 3 bit nowadays. But to begin with if it is 3 bit machine the possible values this data can be stored are only 8. So, let us assume that this is minus 5 volt this is 5 volt. So, the entire range is 10 volts. So, this data can only be broken up into 10 by 2 to the power 3 10 by 8 this is close to 1.25 volts that means, if this data is there the computer may be I will put 4 values here and so on it can have a 0 value as well. So, this will only understand a difference of 1.25 volt. But say for example, in my signal because of some operation my machine I had a small kink here let me enlarge this value here suppose in a signal I had this value here. Now, it will not understand this is one level the computer recognizes another level the next level the computer it does not understand where I will put it whether I will put it here and this is some intermediate value this is some intermediate value. So, either the computer will put it here or put it here. So, it is going to lose the amplitude sense by the machine. Now, how could this be improved and this is actually known as the resolution this can obviously be increased by if I increase the bit size of the hardware. So, this kind of error is actually known as the quantization and this can be avoided by obviously, if I 2 to the power n n could be 12 n could be 16 could be 32 could be 64 and so on. So, the resolution of a 64 bit a to d hardware will be much lesser much finer than a 3 bit or a 4 bit or a 16 bit machine because there are more levels like when you draw a graph you know if you want to draw a crude graph you have large boxes if you want to draw very fine graph your division reduces then you can capture all this transients which are occurring. So, if I can have the bit size increased I can sense any small variations and the least value the computer can sense depends on the maximum range by 2 to the power n. I can reduce the range or I can increase the bit size. For example, typically when we are dealing with thermocouples you know thermocouples gives signal in the range of millivolts. So, if I have a hardware having a resolution of 1.25 volts. So, that means it will sense 0 volts it will sense 1.25 then 2.50 volts and so on. So, I can possibly not sense suppose I have a signal of 3 millivolts this cannot be sense by such an a to d device either I have to increase the bit size or I have to amplify this signal and amplification means also you are amplifying the noise. So, a lot of signal to noise ratio will decrease and then there will be noise in the signal or the best way is to increase the bit size and thus avoid the quantization error. Because every data point in your signal should be mapped to a discrete sampled value that is what I am saying analog data quantized to discrete amplitude values. Because you know no 2 data points which are distinct in the analog signal should have the same digital values then the whole purpose of doing a to d conversion is not done. So, no 2 analog signal values should have the same discretized digital data that has to be avoided how can I avoid that by having more bit size. So, you would have heard of you know 32 bit computers or 64 bit computers are much much costier than the 12 bit computers. Because the accuracy the resolution is much much finer in such systems and because of this reason. So, if I have to define the resolution. So, resolution is the smallest amount of input signal that an analog to digital can converter can detect input maximum voltage of 10 volts this can a 3 bit computer can only detect 1.25 volts and I am sure you can calculate for the other bit sizes as well. So, the higher the bit size the lower will be the resolution and I will be very accurately detecting the small amount of signal inputs. Small amount of input signal fine. So, with this 2 important aspects of a to d converter in fact these are the 2 most important I could say features or properties of an a to d converter. One is the sampling frequency another is the resolution because you know wrong sampling frequency leads to signal aliasing inadequate resolution leads to quantization error the error in quantifying the real data. So, these 2 errors have to be avoided while we are doing the a to d process. When I go to the market today to buy hardware manufacturer will tell me the bit size and also the sampling frequency. So, knowing my application what my f max is what my voltage levels are I can say you know well this suffice or not I am sure with this knowledge you all can go to the market and buy a to d devices for your system. Well what is the process of doing a to d conversion methods? There are 2 popular conversion methods one is the flash conversion and other is the sigma delta conversion in this course I will not be going into the details of how the a to d process is done inside the card, but it is suffice it will suffice to say that the sigma delta conversion is the most popular a to d converter cards available in the market and we can now see what are the other features which are available in this a to d cards. And we have discussed about this errors in data equation which we have to avoid sampling error because of which will lead to signal aliasing because of inadequate sampling frequency and other is the quantization error because of inadequate resolution. So, what are these features of an a to d converter? Because we need to know the features of an a to d converter so that we can have the proper specifications of the a to d card to be used in our machinery so that we can very faithfully collect the analog data and then do the analysis and do the interpretation about the machine's health. First is this input range usually in this a to d converters because the data has to finally go to the computers we obviously cannot have a 220 volt input to the a to d card. So, maximum are about from the TTL logic circuits maximum about 0 to 5 volt or if it is 0 to plus minus 5 volt may be 0 to 10 volts. So, no matter what your signal is it cannot have a maximum voltage of 10 volts. So, that means it cannot straight away plug in your 220 volts AC line to your data a cushion card will fry the card that should not happen. So, the maximum limit is 0 to 10 volts which is to be fed to the card it could be bipolar or inu polar that means by inu polar I mean 0 to 10 volts in the positive side bipolar means it could be minus to plus this input range. Sometimes as I was telling you the example of a thermocouple the signal levels are so low that they need to be amplified before even doing the a to d conversion. So, some of these cards can have an a to d sorry can have an amplifier which where we can set the gain so that we can increase the voltage. Next is some of these cards you know nowadays come as a combo pack it is not just a to d conversion, but also sometimes we do digital to analog conversion also because sometimes and some of the particularly not in machinery condition model, but particularly in controls wherein I have to have a control algorithm sitting on my computer. And this algorithm wants to drive a mechanical actuator I need to give an analog signal to the relay or to the actuator so that it can operate. So, such a card sometimes also has an option of having an analog output through a digital to analog converter that is the reverse. Sometimes we need to communicate between many cards or between many computers. So, the communication inside a computer is always digital. So, we it should have a provision to have what is known as a digital input and digital output provision. Sometimes the computer or a device particularly a rotary encoder or a trigger or a rotary triggering mechanism. Suppose I am this is a shaft which is rotating and every rotation I am getting a pulse. If I know the relative distance in time this time is known to me I can find out by the inverse of time what the speed of this rotary machinery is, but who gives me a sense of the relative time. So, I need to have a clock or a counter which will give me a pulse I know this is my pulse cycle and this has a definite clock frequency. So, I can compare with this clock rate with the pulse actually measured and then say which is relative to this clock what is this guy's speed. So, this clock is given by an A to D which has a counter or a timer and these are very high frequency clocks. When we talk about measuring using rotary encoders to capture phenomena from mechanical machines I will go into details on this then and this A to D conversion need not be just for one channel. For example, if I am talking about a machinery I need not and it may be a multistage gearbox there are just not one bearing there are many bearings and this vibration is not just in one direction there are at least in three directions. So, if I want to capture all the phenomena together simultaneously I need to have just not one analog input channel, but multiple analog input channel. Nowadays this A to D devices come as what is known as analog to digital converter cards or we know call them as A to D card and they are very similar to look like here in your PC like your multimedia card like the Ethernet card. So, this card actually plugs into the bus of the computer and then this cards typically cards are available with 16 input channel with few digital to analog output channels couple of clock channels some giving a voltage signal a 5 volt supply some having ground etcetera. So, this cards you can understand it is size of about you know may be 6 inches to 2 or 2 and half inches in width and such cards will fit into this architecture of the bus slots of the PC and then you can from the external world you can plug in wires which are carrying the analog signals into the A to D card and then after the conversion the digital data will be going in the computer bus and then the computer memory devices will have access to that and the control CPU will have access to such data. And another important aspect of this cards is whether the signal can have noise with respect to ground. So, one is a positive voltage signal another is the 0 voltage of the ground and then we will have for all the signals suppose this is channel 1 channel 2 and so on there will be a common ground. So, this is known as a single ended input suppose there are 16 single ended channel as inputs there will be more noisy then if I took channels wherein I take one as V 1 other as V 2 and take the difference and these are known as the differential channels. Then what happens the noise which was there because of V 1 and V 2 if you subtract them the noises will get subtracted. So, differential ended input or 16 channel single ended channel will be converted to a 18 8 differential ended channel and thus the noise will be less because in the A to D conversion process I should be also ensuring that I unnecessary do not bring in lot of conversion noise or measurement noise into my system. So, this is one feature which is also available in the A to D card. The other important feature is suppose I am having in lot of signals coming in and suppose when my signal is coming in in channel 1 usually the inputs are known as channels in A to D conversion I have few more signals coming in the remaining channels. So, because the A to D conversion takes certain time. So, one when I am doing the conversion of A to D for channel 1 what is happening to the channel signals in channel 2 3 4 2 3 4 and 5. So, they are put in a what is known as a sample and hold circuit and then 1 by 1 they will be once channel 1 is done it will go to channel 2 channel 3 and so on depending on each one sample by sample. So, the effective sample rate per channel becomes the sampling frequency divided by number of and such a way of method of holding this signal is known as the multiplexing or switching. So, A D cards have this multiplexers built in, but now it is there are cards wherein real time operations are there are individual A to D converters for each channels. So, the every channel samples are the same frequency and we do not divided by the number number of channels, but once this data has been obtained in digits etcetera this digital data needs to be stored in the computer. So, it should have some amount of memory which is usually RAM memory because this should be erasable. So, this is and let us see how much memory is required to store a given amount of data. For example, if I have a 16 bit computer that means every digital data which is obtained from the sampling process is of 16 bits that is 2 bytes. So, every data point every data point requires 2 bytes of storage space. Now, if I say I require 1024 data points. So, it will require 2 into 1024 bytes that is 2 kilobytes of storage space or RAM. So, this once this 2 kilobytes of space are used up while if you are still going to do more A to D conversion either it will overwrite or it will abort some process. Cards are available with 128 kilobytes. Nowadays cards are available with 2 megabytes storage space. Obviously, I am going to gigabyte of course, the more the storage space the more costlier they will become so on. So, this is the amount of data which is stored on the memory of the A to D converter and this data can be also accessed by the CPU of the computer in which this A to D card is placed. And sometimes on the A to D converters also there are lot of signal processing chips available nowadays will come to that later on, but this is what we need to know. So, I need to specify the amount of RAM which is there on the A to D converter because once it is temporarily stored in this RAM then the computers architecture is going to pull this data out and store it in its hard disk, store it in its the computer's RAM. This is very specific to the A to D card converters RAM. And then there is a provision for triggering and synchronization like when to start collecting the data. If I tell the A to D converter it is usually through a software because all this operations of an A to D card converter will be controlled by a software. So, there will be a controlling software which is known as the driver software which will communicate to the card and the PC and this software sits on the PC of the computer. So, all this operations can be done by a front end GUI. There are many such software's available in the market one commonly is the lab view which is there from national instruments which is which we all use in the in our classes in our labs to do measurements from using data equation cards. So, once this data has been captured by A to D card stored in its RAM it now needs to communicate to the PC. The PC's or the personal computers have a particular set of architecture and the speed at which if I can communicate is good enough fast then it is because I would have sampled data stored it in my RAM, but I am not able to transfer it to the computer then I have a problem. So, traditionally there have been many technologies for transferring this data. One is the GP IB is known as the general purpose interface bus and it used to have an 8 megabytes per second sampling rate. The traditional serial port communication RS 232 it has a much much slower rate of data transfer. These are all digital data transfers 230 kilobit per second. Of course, recently the fire wire by particularly you will see in lot of this max etcetera very high speed transmission 3.2 gigabit per second. The USB serial bus so basically these busses means all these cards can come in these different architectures and USB is a plug and play architecture and it has also fairly high amount of data transfer rate that is 480 megabit per second. So, right now today we are using about fire wire and USB. There used to be the PC MCIA particularly in the laptops etcetera and of course, about the decade earlier ISA PS 2 etcetera they were very popular, but they have much much slower rate of data transfer. So, I need to have a high rate of data transfer and this is done through USB and fire wire at present and this is regarding the communications. So, as an when I go to the market to buy an A to D card because my objective is to transfer my real-world machinery signal data which has been measured by a transistor in digital form quickly to my computer. So, I would have done a very nice conversion, but if I cannot transfer it to my PC it is no good and then we have this PCI which is either 32 or 64 bit data at a clock speed of 33 megahertz and this has been this has replaced the ISA and ESA bus. Of course, now a days the ethernet are also being used for digital data communication between instruments between networks for communication and they have the common transfer rates between 10 megabits per second to about 100 megabits per seconds, but there is a limitation by which we can have the rate of transfer at such high rates. Particularly if I am using the SCAT 5 cable for connecting devices we can have a maximum of 100 meters, but now a days the technology is such that once this digital data has been captured at maybe a server location it needs to be transferred wirelessly and the present limitations of wireless ethernet is about 54 megabit per second and within only 20 meters and beyond that the speed drastically decreases. So, I cannot have high data transfer I mean by data I mean digital data transfer at speeds higher than 54 megabits per second when I am doing an wireless ethernet. So, this is a challenge which we have in computer data acquisition to transfer the data over the wireless at high speeds because the call of the day is to use have wireless remote monitoring of machines and this is where we are in the present state of the art. So, lot of network based data acquisitions are also available the client server model, local area network and all this data could be captured locally put up an HTML based web based and then people from the different client locations can access your server either to access the data on the databases the data sizes are large we have to have an FTP protocol to access this large databases. So, the idea behind this computer a data acquisition is not just to acquire the data at the machine end, but also give it to the various clients they could be setting all over the world over the internet over the wireless and so on. Thank you.