Top Banner
3F4 Line Coding Dr. I. J. Wassell
53

3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Mar 31, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

3F4 Line Coding

Dr. I. J. Wassell

Page 2: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Introduction• Line coding is the procedure used to convert an

incoming bit stream, bk to symbols ak which are then sent as pulses akhT(t-kT) on to the channel

• The line coding technique affect the properties of the transmitted signal

• Desirable properties are– Self Synchronisation. There should be sufficient

information in the transitions and zero-crossings to permit symbol timing clock regeneration

Page 3: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Introduction– Spectrum suited to the channel. The PSD of the

transmitted signal should be compatible with the channel frequency response Hc(), eg,

• Many channels cannot pass dc (zero frequency) owing to ac coupling

• Lowpass response limits the ability to carry high frequencies

Page 4: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Line Codes for Copper Cables• Following a qualitative introduction to some

practical line codes, we will look at a framework for their quantitative analysis

• Unipolar Binary– binary symbols transmitted

– pulse weightings, ak=0 or A Volts, eg, ‘0’ and ‘1’

– no guarantee of transitions (for timing regeneration)– transmitted signal has non-zero mean, so the channel

must be able to pass dc. If not, errors will occur with long runs of ‘1’s in the data

Page 5: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Unipolar Binary

1 0 1 1 0 0 0 0 1 1 0 1

0

A

Page 6: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Line Codes for Copper Cables

• Polar Binary (do not confuse with bipolar)– binary symbols transmitted

– pulse weightings, ak=-A or A Volts, eg, ‘0’ and ‘1’

– no guarantee of transitions (for timing regeneration)– transmitted signal is zero mean (provided data is

equiprobable), but there is still a high PSD at low frequencies, therefore still a problem with channels which do not pass dc

Page 7: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Polar Binary

1 0 1 1 0 0 0 0 1 1 0 1

A

0

-A

Page 8: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Line Codes for Copper Cables• Bipolar (or Alternate Mark Inversion (AMI))

– ternary (3 level) symbols transmitted

– pulse weightings, ak=0 or either -A or +A Volts, eg, ‘0’ or ‘1’, that is,

• ‘0’ sent as ak=0

• ‘1’ sent as ak=-A or +A alternately

– no guarantee of transitions (for timing regeneration)– signal mean is always zero (independent of data)– Spectral null at dc means there is no longer a problem

if channel does not pass dc– 1 binary symbol sent as 1 ternary symbol, 1B1T code

Page 9: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Bipolar (AMI)

1 0 1 1 0 0 0 0 1 1 0 1

-A

0

A

Page 10: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Line Codes for Copper Cables

• High Density Bipolar (HDBn)– modified bipolar codes which guarantee transitions

despite runs of zeros.– thus substitute runs of more than n zeros– an alternative name is BnZS

• in this case substitute runs of n or more zeros

– HDB3 is a popular code• note HDB3 is equivalent to B4ZS

Page 11: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

HDB3

• Any run of 4 zeros is replaced by the special pattern: B00D– D is sent as +/- A, such that successive D’s have

alternating polarity (1st D is arbitrary)– B is sent as 0 or +/- A. Select B such that the next D

violates the AMI alternating polarity result, ie send B as 0 if D violates the polarity rule. Otherwise send B=D to force a violation of the alternating polarity rule

Page 12: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

HDB3• Equivalently,

– B is sent as 0 if there has been an odd number of input ‘1’s since the last special sequence B00D

– B is sent as +/- A if there has been an even number of input ‘1’s since the last special sequence B00D

• All other symbols obey the AMI rules

• The scheme allows the unique detection of the special sequences, since polarity violations correspond with the D symbols.

• An overall mean of zero is achieved

Page 13: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

HDB3

1 0 1 1 0 0 0 0 1 1 0 1

-A

0

A

Page 14: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

HDB3• There are never more than 3 consecutive zeros, so

plenty of edges for timing regeneration

• The channel is not required to pass dc

• The transmit power requirement is a little greater than AMI (about 10%)

Page 15: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Power Spectra for Line Codes

• We can use the earlier results concerning power spectra to derive the PSD for PAM schemes

• Initially we will consider the case where the symbols are transmitted as weighted impulses.

• We will then generalise to arbitrary pulse shapes

Page 16: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Signal TX as impulse train• A PAM signal sent as a weighted impulse train is,

n

sn nTtatx )()(

Where Ts is the symbol period. We will show that the PSD of x(t) is given by,

1

)cos()(2)0(1

)(1

)(m

ssm

Tjm

sx mTmRR

TemR

TS s

and][)( mnnaaEmR

Which is the discrete Autocorrelation function (ACF). Also note that R(m) = R(-m) for real valued an

Page 17: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof• Using direct method, ie,

T

XE

TS T

x

])([lim)(

2

• The truncated signal xT(t) is,

s

N

NnsnT TNTnTtatx )12( ,)()(

• Now,

dtetxX tjTT

)()(

And substituting for xT(t) gives,

Page 18: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof

dtenTtaX tjN

NnsnT

)()(

sTjnN

Nnn

tjs

N

Nnn

ea

dtenTta

)(

)()()( *2 TTT XXX Now,

Page 19: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof

• Now,

ss TjkN

Nkk

TjnN

NnnT eaeaX

2|)(|

N

Nn

TnkjN

Nkkn

seaa )(

N

Nn

TnkjN

NkknT

seaaEXE )(2|)(|

N

Nn

TnkjN

Nkkn

seaaE )(][

Page 20: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof• Let, nkmmnk so and

N

Nn

TnmnjnN

nNmmnnT

seaaEXE )(2 ][|)(|

N

Nn

TjmnN

nNm

semR )(

• Replace the outer sum over index n by 2N+1,

sTjmnN

nNmT emRNXE

)()12(|)(| 2

Page 21: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof• Now,

T

XE

TS T

x

])([lim)(

2

Where T=(2N+1)Ts, so

sTjmnN

nNmsx emRN

TNNS

)()12()12(

1lim)(

sTjm

ms

emRT

)(1

Page 22: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof

1

1

11

1

1

)cos()(2)0(1

)()0(1

)()()0(1

)()()0(1

ms

s

TjmTjm

ms

m

Tjm

m

Tjm

s

m

Tjm

m

Tjm

s

mTmRRT

eemRRT

emRemRRT

emRemRRT

ss

ss

ss

Remembering that R(m) = R(-m) for real valued an

Page 23: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Proof

• Note that for R(m)=0 for all m except zero, the PSD reduces to

sx T

RS

)0()(

e.g., for polar binary line coding.

Page 24: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

For Arbitrary Pulse Shapes• Recall that a PAM signal with a desired pulse

shape h(t) may be generated by filtering (actually convolving) the weighted impulse train with a filter whose impulse response is h(t)

• From the power spectra results we obtain, )()()(

2 xy SHS

1

2)cos()(2)0(

1)(

ms

s

mTmRRT

H

Page 25: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

PSD of Specific Schemes• Given a particular line coding scheme which

generates symbols ak, the transmitted PSD is calculated as follows:– Determine the discrete ACF

M

iiimkk pRaaEmR

1

][)(

Where,•M is the number of possible values that akak+m can take on

•Ri is the ith value of akak+m

•pi is the probability that Ri occurs

Page 26: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

PSD of Specific Schemes• Evaluate impulse train PSD

– Substitute R(m) into the PSD formula,

1

)cos()(2)0(1

)(m

ss

x mTmRRT

S

• Evaluate PSD with pulse shaping– Multiply Sx() by |H()|2,

)()()(2 xy SHS

Page 27: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary

1)0(

)5.01()5.01()0(

R

R

mkk bb .... mkk aa .... mkki aaR m ip

M

iii pRmR

1

)(

0

1...1

0...0 1...1

1...1 1

1

2

1

R

R

5.0

5.0

2

1

p

p

1

1...1

0...1

1...0

0...0 1...1

1...1

1...1 1...1 1

1

1

1

4

3

2

1

R

R

R

R

25.0

25.0

25.0

25.0

4

3

2

1

p

p

p

p

0)1(

)25.01(

)25.01()25.01(

)25.01()1(

R

R

1,1:

1,0:

k

k

a

b

Page 28: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary

• So,

1

)cos()(2)0(1

)(m

ss

x mTmRRT

S

sT

1

Page 29: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary• Now extend to pulses with a rectangular

shape and duration Ts. To do this we convolve the impulse stream with a filter h(t) with a rectangular impulse response, i.e., from the E and I Data Book,

tb-b

a FT

2 sinc

babH

x

xx

sin sinc where,

h(t)

Page 30: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary

• In our example, b=Ts and a=1, so the filter frequency response is,

2 sinc s

s

TTH

This response has an amplitude of Ts at = 0 and zero crossings at multiples of 2/Ts rad/s or 1/Ts Hz.

Page 31: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary• Now the PSD at the output of the filter

H() is,2

)()()( HSS xy 2

2 sinc

1

s

ss

TT

T

2

2 sinc

s

s

TT

This response has an amplitude of Ts at = 0 and zero crossings at multiples of 2/Ts rad/s or 1/Ts Hz. This is consistent with the PSD plot for polar binary signalling with rectangular pulses.

Page 32: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Polar Binary

Impulse Train PSD Rectangular Pulse PSD

f *Ts f *Ts

PSD*Ts PSD*Ts

Page 33: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Bipolar (AMI)

mkk bb .... mkk aa .... mkki aaR m ip

M

iii pRmR

1

)(

0

1

2

2

1,1,0:

1,0:

k

k

a

b

Page 34: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Bipolar (AMI)

• So,

1

)cos()(2)0(1

)(m

ss

x mTmRRT

S

2sin

1

)cos(12

1

)cos(4

12

2

11

2 s

s

ss

ss

T

T

TT

TT

Page 35: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Bipolar (AMI)

• Note that if rectangular pulses are employed as in the previous Polar example, the resulting PSD is given by,

2)()()( HSS xy

Where,

2 sinc s

s

TTH

Note the zero crossings at multiples of 2/Ts rad/s or 1/Ts Hz and the lowering of the frequency sidelobes evident in the PSD plot.

Page 36: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Bipolar (AMI)

Impulse Train PSD Rectangular Pulse PSD

f *Ts f *Ts

PSD*Ts PSD*Ts

Page 37: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data

• Sometimes the line coded data will have a non-zero mean value.

• This could be due to– The line coding scheme, e.g., unipolar– The probability distribution of the data– Incorrect signalling voltages owing to faults

• The result is that the R(m) will have finite values for m in the range +/- infinity

Page 38: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data

• The result for Sx() is valid but is hard to interpret physically

• The solution is to express R(m) as the sum of two parts– The first part has a constant value of R over the

range of m from + to - infinity– The second part has non-zero values of R over a

finite range of m

Page 39: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data

• The advantage of this approach is that the first term can be represented in a format that is consistent with physical observations.

• We will now show that this representation comprises a sequence of spikes (impulses) in the frequency domain, occurring at multiples of the bit rate.

Page 40: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• Suppose that R(m)=R for all m, then we can

express the PSD as follows

m

Tjm

sx

semRT

S )(1

)(

m

Tjm

s

seT

R

• Note the similarity in form to the Fourier series representation of an impulse train,

k

tT

jk

k

eT

kTt 0

2

00

1)(

Note in time domain

Page 41: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• Reminder, the Fourier Series (FS) for a

periodic function is,

k

tjkk

oectx )(

i.e., a weighted (complex) sum of phasors.

00

2 where, T

• We now wish to find the FS of the rectangular pulse train x(t),

Tot0

x(t) A

Page 42: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• Now the coefficients are given by,

2

20

01

dtAeT

c tjkk

0

sinT

k

k

A

For the case where goes to zero and A= 1 (i.e., a unit impulse train),

0

0

0

0

1sin

1

0

lim

T

Tk

Tk

Tck

Page 43: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• So we know,

k

tjkk

oectx )(

Remembering that ck=1/T0 when x(t) is a sequence of unit impulses we can write,

k

tjk

k

oeT

kTt 0

01

)(

k

tT

jk

eT

0

2

0

1

Page 44: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• If we substitute, =t, m=k and T0=2/Ts, to get the

equivalent relation in the frequency domain,

m

jmTs

m s

seT

Tm

2)

2(

m ssm

jmT

Tm

Te s )

2(

2

And hence we may express Sx() as a series of impulses in the frequency domain,

m

Tjm

sx

seT

RS )(

m ss T

mT

R)

2(

22

Page 45: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

ACF With Non-Zero Mean Data• The PSD due to a constant R for all m consists of spikes,

known as line spectral components, at multiples of o=2/Ts

• This result enables simplified calculation of PSDs when R(i) can be written in the form,

LiiCRiCiR ||for 0)( with )()(

First calculate the PSD for R(i)=C(i), then add on the line spectrum for R(i)=R

Page 46: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Unipolar Binary

5.0)0(

)5.01()5.00()0(

R

R

mkk bb .... mkk aa .... mkki aaR m ip

M

iii pRmR

1

)(

0

1...1

0...0 0...0

1...1 1

0

2

1

R

R

5.0

5.0

2

1

p

p

1

1...1

0...1

1...0

0...0 0...0

1...0

0...1

1...1 1

0

0

0

4

3

2

1

R

R

R

R

25.0

25.0

25.0

25.0

4

3

2

1

p

p

p

p

25.0)1(

)25.01(

)25.00()25.00(

)25.00()1(

R

R

1,0:

1,0:

k

k

a

b

Page 47: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Unipolar Binary• So,

m

Tjm

sx

semRT

S )(1

)(

m sss

m sss

m

Tjm

s

m

Tjm

s

Tm

TT

Tm

TT

eT

eT

s

s

2

24

1

221

4

1

14

1

4

1

4

11

2

The second term is known as a line spectrum

Page 48: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Example- Unipolar Binary

Impulse Train PSD Rectangular Pulse PSD

f *Ts f *Ts

PSD*Ts PSD*Ts

Page 49: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Scrambling• Some components of a transmission system work

better if the bit sequence bk is random, ie, independent and uncorrelated– Timing regeneration not possible with some line codes

if long sequences of ‘0’s or ‘1’s occur– Equalisers (see next section) rely on random bit

sequences for successful operation

• A common solution is to randomise (or scramble) the input bit sequences (in a known manner) prior to line coding

Page 50: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

• The received signals then appear as if they come from a random source

• Unscrambling after detection restores the correct bit sequence

• A simple way to generate scramblers is to XOR the data with the output of a feedback shift register arrangement.

Scrambling

Page 51: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Scrambling• For example we may utilise the so called

frame-synchronised scrambler (also called a cryptographic scrambler

XOR

PRBS

XOR

PRBS

S T T R

PRBS- Pseudo Random Binary Sequence generator. Usually a Maximal Length (ML) linear feedback shift register arrangement.

A B XOR0 00 11 01 1

0110

PRBS at TX and RX must be synchronised

Page 52: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Scrambling

XOR

XOR

S

XOR

XOR

RT T

• An alternative is the Self-Synchronised scrambler. Is susceptible to error propagation.

• Similar arrangements used for error rate testing.

Page 53: 3F4 Line Coding Dr. I. J. Wassell. Introduction Line coding is the procedure used to convert an incoming bit stream, b k to symbols a k which are then.

Summary

• In this section we have– Examined the need for line codes and looked at

some practical examples– Seen how to calculate the power spectra for

various line codes– Briefly looked at scrambling to randomise data