EE534 Line Codes
EE534 Line Codes
virtually error-free
signal noise signal + noise
Low
SNR
error-prone
Average Signal Power
SNR =
Average Noise Power
5
Shannon Channel Capacity
• If transmitted power is limited, then as M increases spacing
between levels decreases
• Presence of noise at receiver causes more frequent errors to
occur as M is increased
7
Example
• Consider a 3 kHz channel with 8-level signaling.
Compare bit rate to channel capacity at 20 dB SNR
• 20 dB SNR means 10 log10 S/N = 20
Implies S/N = 100
• Shannon Channel Capacity is then
C = 3000 log2 ( 1 + 100) = 19, 974 bits/second
3KHz telephone channel with 8 level signaling
Bit rate = 2*3000 pulses/sec * 3 bits/pulse = 18 kbps
It is within the Shannon's upper data rate limit.
8
Encoding and Modulation
Techniques
Data Encoding: Mapping of
Encoder Decoder
information into sequence Baseband
of digital signals Transmission
Modulation: Embedding of
information into sinusoidal
waveforms Modulation Demodulation
Carrier
Frequency
Modulation
f f
0 B 0 B
All frequencies in range (0, B) are
passed with same attenuation Frequency Spectrum is not ideally
Flat Frequency Spectrum flat
Channel Bandwidth (Bandpass
Channel)
fc - ½B fc fc+½B f fc - ½B fc+½B f
fc
Frequency Spectrum is not ideally
Flat Frequency Spectrum
flat
Why Line Coding and Modulation?
–
Need to find a proper digital signal to represent
the data bits (0 and 1) in baseband transmission
Line Coding
–
Need to find a proper analog representation (i.e.
modulated carrier) of data bits for bandpass
transmission Modulation
Line Codes
Design considerations in Line Coding
•
Transmitted power Low power consumption desirable
•
Bit timing Transitions in signal help timing recovery
•
Bandwidth efficiency Excessive transitions wastes BW
•
Low frequency content Try to avoid signals with high DC content
• Some channels block low frequencies (i.e. at or near DC)
• In such channels, long periods of +A or of –A causes signal to
“droop”
•
Error detection Ability to detect errors helps
•
Complexity/cost Low cost implementations (e.g. on a chip)
desirable
Line Coding Formats
• The various line coding waveforms can be
categorized in terms of the following.
– The duration of the pulses.
– The way in which voltage levels are assigned to
the pulses.
Pulse Duration
• There are two classes used here.
– Non return-to-zero (NRZ) where the pulse or
symbol duration Ts = the bit period Tb.
– Return-to-zero (RZ) where the pulse or symbol
duration Ts < the bit period Tb. Usually Ts =
0.5Tb.
• The pulse duration will usually have an effect on
the synchronization properties of the line code
(i.e., it determines the presence or absence of a
frequency component at the clock frequency).
Pulse Voltage Levels
• There are many voltage level formats possible:
– Unipolar
– Polar
– Dipolar
– Bipolar
– Coded Mark Inversion (CMI)
Some Simple Line Coding Schemes
1 0 1 0 1 1 1 0 0
+ + + + +
Unipolar o o
NRZ
+ + + + +
Polar NRZ
- -
NRZ-inverted
(differential
encoding)
+ + +
Bipolar o o o o
encoding
- -
Manchester
encoding
Differential
Manchester
encoding
Unipolar Signalling
• Unipolar signalling (also called on-off keying, OOK) is the
type of line coding in which one binary symbol
(representing a 0 for example) is represented by the
absence of a pulse (i.e. a SPACE) and the other binary
symbol (denoting a 1) is represented by the presence of a
pulse (i.e. a MARK).
1T s
0 1 0 1 1 1 1 1 0
V
0
Unipolar NRZ
Advantages:
• Simplicity in implementation.
• Doesn’t require a lot of bandwidth for transmission.
Disadvantages:
• Presence of DC
• Contains low frequency components.
• Does not have any error correction capability.
• Does not posses any clocking component for ease of
synchronisation.
• Is not Transparent. Long string of zeros causes loss of
synchronisation.
Unipolar Return to Zero (RZ)
In unipolar RZ the duration of the MARK pulse (Ƭ ) is less
than the duration (Ts) of the symbol slot. Typically RZ
pulses fill only the first half of the time slot, returning to
zero for the second half.
1 0 1 0 1 1 1 0 0 0
Ts
Ƭ
Unipolar Return to Zero (RZ)
Advantages:
• Simplicity in implementation.
• Presence of a spectral line at symbol rate which
can be used as symbol timing clock signal.
Disadvantages:
• Presence of DC level (indicated by spectral line
at 0 Hz).
• Does not have any error correction capability.
• Occupies twice as much bandwidth as Unipolar
NRZ.
• Is not Transparent
Polar Signalling
In polar signalling a binary 1 is represented by
a pulse g1(t) and a binary 0 by the opposite (or
antipodal) pulse g0(t) = -g1(t). Polar signalling
also has NRZ and RZ forms.
Polar NRZ
1 0 1 0 1 1 1 1 1 0
+V
-V
Polar RZ
1 0 1 0 1 1 1 0 0 0
+V
-V
Polar NRZ
Advantages:
• Simplicity in implementation.
Disadvantages:
• Does not have any error correction capability.
• Does not posses any clocking component for
ease of synchronisation.
• Is not transparent.
Polar RZ
Advantages:
• Simplicity in implementation.
• No DC component.
Disadvantages:
• Occupies twice as much bandwidth as Polar
NRZ.
BiPolar Signalling
• Bipolar Signalling is also called “alternate mark inversion”
(AMI) uses three voltage levels (+V, 0, -V) to represent two
binary symbols. Also known as pseudoternary signalling.
• Zeros are represented by the absence of a pulse and ones
are represented by alternating voltage levels of +V and –V.
• Alternating the mark level voltage ensures that the bipolar
spectrum has a null at DC
• The alternating mark voltage also gives bipolar signalling a
single error detection capability.
• Like the Unipolar and Polar cases, Bipolar also has NRZ and
RZ variations.
BiPolar NRZ
1 0 1 0 1 1 1 1 1 0
+V
-V
BiPolar RZ
1 0 1 0 1 1 1 1 1 0
+V
-V
BiPolar NRZ (RZ)
Advantages:
• No DC component.
• Occupies less bandwidth than unipolar and
polar NRZ (RZ) schemes.
• Possesses single error detection capability
Disadvantages:
• NRZ does not posses any clocking component
for ease of synchronisation.
• Is not Transparent.
B8ZS
• Bipolar With 8 Zeros Substitution
• Based on bipolar-AMI
• If octet of all zeros and last voltage pulse preceding was
positive encode as 000+-0-+
• If octet of all zeros and last voltage pulse preceding was
negative encode as 000-+0+-
• Causes two violations of AMI code
• Unlikely to occur as a result of noise
• Receiver detects and interprets as octet of all zeros
HDB3
• High Density Bipolar 3 Zeros
• Based on bipolar-AMI
• String of four zeros replaced with one or two pulses
0 0
1 AMI
0000 000V
– Voice – ISDN
– Data - WDDS
– Interconnect - Megalink
WDDS-Wideband
digital data service
B8ZS and HDB3
Dipolar Signalling
• Dipolar coding is designed to produce a spectral
null at 0 Hz, i.e. no dc component.
• The symbol interval Ts is split into half-width
pulses.
• An example of dipolar coding is the Manchester
code
Manchester Signalling
• In Manchester encoding , the duration of the
bit is divided into two halves. The voltage
remains at one level during the first half and
moves to the other level during the second
half.
1 0 1 0 1 1 1 1 1 0
+V
-V
1 0 1 1 0 0 0 1 1 1 0
Differential Coding
NRZ-inverted 1 0 1 0 1 1 1 0 0
(differential
encoding)
Differential
Manchester
encoding
an and an k are levels of the data pulses at the nth and (n+k)th symbol positions
Pi Probability of having the ith an an k product
PSD for Unipolar NRZ Signaling
Possible levels for the a’s : +A and 0
I
R(k ) (an an k )i Pi an and an k are the level of the pulses at the nth and ( n k )th symbols
i 1
2 1 1 1
𝑅 0 = 𝑖=0(𝑎𝑛 𝑎𝑛 )𝑖 𝑃𝑖 = 𝐴2 2 + 0 2 = 𝐴2 2
1
𝑅 𝑘 = 𝐴2 Type equation here.
4
𝑡 𝑇𝑏 sin 𝜋𝑓𝑇𝑏
𝑓 𝑡 = ∏ ↔ 𝐹(𝑓) = = 𝑇𝑏 𝑠𝑖𝑛𝑐(𝑓𝑇𝑏 )
𝑇𝑠 𝜋𝑓𝑇𝑏
𝐴2 𝑇𝑏 𝐴2 𝑚
𝑃𝑈𝑛𝑖𝑝𝑜𝑙𝑎𝑟 𝑁𝑅𝑍 𝑓 = 𝑠𝑖𝑛𝑐 2 (𝑓𝑇𝑏 ) + 𝑠𝑖𝑛𝑐 2 (𝑓𝑇𝑏 ) ∞
𝑚=−∞ 𝛿(𝑓 − )
4 4 𝑇𝑏
𝐴2 𝑇𝑏 𝐴2
𝑃𝑈𝑛𝑖𝑝𝑜𝑙𝑎𝑟 𝑁𝑅𝑍 𝑓 = 𝑠𝑖𝑛𝑐 2 (𝑓𝑇𝑏 ) + 𝛿(𝑓)
4 4
PSD for Polar NRZ Signaling
Possible levels for the a’s : +A and -A
I
R(k ) (an an k )i Pi an and an k are the level of the pulses at the nth and ( n k )th symbols
i 1
2
1 1
R (0) (an an )i Pi A2 ( A) 2 A2
i 1 2 2
4
For k 0, R (k ) (an an k ) Pi A21/ 4 ( A)( A)1/ 4 ( A)( A)1/ 4 ( A) 21/ 4 0
i 1
A2 , k 0
R polar (k )
0, k 0
F f
2
sin fTb
2 kfTs
f (t ) (t / Tb ) F ( f ) Tb
fTb
Ps f
Ts
k
R k e
2
sin fTb
PPolar NRZ ( f ) A Tb
2
fTb
Pulse Shape
t
p(t ) NRZ pulse shape
For NRZ Tb
t
For RZ p(t ) RZ pulse shape
Tb / 2
t Tb / 4 t Tb / 4
Manchester p(t )
b T / 2 b T / 2
2
A 2Tb sin fTb 1
Punipolar NRZ ( f ) 1 ( f )
4 fTb Tb
For normalized average power to be unity, A= 2
1
R is the bit rate.
Tb
2
sin fTb
Ppolar NRZ ( f ) A Tb
2
fTb
For normalized average power to be unity, A =1
A Tb sin f b Tb 2
2
2
Pbipolar RZ ( f ) sin f b Tb
2
4 f Tb 2
For normalized average power to be unity, A= 2
sin f b Tb 2
2
f Tb 2
For normalized average power to be unity, A=1
PSD for line codes
Unipolar NRZ
2
A2Tb sin fTb 1
PUni. NRZ ( f ) 1 ( f )
4 fTb Tb
Polar NRZ
2
sin fTb
PPolar NRZ ( f ) A2Tb
fTb
Bipolar RZ 2
A Tb sin fTb
2
PBipolar RZ ( f ) sin fTb
2
4 fTb
Manchester
NRZ
2
sin fTb / 2
PManch. NRZ ( f ) A2Tb sin fTb / 2
2
fTb / 2
Frequency division
of transmission
bandwidth into
Each frequency frequency
channel occupies a channels
fraction of the
transmission
bandwidth all the time
Frequency Division Multiplexing
•
(FDM)
Useful bandwidth of medium exceeds required bandwidth of signals to be
transmitted
• Each signal is modulated to a different carrier frequency
• Carrier frequencies sufficiently separated so signals do not overlap (guard
bands)
– Each frequency band is referred as a channel
• Channel allocated even if no data transmission
• Signal transmitted is analogue
A
f Signals separated by guard
0 Wu
bands fit into channel
B bandwidth, W>>Wu
0 Wu f
B
f A C f
0 C Wu 0 W
53
Synchronous Time Division
Multiplexing
Time