ME231 Measuremens Laboraory Spring 1999 Digial Daa Acquisiion Edmundo Corona c The laer par of he 20h cenury winessed he birh of he compuer revoluion. The developmen of digial compuer echnology has had a large impac in boh our everyday lives as well as in he engineering profession. In he laer, he formidable increase in compuing power since he 1950 s allowed he analysis of many problems which were inracable previously. The influence of he compuer did no sop here bu exended ino he areas of design and, yes, measuremens. In fac, he currenly favored mehods used in daa acquisiion are vasly differen from hose used as recenly as he 1970 s. The main reason ha digial compuers are widely used in measuremens is ha hey grealy faciliae he handling of daa and allow calculaions o be performed on he daa o be very fas and sophisicaed. On he oher hand, he more sophisicaed he ool, he more careful and echnically proficien he users mus be o use i properly. Incompeence in he use of compuers have given rise o sayings such as garbage in, garbage ou, or o err is human, o really mess hings up i akes a compuer. A couple of final commens before we launch ourselves ino he world of digial daa acquisiion. Firs, when we alk abou digial daa acquisiion we are no only referring o he use of deskop compuers, bu in general o he use of digial processors or chips. Such chips may be insalled on airplanes, cars, oasers, ec. Second, o know wha pifalls may be awaiing us when we use 1
digial devices in measuremens, we mus firs ake a sep back and review he analog world. Analog Signals and Discreizaion An analog quaniy is one which is coninuous and smooh. For example, a common glass bulb hermomeer indicaes emperaure by he lengh of a column of mercury. As he emperaure changes, he column of mercury changes smoohly. You migh argue ha if you could measure he lengh of he column o an infinie number of significan digis, you could deec infiniesimally small changes in emperaure. Furhermore, if you could make a coninuous ime record of emperaure, you could ell wha he emperaure was a any insan in ime, even a wo imes wihin an inerval smaller han one billionh of a second apar. The resuling emperaure reading would be coninuous in ime and would possess infinie resoluion. In oher words, i would be analog. A variey of devices o display and/or record analog signals have been invened. They were heavily used prior o he developmen of digial daa acquisiion sysems. They included dial-and-needle insrumens, ape recorders, char recorders, ec. In movies abou earhquakes, hey invarianly show char recorders. When he earhquake srikes he scene will show he recorders pens racing lines of grea ampliude on paper moving under hem. Tha s more exciing han showing a digial display showing numbers alone. Don you hink so? Unforunaely, digial compuers and devices, in spie of all heir processing power, have one faul. They have limied memory. Therefore, hey can no handle analog signals, which carry an infinie amoun of informaion. As a resul, analog signals mus be discreized before hey can be sen o a digial 2
device. The Webser s dicionary defines discree as consising of disinc or unconneced elemens, aking on or having a finie number of values. The discreizaion process in daa acquisiion sysems occurs boh in ime and value as explained below. Discreizaion in Time The discreizaion of a signal in ime is called sampling. The mos common example is he movies. We know ha a movie is acually a series of sill phoographs which, when played a a reasonably fas speed, gives he impression of moion. In his example, he analog signal is realiy, which happens smoohly. The movie is discree in he sense ha i consiss of a finie number of frames, each conaining one insan in ime. Evens ha happen beween frames are los forever! Similarly, sampling of a signal consiss of measuring he signal only a specific insans of ime insead of all he ime. For example, Figure 1(a) shows an analog signal. If he signal is sampled a ime inervals δ hen he sampled record would look as shown in Fig.1(b). Noe ha he dips in he curve beween imes 3 and 5 have been missed. We will never be able o recover hose feaures of he signal from he discreized record. In summary, daa is always los during sampling. Therefore, i is imporan o always make δ as small as necessary o capure all he feaures of ineres in he signal. Discreizaion in Ampliude The discreizaion of he ampliude of a signal is someimes called quanizaion. While discussing he hermomeer example above we noiced ha analog signals have infinie resoluion, even infiniesimal changes in he measured values 3
y() δ 1 2 3 4 5 6 (a) y() 1 2 3 4 5 6 (b) Figure 1: Discreizaion in ime. (a) Analog signal. (b) Discreized signal. 4
produce infiniesimal changes in he oupu. Due o memory limiaions, digial devices can no achieve infinie resoluion and mus chop some of he informaion off he signal. One obvious example of his process can be seen a he grocery sore when you purchase eggs. We know ha if we ook all he hens in he world and measured he volume of each egg hey could possibly lay, we would end up wih an analog quaniy. In oher words an infinie number of values for he egg volume would exis. Ye, a he grocery sore, eggs are classified ino regular, large, exra-large and jumbo. Only four caegories in which o fi all egg sizes! In oher words, all eggs wih volume in a cerain range are jus called large. Talk abou an ideniy crisis for he eggs! Similarly, quanizaion of a signal consiss of measuring is ampliude, bu being able o assign he ampliude values o a finie number of boxes. For example, Fig. 2(a) shows an analog signal as in he previous figure, excep ha he y axis has now been pariioned in finie inervals labeled y 1... y 5. A he imes 1... 5, he value of he signal is assigned o he box in which i happens o reside a ha ime. Afer discreizaion, all he informaion we have lef is he hick lines shown in Fig. 2(b). All we know now is ha he signal passed hrough he box y 5 a ime 1, box y 3 a ime 2 ec. We no longer know he exac value of he signal a all imes. If you hink abou i, we have los an infinie amoun of informaion during discreizaion. The analog signal, however, conained infinie informaion. This is one of hose lucky siuaions where infinie minus infinie is no zero, bu a finie number. I will hopefully be large enough o complee he asks we hope o accomplish. 5
y() y 5 y 4 y 3 y 2 y 1 δ 1 2 3 4 5 6 (a) y() y 5 y 4 y 3 y 2 y 1 1 2 3 4 5 6 (b) 5 Figure 2: Discreizaion in ampliude. (a) Analog signal. (b) Discreized signal. 6
Exercises 1. Consider an analog signal of he form y = 2 in he domain [0,5]. Discreize he signal in ime and value using = 0.5 and y = 5. Name he y boxes afer heir mean value, ie he box [0,5] as 2.5, he box (5,10] as 7.5, ec. Tabulae he resuls and hen plo hem in he manner of Fig. 2. 2. In some Wesern movies, when he scene involves a fas moving carriage, i appears he a he spokes of he wheels are urning backwards. Why? If you have no observed his, hink of a wheel wih a single radial line drawn on i. If you make a movie of he roaing wheel, would i be possible o make he wheel appear o be roaing backwards or, in oher words, in he direcion opposie o he acual roaion? How? 7