Error Detection and Correction
Error Detection and Correction
Bit Errors
Information bits Modulation (BPSK, QAM etc) Information bits
Signal elements Distorted signal elements
demodulation
Modulation
provides some robustness against errors Cannot guarantee zero error Examples: ....
Channel Coding
Information bits Information bits
demodulation
Sort of signature correlated with information bits Check if signature and information match each other
Channel decoder
How to Code?
Ideas?
Block Codes
k bits 000...00 000...01 000...10 . . . 111...10 111...11
f : 0,1k 0,1n
2k
2n
Map each k-bit word to a unique n-bit word Split input data stream into blocks of k-bits
Input to block coder k-bits k-bits k-bits k-bits k-bits k-bits
f : 0,1k 0,1n
n-bits
n-bits
n-bits
n-bits
Hamming Distance
Hamming distance d(x,y) between two binary words x and y is the number of differences between corresponding bits Examples: d(000,011)=2; d(011,101)=2; Minimum Hamming distance of a set of words {x1 , x2 ,...}
d min =min i , j d x i , x j
i j
is
Detecting Errors
Correcting Errors
d min 2 t
Repetition Codes
k=4
Hamming Codes
Syndrome s Error
0 1 2
s s
000 -
001
010
011
100
101
110
111
q0
q1
b2
q2
b0
b3
b1
x=G a
input Generator matrix
s=H x
syndrome Parity check matrix
1 0 0 G= 0 1 0 1
[ ]
0 1 0 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0
1 0 1 1 1 0 0 H= 1 1 1 0 0 1 0 0 1 1 1 0 0 1
Convolutional Codes
Do not split data into separate blocks like in block codes Compute parity bits over moving window
Data: 100011100110111110000011000001100100100110000000000111111.......
Convolutional coder
x 1 i x 2 i . . . . x m i xi
Output bits
State:
Trellis
Correlation between one state and next since generated from overlapping windows of data Captured by trellis
x0
x1
x2
x3
x4
Some paths valid, some not If path invalid, find nearest valid path using fast algorithm called Viterbi algorithm