Nothing Special   »   [go: up one dir, main page]

Line Codes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Presentation in course TTT4130 Digital Communication Line codes and scrambling

Curriculum found in Barry, Lee, Messerschmitt Chapter 19 (19.1, 19.3 and 19.5)

IET, NTNU Digital Communication, Line codes and scrambling

Line coding

The purpose of a line code is to match the output signal to the channel for baseband transmission. The line coder consists of a mapping of bits into symbols (nonlinear) and a pulseshaping lter (linear).
IET, NTNU Digital Communication, Line codes and scrambling 2

Properties of line codes


Power spectrum Timing recovery properties DC-balance (zero DC component)
Redundancy Linearity Polarity independence
IET, NTNU Digital Communication, Line codes and scrambling 3

Efciency and redundancy


Maximum bitrate: R = fb lb(L) (lb = log2) L: no of output symbol levels fb: symbol rate in symb/s B: actual bitrate in bit/s Code efciency: Redundancy: = B/R r = 1IET, NTNU Digital Communication, Line codes and scrambling 4

Example, 4B3T code


The 4B3T code is coding 4 input bits to 3 three-level symbols (24 = 16 combinations of input and 33 = 27 potential output
combinations).

Maximum bitrate: R = fb lb 3 Actual bitrate: Code efciency: Redundancy: B = fb 4/3 = R/B = 4/(3lb 3) = 0.84 r = 1- 0.84 = 0.16
IET, NTNU Digital Communication, Line codes and scrambling 5

Linear codes
Input symbols are ak = 1 and pulseshapes are dened in Fig 19.2

Biphase has zero DC component in each pulse RZ and NRZ may have a DC component
Biphase and RZ has transitions in each pulse ): good timing properties NRZ may have long sequences of +1 or -1 ): poor timing properties
IET, NTNU Digital Communication, Line codes and scrambling 6

Coded sequences

IET, NTNU Digital Communication, Line codes and scrambling 7

AMI code (Alternate Mark Inversion)


ak = 0 bk = 0 1 bk = 1 (alternating 1 and + 1)

The AMI code may be generated as shown in the gure:


bk = 0 : c k = c k 1 ak = 0 bk = 1: c k c k 1 ak = 1 c k changes between 0 and 1 each time bk = 1

+ zero DC component - may contain long sequences of 0 (poor timing recovery)


IET, NTNU Digital Communication, Line codes and scrambling 8

DC-balance
Most transmission systems will be a.c. coupled. In metallic cables a transformer is used to avoid overvoltages. A.c. coupling may also be used due to implementation aspects. A.c. coupling means that d.c. is ltered out in a high-pass lter as shown in Fig 19.1a. This causes a slowly varying InterSymbol Interference that is denoted baseline wander. A Nyquist channel + a high pass lter in cascade will give a model for ISI as shown in Fig 19.1b.
= 2RC = exp(-T/ )

IET, NTNU Digital Communication, Line codes and scrambling 9

Running digital sum


By assuming = 1, the overall time discrete impulse response may be approximated: 0 k <0
pk = p(kT) = 1 T/
am pk
m= k

k =0 k >0
m

Output signal at time k:

yk =

= ak

k 1

am = ak
m=

Sk

Running digital sum, RDS:

Sk =
m=

am
ISI(k) = T Sk
1

Intersymbol interference at time k:


max(ISI) = T min(Sk 1 ), max(ISI)

for independent ak

For a balanced line code RDS is bounded, and the DC content is zero.
IET, NTNU Digital Communication, Line codes and scrambling 10

Impulse response for DC cutoff,


simulation example illustrating baseline wander

Cosine rolloff 100% + H( f ) = j j +2 0.02

3 dB cutoff frequency: 0.02/T =T/(2 0.02)=7.96T

IET, NTNU Digital Communication, Line codes and scrambling 11

Eye curve for NRZ code with DC cutoff


Cosine rolloff 100% + j H( f ) = j + 2 0.02

NRZ is an unbalanced line code ): serious baseline wander

IET, NTNU Digital Communication, Line codes and scrambling 12

Eye curve for AMI code with DC cutoff

Cosine rolloff 100% + H( f ) = j j +2 0.02

AMI is a balanced line code ): small ISI

IET, NTNU Digital Communication, Line codes and scrambling 13

Power spectrum of a line code


Transmitted signal:
X(t) =
k=

ak g(t kT)

Power spectrum:

SX ( f ) =

1 Sa (e j 2 T

fT

) G( f )

Sa(z) : Time discrete power spectrum of sequence {ak}

IET, NTNU Digital Communication, Line codes and scrambling 14

Power spectrum NRZ code

IET, NTNU Digital Communication, Line codes and scrambling 15

Power spectrum Biphase

IET, NTNU Digital Communication, Line codes and scrambling 16

Power spectrum AMI code

IET, NTNU Digital Communication, Line codes and scrambling 17

Power spectrum for three simple codes

NB: All codes have equal average power

IET, NTNU Digital Communication, Line codes and scrambling 18

Comparison of simple codes


Code RZ NRZ Biphase AMI Balanced no no yes yes
Timing properties Minimum bandwidth

good poor good poor

1/(2T) 1/(2T) 1/T 1/(2T)

IET, NTNU Digital Communication, Line codes and scrambling 19

Ternary (3-level) codes


An kBnT block code is coding k bits into n 3-level symbols

IET, NTNU Digital Communication, Line codes and scrambling 20

One alternative of a 4B3T code

IET, NTNU Digital Communication, Line codes and scrambling 21

Binary codes
Binary codes are relevant for optical transmission. The number of balanced codewords of length n is given by:
N= n! (n /2)! (n /2)!

Corresponding codes are shown in the table

Due to low efciency, nBmB codes are used instead, where m = n +1 (e.g. 5B6B)
IET, NTNU Digital Communication, Line codes and scrambling 22

Partial response
ck = 1 yk

F(z)

F(z) = (1 - z-1)m (1 + z-1)n

IET, NTNU Digital Communication, Line codes and scrambling 23

Alternatives of partial response


Type partial response Dicode Duobinary Modied duobinary n= 0 1 1 m= 1 0 1 F(z)= 1-z-1 1+z-1 (1+z-1)(1-z-1)=1-z-2

1 z 1 = 1 exp( j2 fT) = 2 j exp( j fT) sin( fT), ) : zero at f = 0 1+ z 1 = 1+ exp( j2 fT) = 2 exp( j fT) cos( fT), ) : zero at f = 1/(2T)
IET, NTNU Digital Communication, Line codes and scrambling 24

Duobinary partial response


yk = ck + ck-1
ck -1 -1 1 1 ck-1 -1 1 -1 1 Output yk -2 0 0 2

For duobinary, a two-level signal is coded into three levels. Modied duobinary and dicode will also have three-level output for binary input. Other alternatives of partial response will have more output levels.
IET, NTNU Digital Communication, Line codes and scrambling 25

Spectral shaping by partial response

IET, NTNU Digital Communication, Line codes and scrambling 26

Decoding of partial response


?
ck - ck-1 ck-1 ck - ck-1 ck-1

ck - ck-1

IET, NTNU Digital Communication, Line codes and scrambling 27

Precoding of partial response (duobinary)


Precoder

bk = 0,1

dk = 0,1

Convert to bipolar

Duobinary coding

0 to -1 1 to +1

ck = 1 z-1

ak

3-level decision

bk

z-1 bk = 0 dk = dk bk = 1 dk dk
1 1

ck = ck ck ck

1 1

ak = c k + c k 1 = 2 bk = 0 ak = c k + c k 1 = 0 bk = 1

Decoding depends only on current received signal sample ): no error propagation. Precoding may be used also for modied duobinary and dicode.
IET, NTNU Digital Communication, Line codes and scrambling 28

Scrambling
Most transmission systems are based on an assumption of random input data ): statistically independent bits and p(0) = p(1) = 1/2 Practical input data often differ from this assumption and may for instance contain long strings of ones or zeroes Scrambling is a way to ensure approximately random data Scrambling is based on pseudorandom sequences generated by linear feedback shift registers.

IET, NTNU Digital Communication, Line codes and scrambling 29

Linear feedback shift register


Number of states in a shift register of length n: 2n The output sequence is periodic, and for a maximum length shift register the period is: 2n-1

IET, NTNU Digital Communication, Line codes and scrambling 30

Frame-synchronized scrambler
Assuming error free transmission:

bk = c k

xk = ck

x k = bk

xk

x k = bk

- The transmitter and receiver shift registers have to be synchronized + One bit error per transmission error
IET, NTNU Digital Communication, Line codes and scrambling 31

Self synchronized scrambler


Assuming error free transmission:

bk = c k

dk = c k

dk = bk

dk

dk = bk

+ Automatic synchronization - Minimum three bit errors per transmission error


IET, NTNU Digital Communication, Line codes and scrambling 32

Applications of scrambling
Echo cancelling
Two different scramblers, one for each direction of transmission

Synchronization Adaptive equalization Interference cancellation ...


IET, NTNU 33

Digital Communication, Line codes and scrambling

Maximum length shift registers

IET, NTNU Digital Communication, Line codes and scrambling 34

Table of maximum length shift registers

IET, NTNU Digital Communication, Line codes and scrambling 35

You might also like