You are on page 1of 41

Error Control

Classification of data communication


errors
1. Single bit only one bit within a given data string is
on error
Affect only one character within message
2. Multiple bit when two or more nonconsecutive
bits within a given data string are in error
- affect one or more characters within a message
3. Burst when two or more consecutive bits within a
given data string are in error
- affect one or more characters within a message
Classification of data communication
errors
Classification of data communication
errors
Error performance is the rate in which errors
occur, which can be described as either an
expected or an empirical value.
Probability of error (P[e]) - the theoretical
(mathematical) expectation of the rate at
which errors will occur
Bit error rate (BER) - the actual historical
record of a systems error performance
General Categories of Error Control
1. Error detection
is the process of monitoring data
transmission and determining when errors
have occurred
2. Error correction
is the process of determining when errors
have occurred and correcting them
Error Detection
is the process of monitoring data transmission
and determining when errors have occurred
Its purpose is not to prevent errors from
occurring but to prevent undetected errors
from occurring.
Error Detection Techniques
1. Redundancy checking
- Duplicating each data unit for the purpose of
detecting errors is a form of error detection
called redundancy
- Adding bits for the sole purpose of detecting
errors is called redundancy checking
Basic Types of Redundancy Checks
1.1 Vertical redundancy checking (VRC)
- the simplest error-detection scheme and is
generally referred to as character parity or simply
parity.
- With character parity, each character has its own
error-detection bit called the parity bit.
- With character parity, a single parity bit is added to
each character to force the total number of logic 1s
in the character, including the parity bit, to be either
an odd number (odd parity) or an even number
(even parity).
Basic Types of Redundancy Checks
1.1 Vertical redundancy checking (VRC)
- The primary advantage of parity is its
simplicity.
- The disadvantage is that when an even
number of bits are received in error, the
parity checker will not detect them because
when the logic condition of an even number
of bits is changed, the parity of the character
remains the same.
Example
Determine the odd and even parity bits for
the ASCII character R.
Solution
The hex code for the ASCII character R is 52, which
is P1010010 in binary, where P designates the
parity bit.
For odd parity, the parity bit is a 0 because 52 hex
contains three logic 1s, which is an odd number.
Therefore, the odd-parity bit sequence for the
ASCII character R is 01010010.
For even parity, the parity bit is 1, making the total
number of logic 1s in the eight-bit sequence four,
which is an even number. Therefore, the even-
parity bit sequence for the ASCII character R is
11010010.
Other forms of Parity
a. Marking parity parity bit is always a 1
b. No parity the parity bit is not set or
checked
c. Ignored parity - the parity bit is always a 0 bit
if it is ignored
Basic Types of Redundancy Checks
1.2 Checksum
- is another relatively simple form of redundancy
error checking where each character has a
numerical value assigned to it
- The characters within a message are combined
together to produce an error-checking character
(checksum), which can be as simple as the
arithmetic sum of the numerical values of all the
characters in the message.
- The checksum is appended to the end of the
message.
Basic Types of Redundancy Checks
1.3 Longitudinal redundancy checking (LRC)
- is a redundancy error detection scheme that uses
parity to determine if a transmission error has
occurred within a message and is therefore
sometimes called message parity.
- With LRC, each bit position has a parity bit.
- Essentially, LRC is the result of XORing the
character codes that make up the message,
whereas VRC is the XORing of the bits within a
single character.
- With LRC, even parity is generally used, whereas
with VRC, odd parity is generally used.
Example
Determine the VRCs and LRC for the following
ASCII-encoded message: THE CAT. Use odd
parity for the VRCs and even parity for the
LRC.
Basic Types of Redundancy Checks
1.4 Cyclic redundancy checking (CRC)
- Probably the most reliable redundancy
checking technique for error detection is a
convolutional coding scheme called cyclic
redundancy checking
- With CRC, approximately 99.999% of all
transmission errors are detected.
Basic Types of Redundancy Checks
1.4 Cyclic redundancy checking (CRC)
-Mathematically, CRC can be expressed as
Basic Types of Redundancy Checks
1.4 Cyclic redundancy checking (CRC)
The generator polynomial for CRC-16 is

CRC-16 generating circuit


Example
Determine the block check sequence (BCS) for
the following data and CRC generating
polynomials:
Error Correction Techniques
1. Retransmission
- as the name implies, is when a receive station
requests the transmit station to resend a
message (or a portion of a message) when the
message is received in error.
- Because the receive terminal automatically calls
for a retransmission of the entire message,
retransmission is often called ARQ, which is an
old two-way radio term that means automatic
repeat request or automatic retransmission
request.
Error Correction Techniques
2. Forward Error Correction
- is the only error-correction scheme that
actually detects and corrects transmission
errors when they are received without
requiring a retransmission.
- With FEC, redundant bits are added to the
message before transmission. When an error
is detected, the redundant bits are used to
determine which bit is in error. Correcting the
bit is a simple matter of complementing it.
Error Correction Techniques
2. Forward Error Correction
Hamming code (Richard W. Hamming)
- an error-correcting code used for correcting
transmission errors in synchronous data
streams
- Hamming bits(sometimes called error bits) are
inserted into a character at random locations.
The combination of the data bits and the
Hamming bits is called the Hamming code.
Error Correction Techniques
2. Forward Error Correction
Hamming code

Data unit comprised of m character bits and n Hamming bits


Error Correction Techniques
2. Forward Error Correction
Hamming code

Number of Hamming Bits


Examples
1. How many Hamming bits would be added to
a data block containing 128 bits?
2. Calculate the Hamming distance to detect
and correct 3 single-bit errors that occurred
during transmission. Also compute for the
number of Hamming bits for a 23 bit data
string.
Example
For a 12-bit data string of 101100010010,
determine the number of Hamming bits
required, arbitrarily place the Hamming bits
into the data string, determine the logic
condition of each Hamming bit, assume an
arbitrary single-bit transmission error, and
prove that the Hamming code will successfully
detect the error.
Classifications of Channel Codes
1. Block codes
- In block codes one of the M=2k messages, each
representing a binary sequence of length k, called
the information sequence, is mapped to a binary
sequence of length n, called the codeword, where
n>k
2. Convolutional codes
- are described in terms of finite-state machines. In
these codes, at each time instance i, k information
bits enter the encoder, causing n binary symbols
generated at the encoder output and changing the
state of the encoder from i1 to i
.
Process of error detection in block
coding
Example: Let us assume that k=2 and n=3.
Assume the sender encodes the dataword 01 as 011
and sends it to the receiver. Consider the following
cases:
1. The receiver receives 011. It is a valid codeword.
The receiver extracts the dataword 01from it.
2. The codeword is corrupted during transmission,
and 111 is received (the leftmost bit is corrupted).
This is not a valid codeword and is discarded.
3. The codeword is corrupted during transmission,
and 000 is received (the right two bits are
corrupted). This is a valid codeword. The receiver
incorrectly extracts the dataword 00. Two
corrupted bits have made the error undetectable.
Structure of encoder and decoder in
error correction
Example
Assume the dataword is 01. The sender consults
the table (or uses an algorithm) to create the
codeword 01011. The codeword is corrupted
during transmission, and 01001 is received (error in
the second bit from the right)
1. Comparing the received codeword with the first
codeword in the table (01001 versus 00000), the
receiver decides that the first codeword is not the
one that was sent because there are two different
bits.
2. By the same reasoning, the original codeword
cannot be the third or fourth one in the table.
3. The original codeword must be the second one in
the table because this is the only one that differs
from the received codeword by 1 bit. The receiver
replaces 01001 with 01011 and consults the table
to find the dataword 01.
Linear Block Code
is a code in which the exclusive OR (addition
modulo-2) of two valid codewords creates
another valid codeword.
Example
Check if the two codes we defined in the
previous two tables belong to the class of
linear block codes.
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.
Convolutional Codes
creates additional bits from the data, but the
encoded output is a function of not only the
current data bits but also previously occurring
data bits
Convolutional Codes

Convolutional encoding uses a shift register with


exclusive-OR gates to create the output
Convolutional Codes

A convolutional encoder using recursion


One form of turbo encoding

You might also like