Sie sind auf Seite 1von 35

Principles of Communications

Chapter 4: Analog-to-Digital Conversion


Selected from: Chapter 7.1 7.4 of Fundamentals of
Communications Systems, Pearson Prentice Hall
2005, by Proakis & Salehi

Meixia Tao @ SJTU

Digital Communication Systems


Transmitter

Source

A/D
converter

Source
encoder

Channel
encoder

Absent if
source is
digital

User

D/A
converter

Modulator

Noise

Source
decoder

Channel
decoder

Channel

Detector

Receiver

Meixia Tao @ SJTU

Topics to be Covered
Analog signal

Sampling
Discrete-time continuous-valued signal

Quantization
Discrete-time discrete-valued signal

Encoding
Bit mapping

Pulse Code
Modulation
Meixia Tao @ SJTU

Digital transmission

Harry Nyquist (1928)


"Certain topics in telegraph transmission
theory", Trans. AIEE, vol. 47, pp. 617
644, Apr. 1928

Sampling Theorem
Continuous-time

Discrete-time

Meixia Tao @ SJTU

Sampling Process

x=
(t )

nT )
x(nT ) (t =

n =

x(t ) (t nTs )
n =

The sampling process can be regarded a modulation process with


carrier given by periodic impulses. Its also called pulse modulation
Meixia Tao @ SJTU

Sampling Process
1
X ( f )= X ( f )
Ts

n 1
f =

Ts Ts
n =

n
Xf

Ts
n =

X(f )

If

1
f=
< 2W
s
Ts

or Ts > 1

2W

-W

aliasing error, reconstruction is not


possible,

X ( f )
-1/Ts

The minimum sampling rate is known

1/Ts

X ( f )

as Nyquist sampling rate


-1/Ts
Meixia Tao @ SJTU

1/Ts
6

Reconstruction
LPF with frequency response

Ts

H( f ) =
0

f <W
1
f W
Ts

Ideal LPF
where

Meixia Tao @ SJTU

Reconstruction
With this choice, we have

Meixia Tao @ SJTU

Topics to be Covered
Analog signal

Sampling
Discrete-time continuous-valued signal

Quantization
Discrete-time discrete-valued signal

Encoding
Bit mapping

Pulse Code
Modulation
Meixia Tao @ SJTU

Digital transmission

Quantization

sampling

quantization
(rounding)

Meixia Tao @ SJTU

10

Quantization Region
Quantization regions:
Quantization level for each

Quantization:
Q=
( x) xk , for all x R=
1,..., N
k,k

Meixia Tao @ SJTU

Performance Measure of Quantization


Quantization error:

e( x, Q( x))= x Q( x)

Average (mean square error) distortion:

=
D E [ X Q( x)]

Signal-to-quantization noise ratio (SQNR):


E( X 2 )
SQNR =
For random variable X
2
E [ X Q( x)]

SQNR =

1
lim
T T
1
lim
T T

T /2

T / 2

x 2 (t )dt

( x(t ) Q( x(t )) )
T /2

T / 2

For signal x(t)

dt

Meixia Tao @ SJTU

Example
The source X(t) is a stationary Gaussian source with mean
zero and power spectral density
2
Sx ( f ) =
0

f < 100 Hz
otherwise

It is sampled at the Nyquist rate and each sample is


quantized using the 8-level quantizer with
a0 =
, a1 =
60, a2 =
40, a3 =
20, a4 ==
0, a5 20, a6 =
40, a7 =
60
x1 =
70, x2 =
50, x3 =
30, x4 =
10, x5 =
10, x6 =
30, x7 =
50, x8 =
70

What is the resulting distortion ? Sol: 33.38


What is the SQNR?

Sol: 10.78dB

Are the sampled signals independent to each other?


Meixia Tao @ SJTU

Uniform Quantizer
Range of the input samples = [-a, a]
Number of quantization levels =

.
2a
a
Length of each quantization region
= = v 1
N 2
Quantized value are the midpoints of quantization regions.
Quantization distortion (assume quantization error
uniformly distributed on ( , ) )
/2

2 2

1 2
2
a2
a2
E[e=
]
x dx
= =
=
2
v

12
2
N
3

4
/2
2

One extra bit increases


PX
3 4v PX dB
PX
SQNR
=
=
= 10 log10 2 + 6v + 4.8 the SQNR by 6 dB!
2
2
E[e ]
a
a
Meixia Tao @ SJTU

14

Example
Find the SQNR for a signal uniformly distributed on
and quantized by a uniform quantizer with 256
levels.

Meixia Tao @ SJTU

15

Nonuniform Quantizer
By relaxing the condition that the quantization regions be of
equal length, we can minimize the distortion with less
constraints
The resulting quantizer will perform better than a uniform
quantizer

Meixia Tao @ SJTU

16

Optimal Quantizer
Lloyd-Max Conditions (criteria for optimal quantizer)

The boundaries of the quantization regions are the midpoints of the


corresponding quantized values

1
=
ai
( xi + xi +1 )
2

The quantized values are the centroids of the quantization regions.


ai

xi

ai 1
ai
ai 1

xf ( x)dx
f ( x)dx

Meixia Tao @ SJTU

17

Meixia Tao @ SJTU

18

Example
How would the results of the example in slide#13 change if
an optimal non-uniform quantizer with the same number of
levels?

Sol: 14.6dB (i.e. 3.84dB better)

Meixia Tao @ SJTU

19

Vector Quantization
Scalar quantization
Each sample is quantized individually

Vector quantization:
Take blocks of source outputs of length n, and design the quantizer
in the n-dim Euclidean space, rather than doing the quantization
based on single samples in an one-dim space

Meixia Tao @ SJTU

20

An Illustration

4-level quantizer applied


to 2 samples

4-level quantizer

Vector quantization in 2-D

Meixia Tao @ SJTU

Optimal Vector Quantization


Region Ri is the set of all points in the n-dim space that are
closer to xi than any other xj, for all j\= i; i.e.

Ri =

x R n : x xi < x x j , j i

xi is the centroid of the region Ri, i.e.

1
xi =
xf x (x)dx

P(x Ri ) Ri

Meixia Tao @ SJTU

22

Application of Quantizer
Application of quantizer:
ADC in digital communication
Channel feedback in FDD cellular networks

More reading:
Allen Gersho, "Quantization", IEEE Communications Society
Magazine, pp. 1628, Sept. 1977.

Meixia Tao @ SJTU

Topics to be Covered
Analog signal

Sampling
Discrete-time continuous-valued signal

Quantization
Discrete-time discrete-valued signal

Encoding
Bit mapping

Pulse Code
Modulation
Meixia Tao @ SJTU

Digital transmission

24

Encoding
The encoding process is to assign v bits to
quantization levels.
Since there are v bits for each sample and fs
samples/second, we have a bit rate of
R = vf s bits/second
Natural binary coding
Assign the values of 0 to N-1 to different quantization levels
in order of increasing level value.

Gray coding
Adjacent levels differ only in one bit
Meixia Tao @ SJTU

25

Examples
Natural binary code (NBC), folded binary code (FBC), 2complement code (2-C), 1-complement code (1-C), and
Gray code
Level no

NBC

FBC

2-C

Gray code

Amplitude level

111

011

011

100

3.5

110

010

010

101

2.5

101

001

001

111

1.5

100

000

000

110

0.5

011

100

100

010

-0.5

010

101

111

011

-1.5

001

110

110

001

-2.5

000

111

101

000

-3.5

Meixia Tao @ SJTU

26

Pulse Code Modulation (PCM)


Most widely used method for A/D conversion of audio source
Block diagram of a PCM system

x(t )

{xn }

{xn }

Sampler

Quantizer

{ 0110 }
Encoder

Uniform PCM: the quantizer is a uniform quantizer


Bit rate
If a signal has a bandwidth of W and is sampled at
used for each sampled signal, then

and v bits are

Bandwidth requirement:
With binary transmission (to be discussed in later chapters)
Meixia Tao @ SJTU

27

Non-uniform PCM
For speech waveform, there exists a higher probability for smaller
amplitudes and a lower probability for larger amplitudes.
It makes sense to design a quantizer with more quantization regions at
lower amplitudes and fewer quantization regions at large amplitudes.
The usual method:
First pass the samples through a nonlinear filter that compress the large
amplitudes and then perform a uniform quantization
Apply the inverse (expansion) of this nonlinear operation at the receiver

=> Companding (compressing-expanding)

Meixia Tao @ SJTU

28

Compander (speech coding)


law compander

g ( x)

log (1 + | x |)
sgn( x), | x | 1
log(1 + )

The standard PCM system in US & Canada employs a compressor


with
followed by a uniform quantizer with 8 bits/sample

Meixia Tao @ SJTU

29

Compander
A law compander
1 + log A | x |
g ( x)
sgn( x), | x | 1
1 + log A
y

1
6
8

A = 87.6

4
8
1
8

1
8

1
4

1
2

1 x
Meixia Tao @ SJTU

30

Differential PCM (DPCM)


For a bandlimited random process, the sampled values are usually
correlated random variables
This correlation can be exploited to improve the performance
Differential PCM: quantize the difference between two adjacent
samples.
As the difference has small variation, to achieve a certain level of
performance, fewer bits are required

Meixia Tao @ SJTU

31

DPCM
encoder

Quantizer

delay

decoder

delay

Meixia Tao @ SJTU

32

Delta Modulation (DM)


DM is a simplified version of DPCM having a two-level quantizer with
magnitude
In DM, only 1-bit per symbol is employed. So adjacent samples must
have high correlation.

m(t )
m(t )

m(ti )

m(ti 1 ) m(ti )
The step size is critical in
designing a DM system.
Meixia Tao @ SJTU

33

Step Size

Meixia Tao @ SJTU

34

Suggested Reading
Chapter 7.1 7.4 of Fundamentals of Communications
Systems, Pearson Prentice Hall 2005, by Proakis & Salehi

Meixia Tao @ SJTU

35

Das könnte Ihnen auch gefallen