Professional Documents
Culture Documents
ELE3340
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 1
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Outline
• Consider digital communications. If the information to be sent is data, then that is
fine. But for analog continuous-time message signals such as voice and images, the
signals have to be converted to digital numbers.
• Such an analog-to-digital conversion is done through two processes, namely
sampling and quantization.
• These two ideas will further lead to pulse code modulation, a method of
converting an analog signal into a binary digital number for digital storage or
digital transmission.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 2
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
SAMPLING
Sampling is a process of converting an analog continuous-time signal to a discrete-time
signal.
Ts
x (t ) xs ( t )
Let x(t) be the signal to be sampled. The sampled signal xs (t), with sampling interval
Ts , is given by
X∞
xs (t) = x(nTs )δ(t − nTs )
n=−∞
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 3
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Sampling theorem
Intuitively one sounds reasonable that if the sampling rate 1/Ts is fast compared to the
time change of the signal x(t), then there should be little lost of information.
The sampling theorem by Shannon provides us the condition under which no
information is lost from the the sampling process.
Sampling theorem: Let x(t) be a signal with Fourier transform X(ω) such that
X(ω) = 0 for |ω| ≥ π/Ts . Then
∞
X π
x(t) = x(nTs )sinc (t − nTs )
n=−∞
Ts
where sinc(t) the sinc function; i.e., sinc(t) = sin(t)/t. The quantity π/Ts (in
rad/sec.) is called the Nyquist frequency.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 4
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 5
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
The function δs (t) is periodic with period Ts , and therefore it admits a Fourier series
representation
X∞
δs (t) = ck ej2πkt/Ts
k=−∞
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 6
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Now, suppose that X(ω) is bandlimited with bandwidth 2πB (which means X(ω) = 0
for |ω| > 2πB). There are two cases to consider.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 7
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Case A: 2πB > π/Ts (message bandwidth higher than the Nyquist freq.)
X(ω)
−2πB 2πB ω
Xs(ω)
..... .....
− Tπs π
Ts
ω
In Xs (ω), there are spectral overlaps with the replicas of X(ω). This effect is known as
aliasing, which prevents us from recovering x(t) from the samples x(nTs ).
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 8
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Case B: 2πB ≤ π/Ts (message bandwidth no greater than the Nyquist freq.)
X(ω)
−2πB 2πB ω
Xs(ω)
..... .....
− Tπs π ω
Ts
For |ω| ≤ 2πB, the spectrum of Xs (ω) has the same shape as that of X(ω).
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 9
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 10
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Xs(ω)
replacements
H(ω)
..... .....
− Tπs π ω
Ts
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Implication
Sampling theorem tells us that we can perfectly recover a bandlimited signal x(t) from
its samples x(nTs ), provided that the sampling rate is at least twice of the signal
bandwidth (i.e., 1/Ts ≥ 2B).
1
0.5
x(t)
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
t
0.5
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 12
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
x1 (t )
x2 (t )
t
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 13
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Here, x(t) is the message signal with bandwidth 2πB ≤ π/Ts , and p(t) is the
transmitted pulse shape given by
1, − Tp ≤ t ≤ Tp
2 2
p(t) =
0, otherwise
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 14
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 15
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
QUANTIZATION
Quantization is the process in which a continuous-valued signal is converted to a
discrete-valued signal.
x(t)
x (t)
q
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 16
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Uniform quantization
Uniform quantization is one of the most commonly used quantization methods.
xq (t)
3∆
2∆
3∆
− 9∆
2
− 7∆
2
− 5∆
2
− 3∆
2
− ∆2 ∆
2 2
5∆
2
7∆
2 x(t)
−∆
−2∆
−3∆
−4∆
Range 2mp
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 17
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Let x(t) be the signal to be quantized, xq (t) be the quantized signal, and Q be the
quantization function or the quantizer. We have
xq (t) = Q[x(t)]
The quantizer output xq (t) depends only on the present-time input x(t). Thus
sometimes we may simply write xq = Q[x], for convenience.
The quantizer output assumes a finite number of values
{x1 , x2 , . . . , xL }
These levels are uniformly spaced, satisfying
|xk+1 − xk | = ∆
for a given step size ∆. Given the number of levels L, ∆ can be determined by
2mp
∆=
L
where mp is the peak amplitude of x(t).
The quantization function is such that
Q[x] = xk , for xk − ∆/2 < x ≤ xk + ∆/2
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 18
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Nonuniform quantization
In some signals such as speech, it is found that there is a higher probability for smaller
amplitudes and lower probability for larger amplitudes.
Hence, it makes sense to design a quantizer with more quantization levels (& thus finer
quantization) at lower amplitudes and fewer quantization levels (& thus coarser
quantization) at larger amplitudes
The usual method of nonuniform quantization is companding
(compressing-expanding).
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 19
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 20
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Encoder
Ts
Analog 01011...
input
signal Sampler Quantizer
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 21
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
In PCM we assume that the number of quantization levels, L, is a power of 2; i.e.,
L = 2ν
for some integer ν. In that case, each level can be represented by a length-ν binary
codeword.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 23
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Delta modulation
The idea of delta modulation (DM) is to send the signal difference.
∑
m[k] d [k] d q [k] To channel
Quantizer
-
∑
mq [k-1] + +
Accumulator
Delay T s
mq [k]
∑
d q [k ] mq [k ]
mq [k − 1]
Delay T s
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 24
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
DM is a 1-bit system. The quantizer is such that
∆, d[k] ≥ 0
dq [k] =
−∆, d[k] < 0
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
slope overload
Startup
mq(t)
m(t)
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 26
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 27
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Differential PCM
Before describing differential PCM (DPCM), let us briefly consider the approach to
signal prediction.
By Taylor series, we can express m(t + Ts ) as
Ts2 Ts3 ...
m(t + Ts ) = m(t) + Ts ṁ(t) + 2!
m̈(t) + 3!
m(t) · · ·
More generally, we can incorporate more higher order derivatives to obtain a better
prediction and the prediction formula can be expressed as
a1 a2 ….. a N −1 aN
⌢
Output m[ k ]
Predictor structure.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 29
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
∑
m[k] d [k ] d q [k ] To channel
Quantizer
-
∑
+ +
⌢
mq [k ]
Predictor
mq [k ]
∑
Input d q [k ] Output mq [k ]
⌢
mq [k ]
Predictor
Note that in DPCM, the quantizer can be of multiple level (instead of 2 level as in DM).
If the quantizer is 1-bit and the predictor is a unit delay, then the corresponding DPCM
becomes DM.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 30
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
A glimpse of PCM applications: T1 carrier system
• T1 carrier is a TDM system. It multiplexes 24 PCM telephone signals and transmit
them through a pair of wires that was originally used to transmit one audio signal
with bandwidth 4kHz.
• T1 carrier occupies a total bandwidth of 1.544MHz, much greater than 4kHz. But
pulse transmissions are more resistent to signal distortion due to poor
high-frequency-performance wired lines, as well as noise.
• It also enables effective regeneration for repeaters (say, 6000 feet apart).
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 31
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
• For each channel, a signal sample is converted to a binary codeword of 8 bits. The
binary codeword is then sequentially transmitted by eight consecutive binary pulses.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 32
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
Ex 4.3 According to the specification above, what is the T1 carrier transmission rate,
in terms of number of pulses transmitted per second?
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 34
ELE3340 Analog and Digital Communications 4. Sampling and Pulse Code Modulation
REMARKS
• Quantization is a lossy conversion process (or the signal gets distorted in the
process). We however would expect that the loss is insignificant if we use sufficient
number of quantization levels.
• The effects of quantization errors can be quantified and analyzed. This however
would require knowledge of probability and random processes which will be covered
in the later part of the course.
Wing-Kin Ma, Dept. Electronic Eng., The Chinese University of Hong Kong 35