3 - Digital Communication
3 - Digital Communication
3 - Digital Communication
Objectives
After studying this chapter, you should be able to:
( Compare analog and digital communication techniques and discuss the
advantages of each.
( Calculate the minimum sampling rate for a signal and explain the necessity
for sampling at that rate or above.
( Find the spurious frequencies produced by aliasing when the sample rate is
too low.
( Describe the common types of analog pulse modulation.
( Describe pulse-code modulation and calculate the number of quantizing
levels, the bit rate, and the dynamic range for PCM systems.
( Explain companding, show how it is accomplished, and explain its effects.
( Describe the coding and decoding of a PCM signal.
( Describe differential PCM and explain its operation and advantages.
( Describe delta modulation and explain the advantages of adaptive delta
modulation.
( Distinguish between lossless and lossy compression and provide examples
of each.
( Describe the operation of common types of vocoders.
84 ! CHAPTER 3
all modern telephone switches are digital. Digital telephony sounds pretty
good, for a telephone call, but does not compare with compact disc audio.
We will find out why in the next sections.
Sampling Rate In 1928, Harry Nyquist showed mathematically that it is possible to recon-
struct a band-limited analog signal from periodic samples, as long as the
sampling rate is at least twice the frequency of the highest-frequency com-
ponent of the signal. This assumes that an ideal low-pass filter prevents
higher frequencies from entering the sampler. Since real filters are not ideal,
in practice the sampling rate must be considerably more than twice the max-
imum frequency to be transmitted.
If the sampling rate is too low, a form of distortion called aliasing
or foldover distortion is produced. In this form of distortion, frequencies
in the sampled signal are translated downward. Figure 3.1 shows what
happens.
In Figure 3.1(a) the sampling rate is adequate and the signal can be re-
constructed. In Figure 3.1(b), however, the rate is too low and the attempt to
reconstruct the original signal results in a lower-frequency output signal.
Once aliasing is present, it cannot be removed.
The frequency of the interference generated by aliasing is easier to see by
looking at the frequency domain. For simplicity, assume that the signal to be
sampled, which we will call the baseband signal, is a sine wave:
e b = E b sin ω b t (3.1)
where
e b = instantaneous baseband signal voltage
E b = peak baseband signal voltage
ω b = the radian frequency of the baseband signal
present, the output of the sampler will be the same as the baseband signal
amplitude, and when there is no pulse, the sampler output will be zero.
The spectrum for the pulse train in Figure 3.2 is given in Chapter 1 as:
1 1 sin πτ/ T sin 2πτ/ T sin 3πτ/ T
es = +2 cos ω st + cos 2ω st + cos 3ω st + ⋅ ⋅ ⋅ (3.2)
T T πτ/ T 2πτ/ T 3πτ/ T
1 2 sin πτ/ T sin 2πτ/ T 2 sin 3πτ/ T
= + cos ω st + cos 2ω st + cos 3ω st + ⋅ ⋅ ⋅
T πτ πτ 3πτ
where
es = instantaneous voltage of the sampling pulse
τ = pulse duration
T = pulse period
ωs = radian frequency of the pulse train
DIGITAL COMMUNICATION ! 87
FIGURE 3.2
Sampling pulses
Multiplying the two signals given in Equations (3.1) and (3.2) together
gives the following output:
Eb 2 E b sin πτ / T
v (t ) = sin ω bt + sin ω bt cos ω s t (3.3)
T πτ
E b sin 2 πτ / T
+ sin ω bt cos 2ω s t
πτ
2 E b sin 3πτ / T
+ sin ω bt cos 3ω s t
3πτ
As is often the case with equations of this type, we do not have to “solve”
anything to understand what is happening. The first term is simply the origi-
nal baseband signal multiplied by a constant. If only this term were present,
the original signal could be recovered from the sampled signal. However, we
need to look at the other terms to see whether they will interfere with the
signal recovery.
The second term contains the product of sin ωbt and cos ωst. Recall the
trigonometric identities:
1
sin A cos B =
2
[sin( A − B) + sin( A + B)] (3.4)
and
1
sin A cos B =
2
[sin( B + A) − sin( B − A)] (3.6)
88 ! CHAPTER 3
This new identity can be used to expand the second term of Equation
(3.3) as follows:
2 E b sin πτ / T
sin ω bt cos ω s t (3.7)
πτ
E b sin πτ / T
=
πτ
[sin(ω s + ω b )t − sin(ω s − ω b )t ]
E b sin πτ / T E sin πτ / T
= sin(ω s + ω b )t − b sin(ω s − ω b )t
πτ πτ
Now we can see that this term consists of components at the sum and
difference of the baseband and sampling frequencies. The sum term can
easily be eliminated by a low-pass filter, since its frequency is obviously
much higher than the baseband. The difference term is more interesting. If
ws > 2ωb, then ωs − ωb > ωb and the difference part of this term can also be re-
moved by a low-pass filter, at least in theory. However, if ωs < 2ωb, the differ-
ence will be less than ωb. An aliased component will appear as
ƒa = ƒs − ƒb (3.8)
and low-pass filtering will not be effective in removing it.
The other terms in Equation (3.3) are not interesting here because they
all represent frequencies greater than ωs − ωb. Therefore, if we make sure that
(ωs − ωb) > ωb, these other terms will not be a problem. Let us, then, rewrite
Equation (3.3), including only the first term and the expanded second term:
Eb E sin πτ / T
v (t ) = sin ω bt + b sin(ω s + ω b )t (3.9)
T πτ
E b sin πτ / T
− sin(ω s − ω b )t
πτ
An example will further clarify the problem.
EXAMPLE 3.1 Y
A digital communication system uses sampling at 10 kilosamples per second
(kSa/s). The receiver filters out all frequencies above 5 kHz. What frequen-
cies appear at the receiver for each of the following signal frequencies at the
input to the transmitter?
(a) 1 kHz
(b) 5 kHz
(c) 6 kHz
DIGITAL COMMUNICATION ! 89
SOLUTION
(a) The first term in Equation (3.9) is simply the input frequency, which is,
of course, the only one we want to see in the output. The second term
is the sum of the input and the sampling frequencies, and the third is the
difference. In this case, the frequencies generated are:
However, only the 1-kHz component passes through the filter and the sys-
tem operates correctly.
(b) ƒb = 5 kHz ƒs + ƒb = 15 kHz ƒs − ƒb = 5 kHz
Again, the system works properly and the 15-kHz component is removed
by the filter, and only the input frequency of 5 kHz appears at the output.
(c) ƒb = 6 kHz ƒs + ƒb = 16 kHz ƒs − ƒb = 4 kHz
Natural and The equations in the previous section assumed that a sample consisted of
Flat-Topped the baseband signal multiplied by a rectangular pulse. To simplify the math-
Sampling ematics, we assumed that the pulse had an amplitude of 1 V. These assump-
tions yield a sample pulse whose shape follows that of the original signal, as
shown in Figure 3.3(a). This technique is called natural sampling.
Analog Pulse As previously mentioned, it would be possible to transmit the samples di-
Modulation rectly as analog pulses. This technique, called pulse-amplitude modulation
(PAM), does not offer any great advantage over conventional analog trans-
mission. In current systems, PAM is used as an intermediate step; before be-
ing transmitted, the PAM signal is digitized. Similarly, at the receiver, the
digital signal is converted back to PAM as part of the demodulation process.
The original signal can then be recovered using a low-pass filter.
Some improvement in noise performance can be made by transmitting
pulses of equal amplitude but variable length (with the duration of the
pulses corresponding to the amplitude of the samples). This technique is
called pulse-duration modulation (PDM) or pulse-width modulation
(PWM). PDM has uses in communication, in some telemetry systems for in-
stance; but it is not likely to be seen in modern wireless systems. Similarly, it
is possible to transmit the information signal by using pulses of equal ampli-
tude and duration but changing their timing in accordance with the sample
amplitude. This system, called pulse-position modulation (PPM), is men-
tioned only for completeness, as it is rarely seen. Figure 3.4 shows the basic
nature of all these systems.
Quantization and The number of levels available depends on the number of bits used to ex-
Quantizing Noise press the sample value. The number of levels is given by
N = 2m (3.10)
DIGITAL COMMUNICATION ! 91
where
N = number of levels
m = number of bits per sample
EXAMPLE 3.2 Y
Calculate the number of levels if the number of bits per sample is:
(a) 8 (as used in telephony)
(b) 16 (as used in the compact disc audio system)
SOLUTION
(a) The number of levels with 8 bits per sample is, from Equation (3.10),
N = 2m
= 28
= 256
92 ! CHAPTER 3
(b) The number of levels with 16 bits per sample is, from the same equation,
N = 2m
= 216
= 65536
X
This process is called quantizing. Since the original analog signal can
have an infinite number of signal levels, the quantizing process will produce
errors called quantizing errors or often quantizing noise.
Figure 3.5 shows how quantizing errors arise. The largest possible error is
one-half the difference between levels. Thus the error is proportionately
greater for small signals. This means that the signal-to-noise ratio varies
with the signal level and is greatest for large signals. The level of quantizing
noise can be decreased by increasing the number of levels, which also in-
creases the number of bits that must be used per sample.
The dynamic range of a system is the ratio between the strongest possi-
ble signal that can be transmitted and the weakest discernible signal. For
a linear PCM system, the maximum dynamic range in decibels is given
approximately by
EXAMPLE 3.3 Y
Find the maximum dynamic range for a linear PCM system using 16-bit
quantizing.
SOLUTION
From Equation (3.11)
DR = 1.76 + 6.02m Db
= 1.76 + 6.02 × 16
= 98.08 dB
X
Bit Rate Increasing the number of bits per sample increases the bit rate, which is
given very approximately by
D = ƒsm (3.12)
where
D = data rate in bits per second
ƒ s = sample rate in samples per second
m = number of bits per sample
Extra bits are often included to detect and correct errors. A few bits,
called framing bits, are also needed to ensure that the transmitter and re-
ceiver agree on which bits constitute one sample. The actual bit rate will
therefore be somewhat higher than calculated above.
EXAMPLE 3.4 Y
Calculate the minimum data rate needed to transmit audio with a sampling
rate of 40 kHz and 14 bits per sample.
SOLUTION
From Equation (3.12)
D = ƒsm
= 40 × 103 × 14
= 560 × 103 b/s
= 560 kb/s
X
94 ! CHAPTER 3
Companding The transmission bandwidth varies directly with the bit rate. In order to
keep the bit rate and thus the required bandwidth low, companding is often
used. This system involves using a compressor amplifier at the transmitter,
with greater gain for low-level than for high-level signals. The compressor
will reduce the quantizing error for small signals. The effect of compression
on the signal can be reversed by using an expander at the receiver, with a
gain characteristic that is the inverse of that at the transmitter.
It is necessary to follow the same standards at both ends of the circuit
so that the dynamics of the output signal are the same as at the input. The sys-
tem used in the North American telephone system uses a characteristic known
as the µ (mu) law, which has the following equation for the compressor:
Vo ln(1 + µv i /Vi )
vo = (3.13)
ln(1 + µ)
where
vo = actual output voltage from the compressor
Vo = maximum output voltage
Vi = the maximum input voltage
vi = the actual input voltage
µ = a parameter that defines the amount of compression
(contemporary systems use µ = 255)
European telephone systems use a similar but not identical scheme
called A-law compression.
Figure 3.6 on page 95 shows the µ-255 curve. The curve is a transfer func-
tion for the compressor, relating input and output levels. It has been normal-
ized, that is, vi/Vi and vo/Vo are plotted, rather than vi and vo.
EXAMPLE 3.5 Y
A signal at the input to a mu-law compressor is positive, with its voltage
one-half the maximum input voltage. What proportion of the maximum
output voltage is produced?
SOLUTION
From Equation (3.13)
Vo ln(1 + µv i /Vi )
vo =
ln(1 + µ)
Vo ln(1 + 255 × 05
. )
=
ln(1 + 255)
= 0876
. Vo
DIGITAL COMMUNICATION ! 95
Coding and The process of converting an analog signal into a PCM signal is called cod-
Decoding ing, and the inverse operation, converting back from digital to analog, is
known as decoding. Both procedures are often accomplished in a single in-
tegrated-circuit device called a codec.
Figure 3.7 is a block diagram showing the steps for converting an analog
signal into a PCM code. The first block is a low-pass filter, required to pre-
vent aliasing. As shown in section 3.2, the filter must block all frequency
components above one-half the sampling rate. This requires a high-order
filter.
96 ! CHAPTER 3
FIGURE 3.8
Sample-and-
hold circuit
DIGITAL COMMUNICATION ! 97
FIGURE 3.9
Segmented mu-law
curve
step sizes can easily be calculated as follows: let the step size for the 0 and 1
segments be x mV. Then segment 2 has a step size of 2x, segment 3 a step size
of 3x, and so on. Since each segment has 16 steps, the value of x can be found
as follows.
16(x + x + 2x + 4x + 8x + 16x + 32x + 64x) = 1000 mV
x = 0.488 mV
The relationship between input voltage and segment is shown in Ta-
ble 3.1.
0 0–7.8 0.488
1 7.8–15.6 0.488
2 15.6–31.25 0.9772
3 31.25–62.5 1.953
4 62.5–125 3.906
5 125–250 7.813
6 250–500 15.625
7 500–1000 31.25
EXAMPLE 3.6 Y
Code a positive-going signal with amplitude 30% of the maximum allowed
as a PCM sample.
98 ! CHAPTER 3
SOLUTION
The signal is positive, so the first bit is a one. On the normalized voltage
scale, the amplitude is 300 mV. A glance at Table 3.1 shows that the signal is
in segment 6. That means the next three bits are 110 (6 in binary). This seg-
ment starts at 250 mV and increases 15.625 mV per step. The signal voltage is
50 mV above the lower limit, which translates into 50/15.625 = 3.2 steps.
This is less than halfway from step 3 to step 4, so it will be quantized as
step 3, making the last four bits 0011 (3 in binary). Therefore the code repre-
senting this sample is 11100011.
X
EXAMPLE 3.7 Y
Convert the 12-bit sample 100110100100 into an 8-bit compressed code.
SOLUTION
Copy the sign bit to the 8-bit code. Next count the leading zeros (2) and sub-
tract from 7 to get 5 (101 in binary). The first four bits of the 8-bit code are
thus 1101. Now copy the next four bits after the first 1 (not counting the sign
DIGITAL COMMUNICATION ! 99
bit) to the 8-bit code. Thus the next four bits are 1010. Discard the rest. The
corresponding 8-bit code is 11011010.
X
The decoding process is the reverse of coding. It is illustrated in the block
diagram in Figure 3.10. The expansion process follows an algorithm analo-
gous to that used in the compressor. The low-pass filter at the output re-
moves the high-frequency components in the PAM signal that exits from the
digital-to-analog converter.
Differential PCM Instead of coding the entire sample amplitude for each sample, it is possible
to code and transmit only the difference between the amplitude of the cur-
rent sample and that of the previous sample. Since successive samples often
have similar amplitudes, it should be possible to use fewer bits to encode the
changes. The most common (and most extreme) example of this process is
delta modulation, which is discussed in the next section.
Adaptive Delta Adaptive delta modulation, in which the step size varies according to previ-
Modulation ous values, is more efficient. Figure 3.12 shows how it works. After a number
of steps in the same direction, the step size increases. A well-designed adap-
tive delta modulation scheme can transmit voice at about half the bit rate of
a PCM system, with equivalent quality.
Lossy and There are two main categories of data compression. Lossless compression in-
Lossless volves transmitting all of the data in the original signal but using fewer bits.
Compression Lossy compression, on the other hand, allows for some reduction in the quality
of the transmitted signal. Obviously there has to be some limit on the loss in
quality, depending on the application. For instance, up until now the expecta-
tion of voice quality has been less for a mobile telephone than for a wireline
telephone. This expectation is now changing as wireless telephones become
more common. People are no longer impressed with the fact that wireless tele-
phony works at all; they want it to work as well as a fixed telephone.
Lossless compression schemes generally look for redundancies in the
data. For instance, a string of zeros can be replaced with a code that tells the
receiver the length of the string. This technique is called run-length encod-
ing. It is very useful in some applications: facsimile (fax) transmission, for
instance, where it is unnecessary to transmit as much data for white space on
the paper as for the message.
In voice transmission it is possible to greatly reduce the bit rate, or even
stop transmitting altogether, during time periods in which there is no
speech. For example, during a typical conversation each person generally
talks for less than half the time. Taking advantage of this to increase the
bandwidth for transmission in real time requires there to be more than one
signal multiplexed. When the technique is applied to a radio system, it also
allows battery-powered transmitters to conserve power by shutting off or
reducing power during pauses in speech.
Lossy compression can involve reducing the number of bits per sample
or reducing the sampling rate. As we have seen, the first reduces the
signal-to-noise ratio and the second limits the high-frequency response of
the signal, so there are limits to both methods. Other lossy compression
methods rely on knowledge of the type of signal, and often, on knowledge of
human perception. This means that voice, music, and video signals would
have to be treated differently. These more advanced methods often involve
the need for quite extensive digital signal processing. Because of this, they
have only recently become practical for real-time use with portable equip-
ment. A couple of brief examples will show the sort of thing that is possible.
voiced sounds this air causes the vocal cords to vibrate at an adjustable fre-
quency; for unvoiced sounds the air passes the vocal cords without vibrating
them. In either case, the sound passes through the larynx and mouth, which
act as filters, changing the frequency response of the system at frequent in-
tervals. Typically there are from three to six resonant peaks in the frequency
response of the vocal tract.
Vocoders can imitate the human voice with an electronic system. Mod-
ern vocoders start with the vocal-tract model above. There is an excitation
function, followed by a multi-pole bandpass filter. Parameters for the excita-
tion and the filter response must be transmitted at intervals of about 20 ms,
depending on the system. Vocoders of this type are known as linear predictive
coders because of the mathematical process used to generate the filter param-
eters from an analysis of the voice signal.
The first step in transmitting a signal using a vocoder is to digitize it in
the usual way, using PCM, generally at 64 kb/s. Then the signal is analyzed
and the necessary excitation and filter parameters extracted. Only these pa-
rameters need to be sent to the receiver where the signal is reconstructed.
The transmitted data rate is typically in the range of about 2.4 to 9.6 kb/s,
allowing a much smaller transmission bandwidth than would be required
for the original 64 kb/s rate.
There are two main ways of generating the excitation signal in a linear
predictive vocoder. In pulse excited linear predictive (PELP or sometimes
RPELP, for regular pulse excited linear predictive) vocoders, a white noise gener-
ator is used for unvoiced sounds, and a variable-frequency pulse generator
produces the voiced sounds. The pulse generator creates a tone rich in har-
monics, as is the sound produced by human vocal cords. Both sources have
variable amplitudes. Figure 3.13 illustrates the process at the receiver.
Residual excited linear predictive (RELP) vocoders, on the other hand,
apply the inverse of the filter that will be used at the receiver to the voice
signal. The output of this filter is a signal that, when applied to the receiver
filter, will reproduce the original signal exactly. Figure 3.14 shows how this
process works at the transmitter. The residual signal is too complex to trans-
mit exactly with the available bit rate, so it must be represented in a more
economical way. One method is to compare it with values in a table, called a
codebook, and transmit the number of the closest codebook entry. The re-
ceiver looks up the codebook entry, generates the corresponding signal, and
uses it instead of the pulse and noise generators shown in Figure 3.13. Many
other vocoder variations are possible as well.
Reasonable quality can be achieved with vocoders using data rates much
lower than those required for PCM. So far, the quality is not quite as good as
for straightforward PCM, however.
It should be obvious that vocoders are intended for use with voice only;
whereas, the PCM system described above can be used to send any 64 kb/s
data stream, including music, fax, or computer files. None of these will work
properly with a vocoder. Vocoders even tend to give a somewhat unnatural
quality to human speech. Still, the gain in bit rate and hence bandwidth,
compared to PCM, is so great that vocoders are very common in digital wire-
less voice communication.
' Summary The main points to remember from this chapter are:
( Modern communication systems are often a mixture of analog and digital
sources and transmission techniques. The trend is toward digital systems.
( Modern digital systems have better performance and use less bandwidth
than equivalent analog systems.
( An analog signal that is to be transmitted digitally must be sampled at
least twice per cycle of its highest-frequency component. Failure to do so
creates undesirable aliasing.
( PCM requires that the amplitude of each sample of a signal be converted
to a binary number. The more bits used for the number, the greater the ac-
curacy, but the greater the bit rate required.
( Delta modulation transmits only one bit per sample, indicating whether
the signal level is increasing or decreasing, but it needs a higher sampling
rate than PCM for equivalent results.
DIGITAL COMMUNICATION ! 105
( The signal-to-noise ratio for either PCM or delta modulation signals can
often be improved by using companding.
( Lossless compression eliminates redundant data bits, thereby reducing
the bit rate with no effect on signal quality.
( Lossy compression compromises signal quality in order to reduce the bit
rate. For voice transmissions, vocoders are often used to achieve great re-
ductions in bit rate.
( Equation List
fa = fs − fb (3.8)
Eb E sin πτ / T
v (t ) = sin ω bt + b sin(ω s + ω b )t (3.9)
T πτ
E b sin πτ / T
− sin(ω s − ω b )t
πτ
N = 2m (3.10)
D = ƒsm (3.12)
Vo ln(1 + µv i /Vi )
vo = (3.13)
ln(1 + µ)
( Key Terms
aliasing distortion created by using too low a sampling rate when coding
an analog signal for digital transmission
codec device that converts sampled analog signal to and from its PCM or
delta modulation equivalent
coding conversion of a sampled analog signal into a PCM or delta
modulation bitstream
companding combination of compression at the transmitter and
expansion at the receiver of a communication system
106 ! CHAPTER 3
( Questions
1. Give four advantages and one disadvantage of using digital (rather than
analog) techniques for the transmission of voice signals.
2. Explain the necessity for sampling an analog signal before transmitting
it digitally.
3. What is the Nyquist rate? What happens when a signal is sampled at less
than the Nyquist rate?
4. Explain the difference between natural and flat-topped sampling.
5. (a) List three types of analog pulse modulation.
(b) Which pulse modulation scheme is used as an intermediate step in
the creation of PCM?
(c) Which pulse modulation scheme also finds use in audio amplifiers
and motor speed-control systems?
6. What is meant by the term quantizing noise?
7. For a PCM signal, describe the effects of:
(a) increasing the sampling rate
(b) increasing the number of bits per sample
8. (a) Briefly explain what is meant by companding.
(b) What advantage does companded PCM have over linear PCM for
voice communication?
9. How does differential PCM differ from standard PCM?
10. Explain why the sampling rate must be greater for delta modulation
than for PCM.
11. What is meant by slope overload in a delta modulation system? How
can this problem be reduced?
12. What are the two functions of a codec? Where in a telephone system is
it usually located?
13. Explain briefly how µ-law compression is implemented in a typical
codec.
108 ! CHAPTER 3
14. Explain the difference between lossless and lossy data compression.
Give an example of each.
15. How do vocoders model the human vocal cords? How do they model
the mouth and larynx?
16. What gives vocoders their somewhat artificial voice quality?
17. Does digital audio always have higher quality than analog audio?
Explain.
( Problems
1. It is necessary to transmit the human voice using a frequency range
from 300 Hz to 3.5 kHz using a digital system.
(a) What is the minimum required sampling rate, according to theory?
(b) Why would a practical system need a higher rate than the one you
calculated in part (a)?
2. The human voice actually has a spectrum that extends to much higher
frequencies than are necessary for communication. Suppose a fre-
quency of 5 kHz was present in a sampler that sampled at 8 kHz.
(a) What would happen?
(b) How can the problem described in part (a) be prevented?
3. A 1-kHz sine wave with a peak value of 1 volt and no dc offset is sampled
every 250 microseconds. Assume the first sample is taken as the voltage
crosses zero in the upward direction. Sketch the results over 1 ms using:
(a) PAM with all pulses in the positive direction
(b) PDM
(c) PPM
4. The compact disc system of digital audio uses two channels with TDM.
Each channel is sampled at 44.1 kHz and coded using linear PCM with
sixteen bits per sample. Find:
(a) the maximum audio frequency that can be recorded (assuming
ideal filters)
(b) the maximum dynamic range in decibels
(c) the bit rate, ignoring error correction and framing bits
(d) the number of quantizing levels
5. Suppose an input signal to a µ-law compressor has a positive voltage
and an amplitude 25% of the maximum possible. Calculate the output
voltage as a percentage of the maximum output.
DIGITAL COMMUNICATION ! 109