You are on page 1of 49

Block Diagram of Digital Communication Link

Pulse Code Modulation

Analog signal

Pulse Amplitude Modulation

Pulse Width Modulation

Pulse Position Modulation


Pulse Code Modulation
(3-bit coding)

2
Advantages of Digital Over Analog For Communications

1. Digital is more robust than analog to noise and interference†


2. Digital is more viable to using regenerative repeaters
3. Digital hardware more flexible by using microprocessors and VLSI
4. Can be coded to yield extremely low error rates with error correction
5. Easier to multiplex several digital signals than analog signals
6. Digital is more efficient in trading off SNR for bandwidth
7. Digital signals are easily encrypted for security purposes
8. Digital signal storage is easier, cheaper and more efficient
9. Reproduction of digital data is more reliable without deterioration
10. Cost is coming down in digital systems faster than in analog systems
and DSP algorithms are growing in power and flexibility
† Analog signals vary continuously and their value is affected by all levels of noise.

Reading: Lathi & Ding; Section 6.2.1 on pages 321 and 322.
3
Next Topic – Pulse Code Modulation
Pulse-code modulation (PCM) is used to digitally represent
sampled analog signals. It is the standard form of digital audio
in computers, CDs, digital telephony and other digital audio
applications. The amplitude of the analog signal is sampled at
uniform intervals and each sample is quantized to its nearest
value within a predetermined range of digital levels.

Four-bit coding
(16 discrete levels)

4
Analog to Digital Conversion Process (ADC)
Three Step Process

amplitude

amplitude

amplitude
  
0100101101011001
time  time 1110101010101000
time
 0100011000100011
 
  0101001111010101
 
  1110110111010001

  
Sample Quantize Encode
Analog Digital
Signal Captured Quantized
Sampled Data Sampled Signal
Sampling Values Quantizing Data Encoding
selects the chooses the assigns binary
data points amplitude numbers to
we use to Discrete values used Now have those
Now have the
Analog signal create the time values: to encode discrete amplitude
digital
is continuous digital data few amplitudes Values in values
data which
in time & from analog both time & is the final
amplitude signal amplitude result

Note: “Discrete time” corresponds to the timing of the sampling.

5
Second Step – Quantization I
The process of assigning quantization levels

Lathi & Ding


Figure 1.4
p. 4

= 

16 levels – 4 bits

6
Natural Binary Pulse Code (Example)

To communicate sampled
values, we send a sequence of
bits that represents the
quantized value.
For 16 quantization levels, 4 bits
are required.
PCM can use a binary
representation of value.
The PSTN uses PCM

Figure 1.5 (page 8) of


Lathi & Ding

7
Second Step – Quantization II

We start with a sampled signal {call it m(t)} and now we want to quantize it.

The quantized amplitude is limited to a range, say from –mp to +mp.


(Note: the range of m(t) may extend beyond (-mp, mp) in some cases.)

Divide the range (-mp, mp) into L uniformly spaced intervals. The number
intervals is L and the separation between quantized levels is
2mp
  L
The kth sample point of m(t) is designated as m(kTS) and is assigned a value
equal to the midpoint between two adjacent levels. Define:

m(kTS) = kth sample’s value, and


m(kTS) = kth quantized sample’s value.

Then the quantization error q(kTS) is equal to m(kTS) - m(kTS)

Read Section 6.2.2 of Lathi & Ding: Quantizing evaluation of parameter q(t).
pp. 322-324
8
Error Generated by Quantization



Quantization fluctuation or “noise”

9
Second Step – Quantization III

The quantized levels are separated by 2m


  Lp
The maximum error for any sample point’s quantized value is at most ½.

It is shown in Lathi and Ding that the “time average” mean square error
from quantization is
2p
q 2  m 2    
2

3L
12
Let Nq equal q2. Nq is proportional to the fluctuation of the error signal.
This is sometimes quantization noise.

This means that m(t) = m(t) + q(t)

The signal (message) power S0 is proportional to the square of m(t), thus

S0  m2
(t)

10
Second Step – Quantization IV

We want a measure of the quality of received signal (that is, the ratio of
the strength of the received signal S0 relative to the strength of the error
Nq due to quantization).
S0 m2 (t)  2
2 m (t)

This is given by the ratio  2  3L  m 2 
 
Nq  m 
p p

 3L2 

Conclusion:

To keep the quantization error small relative to the message signal level,
use smaller quantization steps .

11
The Dilemma of Strong Signals versus Weak Signals

Strong Signal Weak Signal

(a) Linear encoding (b) With non-linear encoding


Companding
Note different encoding levels on each side.

12
Use Compression and Expansion → Companding

Compression Restoratio
(m) n
m(t)
m(t) m(t)

http://www.slideshare.net/91pratham/unit-ipcmvsh 12
Companding Laws

A-Law Companding (Europe) -Law Companding (North America)


Output (y/ymax)

Output (y/ymax)
Input (m/mp) Input (m/mp)

A  m  for m 1
y  1  log A m
  0  m 1 m 0 m 
e  p  p A y log e 1  for
log e(1   )   mp  1 p
A   Am  1 m m
y  1

1  loge A  1  log e
 
 A mp
  mp 
for Lathi & Ding
Section 6.2.3
pp. 325-328

14
Flattening of the S/N Ratio Using the -Law

For optimal S/N ratio in North America  = 255 is used.


An approximately constant S/N ratio is the most desirable.

Lathi & Ding


 S0 
Figure 6.18
 N q 
 p. 328
(8 bits)

Relative signal power m2(t) , (dB)

15
Transmission Bandwidth

In binary PCM, we have a group of n bits corresponding to L levels with n


bits. Thus,
L = 2n or n = log2(L)

Signal m(t) is band-limited to B Hz which requires 2B samples per second.

For 2nB elements of information, we must transfer 2nB bits/second. Thus,


the minimum bandwidth BT needed to transmit 2nB bits/second is

BT = nB Hz

Practically speaking, usually we choose the transmission bandwidth to be


a little higher than the minimum bandwidth required.

16
Example 6.2 (Lathi & Ding, page 329)

Problem: A band-limited signal m(t) of 3 kHz bandwidth is sampled at rate of


33⅓ % higher than the Nyquist rate. The maximum allowable error in the
sample amplitude (i.e., the maximum quantization error) is 0.5% of the peak
amplitude mp. Assume binary encoding. Find the minimum bandwidth of the
channel to transmit the encoded binary signal.

Solution:
The Nyquist rate is RN = 2 x 3000 Hz = 6000 Hz (samples/second), but the
actual
rate is 33⅓ % higher, so that is 6000 Hz + (⅓ x 6000) = 8000 Hz.

The quantization step is  and the maximum quantization error is plus/minus


/2. Hence, we can write
 mp 0.5
  m p  L
2 L 100 200
For binary coding, L, must be a power of two; therefore, knowing that L = 27 =
128 and 28 = 256, we must choose n = 8 to guarantee better than a 0.5% error.

17
Example 6.2 Continued (Lathi & Ding, page 329)

Solution (continued):
Having chosen n = 8 to guarantee 0.5% error, to find the bandwidth required
we note that

Total number of bits per second C = 8 bits  8000 Hz


= 64,000 bits/second

However, we know we can transmit 2 bits/Hz of bandwidth¶, so it requires a


bandwidth BT of
BT = C/2 = 32,000 Hz = 32 kHz

If 24 such signals are multiplexed on a single line (known as a T1 Line in the


Telephone system, then

CT1 = 24 x 64 kb/s = 1.536 Mb/s, and the bandwidth is 768 KHz


A maximum of 2B independent elements of information per second can be
transmitted, error-free, over a noiseless channel of bandwidth B Hz.
18
Exponential Increase of the Output SNR (S/N ratio)

We start with the SNR (signal-to-noise ratio) equation from slide 10 above:

S0  m2 (t) 2
N q  3  mp2 
 L
The number of levels L can be expressed as L2 = 22n where n = log2(L) and is
The number of bits to generate L levels. The SNR can now be expressed as

S0  m2 (t)  2n
N q  3  mp2 
2
Using the expression for bandwidth, BT = nB, then we arrive at

 m2 (t)  2BT /B
N q  3  mp2 2
S0
 
Taking the logarithm gives
S    m 2 (t)  
 S   10 log
0 0
 10 log 10 2     6n
 Nq  10  N q   3  2
  mp    2n log 10 dB
 dB    
 19
SNR Example

Given a full sinusoidal modulating signal m(t) of amplitude Am into a


load resistance R = 1 ohm, find the signal-to-quantization noise ratio
(sometimes called SNR):

Am2 and set


Pave  2 mmax  Am
Setting mmax = Am

S0  m2 (t) 2n  3P 2n
 3 2n
N q  3  m 2p  (2) m 2max (2)    (2)
ave


2

L n SNR
32 5 31.8 dB
10  S0  64 6 37.8 dB
 N q  
10  1.76  6n dB
log
128 7 43.8 dB
256 8 49.8 dB

20
6.3 Bell System’s T1 Carrier System
(1962)
The T-carrier is a member of the group of carrier systems developed by AT&T
Bell Laboratories for digital transmission of multiplexed telephone calls using
Pulse Code Modulation and Time Division Multiplexing.

The first version, the Transmission System 1 (T1), was introduced in 1962 in
the Bell System, and could transmit up to 24 telephone calls simultaneously
over a single transmission line consisting of copper wire.

193 bit frame – 122 sec/frame

1.544 Mbit/s data rates

21
T1 Carrier – Time Division Multiplexing

Lathi & Ding


Figure 6.20
p. 282

22
T1 Carrier System TDM Fig 6.20(b)
T1 system signalling format Fig 6.21
Time Division Multiplexing

Digit interleaving

Word interleaving
Asynchronous channels and bit stuffing Fig 6.24
Plesiochronous Digital Hierarchy AT & T system
PDH according to ITU-T (G.704) Fig 6.26
Comparison of T-Carrier (North America) and E-Carrier (Europe)

Carrier Level T-Carrier Data Rates E-Carrier Data Rates


Zero-level 64 kbits/s (DS-0) 64 kbits/s

First-level 1.544 Mbits/s (DS-1) 2.048 Mbits/s (E1)


T1 – 24 channels 32 user channels
Second-level 6.312 Mbits/s (DS-2) 8.448 Mbits/s (E2)
T2 – 96 channels 128 channels
Third-level 44.736 Mbits/s (DS3) 34.368 Mbits/s (E3)
T3 – 672 channels 512 channels
Fourth-level 274.176 Mbits/s (DS4) 139.264 Mbits/s (E4)
T4 – 4032 channels 2048 channels
Fifth-level 400.352 Mbits/s (DS5) 565.148 Mbits/s (E5)
T5 – 5760 channels 8192 channels

29
Worked PCM Example

We are given a signal m(t) = 2cos(2250 t) as the signal input.


(a) Find the SNR with 8-bit PCM.
For 8-bit encoding, L = 2n where n = 8, therefore, the number of levels = 256.
The amplitude Am of the sinusoidal waveform means that mp = 2 volts. The
total signal swing possible (- mp to + mp) will be 2mp = 4 volts, therefore,
the average signal power is P ave = [(Am)2/2] = [22/2] = 2 watts. (See slide 19)
-2

Now we can find the SNR (signal-to-quantized noise ratio)


(See side 18)
Using for the quantization noise N q = [()2/12], and taking Pave = 2 W, the
SNR is given by
 S   ave   2  24 
   12    98,
P   2
  (1.5625 10 )
 N q   N q     2 2
 304
 
  10 log 98, 304  49.93 dB
SNRdB 10

30
Worked Example for PCM (continued)

We are given a signal m(t) = 2cos(2250 t) as the signal input.


(b) If the minimum SNR is to be at least 36 dB, how many bits n are needed
to encode the signal (i.e., find n)? Other parameters such as signal power remain
the same as in part (a) on previous slide.

Note that 36 dB is numerically equivalent to 3,981 [about  4,000].


Remembering that the interval is  = [2mp /L] and 2mp = 4 volts.
2m p 4 4
3, 981   ;  2   0.001005 and   0.0317 volt
 2
 3981
2
Therefore, we can determine the number of levels L, and then n.

2m 4
L  p  0.0317
 31.5

The lowest integer number of bits n that will give at least 31.5 levels is n = 5
because 25 = 32 levels. So the answer is 5 bits.

31
Differential Pulse Code Modulation (DPCM)

PCM is not really efficient because it generates so many bits taking up a lot
of bandwidth. Can we improve on this? YES.

Suppose we have a slowly varying signal m(t), then we exploit this by


using the difference in two adjacent samples. This will form the basis
of differential pulse code modulation (DPCM).

Let m[k] be the kth sample of signal m(t).

Then we can express the difference between adjacent samples as

d[k] = m[k] – m[k-1]

Instead of transmitting m[k], we instead transmit d[k].

Lathi & Ding, Section 6.5, pp. 290

32
Differential Pulse Code Modulation (continued)

At the receiver knowing d[k] and the previous value of m[k-1] allows us to
construct the value of m[k].

How do we benefit from doing this?

The difference of successive samples almost always is much smaller than


the full range of the sample values of m(t) (full range covers -mp to +mp).
We use this fact to improve upon the efficiency of PCM by requiring
fewer bits.

In addition, we make use of the estimate of m[k], denoted by m[k].


We use previous sample values of m(t) to make this estimate.

Suppose m[k] is the estimate of the kth sample, then the difference
d[k]
is given by
d[k] = m[k] – m[k]

and it is the difference d[k] that is transmitted.


Lathi & Ding, Section 6.5, pp.
291 33
Differential Pulse Code Modulation (continued)

Receiver Concept:
At the receiver we determine the estimate m[k] from previous sample
values, and then generate m[k] by adding the received d[k] values to the
estimate m[k]. Thus the reconstruction of the samples is done iteratively.

Lathi & Ding, Section 6.5, pp. 290-293

34
Digression on Signal Prediction

Starting with a Taylor series (time step is Ts),


dm(t) T 2 d 2 (m(t) T 3 d 3 (m(t)
m[t  TS ]  m(t) 
dt  2! dt2  3! dt3  ...
S S

TS
S dm(t) for small TS
m[t  TS ]  m(t)  T dt
We denote the kth sample of m(t) by m[k], that is, m[kTS] = m[k], and
m[kTS  TS] = m[k  1], and so on. This is a first-order predictor.
d m(kTS )  m(kTS  TS )
In handling the derivatives, we write m(kTS) 
dt TS

Thus,
 m[k]  m[k  1] 
m[k  1]  m[k]  T
S TS
 
m[k  1]  2m[k]  m[k  1]

So we get an approximation of the (k+1)th sample, m[k+1], from the two


prior samples.

35
Signal Prediction (continued)

But we can do better than this. In general,

m[k]  a1m[k  1] a2m[k  2] . . .  aN m[k  N]  m[k]

The set of {ai} are the prediction coefficients.


This is the predicted value of m[k]. It is an Nth order predictor.

Note that the input consists of the weighted previous samples m[k-1],
m[k-2],etc. We say that input m[k] gives output m[k].

For first-order prediction, m[k] = m[k-1].

The next slide shows how to implement this prediction of m[k].

36
Linear Predictor Implemented With Transversal Filter

m[k]  a1m[k  1]  a2m[k  2]  . . .  aN m[k 


N]
Input
m[k] Delay Delay Delay Delay ... Delay
TS TS TS TS TS

Lathi & Ding aN


a1 a2 a3
Figure 6.27
p. 292

Output m[k]

Transversal filter is a tapped delay line (with required weights {ai} )

37
DPCM Transmitter

Input Output
m[k] d[k] dq[k]
+
 Quantizer

Lathi & Ding +


Figure 6.28(a)
p. 293
mq[k]
+ 
mq[k]
Predictor

d[k]  m[k]  mq and is quantized to yield,


[k] where q[k] is the quantization
dq [k]  d[k]  q[k] error
The predictor output m[k] is fed back to the input so the predictor input
mq[k] is given by
mq [k]  mq [k]  dq [k]  m[k]  d[k]  d q [k]  m[k]  q[k]

This shows that mq[k] is the quantized version of m[k].


38
DPCM Receiver

Input Output
dq[k] + mq[k]

Lathi & Ding +
Figure 6.28(a)
p. 293 mq[k]
Predictor

The receiver’s output (which is the predictor’s input) is also the same,
mq[k] = m[k] + q[k].

Hence, we are able to receive the desired signal m[k] plus the quantization
noise, q[k]. It is important to note that from the difference signal d[k] is
much smaller that the noise associated with m[k].

39
DPCM SNR Improvement

How much better is DPCM with regard to SNR?

To determine this, define mp and dp as the peak amplitudes of m(t) and


d(t), respectively. Assuming the same number of steps L for both, then
the quantization step  in DPCM is reduced in magnitude by dp/mp.

The quantization noise is proportional to ()2 – the quantization noise


power is reduced by a factor (d p/m )p2 and the SNR is therefore increased by
(mp/d p)2.

Maintaining the same SNR, the number of bits can be reduced.


Example:
The AT&T telephone system sometimes operates at 32 kbits/s
(or even 24 kbits/s) when using DPCM. [The telephone system was initially
designed to use a 64 kbits/s data rate.]

40
Adaptive Differential PCM

Adaptive differential PCM (ADPCM) can further improve upon DPCM by


Incorporating an adaptive quantizer (variable ) at encoding.

The quantized prediction error dq[k]


is a good measure of the predicted
error size – it can be used to change m[k] dq[k]
Adaptive
 which minimizes dq[k]. When
+
 Quantizer To
dq[k] fluctuates around large positive Channe
or negative values, the prediction l
error is large and  needs to nth order
increase, but when dq[k] fluctuates Predictor
around zero (small values), then 
needs to decrease.

Example: An 8-bit PCM sequence can be encoded into a 4-bit ADPCM


sequence at the same sampling rate. This reduces the channel bandwidth
by one-half with no loss in quality.

41
Adaptive Differential PCM Output Example

time

42
Next Topic is Delta Modulation

43
The process of delta modulation
Delta modulation components
Delta demodulation components
Adaptive DM

Adaptive delta modulation


A better performance can be achieved if the value of δ is not fixed.
The value of δ changes according to the amplitude of the analog
signal.
Quantization Error
DM is not perfect.
Quantization error is always introduced in the process.
Much less than that for PCM.

You might also like