Week 4
Week 4
COMMUNICATION
SPRING,2024
DR. SOYIBA JAWED
1
CONTENTS
Uniform Quantization
Compander
2
ANALOG TO DIGITAL CONVERSION
5
SAMPLING PAM (PULSE AMPLITUDE MODULATION)
6
QUANTIZED PAM SIGNAL
7
BINARY ENCODING
8
LINE ENCODING
9
COMPONENTS OF PCM ENCODER
10
PCM BLOCK
11
normal signal.
PULSE CODE DEMODULATION
13
Quantization
14
MOTIVATION
x [amplitude] Q(x) [quantized amplitude]
time time
0101100110
Processing Processing
time
time
MOTIVATION
Turning an Analog Signal into a Digital Signal.
x [amplitude]
x [amplitude]
time
time
MOTIVATION
Quantization
x [amplitude] Q(x) [quantized amplitude]
^
𝑥1 ❑
time 𝑥^2❑ time
Quantization
Q(x) [quantized amplitude]
Bit Mapping
^
𝑥1 ❑ ^2
1 , 𝑖𝑓 𝑥
bit
𝑥^2❑ time
0 , 𝑖𝑓 ^
𝑥1
01001
Processing Processing
Digital
01001
Transmission
Q(x)
The Quantization Scheme bits=10
provides all necessary
information for the bits=11
quantization process. x
It maps all possible
sample amplitudes to the
bits=01
quantized value (and the
associated bit bits=00
representation).
Notice that N levels imply in
log2(N) bits per sample.
GENERAL QUANTIZER
𝑖
SIMPLIFIED UNIFORM QUANTIZER
QUANTIZATION ERROR
QUANTIZATION ERROR
QUANTIZATION ERROR
EXAMPLE FOR 2 LEVELS
SOLUTION FOR N LEVELS
Possible Approaches:
• Use uniform quantizer anyway. Optimize the choice of Δ
• Use non-uniform quantizer. Choice of quantization regions and
values
• Transform signal into one that looks uniform and use uniform
quantizer
OPTIMAL UNIFORM QUANTIZER
Key questions:
Given quantization regions, what should the quantization levels be?
Given quantization levels, what should the quantization regions
be?
Iterative approach for minimizing distortion:
Given regions, solve for quantization levels
Then, with the new levels, solve for quantization regions.
Loop until distortion stops improving.
Optimal Quantization Levels
OPTIMAL QUANTIZATION REGIONS
OPTIMAL NON-UNIFORM QUANTIZER
Necessary conditions for optimality:
1. Quantization levels are the “centroid” of their region
2. Boundaries of the quantization regions are the midpoint of
the quantization values
Clearly 1 depends on 2 and vice versa. The two can be
solved
iteratively to obtain an optimal quantizer.
Lloyd-Max algorithm:
Start with arbitrary regions (e.g., uniform Δ)
A) Find optimal quantization values (“centroids”)
B) Use quantization values to get new regions (“midpoints”)
LLOYD-MAX ALGORITHM -
EXAMPLE
Output of this algorithm is well-known for some common distributions.
• Table 6.3 (p. 299) gives optimal quantizer for Gaussian source.
Solution: Transfer input signal into one that looks uniform and then
use uniform quantizer
μ -law Uniform Q
Uniform PCM: x(t) ∈ [−𝑋𝑚𝑎𝑥 , 𝑋 𝑚𝑎𝑥 ]
• N = 2V quantization levels, each level encoded using v bits
• Uses a simplified uniform quantizer with no compander.
• SQNR: same as uniform quantizer
➪ 𝑋 2 × 3 × 4𝑣
𝑆𝑄𝑁𝑅 = , since Δ =
2𝑣−1
2 𝑋 𝑀𝐴𝑋
• Notice that increasing the number of bits by 1 increases
SQNR by a factor of 4 (6 dB)
SPEECH CODING
Differential PCM:
• Speech samples are typically correlated
• Instead of coding samples independently, code the difference between
samples
• Result: improved performance, lower bit rate speech