Lecture3 ECE252 sp22
Lecture3 ECE252 sp22
Presented By:
Dr. Ahmed Amr
Line codes
• It is the electrical representation of binary stream.
• Types of line codes with respect to pulse duration:
o Non-return to zero
o Return to zero
• Types of line codes with respect to pulse amplitude:
o Unipolar
o Polar
o Bipolar
2
Non-return to zero versus return to zero
• Non-return to zero (NRZ): the pulse amplitude is held to a constant
value throughout the pulse interval.
3
Unipolar and polar line codes
• Unipolar: 1 is transmitted by a pulse, and a 0 is transmitted by no
pulse (zero signal).
Unipolar RZ
Polar NRZ
Polar RZ
4
Bipolar line code
• Bipolar: Alternate Mark Inversion (AMI)):
o 0 is encoded by no pulse, and 1 is encoded alternately by
positive or negative pulse depending on whether the previous 1
is encoded by negative or positive pulse.
5
Properties of line codes
• Low bandwidth: Transmission bandwidth should be as small as
possible.
• Power efficiency. For a given bandwidth and a specified detection
error rate, the transmission power should be as low as possible.
• Error detection and correction capability:
o It is desirable to detect and preferably correct the detected
errors.
o In a bipolar case, a single error will cause bipolar violation and
can easily be detected.
• Adequate timing content. It should be possible to extract timing or
clock information from the signal.
6
Properties of line codes (cont’d)
• Transparency:
o Transparent code: for every possible sequence of data, the
coded signal is received faithfully.
• Favorable power spectral density.
o It is desirable to have zero power spectral density (PSD) at 𝑓 =
0.
o AC coupling and transformers are often used at the regenerative
repeaters.
o DC wander in the pulse stream when ac coupling is used.
7
Polar line codes
• Polar return to zero: The effective bandwidth
Polar-RZ
of this signal is seen to be 𝟐𝑹𝒃 Hz (where 𝑹𝒃
is the clock frequency or bit rate).
• Increasing the pulse width would reduce the
bandwidth.
• Polar non-return to zero: the bandwidth
marked by the first null is halved to 𝑹𝒃 Hz.
• Polar line code has no capability for error
detection or error correction.
• It has nonzero Power spectral density (PSD)
at dc (𝑓 = 0). Polar-NRZ
8
Polar line codes (cont’d)
• For a given power, the error-detection probability for a polar
scheme is the lowest among all line codes.
• RZ polar signaling is also transparent because there is always some
pulse (positive or negative).
9
Polar line code: Manchester code (split-phase)
∞
• 𝑷 𝒇 = −∞
𝒑 𝒕 𝒆−𝒋𝟐𝝅𝒇𝒕 𝒅𝒕
∞
• 𝑷 𝟎 = −∞
𝒑 𝒕 𝒅𝒕
• if the area under 𝑝(𝑡) is made zero, 𝑃(0) is zero, and we have a dc
null in the PSD.
10
Unipolar line codes
• Unipolar return to zero: an on-off signal can be expressed as a sum
of a polar and a periodic rectangular component in time.
o The periodic rectangular component is of clock frequency 𝑹𝒃 .
o It consists of discrete components at the dc and the
fundamental frequency 𝑹𝒃 , plus its odd harmonics.
o The impulses repeat at the frequencies 0, ± 𝟏 𝑻𝒃 , ± 𝟑 𝑻𝒃 , · · ·.
11
Unipolar line codes (cont’d)
• Unipolar non return to zero: It has an impulse at 𝒇 = 𝟎
12
Unipolar line codes (cont’d)
• On-off codes is not transparent. A long string of 0s (or offs) causes
the absence of a signal and can lead to errors in timing extraction.
• All the disadvantages of polar line codes exist in unipolar line codes:
o transmission bandwidth,
o nonzero power spectrum at dc,
o no error detection (or correction).
• Unipolar line code requires twice as much power as polar line code.
o For the same difference between two pulses:
𝟏 𝟏 𝟐 𝟏 𝟐
• Polar: 𝐴 and −𝐴. Then 𝑻 𝟐
𝑨 𝑻 𝒃 + 𝟐
𝑨 𝑻𝒃 = 𝑨𝟐
𝒃
𝟏 𝟏
• Uni-polar: 𝟐𝐴 and 𝟎. Then 𝟒𝑨𝟐𝑻𝒃 + 𝟎 = 𝟐𝑨𝟐
𝑻𝒃 𝟐
13
Bipolar line codes
• The effective bandwidth of the signal is 𝑹𝒃 (𝑹𝒃 = 𝟏/𝑻𝒃), which is
half that of polar using the same half-width pulse or on-off signaling.
• The effective bandwidth defined by the first non-dc null frequency is
𝑹𝒃 Hz regardless of whether the pulse is half-width or full-width.
14
Bipolar line codes (cont’d)
• Bipolar signaling has several advantages:
o (1) its spectrum is amenable to ac coupling;
o (2) its bandwidth is not excessive;
o (3) it has single-error-detection capability.
• Bipolar line code is not transparent.
• A bipolar signal requires for twice as much power as a polar signal
needs.
15
High density Bipolar number 3 (HDB3)
• Three successive zero pulses are permitted to be transmitted as 000.
• The special sequences used are 000V and B00V where B conforms to
the bipolar rule and V=1 violates the bipolar rule.
• The choice of sequence 000V or B00V is made in such a way that
consecutive V pulses alternate signs to avoid dc wander and to
maintain the dc null in the PSD.
• The sequence B00V is used when there are an even number of 1s
following the last sequence.
• The sequence 000V is used when there are an odd number of 1s
following the last sequence.
• HDB3 line code retains error detecting capability.
16
High density Bipolar number 3 (HDB3) (cont’d)
Polarity of the previous Number of pulses sent after the last substitution
pulse odd even
- 0 0 0 -V +B 0 0 +V
+ 0 0 0 +V -B 0 0 -V
Number of
pulses sent
after the
last
substitution
1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1
+B -B 0 0 0 +B -B 0 0 -V +B 0 0 +V 0 -B 0 0 0 -V 0 +B
+B -B 0 0 0 +B 0 0 0 +V -B 0 0 -V 0 +B 0 0 0 +V 0 -B
Odd
Even
17
Examples on HDB3
18
High density Bipolar number 3 (HDB3) (cont’d)
HDB3
Odd number of
1s since last
substitution
19