0% found this document useful (0 votes)
46 views66 pages

EE534 Line Codes

1. Data communication networks digitally represent analog signals through sampling, quantization, and compression techniques like pulse code modulation and differential coding. 2. Channel noise can introduce errors, with the reliability depending on the signal-to-noise ratio. The Nyquist theorem and Shannon capacity theorem determine the maximum theoretical data rates. 3. Common encoding and modulation techniques include line coding formats like unipolar, polar, and bipolar signaling that map digital bits to voltage levels, as well as baseband and carrier modulation for different channel types.

Uploaded by

Nitesh agrahari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views66 pages

EE534 Line Codes

1. Data communication networks digitally represent analog signals through sampling, quantization, and compression techniques like pulse code modulation and differential coding. 2. Channel noise can introduce errors, with the reliability depending on the signal-to-noise ratio. The Nyquist theorem and Shannon capacity theorem determine the maximum theoretical data rates. 3. Common encoding and modulation techniques include line coding formats like unipolar, polar, and bipolar signaling that map digital bits to voltage levels, as well as baseband and carrier modulation for different channel types.

Uploaded by

Nitesh agrahari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Data Communication Networks

Dr. Sonali Chouhan


Dept of EEE, IITG
Digital Representation of Analog
Signals
Digitization of Analog Signals
1. Sampling: obtain samples of x(t) at uniformly
spaced time intervals
2. Quantization: map each sample into an
approximation value of finite precision
– Pulse Code Modulation: telephone speech
– CD audio
3. Compression: to lower bit rate further, apply
additional compression method
Differential coding: cellular telephone speech
Subband coding: MP3 audio
Channel Noise affects Reliability
signal noise signal + noise
High
SNR

virtually error-free
signal noise signal + noise
Low
SNR
error-prone
Average Signal Power
SNR =
Average Noise Power

SNR (dB) = 10 log10 SNR


4
Nyquist Theorem
Nyquist Theorem: maximum rate at which digital
data can be transmitted over a channel of
bandwidth B [Hz] is
C = 2xBxlog2M [bps]
• M is a number of levels in digital signals
• Theoretical limit

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

• Shannon Channel Capacity:


The maximum reliable transmission rate over an ideal
channel with bandwidth W Hz, with Gaussian distributed
noise, and with SNR S/N is
C = W log2 ( 1 + S/N ) bits per second

• Reliable means error rate can be made arbitrarily small by


proper coding 6
Data Rate Limit

In practice we need to use both Nyquist and
Shannon to find what data rate and signal
levels are appropriate for each particular
channel
• The Shannon capacity gives us the upper limit!
• The Nyquist formula tells us how many levels
we need!

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

Use baseband transmission (data encoding) when


using a baseband channel and carrier frequency
modulation when using a bandpass channel
Channel Bandwidth (Baseband
Channel)
x(t) = Ai Channel Y(t) = Ao
cos(2πft) cos(2πft+φ(f))
A(f)=Ao/Ai

Ideal Baseband Real Baseband


channel channel
A(f) A(f)

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)

Ideal Bandpass Real Bandpass


channel channel
A(f) A(f)

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).

• There are two common variations of unipolar signalling:


Non-Return to Zero (NRZ) and Return to Zero (RZ).
Unipolar Non-Return to Zero (NRZ)
In unipolar NRZ the duration of the MARK pulse (Ƭ ) is
equal to the duration (Ts) of the symbol slot.

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

Transmitted Data HDB3 Encoding

0 0

1 AMI

0000 000V

0000 0000 000V B00V


HDB3
Rules for HDB3 coding
• More than three consecutive zeros are not allowed
to be present. For the fourth ‘0’ introduce a
Violation bit.
• Two consecutive violation bits has to be of
opposite polarity.
• If the number of marks between two consecutive
violation bits is even the format should be B00V
• If the number of marks is an odd number the
format should be 000V
HDB3
• HDB3 provides several advantages over early
systems
– No DC component to data signal enabled power
feeding of repeaters
– Network synchronisation maintained
– Data errors easily detected.
What is HDB3 used for
• HDB3 has been used since the late 1960’s as the signalling
method for 2 Megabit/sec digital systems from exchange to
exchange or exchange to end customer premise.

• These systems support

– 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.

A ‘One’ is +A/2 in 1st half and –A/2 in 2nd half.

A ‘Zero’ is –A/2 in 1st half and +A/2 in 2nd


half.
Manchester Signalling

1 0 1 0 1 1 1 1 1 0

+V

-V

Note: There is always a transition at


the centre of bit duration.
Manchester Signalling

• The transition at the centre of every bit interval is used


for synchronization at the receiver.
• Manchester encoding is called self-synchronizing.
Synchronization at the receiving end can be achieved by
locking on to the transitions, which indicate the middle of
the bits.
Manchester Signalling
Advantages:
• No DC component.
• Easy to synchronise with.
• Is Transparent.
Disadvantages:
• Because of the greater number of transitions it
occupies a significantly large bandwidth.
• Does not have error detection capability.
These characteristic make this scheme unsuitable for use
in Wide Area Networks. However, it is widely used in Local
Area Networks such as Ethernet and Token Ring.
mBnB codes
1 0 1 0 1 1 1 0 0
Manchester
Encoding
(1B 2B code)

• mBnB line code provides increased number of transitions for improved


synchronisation

• Maps block of m bits into n bits; n>m

• Manchester code is 1B2B code

• 4B5B code used in FDDI LAN (Fiber Distributed Data Interface)

• 8B10B code used in Gigabit Ethernet

• 64B66B code used in 10G Ethernet


Coded Mark Inversion (CMI)
• CMI is a variation of the NRZ codes.
• A binary 0 is represented by a polar NRZ code which
uses both amplitude levels (each for half the symbol
period).
• A binary 1 is alternately represented by either
amplitude level (for a full symbol period).
• CMI is therefore a combination of dipolar signalling for
binary 0 and NRZ-AMI for binary 1.
• CMI has spectral null (i.e. no DC component) and
permits clock extraction at the receiver.
Coded Mark Inversion (CMI)

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

• Errors in some systems cause transposition in polarity, +A become –A and


vice versa
• All subsequent bits in Polar NRZ coding would be in error
• Differential line coding provides robustness to this type of error
• “1” mapped into transition in signal level
• “0” mapped into no transition in signal level
• Same spectrum as NRZ
• Errors occur in pairs
• Also used with Manchester coding
Differential Coding
• Advantage of differential encoding is that it is
more reliable to detect a change in polarity
than it is to accurately detect a specific level
Power Spectral Density of Line
Codes
• The output distortion of a communication channel
depends on power spectral density of input signal
• Input PSD depends on
• pulse rate (spectrum widens with pulse rate)
• pulse shape (smoother pulses have narrower PSD)
• pulse distribution
• Distortion can result in smeared channel output;
output pulses are (much) longer than input pulses
• Intersymbol interference (ISI): received pulse is
affected by previous input symbols
Power Spectra for Binary Line Codes
 PSD can be calculated using the autocorrelation function:
 For unipolar NRZ, a digital signal is represented by

𝑡
𝑠 𝑡 = 𝑎𝑛 𝑓 𝑡 − 𝑛𝑇𝑠 ; 𝑓 𝑡 = ∏
𝑇𝑠
𝑛=−∞
f(t) - Symbol Pulse shape; Ts - Duration of one symbol;
Binary signaling : Ts= Tb , Multilevel signaling: Ts= lTb
 PSD depends on:
(1) The pulse shape used
(2) Statistical properties of data expressed by the autocorrelation function
 The PSD of a digital signal is given by:
2

F( f )
Ps ( f ) 
Ts
 R ( k )e
k 
 j 2 kfTs
Where { f (t )}  F ( f )
I
R(k )   (an an  k )i Pi The autocorrelation function of data
i 1

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

PM anchaster NRZ ( f )  A 2Tb   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 

Bit rate: R=1/Tb


PSD for line codes 2
A2Tb  sin  fTb / 2   1 
n 
Unipolar RZ PUni. RZ ( f )  
16   fTb / 2 
 1    ( f  T )
 Tb n  b 

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 

Bit rate: R=1/Tb


Multiplexing
Multiplexing
 Simultaneous sharing of a high
capacity link by many input
channels

The multiplexer The demultiplexer


combines data from n accepts the multiplexed
input lines and data stream, separates
transmits over a the data according to
higher-capacity data channels, and delivers
link. them to the appropriate
output lines.
Key Points
• Multiplexing increase link utilization efficiency
through medium sharing
• Frequency division multiplexing (FDM)
– Bandwidth sharing through frequency allocation

• Time division multiplexing (TDM)


– Channel capacity sharing through time slot allocation
• Synchronous TDM uses fixed assigned time slots

• Asynchronous TDM uses available time slots


Frequency Division

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

Each data channel


Time division of
occupies the full
transmission
transmission
bandwidth into data
bandwidth for an
channels assigned time-slot
TDM Frame
One TDMA Frame

Preamble Information Trail Bits

Slot 1 Slot 2 Slot 3 … Slot N

Guard Sync Control


Bits Bits Bits Information CRC

One TDMA Slot

A Frame repeats in time


TDM System -- Frames
N

Time

 Data are organized into frames


 Each frame contains a cycle of time slots
 In each frame, one or more slots is dedicated to
each data source
 The sequence of slots dedicated to one source,
from frame to frame, is called a channel
 The slot length equals the transmitter buffer
length, typically in units of a bit or a character
Time Division Multiplexing

The T1 carrier (1.544 Mbps).


• T1 transmission system Bell Labs introduced in 1962.
• T-1 greatly increased the number of telephone calls the telephone network
was capable of transmitting at one time.
• Originally the T1 format carried 24 pulse-code modulated, time-division
multiplexed speech signals.
Statistical TDM
• In Synchronous TDM slots are wasted if corresponding
buffer is empty (i.e. that source has nothing to send)
• Statistical TDM allocates time slots dynamically based on
demand
• Time slots available on the TDM frame is less than the
number of input lines
• Multiplexer scans input lines and collects data until frame
full
• On the receiver, the multiplexer receives a frame and
distributes the slots of data to the appropriate output
buffer
• Statistical TDM has more overhead since each slot must
carry its own address information as well as data

You might also like