Wireless Communication Systems Error Correction Codes
Wireless Communication Systems Error Correction Codes
Lecture 11
Error correction codes
• Data can be corrupted during transmission.
For reliable communication, errors must be
detected and corrected.
2
Forward Error Correction
• In Wireless communication forward error
correction (FEC) is a technique used
for controlling errors in data transmission
over unreliable or noisy communication
channels
3
TYPES OF ERRORS
• Burst error :-
- It means that two or more bits in the
data unit has changed.
4
Single bit Error
0 changed to 1
0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0
Received Sent
Burst Error
Sent
0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
Bits corrupted by Burst Error
0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1
Received Rutvi Shah 5
Error Correction
• There are two types of Error Correcting
techniques :
Rutvi Shah 6
HAMMING CODE
Rutvi Shah 7
• A 7 bit ASCII code requires 4 parity bits that
can be added to data unit
• These bits are placed in positions 1,2,4 and 8.
We refer to these bits as P1,P2,P4 and P8.
Rutvi Shah 8
Positions of Parity Bits in Hamming Code
11 10 9 8 7 6 5 4 3 2 1
d d d P8 d d d P4 d P2 P1
Parity Bits
Rutvi Shah 9
• The combination used to calculate each of the four
parity bits values for a are as follows
- P1 : bits 1,3,5,7,9,11.
- P2 : bits 2,3,6,7,10,11.
- P4 : bits 4,5,6,7.
- P8 : bits 8,9,10,11.
10
Data : 1 0 0 1 1 0 1
Data 1 0 0 1 1 0 1
Adding P1 1 0 0 1 1 0 1 1
Adding P2 1 0 0 1 1 0 1 0 1
Adding P4 1 0 0 1 1 0 0 1 0 1
Adding P8 1 0 0 1 1 1 0 0 1 0 1
11 10 9 8 7 6 5 4 3 2 1
11
Code : 1 0 0 1 1 1 0 0 1 0 1
1 0 0 1 1 1 0 0 1 0 1 Sent
Error
1 0 0 1 0 1 0 0 1 0 1 Received
12
Error correction
Forward error correction (FEC): The sender encodes the data using an error-
correcting code (ECC) prior to transmission. The additional information
(redundancy) added by the code is used by the receiver to recover the
original data. In general, the reconstructed data is what is deemed the "most
likely" original data.
These protocols reside in the Data Link or Transport Layers of the OSI model.
14
Noisy Channel –
Noiseless Channel –
PROTOCOLS
FOR NOISELESS
CHANNELS FOR NOISY
CHANNELS
SELECTIVE
REPEAT ARQ
STOP AND WAIT
Frames
Packet Error Free Packet
Information Frame
Transmitter Receiver
Control Frame
Information Frame
Header CRC
Acknowledgement Frame
Need for Sequence number
Need for Sequence Numbers
• The receiver process keeps track of the sequence number of the next frame it
expects to receive, and sends that number with every ACK it sends
• The receiver will discard any frame that does not have the exact sequence
number it expects (either a duplicate frame it already acknowledged, or an
out-of-order frame it expects to receive later) and will resend an ACK for the
last correct in-order frame
23
Pseudocode
24
Advantages
25
Disadvantages
26
Selective repeat request
27
28
Go Back N ARQ
29
In selective repeat request
30
Comparison
31
Example of Selective repeat request
32