Professional Documents
Culture Documents
Lecture40-41 ErrorControlCoding
Lecture40-41 ErrorControlCoding
Lecture40-41 ErrorControlCoding
Channel is noisy
Channel output prone to error
we need measure to ensure correctness of the bit stream
transmitted
Error control coding aims at developing methods for coding to
check the correctness of the bit stream transmitted.
The bit stream representation of a symbol is called the codeword of
that symbol.
Different error control mechanisms:
Linear Block Codes
Repetition Codes
Convolution Codes
&
'
&
b ,
i = 0, 1, , n k 1
i
ci =
mi+kn , i = n k, n k + 1, , n 1
(1)
%
'
(2)
(3)
&
m = [m0 , m1 , , mk1 ]
b = [b0 , b1 , , bnk1 ]
n = [n0 , n1 , , nn1 ]
'
p
00
p10
P=
..
.
pk1,0
p01
p0,nk1
p11
..
.
..
.
p1,nk1
..
.
pk1,1
pk1,nk1
&
'
c = [b : m]
= c = m[P : Ik ]
where Ik is a k-by-k identity matrix. Now, we define k-by-n
generator matrix as
G = [P : Ik ]
= c = mG
Closure property of linear block codes:
Consider a pair of code vectors ci and cj corresponding to a pair of
message vectors mi and mj respectively.
ci + cj = mi G + mj G
&
= (mi + mj )G
'
HGT = Ink
T
P
: PT
Ik
= PT + PT
=0
'
cH T = mGH T
=0
A valid codeword yields the above result.
The matrix H is called the parity-check matrix of the code.
The set of equations specified in the above equation are called
parity-check-equations.
&
'
Code Vector c
Message Vector m
Generator
Matrix G
Code Vector c
Parity check
Matrix H
Null Vector 0
&
'
Repetition Codes
This is the simplest of linear block codes. Here, a single message
bit is encoded into a block of n identical bits, producing an (n, 1)
block code. This code allows variable amount of redundancy. It has
only two codewords - all-zero codeword and all-one codeword.
Example
Consider a linear block code which is also a repetition code. Let
k = 1 and n = 5. From the analysis done in linear block codes
G = [1111 : 1]
(4)
'
1 0 0
0 1 0
H=
0 0 1
0 0 0
&
0
1
:1
: 1
: 1
:1
'
Syndrome Decoding
Decoding of r
A 1 (n k) matrix called error syndrome matrix is calculated
s = rH T
(6)
Properties of Syndrome:
&
'
s = (c + e)H T s = cH T + eH T
(7)
Since, cH T is zero,
s = eH T
(8)
'
si = (ci + e)H T
ei H T = eH T + ci H T
(9)
= eH T
Thus, the syndrome is independent of i.
&
'
Hamming Distance
(10)
'
'
c =0
c2
1
e2
c2 + e2
e =0
c2 + e3
3
..
..
.
.
c2 + ej
ej = 0
..
..
.
.
e2nk = 0 c2 + e2nk
$
c3
ci
c2k
c3 + e2
ci + e2
c2k + e2
c3 + e3
..
.
..
.
ci + e3
..
.
c2k + e3
c3 + ej
..
.
..
.
ci + ej
..
.
c2k + ej
c3 + e2nk
ci + e2nk
c2k + e2nk
The 2nk rows of the arrays represents the cosets of the code, and
their first elements e2 , , e2nk are called coset leaders. The
probability of decoding is minimized by choosing the most likely
occuring error pattern as coset leader. For, binary symmetric
channel, the smaller the Hamming weight of an error pattern the
more likely is to occur.
&
'
&
'
Cyclic Codes
Cyclic property: Any cyclic shift of a codeword in the code is also a
codeword.
Cyclic codes are well suited for error detection. Certain set of
polynomials are chosen for this purpose.
Properties of polynomials:
1. Any polynomial B(x) can be divided by a divisor polynomial
C(x) if B(x) is of higher degree than C(x).
2. Any polynomial B(x) can be divided once by C(x) if both are
of same degree.
3. subtraction uses exclusive OR.
&
'
'
$
Let the message bit stream be 110010.
5
At the encoder
1001
1101 110010000
1101
At the Decoder
If no error.
1100
1101
100
Remainder
1 001
1101 110010100
1 00101
1101 110011100
1101
1101
1101
1111
1101
1101
000
remainder
is zero
1 0 00
1101
101
Remainder is nonzero