Vous êtes sur la page 1sur 32

2

ANALOG-TO-DIGITAL
AND DIGITAL-TO-
ANALOG CONVERSION

2.1 A SIMPLE DSP SYSTEM


The heart of digital signal processing is the manipulation of digital signals. Countable sig-
nals, like the number of days of rain in a year, can be represented as digital signals directly.

29
---~~~--------~~----~---~--
32 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

~c 8
x
7

o
o 2 3 4 5 6 7 8 9 10
n

FIGURE 2.4
Digital signal (shown with sample-and-hold signal).

1
Is = Ts
In Figure 2.4 the value of the digital signal at each sampling point is marked by a small cir-
cle at the top of a line. Both the original analog signal and its sampled digital counterpart
give time information about the signal. Therefore, they are both time domain descriptions:
They describe the variations of the signal as time proceeds.
It is not obvious from Figure 2.4 how a set of samples can uniquely represent the ana-
log signal. Figure 2.5, for example, shows two possible analog signals that would produce the
same set of sample values at the sampling points shown. As it turns out, when the sampling
frequency is adequate, there is no ambiguity about which analog signal corresponds to a given
set of samples. The sampling theorem, due to Nyquist, guarantees that an analog signal can
be perfectly re-created from its sample values, provided the sampling interval is chosen cor-
rectly. The right sampling interval is determined from the characteristics of the signal being
sampled. According to Nyquist theory, a signal with maximum frequency of W Hz must be
sampled at least 2 W times per second to make it possible to reconstruct the original signal
from the samples. This minimum sampling frequency is called the Nyquist sampling rate.
As an example, a signal containing frequencies up to 20 kHz must be sampled a minimum of
40,000 times per second: The Nyquist rate for the signal is 40 kHz. The Nyquist frequency,
on the other hand, refers to a frequency that is half the sampling rate of a system. The range
of frequencies between zero and the Nyquist frequency is called the Nyquist range.
The sampling rate used in Figure 2.4 was selected to be exactly twice the maximum
frequency present in the analog signal of Figure 2.2. This maximum frequency controls the
maximum steepness of the signal at any point in time. The signals shown in Figure 2.5
SECTION 2.2 Sampling I 33

Q) 8
"0
~

«E-7
6

' 'I'\ \,
I ! .."\\..
r-}':. ,~,1'" . """\.....
32 tt.--,/ :
'J~\ /"'..
..
,/
J: ,---// ,/
,/.

o 2 3 4 5 6 7 8 9 10
Time

Analog Signal #1

Analog Signal #2

Sample Points

FIGURE 2.5
Undersampled analog signals.

clearly contain higher frequency elements than the signal in Figure 2.2, as the steep signal
transitions show. The sampling rate used in Figure 2.4 is not adequate to sample either of
the analog signals in Figure 2.5. The higher frequency signal content means a higher sam-
pling frequency would have to be chosen to obtain a set of samples that would be adequate
to reconstruct the original signals. Only when the sampling rate is too low is there ambigu-
ity about the analog signal that produced the samples. Analog signal #1 and analog signal
#2 are just two examples of signals that might produce the sample points in Figure 2.5.
However, when the sampling rate is high enough, there is no ambiguity about the source
signal: Only one signal can produce a given set of samples.
The time domain effects of undersampling are made clear in Figure 2.6. Here a sam-
pling rate of 40 kHz is used to sample a group of signals, from 10kHz to 80 kHz. The sam-
ple points, consistent for all signals, are represented as dashed vertical lines. According to
Nyquist, only signals with frequencies up to 20 kHz can be perfectly reconstructed using a
sampling rate of 40 kHz. Naturally a 30 kHz signal can be sampled with the same 40 kHz
sampling rate, but the insufficient sample points trace out a signal that appears to have a
frequency of 10kHz. For the 40 kHz signal, the samples appear to lie on a horizontal line.
The pattern continues for the higher frequencies: The apparent frequency never exceeds 20
kHz. This is an example of aliasing. Frequencies above the Nyquist frequency, half the sam-
pling rate, are folded back and recovered as lower frequency signals.
----- ---------------------------------------------------------------------------

34 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

FIGURE 2.6
Aliasing in the time domain with
40 kHz sampling (adapted from
Pohlmann, 1994).

2 3 4 5 6 7 8
Sampling Point

Once a sampling rate for a system has been selected, steps must be taken to ensure that
signal elements with frequencies greater than the Nyquist frequency are excluded from the
system. Many signals contain noisy or other nonessential high frequency elements that must
be removed before sampling, as suggested by the spectrum in Figure 2.7(a). This is the job
ofthe antialiasing filter introduced in Figure 2.1 and illustrated in Figure 2.7(b). This filter
removes all signal elements above the Nyquist frequency from the signal to be sampled, and
so ensures that Nyquist sampling will be sufficient to completely record the signal. At the
SECTION 2.2 Sampling I 35

Frequency

(a) Analog Signal Spectrum

Frequency

(b) Filter Shape for Analog Antialiasing Filter

Frequency

(c) Filtered Analog Signal Spectrum

FIGURE 2.7
Antialiasing Filter.

same time, all noise above the Nyquist frequency is eliminated, which prevents high fre-
quency noise from interfering with the signal of interest. Figure 2.7 (c) presents the spectrum
of the signal after filtering, ready to be sampled at 2 W samples per second.

2.2.2 The Frequency View of Sampling


An analog signal with an identifiable maximum frequency, by nature or through filtering,
is called a band-limited signal. Such a signal and its spectrum are shown in Figure 2.8(a)
and (b). The maximum frequency present in the signal is marked on the spectrum as WHz.
36 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

OJ
"0
.~
a.
«E

(a) Signal

w
Frequency

(b) One-Sided Spectrum of Signal

-w w Frequency

(c) Two-Sided Spectrum of Signal

FIGURE 2.8
Signal and its spectrum.

Figure 2.8(c) shows the two-sided spectruniof the signal. It is created by placing a mirror
image of the one-sided spectrum to the left of the 0 Hz axis. As a result, the spectrum is de-
scribed between - Wand W Hz. Though negative frequencies do not have physical mean-
ing, they are needed to explain the effects of sampling in the frequency domain.
The act of sampling an analog signal produces a series of sample values in the time
domain, as suggested in the previous section. Sampling has a dramatic effect in the fre-
quency domain as well. Figure 2.9(a) shows the two-sided spectrum of a signal, and Figure
2.9(b) shows the spectra of the same signal after sampling, for three different sampling rates
fs. As a result of sampling, copies of the original two-sided signal spectrum, called images,
are placed at every multiple of the sampling frequency, that is, at 0, ±fs, ±2fs, ±3fs, ....
SECTION 2.2 Sampling I 37

-W W Frequency

(a) Original Two-Sided Signal Spectrum

Nonideal Low Pass Filter


/

-W 0 W fs-W fs fs+W 2fs-W 2fs 2fs+W 3fs-W 3fs 3fs+W


(i) fs > 2W

Ideal Low Pass Filter


/

-W 0 W fs 2fs 3fs 4fs


(ii) fs == 2W

-W 0 W fs 2fs 3fs 4fs 5fs


(iii) fs<2W

(b) Spectrum of Sampled Signal

FIGURE 2.9
Spectra of original and sampled signals.

A mathematical explanation of this result is provided in Appendix K. Note that the spec-
trum for the sampled signal is also two-sided, in the sense that it extends symmetrically for
both negative and positive frequencies.
The three different spectra shown in Figure 2.9(b) differ only in the relationship be-
tween sampling rate, is, and the maximum frequency in the signal, l¥. The reasons behind
38 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

the Nyquist sampling rate are evident. Whenfs > 2lV, copies of the original spectrum do
not overlap; whenfs < 2lV, copies do overlap. Where images overlap, spectral elements
sum, as shown by the dashed lines in Figure 2.9(b)(iii). The conditionfs = 2W marks the
limiting case, the Nyquist sampling rate.
The issue of overlap is important when it is time to recover the original signal from
the samples. This is done by a process called low pass filtering. In Figure 2. l, the low pass
filter is identified as the anti-imaging filter. Low frequencies are passed by the filter, while
higher frequency components are attenuated. Since the important elements of the signal lie
below W Hz, the cut -off for the anti-imaging filter must occur no lower than W Hz. The ob-
jective is to pick out from all of the images in the frequency domain the one image that
matches the original spectrum. The images that are removed give this filter its name. At the
same time as the anti-imaging filter removes extraneous high frequency signals, it also re-
moves out-of-band noise.
The dotted boxes in Figure 2.9(b) show the low pass filter shapes that might be used
to accomplish this goal. In Figure 2.9(b)(i), wherefs > 2lV, a filter with a relatively shal-
low roll-off slope can easily pick out the original spectrum. What this implies for the time
domain is that the original signal can be perfectly reconstructed from the sample values. In
Figure 2.9(b)(ii), only an ideal low pass filter with a cut-off at half the sampling frequency
and an infinitely sharp roll-off would be capable of extracting the original spectrum, and
such a filter does not exist. In Figure 2.9(b)(iii), however, there is no filter that can pick out
the original spectrum: The overlap between spectral images, or aliasing, makes this impos-
sible. When aliasing occurs, the signal that results after low pass filtering differs from the
original. The frequency pictures make it easy to see why the sampling frequency should be
more than twice the maximum frequency in the signal: If this condition cannot be met, there
is no chance of reconstructing the signal from its samples.
For a sine wave, the Nyquist rate requires that two samples be collected every cycle.
At this minimum sampling rate, though, the samples seem incapable of re-creating the sine
wave, as illustrated in Figure 2.10. The pair of samples collected during each cycle seems
to fit a square wave or triangle wave as easily as a sine wave. It is difficult to accept
Nyquist's assertion that no ambiguity exists. In fact, the same low frequency component ap-
pears in the spectra for all square, triangle, and sine waves that repeat at the same rate.
Square and triangle waves, however, have many high frequency elements as well. The anti-
imaging filter removes these high frequency elements, leaving only the sine wave behind.
As Figure 2.9 showed, sampling causes images of a signal's spectrum to appear at
every multiple of the sampling frequency. For a signal with frequency f, the sampled spec-
trum has frequency components at kfs ± f Hz, where fs is the sampling frequency and
where k stands for all integers. Thus, the spectrum for a sampled signal has an infinite num-
ber of images, from which the anti-imaging filter must recover a signal. This calculation
works whether or not the Nyquist sampling requirement is met. When it is not, the calcula-
tion provides the aliased frequency or frequencies. For example, Figure 2.11 shows the two-
sided spectra of two sine waves sampled at 40 kHz. The first, with a frequency of 10 kHz,
is below the Nyquist frequency for the chosen sampling rate. Some of the images lie at -40
± 10,0 ± ]0, and 40 ± ]0 kHz, or -50, -30, -10, 10,30, and 50 kHz. Only one of these
frequencies lies between zero and half the sampling rate. Thus, the signal's frequency is
correctly identified as 10kHz. The second sine wave in Figure 2. ] I(b), with a frequency of
SECTION 2.2 Sampling I 39

Square Wave
Sine Wave
Triangle Wave

x- 1
-0.2
0.8-0.4
0.4
0.2
-0.8
-0.6
0.6
0

o
o 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

FIGURE 2.10
Sine wave sampled at Nyquist rate.

30 kHz, lies above the Nyquist frequency. Nevertheless, the image frequencies can still be
computed. For example, with 40 kHz sampling, the 30 kHz signal produces, among others,
components at -40 ± 30, 0 ± 30, and 40 ± 30 kHz. Only one of these components lies in
the Nyquist range between 0 and 20 kHz, so 10 kHz is the aliased frequency of the recov-
ered signal. Note that the 10 kHz and 30 kHz signals produce identical sampled spectra for
a 40 kHz sampling rate, a finding that agrees with the observations of Figure 2.6.
The alias recovered from the 30 kHz signal is a baseband copy of the original fre-
quency, which means that it lies between zero and the Nyquist limit. Such an alias can be
distinguished from true signal by changing the sampling rate a little. In general, if the peak
in the baseband moves, it is an alias; if it does not, it represents true signal. The calculation
I
of image frequencies kis ± Hz can be used for complex signals as well as for sine waves.
The signal described by the spectrum in Figure 2.9(a) contains all the frequencies between
o and W Hz. Thus, the first image in the sampled spectrum lies betweenis - WandIs + W
Hz, the second image lies between 2Is - Wand 2Is + W Hz, and so on.
When signals are band-limited to a range such as WI < f< I
Wz rather than 0 < < lV,
there is no need to sample at twice the highest frequency, or 2Wz. Instead, minimum sampling
limits depend on the bandwidth of the signal, Wz - WI' as well as the position of the band-
width in the spectrum. The sampling rate must be at least twice the bandwidth, but may need
40 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

Nyquist
Range

-40
,"-' T111 '0'
-20 o 20 40
'0'
60
'02
80
'02
100
.
Frequency (kHz)

___ Signal
Spectrum

Spectral
Images

(a) 10 kHz sine wave sampled at 40 kHz

Nyquist
Range
k=O k=-1 I k=~ k=O k=2 k=1 k=3

-40 -20 0 20 40 60 80 100


Frequency (kHz)

____ Signal
Spectrum

Spectral
Images

(b) 30 kHz sine wave sampled at 40 kHz

FIGURE 2.11
Spectra of sampled sine waves.

to be higher. The key is to ensure that no aliased copies of the signal overlap. Figure 2.12
shows two-sided spectra for a signal, band-limited between 120 and 160 kHz, sampled at
three different rates. According to the usual Nyquist limits, 320 kHz would be the minimum
sampling rate. As the figure shows, however, lower sampling rates can work as well. Of the
three rates shown in the figure, only 120 kHz is acceptable for the 40 kHz bandwidth signal.
The 100 kHz sampling rate gives no possibility of recovering an unaliased copy of the signal:
As in Figure 2.9(b)(iii), overlapping spectral images sum, destroying any possibility of ex-
tracting an untainted copy of the original spectrum. The 80 kHz rate, on the other hand, de-
mands an ideal anti-imaging filter. As in the example of Figure 2.11, the signals recovered
from the Nyquist range in Figure 2. 12 are baseband versions of the original. In the case of 80
kHz sampling, the signal spectrum is spectrally inverted in the baseband: The lowest fre-
SECTION 2.2 Sampling I 41

Nyquist Range

o fs 100 2fs 200


f (kHz)

(a) fs = 80 kHz

o 100 200
fs 2fs
f (kHz)

(b) fs = 100 kHz

Nyquist Range

o 100 fs 200

f (kHz)

(c) fs = 120 kHz

FIGURE 2.12
Sampling band-limited signals.

quencies in the signal alias to the highest frequencies in the baseband and vice versa. With
120 kHz sampling, no such spectral inversion occurs. Because Nyquist limits are not observed
in sampling the band-limited signal in Figure 2.12, the approach is termed undersampling.
One channel of a radio cell phone is an example of a high frequency, band-limited signal.
Copying the spectrum to the baseband avoids impracticably high sampling rates. One cell
phone occupies a bandwidth of 30 kHz in the 900 MHz range. Through undersampling, a
sampling rate a little higher than 60 kHz, instead of 1.8 GHz, permits data to be reconstructed.
Though it is normally avoided, aliasing can, at times, be useful. In automatic target de-
tection, the presence or absence of a signal of a particular frequency must be detected amongst
signals of other frequencies. For targets that occur in the range 2 to 2.4 MHz, for example,
Nyquist would require 4.8 MHz sampling, a very high rate. Instead, a band pass filter can be
42 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

Baseband
Aliased

/ Targets
/ Targets

1 2 3 Frequency (MHz)
'"
Sampling
Frequency

FIGURE 2.13
Undersampling in target detection.

used to filter out all but the signals in this range of frequencies. Then, according to the pre-
ceding discussion, the resulting signal can be sampled at 1 MHz, a little more than twice its
2.4 - 2 = 0.4 MHz bandwidth. Since the targets are known to lie between 2 and 2.4 MHz,
aliasing is definitely occurring, but is now exploited to deduce the correct frequencies of the
targets. A 2 MHz target will appear, through aliasing, at 0 MHz; and a 2.4 MHz target will
show up at 0.4 MHz, as Figure 2.13 illustrates. These aliased frequencies lie in the baseband,
the range of frequencies between zero and the Nyquist frequency, half the sampling rate.
Many signals are not band-limited. If no maximum frequency can be designated, aliasing
is impossible to avoid. To solve this problem, signals are low pass filtered prior to sampling, by
the analog low pass filter identified as the antialiasing filter in Figure 2.1. This filter removes all
frequencies above W Hz from the incoming signal. The procedure effectively band-limits the
signal, which means that a sampling frequency that is high enough to avoid aliasing can be cho-
sen. This feature, in fact, gives the filter its name. Naturally it is impossible to create an ideal an-
tialiasing filter, just as it was impossible to create an ideal anti-imaging filter. When a nonideal
low pass filter is used on a signal that is not band-limited, small amounts of signal at higher fre-
quencies remain even after the antialiasing step. Thus the filtered signal is not truly band-lim-
ited, and small amounts of aliasing occur that cannot be completely eliminated. This effect will
not have a large impact on the system provided the filter reduces signals above the Nyquist fre-
quency to below quantization noise levels, discussed in the next section.
Aliasing occurs because ideal antialiasing filters are impossible to create. The steeper
the roll-off of the filter, the smaller the amount of aliasing, but the greater the cost of the
analog filter, since a steeper roll-off can be produced only by increasing the order, or com-
plexity, of the filter. A trick that can be used to address this problem is to oversample at a
frequency is chosen to accommodate the roll-off of a low order analog filter. For a signal
with maximum frequency W Hz, the minimum sampling rate is 2 W Hz. As suggested in Fig-
ure 2.9, sampling produces spectral images of the original signal spectrum at each integer
multiple of the sampling frequency. The higher the sampling rate, the farther apart these im-
ages are, which means that the antialiasing filter can be permitted a shallower roll-off than
that depicted in Figure 2.7. Figure 2.14(a) shows how a low order antialiasing filter can be
SECTION 2.2 Sampling I 43

Low Order Analog Filter

...··············-1-··············(

o W 2W 3W 4W Frequency

(a) Analog Filtering Before Sampling

High Order Digital Filter

......... ,/
o W 2W 3W 4W Frequency

(b) Digital Filtering After Sampling

FIGURE 2.14
Oversampling.

used instead. When the output of this low order analog filter is sampled at 4 W Hz, copies
of its spectral content appear at every integer multiple of this frequency, as indicated in Fig-
ure 2.l4(b). Significant aliasing occurs, for example, in the range between Wand 3W Hz,
but this aliasing does not affect the important signal information. As the figure shows, the
aIiased portions of the spectrum can be filtered out using a high order digital filter once
sampling is complete. This trick saves the expense and complexity of a high order analog
filter and can reduce phase distortion problems associated with analog filters. Overs am-
piing is discussed in more detail in Section 14.1.2.

EXAMPLE 2.1
Most people have experienced the illusion of the wheels of a car appearing to turn backward
in a movie or television show. This is a direct result of aliasing, meaning that the frames of
film were not being recorded quickly enough to capture the correct rotation of the wheels. An
average tire with a diameter of about 0.6 m has a circumference of 1.88 m. This is the distance
traveled in one complete revolution of the tire. The car's speedometer records a speed in kilo-
meters per hour. A speed of v km per hour is equivalent to 1000v/3600 = 0.278v m1sec. The
number of cycles (revolutions) per second for the tire is given by:
ill
O.278v-
sec
Frequency = ~~~- ill = O.1479v Hz
1.88--
cycle
44 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

In order to satisfy Nyquist's rule, snapshots of the rotating tire must be taken with a fre-
quency at least twice the frequency of rotation. That is,

Minimum sampling frequency = 2 (FrequencYmax) = O.2958v Hz


Most commercial 16 mm cameras offer variable recording rates from 2 to 64 frames per
second. A common choice is 16 frames per second. At this recording rate, the maximum
speed that could be accommodated is found from

16 = 0.2958vmax
In other words, for speeds above 16/0.2958 = 54. I km/h, the film will not correctly record
the rotating wheel.

2.3 QUANTIZATION
As mentioned in the previous section, analog signals have two characteristics that make
them ill-suited for computer processing. First, analog signals are defined at every point in
time. Sampling solves this problem by reducing the number of points to be used for pro-
cessing to a finite level. Second, analog signals can take any amplitude value between their
physical minimum and maximum levels. The output from an operational amplifier, for ex-
ample, is a continuous voltage that can take any value between the limits of the power sup-
plies that drive the circuit. Computers use groups of bits to represent numbers. The number
of bits used limits the number of values that can be represented by the computer. For ex-
ample, if 2 bits are used, only four digital codes-OO, 01, 10, and II-are possible, each
with an associated quantization level. If the analog signal being coded lies between 0 and
2 V, for example, these digital codes might correspond to quantization levels 0.25 V, 0.75
V, 1.25 V, and 1.75 V. The analog signal can take the value 0.8 V, but the digital signal, de-
fined by the legal quantization levels, cannot. An analog sample is coded by choosing the
closest quantization level available, so errors will always exist when the number of bits is
finite. When N bits are used, 2N possible values can be represented by the computer. The
larger the number of bits used, the more closely the digital signal is able to correspond to
the analog signal, but the more time-consuming the calculations become.
When an analog signal with a certain range of values is coded using N bits, each sam-
ple must be coded to one of 2N levels. The gap between levels is called a quantization step:

(2.1)

where R is the full scale analog range and N is the number of bits. The quantization step
size is sometimes referred to as the resolution of the quantizer. For a given range, the quan-
tization step grows smaller as the number of bits increases. A simple quantization scheme
divides the range into 2N equal intervals and assigns each section a digital code. In Figure
2.15 analog values are mapped to one of the eight digital codes in a 3-bit system. The fig-
ure assumes unipolar analog inputs, which vary between zero and some positive maxi-
mum. Eight analog intervals are spaced evenly across the full scale range of the analog in-
45 max
Level
0 I
Quantization SECTION 2.3 max
Code
Analog Sample Value0
110 010
100
101
011
000
001
111

Quantization
Error

o~
FIGURE 2.15
Quantization of unipolar data (maximum error = full step).

put. Each of these intervals maps to one of the available digital codes. Ideally all mappings
would lie on the diagonal line where the digital value equals the analog value. Because a
finite number of bits is used, this direct correspondence cannot be achieved. For every in-
put value, the quantization error that occurs is the difference between the quantized value
and the actual value of the sample.

Quantization error = Quantized value - Actual value

The quantization errors in the quantization scheme of Figure 2. 15 are shown at the bottom
of the diagram. Apparently, errors as large as one full quantization step can occur in this
coding scheme. That is, the distance between the dashed line, which represents the ideal
case, and the coding steps can be as large as a full step. The errors can be reduced if the
quantization levels are shifted to lie symmetrically around the diagonal. This can be
achieved by assigning 000 to the first half step rather than the first full step from the bot-
tom of the analog range, as shown in Figure 2.16. All other codes follow as usual at full
quantization step intervals. In Figure 2.16, the coding levels that would be obtained for the
46 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

Digital Quantized
Code level

111 max0 max


Analog Sample Value0
110 101
011
000
001
100
010

Quantization
Error

o~

FIGURE 2.16
Ouantization of unipolar data (maximum error = half step).

simple quantization scheme of Figure 2.15 are shown as a dashed line. Notice that the new
and improved quantization scheme guarantees that quantization errors are, on average, re-
duced by half. In fact, the only place where a full step error can occur is in the last interval,
as Example 2.2 will illustrate. This is no great penalty, especially when the number of bits,
and hence the number of coding levels, is large.

EXAMPLE 2.2
Analog pressures are recorded, using a pressure transducer, as voltages between 0 and 3 V.
The signal must be quantized using a 3-bit digital code. Indicate how the analog voltages
will be convelted to digital values.

Since the range of the signal is 3 V, the quantization step size is


3V
Q =-23 = 0.375 V
--'ll,.,"',~I!l!l
.. "'.•• ------------- •..•.•..••.•.•..----- I!.•..•...
•.•.__ •••_.• I!I~. ._ ••• __

SECTION 2.3 Quantization I 47

TABLE 2.1
Quantization Table for Example 2.2

Quantization Range of Analog Inputs Mapping


Digital Code Level (V) to This Digital Code (V)
000 0.0 0.0 :S x < 0.1875
001 0.375 0.1875:s x < 0.5625
010 0.75 0.5625 :S x < 0.9375
OIl 1.125 0.9375 :S x < 1.3125
100 1.5 1.3125 :S x < 1.6875
101 1.875 1.6875 ::; x < 2.0625
110 2.25 2.0625 :s x < 2.4375
III 2.625 2.4375 :s x :s 3

2.625
2.25
1.875
0.75
1.5
0.375
1.125
0.0
0.5
Level
Digital Quantized
(V) 0
Code
111010
000
011
001
101
100
110

1.5 2 2.5 3
Analog Sample Value

FIGURE 2.17
Quantization diagram for Example 2.2.

and half a quantization step is 0.1875 V wide. Table 2.1 shows all eight digital codes and their
associated analog ranges, as is easily verified by inspecting Figure 2.17. Note that the first code
covers only a half-step range, so the last code must cover a range equal to one and a half quan-
tization steps. All other codes cover a range equal to a full quantization step. The quantization
level corresponding to a digital code is given in the center column of the table. It matches the
point where the diagonal ideal characteristic intersects the stepped quantization curve.
48 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

As mentioned, the only place where errors larger than half a quantization step can oc-
cur in this quantization scheme is for the largest inputs. The III code (with quantization
level 2.625 V) must serve the range of inputs from 2.4375 to 3 V. Thus, an error of a full
quantization step, or 0.375 V, will occur in coding an input sample of 3 V.

Bipolar analog data vary between a negative minimum and a positive maximum.
Quantization errors affect bipolar data in the same way as they affect unipolar data. The best
scheme for bipolar data begins with the unipolar quantization diagram of Figure 2.16 and
simply extends the quantization steps in the negative direction. Symmetry around zero is
maintained to keep errors small. Figure 2.18 shows the arrangement for bipolar data that
will keep the largest average errors within one half of a quantization step. As in the unipo-
lar case, the bottom range is half a step wide and the top range is one and a half steps wide.
Note that the digital codes in Figure 2.18 use a two's complement representation (to be

Digital Quantized
Code Level
(V)

111 max

110

101

100

011

010

001

000 min
min o max
Analog Sample Value

Quantization
Error

o~ l

FIGURE 2.18
Quantization of bipolar data (maximum error = half step).
SECTION 2.3 Quantization I 49

TABLE 2.2
Quantization Table for Example 2.3

Quantization Range of Analog Inputs Mapping


Digital Code Level (V) to This Digital Code (V)

100 -5.0 -5.0::; x < -4.375


101 -3.75 -4.375::; x < -3.125
110 -2.5 -3.125::; x < -1.875
111 -1.25 - 1.875 ::; x < -0.625
000 0.0 -0.625 ::; x < 0.625
001 1.25 0.625 ::; x < 1.875
010 2.5 1.875::; x < 3.125
Oil 3.75 3.125 ::; x ::; 5.0

described in Section 12.3), which requires the leading bit for all negative codes to be 1. Ex-
ample 2.3 illustrates the quantization of bipolar data.

EXAMPLE 2.3
An analog voltage between - 5 V and 5 V must be quantized using 3 bits. Quantize each of
the following samples, and record the quantization error for each:
a. -3.4 V
b.O.OV
c. 0.625 V

Using the quantization step size lOV123= 1.25 V, the quantization table in Table 2.2 can be
constructed.
a. The analog sample - 3.4 V produces the digital code 101, with a quantization er-
rorof-3.75 - (-3.4) = -0.35Y.
b. The analog sample 0.0 V codes as 000, with zero quantization error.
c. The analog sample 0.625 V generates the digitai code 001, with a quantization er-
ror of 1.25 - 0.625 = 0.625 y. For the midrange, this represents a worst-case
quantization error, equal to half a quantization step.

Since the worst-case quantization errors are determined by the size of the quantiza-
tion step, errors can be reduced by increasing the number of bits used to represent each sam-
ple. Unfortunately, they cannot be entirely eliminated, and their combined effect is some-
times called quantization noise. The dynamic range of the quantizer is the number of
levels it can distinguish in noise. It is a function of the range of signal values and the range
of error values, and is expressed in units of decibels, or dB, described in Appendix A. 10.
An analog signal takes values over a range R. Each quantized value lies somewhere be-
tween half a quantization step below and half a quantization step above the actual sample
values, meaning that the errors lie between - Q/2 and + QI2, where Q is the quantization
step size. Thus, the errors take values over a range Q. The number of distinct levels that can
50 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

be identified without error, then, is R/Q. From Equation (2.1), this equals 2N, where N is the
number of bits. Expressing the ratio in dB gives the dynamic range of the quantizer as

Dynamic range = 20 IOg(~) = 20Iog(2N) = N(20 log 2) = 6.02N dB


The dynamic range improves as the number of bits N increases. The concept of dynamic
range is connected to the concept of signal-to-noise ratio, which measures how easily a
signal can be discerned from noise. The larger the signal-to-noise ratio, or SNR, the
stronger the signal compared with the noise. SNR can be calculated as

SNR = 10 log ------


(Signal power)
Noise power
or,

SNR = 20 IOg(Sig~al amPlitude)


NOIse amplitude
and is measured in dB. For the specific case of quantizing a sine wave, for example, the signal-
to-noise ratio is 6.02N + 1.76 dB, as calculated in Appendix B. When a maximum permis-
sible quantization error level is set, Equation (2.1) can be used to determine how many
quantization bits are needed. Solving this equation for N gives 2N = R/Q, or

In performing this calculation, it is important to remember that Q is the size of the quanti-
zation step, and that the maximum midrange quantization error is half of this, or Q/2.

EXAMPLE 2.4
An analog signal whose range lies between 0 and 5 V must be quantized, with midrange quan-
tization errors no bigger than 6 X 10-5 V. How many bits are required to meet this requirement?

If the maximum allowable quantization error is 6 X 10-5, then the quantization step must
be no greater than 12 X 10-5. For an analog signal with a 5 V range, the number of quan-
tization bits would then be

15.35

Thus, a 16-bit quantizer is adequate.

In practice, quantization is handled by analog-to-digital converters. A wide variety of


converters is available commercially. They may be unipolar or bipolar, with many possible
analog ranges, and between 8 and 24 bits. Quantization errors will always be smallest when
SECTION 2.4 Analog-To-Digital Conversion I 51

AID Conversion

Anti- Sample Quantization


Analog and and Digital
Aliasing Code
Signal Filter Hold Digitization

FIGURE 2.19
Analog-to-digital conversion.

the signal being quantized utilizes the maximum analog range of the converter. When it oc-
cupies only a small part of the converter's range, all errors are proportionally larger, and the
effect of quantization noise on the signal grows, reducing the signal-to-noise ratio.

2.4 ANALOG-TO-DIGITAL CONVERSION


When data are inherently digital, digital signal processing can begin immediately. The num-
ber of newspapers sold each day, for example, requires no sampling, because the data is al-
ready sampled and needs no quantization,) because the data are integer-valued. Otherwise,
an analog signal must first be converted into digital form. As shown in Figure 2.19, the ana-
log-to-digital (AID) conversion process consists of sample and hold, followed by quanti-
zation and digitization. Before it is sampled, an analog signal is ~irst filtered by a low pass
antialiasing filter. to eliminate as much as possible the effects of aliasing. This is followed
by sampling, accomplished by a sample-and-h.old circuit. At each sampling point, this cir-
cuit acquires the current value of the analog signal as quickly as possible, and then holds it
steady until the next sampling point. Thus, the sample-and-hold circuit defines the sampling
instants and also freezes each sample value while it is quantized and converted to a digital
code. If the signal were allowed to change during conversion, significant errors would be
introduced. Figure 2.19 pictures 8-bit AID conVersion, since 8 bits are produced at the out-
put. Usually digital codes generated by an AID converter are presented in parallel to the
DSP that will process them, as shown in the figure. For some low frequency converters,.
though, serial output may be used.
The output of the sample-and-hold circuit is still an analog signal. As long as the sam-
pler takes a negligible amount of time to acquire each new sample, the sainple~and-hold sig-
nal has the look of a staircase. When this acquisition time is significant, the sample-and-hold
signal briefly follows the analog signal being sampled until a level hold state is reached, as
shown in Figure 1.6. The sample-and-hold signal is quantized and converted to a digital code
by an analog-to-digital converter. In fact, quantization and digitization occur at the same time.
The quantization level closest to a sample-and-hold value is selected as the best equivalent,
and the digital code for this quantization level is assigned to the sample. From this discussion,
the nature of the signals in Figure 2.19 can be pictured, as shown in Figure 2.20. Figure 2.21
shows the relationships between the signals that result from each step in the AID process. In

[I] If the maximum number of newspapers sold exceeds the largest integer that can be represented
by the processor, then quantization will be required and quantization errors will occur.
52 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

10011011
Anti- Sample Quantization
10110001
Aliasing and and
00100110
Filter Hold Digitization 10111000

FIGURE 2.20
AID.

TABLE 2.3
Ouantization Table for Figure 2.21

Quantization Range of Analog Inputs Mapping


Digital Code Level (V) to This Digital Code (V)

000 0.000 0.000 ::; x < 0.0625


001 0.125 0.0625 ::; x < 0.1875
010 0.250 0.1875::; x < 0.3125
011 0.375 0.3125::; x < 0.4375
100 0.500 0.4375 ::; x < 0.5625
101 0.625 0.5625 ::; x < 0.6875
110 0.750 0.6875 ::; x < 0.8125
III 0.875 0.8125 ::; x ::; 1.000

this illustrative example, the analog signal has a range from 0 to 1 V. It is sampled every 0.2
msec, or 5000 times per second, and quantized using the 3-bit quantization scheme shown in
Table 2.3. The quantization errors and the digital codes that result from quantization and dig-
itization are shown at the bottom of Figure 2.21, one for each sample point. These digital
codes are strung together to form a serial bitstream in this example, as shown in Figure 2.22.
In this 3-bit system, every group of 3 bits corresponds to a sample.
It is clear from Figure 2.21 that the digital signal provides an approximation to the
analog signal, but that significant quantization errors do occur. These errors can be reduced
by increasing the number of bits used for quantization. Bit rate, a measure of the rate at
which bits are generated, is frequently quoted as a measure of AID converter performance.
It is defined as

Bit rate = Nfs


where N is the number of bits per sample andfs is the number of samples per second. For
this example, the bit rate is 3 bits/sample X 5 ksamples/sec = 15 kbps, where bps stands
for bits per second.

2.5 DIGITAL-TO-ANALOG CONVERSION


In some cases, the digital codes that result from processing can be used directly, to drive a
device such as a stepper motor that does not require analog input. In most cases, though,
SECTION 2.5 Digital-To-Analog Conversion I 53

Digital0.2
0.8
0.6
0.4
0.750
0.625
0.500
0.250
0.000
0.375
0.125
0.875
Level
Quantized
Code
(V) 0
111
001
100
000
110
101
010
011 Digital Signal

..·..----1/
:
Sample-and-Hold
Signal
I

-----II Quantized

~ /, Levels
I :
------i I
: Analog
A Signal
I
I

1.2 1.4 1.6 1.8 2


x 10-3
Time

Quantization
Error
o~
Digital Signal Codes: 011 101 110 111 111 111 110 101 011 010
FIGURE 2.21
Three-bit AID conversion.

Stream of Digital Codes: 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 0

FIGURE 2.22
Serial digital bitstream.

the digital code must be converted into an analog signal, in order, for example, to be seen
or heard. In the digital-to-analog (D/A) conversion process presented in Figure 2.23, a cir-
cuit first maps 8-bit digital codes to analog levels proportional to the size of the digital num-
ber. These levels are then held steady for one full sample period through zero order hold,
until a new digital code is presented at the beginning of the next cycle. The analog output
of the D/ A converter, therefore, resembles a staircase, similar to the sample-and-hold signal
54 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

Of A Conversion

Convert
Anti-
Digital to Zero Order Analog
Code Hold Imaging
Analog Filter Signal
Level

FIGURE 2.23
Digital-to-analog conversion.

10011011
Zero Anti-
10110001
Order Imaging
00100110
Hold Filter
10111000

FIGURE 2.24
D/A.

that was produced during the analog-to-digital conversion process. In the last step, a low
pass filter anti-imaging filter smoothes the steplike zero order hold signal. Figure 2.24 il-
lustrates the types of signals found at each stage in the conversion process.
Figure 2.25 demonstrates DI A conversion for a 3-bit digital signal. The staircase sig-
nal that results from the zero order hold process is clearly unlike the smooth analog input
to the DSP system, whose frequency content was limited to a maximum of W Hz by the an-
tialiasing filter. The sharp edges of the staircase signal in Figure 2.25 contain much higher
frequencies, which are introduced by the conversion process. They are removed by the fi-
nal, anti-imaging filter. This filter has a cut-off frequency of W Hz and ensures that all un-
wanted frequencies are eliminated. Figure 2.9 showed why this filter is necessary from a
frequency point of view: It effectively removes spectral images that arise from sampling.
In the time domain, the effect of the anti-imaging filter is to smooth away the sharp edges
of the staircase signal, as seen in Figure 2.25. If ideal filters were available and if Nyquist
limits were observed, then applying an AID conversion followed directly by a DI A conver-
sion would reproduce the original analog signal, apart from quantization errors and a time
shift due to filtering.
Perfect recovery is possible only if the anti-imaging filter can perfectly eliminate spu-
rious frequency elements from the zero order hold signal. As discussed in Section 2.2.2, the
impossibility of constructing an ideal filter necessitates additional spacing in the frequency
domain between copies of the signal spectrum. Section 14.1.3 explains how such spacing
may be obtained by effectively increasing the sampling rate. The greater the increase in the
sampling rate, the simpler and cheaper the analog anti-imaging filter can be.
Hearing and seeing the effects of the sample and hold, quantization, zero order hold,
and anti-imaging can help to clarify the relationships among these signals. Figure 2.26(a)
shows an analog signal. This signal is passed to a sample-and-hold circuit, which produces
the waveform in Figure 2.26(b). This staircase waveform is the basis for quantizing and dig-
itizing, which ultimately produce a digital version of the original analog waveform. If no
CHAPTER SUMMARY I 55

0.375
Digital 0.2
0.4
0.6
0.8
0.250
0.000
0.125
0.625
0.750
0.500
0.875
Level
Quantized
Code
(V) 0
111
001
100
110
000
101
010
011 Digital Signal
(
Zero Order

.m'.uu:/ Hold Signal


: Analog
: /' Signal

1.2 1.4 1.6 1.8 2


X 10-3
Time

FIGURE 2.25
Three-Bit D/A conversion.

processing takes place, the digital signal is passed to a digital-to-analog converter, which
produces a proportional analog level. Through zero order hold, this analog level is held
steady for the duration of the sampling period. The analog zero order hold signal is shown
in Figure 2.26(c). It differs from the sample-and-hold signal because of quantization errors.
Finally, the zero order hold signal is filtered by the anti-imaging filter to produce a recon-
struction of the original signal. This reconstruction is shown in Figure 2.26(d). It is a
smoothed version of the zero order hold signal. As Figure 2.26(a) shows, the anti-imaging
filter delays the reconstructed signal with respect to the original signal. Otherwise, the two
signals differ mainly as a result of quantization.

CHAPTER SUMMARY

~-~
~j~

~""
Matlab
Support
1. Sampling is the act of collecting values from an analog signal at regular intervals.
Nyquist theory states that the sampling rate for a signal must be at least twice the max-
imum frequency present in the signal.
2. The Nyquist sampling rate is twice the highest frequency in the signal being sampled.
Oversampling refers to sampling at a rate greater than the Nyquist rate. It eases the de-
sign of the antialiasing filter. Undersampling, on the other hand, refers to sampling at a
56 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

Q)
"0
.~
Ci..

«E

_~
~,~'
...
~j~

addaorig.wav

Time

(a) Original Signal with Reconstructed Signal in Background


Q)
"0
_-E
Ci..

«E

Time

(b) Sample-and-Hold Signal with Original Signal


in Background

FIGURE 2.26
Comparing signals in the AIDIDIA chain.

rate that is slower than the Nyquist rate. It results in aliasing, which alters the spectrum
of the signal.

3. The first step in converting an analog signal to a digital signal is to apply a low pass an-
tialiasing filter, which eliminates elements above the Nyquist frequency. The next step
is sample and hold, which defines the sampling instants and freezes an analog value for
conversion. The third step is quantization. For an N-bit AID converter, 2N possible
CHAPTER SUMMARY I 57

Q)
"0
.-E
a.
«E

-
~",
~j:o(
....• ..
addazoh. wav

Time

(c) Zero Order Hold Signal with Sample-and-Hold Signal


in Background
Q)
"0
.~
a.
«E

Time

(d) Reconstructed Signal with Zero Order Hold Signal


in Background

FIGURE 2.26
Continued

quantization levels are available, and the one closest to the amplitude of the sample is
chosen. A digital code that matches the chosen quantization level is assigned to the sam-
ple, which completes AID conversion.
4. After processing is complete, the digital signal must be converted to an analog signal.
The digital signal is first converted to a proportionate analog level, which is held steady
58 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

between sampling instants using zero order hold. The last step in DIA conversion is to
smooth the signal using an anti-imaging filter. This filter removes the spectral images
caused by sampling that are responsible for the staircase shape of the zero order hold
signal.
5. Aliasing is one source of error for AID conversion. Because a limited number of quan-
tization levels are available, quantization is another source of error. The larger the num-
ber of bits used, the smaller the errors are, which translates to a larger dynamic range
for the AID converter.

REVIEW QUESTIONS
2.1 Humans can hear sounds at frequencies between 0 and 22.05 kHz. What minimum
sampling rate should be chosen to permit perfect recovery from samples?
2.2 Determine the Nyquist sampling rate for each of the following analog signals:
3. x(t) = cos(20t + l2°)
V( IS> ...---?b. x(t) = 2sin(50001Tt/3)
c. x(t) = sin(30001Ttl7 + 1T/l0)
2.3 A voice signal is sampled at 8000 samples per second.
3. What is the time between samples?
b. What is the maximum frequency that will be recovered from the signal?
2.4 Five periods of an analog signal x(t) = cos( 4000t) are oversampled at four times the
Nyquist sampling rate. How many samples are collected?
2.5 Five periods of an analog signal x(t) = 5sin(25001Tt + 10°) are undersampled at 7/8
of the Nyquist rate. How many samples are collected?
2.6 The spectrum for an analog signal is shown in Figure 2.27. The signal is sampled at
600 Hz. Draw the spectrum of the sampled signal between - 200 and l200 Hz.

(j) 1
"D
.2 0.9
'c
2' 0.8
2 0.7
0.6
0.5
0.4
0.3
0.2
0.1
o
-200 o 200 400 600 800 1000 1200

Frequency (Hz)

FIGURE 2.27
Spectrum for Question 2.6.
REVIEW QUESTIONS I 59

QJ 1.5 -,---,--
\J
~c
OJ
<tI
~

0.5

o
o 5 10 15 20 25 30 35 40 45 50

Frequency (kHz)

FIGURE 2.28
Magnitude spectrum for Question 2.7.

2.7 An analog signal's one-sided spectrum is shown in Figl.lfe 2.28. The signal is sam-
pled. Draw the spectrum of the sampled signal from 0 to 150 kHz. If aliasing occurs,
draw the true aliased spectrum by summing overlapping spectral elements. The
sampling rate is:
a. 60 kHz
b. 40 kHz
2.8 A cell phone transmits voice signals on a carrier. The transmissions lie in the range
900 MHz to 900.03 MHz. What minimum sampling rate should be chosen to ensure
that the transmissions will be recoverable from the digital samples?
2.9 Determine the locations of the peaks in the sampled spectrum for the following sine
waves:
a. Signal frequency 300 Hz, sampling frequency 1 kHz
b. Signal frequency 600 Hz, sampling frequency 1 kHz
c. Signal frequency 1.3 kHz, sampling frequency 1 kHz
2.10 Find the aliased frequencies for the following band-limited signals sampled at 1 kHz.
For each, draw the spectrum for the sampled signal between - 500 and 1500 Hz and
indicate whether spectral inversion occurs in the baseband:
a. Signal band-limited between 1100 and 1400 Hz, shown in Figure 2.29.
b. Signal band-limited between 800 and 950 Hz, shown in Figure 2.30.
2.11 A 25 kHz signal is sampled at 8 kHz. Find the aliased frequency of the signal.
2.12 Show that XI(t) = COS(l207Tt) and X2(t) = cos(4207Tt) have the same samples when
sampled at 150 Hz.
2.13 A radar signal ranging in frequency from 900 to 900.5 MHz is undersampled at 2
MHz. If a 200 kHz target appears in the baseband, what is the actual frequency of
the target?
60 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

OJ 1.5
"0
2
'c
OJ
co
~

0.5

o
-500 o 500 1000 1500
fs
Frequency (Hz)

FIGURE 2.29
Spectrum for Question 2.10(a)

OJ 1.5
"0
.-E
cOJ
ell
~

0.5

o
-500 o 500 1000 1500
fs
Frequency (Hz)

FIGURE 2.30
Spectrum for Question 2.10(b).

2.14 A bicycle travels down the road at 15 krn/h. The tire of the bicycle has an outside
diameter of 63.5 cm. How many snapshots of the bicycle must be taken every sec-
ond if the snapshots are to be used to record correctly the true motion of the wheels?
2.15 A signal x(t) = sin(27Tft) with a frequency less than 1 kHz is sampled at 600 Hz and
appears as a 150 Hz signal. The same signal is sampled at 550 Hz and appears as a
200 Hz signal. What is the frequency of the signal?
2.16 Voltages between - 3 V and + 3 V must be digitized. Find the quantization step size
when samples are quantized using:
a. 4 bits
b. 8 bits
c. 16bits
REVIEW QUESTIONS I 61

-0
Q) 8
::J
~ 7 (~
Q.

) ~ 6 (~

5 (

3
2

o
o 2 3 4 5 6 7 8 9 10

Time

FIGURE 2.31
Signals for Question 2.19.

TABLE24.0
4.1
4
0.1
3.0 512.4
865.0
976.6
7.0
2.2
3
2.7
4.2
0.0
5.3
3.6
2.0
3.1
3.0 0
1.0
1.4
Data for Question 2.19
n

2.17 How many different digital codes can be produced by an AID converter using:
a. 8 bits?
b. 10 bits?
c. 12 bits?
2.18 Explain why error-free quantization is impossible.
2.19 An analog sample-and-hold signal and its quantized digital counterpart are plotted
in Figure 2.31 from Table 2.4. Compute the quantization errors for each of the 10
samples, assuming that the time for the sampler to acquire the signal at each sam-
pling point is negligible.
2.20 Compile a quantization table and draw a quantization diagram for a 4-bit quantiza-
tion of a bipolar analog voltage between -2 V and 2 V. Quantization errors should
be no greater than half a quantization step in midrange.
2.21 A group of analog samples, listed in Table 2.5, is digitized using the quantization
table in Table 2.6. Determine the digital codes, the quantized level, and the quanti-
zation error for each sample.
62 I CHAPTER 2 Analog-to-Digital and Digital-to-Analog Conversion

TABLE 2.5
Analog Samples for Question 2.21

n 0123456789
Analog Sample (V) 0.5715 4.9575 0.625 3.6125 4.0500 0.9555 2.7825 1.5625 2.7500 2.8755

TABLE 2.6
Quantization Table for Question 2.21

Quantized Level Range of Analog Inputs Mapping to This Digital Code


Digital Code (V) (V)
000 0.000 O:s x < 0.3]25
00] 0.625 0.3125 :S x < 0.9375
0]0 1.250 0.9375 :S x < 1.5625
0] ] ].875 1.5625 :S x < 2.1875
]00 2.500 2.]875:S x < 2.8125
101 3.125 2.8]25 :S x < 3.4375
]10 3.750 3.4375 :S x < 4.0625
]]] 4.375 4.0625 :S x < 5.0

2.22 Find the dynamic range in dB of a quantizer using:


a. 4 bits
b. 8 bits
c. 16bits
2.23 The dynamic range of an AID converter is 60.2 dB. How many data bits does it
produce?
2.24 An analog signal ranging between 0 and 1 V must be quantized. The midrange quan-
tization errors must be no greater than 0.1 V. How many quantization bits must be
used to satisfy this requirement?
2.25 Compute the bit rate for an 8 kHz, I6-bit sampler.
2.26 The maximum midrange quantization error allowed is 1% of the full scale range of
an analog signal. If the sampling frequency of an AID converter is 16 kHz, what is
the converter's minimum bit rate?
2.27 A 3-bit DIA converter produces a 0 V output for the digital code 000 and a 5 Vout-
put for the code I I I, with other codes distributed evenly between 0 and 5 V. Draw
the zero order hold output from the eonverter for an input: 111 101 0 I 1 101 000 001
011 010 100 110.
2.28 What effect does an anti-imaging filter have on a zero order hold signal?

Vous aimerez peut-être aussi