Line Coding
Line Coding
CHAPTER CONTENTS
Review Questions
Objectives
Signal Comments
NRZ–L Non return to zero level. This is the standard positive logic
signal format used in digital circuits.
1 forces a high level
0 forces a low level
NRZ–M Non return to zero mark
1 forces a transition
0 does nothing
NRZ–S Non return to zero space
1 does nothing
0 forces a transition
RZ Return to zero
1 goes high for half the bit period
0 does nothing
Biphase–L Manchester. Two consecutive bits of the same type force a
transition at the beginning of a bit period.
1 forces a negative transition in the middle of the bit
0 forces a positive transition in the middle of the bit
Biphase–M There is always a transition at the beginning of a bit period.
1 forces a transition in the middle of the bit
0 does nothing
Biphase–S There is always a transition at the beginning of a bit period.
1 does nothing
0 forces a transition in the middle of the bit
Differential There is always a transition in the middle of a bit period.
Manchester 1 does nothing
0 forces a transition at the beginning of the bit
Bipolar The positive and negative pulses alternate.
1 forces a positive or negative pulse for half the bit period
0 does nothing
A bipolar signal is not actually a binary signal since it has 3 distinct levels.
1 0 1 0 1 1 0 0 1 0
NRZ–L
NRZ–M
NRZ–S
RZ
Biphase–L
Biphase–M
Biphase–S
Differential
Manchester
Bipolar
Each line code has advantages and disadvantages. The particular line code used
is chosen to meet one or more of the following criteria:
• Minimize transmission hardware
• Facilitate synchronization
• Ease error detection and correction
• Minimize spectral content
• Eliminate a dc component
Biphase line codes require at least one transition per bit time. This makes it
easier to synchronize the transceivers and detect errors however; the baud rate is
greater than that of NRZ codes.
NRZ codes are more bandwidth efficient than bipolar RZ ones since their baud
rate is half that of RZ codes and their spectral components go all the way down
to 0 Hz.
CMI
In CMI†, marks are encoded as alternate polarity, full period pulses. Spaces are
encoded by half a period pulse at the negative voltage and half period pulse at
the positive voltage. This coding scheme has the advantage that it uses only two
voltage levels instead of three, as does AMI.
0 1 0 0 0 0 0 0 0 1 0 1 1
Binary NRZ
Binary RZ
CMI
9.2.1 AMI
AMI† is a bipolar line code. Each successive mark is inverted and the average or
DC level of the line is therefor zero. This system is used on T-carrier systems,
but cannot be used on fiber optic links.
0 1 0 0 0 0 0 0 0 1 0 1 1
Binary NRZ
Binary RZ
AMI
One of the weaknesses of transmitting only marks is that long strings of zeros
cause the receivers to loose lock. It is essential to maintain lock because the T-
carrier multiplexing scheme organizes data as a series of concatenated channels.
If synchronism is lost, the specific channels cannot be identified. It is therefore
necessary to impose additional rules on the signal to eliminate long strings of
zeros.
B6ZS
Since the last mark preceding a string of zeros may have been either positive or
negative, two types of substitutions are used:
These substitutions force two consecutive violations. A single bit error does not
create this condition.
B6ZS Example:
Original data: 0 1 0 0 0 0 0 0 0 1 0 1 1
AMI data: 0 + 0 0 0 0 0 0 0 - 0 + -
B6ZS data: 0 + 0 + - 0 - + 0 - 0 + -
0 1 0 0 0 0 0 0 0 1 0 1 1
Binary RZ
AMI RZ
B6ZS
B8ZS
This scheme uses the same substitution as B6ZS. Since the example above has a
string of 7 zeros, no substitution would be made.
B3ZS
B3ZS† is more involved than B6ZS, and is used on DS–3 carrier systems. The
substitution is not only dependent on the polarity of the last mark, but also on the
number of marks (even and odd) since the last substitution. It should be
remembered that the number zero is by definition even.
B3ZS Example:
0 1 0 0 0 0 0 0 0 1 0 1 1
Binary RZ
AMI RZ
B3ZS
From the above example, it seems that there are more negative pulses than
positive ones, thus crating a DC component. It should be noted however, that
this is statistically eliminated over longer data sequences.
HDB3
HDB3 Example:
0 1 0 0 0 0 0 0 0 1 0 1 1
Binary RZ
AMI RZ
HDB3
From the above example, it seems that there are more positive pulses than
negative ones, thus crating a DC component. It should be noted however, that
this is statistically eliminated over longer data sequences.
The last pulse in the substitution is the V or violation pulse. If there have been an
even number of substitutions, a B or balancing pulse is added to prevent a dc
buildup.3
These schemes operate on bytes rather than bits. Some transmit the signal as
binary levels, but most use multi-level pulses.
A binary block code has the designation nBmB, where n input bits are encoded
into m output bits. The most common of these is the 3B4B code.
3B4B Coding
Input Output
000 - - + - or + + - +
001 --++
010 -+-+
011 -++-
100 +--+
101 +-+-
110 ++--
111 - + - - or + - + +
In Europe 4B3T, which encodes 4 binary bits into 3 ternary levels, has been
selected as the BRA for ISDN.
Some block codes do not generate multilevel pulses. For example, 24B1P or
24B25B simply adds a P or parity bit to a 24-bit block.
9.3.1 2B1Q
In North America, 2B1Q which encodes 2 binary bits into 1 quaternary level has
been selected for BRA.
2B1Q Coding
Input Output
00 -3
01 -1
10 +1
11 +3
Partial response signaling alters the shape of a data pulse to control the signal
spectrum and make efficient use of the transmission channel.
In most cases, signal shapes are specified in the time domain, but
communications channels are specified in the frequency domain. Since the
physical channel represents the ‘real world’, it is necessary to first examine the
channel frequency characteristics and then determine the most suitable shape of
the data signal in the time domain.
Duo-binary]
2 sin
B
5
πω 1,0,-2,0,1 5
4 sin 2
B
1
h(t ) = H (ω ) cos(ω t ) + j sin (ω t ) dω
B
2π 0
Real part Imaginary part
for even functions for odd functions
Ideal LPF
(Brick Wall Filter)
1
B
ω
2πf c
H (ω ) = 1 0≤ω ≤ B
(Some textbooks take a more rigorous approach and include negative
frequencies. From an engineering perspective, the idea of LPFs having a
negative frequency response is not particularly meaningful. For a more thorough
discussion of the Fourier Transform, please see Appendix 3)
The time domain response (also called the impulse response) is found by taking
the inverse Fourier transform of the channel:
1
h(t ) = F -1 {H (ω )} = H (ω ) cos(ωt )dω
B
2π 0
B
1 1
= sin ω t
2π t 0
1
= sin Bt
2πt
A plot of this function resembles:
1.0
0.8 sin( 2πfct)
h( t ) =
0.6 2π t
0.4
1 1 3 2
0.2 2 fc fc 2 fc fc
t
-0.2 π 2π 3π 4π
B B B B
This function is the familiar sync or sampling function and forms the basic time
domain element used to analyze M-ary pulses.
It should be noted, that if a time domain pulse of this exact shape were created, it
would have an ideal cutoff in the frequency domain. Time domain pulses of this
exact type however, are not practical, since the leading and trailing tails never
completely vanish.
Since the impulse response of an ideal LPF consists of one sinc pulse, it is
sometimes written as f[δ] = 1.
δ
Filter Input
Ideal LPF Filter Output
1
If two δ pulses separated by t = occur at the filter input, the peak of the
2 fc
second sync response will occur at a zero crossing of the first response. This
suggests that at that precise moment, it is possible to distinguish between both
pulses even though a great deal of overlap or ISI has occurred.
By normalizing the bandwidth to unity, it can be observed that the maximum bit
rate with no ISI is:
1 1
Maximum Bit Rate = = = 2bits/Hz
t 0 .5
1.
Controlling ISI forms the bases of M-ary signaling theory and allows the
Nyquest rate to be exceeded. If a transmitted pulse waveform consists of sinc
components, it is possible to separate the sinc components at the receiver, thus
exceeding the Nyquest rate.
For the impulse response to be comprised of unit sinc pulses, the cosine filter is
often modified by giving it an amplitude of 2:
2 Cosine Filter
πω
1.5 H (ω ) = 2 cos
2B
H (ω ) 1
0.5
0 ω
0 0.2 0.4 0.6 0.8 1
πω
H (ω ) = 2 cos 0≤ω ≤ B
2B
The data input 1110100010001111110 produces the following output responses:
Cosine filters are also known as duo-binary filters and are used RD3 digital
microwave radio systems and ISDN transmission systems using the 4B3T line
format.
The cosine impulse response is found by taking the real (or even) part of the
inverse Fourier transform:
πω
h(t ) = cos(ωt )dω
B
1
2π 2 cos
0 2B
sin (t − 2πB )ω sin (t + 2πB )ω sin (t − 2πB )B sin (t + 2πB )B
B
= 1
+ = + −0−0
π
2(t − 2πB ) 2(t + 2πB ) 0
2π (t − 2πB ) 2π (t + 2πB )
sin (Bt − 2 ) sin (Bt + 2 )
π π
= +
2π (t − 2πB ) 2π (t + 2πB )
1.273
COS Impulse Response
1.5
h( t ) 1
Amplitude
h1( t )
0.5
h2( t )
2 t 2
Time
Total Response
1st Sinc Pulse
2nd Sinc Pulse
Since the overall response is composed of two sinc pulses the impulse response
is written as f[δ] = 1, 1. Since the maximum bit rate is 1/t and the first zero
crossing occurs at t = 3/4fc, and it would appear that the maximum bit rate is:
1 4 fc
Apparent Maximum Bit Rate = = = 1.33 f c
t 3
This means that 1.33 bits/Hz can be transmitted through this filter or channel.
δ Cosine Filter
Input Output
δ δ Ideal LPF
.5T Output
Input
If two impulses are applied to a cosine channel, the response is:
δ δ
Cosine Filter
Input Output
If they are spaced 0.5T apart. The leading sinc envelope of one pulse completely
overlaps the trailing sinc envelope of the previous pulse.
Combined Response
δ δ Cosine Filter
.5T Output
Input
If the leading sinc envelope of the second pulse completely overlaps the trailing
sinc envelope of the first pulse, a correlation over 1 bit period occurs and the
overall output resembles:
2.0
1.0
1 1 3 2
2 fc fc 2 fc fc
t
0.5 1.0 1.5 2.0
π 2π 3π 4π
B B B B
At first glance, it would appear that this represents only one bit of information,
but if a receiver can decompose this pulse into its sinc components, two bits of
data can be extracted.
To do this, the RD3 radio receiver has a 1 bit delay feedback loop. This
performs a 1-bit correlation since it relates the current signal state to the previous
state.
Using delta pulses as input marks while leaving spaces as zero, causes
synchronization problems in the receiver when long strings of zeros occur. This
can be avoided by using a very simple bipolar encoding scheme.
Example:
1 2 3 5 9
Mark
.5
t
Space
4 6 7 8 10 11 12
It is a little difficult to picture what the overall output shape is, but if each output
pulse is decomposed into its sinc pulse pairs, it becomes clear. Recall that for
every input δ pulse, there are 2 sinc pulses at the output.
2 3
1 5 9
10
4 6
7 8 11 12
Approximate output
The actual output is:
Notice that there is a reduction in the number of zero crossings in the signal, and
therefore a reduction in the channel bandwidth requirements. Note also that there
are three possible levels at the sampling instant:
In order to correctly sample the signal, the sampling instant must be shifted
slightly to correspond to the peak of the Sinc pulse.
input B
output
A
Cosine Filter
τ
The exclusive OR gate goes high only when the current input and the past signal
input are different, a form of differential encoding. A mark will now correspond
to a 0 output level, and a space to the ±2 level.
Sampling Instants
1 1 1
1 1 1
0 0 0
0 0 0 0
Note that by letting a mark equal zero and a space equal a positive or negative
pulse, the original data input can be read directly at the cosine channel output.
In ISDN applications, 4 binary bits can be mapped into 3 ternary levels, resulting
in 4B3T† encoding. This results in some surplus states since 4 binary symbols
represent 16 possible conditions, but 3 ternary symbols represent 27 possible
conditions. These additional states can be used by the service provider to
maintain housekeeping functions without reducing the customer’s bit stream.
1 πω
H (ω ) = 1 + cos 0≤ω ≤ B
2 B
This function is often written slightly differently so that the impulse response
will consist of unit sinc pulses:
† 4 Binary 3 Ternary
H( ω)
4
1 πω 2 1 πω
h(t ) = cos(ω t )dω = cos(ω t )dω
B B
4 cos 2 1 + cos
2π 0 2B π 0 2 B
1 πω
cos(ω t ) + cos(ω t ) cos
B
= dω
π 0 B
B
π π
sin −t ω sin +t ω
1 sin (ω t ) B B
= + +
π t π π
2 −t 2 +t
B B
0
1 1
sin − t 2π sin + t 2π
sin (2π t ) 2 2
h(t ) = + +
πt 1 1
− t 2π + t 2π
2 2
h( t )
h1( t ) 1
Amplitude
h2( t )
h3( t )
2 1.5 1 0.5 0 0.5 1 1.5 2
0.434
1
2 t 2
Time
Total Response
1st Sinc Pulse
2nd Sinc (doubled)
3rd Sinc Pulse
Using this function would appear to be a step backwards since the first zero
crossing occurs at T = 1.0. This however is not the case. Notice that the tail
portion of this response is quite small.
The raised cosine impulse response is composed of three sinc pulses separated
by T = 0.5, the middle one of which is twice as large as the outer ones. Therefor
this function is noted as f[δ] = 1, 2, 1.
In the cosine filter, the first sinc envelope of the second pulse was allowed to
completely overlap the second sinc envelope of the first pulse. Thus a correlation
over 1 bit period occurred.
First pulse
-0.1
0
1 1 3 2
2 fc fc 2 fc fc
π 2π 3π 4π
B B B B
A correlation over 2 bit periods can be obtained by carefully controlling the ISI
and allowing two sinc envelopes on consecutive pulses to overlap. This results in
a 4 level transmission scheme:
One disadvantage of this system is that the frequency components go all the way
down to DC. Some transmission methods cannot handle low frequency or DC.
One method which retains 4 level or quaternary signals found in a raised cosine
channel but has no DC component, is the modified duo–binary technique and is
characterized by sine filters.
It should be noted that the Raised Cosine channel is actually consists of a whole
family of curves. Each of these differs by the roll-off factor.
Sine Filter
πω
H (ω) = sin
B
ω
B
πω
H (ω ) = sin 0 ≤ω ≤ B
B
In order to obtain unity sinc pulses, this function is normally written as:
πω
H (ω ) = 2 sin 0≤ω ≤ B
B
This is also known as a modified duo-binary system. It is used on single
sideband radio systems where the DC levels associated with cosine responses
cannot be tolerated.
Notice that two bit precoding is used in the transmitter. This allows the receiver
to make each binary decision based on the present received value. It also
eliminates the possibility of error propagation.
The impulse response of the sine filter is found by taking the imaginary [or odd]
part of the inverse Fourier transform.
1 πω
h(t ) = sin (ω t )dω
B
2 sin
2π 0 B
1 sin ([πB − t ]ω ) sin ([πB + t ]ω )
B
= −
π 2(πB − t ) 2(πB + t ) 0
1 sin (π − Bt ) sin (π + Bt )
= −
π 2(πB − t ) 2(πB + t )
Normalizing this function we obtain:
h( t ) 1
Amplitude
h1( t )
1.042
2
2 t 2
Time
Total Response
1st Sinc Pulse
2nd Sinc
This function is usually is presented with the positive cycle appearing first
[which is actually the inverse of the above expression].
In the previous types of channels, the sinc components were only separated by t
= 0.5. This function is written as f[δ] = 1, 0, -1.
Mark
Space
T=1
+
Σ
-
Duo Binary Filter
τ
A Modified Duo Binary System
This system is used on digital single sideband radio and can carry 4 bits per Hz
of bandwidth.
Example
1 2 3 5 9
Mark
.5 t
Space
4 6 7 8 10 11 12
The sinc envelope impulse equivalent resembles:
7 11
1 2 3 5 4 6 9 8 10 13 12
1 4 3 6 7 8 10 11 12 13
2 5 9
Approximate Output
Or more accurately, the transmitted output is:
However, this kind of shape does offer the advantage of bandwidth efficiency
and clock recovery.
† 2 Binary 1 Quaternary
Review Questions
Quick Quiz
1. What is the Nyquest bit rate in a 10 KHz ideal low pass filter?
_________________________________________________________
Analytical Problems
1. Given the frequency response H(ω) = 1 for 0 ω B , derive the impulse
response of an ideal brick wall filter:
Ideal LPF
(Brick Wall Filter)
1
ω
0 B
Composition Questions
1. Describe the methods employed to remove long strings of zeros in binary
transmissions.
http://www.national.com/design/
http://pilot.msu.edu/user/hsuhsuni/adsl.htm
http://ironbark.bendigo.latrobe.edu.au/courses/bcomp/c202/lectures/
http://stap.colorado.edu/~hintonm/prs/moreinfo.htm
http://www.minacom.com/DigitalModulationTechniques.htm
http://pioneer.hannam.ac.kr/doc/staffs/note/comm.html
http://www.comcore.com/
http://www.anl.gov/ECT/network/
http://www.teles.de/
Gaussian Processes
http://www.cs.utoronto.ca/~carl/gp.html