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

COMMONWEALTH OF AUSTRALIA

Copyright Regulations 1969

WARNING

This material has been reproduced and communicated to you by or on


behalf of Swinburne University of Technology pursuant to Part VB of the
Copyright Act 1968 (the Act).

The material in this communication may be subject to copyright under the


Act. Any further reproduction or communication of this material by you may
be the subject of copyright protection under the Act.
Do not remove this notice.

TNE30003
Communication Principles
Pulse Code Modulation
Tony Cricenti

L11
Updated March 2018
Aims

• Describe Pulse Code Modulation (PCM).


• Describe Quantisation.
• Describe Companding.
• Determine the minimum Bandwidth of a
PCM Signal.
• Describe some of the line codes used in
digital modulation.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 2


Pulse Code Modulation (PCM).

• If a signal is sampled we have a PAM


signal.

• If we assign a code (binary number) to


each sample then we have Pulse Code
Modulation (PCM).

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 3


Pulse Code Modulation (PCM).

• Why PCM?
– PCM uses digital electronic circuits, easy
and inexpensive to design and build.
– The pulses can be easily regenerated since
they are digital signals.
– We can employ powerful error correction
techniques.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 4


Pulse Code Modulation (PCM).

• To convert a PAM signal to PCM we employ a


Quantiser and an Encoder. (Analogue to digital
converter).

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 5


Quantisation

• In order to have a finite number of codes


to represent the samples of the PAM
signal, we must limit the possible values
of the samples.

• A Quantiser is used to limit the number


of possible levels of the samples.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 6


Quantisation
• Assume that the signal to be quantised has an
amplitude limited to: − A < x(t ) < + A
• That is, the range of
amplitude is divided into
Amin < x(t ) < Amax
M intervals or steps of
M = Number of discrete levels
equal size. (called
Arange A − Amin
Uniform Quantisation). Step size, d = = max
M M
• Each of M intervals is A − (− A) 2 A
= =
assigned with a M M
quantization level. Thus,
there are M discrete
levels.
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 7
Quantisation

Quantisation
interval
Samples Original Signal
+A
Step size is
d=2A/M
d

Quan
tisati
on
-A levels

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 8


Uniform Quantisation
• The transfer characteristic of the uniform quantiser is
shown: Output
7d/2
5d/2
3d/2
d/2
Input
-4d -3d -2d -d d 2d 3d 4d
-d/2
-3d/2
-5d/2
-7d/2

• In this case, the sample amplitude value is approximated by the


midpoint of the interval in which it lies.
• Therefore, it is called mid-point quantization.
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 9
Uniform Quantisation

• The following diagram shows how the uniform quantiser works:


Output
7d/2
5d/2 Samples after
3d/2
quantisation

d/2
Input
-4d -3d -2d -d d 2d 3d 4d
-d/2
-3d/2

-5d/2

-7d/2

Input Samples

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 10


Quantisation Error

• The uniform quantiser produces an error between


the original signal and output signal
error

error

Input Samples Samples after


quantisation
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 11
Quantisation Error

• The error depend on the step size. Smaller the step size
d, smaller the quantization error.
• Maximum quantisation error = half the voltage of LSB
= d/2.
• The quantiser S/N ratio = 6m – 7.25 dB, where m =
number of bits in each sample.
• The percent of error is large for small-value samples
compared to large-value samples.
• One way to reduce this is to use non-uniform quantiser.
Here, we make smaller step size for small amplitudes
and larger step size for larger amplitudes.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 12


Non-uniform Quantisation
• It may be difficult to produce a non-uniform quantiser,
so a different technique which achieves the same effect
is used.
• The input signal is distorted before quantising, by
compressing the large amplitudes, but not the small.
Output
1
Before
Uniform Quantization

Input
1

Non-uniform

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 13


Companding
• When recovering the signal, the distortion must be
undone, therefore we must uncompress or expand
the recovered signal.
• The process of compressing and expanding the
signal is called companding.
• Two popular forms:
– A Law - European Standard and RoW
– µ Law - US standard

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 14


Companding
• A Law: European Standard and Rest of the World (except USA)

1  A xnorm 
if 0 ≤ xnorm < then xcomp = sgn( xnorm )  
A  (1 + ln( A)) 

1  (1 + ln A xnorm ) 
if ≤ xnorm ≤ 1 then xcomp = sgn( xnorm )  
A  (1 + ln( A)) 
where:
• xnorm is normalized input signal (-1.0 to +1.0)
• xcomp is compressed output value
• A= compression parameter (=87.6)
• sgn(x) is sign function.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 15


Companding

• µ Law (USA standard)

 ln(1 + µ xnorm ) 
xcomp = sgn( x)  
 ln(1 + µ ) 
where:
• xnorm is normalized input signal
• xcomp is compressed output value
• µ= compression parameter (=255)
• sgn(x) is sign function.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 16


Encoding

• The encoder translates the quantised samples into a


coded number, usually binary. (Binary PCM).
• Note that for M quantising levels, we require n bits
in the code word.
• Where n is given by: n = Log 2 M or
M = 2n
• Here n must be an integer, i.e. the number of bits.
• In practice, common values of n are 8, 10, 12 and
16 bits, giving 256, 1024, 4096 & 65536
quantising levels, respectively.
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 17
Example
• Assume that we have a signal whose amplitude is confined
to the range -8 to +8V, a uniform quantiser is available with
step size of 2 V.
• The signal to be converted to PCM is shown below.
• How many bits are required for the PCM code numbers and
what are the encoded samples?
+8
+6
+4
+2
0

Signal

-8
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 18
Example
• Number of Quantisation levels M=2A/d=2x8/2=8
• Therefore the number of bits in the PCM word is
n=Log2M=log28 =3 bits
Quantised Quantisation Quan
Samples interval tisati
on
+8
7 levels
Signal +6
6
+4
5
Samples +2
4
0
3
2
1
Sampled Value:
Sampled Value:
Sampled 5.4
-4.1
Value: 1.2
0.5
-3.2 0
Quantised
Quantised Value:
Value: 151-5
Quantised Value: -3 -8
Code Number:
CodeNumber:
Code Number: 46412
Binary:
Binary:
Binary: 110
100001
100
010
Code Number
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 19
Example
• Signal: Amin= -8 V, Amax= 8 V
• Range = Amax – Amin = 8 – (-8) = 16 V Sampled Value: -3.2
Quantised Value: -3
• M = Number of Quantisation levels=8 Code Number: 2
• d = Range/M =16/8 = 2 V Binary: 010
• Number of bits in the PCM word= 3
x q = Amin + (2k + 1)(d / 2)
x s = −3.2
k = decimal code number
x1 = x s / d = −3.2 / 2 = −1.6.
− 3 = −8 + (2k + 1) /( 2 / 2)
Therefore,
5 = 2k + 1; k = 2
x q = lie between − 1d to − 2d
Binary number = 010
= −2 and − 4V
x q = mid - value = −3V % Error =
− 3.2 − (−3.0)
× 100 = −20/3.2 = −6.25%
3.2
Find for xs = 5.4 V
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 20
Minimum Bit Rate of PCM System

• To determine the minimum bit rate rb required for a


PCM system let us assume the following:
• The signal has a bandwidth W.
• The signal is sampled at the Nyquist Rate.
• The quantizer has M quantising levels.
• Since we have M quantising levels, we need n=Log2M
bits to be transmitted for each sample.
• Since we sample at fs samples per second, nfs bits must
be transmitted per second.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 21


Minimum Bit Rate of PCM System
• Sampling at the Nyquist Rate implies that fs=2W.
• So nfs= n2W = Log2M . 2W
• Therefore, rb = nfs (the bit rate, in bits per
second (bps)).
• The minimum bit rate is rb = 2nW.

• Usually the bit rate will be higher, since we


usually sample at more than the Nyquist rate.
• Therefore: rb ≥ 2nW

22
Department of Telecommunications, Electrical and Robotics Engineering TNE30003
Minimum Bit Rate of PCM System

• Once the bit rate is known then the


transmission BW, BT can be estimated using:
k1
BT =
τ
where, k1 = ½.
τ = bit width.
When bit width = Tb (bit period), then
τ = 1/rb.
In such case, BT = rb/2.

23
Department of Telecommunications, Electrical and Robotics Engineering TNE30003
Bit Rate: Example
• What is the bit rate required to transmit voice
(W=3.5 kHz) over a telephone channel if 1024
quantisation levels are used?
• The minimum sampling frequency fs is:
• fs=2W=7 kHz = 7000 samples/s
• The number of bits required to obtain 1024
levels is n=Log2M=Log21024=10 bits.
BT = rb/2
• Therefore, the minimum rb =nfs
=10x7000 =70 kbps = 70,000 bps.
• In practice, we usually use 8 bits and fs =8 kHz.
• In such case the rb =8x8=64 kbps = 64,000 bps
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 24
Baseband Signaling Format - Line Codes
• Digital data (binary) can be sent through a pair of
telephone lines, in a variety of ways, these are
generally termed as line codes.
• Traditionally the binary digits were called:
– Mark: Binary 1
– Space: Binary 0
• There are several line codes to represent a Mark and
a Space. We will only look a selected set.
• These line codes can be transmitted directly through
wires, e.g., telephone lines, LAN and WAN.
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 25
Baseband Signaling Format - Line Codes
Desirable features of Line codes:
• Transparency:
• System can convey any bit sequence without causing
problems.
• Should have strong bit timing.
• help to detect the pulses at the receiver, e.g., long strings
of marks or spaces should not cause any problem.
• No DC and low frequency components in spectrum.
• use of ac coupling and transformer in transmission line
will cause problem
• Bandwidth efficiency
• Error detection capability
Ref: Mesiya 9.2.
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 26
Baseband Signaling Format - Line Codes

• NRZ: Not Return to Zero


• Full-bit Width
• τ = Tb
where, Tb is bit width.

• RZ: Not Return to Zero


• Half-bit Width
• τ = Tb/2
where, Tb is bit width.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 27


Unipolar Non Return to Zero NRZ
• Unipolar NRZ: Here a mark is represented by a
constant amplitude pulse for the entire bit
interval.
• The space is represented by not sending a pulse.
• Example Unipolar NRZ representation of binary
stream 101 100 11:

A 1 0 1 1 0 0 1 1 Unipolar NRZ
0
t

Tb, Bit interval

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 28


Bipolar Non Return to Zero NRZ

• Bipolar NRZ: Here a mark is represented by a


constant +ve amplitude pulse for the entire bit
interval.
• The space is represented by a constant -ve
amplitude pulse for the entire bit interval.
• Example Bipolar NRZ representation of binary
stream 101 100 11:
1 0 1 1 0 0 1 1 Bipolar NRZ
A
-A
t

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 29


Unipolar Return to Zero RZ
• Unipolar RZ: Here a mark is represented by a
positive pulse that returns to zero before the end
of the bit interval.
• The space is represented by not sending a pulse.
• Example Unipolar RZ representation of binary
stream 101 100 11:

1 0 1 1 0 0 1 1 Unipolar RZ

t
Tb
RZ at mid-bit -interval
Department of Telecommunications, Electrical and Robotics Engineering TNE30003 30
Bipolar Return to Zero RZ
• Bipolar RZ: Similar to Unipolar RZ, except the
space is represented by a negative pulse.
• Example Bipolar RZ representation of binary
stream 101 100 11:

1 0 1 1 0 0 1 1 Bipolar RZ

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 31


Alternate Mark Inversion AMI
• AMI: Here alternating +ve and -ve pulses are
used to represent the mark.
• The space is represented by not sending a pulse.
• Example AMI representation of binary stream
10110011:

1 0 1 1 0 0 1 1 AMI

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 32


Split-Phase (Manchester)

• Manchester: The mark is represented by a +ve


going edge in the middle of bit interval (-A → +A).
• The space is represented by a -ve going edge in the
middle of bit interval (+A→-A).
• Note: Mesiya has opposite convention.
• Example Manchester representation of binary
stream 010 011 00:
0 1 0 0 1 1 0 0 Manchester

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 33


Spectra of Line codes
• We see that NRZ has the least bandwidth, but has a large
dc component.
• Bipolar RZ, AMI, and Manchester has no dc component.

Bipolar RZ , AMI
Mesiya p.504

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 34


Comparison of Line Codes
• The Bipolar, AMI and Manchester signaling formats
have the advantage of minimizing the DC offset
(Average value) on the line.
• The advantage of the RZ forms is that the bit
interval can be estimated.
• Errors can be detected in AMI, for example two
successive +ve pulses.
• Manchester has at least one transition per bit
interval, therefore the “clock” frequency can be
derived from the data stream. But requires more
BW.
• NRZ formats require less bandwidth than RZ.

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 35


Spectral Efficiency- Line Codes
• Spectral efficiency,η shows Digital Null η
how efficiently the Modulation BW
transmission channel NRZ unipolar rb 1
allocated BW is utilized by
the digital system.
NRZ bipolar rb 1
• A digital modulation
system transmits data at a RZ Bipolar rb 1
rate of rb bps using (AMI)
bandwidth of a channel, B. Manchester 2rb 1/2
• Then, η = rb/B bps/Hz
Contains 90% of
signal power.
Ref: Mesiya p.506

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 36


Eye Diagrams
• Eye Diagram can be constructed by displaying the
received digital bit stream on an oscilloscope:
(consider bipolar NRZ).
Display 1’s

Bit Time

Display 0’s
Note pulse will not rectangular due to transmission limitations (think about it!!!)

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 37


Eye Diagrams

• The Eye Diagram is used to visualize the limitations of


the transmission channel.
ISI
Noise Timing
Margin Jitter

Decision Level

1st Pulse
2nd Pulse
Optimum
sampling time 38
Department of Telecommunications, Electrical and Robotics Engineering TNE30003
References
• Mesiya 8.4 9.2
• Carlson: 12.1

Department of Telecommunications, Electrical and Robotics Engineering TNE30003 39

You might also like