Architecture decision records - How not to get lost in the past
TeleCom Lecture 07.ppt
1. PCM
PCM consists of three steps to digitize an
analog signal:
1. Sampling
2. Quantization
3. Binary encoding
Before we sample, we have to filter the
signal to limit the maximum frequency of
the signal as it affects the sampling rate.
Filtering should ensure that we do not
distort the signal, ie remove high frequency
components that affect the signal shape.
3. Sampling
Analog signal is sampled every TS secs.
Ts is referred to as the sampling interval.
fs = 1/Ts is called the sampling rate or
sampling frequency.
There are 3 sampling methods:
Ideal - an impulse at each sampling instant
Natural - a pulse of short width with varying
amplitude
Flattop - sample and hold, like natural but with
single amplitude value
The process is referred to as pulse amplitude
modulation PAM and the outcome is a signal
with analog (non integer) values
5. According to the Nyquist theorem, the
sampling rate must be
at least 2 times the highest frequency
contained in the signal.
Note
6. Quantization
Sampling results in a series of pulses of
varying amplitude values ranging between
two limits: a min and a max.
The amplitude values are infinite between the
two limits.
We need to map the infinite amplitude values
onto a finite set of known values.
This is achieved by dividing the distance
between min and max into L zones, each of
height
= (max - min)/L
7. Quantization Levels
The midpoint of each zone is assigned a
value from 0 to L-1 (resulting in L
values)
Each sample falling in a zone is then
approximated to the value of the
midpoint.
8. Quantization Zones
Assume we have a voltage signal with
amplitutes Vmin=-20V and Vmax=+20V.
We want to use L=8 quantization levels.
Zone width = (20 - -20)/8 = 5
The 8 zones are: -20 to -15, -15 to -10,
-10 to -5, -5 to 0, 0 to +5, +5 to +10,
+10 to +15, +15 to +20
The midpoints are: -17.5, -12.5, -7.5, -
2.5, 2.5, 7.5, 12.5, 17.5
9. Encoding
Each zone is then assigned a binary code.
The number of bits required to encode the
zones, or the number of bits per sample as it
is commonly referred to, is obtained as
follows:
nb = log2 L
Given our example, nb = 3
The 8 zone (or level) codes are therefore:
000, 001, 010, 011, 100, 101, 110, and 111
Assigning codes to zones:
000 will refer to zone -20 to -15
001 to zone -15 to -10, etc.
11. Quantization Error
When a signal is quantized, we introduce an
error - the coded signal is an approximation
of the actual amplitude value.
The difference between actual and coded
value (midpoint) is referred to as the
quantization error.
The more zones, the smaller which results
in smaller errors.
BUT, the more zones the more bits required
to encode the samples -> higher bit rate
12. Quantization Noise
The effect of quantization errors in a PCM encoder
is treated as additive noise with a subjective
effect that is similar to band-limited white noise.
Hence, the quality of the signal can be
quantitatively measured by the signal-to-
quantization noise ratio (SQR).
13. Bit rate and bandwidth
requirements of PCM
The bit rate of a PCM signal can be calculated form
the number of bits per sample x the sampling rate
Bit rate = nb x fs
The bandwidth required to transmit this signal
depends on the type of line encoding used. Refer to
previous section for discussion and formulas.
A digitized signal will always need more bandwidth
than the original analog signal. Price we pay for
robustness and other features of digital transmission.
14. We want to digitize the human voice. What is the bit rate,
assuming 8 bits per sample?
Solution
The human voice normally contains frequencies from 0
to 4000 Hz. So the sampling rate and bit rate are
calculated as follows:
Example
15. PCM Decoder
To recover an analog signal from a digitized
signal we follow the following steps:
We use a hold circuit that holds the amplitude
value of a pulse till the next pulse arrives.
We pass this signal through a low pass filter with a
cutoff frequency that is equal to the highest
frequency in the pre-sampled signal.
The higher the value of L, the less distorted a
signal is recovered.
17. We have a low-pass analog signal of 4 kHz. If we send the
analog signal, we need a channel with a minimum
bandwidth of 4 kHz. If we digitize the signal and send 8
bits per sample, we need a channel with a minimum
bandwidth of 8 × 4 kHz = 32 kHz.
Example 4.15
18. Delta Modulation
This scheme sends only the difference
between pulses, if the pulse at time tn+1 is
higher in amplitude value than the pulse at
time tn, then a single bit, say a “1”, is used to
indicate the positive value.
If the pulse is lower in value, resulting in a
negative value, a “0” is used.
This scheme works well for small changes in
signal values between samples.
If changes in amplitude are large, this will
result in large errors.
22. Delta PCM (DPCM)
Instead of using one bit to indicate positive
and negative differences, we can use more
bits -> quantization of the difference.
Each bit code is used to represent the value
of the difference.
The more bits the more levels -> the higher
the accuracy.
23. Nonuniform Quantization
The type of quantization so far discussed is called
uniform quantization because the quantization
levels are assumed to be equally spaced. This
technique achieves the maximum SQR only for a
full-amplitude signal. In practice, this cannot be
the case, and the average SQR can be significantly
lower than the maximum given in (2.2). Figure
2.8(a) depicts uniform quantization of a full-
amplitude and a smaller sinusoidal signal. It can be
seen qualitatively that the approximation of the
smaller signal is inferior to that of the larger signal.
25. Nonuniform Quantization
How much lower an SQR we have in a practical
system depends on the dynamic range (the ratio of
maximum and minimum amplitudes) of the analog
signal.
where A is the maximum amplitude of the
signal being quantized, and Amax is the full-load
range of the quantizer. This implies lower SQR for
small signals compared to large signals.
26. The probability of occurrence of small amplitudes in
speech is much greater than large ones.
Consequently, it seems appropriate to provide many
quantization levels in the small amplitude range
and only a few in the region of large ampli- tudes.
As long as the total number of levels remains
unchanged, no increase in trans- mission bandwidth
will be required. However, the average SQR will
improve. This technique is referred to as
nonuniform quantization. Figure 2.8(b) illustrates
the improvement in quantization of low-amplitude
signals compared to uniform quantization.
27. Modern telephony applications make use of low-
bit-rate voice coding techniques in order to
conserve bandwidth. The primary motivations for
low-bit-rate coding are the need to minimize
transmission costs and storage and the need to
transmit over channels of limited capacity, such as
mobile radio channels. In addition, there are also
needs to share capacity for different services, such
as voice, audio, data, graph- ics, and images, in
integrated services networks and to support
variable-rate coding in packet-oriented networks
Low Bit-Rate Voice Coding
28. Digital Encoding of Waveforms
Following the introduction of PCM, network operators
soon realized that by using 32-kbit/s adaptive
differential PCM (ADPCM), they could double the
capacity of important narrow bandwidth links such as
undersea cables. At that time, the goal of speech
coding was to provide a compression technology that
would enable copper cables to handle the continual
growth in voice traffic.
Digital encoding of waveforms, however, entails the
introduction of some kind of coding distortion, such as
quantization noise.
29. Digital Encoding of Waveforms
Speech coders compress speech by analyzing and
then quantizing features of the speech waveforms
in ways that attempt to minimize any audible
impairment [6]. As such, the basic challenge in
waveform encoding is to achieve the minimum
possible distortion for a given encod- ing rate or,
equivalently, to achieve a given acceptable level of
distortion with the least possible encoding rate [7].
The process of speech compression is very
computa- tionally intensive, incurs delays, and
requires powerful DSPs for implementation.
30. Digital Encoding of Waveforms
Some encoding techniques, such as PCM, are
lossless, providing a reconstructed waveform that
exactly matches the original signal sample for
sample. Other meth- ods achieve higher
compression through lossy techniques, which do
not allow exact reconstruction of the signal but
instead seek to preserve its information-bearing
characteristics [7].
31. Digital Encoding of Waveforms
Basic requirements in the design of low-bit-rate
coders can be summarized as [5]:
Data rate;
High quality of reconstructed signals;
Low encoder/decoder delays;
Low complexity and power consumption;
Robustness to random and bursty channel bit
errors and data losses;
Robust concatenation of codecs;
Graceful degradation of quality with increasing
bit error rates.