line coding & error correction

36
LINE CODING & ERROR CORRECTION Presented By :- Sarbjeet SIngh NITTTR - Chandigarh 1

Upload: sarbjeet-singh

Post on 11-May-2015

2.753 views

Category:

Education


5 download

TRANSCRIPT

Page 1: Line coding & error correction

1

LINE CODING &ERROR CORRECTION

Presented By:-Sarbjeet SInghNITTTR -Chandigarh

Page 2: Line coding & error correction

Contents

Line coding Reasons For Using Line Coding Properties of a Line Code Line coding schemes Error Correction

Page 3: Line coding & error correction

Line Coding

Line coding is always needed; which is a technique to convert binary data to digital signal.

In the transmission of digital information over wire or optical fiber systems, line coding (also known as modulation/data translation coding) is the method by which 1’s & 0’s are represented as transmitted waveforms.

Page 4: Line coding & error correction

Reasons For Using Line Coding Spectrum shaping and relocation

without modulation or filtering. This is important in telephone line applications, e.g, where the transfer characteristic has heavy attenuation below 300 Hz.

Error detection capabilities. Bandwidth usage; the possibility of

transmitting at a higher rate than other schemes over the same bandwidth.

Page 5: Line coding & error correction

Cotnd..

DC component can be eliminated; this allows AC (capacitor or transformer) coupling between stages (as in telephone lines )

Page 6: Line coding & error correction

Properties of a Line Code:

Self–Synchronization : There is enough timing information built into the code so that bit synchronizers can extract the timing or clock signal. A long series of binary 1’s or 0’s should not cause a problem in time recovery

Page 7: Line coding & error correction

Contd..

Low Probability of Bit Error : Receivers can be

designed that will recover the binary data with a low probability of bit error when the input data is corrupted by noise or ISI.

A Spectrum that is Suitable for the Channel:

In addition, the signal bandwidth needs to be sufficiently small compared to the channel

bandwidth, so that ISI will not be a problem.

Page 8: Line coding & error correction

Contd..

Transmission Bandwidth: This should be as small as possible

Error Detection Capability: It should be possible to implement this feature easily by the addition of channel encoders and decoders, or the feature should be incorporated into the line code

Page 9: Line coding & error correction

Line coding schemes

Page 10: Line coding & error correction

Unipolar encoding

Unipolar encoding uses only one voltage level

( use only one polarity +ve or -ve).

Page 11: Line coding & error correction

Unipolar Encoding’s Problems:

Two problems: A dc component Lack of synchronization : If data contain long

sequence of 0’s or 1’s, there is no transition in the signal during this duration that can alert the receiver to synchronization problem.

The receiver receives a continuous voltage and determines how many bits are sent by relaying on its clock (bit-duration), which may not be synchronized with the sender clock.

Page 12: Line coding & error correction

Polar Encoding

Polar encoding uses two voltage levels (positive and negative).

By using two levels , the average voltage level is reduced and the dc component problem may be alleviated( if balance)

Page 13: Line coding & error correction

NRZ: NRZ-L

The level of the signal is dependent upon the state of the bit. A positive voltage means 0, while negative means 1.

Has lack of synchronization , when the data contain a long stream of 0s or 1s.

Page 14: Line coding & error correction

NRZ: NRZ-I

In NRZ-I , the signal is inverted if a 1 is encountered. It is the transition between a +ve and a –ve voltage , not the voltage itself.

A 0 bit is represented by no change NRZ-I is superior to NRZ-L due to

synchronization each time a 1 bit is encountered.

Page 15: Line coding & error correction

RZ encoding

To ensure synchronization, there must be a signal change (transition) for each bit

RZ uses three values +ve, zero and –ve The signal changes during each bit A1-bit is represented by transition from +ve

to zero A 0-bit by –ve to zero

Page 16: Line coding & error correction

Bi phase: Manchester encoding

The transition at the middle of the bit is used for both synchronization and bit representation.

It has not Dc component It achieves the same level of

synchronization as RZ but with only two levels and less B-W

Page 17: Line coding & error correction

Bipolar AMI (Alternate Mark Inversion) Encoding

Bit 0 represents by zero voltage Bit 1s are represented by alternating +ve

and –ve voltages

Page 18: Line coding & error correction

Contd..

In bipolar encoding AMI , we use three levels: positive, zero, and negative as RZ.

Has DC component AMI has a lack of synchronization when

there is a stream of sequential zeros.

Page 19: Line coding & error correction

Summary of Line Coding

Page 20: Line coding & error correction

Error Correction

Page 21: Line coding & error correction

Hamming distance

The Hamming distance between two words is the number of differences between corresponding bits.

The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.

Page 22: Line coding & error correction

Contd..

Let us find the Hamming distance between two pairs of words.The Hamming distance d(000, 011) is 2 because

The Hamming distance d(10101, 11110) is 3 because

Page 23: Line coding & error correction

Contd..

We first find all Hamming distances.

The dmin in this case is 3.

Page 24: Line coding & error correction

Contd..

To guarantee the detection of up to s errors in all cases, the minimum Hamming distance in a block code must be

dmin = s + 1.

To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block code must be

dmin = 2t + 1.

Page 25: Line coding & error correction

Example

A code scheme has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme?

SolutionThis code guarantees the detection of up to three errors (s = 3), but it can correct up to one error. In other words, if this code is used for error correction, part of its capability is wasted. Error correction codes need to have an odd minimum distance (3, 5, 7, . . . ).

Page 26: Line coding & error correction

LINEAR BLOCK CODES

Almost all block codes used today belong to a subset called linear block codes.

A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid code words creates another valid codeword.

Page 27: Line coding & error correction

Contd..

A simple parity-check code is a single-bit error-detecting code in which n = k + 1 with dmin = 2.

Even parity (ensures that a codeword has an even number of 1’s) and

Odd parity (ensures that there are an odd number of 1’s in the codeword)

Page 28: Line coding & error correction

Simple Parity-Check Code

Table - Simple parity-check code C(5, 4)

Page 29: Line coding & error correction

Encoder & Decoder For Simple Parity-Check Code

Page 30: Line coding & error correction

Cyclic Codes

Cyclic codes are special linear block codes with one extra property.

In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codeword.

Page 31: Line coding & error correction

A CRC code with C(7, 4)

Page 32: Line coding & error correction

CRC encoder and decoder

Page 33: Line coding & error correction

Division in CRC encoder

Page 34: Line coding & error correction

Division in the CRC decoder for two cases

Page 35: Line coding & error correction

References

Optical fiber communications (Gerd Kesior 3rd edition)

Data communications & networking( Behrouz Forouzan 4th edition)

www.google.com

Page 36: Line coding & error correction

THANK YOU