You are on page 1of 23

Quantization

Input analog signal

Sampling pulse

PAM signal

PCM code
18
Folded Binary Code
Sign Magnitude Decimal Quantization
value range (V)
1 11 +3 +2.5 to +3.5
1 10 +2 +1.5 to +2.5
1 01 +1 +0.5 to 1.5
1 00 +0 0 to +0.5
0 00 -0 0 to -0.5
0 01 -1 -0.5 to -1.5
0 10 -2 -1.5 to -2.5
0 11 -3 -2.5 to -3.5
Three bit PCM code 19
Quantization Error

resolution
Linear Qe =
2
Error

Quantization

20
Dynamic Range
Vmax Vmax n
DR = = = 2 −1
Vmin resolution
( )
DR( dB ) = 20 log 2n − 1
DR = dynamic range (unitless)
Vmin = the quantum value
Vmax = the maximum voltage magnitude of the DACs
n = number of bits in a PCM code (excl. sign bit)

For n > 4
n n
DR = 2 − 1 ≈ 2
( )
DR( dB ) ≈ 20 log 2n − 1 = 20n log 2 ≈ 6n

21
Dynamic Range
# Bits # Levels DR (dB)
1 2 6.02
2 4 12
3 6 18.1
4 16 24.1
5 32 30.1
6 62 36.1
7 128 42.1
8 256 48.2
9 512 54.2
10 1024 60.2
11 2048 66.2
12 4096 72.2
13 8192 78.3
14 16348 84.3
15 32768 90.3
16 65536 96.3
22
Quantization

 Amplitude quantizing: Mapping samples of a continuous


amplitude waveform to a finite set of amplitudes.

Out

In
Average quantization noise power
Quantized

Signal peak power


values

Signal power to average


quantization noise power

23
Encoding (PCM)

 A uniform linear quantizer is called Pulse Code


Modulation (PCM).
 Pulse code modulation (PCM): Encoding the quantized
signals into a digital word (PCM word or codeword).

 Each quantized sample is digitally encoded into an l bits


codeword where L in the number of quantization levels and

24
Quantization example
amplitude
x(t)
111 3.1867

110 2.2762 Quant. levels


101 1.3657

100 0.4552

011 -0.4552 boundaries

010 -1.3657

001 -2.2762 x(nTs): sampled values


xq(nTs): quantized values
000 -3.1867
Ts: sampling time
PCM t
codeword 110 110 111 110 100 010 011 100 100 011 PCM sequence

25
Quantization error
 Quantizing error: The difference between the input and
output of a quantizer
e(t ) = xˆ (t ) − x(t )

Process of quantizing noise


Quantizer
Model of quantizing noise
y = q (x)
AGC x(t ) xˆ (t )
x(t ) xˆ (t )
x
e(t )

+
e(t ) =
xˆ (t ) − x(t )

26
Quantization error …
 Quantizing error:
 Granular or linear errors happen for inputs within the dynamic
range of quantizer
 Saturation errors happen for inputs outside the dynamic range
of quantizer
 Saturation errors are larger than linear errors
 Saturation errors can be avoided by proper tuning of AGC
 Quantization noise variance:


σ = E{[ x − q( x)] } = ∫ e 2 ( x) p ( x)dx = σ Lin
2
q
2 2 2
+ σ Sat
−∞
L / 2 −1
ql2 q2
σ 2
Lin =2∑ p( xl ) ql Uniform q. σ 2
Lin =
l =0 12 12

27
Uniform and non-uniform quant.
 Uniform (linear) quantizing:
 No assumption about amplitude statistics and correlation
properties of the input.
 Not using the user-related specifications
 Robust to small changes in input statistic by not finely tuned to a
specific set of input parameters
 Simply implemented
 Application of linear quantizer:
 Signal processing, graphic and display applications, process
control applications
 Non-uniform quantizing:
 Using the input statistics to tune quantizer parameters
 Larger SNR than uniform quantizing with same number of levels
 Non-uniform intervals in the dynamic range with same quantization
noise variance
 Application of non-uniform quantizer:
 Commonly used for speech

28
Non-uniform quantization
 It is done by uniformly quantizing the “compressed” signal.
 At the receiver, an inverse compression characteristic, called
“expansion” is employed to avoid signal distortion.

compression+expansion companding

y = C (x) x̂
x(t ) y (t ) yˆ (t ) xˆ (t )

x ŷ
Compress Qauntize Expand
Transmitter Channel Receiver
29
Statistical of speech amplitudes
 In speech, weak signals are more frequent than strong ones.

Probability density function 1.0

0.5

0.0
1.0 2.0 3.0
Normalized magnitude of speech signal
S
 Using equal step sizes (uniform quantizer) gives low   for weak
 N q
signals and high   for strong signals.
S
 N q
 Adjusting the step size of the quantizer by taking into account the speech statistics
improves the SNR for the input range.

30
Baseband transmission

 To transmit information through physical


channels, PCM sequences (codewords) are
transformed to pulses (waveforms).
 Each waveform carries a symbol from a set of size M.
 Each transmit symbol represents k = log 2 M bits of
the PCM words.
 PCM waveforms (line codes) are used for binary
symbols (M=2).
 M-ary pulse modulation are used for non-binary
symbols (M>2).

31
PCM waveforms

 PCM waveforms category:


 Nonreturn-to-zero (NRZ)  Phase encoded
 Return-to-zero (RZ)  Multilevel binary
+V
1 0 1 1 0 +V
1 0 1 1 0
NRZ-L -V Manchester -V

Unipolar-RZ +V Miller +V
0 -V
+V +V
Bipolar-RZ 0 Dicode NRZ 0
-V -V
0 T 2T 3T 4T 5T 0 T 2T 3T 4T 5T

32
PCM waveforms …
 Criteria for comparing and selecting PCM
waveforms:
 Spectral characteristics (power spectral density and
bandwidth efficiency)
 Bit synchronization capability
 Error detection capability
 Interference and noise immunity
 Implementation cost and complexity

33
Spectra of PCM waveforms

34
ts
Pulse Modulation
Analog signal

Sample pulse

Pulse width modulation

Pulse position modulation

Pulse amplitude modulation

Pulse code modulation

8 bit

35
M-ary pulse modulation

 M-ary pulse modulations category:


 M-ary pulse-amplitude modulation (PAM)
 M-ary pulse-position modulation (PPM)
 M-ary pulse-duration modulation (PDM)
 M-ary PAM is a multi-level signaling where each
symbol takes one of the M allowable amplitude levels,
each representing k = log 2 M bits of PCM words.
 For a given data rate, M-ary PAM (M>2) requires less
bandwidth than binary PCM.
 For a given average pulse power, binary PCM is
easier to detect than M-ary PAM (M>2).

36
PAM example

37
Formatting and transmission of baseband signal

Digital info. Bit stream Pulse waveforms


(Data bits) (baseband signals)
Textual Format
source info.
Pulse
Analog Sample Quantize Encode modulate
info.

Sampling at rate Encoding each q. value to


f s = 1 / Ts l = log 2 L bits
(sampling time=Ts) (Data bit duration Tb=Ts/l)

Quantizing each sampled Mapping every m = log 2 M data bits to a


value to one of the symbol out of M symbols and transmitting
L levels in quantizer. a baseband waveform with duration T

 Information (data) rate: Rb = 1 / Tb [bits/sec]


 Symbol rate : R = 1 / T [symbols/sec]
 For real time transmission: Rb = mR
38
PCM system Block Diagram

Transmitter

Receiver

39
Sample Problems ..

40

You might also like