Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DCN Error Detection and Correction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Error Detection & Correction

A major design criterion for all telecommunication system is to


achieve error free transmission.
Error, unfortunately do occur
Two basic techniques employed
One is to detect the error and request for re-transmission of the
corrupted message
Second is to correct the error at the receiving end without having to re-
transmit the message.
Redundancy decreases system throughput.
Error Detection
Data transmission can contain errors
◦ Single-bit
◦ Burst errors of length n
(n: distance between the first and last errors in data block)
How to detect errors
◦ If only data is transmitted, errors cannot be detected
 Send more information with data that satisfies a special relationship
 Add redundancy
Error Detection Methods
VRC ~ Vertical Redundancy Check
LRC ~ Longitudinal Redundancy Check
Checksum
CRC ~ Cyclic Redundancy Check
VRC
Vertical Redundancy Check (VRC)
◦ Append a single bit at the end of data block such that the number of ones is even
 Even Parity (odd parity is similar)
0110011  01100110
0110001  01100011
◦ VRC is also known as Parity Check
◦ Performance:
◦ Detects all odd-number errors in a data block

Parity is the simplest & oldest method of error detection.


It is not very effective in data transmission.
A single bit called parity bit is added to a group of bits representing a letter, number or symbol.
The parity bit is computed by the transmitting device based on the number of 1 bit set in the character.
Parity can be either odd or even.
ODD-EVEN Parity
If the odd parity is selected, the parity is set to a 1 or 0 to make the total number of 1 bits in
character including parity bit itself equal to an odd value.
If the even parity is selected, the parity is set to a 1 or 0 to make the total number of 1 bits in
character including parity bit itself equal to an even value.
ODD-EVEN Parity
The selection of even or odd parity is generally arbitrary.
The transmitting or receiving stations, however, must be set to same mode.
LRC
Longitudinal Redundancy Check (LRC)
◦ Organize data into a table and create a parity for each column

11100111 11011101 00111001 10101001

11100111
11011101
00111001
10101001
10101010

11100111 11011101 00111001 10101001 10101010


Original Data LRC
LRC
◦Performance:
◦Detects all burst errors up to length n
(number of columns)
◦Misses burst errors of length n+1 if there are n-1 un-
inverted bits between the first and last bit
◦If the block is badly garbled, the probability of
acceptance is 1 2 
n
CHECKSUM

Error detection through the use of checksum.


Checksum is a basically summation quantity
Like CRC and LRC, the checksum serves as BCC (Block Check Character).
Checksum is transmitted at end of message block.
Commonly used in large file transfer between mass device.
Types of checksum

Single precision
Double precision
Honey Well
Residue
Single Precision Checksum
Performing a binary addition of each n-bit data word in the message block.
Any carry or overflow during the addition process is ignored
The resultant checksum is also n-bit length.
1010
0011
Transmitted Message 1101
1010 0011 1101 1010 ------
1010
Double Precision Checksum

1010
0011
1101
--------------
00011010
Residue Checksum
Carryout of the MSB position of the checksum word is “wrapped around” and added to the LSB.

1010
0011
1101
--------------
1011
Honey well Checksum

10100011
11011111
-------------------
10000010
Double Precision Checksum
Cyclic Redundancy checking
A power full method than the LRC and VRC for detection in block is
cyclic redundancy checking CRC.
CRC is most commonly used for error detection in block
transmission.
Efficiency of error detection is 99.9%.
CRC involves a division of the transmitted message block by a
constant called the generator polynomial.
Cyclic Redundancy Check
Powerful error detection scheme
Rather than addition, binary division is used  Finite Algebra Theory
(Galois Fields)
Can be easily implemented with small amount of hardware
◦ Shift registers
◦ XOR (for addition and subtraction)
Cyclic Redundancy Check
Let us assume k message bits and
n bits of redundancy xxxxxxxxxx yyyy Block of length k+n

k bits n bits

Associate bits with coefficients of a polynomial


1 0 1 1 0 1 1
1x6+0x5+1x4+1x3+0x2+1x+1
= x6+x4+x3+x+1
CRC
The quotient is discarded and the remainder is transmitted as BCC.
The receiving station performs same computation on received
message block.
The computed remainder, or BCC is compared to the remainder
received from the transmitter.
If the two(received and transmitted) match means no error
otherwise there is a error.
CRC
If the two do not match, either a request is sent for
retransmission or errors are corrected through the use of
special coding techniques.
Cyclic codes contain a specific number bits, governed by
the size of character within message block.
Three of the mostly commonly used cyclic codes are CRC-
12, CRC-16 and CRC-CCITT.
CRC
Blocks containing characters that are 6-bit in length typically use CRC-12.
Blocks formatted with 8-bit characters typically use CRC-16 or CRC-CCITT
CRC-12 generator polynomial
G(x)= X12+X11+X3+X2+X+1
CRC-16 generator polynomial
G(x)= X16+X15+X2+1
CRC-CCITT generator polynomial
G(x)= X16+X12+X5+1
Computing the BCC of the message block
using CRC
Computing the Block check character
The generating polynomial G(x) and message polynomial M(x) used
for computing the BCC include degree terms that represent position
in a group of bits that are binary 1 and missing terms are
represented by a 0.
The highest degree in the polynomial is one less than the number in
the binary code.
Cyclic Redundancy Check
Let M(x) be the message polynomial
Let P(x) be the generator polynomial
◦ P(x) is fixed for a given CRC scheme
◦ P(x) is known both by sender and receiver
Create a block polynomial F(x) based on M(x) and P(x) such
that F(x) is divisible by P(x)
Cyclic Redundancy Check
Sending
1. Multiply M(x) by xn
2. Divide xnM(x) by P(x)
3. Ignore the quotient and keep the reminder C(x)
4. Form and send F(x) = xnM(x)+C(x)

Receiving
1. Receive F’(x)
2. Divide F’(x) by P(x)
3. Accept if remainder is 0, reject otherwise
Example
Send • Receive
◦ M(x) = 110011  x5+x4+x+1 (6 bits)
◦ P(x) = 11001  x4+x3+1 (5 bits, n = 4) 11001 1100111001
 4 bits of redundancy 11001
◦ Form xnM(x)  110011 0000
 x9+x8+x5+x4 11001
◦ Divide xnM(x) by P(x) to find C(x) 11001
00000
11001 1100110000
11001 No remainder
10000  Accept
11001
1001 = C(x)
Send the block 110011 1001
Problem 100111 10100110100000
100111
The transmitted message block 111010
contains total number of 14. Nine of 100111
the 14 are data bits. Given Generator 111011
polynomial, G(x)=X5+X2+X+1and
message polynomial, 100111
M(x)=X8+X6+X3+X2+1. Compute the 111000
value of BCC and T(x) 100111
111110
100111
110010
100111
101010
100111
11010
Problem.
A 16-bit message using CRC-16 is used. The total number of bits in transmitted message block, n
is 32. the generator polynomial for CRC-16 is G(x)= X16+X15+X2+1 and message polynomial is
M(x)=X15+X13+X11+X10+X7+X5+X4+1. Compute the value BCC and T(x).
Error Correction
Automatic Repeat reQuest
ARQ is to request the retransmission of the data block received in error
Forward Error Correction
FEC is used in simplex transmission or applications where it is impractical or impossible to
request a retransmission of the corrupted message block.
HAMMING CODE
Hamming code employs the use of redundant bits that are inserted into the message stream for
error correction.
Hamming bits are used to identify the position of error. This position is known as the syndrome
Developing of Hamming code
Hamming code for single-bit FEC
10 bits will be used. The hamming bits depends on the number of data bits.
2m ≥ n+1
Where n is number data bits + hamming bits and m is number of hamming bits.
Compute the number of the Hamming bits m required for a message
of n bits.
Insert the Hamming bits H into original message stream.
Express each bit position containing a 1 as the m-bit binary number
and exclusive-OR each of the these numbers together.
starting from the left bit positions. This will be the hamming code.
Place the value of the hamming bits (code) into transmitted message
stream.
The Hamming bits are extracted from the received message stream and exclusive-ORed with
the binary representation of the bit positions containing a 1. This will detect the bit position in
error, or the syndrome.
Problem
Given the 12 bit message 101110101011, determine the following:
a. Number a Hamming bits, m required
b. Total number of the transmitted bits, n
c. Hamming code
d. Syndrome if the bit position 10 is corrupted.

You might also like