Let s go back briefly to lecture 1, and look at where ADC s and DAC s fit into our overall picture. I m going in a little extra detail now since this is our eighth lecture on electronics and we are more sophisticated now. ADC Analog-to-digital converter DAC Digital-to-analog converter Digital signal processing is amazing. For decades our processing power has doubled roughly every 18 months. If that fails to astound, imagine putting $1,000 into some sort of retirement account with that kind of yield, and within 30 years But in order to get to all that DSP goodness, we must first translate our analog signals to digital signals. If we want to act on our digital results, we often must translate digital commands back to analog signals. So in medical electronics, it is almost impossible to get around these blocks. Lets take a look at them.
Analog-to-Digital Conversion An ADC is typically an integrated circuit ( IC on microchip) that looks functionally like : The ADC relies on a periodic square-wave signal called the clock. Once every clock cycle the ADC looks at the voltage at V IN at that instant, and translates it to a binary number that is linearly related to the input voltage. Recall how binary numbers work; each digit is a one or a zero: Decimal equivalent: 2 7 id 7 + 2 6 id 6 + 2 5 id 5 +...2 0 id 0 So in this case the output of the ADC binary code that represents a decimal magnitude. Page 2
What does this digital code mean, or represent? You ll in general have to look at a data sheet, but often the ADC will require one or more reference voltage inputs (See attached example). A way to visualize this is with a plot of output code vs. input voltage: From a plot like this, we can see that for 2 N codes, where N is the number of bits, there are 2 N 1 intervals on the voltage axis. This means that each LSB represents a change in input voltage of This is the important detail. But from a qualitative viewpoint, the thing to really notice about ADC s is that they discretize our signal in two ways: in both voltage and in time. Lets take a good look at both types of discretization. We ll start with time. Page 3
Sampling Before doing the actual analog-to-digital conversion, the first thing an ADC will do is sample a signal. That is, it will grab the signal at a particular instant in time and keep it still so that it can embark on the conversion process. How do you grab an analog signal, you ask? This is called a sample and hold or perhaps, more accurately, a track and hold. Remember that this is a perfect amplifier, so its input draws no current. This means that when the switch is open, the capacitor just holds at the value of v(t) right before the switch opens. We can illustrate the sampling process graphically: The ADC then provides digitized versions of the samples of v(a). These samples are: v n Class Exercise: Page 4 [ ] = v( nτ).
We can get into trouble by looking only at the samples of a signal. Suppose that we take the samples of a sinusoid of frequency f 0 : x[ n] = sin(2π f 0 inτ s ) And compare them to those of a sinusoid of frequency f 0 Δf : Find Δf for which x[ n]and x 2 [ n] are identical. (Workspace) x 2 ( ) [ n] = sin 2π ( f 0 + Δf )i nτ s The phenomenon that we have stumbled upon here is called aliasing and it is a hazard of sampled data systems. You can work that out as long as your input signal is restricted to a frequency band f s 2 < f IN < f s, you have no difficulty. That is if the input signal is composed of complex 2 exponentials e jωt for which where f s = 1 Τ s,ω s = 2π f s, then you are okay. ω s 2 < ω < ω s 2 Page 5
Incidentally, you have seen this before. TV cameras used to only sample 24 frames per second, which is slower then rotational frequency of some of the wheels that were being shot. So you would get this weird effect of the wheels seeming to turn backwards. Anyway, in electronics design we will sometimes head this off by including an initializing filter before the ADC: So that s what we mean by discretization in time. What about amplitude? In general when you take a sample, you will have an error that can be anywhere between Δ 2 and Δ, where Δ is the LSB (From page 3). For purposes of analysis, we treat this as a quantization noise 2 with PDF: Page 6
It has been shown that this quantization noise distributes pretty uniformly in frequency, so we treat it the way we treat thermal noise. The signal-to-quantization noise ratio relates to the number of bits according to SQNR = ( 6.02B +1.76)dB (6B)dB So if you digitize a pure, full scale sinusoid and take an IFT, what you will see is Page 7