Anda di halaman 1dari 31

Line Coding

What is Line Coding?


Process of converting binary data into a digital signal Properties of Line Coding
Signal level / Data level
Signal level refers to the number of possible values that a signal can have Data level refers to the number of values used to represent data (two levels for binary)

Pulse rate (or modulation rate)


Number of pulses per second For a number of line coding schemes, there is a pulse per bit interval; for some, it is possible to have no pulse for certain segments of the data stream
Dacomun/J. Catalan Line Coding 2

Properties of line coding (contd)


Spectrum It is desirable to:
Lack of high frequencies reduces required bandwidth Lack of dc component allows ac coupling via transformer, providing isolation Concentrate power in the middle of the bandwidth

Clocking
Synchronizing the transmitter and receiver
External clock Sync mechanism based on signal (self-clocking) (self-

Error Detection
Some schemes have inherent ability to detect errors
Dacomun/J. Catalan Line Coding 3

Properties of line coding (contd)


Noise Immunity
Some schemes are more immune to noise and interference than others

Cost and Complexity


Higher signal rate (& thus data rate) lead to higher costs Some codes require signal rate greater than data rate Some codes require more complex circuits

Need to identify
Timing of bits - when they start and end Signal levels
Dacomun/J. Catalan Line Coding 4

Line Coding Schemes


Unipolar, polar or bipolar
Unipolar zero or positive (or negative) Polar two polarities (one positive, one negative) Bipolar two polarities and zero

NRZ, RZ, Phase encoded or Multilevel binary


NRZ two levels RZ three levels PhasePhase-encoded uses phase inversion Multilevel Binary -

Dacomun/J. Catalan

Line Coding

NRZ Encoding
NRZNRZ-L
1 0 1 1 0 0 0 1 1 0 1

or

Dacomun/J. Catalan

Line Coding

NRZ Encoding
NRZNRZ-L
Two different voltages for 0 and 1 bits Voltage constant during bit interval
no transition I.e. no return to zero voltage e.g. Absence of voltage for zero, constant positive voltage for one

More often, negative voltage for one value and positive for the other Widespread use in digital logic systems

Dacomun/J. Catalan

Line Coding

Differential NRZ Encoding


NRZNRZ-M or NRZ-I NRZ1 0 1 1 0 0 0 1 1 0 1

One (or mark) is indicated by a change in level at the start of the bit interval Zero data is indicated by no signal transition Primarily used in magnetic recording
Dacomun/J. Catalan Line Coding 8

Differential NRZ Encoding


NRZNRZ-S
1 0 1 1 0 0 0 1 1 0 1

Zero (or space) is indicated by a change in level at the start of the bit interval One data is indicated by no signal transition

Dacomun/J. Catalan

Line Coding

NRZ Pros and Cons


Pros
Easy to engineer Make good use of bandwidth

Cons
dc component Lack of synchronization capability

Used for magnetic recording Not often used for signal transmission

Dacomun/J. Catalan

Line Coding

10

RZ Encoding
Unipolar RZ
1 0 1 1 0 0 0 1 1 0 1

One is represented by a half-width pulse halfZero is represented by the absence of pulse Used in baseband transmission and magnetic recording

Dacomun/J. Catalan

Line Coding

11

RZ Encoding
Bipolar RZ
1 0 1 1 0 0 0 1 1 0 1

Ones and Zeros are represented by half-bit pulses of halfopposite polarities There is a pulse for every bit sent Used in baseband transmission and magnetic recording
Dacomun/J. Catalan Line Coding 12

Multilevel Encoding
Bipolar AMI (Alternate mark inversion)
1 0 1 1 0 0 0 1 1 0 1

zero represented by no line signal one represented by positive or negative pulse one pulses alternate in polarity

Dacomun/J. Catalan

Line Coding

13

Multilevel Encoding
Pseudoternary
1 0 1 1 0 0 0 1 1 0 1

One represented by absence of line signal Zero represented by alternating positive and negative

Dacomun/J. Catalan

Line Coding

14

B-AMI and Pseudoternary characteristics


Not as efficient as NRZ Each signal element only represents one bit
In a 3 level system could represent log23 = 1.58 bits

Receiver must distinguish between three levels (+A, -A, 0) Requires approx. 3dB more signal power for same probability of bit error No loss of sync if a long string of ones (B-AMI) or zeros (B(Pseudoternary) No net dc component Lower bandwidth Easy error detection
Dacomun/J. Catalan Line Coding 15

Scrambling techniques for B-AMI BScrambling


Use scrambling to replace sequences that would produce constant voltage Filling sequence
Must produce enough transitions to sync Must be recognized by receiver and replace with original Same length as original

No dc component No long sequences of zero level line signal No reduction in data rate Error detection capability

Dacomun/J. Catalan

Line Coding

16

Scrambling techniques for B-AMI BB8ZS (Bipolar with 8 zero substitution)


a variant of BnZS techniques Based on bipolar-AMI bipolarIf octet of all zeros and last voltage pulse preceding was positive encode as 000+-0-+ 000+If octet of all zeros and last voltage pulse preceding was negative encode as 000-+0+000-+0+Causes two violations of AMI code
Unlikely to occur as a result of noise ( therefore offers a means for error detection )

Receiver detects and interprets as octet of all zeros Commonly used in North America
Dacomun/J. Catalan Line Coding 17

Scrambling techniques for B-AMI BHDB3 (high-density bipolar-3-zeros) (highbipolarHigh Density Bipolar 3 Zeros Based on bipolar-AMI bipolarString of four zeros replaced with one or two pulses Commonly used in Europe and Japan
Polarity of last violation

Dacomun/J. Catalan

Line Coding

18

Scrambling techniques for B-AMI B-

Dacomun/J. Catalan

Line Coding

19

Multilevel Encoding
MLTMLT-3 (multiline transmission three level)
1 0 1 1 0 0 0 1 1 0 1

One represented by a signal transition at the beginning of the 1 bit from current level to the next in the sequence 10 -1 0 1 -1 1 There is no transition at the start of a zero bit
Dacomun/J. Catalan Line Coding 20

Multilevel Encoding
2B1Q (two binary one quarternary)
1 0 1 1 0 0 0 1 1 0

00: -3 | 01: -1 | 10: 3 | 11: 1

Uses four levels of signaling Each signaling level represents two bits A form of pulse amplitude modulation (PAM) Used in ISDN and some HDSL systems
Dacomun/J. Catalan Line Coding 21

Phase encoding
bi-phase-L bi-phase1 0 1 1 0 0 0 1 1 0 1

A one bit is represented by a half-bit-wide pulse half-bitpositioned at the first half of the interval A zero bit is placed at the second half of the interval A rising or falling edge is always present at mid-bit midManchester coding uses reverse positions of half-bit halfones with rising mid-bit transition for a data bit of one midUsed for magnetic recording and data communications
Dacomun/J. Catalan Line Coding 22

Phase encoding
bi-phase- M bi-phase1 0 1 1 0 0 0 1 1 0 1

Assumes prior to t=0 a high level was last asserted

A transition occurs at the start of the bit interval A one bit is represented by a second transition half a bit later A zero bit does not have a second transition
Dacomun/J. Catalan Line Coding 23

Phase encoding
bi-phase- S bi-phase1 0 1 1 0 0 0 1 1 0 1

Assumes prior to t=0 a high level was last asserted

A transition occurs at the start of the bit interval A zero bit is represented by a second transition half a bit later A one bit does not have a second transition
Dacomun/J. Catalan Line Coding 24

Phase encoding
Delay modulation (Miller codes)
1 0 1 1 0 0 0 1 1 0 1

Assumes prior to t=0 a high level was last asserted

A one bit is represented by a transition at half-bit halfposition a zero bit does not have a transition at half-bit halfA zero bit adjacent to a previous zero requires a transition at the start of the bit interval
Dacomun/J. Catalan Line Coding 25

Block coding
Involves dividing the sequence of bits to be sent into groups of m bits and substituting n-bit codes for each before using some line coding mechanism Used to improve line coding performance
Provide additional transitions to ensure synchronization Provide bit patterns to eliminate or reduce the dc components Provide error detection ability (ie. Related to error control)

Some common block codes


4B/5B, 8B/10B, 8B/6T, 5B/6B

Other block coding terms include vector quantization, linear block codes, cyclic codes, BCH codes
Dacomun/J. Catalan Line Coding 26

Block coding
4b/5b
Original 4-Bit Data New 5-Bit Code 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 11110 01001 10100 10101 01010 01011 01110 01111 10010 10011 Example 10110001 -> 1011101001 1010 1011 1100 1101 1110 1111 10110 10111 11010 11011 11100 11101

Dacomun/J. Catalan

Line Coding

27

Spectrum of line encoding schemes

Dacomun/J. Catalan

Line Coding

28

BER of line encoding schemes

Dacomun/J. Catalan

Line Coding

29

Sample Manchester encoding circuit

Dacomun/J. Catalan

Line Coding

30

Sample Manchester encoding circuit


Sample output

Dacomun/J. Catalan

Line Coding

31

Anda mungkin juga menyukai