Sei sulla pagina 1di 33

TE312: Introduction to Digital

Digital Transmission of Analogue

Lecture #4
Quantization and Encoding

Quantization and Encoding
Uniform Quantization
Quantization Noise
Non-Uniform Quantization
Bandwidth Requirements for PCM

Quantization and Encoding

Sampling process alone does not convert a signal into
digital form
The sampled signal m(nTs ) of the message signal, m(t )
band-limited to B Hz is discrete in time but continuous in
Digital representation of m(t ) requires: (i) Quantization of the amplitude of a sampled signal
m(nTs )
(ii) Encoding of each quantized sample value resulting in
a pulse code modulation (PCM) system.

Quantization and Encoding

Amplitude quantization transforms the sample amplitude
m(nTs ) into amplitude m (nTs ) taken from a finite set of
possible L amplitudes.
When quantization of one sample value is independent of
other sample values, the quantization process is
memoryless and instantaneous.
(Quantization of m(nTs ) is independent of m(kTs ) for n k )

Quantization and Encoding

Quantization and Encoding

The quantization process partitions the amplitude range of
the continuous-valued samples into L intervals
The l th interval I l is determined by decision levels or
threshold levels Dl and Dl1
i.e. I l :Dl m Dl1, l 1,2,....,L.

m sample value

All sample values that fall in I l are represented by a

target level or representation level Tl I l

Quantization and Encoding

The spacing between two adjacent target levels (or two
adjacent decision levels) is called the step size of the
l T l1Tl
The Quantizer is called a uniform quantizer all step sizes are
equal i.e. l T l1Tl for all l . If the step sizes are not
equal it is a non-uniform quantizer

Quantization and Encoding

Quantization and Encoding

In PCM system, each quantized sample m (nTs ) is
encoded into an R-bit sequence of binary digits (bits)
called a code word where R log 2 L
In binary coding, the l th target level is represented by the
binary equivalent b1b2 ..bk ...bR its ordinal number l 1
Example: If L 8 , R log 2 8 3

Quantization and Encoding

With binary code, there may be a change of more than
one bit for two adjacent target levels resulting in distorted
receiver output due to channel noise and interference.
A binary code b1b2 ..bk ...bR can be converted to a Gray code
g1 g2 ..gk ...g R as follows:
g1 b1
g k bk bk 1 , k 2
With Gray code, there is a change of only one bit for two
adjacent target levels.

Uniform Quantization
The input/output characteristic for a uniform quantizer is a
staircase function which can be a midtread or midriser.
Assumption is made, that the input to the quantizer is

modeled as a sample value m of a zero mean random

variable M with pdf f M (m) and amplitude range
m p m m p (p=peak)
The range is divided in L zones, each of quantization step
size given by
2m p

Uniform Quantization
A sample amplitude value is approximated by the
midpoint of the interval in which it lies

Uniform Quantization
The input-output characteristics of a uniform quantizer

Uniform Quantization
The input-output characteristics of a uniform quantizer

Quantization Noise





This error is due to the difference between the input and

output signals of the quantizer
Quantization noise q m m is a sample value of a zero
mean random variable with uniform pdf. It
randomly within the interval


Quantization Noise
The variance (average power) of the quantization noise is
obtained as follows

q2 q 2 dq p2 p2 R

12 3L 3 2

The average power of the message signal is derived as

m m m 2 f M (m)dm

Signal to quantization noise ratio becomes

m2 3 L2 m2 3 2 2 R m2
SNRq 2

m 2p

Quantization Noise
In dB signal-to-quantization noise ratio is expressed as
SNRq 6.02 R 20log 2 4.7 dB
A 6 dB improvement in Signal-to-quantization noise ratio
is gained for each bit added to represent the samples.

Uniform Quantization
Advantage of a uniform quantizer is that it is simple to
implement and is commonly used
However, for fixed m p , the signal-to-quantization noise
ratio deteriorates with the decrease in the message signal
average power.
This is typical in the transmission of speech signals where
the input signals have a wide variation in power levels.

Non-uniform Quantization & Companding

A non-uniform quantizer maintains a constant signal-toquantization noise ratio for a wide range of input power
Weak signals (smaller amplitudes) are assigned more
representation levels (smaller step sizes) whereas
stronger signals (larger amplitudes) are assigned less
representation levels (larger step sizes).
In some signals (eg audio/speech) smaller amplitudes
predominates larger amplitudes.
Thus using uniform quantization is a wasteful because
many quantization levels will be rarely used

Non-uniform Quantization & Companding

In audio signals, if the quantization levels are equally
spaced, 12 bits must be used to obtain telephone quality
However, only 8 bits are required if the quantization levels
are made unequal

Non-uniform Quantization & Companding

Same results as non-uniform quantization can be
achieved by first compressing signal samples and then
using uniform quantizer
The compressor maps small input signal into large

increment and small increment for large input signals, the

output of which is uniformly quantized.
At the receiver, an expander is used to undo the effect of
the compression at the transmitter. Combination of the
compressor and the expander is called a compander.

Non-uniform Quantization & Companding

The input-output characteristics of a compressor

Non-uniform Quantization & Companding

Compounding curves

Non-uniform Quantization & Companding

Two standards are used for companding curves:
1. -law companding
o A North America standard for digital telephone
ln 1 m / m p
sgn( m)
ln(1 )
o is a positive constant ( 255) ,and
1 m 0
sgn( m)
1 m 0

Non-uniform Quantization & Companding

2. A-law companding
o Used in European digital telephone systems
A m



1 ln A m / m p
sgn( m)

1 ln A

m 1

mp A
1 m

A mp

A is a positive constant ( A 87.56 )

-Law Companding

A-Law Companding

Summary of PCM System

Sampling process takes samples of a continuous
message signal
Quantizer takes sampled amplitude value and
approximates it by the midpoint of the interval in which it
An encoder translates the quantized sample into a code
Code number is converted to its representation in binary
The binary sequence is converted to a sequential string of
pulses for transmission

PCM System Example

Assume an analog signal, m(t ) confined to the range -4 to
4 volts (i.e. m p 4, m p 4 )
A uniform quantizer is used, with step size set to 1
( 1)
Thus 8 quantizing levels ( L ) are employed
2m p

These level will form 8 code numbers which will be
represented by 3-bit binary sequence (i.e. R log 2 L )

PCM System Example

Levels are located at
-3.5V, -2.5V, -1.5V, -0.5V, 0.5V, 1.5V, 2.5V, 3.5V
(i.e. midpoint of the interval)
Assign code numbers to quantized levels from 0 t0 7
(i.e. 0 to l 1)
Assign each code number with its binary code
representation (i.e. 0 =000,..7=111)
Each binary code will be assigned a series of pulses
depending on type of Line code used

PCM System Example

Bandwidth Requirements of PCM

Let the bandwidth of the base-band message signal m(t )
be B Hz
The signal is sampled at a sampling rate f s 2 B samples/s
Let the number of bits per sample be n for the quantizer
with quantization levels L ( L 2n )
The transmission bit rate Rb nf s 2nB bits/s

Bandwidth Requirements of PCM

The minimum transmission bandwidth required for the
PCM signal
BT Rb / 2 nB Hz
The transmission bandwidth is always larger than that of
the base-band signal.
The quantization error decreases with the increase in n
The transmission bandwidth requirements increase with
the increase in n