You are on page 1of 17

Line Codes and Their Spectra

 Types of Line Codes  Comparison of Line Codes  PSD of Line Codes

Eeng 360 1

Line Codes in PCM




The output of an ADC can be transmitted over a baseband channel. channel. The digital information must first be converted into a physical signal. The physical signal is called a line code. Line coders use the terminology mark code. to mean binary one and space to mean binary zero.
Analog Input Signal Sample X Quantize XQ Encode Xk Line Code x(t) PCM signal
Eeng 360 2

ADC

Line codes
1 1 0 1

BINARY DATA

(a) Punched Tape


Volts A

Mark (hole)

Mark (hole)

space

Mark space space Mark (hole) (hole)

(b) Unipolar NRZ

0 Tb A Time

(c) Polar NRZ

-A

(d) Unipolar RZ

(e) Bipolar RZ

0 -A

(f) Manchester NRZ 0


-A

Binary Signaling Formats

EEE 360 3

Goals of Line Coding




A line code is designed to meet several goals:




SelfSelf-synchronization.
The ability to recover timing from the signal itself. Long series of ones and zeros could cause a problem.

Low probability of bit error.


The receiver needs to be able to distinguish the waveform associated with a mark from the waveform associated with a space, even if there is a considerable amount of noise and distortion in the channel. channel.

Spectrum that is suitable for the channel.


In some cases DC components should be avoided if the channel has a DC blocking capacitance. The transmission bandwidth should be minimized.

Eeng 360 4

Line Coder
Digital Data ak
Line Coder

Physical x(t ) ! ak p(t  kTb ) Waveform k !g

 The input to the line encoder is a sequence of values ak that is a function of a data bit or an ADC output bit.  The output of the line encoder is a waveform:

x(t ) !

a
k !g

p (t  kTb )

 Where p(t) is the Pulse Shape and Tb is the Bit Period  Rb =1/Tb =1/T  The operational details of this function are set by the particular type of line code that is being used.

Eeng 360 5

Types of Line Codes


 Each line code is described by a symbol mapping function ak and a pulse shape p(t):
g

x(t ) !
 Categories of line codes:


a
k !g

p (t  kTb )

Symbol mapping functions (ak). (a


Unipolar Polar Bipolar (a.k.a. alternate mark inversion, pseudoternary)

Pulse shapes p(t).


NRZ (Nonreturn-to-zero) (Nonreturn-to RZ (Return to Zero) Manchester (split phase)
Eeng 360 6

Unipolar NRZ Line Code




The unipolar nonreturn-to-zero line code is defined by the nonreturn-tounipolar mapping:


 A when X k ! 1 ak ! 0 when X k ! 0
 

where Xk is the kth data bit. In addition, the pulse shape for unipolar NRZ is:
t p (t ) ! 4 NRZ pulse shape Tb

Where Tb is the bit period. period.


Hard to recover symbol timing when long string of 0s or 1s. 0 1 1 0 1

Note the DC component This means wasted power! 1

A
0 Tb 2Tb 3Tb 4Tb 5Tb

Eeng 360 7

Unipolar RZ Line Code




The unipolar return-to-zero line code has the same symbol return-tomapping but a different pulse shape than unipolar NRZ:
 A when X k ! 1 ak ! 0 when X k ! 0

t p (t ) ! 4 RZ pulse shape Tb / 2
Pulse of half the duration of NRZ requires twice the bandwidth! 1 0 1 1 Long strings of 1s no longer a problem. However strings of 0s still problem. 0 1

A
0

Tb

2Tb

3Tb

4Tb

5Tb
Eeng 360 8

Polar Line Codes




Polar line codes use the antipodal mapping:


 A when X k ! 1 ak !  A when X k ! 0
 

Polar NRZ uses NRZ pulse shape. Polar RZ uses RZ pulse shape.
0 1 1 0 1

No DC component, so more energy efficient. 1

A
Polar NRZ

Now we can handle long strings of 0s, too.

A
Polar RZ

A

Eeng 360 9

Manchester Line Codes




Manchester line codes use the antipodal mapping and the following split-phase pulse shape: splitp(t )

t  Tb / 4 t  Tb / 4 p (t ) ! 4 4 Tb / 2 Tb / 2

Easy synchronization and better spectral characteristics than polar RZ.


Eeng 360 10

Bipolar Line Codes




With bipolar line codes a space is mapped to zero and a mark is alternately mapped to -A and +A:
0 ak !  A A  when X k ! 0 when X k ! 1 and last mark p  A when X k ! 1 and last mark p  A

Also called pseudoternary signalling and alternate mark inversion (AMI). (AMI). Either RZ or NRZ pulse shape can be used.

Bipolar (RZ)

A
Eeng 360 11

Comparison of Line Codes


 Self-synchronization: Self

Manchester codes have built in timing information because they always have a zero crossing in the center of the pulse. Polar RZ codes tend to be good because the signal level always goes to zero for the second half of the pulse. NRZ signals are not good for self-synchronization. self-

 Error probability:


Polar codes perform better (are more energy efficient) than Unipolar or Bipolar codes.

 Channel characteristics:


We need to find the PSD of the line codes to answer this ...
Eeng 360 12

Power Spectra for Binary Line Codes


 PSD can be calculated using the autocorrelation function:  A digital signal is represented by f(t) - Symbol Pulse shape; Binary signaling : Ts= Tb ,  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:
s(t ) !

n !g

an f (t ! nTs ) ;

t f (t ) ! 4 for unipolar NRZ Ts

Ts - Duration of one symbol; Multilevel signaling: Ts= lTb

Ps ( f ) !
I

F( f ) Ts
i !1

R ( k )e
k !g

g

 j 2T kfTs

Where { f (t )} ! F ( f )

R(k ) ! (an an  k )i Pi

The autocorrelation function of data

an and an  k are levels of the data pulses at the n ' th and (n  k )'th symbol positions Pi Probability of having the ith an an  k product
Eeng 360 13

PSD for Polar NRZ Signaling


Possible levels for the as : +A and -A

R (k ) ! (an an  k )i Pi
i !1

an and an  k are the level of the pulses at the nth and (n  k )th symbols

R (0) ! (an an )i Pi ! A2
i !1 4

1 1  (  A) 2 ! A2 2 2

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

2, k ! 0 A R polar ( k ) ! 0, k { 0 sin T fTb f (t ) ! 4 (t / Tb ) m F ( f ) ! Tb T fTb Ps f ! F f Ts


2
2

k !g

R k e

2T kfTs

sin T fTb PPolar NRZ ( f ) ! A Tb T fTb


2

Eeng 360 14

PSD for line codes


Unipolar NRZ
A Tb sin T fTb 1 1  H ( f ) 4 T fTb Tb
2 2

PUni. NRZ ( f ) !

Polar NRZ

sin T fTb PPolar NRZ ( f ) ! A Tb T fTb


2

Bit rate: R=1/Tb


Eeng 360 15

PSD for line codes


Unipolar RZ

A2Tb sin T fTb / 2 PUni. RZ ( f ) ! 16 T fTb / 2

1 1  Tb

H(f 
n !g

n ) Tb

Bipolar RZ

A Tb sin T fTb 2 PBipolar RZ ( f ) ! sin T fTb 4 T fTb


2

Manchester NRZ

sin T fTb / 2 2 PManch. NRZ ( f ) ! A2Tb sin T fTb / 2 T fTb / 2


Bit rate: R=1/Tb
Eeng 360 16

NRZ Encoding


There are other variations of NRZ encoding; which include: NRZ- [Non-Return-to-ZeroNRZ-L: [Non-Return-to-Zero-Level]: In NRZ-L encoding, the polarity of NRZthe signal changes only when the incoming signal changes from a one to a zero or from a zero to a one. NRZ-L method looks just like the NRZ NRZmethod, except for the first input one data bit. This is because NRZ does not consider the first data bit to be a polarity change, where NRZ-L does. NRZNRZ- [Non-Return-to-ZeroNRZ-M [Non-Return-to-Zero-Mark (NRZ-M) Encoding]: The polarity of (NRZthe signal changes when the incoming signal is a one. An incoming zero would not change the polarity of the signal. NRZ- [Non-Return-to-ZeroNRZ-S [Non-Return-to-Zero-Space (NRZ-S) Encoding]: Works just like (NRZNRZNRZ-M, except the signal changes when the incoming data signal is a zero, not when the signal is a one. NRZ- [Non-Return-to-ZeroNRZ-C [Non-Return-to-Zero-Change Encoding]: Same as NRZ-L. NRZNRZI [Non-Return-to-Zero-Inverted Encoding]: A '0' is encoded as no [Non-Return-to-Zerochange in the level. However a '1' is encoded depending on the current state of the line. If the current state is '0' [low] the '1' will be encoded as a high, if the current state is '1' [high] the '1' will be encoded as a low. Used with FDDI and USB for example.
Eeng 360 17

You might also like