0% found this document useful (0 votes)
51 views28 pages

EEE543 DCS - Lecture 2 - Part II

Analogue to digital conversion part II
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views28 pages

EEE543 DCS - Lecture 2 - Part II

Analogue to digital conversion part II
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

EEE 543 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

 There are two sources of error in this scheme: quantization


error and pulse detection error
 The pulse detection error is quite small compared to the
quantization error and can be ignored
 We do error analysis under the assumption that the error in
the received signal is caused exclusively by quantization

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

 The distortion component q(t) in the reconstructed signal is


𝑞 𝑡 =𝑚 ෝ 𝑡 −𝑚 𝑡

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

 Thesignals 𝑠𝑖𝑛𝑐 2𝜋𝐵𝑡 − 𝑚𝜋 and 𝑠𝑖𝑛𝑐 2𝜋𝐵𝑡 − 𝑛𝜋 are


orthogonal, that is

7
UNIFORM QUANTIZATION CONT’D
 We have
𝑇
1 2
𝑞෤ 2 𝑡 = lim න ෍ 𝑞2 𝑘𝑇𝑠 sinc 2 2𝜋𝐵𝑡 − 𝑘𝜋 𝑑𝑡
𝑇→∞ 𝑇 −𝑇
2 𝑘

 Using the orthogonality equation we have


2
1
𝑞෤ 𝑡 = lim ෍ 𝑞2 𝑘𝑇𝑠
𝑇→∞ 2𝐵𝑇
𝑘
 Because the sampling rate is 2B, the total number of samples
over the averaging interval T is 2BT.
 The above equation represents the mean of the square of the
quantization error
8
UNIFORM QUANTIZATION CONT’D
2𝑚𝑝
 The quantum levels are separated by Δ𝜈 = ,
𝐿
 Sincea sample value is approximated by the midpoint of
Δ𝜈
the subinterval, the maximum quantization error is ±
2
 The quantization error lies in the range − Δ𝜈Τ2 , Δ𝜈Τ2
 Assuming the error is equally likely to lie anywhere in the
range − Δ𝜈Τ2 , Δ𝜈Τ2 , then
Δ𝜈ൗ
2
2
1
𝑞෤ = න 𝑞2 𝑑𝑞
Δ𝜈
−Δ𝜈ൗ2

Δ𝜈 2
=
12

𝑚𝑝2
= 2
3𝐿 9

 We denote the above as 𝑁𝑞 = 𝑞


෤2
UNIFORM QUANTIZATION CONT’D
 The reconstructed signal at the receiver is:
𝑚
ෝ 𝑡 =𝑚 𝑡 +𝑞 𝑡
 Where 𝑚 𝑡 is the desired signal and 𝑞 𝑡 is the noise.
 To calculate the signal to quantization noise ratio we need
the desired signal power 𝑚 ෥2 𝑡
 The signal to quantization noise ratio is given by:

𝑆𝑜 𝑚 ෥2 𝑡
=
𝑁𝑜 𝑞෤ 2
෥2 𝑡
𝑚
=
𝑚𝑝2
3𝐿2
𝑚෥ 2 𝑡
= 3𝐿2
𝑚𝑝2
 Where 𝑆𝑜 = 𝑚
෥ 2 𝑡 , 𝑁𝑜 = 𝑁𝑞 = 𝑞෤ 2
means 𝑆𝑜ൗ𝑁𝑜, the SNR, is a linear function of the
 This 10

message signal power 𝑚෥2 𝑡


UNIFORM QUANTIZATION ERROR
 The quantizing of the PAM signal , the original signal is now
only approximated and cannot be 100% recovered
 The effects known as quantization error or quantization
noise
 The signal to noise ratio SNR due to quantization noise can
be expressed as
𝑆𝑁𝑅 𝑑𝐵 ≈ 6𝑚 + 1.76[𝑑𝐵]
 Where 𝑚 → number of bits per sample

 Note: every additional bit used in the quantizer will increase


the SNR by 6dB
 The rise in quantization levels ⇒ higher SNR ⇒ better
(received) signal quality

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

 where 𝜇 is a positive constant and

 𝐴 𝑙𝑎𝑤, 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.

 To obtain a nearly constant SNR over a dynamic range of for input


signal power 40 dB, μ, should be greater than 100
16
NON-UNIFORM QUANTIZATION CONT’D
 The figure show the characteristics of the A-Law and μ-Law

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
𝑚
෥ 𝑡

 Theoutput SNR for the cases of 𝜇 = 255 and 𝜇 = 0 (uniform


quantization) as a function of 𝑚
෥ 2 𝑡 is shown in the figure in
the next slide

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

 If the message bandwidth is 𝑓𝑚 and the sampling rate is


𝑓𝑠 (≥ 2𝑓𝑚 )
 Then 𝑛𝑓𝑠 bits/sec or binary pulses must be transmitted per
second
 Assuming the PCM signal is a low-pass signal bandwidth 𝑓𝑃𝐶𝑀 ,
the required minimum sampling rate is 2𝑓𝑃𝐶𝑀 . Thus,
2𝑓𝑃𝐶𝑀 = 𝑛𝑓𝑠
or
𝑛
𝑓𝑃𝐶𝑀 = 2 𝑓𝑠 ≥ 𝑛𝑓𝑚
 The above equation shows that the minimum required
bandwidth for PCM is proportional to the message signal 22
bandwidth and the number of bits per symbol
TRANSMISSION BANDWIDTH AND OUTPUT SNR CONT’D
 This is the theoretical minimum transmission bandwidth
required to transmit the PCM signal.
 In practical implementation we use a transmission
bandwidth higher than this minimum.
 To obtain the effect of the bandwidth on the output SNR, we
allow an exponential increase on L and see the effect

𝐿 = 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.

(a) What is the minimum number of uniform quantizing levels needed,


and what is the minimum number of bits per sample needed?
(b) Calculate the minimum system bandwidth required.

(c) Repeat parts (a) and (b) when a 𝜇 law compander is used with 𝜇 =
255.

28

You might also like