0% found this document useful (0 votes)
247 views

Line Codes RZ AND NRZ

The document discusses various line coding techniques used for digital data transmission. It describes unipolar return to zero (RZ) coding, where a logic 1 is represented by a positive voltage during the first half of the bit interval, returning to zero in the middle. Logic 0 is indicated by a zero voltage for the entire bit interval. Unipolar RZ requires twice the bandwidth of non-return to zero (NRZ) coding but allows for easier synchronization. The document also discusses polar RZ coding and bipolar coding techniques.

Uploaded by

jigef19343
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)
247 views

Line Codes RZ AND NRZ

The document discusses various line coding techniques used for digital data transmission. It describes unipolar return to zero (RZ) coding, where a logic 1 is represented by a positive voltage during the first half of the bit interval, returning to zero in the middle. Logic 0 is indicated by a zero voltage for the entire bit interval. Unipolar RZ requires twice the bandwidth of non-return to zero (NRZ) coding but allows for easier synchronization. The document also discusses polar RZ coding and bipolar coding techniques.

Uploaded by

jigef19343
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/ 48

Line codes

Unipolar Return to zero (RZ):


NRZ coding suffers from lack of synchronization, non-zero dc component and baseline wandering. To overcome the
shortcomings of the NRZ, return to zero (RZ) code was developed.
• The main features of Unipolar NRZ are follows:
• Ease of generation, requires only a single power supply.
• Relatively low bandwidth
• The transmission normalized power for a single bit per unit line resistance is double than their polar
counterparts.
• Prone to baseline wandering and DC components.
• It has no synchronization or any error detection.
• It is simple but costly in power consumption.
• Not used normally in data communication.

As shown in fig, in RZ line coding, logic 1 is represented by a
non-zero voltage level, precisely a positive voltage during a
portion of the bit interval and a transition to zero at the middle
point of the bit interval. Logic 0 is indicated by a zero voltage
level during the entire bit interval. Therefore a RZ signal pulse
is only half the length of NRZ pulse. This implies that
unipolar RZ requires twice the bandwidth of the NRZ code.
The main advantage of unipolar RZ is, ease of generation
since it implements a single power supply.

Features:
• Ease of generation as it uses single power supply.
• More bandwidth requirement.
• It has a nonzero dc component leading to dc wandering.
• Along string of 0’s will lack pulse transitions and could lead to loss of synchronization.
• There is no error detection capability and, hence, performance monitoring is not possible.
Non Return to
Zero(NRZ)

Return to Zero
POLAR
(RZ)

BIPHASE

Polar RZ
It is the most common and easy way to transmit binary data where a positive voltage level represents one bit and an equal
magnitude negative voltage level represents the other. Means In Polar RZ ‘1’ is represented as positive voltage polarity and
‘0’ is represented by negative voltage polarity.
Polar NRZ

In polar NRZ ‘1’ is represented by positive polarity and ‘0’ is represented by negative polarity. These polarities
are maintained over the complete pulse duration.
• As the polar NRZ signal has more r.m.s value than their unipolar counterparts, they can carry more energy.
• This will aid in better signal to noise ratio at the receiving end.
• The drawback of polar NRZ, however, is that it lacks error detection capability when the transmitted signal has a long
sequence of 0’s or 1’s.
• This problem is overcome in polar RZ signals, as the signal drops to zero in the middle of each bit interval.
• The Polar NRZ code is used to transmit signals on a computer motherboard. It is also used Fiber-based Gigabit Ethernet.
There are two types of NRZ polar encoding schemes namely
Non-Return-to-Zero-Level (NRZ-L) and
Non-Return-to-Zero, Invert (NRZ-I).

Features:
• The average dc component is zero.
• Has more r.m.s value than unipolar NRZ, so can carry more energy.
• Better signal to noise ratio at the receiving end.
• Lacks error detection capability.
Bipolar NRZ (Alternate Mark Inversion (AMI))
In this format the successive ‘1’s are represented by pulses with alternate polarity and ‘0’s are represented by no pulses.
Each binary 1 is represented by a positive half–bit period pulse followed by a negative half–bit period pulse. Similarly,
a binary 0 is represented by a negative half–bit period pulse followed by a positive half–bit period pulse. This type of
signaling is also called split–phase encoding.
• NRZ-L: Used in Digital Logic Circuits
• NRZ-M: Used in magnetic tape recording
• Unipolar RZ, bipolar RZ, : used in baseband
data transmission and magnetic tape recording
• RZ-AMI: used in telephone system
• Phase coding schemes are used in magnetic tape recording and
optical communication and in some satellite telemetry links
Line Codes in PCM
• The output of an ADC can be transmitted over a baseband 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 to
mean binary one and space to mean binary zero.

Analog
Input
Signal
Sample

X
Quantize ADC
XQ

Encode

Xk
Line
Code
x(t) PCM signal
Line codes
1 1 0 1 0 0 1 BINARY DATA

(a) Punched Tape Mark Mark space Mark space space Mark
(hole) (hole) (hole) (hole)
Volts
A

0
(b) Unipolar NRZ
Tb Time

(c) Polar NRZ 0


-A

0
(d) Unipolar RZ

A
(e) Bipolar RZ 0
-A

A
(f) Manchester NRZ 0
-A

Binary Signaling Formats


Goals of Line Coding
• A line code is designed to meet several goals:

• Self-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.

• 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.
Line Coder

Digital
Data ak
Line Coder
Physical x(t ) =
Waveform

k =−
ak p(t − kTb )

• 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 =−
k p(t − kTb )
• Where p(t) is the Pulse Shape and Tb is the Bit Period
• Tb =Ts/n for n bit quantizer (and no parity bits).
• Rb =1/Tb=nfs for n bit quantizer (and no parity bits).
• The operational details of this function are set by the particular
type of line code that is being used.
Types of Line Codes
• Each line code is described by a symbol mapping function ak and
a pulse shape p(t):

x(t ) = a
k =−
k p(t − kTb )

• Categories of line codes:


• Symbol mapping functions (ak).
• Unipolar
• Polar
• Bipolar (a.k.a. alternate mark inversion, pseudoternary)

• Pulse shapes p(t).


• NRZ (Nonreturn-to-zero)
• RZ (Return to Zero)
• Manchester (split phase)
Unipolar NRZ Line Code
• The unipolar nonreturn-to-zero line code is defined by the
unipolar 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 ) =    NRZ pulse shape
• Where Tb is the bit period.
Tb 

Hard to recover symbol timing


Note the DC component when long string of 0s or 1s.
This means wasted power!
1 0 1 1 0 1
A

0 Tb 2Tb 3Tb 4Tb 5Tb


Unipolar RZ Line Code
• The unipolar return-to-zero line code has the same symbol
mapping but a different pulse shape than unipolar NRZ:

+ A when X k = 1
ak = 
 0 when X k = 0

 t 
p(t ) =    RZ pulse shape
 Tb / 2 
Long strings of 1’s no longer a problem.
Pulse of half the duration of NRZ
However strings of 0’s still problem.
requires twice the bandwidth!
1 0 1 1 0 1
A

0 Tb 2Tb 3Tb 4Tb 5Tb


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.
No DC component,
so more energy efficient.
1 0 1 1 0 1
A

Polar NRZ
Now we can handle
long strings of 0’s, too.
A
Polar RZ

−A
Manchester Line Codes
• Manchester line codes use the antipodal mapping
and the following split-phase pulse shape:
p(t )

 t + Tb / 4   t − Tb / 4 
p(t ) =    −   
 b T / 2   b T / 2 

1 0 1 1 0 1

• Easy synchronization and better spectral characteristics than polar RZ.


Bipolar Line Codes
• With bipolar line codes a space is mapped to zero and a mark is
alternately mapped to -A and +A:

0 when X k = 0

ak =  − A when X k = 1 and last mark → + A
+ A when X k = 1 and last mark → − A

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

1 0 1 1 0 1
A

Bipolar (RZ)

−A
Comparison of Line Codes
• Self-synchronization:
• 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.

• 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 ...
Power Spectra for Binary Line Codes
➢ PSD can be calculated using the autocorrelation function:

 t 
➢ A digital signal is represented by s (t ) =  an f (t = nTs ) ; f (t ) =    for unipolar NRZ
n =−  Ts 

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 n ' th and (n + k )'th symbol positions
Pi Probability of having the ith an an + k product
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 2 1
R(0) =  (an an )i Pi = A + (− A) = A2
2

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 
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 ) = A Tb 
2

  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


INTERSYMBOL INTERFERENCE (ISI)

➢ Intersymbol Interference
➢ ISI on Eye Patterns
➢ Combatting ISI
➢ Nyquist’s First Method for zero ISI
➢ Raised Cosine-Rolloff Pulse Shape

➢ Nyquist Filter
Intersymbol Interference
• Intersymbol interference (ISI) occurs when a pulse spreads out in such a way that it
interferes with adjacent pulses at the sample instant.

• Example: assume polar NRZ line code. The channel outputs are shown as spreaded
(width Tb becomes 2Tb) pulses shown (Spreading due to bandlimited channel
characteristics).
Channel Input Channel Output
Pulse width Tb Pulse width Tb

Data 1

− Tb 0 Tb − Tb 0 Tb

Data 0
− Tb 0 Tb − Tb 0 Tb
Intersymbol Interference
• For the input data stream:
1 0 1 1 0 1
A
0 Tb 2Tb 3Tb 4Tb 5Tb

• The channel output is the superposition of each bit’s output:

0 Tb 2Tb 3Tb 4Tb 5Tb


Resultant
Channel Output
1 0 1 1 0 1 Waveform

0 Tb 2Tb 3Tb 4Tb 5Tb


ISI on Eye Patterns
• The amount of ISI can be seen on an oscilloscope using an Eye
Diagram or Eye pattern.

Distortion
Amplitude

Noise
Margin

Tb Extension
Beyond Tb is
ISI
Time (Tb)
Intersymbol Interference
➢ If the rectangular multilevel pulses are filtered improperly as they pass through a
communications system, they will spread in time, and the pulse for each symbol may be
smeared into adjacent time slots and cause Intersymbol Interference.

➢ How can we restrict BW and at the same time not introduce ISI? 3 Techniques.
Intersymbol Interference
➢ Flat-topped multilevel input signal having pulse shape h(t) and values ak:
 
w in ( t ) =  an h ( t − nTs ) =  an h(t ) *  ( t − nTs ) =   an ( t − nTs )  * h ( t )
n  n 
 t  1
Where h ( t ) =    Where D = pulses/s
 s
T T s

 
wout ( t ) =   an ( t − nTs )  * he ( t ) =  an he ( t − nTs )
 n  n

Equivalent impulse response: h ( t ) = h ( t ) * h ( t ) * h ( t ) * h ( t )


e T C R
➢ he(t) is the pulse shape that will appear at the output of the receiver filter.
Intersymbol Interference
➢ Equivalent Impulse Response he(t) :

h (t ) = h (t ) * h (t ) * h (t ) * h (t )
e T C R
➢ Equivalent transfer function:
  t   sin  Ts f 
H e ( f ) = H ( f ) H T ( f ) H C ( f ) H R ( f ) Where H ( f ) = F     = Ts  
  s  
T   Ts f 
➢ Receiving filter can be designed to produce a needed He(f) in terms of HT(f) and HC(f):

He ( f )
HR ( f ) =
H ( f ) HT ( f ) H C ( f )

➢ Output signal can be rewritten as:

wout ( t ) =  an he ( t − nTs )
n
➢ He(f), chosen such to minimize ISI is called EQUALIZING FILTER)
Combating ISI
• Three strategies for eliminating ISI:
• Use a line code that is absolutely bandlimited.
• Would require Sinc pulse shape.
• Can’t actually do this (but can approximate).

• Use a line code that is zero during adjacent sample instants.


• It’s okay for pulses to overlap somewhat, as long as there is no overlap at
the sample instants.
• Can come up with pulse shapes that don’t overlap during adjacent sample
instants.
▪ Raised-Cosine Rolloff pulse shaping

• Use a filter at the receiver to “undo” the distortion introduced by


the channel.
• Equalizer.
Nyquist’s First Method for Zero ISI
➢ ISI can be eliminated by using an equivalent transfer function, He(f), such that the impulse
response satisfies the condition:
C , k = 0
he ( kTs +  ) = 
0, k  0
k is an integer, Ts is the symbol (sample) period
 is the offset in the receiver sampling clock times
C is a nonzero constant
sin x
Now choose the function for he (t )
x Sampling Instants
wout ( t ) =  an he ( t − nTs ) ISI occurs but,
n
NO ISI is present at the
he is a Sa function sampling instants
sin  f s t
he (t ) =
 f st
Nyquist’s First Method for Zero ISI
➢ There will be NO ISI and the bandwidth requirement will be minimum (Optimum
Filtering) if the transmit and receive filters are designed so that the overall transfer function He(f)
is:
1  f  sin  f s t 1
He ( f ) =  f  e
h ( t ) =
 f st
Where fs =
fs  s Ts

➢ This type of pulse will allow signalling at a baud rate of D=1/Ts=2B (for Binary R=1/Ts=2B)
where B is the absolute bandwidth of the system.

He(f)
1/fs

f
-fs/2 0 fs/2

fs
Absolute bandwidth is: B = MINIMUM BANDWIDTH
2
Signalling Rate is: D=1 Ts = 2 B Pulses/sec
Nyquist’s First Method for Zero ISI
Nyquist’s First Method for Zero ISI
He(f)
he(t) 1/fs

f
Zero crossings at non-zero integer multiples of the bit period -fs/2 0 fs/2
• Since pulses are not possible to create due to:
• Infinite time duration.
• Sharp transition band in the frequency domain.

• The Sinc pulse shape can cause significant ISI in the presence of timing errors.
• If the received signal is not sampled at exactly the bit instant (Synchronization
Errors), then ISI will occur.

• We seek a pulse shape that:


• Has a more gradual transition in the frequency domain.
• Is more robust to timing errors.
• Yet still satisfies Nyquist’s first method for zero ISI.
Raised Cosine-Rolloff Nyquist Filtering
➢ Because of the difficulties caused by the Sa type pulse shape, consider other
pulse shapes which require more bandwidth such as the Raised Cosine-rolloff
Nyquist filter but they are less affected by synchrfonization errors.
➢ The Raised Cosine Nyquist filter is defined by its rollof factor number r=fΔ/fo.
1, f  f1

 1    ( f − f1 )  
H e ( f ) =  1 + cos    , f1  f B B is the Absolute Bandwidth
 2   2 f   

0, f B
f  = B − f 0 f1  f 0 − f  Where f o is the 6-dB bandwidth of the filter
f Rb
Rolloff factor: r = Bandwidth: B= (1 + r )
f0 2
 sin 2 f 0t   cos 2 f  t 
he ( t ) = F  H e ( f )  = 2 f 0 
−1
 
 2 f 0t  1 − ( 4 f  t ) 
2

f Rb
Rolloff factor: r = Bandwidth: B= (1 + r )
f0 2
Raised Cosine-Rolloff Nyquist Filtering
➢ Now filtering requirements are relaxed because absolute bandwidth is
increased.
➢ Clock timing requirements are also relaxed.
➢ The r=0 case corresponds to the previous Minimum bandwidth case.
1    ( f − f )  
H ( f ) = 1 + cos  
1
e  
2
  2 f  

B = fo + f 

f R D
Rolloff factor: r = Bandwidth: B = (1 + r ) = (1 + r )
f0 2 2
Raised Cosine-Rolloff Nyquist Filtering
    cos 2 f t 
➢ Impulse response is given by: he (t ) = F  H e ( f ) = 2 f0 
−1 sin 2 f 0 t



  1 − ( 4 f t ) 
2
 2 f 0 t

• The tails of he(t) are now


decreasing much faster than the Sa
function (As a function of t2).
• ISI due to synchronization errors
will be much lower.
Raised Cosine-Rolloff Nyquist Filtering

Frequency response and impulse


responses of Raised Cosine pulses for
various values of the roll off parameter.

r→B
r  → ISI 
Raised Cosine-Rolloff Nyquist Filtering
➢ Illustrating the received bit stream of Raised Cosine pulse shaped
transmission corresponding to the binary stream of 1 0 0 1 0 for 3 different
values of r=0, 0.5, 1.

1 0 0 1 0 1 0 0 1 0
Bandwidth for Raised Cosine Nyquist Filtering
• The bandwidth of a Raised-cosine (RC) rolloff pulse shape is a function of the bit
rate and the rolloff factor:
 f 
B = f o + f  = f o 1 +   = f o (1 + r )
 fo 
R
B = (1 + r )
2
D
B = (1 + r ) Multilevel Signalling
2 the expression:
• Or solving for bit rate yields

2B
R=
1+ r
• This is the maximum transmitted bit rate when a RC-rolloff pulse shape with
Rolloff factor r is transmitted over a baseband channel with bandwidth B.
Nyquist Filter
➢ Raised Cosine Filter is also called a NYQUIST FILTER.
➢ NYQUIST FILTERS refer to a general class of filters that satisfy the
NYQUIST’s First Criterion.

➢ Theorem: A filter is said to be a Nyquist filter if the effective transfer function is :


  f 
   +Y ( f ), f  f0
H e ( f ) =   2 f0 

0, f Elsewhere

Y (f ) is a real function and even symmetric about f = 0:


Y ( − f ) = Y ( f ), f  2 f0
Y is odd symmetric about f = f 0 :
Y ( − f + f 0 ) = −Y ( f + f 0 ), f  f0
➢ There will be no intersymbol interference at the system output if the symbol rate is

D = f s = 2 f0
Nyquist Filter Characteristics

Y (f ) is a real function and even symmetric about f = 0:


Y ( − f ) = Y ( f ), f  2 f0
Y is odd symmetric about f = f 0 :
Y ( − f + f 0 ) = −Y ( f + f 0 ), f  f0

  f 
   +Y ( f ), f  f0
H e ( f ) =   2 f0 

0, f Elsewhere

You might also like