EEE543 DCS - Lecture 2 - Part II
EEE543 DCS - Lecture 2 - Part II
Pulse Code
Modulation – Part II
1
QUANTIZATION
After sampling the continuous signal, we have a discrete
signal – the signal has values at multiples of 𝑇𝑠 .
The samples have amplitudes with a continuous range
→infinite number of amplitudes
In practice the samples are represented by a finite number or
set of possible amplitudes
The quantization process therefore transforms the infinite
number of amplitudes into the set of possible amplitudes
Each sample of the sampled signal is approximated to one of
the set of possible amplitudes
The resulting output of the process is an approximation of the
original signal
2
QUANTIZATION CONT’D
Quantization illustration
Figure 2.1
QUANTIZATION CONT’D
Theamplitude of the message signal m(t) to the range
(−𝑚𝑝 , 𝑚𝑝 )
Note that 𝑚𝑝 is not necessarily the peak amplitude of m(t)
The amplitudes of m(t) beyond ±𝑚𝑝 are simply chopped off
𝑚𝑝 is not a parameter of the signal m(t); rather, it is the limit
of the quantizer
The range (−𝑚𝑝 , 𝑚𝑝 ) is divided into L uniformly spaced
2𝑚𝑝
intervals of width Δ𝜈 = , each interval is called a
𝐿
quantization region ℜ𝑘
In each quantization region there is a quantization level, 𝑚
ෝ𝑘
If the sampled signal 𝑚𝑖 belongs to ℜ𝑘 then it will be
represented by 𝑚 ෝ𝑘
𝑚 ෝ 𝑘 is represented by a binary sequence and transmitted
Each level is assigned binary digit and the samples 𝑚𝑖 a
coded into the binary digits assigned to that level 4
UNIFORM QUANTIZATION
Each level is assigned binary digit and the samples 𝑚𝑖 a
coded into the binary digits assigned to that level
The quantized samples are coded and transmitted as binary
pulses
At the receiver some pulses may be detected incorrectly
5
UNIFORM QUANTIZATION CONT’D
Let 𝑚 𝑘𝑇𝑠 be the 𝑘th sample of the signal 𝑚 𝑡 and 𝑚(𝑘𝑇
ෝ 𝑠)
the corresponding quantized sample.
Using interpolation to reconstruct the original sample and
quantized sample we have
6
UNIFORM QUANTIZATION CONT’D
𝑞 𝑘𝑇𝑠 is the noise of the 𝑘th sample and 𝑞 𝑡 is the undesired
signal called quantization noise
We calculate the mean square power of 𝑞 𝑡 as follows
𝑇
1 2
𝑞 𝑡 = lim න 𝑞2 𝑡 𝑑𝑡
2
𝑇→∞ 𝑇 −𝑇
2
7
UNIFORM QUANTIZATION CONT’D
We have
𝑇
1 2
𝑞 2 𝑡 = lim න 𝑞2 𝑘𝑇𝑠 sinc 2 2𝜋𝐵𝑡 − 𝑘𝜋 𝑑𝑡
𝑇→∞ 𝑇 −𝑇
2 𝑘
Δ𝜈 2
=
12
𝑚𝑝2
= 2
3𝐿 9
𝑆𝑜 𝑚 2 𝑡
=
𝑁𝑜 𝑞 2
2 𝑡
𝑚
=
𝑚𝑝2
3𝐿2
𝑚 2 𝑡
= 3𝐿2
𝑚𝑝2
Where 𝑆𝑜 = 𝑚
2 𝑡 , 𝑁𝑜 = 𝑁𝑞 = 𝑞 2
means 𝑆𝑜ൗ𝑁𝑜, the SNR, is a linear function of the
This 10
11
NON-UNIFORM QUANTIZATION
To understand non-uniform quantization, we will use audio
signals as a context.
Recall that the SNR is an indication of the quality of the
received signal. Ideally
We would like to have a constant SNR (the same quality) for
all values of the message signal power
Unfortunately, the SNR is directly proportional to the signal
power 𝑚 2 𝑡 , which varies from speaker to speaker by as
much as 40 dB
A number of parameters contribute to the deterioration of
the signal
Statistically, it is found that smaller amplitudes predominate
in speech and larger amplitudes are much less frequent.
This means the SNR will be low most of the time
12
NON-UNIFORM QUANTIZATION CONT’D
Theroot of this difficulty lies in the fact that the quantizing
2𝑚𝑝
steps are of uniform value Δ𝜈 =
𝐿
Δ𝜈 2
The quantization noise 𝑁𝑞 = is directly proportional to
12
the square of the step size
The problem can be solved by using smaller steps for smaller
amplitudes
The same result is obtained by first compressing signal
samples and then using a uniform quantization
The input-output characteristics of a compressor are shown
in the next slide
The compressor maps input signal increments Δ𝑚 into larger
increments Δ𝑦 and vice versa for large input signals
13
NON-UNIFORM QUANTIZATION CONT’D
Non-uniform quantizer and compressor
Figure 2.2
14
NON-UNIFORM QUANTIZATION CONT’D
A given interval Δ𝑚 contains a larger number of steps (or
smaller step size) when m is small
The quantization noise is lower for smaller input signal
power.
An approximately logarithmic compression characteristic
yields a quantization noise nearly proportional to the signal
power 𝑚 2 𝑡 , thus making the SNR practically independent of
the input signal power over a large dynamic range
This approach of equalizing the SNR penalizes loud talkers
and stronger signals with higher noise steps Δ𝜈 to
compensate the soft talkers and weaker signals.
15
NON-UNIFORM QUANTIZATION CONT’D
𝜇 𝑙𝑎𝑤, defined by
𝐴 𝑙𝑎𝑤, defined by
For the 𝜇 law 𝜇=255 is used in digital telephone systems in North America.
For the A law, A= 87.6 is used in European systems.
Figure 2.3
17
NON-UNIFORM QUANTIZATION CONT’D
The compressed samples must be restored to their original
values at the receiver by using an expander with a
characteristic complementary to that of the compressor
The compressor and the expander together are called the
compandor
Figure 2.4
18
NON-UNIFORM QUANTIZATION CONT’D
Time compression of a signal increases its bandwidth but in
PCM, we are compressing not the signal m(t) in time but its
sample values
neither the time scale not the number of samples changes,
the problem of bandwidth increase does not arise here
When a μ-law compandor is used, the output SNR is
𝑚 2
𝑝
𝜇2 ≫ 2
𝑚
𝑡
19
NON-UNIFORM QUANTIZATION CONT’D
20
TRANSMISSION BANDWIDTH AND OUTPUT SNR
A pulse code modulator consist of a sampler, a quantizer and
an encoder
The figure below shows a PCM system
Figure 2.6
21
TRANSMISSION BANDWIDTH AND OUTPUT SNR CONT’D
For a binary PCM, we assign a distinct group of n binary digits
(bits) to each of the L quantization levels
A sequence of n binary digits can be arranged in 2 distinct
𝑛
patterns
𝐿 = 2𝑛 𝑜𝑟 𝑛 = log 2 (L)
Each quantized sample is, thus, encoded into n bits
𝐿 = 2𝑛 ⇒ 𝐿2 = 22𝑛
𝑆𝑜
= 𝑐 2𝑛
𝑁𝑜
Where
23
TRANSMISSION BANDWIDTH AND OUTPUT SNR CONT’D
𝑓𝑃𝐶𝑀
Substituting for 𝑓𝑃𝐶𝑀 = 𝑛𝑓𝑚 ⇒ 𝑛 = we have
𝑓𝑚
𝑆𝑜 2𝑓𝑃𝐶𝑀
= 𝑐 2 𝑓𝑚
𝑁𝑜
We observe that the SNR increases exponentially with the
transmission bandwidth 𝑓𝑃𝐶𝑀
A small increase in bandwidth yields a large benefit in terms
of SNR.
This trade of SNR for bandwidth is attractive and comes close
to the upper theoretical limit. See equation below
24
TRANSMISSION BANDWIDTH AND OUTPUT SNR CONT’D
This shows that increasing n by 1 (increasing one bit in the
codeword) quadruples the output SNR (a 6 dB increase).
Thus, if we increase n from 8 to 9, the SNR quadruples, but
the transmission bandwidth increases only from 32 kHz to 36
kHz (an increase of only 1 2.5%).
This shows that in PCM, SNR can be controlled by
transmission bandwidth.
25
TRANSMISSION BANDWIDTH AND OUTPUT SNR CONT’D
When a 𝜇 law compander is used in PCM, the output signal-
to-quantizing-noise ratio for 𝜇 ≫ 1 is approximated by
𝑆 3𝐿2
≈
𝑁𝑞 [ln(1+𝜇)]2
0
Derive the 6dB rule for 𝜇 = 255
Derive the 6 dB rule for binary PCM
26
EXAMPLES
Q1
a) In a binary PCM system, the output signal-to-quantizing-noise
ration is to be held to a minimum of 40dB. Determine the
number of required levels, and find the corresponding output
signal-to-quantizing-noise ratio.
Q2
a) Plot the 𝜇 𝑙𝑎𝑤 compression characteristic for 𝜇 = 255
b) If 𝑚𝑝 = 20𝑉 𝑎𝑛𝑑 256 quantizing levels are employed, what is the
voltage between levels when there is no compression? For 𝜇 =
255, what is the largest effective separation between levels?
27
EXAMPLES CONT’D
Q3
Consider an audio signal with spectral components limited to the
frequency band of 300 to 3300 Hz. A PCM signal is generated with a
sampling rate of 8000 samples/s. The required output signal-to-
quantizing-noise ratio is 30 dB.
(c) Repeat parts (a) and (b) when a 𝜇 law compander is used with 𝜇 =
255.
28