Documente Academic
Documente Profesional
Documente Cultură
Line Coding
Mobile Communications Handbook
Ed. Suthan S. Suthersan
Boca Raton: CRC Press LLC, 1999
c 1999by CRCPressLLC
Li ne Codi ng
Joseph L. LoCi cero
I llinois I nstituteof Technology
Bhasker P. Patel
I llinois I nstituteof Technology
6.1 Introduction
6.2 Common LineCodingFormats
Unipolar NRZ (Binary On-Off Keying)
Unipolar RZ
Polar
NRZ
Split Phase(Mark)
Biphase
(Mark)
CodeMark Inversion (CMI)
NRZ (I)
Binary N
ZeroSubstitution(BNZS)
High-DensityBipolar N (HDBN)
Ternary Coding
6.4 Multilevel Signalling, Partial ResponseSignalling, and
Duobinary Coding
Multilevel Signalling
Partial ResponseSignallingandDuobi-
nary Coding
6.5 Bandwidth Comparison
6.6 ConcludingRemarks
DeningTerms
References
6.1 Introduction
Theterminology linecodingoriginated in telephony with theneed to transmit digital information
across a copper telephone line; more specically, binary data over a digital repeatered line. The
concept of linecoding, however, readilyappliestoanytransmission lineor channel. In adigital com-
munication system, thereexistsaknown set of symbolstobetransmitted. Thesecan bedesignatedas
{m
i
}, i = 1, 2, . . . , N, withaprobabilityof occurrence{p
i
}, i = 1, 2, . . . , N, wherethesequentially
transmitted symbolsaregenerally assumed to bestatistically independent. Theconversion or coding
of theseabstract symbolsinto real, temporal waveformsto betransmitted in baseband istheprocess
of linecoding. Sincethemost common typeof linecodingisfor binarydata, suchawaveformcan be
succinctly termed adirect format for serial bits. Theconcentration in thissection will belinecoding
for binary data.
Different channel characteristics, aswell asdifferent applicationsand performancerequirements,
have provided the impetus for the development and study of various types of line coding [1, 2] .
For example, thechannel might beac coupled and, thus, could not support a linecodewith a dc
component or largedccontent. Synchronizationor timingrecoveryrequirementsmight necessitatea
discretecomponent at thedatarate. Thechannel bandwidth and crosstalklimitationsmight dictate
c 1999by CRCPressLLC
thetypeof linecodingemployed. Evensuchfactorsasthecomplexityof theencoder andtheeconomy
of thedecoder could determinethelinecodechosen. Each linecodehasitsown distinct properties.
Dependingon theapplication, onepropertymaybemoreimportant than theother. In what follows,
wedescribe, in general, themost desirablefeaturesthat areconsidered when choosingalinecode.
It iscommonly accepted [ 1, 2, 5, 8] that thedominant considerationseffectingthechoiceof aline
codeare: 1) timing, 2) dccontent, 3) power spectrum, 4) performancemonitoring, 5) probabilityof
error, and 6) transparency. Each of thesearedetailed in thefollowingparagraphs.
1) Timing: The waveform produced by a line code should contain enough timing information
such that thereceiver can synchronizewith thetransmitter and decodethereceived signal properly.
Thetimingcontent should berelatively independent of sourcestatistics, i.e., alongstringof 1sor 0s
should not result in lossof timingor jitter at thereceiver.
2) DC content: Sincetherepeatersused in telephony areac coupled, it isdesirableto havezero
dc in the waveform produced by a given line code. If a signal with signicant dc content is used
in ac coupled lines, it will causedcwander in thereceived waveform. That is, thereceived signal
baselinewill vary with time. Telephonelinesdo not passdc dueto ac coupling with transformers
and capacitorsto eliminatedc ground loops. Becauseof this, thetelephonechannel causesadroop
in constant signals. Thiscausesdc wander. It can beeliminated by dc restoration circuits, feedback
systems, or with specially designed linecodes.
3) Power spectrum: The power spectrum and bandwidth of the transmitted signal should be
matched to thefrequency responseof thechannel to avoid signicant distortion. Also, thepower
spectrumshould besuch that most of theenergyiscontained in assmall bandwidth aspossible. The
smaller isthebandwidth, thehigher isthetransmission efciency.
4) Performancemonitoring: It is very desirable to detect errors caused by a noisy transmission
channel. Theerror detection capability in turn allowsperformancemonitoringwhilethechannel is
in use(i.e., without elaboratetestingproceduresthat requiresuspendinguseof thechannel).
5) Probabilityof error: The average error probability should be as small as possible for a given
transmitter power. Thisreectsthereliability of thelinecode.
6) Transparency: Alinecodeshould allowall thepossiblepatternsof 1sand 0s. If acertain pattern
isundesirabledueto other considerations, it should bemapped to auniquealternativepattern.
6.2 CommonLineCodingFormats
A linecoding format consists of a formal denition of thelinecodethat species how a string of
binarydigitsareconverted toalinecodewaveform. Therearetwomajor classesof binarylinecodes:
level codesand transitioncodes. Level codescarry information in their voltagelevel, which may be
high or lowfor afull bit period or part of thebit period. Level codesareusually instantaneoussince
they typically encodeabinary digit into adistinct waveform, independent of any past binary data.
However, somelevel codesdo exhibit memory. Transition codescarry information in thechangein
level appearingin thelinecodewaveform. Transition codesmaybeinstantaneous, but theygenerally
havememory, usingpast binarydatatodictatethepresent waveform. Therearetwocommon forms
of level linecodes: oneiscalledreturntozero(RZ)andtheother iscalled nonreturntozero(NRZ).
In RZ coding, thelevel of thepulsereturnsto zero for aportion of thebit interval. In NRZ coding,
thelevel of thepulseismaintained duringtheentirebit interval.
Linecoding formats arefurther classied according to thepolarity of thevoltagelevels used to
represent thedata. If only onepolarity of voltagelevel isused, i.e., positiveor negative(in addition
to thezero level) then it iscalled unipolarsignalling. If both positiveand negativevoltagelevelsare
beingused, with or without azero voltagelevel, then it iscalled polar signalling. Thetermbipolar
c 1999by CRCPressLLC
signallingisused by someauthorsto designateaspeciclinecodingschemewith positive, negative,
and zero voltagelevels. Thiswill bedescribed in detail later in thissection. Theformal denition
of vecommon linecodesisgiven in thefollowingalongwith arepresentativewaveform, thepower
spectral density(PSD), theprobability of error, and adiscussion of advantagesand disadvantages. In
somecasesspecicapplicationsarenoted.
6.2.1 Unipolar NRZ (BinaryOn-Off Keying)
In thislinecode, abinary 1isrepresented by anon-zero voltagelevel and abinary 0isrepresented
by azero voltagelevel asshown in Fig. 6.1(a). Thisisan instantaneouslevel code. ThePSD of this
codewith equally likely 1sand 0sisgiven by [ 5, 8]
S
1
(f ) =
V
2
T
4
sin f T
f T
2
+
V
2
4
(f ) (6.1)
whereV isthebinary 1voltagelevel, T = 1/R isthebit duration, and R isthebit ratein bitsper
second. Thespectrumof unipolar NRZisplottedinFig. 6.2a. ThisPSDisatwo-sidedevenspectrum,
although only half of theplot isshown for efciency of presentation. If theprobability of abinary
1isp, and theprobability of abinary 0is(1 p), then thePSD of thiscode, in themost general
case, is4p(1 p) S
1
(f ). Consideringthefrequencyof therst spectral null asthebandwidth of the
waveform, thebandwidthof unipolar NRZisR in hertz. Theerror rateperformanceof thiscode, for
equally likely data, with additivewhiteGaussian noise(AWGN) and optimum, i.e., matched lter,
detection isgiven by [ 1, 5]
P
e
=
1
2
erfc
E
b
2N
0
(6.2)
whereE
b
/N
0
isameasureof thesignal-to-noiseratio (SNR) of thereceived signal. In general, E
b
is
theenergyper bit andN
0
/2 isthetwo-sidedPSDof theAWGN. Morespecically, for unipolar NRZ,
E
b
istheenergy in abinary 1,which isV
2
T . Theperformanceof theunipolar NRZ codeisplotted
in Fig. 6.3
Theprincipleadvantagesof unipolar NRZ areeaseof generation, sinceit requiresonly a single
power supply, andarelativelylowbandwidthof R Hz. Therearequiteafewdisadvantagesof thisline
code. A lossof synchronization and timingjitter can result with alongsequenceof 1sor 0sbecause
no pulsetransition ispresent. Thecodehasno error detection capability and, hence, performance
cannot bemonitored. Thereisa signicant dc component aswell asa dc content. Theerror rate
performanceisnot asgood asthat of polar linecodes.
6.2.2 Unipolar RZ
Inthislinecode, abinary1isrepresentedbyanonzerovoltagelevel duringaportionof thebit duration,
usually for half of thebit period, and azero voltagelevel for rest of thebit duration. A binary 0is
represented by azerovoltagelevel duringtheentirebit duration. Thus, thisisan instantaneouslevel
code. Figure6.1(b) illustratesaunipolar RZ waveform in which the1isrepresented by anonzero
voltagelevel for half thebit period. ThePSD of thislinecode, with equally likely binary digits, is
given by [ 5, 6, 8]
S
2
(f ) =
V
2
T
16
sin f T/2
f T/2
2
c 1999by CRCPressLLC
1
Unipolar RZ
(a)
0 1 1 0 0 0 1 1 1 0
T 3T 2T 4T 5T 6T 7T 8T 9T 10T 11T
T 3T 2T 4T 5T 6T 7T 8T 9T 10T 11T
Unipolar RZ
(b)
Polar NRZ
(c)
Bipolar (AMI)
(d)
Manchester (Bi-phase)
(e)
Delay Modulation
(f)
Split Phase (Mark)
(g)
Split Phase (Space)
(h)
Bi-Phase (Mark)
(i)
Bi-Phase (Space)
(j)
Code Mark Inversion
(k)
NRZ (M)
(l)
NRZ (s)
(m)
FIGURE6.1: Waveformsfor different linecodes.
c 1999by CRCPressLLC
Figure6.2a Power spectral density of different linecodes, whereR = 1/T isthebit rate.
+
V
2
4
2
2
4
(f ) +
n=
1
(2n +1)
2
(f (2n +1)R)
(6.3)
whereagain V isthebinary 1voltagelevel, and T = 1/R isthebit period. Thespectrum of this
codeisdrawn in Fig. 6.2a. In themost general case, when theprobability of a1isp, thecontinuous
portion of thePSD in Eq. (6.3) isscaled by thefactor 4p(1 p) and thediscreteportion isscaled by
thefactor 4p
2
. Therst null bandwidth of unipolar RZ is2R Hz. Theerror rateperformanceof this
linecodeisthesameasthat of theunipolar NRZ provided weincreasethevoltagelevel of thiscode
such that theenergy in binary 1,E
b
, isthesamefor both codes. Theprobability of error isgiven by
Eq. (6.2) and identied in Fig. 6.3. If thevoltagelevel and bit period arethesamefor unipolar NRZ
and unipolar RZ, then theenergy in abinary1for unipolar RZ will beV
2
T/2 and theprobability of
error isworseby 3dB.
Themain advantagesof unipolar RZ are, again, easeof generation sinceit requiresasinglepower
supply and thepresenceof a discretespectral component at thesymbol rate, which allows simple
timingrecovery. A number of disadvantagesexist for thislinecode. It hasanonzero dccomponent
andnonzerodccontent, whichcanleadtodcwander. Alongstringof 0swill lackpulsetransitionsand
couldleadtolossof synchronization. Thereisnoerror detection capabilityand, hence, performance
monitoringisnot possible. Thebandwidth requirement (2R Hz) ishigher than that of NRZ signals.
Theerror rateperformanceisworsethan that of polar linecodes.
Unipolar NRZ aswell asunipolar RZ areexamplesof pulse/no-pulsetypeof signalling. In this
c 1999by CRCPressLLC
Figure6.2b Power spectral density of different linecodes, whereR = 1/T isthebit rate.
type of signalling, the pulse for a binary 0, g
2
(t ), is zero and the pulse for a binary 1is specied
genericallyasg
1
(t ) = g(t ). UsingG(f ) astheFourier transformof g(t ), thePSDof pulse/no-pulse
signallingisgiven as[ 6, 7, 10]
S
PNP
(f ) = p(1 p)R|G(f )|
2
+p
2
R
2
n=
|G(nR)|
2
(f nR) (6.4)
wherep istheprobability of abinary 1,and R isthebit rate.
6.2.3 Polar NRZ
In thislinecode, abinary 1isrepresented by apositivevoltage+V and abinary 0isrepresented by
anegativevoltageV over thefull bit period. Thiscodeisalso referred to asNRZ (L), sinceabit
isrepresented by maintainingalevel (L) duringitsentireperiod. A polar NRZ waveform isshown
in Fig. 6.1(c). Thisisagain an instantaneouslevel code. Alternatively, a1may berepresented by a
V voltagelevel and a 0by a +V voltagelevel, without changing thespectral characteristics and
c 1999by CRCPressLLC
FIGURE6.3: Bit error probability for different linecodes.
performanceof thelinecode. ThePSD of thislinecodewith equally likely bitsisgiven by [ 5, 8]
S
3
(f ) = V
2
T
sin f T
f T
2
(6.5)
Thisisplotted in Fig. 6.2b. When theprobability of a1isp, and p isnot 0.5, adccomponent exists,
and thePSD becomes[ 10]
S
3p
(f ) = 4V
2
Tp(1 p)
sin f T
f T
2
+V
2
(1 2p)
2
(f ) (6.6)
c 1999by CRCPressLLC
Therst null bandwidth for thislinecodeisagain R Hz, independent of p. Theprobability of error
of thislinecodewhen p = 0.5 isgiven by [ 1, 5]
P
e
=
1
2
erfc
E
b
N
0
(6.7)
Theperformanceof polar NRZ isplotted in Fig. 6.3. Thisisbetter than theerror performanceof the
unipolar codesby 3dB.
Theadvantagesof polar NRZ includealow-bandwidth requirement, R Hz, comparabletounipo-
lar NRZ, very good error probability, and greatly reduced dc because the waveform has a zero dc
component when p = 0.5 even though thedc content isnever zero. A few notabledisadvantages
arethat thereisno error detection capability, and that alongstringof 1sor 0scould result in lossof
synchronization, sincethereareno transitionsduringthestringduration. Two power suppliesare
required to generatethiscode.
6.2.4 Polar RZ [Bipolar, AlternateMark Inversion(AMI), or Pseudoternary]
In thisscheme, abinary1isrepresented byalternatingthepositiveand negativevoltagelevels, which
return tozerofor aportion of thebit duration, generallyhalf thebit period. Abinary0isrepresented
byazerovoltagelevel duringtheentirebit duration. Thislinecodingschemeisoften calledalternate
markinversion(AMI)since1s(marks) arerepresented by alternatingpositiveand negativepulses.
It isalso called pseudoternarysincethreedifferent voltagelevelsareused to represent binary data.
Someauthorsdesignatethislinecodeasbipolar RZ(BRZ). AnAMI waveformisshowninFig. 6.1(d).
Notethat thisisalevel codewith memory. TheAMI codeiswell known for itsusein telephony. The
PSD of thislinecodewith memory isgiven by [ 1, 2, 7]
S
4p
(f ) = 2p(1 p)R|G(f )|
2
1 cos 2f T
1 +(2p 1)
2
+2(2p 1) cos 2f T
(6.8)
whereG(f ) istheFourier transformof thepulseusedtorepresent abinary1,andp istheprobability
of abinary 1. When p = 0.5 and squarepulseswith amplitudeV and duration T/2 areused to
represent binary 1s, thePSD becomes
S
4
(f ) =
V
2
T
4
sin f T/2
f T/2
2
sin
2
(f T ) (6.9)
ThisPSD isplotted in Fig. 6.2a. Therst null bandwidth of thiswaveform isR Hz. Thisistruefor
RZ rectangular pulses, independent of thevalueof p in Eq. (6.8). Theerror rateperformanceof this
linecodefor equally likely binary dataisgiven by [ 5]
P
e
3
4
erfc
E
b
2N
0
, E
b
/N
0
> 2 (6.10)
Thiscurveisplotted in Fig. 6.3and isseen to beno morethan 0.5dBworsethan theunipolar codes.
Theadvantagesof polar RZ (or AMI, asit ismost commonly called) outweigh thedisadvantages.
Thiscodehasno dc component and zero dc content, completely avoidingthedc wander problem.
Timing recovery is rather easy since squaring, or full-wave rectifying, this type of signal yields a
unipolar RZ waveform with adiscretecomponent at thebit rate, R Hz. Becauseof thealternating
c 1999by CRCPressLLC
polarity pulses for binary 1s, this code has error detection and, hence, performance monitoring
capability. It hasalow-bandwidth requirement, R Hz, comparableto unipolar NRZ. Theobvious
disadvantageisthat theerror rateperformanceisworsethanthat of theunipolar andpolar waveforms.
A longstringof 0scould result in lossof synchronization, and two power suppliesarerequired for
thiscode.
6.2.5 Manchester Coding(Split Phaseor Digital Biphase)
In thiscoding, abinary1isrepresentedbyapulsethat haspositivevoltageduringtherst-half of the
bit duration and negativevoltageduringsecond-half of thebit duration. A binary 0isrepresented
by apulsethat isnegativeduring therst-half of thebit duration and positiveduring thesecond-
half of the bit duration. The negative or positive midbit transition indicates a binary 1or binary
0, respectively. Thus, aManchester codeisclassied asan instantaneoustransition code; it hasno
memory. Thecodeisalso called diphasebecauseasquarewavewith a0
phaseisused to represent a
binary 1and asquarewavewith aphaseof 180
sin f T/2
f T/2
2
sin
2
(f T/2) (6.11)
whereV areused asthepositive/negativevoltagelevelsfor thiscode. Itsspectrum isplotted in
Fig. 6.2b. When theprobability p of abinary 1, isnot equal to one-half, thecontinuousportion of
thePSD isreduced in amplitudeand discretecomponentsappear at integer multiplesof thebit rate,
R = 1/T . TheresultingPSD is[ 6, 10]
S
5p
(f ) = V
2
T 4p(1 p)
sin f T/2
f T/2
2
sin
2
f T
2
+V
2
(1 2p)
2
n=,n=0
2
n
2
(f nR) (6.12)
Therst null bandwidth of thewaveform generated by aManchester codeis2R Hz. Theerror rate
performanceof thiswaveform when p = 0.5 isthesameasthat of polar NRZ, given by Eq. (6.9),
and plotted in Fig. 6.3.
Theadvantagesof thiscodeincludeazero dc content on an individual pulsebasis, so no pattern
of bitscan causedcbuildup; midbit transitionsarealwayspresent makingit iseasy to extract timing
information; and it hasgood error rateperformance, identical topolar NRZ. Themain disadvantage
of thiscodeisalarger bandwidththan anyof theother common codes. Also, it hasnoerror detection
capability and, hence, performancemonitoringisnot possible.
Polar NRZandManchester codingareexamplesof theuseof purepolar signallingwherethepulse
for a binary 0, g
2
(t ) is the negative of the pulse for a binary 1, i.e., g
2
(t ) = g
1
(t ). This is also
referred to asan antipodal signal set. For thisbroad typeof polar binary linecode, thePSD isgiven
by [ 10]
S
BP
(f ) = 4p(1 p)R|G(f )|
2
+(2p 1)
2
R
2
n=
|G(nR)|
2
(f nR) (6.13)
where|G(f )| isthemagnitudeof theFourier transformof either g
1
(t ) or g
2
(t ).
c 1999by CRCPressLLC
A further generalization of the PSD of binary line codes can be given, wherein a continuous
spectrum and adiscretespectrum isevident. Let abinary 1, with probability p, berepresented by
g
1
(t ) over theT = 1/R secondbit interval; andlet abinary0,with probability1p, berepresented
by g
2
(t ) over thesameT second bit interval. Thetwo-sided PSD for thisgeneral binary linecode
is[ 10]
S
GB
(f ) = p(1 p)R|G
1
(f ) G
2
(f )|
2
+R
2
n=
|pG
1
(nR) +(1 p)G
2
(nR)|
2
(f nR) (6.14)
wheretheFourier transformof g
1
(t ) and g
2
(t ) aregiven by G
1
(f ) and G
2
(f ), respectively.
6.3 AlternateLineCodes
Most of thelinecodesdiscussedthusfar wereinstantaneouslevel codes. OnlyAMI hadmemory, and
Manchester wasan instantaneoustransition code. Thealternatelinecodespresented in thissection
all havememory. Therst four aretransition codes, wherebinarydataisrepresented asthepresence
or absenceof atransition, or bythedirection of transition, i.e., positivetonegativeor viceversa. The
last four codesdescribed in thissection arelevel linecodeswith memory.
6.3.1 DelayModulation(Miller Code)
In thislinecode, abinary 1isrepresented by atransition at themidbit position, and abinary 0is
representedbynotransitionat themidbit position. If a0isfollowedbyanother 0,however, thesignal
transition also occursat theend of thebit interval, that is, between thetwo 0s. An exampleof delay
modulationisshowninFig. 6.1(f ). It isclear that delaymodulationisatransitioncodewithmemory.
Thiscodeachievesthegoal of providing good timing content without sacricing bandwidth. The
PSD of theMiller codefor equally likely dataisgiven by [ 10]
S
6
(f ) =
V
2
T
2(f T )
2
(17 +8 cos 2f T )
(23 2 cos f T 22 cos 2f T
12 cos 3f T +5 cos 4f T +12 cos 5f T
+2 cos 6f T 8 cos 7f T +2 cos 8f T ) (6.15)
This spectrum is plotted in Fig. 6.2b. The advantages of this code are that it requires relatively
low bandwidth, most of the energy is contained in less than 0.5R. However, there is no distinct
spectral null within the2R-Hz band. It haslowdc content and no dc component. It hasvery good
timing content, and carrier tracking is easier than Manchester coding. Error rate performance is
comparableto that of thecommon linecodes. Oneimportant disadvantageisthat it hasno error
detection capability and, hence, performancecannot bemonitored.
6.3.2 Split Phase(Mark)
This code is similar to Manchester in the sense that there are always midbit transitions. Hence,
this codeis relatively easy to synchronizeand hasno dc. UnlikeManchester, however, split phase
(mark) encodes a binary digit into a midbit transition dependent on the midbit transition in the
c 1999by CRCPressLLC
previousbit period [ 12] . Specically, abinary 1producesareversal of midbit transition relativeto
thepreviousmidbit transition. A binary 0producesno reversal of themidbit transition. Certainly
thisisatransition codewith memory. An exampleof asplit phase(mark) coded waveformisshown
in Fig. 6.1(g), where the waveform in the rst bit period is chosen arbitrarily. Since this method
encodesbitsdifferentially, thereisno 180