2.3 Pulse Code Modulation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Intro Telecommunications (5ETA0)

Chapter 3, sections 1-3


Pulse Code Modulation

Dr. Oded Raz


Electro-Optical Communication Systems (ECO) group
Dep. Electrical Engineering
Contents
Ch 3.1_3
-2

1. Pulse Code Modulation (PCM)


2. PCM bandwidth and Spectral Efficiency
3. Signal to Noise Ratio
Pulse Code Modulation
Ch 3.1_3
-3

⚫ Digital representation of the signal samples by analog-to-digital


conversion
⚫ Allows time division multiplexing, by merging with other digitised
signals into a common transmission channel
⚫ Allows regeneration, by reconstruction of the digital levels, thereby
eliminating noise
⚫ Has specific noise performance aspects (quantisation noise,
channel noise, …)
Sampling, Quantising and Encoding
Ch 3.1_3
-4

⚫ Input: a flat-top PAM signal

⚫ Approximation with discrete levels


⚫ Digital coding of the discrete levels
⚫ Number of levels M ; usually M=2n , so each level can be coded
with n bits (e.g., 16 levels with 4 bits)
⚫ Round-off errors: quantising noise
PCM transmission system
Ch 3.1_3
-5

Up until now… Coming up next…

Figure 3-7 Digital and analog communication systems, Leon Couch, 8th edition
Illustration of waveforms in a PCM system
Ch 3.1_3
-6

a. Quantizer transfer characteristic

b. Flat-top sampling and


Quantization of an Analog Signal

c. Error signal
Peak value of error signal (± 1) is
one half the quantizer step size (=2)

d. PCM word in Gray code


7 7 5 5 3 3 3 3

Figure 3-8 Digital and analog communication systems, Leon Couch, 8th edition
Three-bits Gray code for M = 8 levels
Ch 3.1_3
-7

Gray code: one bit change for each step change (allows fast coding)
Table 3-1 Digital and analog communication systems, Leon Couch, 8th edition
Practical PCM circuits
Ch 3.1_3
-8

• Analog-to-digital converter (ADC)


➢ Counting (or ramp) encoder (slow, few components)
➢ Serial (or successive approximation) encoder
➢ Parallel (or flash) encoder (fast, many components)

• Serial input-output converter (SIO)


Converting the parallel output of the ADC into a serial stream, and
vice-versa (for full-duplex)
➢ UART - universal asynchronous receiver/transmitter
➢ USRT - universal synchronous receiver/transmitter
➢ USART - universal synchronous/asynchronous receiver/transmitter

• Digital-to-analog converter (DAC)


➢ Using first a SIO for serial-to-parallel conversion
➢ Use the parallel digital word for setting switches in a resistive current
(or voltage) divider, thus generating an analog output voltage.
PCM transmitter with counting ramp encoder
Ch 3.1_3
-9
A/D conversion

vramp(t)

encode t

reset
PCM receiver with DAC
Ch 3.1_3
- 10
D/A conversion
Flash ADC
Ch 3.1_3
- 11

M=4 levels • Linear voltage ladder


• Binary logic to convert to parallel code words
VREF∙7/8
• 2n-1 comparators needed for n-bit conversion
→ gets complex and power-hungry for high precision

VREF∙5/8
• Sampling done by comparators; no separate
sample-and-hold circuit needed
• Very fast (instantaneous, not successive
VREF∙3/8
approximation)

VREF∙1/8

“Bubble error correction”: to provide redundancy in order to reduce the impact of possible
failures in the comparator stages (which may happen at high speed operation)

[ http://en.wikipedia.org/wiki/Flash_ADC ]
Signal scaler
Ch 3.1_3
- 12
⚫ Ideal amplifier: A=, Zin=
𝑖𝑖𝑛 = 𝑣𝑖𝑛 /𝑅𝑖𝑛
RF 𝑖𝐹 = 𝑣𝑜𝑢𝑡 /𝑅𝐹
iF 𝑖𝑖𝑛 + 𝑖𝐹 = 0
vin
Rin - vout 𝑣𝑜𝑢𝑡 𝑅𝐹
iin A= 𝐴= =−
𝑣𝑖𝑛 𝑅𝑖𝑛
+

𝑖𝑖𝑛,1 = 𝑣𝑖𝑛,1 /𝑅𝑖𝑛,1


iin,1 𝑖𝑖𝑛,2 = 𝑣𝑖𝑛,2 /𝑅𝑖𝑛,2
vin,1
Rin,1 RF 𝑖𝐹 = 𝑣𝑜𝑢𝑡 /𝑅𝐹
iF 𝑖𝑖𝑛,1 + 𝑖𝑖𝑛,2 + 𝑖𝐹 = 0
vin,2
Rin,2 - vout 𝑅𝐹 𝑅𝐹
iin,2 A= 𝑣𝑜𝑢𝑡 =− 𝑣 − 𝑣
𝑅𝑖𝑛,1 𝑖𝑛,1 𝑅𝑖𝑛,2 𝑖𝑛,2
+
Contents
Ch 3.1_3
- 13

1. Pulse Code Modulation (PCM)


2. PCM bandwidth and Spectral Efficiency
3. Signal to Noise Ratio
Bandwidth of PCM signal
Ch 3.1_3
- 14

⚫ Bit rate R (using n bits per sample): 𝑅 = 𝑛𝑓𝑠 [bits/s]


with sample freq. fs  2B - M = 2𝑛

⚫ Dimensionality theorem*: 1 1
(so PCM requires a bandwidth at least n times 𝐵PCM ≥ 𝑅 = 𝑛𝑓𝑠 ≥ 𝑛𝐵
2 2
as large as that of the input analog signal )

⚫ BPCM depends on the line coding. (see next sheet, will be addressed in Week 2)
➢ Polar rectangular NRZ signal: 𝐵PCM = 𝑅 = 𝑛𝑓𝑠
(null bandwidth at f = 1/Tb = R) 1
➢ Unipolar NRZ with sinc pulses: 𝐵PCM = 𝑅 (see 2nd next sheet)
2
⚫ When too narrow bandwidth: pulses are smeared into
neighbouring bit slots, causing intersymbol interference, ISI
Line codes (Binary signalling waveforms)
Ch 3.1_3
- 15

Unipolar NRZ
{0, 1}
Polar NRZ
{-1, +1}
Unipolar RZ
{1 0, 0 0}
Bipolar RZ
{0 0, 1 0 or -1 0}
Manchester NRZ
{1 -1, -1 1}
Figure 3-15 Digital and analog communication systems, Leon Couch, 8th edition
* will be addressed in detail in section 3.5
Sinc pulse
Ch 3.1_3
- 16

See sheet Ch. 2.7-7


𝑊(𝑓) = 1 if 𝑓 ≤ 𝑊
= 0 elsewhere
∞ 𝑊
2 𝑊 sin 2 𝜋𝑊𝑡
𝑤(𝑡) = න 𝑊(𝑓)𝑒 𝑗⋅2𝜋𝑓𝑡 d𝑓 = 2 න cos 2 𝜋𝑓𝑡d𝑓 = sin 2 𝜋𝑓𝑡 𝑓=0 = 2𝑊 = 2𝑊sinc 2𝑊𝑡
2𝜋𝑡 2𝜋𝑊𝑡
−∞ 0
1
Time interval between zeros : 𝑇=
2𝑊
1
Symbol rate : 𝑅 = = 2𝑊 → Spectral efficiency R/W = 2 Baud/Hz
𝑇
Performance of a PCM system
Ch 3.1_3
- 17

𝐵PCM = 𝑅 = 𝑛𝑓𝑠 = 𝑛 ⋅ 2𝐵

(for unipolar NRZ, polar NRZ,


or bipolar RZ… M = 2)

Number of quantization levels: M=2n

Table 3-2 Digital and analog communication systems, Leon Couch, 8th edition
Spectral efficiencies of line codes
Ch 3.1_3
- 18

*
* with L=2l levels
Unipolar NRZ with sinc pulses ½R 2

Table 3-6 Digital and analog communication systems, Leon Couch, 8th edition
Contents
Ch 3.1_3
- 19

1. Pulse Code Modulation (PCM)


2. PCM bandwidth and Spectral Efficiency
3. Signal to Noise Ratio
Noise at PCM system’s output
Ch 3.1_3
- 20

produced by

⚫ Quantising noise
- by round-off errors in the approximating M-step quantiser

⚫ Bit errors in the recovered PCM signal, caused by


- channel noise
- intersymbol interference due to improper channel filtering
⚫ Aliasing noise
- due to non-ideal band limitation (see sampling theorem, Ch. 2-7)
PCM communication system
Ch 3.1_3
Quantized - 21
Quantization samples
noise

Figure 7-15 Digital and analog communication systems, Leon Couch, 8th edition
Output Signal-to-Noise Ratio*
Ch 3.1_3
- 22

Average noise power: 𝑁 = 𝑛𝑘2 = 𝑒𝑏2 + 𝑒𝑞2


quantizing error eq , bit error due to channel noise eb
𝑉 2
1 𝑉
Average signal power (uniformly distributed signal): 𝑆 = var 𝑥𝑘 = 𝑥𝑘2 = න 𝑥𝑘2 𝑑𝑥𝑘 =
2𝑉 −𝑉 3
where xk, max=V
where 𝑥𝑘,𝑚𝑎𝑥 = 𝑉

Signal-to-noise ratio: 𝑆 𝑀2
where Pe is the bit error rate = 𝑷𝒆 … 𝒃𝒊𝒕 𝒆𝒓𝒓𝒐𝒓 𝒑𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
𝑁 out 1 + 4𝑃𝑒 𝑀2 − 1
of the channel

Peak signal power: 𝑆pk = 𝑉 2

Max. signal-to-noise: 𝑆 3𝑀2


=
𝑁 pk out 1 + 4𝑃𝑒 𝑀2 − 1

* see section Ch. 7-7 for derivations


SNR of a PCM system as a function of Pe
Ch 3.1_3
- 23

𝑆 3𝑀2
=
𝑁 pk out 1 + 4𝑃𝑒 𝑀2 − 1

if Pe  0 then only quantising


noise:
(S/N )pk out

(S/N )out  M 2

(S/N )pk out  3 M 2

𝑷𝒆 … 𝒃𝒊𝒕 𝒆𝒓𝒓𝒐𝒓 𝒑𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚


Pe
Figure 7-17 Digital and analog communication systems, Leon Couch, 8th edition
The Q-function (1/2)
Ch 3.1_3
- 24

⚫ Can be used to calculate bit error probablity Pe


⚫ Q(z) : the probability that x>z for a Gaussian distribution of x with mean x=0
and standard deviation x=1
⚫ e.g. a thermal noise signal x(t) is typically Gaussian distributed with =0

0,6
px(x) x=0 ∞
0,5
x=1 1 −𝑥 2 /2
0,4 𝑄(𝑧) = න 𝑒 𝑑𝑥
2𝜋
0,3 𝑧
0,2 Q(z)
1 𝑧
= erfc
0,1 2 2
0
z
-2 -1 0 1 2
x
Probability density function (pdf)
Ch 3.1_3
Continuous random variable x - 25
0.25
Probability that x is between a and b x
𝑏 0.2

Pr 𝑎 < 𝑥 < 𝑏 = න 𝑝𝑥 (𝑥) 𝑑𝑥 x


𝑎 px(x) 0.15
and of course
+∞ 0.1

න 𝑝𝑥 (𝑥) 𝑑𝑥 = 1
0.05
−∞
Average value of x 0
+∞ -2 0 2 4 6 8 10 12 14
a b
𝑥 = න 𝑥 𝑝𝑥 (𝑥) 𝑑𝑥 = 𝜇𝑥 x
−∞
Gaussian pdf (a.k.a. normal pdf)
Standard deviation of x
+∞

𝜎𝑥2 = 𝑥− 𝑥 2 = න 𝑥− 𝑥 2 𝑝𝑥 (𝑥) 𝑑𝑥
1 − 𝑥−𝜇𝑥 2 / 2𝜎𝑥2
𝑝𝑥 (𝑥) = 𝑒
+∞
−∞ 𝜎𝑥 2𝜋
= න 𝑥 2 𝑝𝑥 (𝑥) 𝑑𝑥 − 𝑥 2 = 𝜇𝑥,2 − 𝜇𝑥2
−∞
The Q function (2/2)
Ch 3.1_3
∞ - 26
1 −𝑥 2 /2
𝑄(𝑧) = න 𝑒 𝑑𝑥
2𝜋
𝑧
1 𝑧
= erfc
2 2

Chernoff bound:
1 2 /2
𝑄(𝑧) ≤ 𝑒 −𝑧
𝑧 2𝜋
Q(6)=10-9
Q(7)=10-12 𝑆
𝑃𝑒 = 𝑄
𝑁 𝑖𝑛

Figure B-7 - Digital and analog communication systems, Leon Couch, 8th edition
Bit error probability for binary reception Ch 3.1_3
- 27
decision circuit
r(t) xk=r(kTs)
+ 𝑠ෝ𝑘
kTs  

D -
V0 D V1 x

• noisy received binary signal r(t) Average bit error probability


• received signal:
equiprobable binary levels 𝑃𝑒 = Pr( 0) ⋅ Pr( 𝑥 > 𝐷 ȁ 0) + Pr( 1) ⋅ Pr( 𝑥 < 𝐷 ȁ 1)
V0 for logical “0” 1 𝐷 − 𝑉0 1 𝑉1 − 𝐷
V1 for logical “1” = 𝑄 + 𝑄
2 𝜎 2 𝜎
• received noise: Gaussian pdf, standard deviation  Decision threshold
• decision threshold D 1
• estimate 𝑠ෝ𝑘 for sent symbol sk 𝐷= 𝑉 + 𝑉1
2 0
Pr( 𝑥 > 𝐷ȁ 0) = Pr 𝑛 > (𝐷 − 𝑉0 ) 1
∞ ∞ 𝐷 − 𝑉0 = 𝑉1 − 𝑉0
= න 𝑝𝑛 (𝑥) 𝑑𝑥 =
1
න exp −𝑥 2 /2𝜎 2 𝑑𝑥
2
𝜎 2𝜋 1
𝐷−𝑉0 𝐷−𝑉0 𝑉1 − 𝐷 = 𝑉1 − 𝑉0
1

𝑥 1
∞ 2 𝑉1 − 𝑉0
= න exp −𝑥 2 /2𝜎 2 𝑑 = න exp −𝑦 2 /2 𝑑𝑦 𝑃𝑒 = 𝑄
2𝜋 𝜎 2𝜋 2𝜎
𝑥=𝐷−𝑉0 𝑦=(𝐷−𝑉0 )/𝜎
𝐷 − 𝑉0
=𝑄 𝑆
𝜎 =𝑄
Signal-to-noise improvement of PCM
Ch 3.1_3
- 28

⚫ Analog baseband reception: 𝑆 𝑆𝑖𝑛 𝑆


so approximately the S/N is maintained = ≈
𝑁 𝑖𝑛
𝑁0 𝐵 𝑁 out
(N0 : noise power density [W/Hz] )

⚫ PCM reception: 𝑆 𝑆𝑖𝑛


𝐵PCM = 𝑛𝐵 =
𝑁 𝑖𝑛
𝑛𝑁0 𝐵
𝑆
𝑃𝑒 = 𝑄
𝑁0 𝑛𝐵

𝑆 22𝑛
For M = 2n >> 1 : ≈
𝑁 out 1 + 4𝑃𝑒 22𝑛

→ with PCM the (S/N)out can be much higher than (S/N)in


as long as Pe stays negligible
Exam question 2018
Ch 3.1_3
- 29

Question 1 (30 pts) - continued

The PCM transmission system is designed to deliver a signal to noise ratio of 25. If
the noise spectral density is given to be 10-12 Watt / Hz and the transmission system
has an attenuation of 36dB.

6. What is the required transmission power?


7. What is the probability of error for the signal coming into the receiver? How many
errors will happen on average when sending 10Mbits?
8. What is the signal to noise at the output of the PCM receiver circuit?
9. Would increasing the number of quantization levels improve the performance of
the system?

5-10-2022 PAGE 29
Solve
Ch 3.1_3
- 30

A music signal with a spectrum of 20KHz is transmitted using PCM over a baseband channel.
The audio signal is optimally sampled and transmitted. During the transfer of signals between
the transmitter and receiver white Guassian noise is added. If n=9 is used for quantization and
the SNR at the output is 47dB. Assume that the signal is uniformly distributed.
a. What is the probability of errors Pe of the PCM bit steam at the entrance to the PCM
receiver?
b. Thermal noise is given as -174dBm/Hz. If this is the only noise in the analog part of the
system, what is the total noise power assuming an ideal low pass filtering at the input to the
receiver?
c. What is the SNRin that is related to the Pe computed in a)?
d. How much signal power is present at the input under these conditions?
e. Would increasing the number of quantization levels improve the output SNR? What is the
maximum SNR achievable at the output?
f. If we want to reach SNRout > 80dB what would that imply for the Pe and respective SNRin?

5-10-2022 PAGE 30
Signal-to-noise improvement of PCM
Ch 3.1_3
- 31

n=8
M=2n
n=7

n=6

10 log10 M2
n=5 = 20 log10 n
[dB]

𝑆 𝑀2 𝑆
= 𝑃𝑒 = 𝑄
𝑁 out 1 + 4𝑃𝑒 𝑀2 − 1 𝑁 𝑖𝑛
Max. PCM Signal-to-Noise ratio
Ch 3.1_3
- 32
Maximum value of average output S/N, if Pe negligible:
𝑆 𝑺
= 𝑀2 ⇒ in dB: = 𝟔. 𝟎𝟐 × 𝒏 [dB] ( M=2n )
𝑁 out 𝑵 out, dB

→ 6 dB S/N improvement per added PCM word bit

N.B. Valid only if distribution of signal is uniform over interval -V to +V,


i.e. rms value of signal is V /3
𝑆 𝑆
= 3𝑀2 ⇒ in dB: = 6.02 × 𝑛 + 4.77 [dB]
𝑁 pk out 𝑁 pk out, dB

𝑆
In general: = 6.02 × 𝑛 + 𝛼 [dB]
𝑁 out, dB

where 10 log 3 = 4.77, depending on the range used of the ADC
4 types of Quantising noise
Ch 3.1_3
- 33

⚫ Overload noise: large input signals exceeding the ADC range →


flat tops in the recovered signal
⚫ Random noise: quantisation causing normal signals / round-off
errors, for normal input signals within the ADC range
⚫ Granular noise: for signals relatively small in comparison to the
quantisation levels (decreases with more quantising levels, or non-
linear quantisation)
⚫ Hunting noise: for nearly-constant input signals, may cause
oscillating quantiser
Idle-channel noise: no signal / hunting around zero
PCM signal for telephone systems
Ch 3.1_3
- 34
Example 3-1:
⚫ Voice signal 300-3400 Hz
⚫ Sampling freq. 8 kHz
⚫ 8 bits / sample

Questions:
⚫ minimum sampling frequency needed ? 6.8 k samples/s
⚫ bitrate used ? R=64 kbit/s
⚫ symbol rate ? 64 kBaud for binary symbols (1 bit/symbol)
⚫ minimum bandwidth required ? Bmin=R/2=32 kHz
⚫ for which pulse shape ? for sinc pulse
⚫ bandwidth for rectangular pulse ? BPCM=R=64 kHz (1st null of sinc spectrum)
⚫ peak S/N ? (S/N)peak=3 M2 = 3·(28)2 = 52.9 dB
10∙log(3∙216) = 4.77+16∙3.01 = 52.9 dB
Non-uniform quantising
Ch 3.1_3
- 35

To avoid
- small-signal granularity
- large-signal overload
use a variable step size
(by compressing non-linear amplifier,
followed by PCM uniform quantiser)
Usual method:
- companding at the transmitter
⚫ -law
⚫ A-law

At receiver: expansion

Figure 3-9a Digital and analog communication systems, Leon Couch, 8th edition
µ-law compression
Ch 3.1_3
- 36
⚫ in US, Canada, Japan

ln 1 + 𝜇 𝑤1 𝑡
𝑤2 𝑡 =
ln 1 + 𝜇

𝜇
Slope for w1= 0:
ln 1 + 𝜇

𝑤1 𝑡 = 1 ⇒ 𝑤2 𝑡 = 1

⚫ use  = 255
⚫ piece-wise linear approx. of curve, and per piece
16-steps uniform quantisation

Figure 3-9b Digital and analog communication systems, Leon Couch, 8th edition
A-law compression
Ch 3.1_3
- 37

⚫ in Europe

𝑤2 𝑡
𝐴 𝑤1 𝑡 , 1
0 ≤ 𝑤1 𝑡 ≤
1 + ln 𝐴 𝐴
=
1 + ln A w1 𝑡 1
, < 𝑤1 𝑡 ≤1
1 + ln 𝐴 𝐴

1 𝐴
Slope for 𝑤1 ≤ ∶
𝐴 1 + ln 𝐴

Figure 3-9c Digital and analog communication systems, Leon Couch, 8th edition
Piecewise linear compression
Ch 3.1_3
- 38

for approximating the -law


or A-law curves

Figure 3-9d Digital and analog communication systems, Leon Couch, 8th edition
S/N ratio for companded PCM
Ch 3.1_3
- 39

𝑆
= 6.02 × 𝑛 + 𝛼 [dB]
𝑁 out, dB

Uniform quantising:
𝑉 𝑉
𝛼 = 4.77 − 20log( ) (-7.3 for = 4 , i.e. loading factor = 4)
𝑥𝑟𝑚𝑠 𝑥𝑟𝑚𝑠

µ-law companding:
 = 4.77 - 20 log[ln(1+µ)] (-10 for µ = 255)

A-law companding:
 = 4.77 - 20 log[1+ln A] (-10 for A = 87.6)
Output SNR of 8-bit PCM systems with and without companding
Ch 3.1_3
- 40

With companding, output SNR is relatively


insensitive to input level

Figure 3 – 10 Digital and analog communication systems, Leon Couch, 8th edition

You might also like