Presentation is loading. Please wait.

Presentation is loading. Please wait.

9.3 Analog-to-Digital Conversion

Similar presentations


Presentation on theme: "9.3 Analog-to-Digital Conversion"— Presentation transcript:

1 9.3 Analog-to-Digital Conversion
overview including timing considerations block diagram of a device using a DAC and comparator example of a digitized spectrum number of data points required to describe the signal aperture time of the ADC and signal distortion sample and hold circuit reduces the aperture time digitization artifact and signal distortion the Nyquist sampling theorem and aliasing using the frequency accordion to predict aliasing 9.3 : 1/18

2 The Conversion Process
assume an 8-bit device with a range of V the least significant bit (LSB) is then V a user adjustable clock determines the sampling rate the maximum sampling rate is controlled by the time it takes the ADC to generate a binary pattern (conversion time) the clock can be synchronized with external events the clock sends a logic signal to the ADC to begin conversion once the conversion is done, the ADC sends a logic pulse to tell the computer to read the digital pattern 9.3 : 2/18

3 ADC Using a DAC and Comparator
this is more a "teaching device" than an item of commerce - it's too slow! the trigger starts the digital sequencer the sequencer controls an 8-bit DAC the DAC output as a function of time is a staircase going from V in steps of V the staircase voltage is compared to the signal when the staircase equals or exceeds the signal, a logic pulse stops the conversion the computer is then notified that a digital pattern is ready 9.3 : 3/18

4 Example Digitized Spectrum
time voltage ADC decimal binary 0.00 1 0.003 2 0.026 7 3 0.135 34 4 0.433 108 5 0.842 211 6 0.993 248 0.710 178 8 0.308 77 9 0.081 20 10 0.013 8-bit resolution with V LSB the peak was digitized at one data point per second the ADC output becomes an array of integers that have to be properly scaled by the user (divide by 255 and multiply by V) the position in the array (subscript) corresponds to time, and this has to be determined by the user or computer program 9.3 : 4/18

5 Required Number of Data Points
if the functional form of the signal is unknown, sufficient data points are required to define accurately all features the effect of the number of data points is clearly shown above where a decrease from 51 to 11 almost eliminates the first peak if the functional form is known a smaller number of data points can be combined with curve fitting to recover the data Fourier transformation of signals often requires very large data sets so that all frequencies are adequately described 9.3 : 5/18

6 Aperture Time Errors the length of time that an ADC examines a signal is called the aperture time if the signal changes during the aperture time, the digital value will be erroneous in inexpensive ADCs the aperture time is the same as the conversion time in the figure the ADC is triggered every millisecond the horizontal line is the maximum voltage measurable the diagonal lines are the voltage ramps of the DAC inside the ADC the digitized value is that where the ramp crosses the signal the error is the difference in voltage between the blue and red markers 9.3 : 6/18

7 Sample and Hold Circuit
a sample and hold circuit minimizes aperture time errors by decoupling the aperture time from the conversion time the transistor switch starts in the open position when the ADC is told to sample the signal (via the trigger logic), the transistor switch is closed connecting the input to the capacitor after 3-5 RC time constants the transistor switch is returned to the open position since the capacitor is connected to a voltage follower it can hold the signal for very long periods of time while the sampled signal is being held at the output, the ADC performs its conversion on a constant signal it is possible to obtain sample and hold times as short as 7 ps the ADC conversion time still determines the minimum temporal data spacing 9.3 : 7/18

8 Successive Approximation ADC
Instead of the DAC stepping through all possible 8-bit patterns it performs a "binary search." Suppose we have an 8-bit ADC which handles voltages from to V with a resolution of V, and an input voltage of V. The DAC outputs the following voltages and modifies its strategy depending upon whether the input voltage is greater than or less than the current value. step pattern voltage conclusion keep bit 7 set clear bit 6 keep bit 5 set keep bit 4 set clear bit 3 clear bit 2 keep bit 1 set keep bit 0 set result A normal 8-bit ADC averages 128 steps to guarantee finding the correct voltage. A successive approximation ADC averages 7 steps to guarantee finding the correct voltage. This is ~18 times faster! 9.3 : 8/18

9 Flash Conversion ADC A flash converter has one comparator for each voltage level. The digital logic identifies the last comparator which is less than the input voltage. It then converts this into a binary pattern. Flash converters with large numbers of bits are very expensive. They can be purchased with 4 to 10-bit outputs. Flash converters can digitize data into the hundreds of megahertz. For high speed digital oscilloscopes more than one flash converter is utilized by interleaving them. That is one converter might handle every fourth data point. 9.3 : 8/18

10 Digitization Artifact
the analog to digital conversion process converts a continuous signal into one that has only discrete values this is particularly noticeable when the maximum signal is near the LSB voltage the discrete values become steps when many data points are taken before the signal changes an amount equal to the LSB 9.3 : 10/18

11 Removing Digitization Noise
Digitizing noise cannot be removed by averaging when the noise is much less than the LSB voltage step. This is because the ADC always returns the same values. By adding Johnson noise just before the ADC the digitizing noise can be removed by averaging. The added noise needs to have an rms voltage equal to ~0.5 the LSB voltage step. 9.3 : 11/18

12 The Nyquist Theorem and Aliasing
the Nyquist theorem states that a signal has to be sampled at a rate twice its highest frequency conversely, the highest frequency (Nyquist frequency) that can be measured by an ADC is half the sampling frequency sampling converts all frequencies above the Nyquist frequency into lower frequencies - this process is called aliasing the figure shows a 19 Hz signal sampled at 20 Hz the digitized signal is indistinguishable from 1 Hz unfortunately, an infinite number of cosines above the Nyquist frequency will be aliased to 1 Hz a major measurement problem is distinguishing real from aliased frequencies noise will also be aliased 9.3 : 12/18

13 Frequency Accordion the top line runs from zero to the Nyquist frequency the left edge of the graph has even multiples of the sampling frequency the right edge has odd multiples of the Nyquist frequency to determine how a frequency will be aliased P locate the actual frequency and draw a vertical line P the intersection of the vertical and top accordion lines gives the aliased frequency value to determine all the frequencies that will give an observed value P drop a vertical line from the observed frequency P possible frequencies are those at every intersection, e.g. 1, 19, 21, 39, 41, etc. Hz 9.3 : 13/18

14 Further Aliasing Examples
9.3 : 14/18

15 Observations about Aliasing
aliasing and noise noise at all frequencies will be aliased between 0 Hz and fN noise amplitude does not increase with aliasing, only f changes interference noise far from a signal can be aliased into the signal a low pass filter should always precede an ADC to reduce aliasing detecting aliasing compare the measured frequency to theory change the sampling frequency a small amount look at the digitized amplitude with and without a low pass filter stopping aliasing adjust the sampling period by a small random time ■ random sampling does not change an un-aliased cosine ■ random sampling converts an aliased cosine into "hash" other things causing aliasing using a spreadsheet to evaluate a repetitive function using a subscripted, repetitive variable in Mathcad optical gratings and interference filters (comb functions) 9.3 : 15/18

16 ADC Transfer Function The temporal transfer function involves multiplication by a comb. The spacing Dt is determined by the ADC sampling rate. Since a digitized signal is composed of many points, it extends over many comb impulses. The spectral transfer function involves convolution by a comb. The spacing Df is determined by 1/Dt. The signal spectrum is smaller than the frequency impulse spacing, thus replicated at every multiple of Df. 9.3 : 16/18

17 FT Demonstration of Aliasing (1)
This demonstration will be accomplished by convolution in the frequency domain. Assume a sampling rate of 100 Hz (Nyquist frequency of 50 Hz) and a 25 Hz cosine signal. The analog-to-digital conversion is given by the convolution of the signal dd+(25) and the ADC comb(100) functions. Note: the dashed arrows are for reference only; the red arrows indicate which comb impulse generated the cosine impulse. 9.3 : 17/18

18 FT Demonstration of Aliasing (2)
Keep the sampling rate of 100 Hz (Nyquist frequency of 50 Hz) but a 75 Hz cosine signal, which will alias to 25 Hz. The analog-to-digital conversion is given by the convolution of the signal dd+(75) and the ADC comb(100) functions. Although the impulses from convolution are at exactly the same frequencies as 25 Hz, they arise by convolution with different comb impulses! 9.3 : 18/18


Download ppt "9.3 Analog-to-Digital Conversion"

Similar presentations


Ads by Google