2 Sept. 2009TELE3113 - PCM p. -1
TELE3113 Analogue and Digital Communications – Quantization
School of Electrical Engineering and TelecommunicationsThe University of New South Wales
2 Sept. 2009TELE3113 - PCM p. -2
Analog-to-Digital Conversion
Goal: To transmit the analog signals by digital means better performance
convert the analog signal into digital format (Pulse-Code Modulation)
Sampling: a continuous-time signal is sampled by measuring its amplitude at discrete time instants.
Quantizing: represents the sampled values of the amplitude by a finite setof levels
Encoding: designates each quantized level by a digital code
sampler EncoderQuantizerAnalog signal
Digital signal
x(t)
time
11111111111110111110111111001111011111101011110011111000
1111101 1111001111111011110111111001 11110011111101 1111101
c1c2c3c4c5c6c7c8
time
time
2 Sept. 2009TELE3113 - PCM p. -3
Reconstruction of Sampled Signal
1111101111100111111101111011111100111110011111101 1111101
c1c2c3c4c5c6c7c8
time
Received digital signal
Recovered analog signal
decoding
interpolation
Recovered signal with discrete levels
2 Sept. 2009TELE3113 - PCM p. -4
Sampling
Consider an analog signal x(t) which is bandlimited to B (Hz), that is:
BffX ≥= ||for 0)(
The sampling theorem states that x(t) can be sampled at intervals as large as 1/(2B) such that the it is possible to reconstruct x(t) from its samples, or the sampling rate fs=1/Ts can be as low as 2B.
timeSampling period Ts
Sampling rate fs=1/Ts
x(t)
Minimum required sampling rate=2B (Nyquist rate) i.e. 2B samples per second
Sampling rate should be equal or greater than twice the highest frequency in the baseband signal.
BTBf ss 2
1or 2 ≤≥
2 Sept. 2009TELE3113 - PCM p. -5
Analogue Pulse Modulation
Pulse Amplitude Modulation
Pulse Position Modulation
Pulse Duration (Width) Modulation
2 Sept. 2009TELE3113 - PCM p. -6
Quantization
After the sampling process, the sampled points will be transformed into a set of predefined levels (quantized level) Quantization
Assume the signal amplitude of x(t) lies within [-Vmax ,+Vmax], we divide the total peak-to-peak range (2Vmax) into L levels in which the quantized levels mi (i=0,…,(L-1)) are defined as their respective mid-ways.
LV
Liimax
))1(,,0(
2=∆=∆ −= LFor uniform quantization,
∆ 2∆ 3∆ 4∆ Input−4∆ −3∆ −2∆ −∆
m7= 7∆/2
m6= 5∆/2
m5= 3∆/2
m4= ∆/2
−3∆/2
−5∆/2
−7∆/2
Output
Uniform quantizer(midrise type)
uniform
unifo
rm
Vmax
m7
m6
m5
m4
m3
m2
m1
m0
-Vmax
∆0
∆1
∆2
∆3
∆4
∆5
∆7
∆6
Sampling time
x(t)xq(t)
time
2 Sept. 2009TELE3113 - PCM p. -7
Quantization Noise (1)The quantized signal, xq(t) is an approximation of the original message signal, x(t).
Quantization error/noise: eq(t) ={x(t) - xq(t)} varies randomly within2
)(2
∆≤≤
∆− teq
x(t)
xq(t)
eq(t) ={x(t) - xq(t)}
2 Sept. 2009TELE3113 - PCM p. -8
[ ] [ ]
LV
LVe
efdetedeteefte
q
qqqqqqq
max2
2max
22
2
3
2
2
22
2
22
2 with 3123
1
1)( )(1)()()(
=∆=∆
=∆
=
∆=
∆==
∆
∆−
∆
∆−
∆
∆−∫∫ Q
Quantization Noise (2)Assume the quantization error varies uniformly within [-∆/2, ∆/2] with a pdf of f(eq)=1/∆, then
In general, the average power of a signal is or)(2 tx
)(
log10log20774 )(3
log10)( average
)(3
)(
)( average
2
2max
2max
22
2max
22
2
2
−+=
=
==
txVL.
VtxL
dBSNR
VtxL
te
txSNR
x
qx
To minimize eq(t), we can use smaller ∆ or more quantized levels L.
)(2 tx
2 Sept. 2009TELE3113 - PCM p. -9
Quantization Noise (3)
[ ] [ ]
332
1
21)( )(
21)()()(
2max
3
max
max
2
max
22
max
max
max
max
max
max
VxV
Vefdxtx
Vdxtxxftx
V
V
q
V
V
V
V
==
===
−
−−∫∫ Q
If x(t) is a full-scale sinusoidal signal, i.e. x(t)=Vmaxcosωt , thenThus,
If x(t) is uniformly distributed in the range [-Vmax,+Vmax], then pdf f(x)=1/(2Vmax),
2)()(
2max22 Vtxtx ==
( ) ( ) dB log2076.1 2log10log20774)( average LL.dBSNRx +=−+=
Thus,( ) dB log20 3log10log20774)( average LL.dBSNRx =−+=
2 Sept. 2009TELE3113 - PCM p. -10
Non-uniform Quantization (1)
In some cases, uniform quantization is not efficient.
In speech communication, it is found (statistically) that smaller amplitudes predominate in speech and that larger amplitudes are relatively rare.
many quantized levels are rarely used (wasteful !)
Non-uniform quantization is more efficient.
-xmax
x(t)xmax
Qua
ntiz
ed
leve
ls
time
2 Sept. 2009TELE3113 - PCM p. -11
Non-uniform Quantization (2)
The non-uniform quantization can be achieved by first compressing the signal samples and then performing uniform quantization.
There exists more quantized levels for small x and fewer levels for larger x.
Input∆si
Output
Compressor
Non-uniform
unifo
rm ∆yi
maxxxs =
1
1
2 Sept. 2009TELE3113 - PCM p. -12
Non-uniform Quantization (3)
Input∆si
Output
Compressor
Non-uniform
unifo
rm ∆yi
Input
∆si
Output
Expander
UniformN
on-u
nifo
rm∆yi
Sampler Compressor Uniform Quantizer
Encoder
Decoder Expander Interpolator
Communication Channel
Received signal
Input signal
2 Sept. 2009TELE3113 - PCM p. -13
Non-uniform Quantization (4)
Two common compression laws
µ-law :
( ) 1for )sgn(1ln
1ln)(
max
max ≤+
+
=xxx
xx
xyµ
µ
≤≤+
≤≤+
+
=
Axxx
xx
AA
xx
Ax
AxxA
xy10for )sgn(
ln1
11for )sgn(ln1
ln1
)(
maxmax
max
max
Α-law :
Digital telephone system in North America and Japan (µ=255)
Digital telephone system in Europe (Α=87.6)