Error Detection and Correction

23
ERROR DETECTION AND CORRECTION Author: Junian Triajianto [5108 100 038]

description

Networking

Transcript of Error Detection and Correction

Page 1: Error Detection and Correction

ERROR DETECTION AND CORRECTION

Author: Junian Triajianto [5108 100 038]

Page 2: Error Detection and Correction

What Kind of error?

DATA SENT

DATA RECEIVED≠

Page 3: Error Detection and Correction

DIFFERENT SOURCES OF

NOISE

Page 4: Error Detection and Correction

Noise Sources Spurious noises, which

often corrupt the signal and can arise from thermal noise, cross talk, background noise, impulse noise (i.e. spikes), etc.

Page 5: Error Detection and Correction

Attenuation Attenuation occurs as the signal gradually

becomes less strong as the distance over which it travels increases. This is due to the dissipation of energy

Page 6: Error Detection and Correction

Delay Distortion Delay distortion arises as different parts of

the signal move faster than others

Page 7: Error Detection and Correction

SOLUTION

Page 8: Error Detection and Correction

Different Approaches Error-correcting codes Error-detecting codes

Page 9: Error Detection and Correction

Error-Correcting Codes often referred to as forward error

correction useful when errors frequently

occur, as it does not require that the data be retransmitted

Page 10: Error Detection and Correction

Hamming Distance An n-bit unit containing data and check bits

is often referred to as an n-bit codeword the number of positions at which the

corresponding bits are different between two codewords

The error-detecting and error-correcting properties of a code depend on its Hamming distance

Page 11: Error Detection and Correction

Hamming Distance Examples 1011101 1001001 hamming distance: 2

1111111 1101001 hamming distance: 3

Page 12: Error Detection and Correction

Parity 1-bit Protection add one extra bit of

information to each data item Odd or Even? It’s up to you Can Only handle 1-bit error. How about 2-bits error? Never

mind.

Page 13: Error Detection and Correction

Hamming Code The bits that are powers of 2

(1, 2, 4, 8, 16, etc.) are check bits

The rest (3, 5, 6, 7, 9, etc.) are filled up with the m data bits

Each check bit forces the parity of some collection of bits, including itself, to be even (or odd)

Page 14: Error Detection and Correction

Hamming Code (Coverage)

Page 15: Error Detection and Correction

Hamming Code example Codeword: 0110101

Page 16: Error Detection and Correction

Hamming Code Example

Page 17: Error Detection and Correction

Hamming Code Trick The trick so that Hamming

codes can correct burst errors: Arrange k consecutive

codewords in a single matrix. Transmit the data one column

at a time (normally the data would be transmitted one row at a time).

Page 18: Error Detection and Correction

Error-Detecting Codes (1) Error-correcting codes are widely used on wireless

links that are noisy. However, they generate too large transmission

overhead for reliable links such as copper wire or fiber. Therefore, here error-detection codes are used.

When error is detected, the data is retransmitted. The goal for error correcting codes is to add

redundancy to the data so that the errors are not only detected but can be at the same time corrected (without retransmission).

Page 19: Error Detection and Correction

Error-Detecting Codes (2) For error-detecting codes the goal is to

only detect the errors with the minimal transmission overhead. They are based on polynomial code also known as CRC (Cyclic Redundancy Check)

A k-bit frame is regarded as polynomial with coefficients 0 and 1 with terms from xk-1 to x0

For example: 110001 -> x5 + x4 + x0

Page 20: Error Detection and Correction

Polynomial arithmetic is done modulo 2 using the rules of algebraic field theory.Both addition and subtraction are identical to exclusive OR. For exampe:

10011011 11110000+11001010 -10100110 -------------- ------------- 01010001 01010110

Page 21: Error Detection and Correction

The algorithm for computing the checksum Let r be the degree of G(x). Append r zero bits

to the low-order end of the frame so it now contains m + r bits and corresponds to the polynomial xrM(x).

Divide the bit string corresponding to G(x) into the bit string corresponding to xrM(x), using modulo 2 division.

Subtract the remainder (which is always r or fewer bits) from the bit string corresponding to xrM(x) using modulo 2 subtraction. The result is the checksummed frame to be transmitted. Call its polynomial T(x).

Page 22: Error Detection and Correction

Calculation of the polynomial code checksum.

Page 23: Error Detection and Correction

Upon receiving the check-summed frame, the receiver divides it by G(x):

[T(x) + E(x)] / G(x)

Since T(x) / G(x) is always zero, the result is always E(x) / G(x).

The errors containing G(x) as a factor will slip by, all other errors will be caught.

Single bit errors will be detected: We have E(x)=xi for a single bit error, E(x) / G(x) will not be zero, since G(x) must have the first and last bit equal to 1.

All errors consisting of an odd number of inverted bits will be detectedif G(x) is divisible by (x + 1).E(x) consists of odd number of terms, e.g., x5 + x2 + x0 and therefore, cannot be divisible by (x+1). Since E(x) has an odd number of terms E(1)=1.If E(x) = (x + 1) Q(x), then E(1) = (1 + 1) Q(1) = 0, a contradiction.

The polynomial G(x) used in IEEE 802 standard is

x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x1 + 1