Error control coding

18
ERROR CONTROL CODING

description

Basic Communication theory

Transcript of Error control coding

Page 1: Error control coding

ERROR CONTROL CODING

Page 2: Error control coding

Error Control CodingPurpose – to enable receiver to detect, or even

correct errors in transmitted dataThe idea is to introduce some redundancies

into the data to be transmittedData communications errors:

Single bit Only one bit in data stream is in error

Multiple bit Two or more non-consecutive bits in data stream are in

error Burst

Two or more consecutive bits in data stream are in error

Page 3: Error control coding

Probability of error, P[e] = the theoretical expectation of the rate at which errors will occur

Bit error rate (BER) = actual historical record of a system’s error performance

Two general categories of error control:Error detectionError correction

Page 4: Error control coding

Example 1Given P[e] = 10-5. If 1 Mbits of data are

transmitted, how many bits may be in error?

Page 5: Error control coding

Error DetectionError detection = determine when errors

have occurError detection indicates only when an

error has occur. It does not prevent the error

Most common technique is redundancy checking, which includes:Vertical redundancy checkingChecksumLongitudinal redundancy checkingCyclic redundancy checking

Page 6: Error control coding

Redundancy CheckingRedundancy is a form of error detection in

which each data unit is duplicatedEffective but costly (complex) especially with

long messagesRedundancy checking = adding redundant

bits for error detection

Page 7: Error control coding

Vertical redundancy checking (VRC)VRC is also referred to as parityEach character has its own error-detection

bit, called the parity bitSingle parity bit is added to each character

so that the total no. of logic 1’s in the character plus the parity bit, will be an odd number (for odd parity) or even number (for even parity)

Page 8: Error control coding

Example 2Determine the odd and even parity bits for

the ASCII character R

Page 9: Error control coding

Advantage of VRC:Simple

Disadvantage of VRC:If an even no. of bits are in error, the parity

checker will not detect them because the parity of the character remains the same

Parity will theoretically detect only 50% of transmission errors

Page 10: Error control coding

Checksum Each character has a numerical value (known

as ‘checksum’) assigned to itReceiver’s checksum is compared to the

checksum appended to the message, and if they are same, no errors. If different, there are errors

Page 11: Error control coding

Longitudinal redundancy checking (LRC)Uses parity to determine whether a message

has an errorLRC is sometimes called message parityEach bit position has a parity bitLRC bits are calculated in the transmitter

and appended at the end of message as redundant character

At receiver, LRC is recomputed from the data. If the two LRC values are the same, no error. If not, there is error

Page 12: Error control coding

Bit sequence for LRC is often called block check sequence (BCS)

Using LRC, all messages (regardless of their length) have the same no. of error-detection characters

Page 13: Error control coding

Example 3Determine VRC and LRC for the following

ASCII-encoded message: THE CAT. Use odd parity for VRCs and even parity for LRC

Page 14: Error control coding

Cyclic redundancy checking (CRC)Is a convolutional coding schemeIn CRC generation, modulo-2 division is used;

remainder is derived from an exclusive OR (XOR) operation

At receiver, the data stream, including the CRC code, is divided using the same generating function. If remainder is zero, means no error

Page 15: Error control coding

CRC can be expressed as:

G(x) = message polynomialP(x) = generator polynomialQ(x) = quotientR(x) = remainder

No. of bits in CRC character is always twice the no. of bits in a data character

)()()(

)(xRxQ

xP

xG

Page 16: Error control coding

Error CorrectionTwo basic types of error messages:

Lost message Never arrives

Damaged message Arrives but contains errors

Error-correcting codes include extra information so that receiver will know if there is an error, and where

Two methods of error correction:RetransmissionForward-error correction

Page 17: Error control coding

Retransmission Retransmission:

If received message is in error, the receiver asks transmitter to resend the message

Forward error correction (FEC):Errors are detected and correctedRedundant bits are used to determine which bit is in

error, and to correct it, simply complement the redundant bits

No. of redundant bits must be much greater than the no. of bits needed to only detect errors

Is generally limited to one-, two- or three-bit errors

Page 18: Error control coding

Hamming CodeIs an error-correcting codeCan only correct one-bit errorsHamming bits are inserted into a character at

random locations