Unit 5 - 1 LBC
Unit 5 - 1 LBC
From To
Source destination
LINEAR BLOCK CODES
where ci = -- (1)
and the (n-k) parity bits are linear sums of k message bits as
-- (2)
bi = pi,0m0 + pi,1m1+ ……………………..+ pi,k-1mk-1.
for i = 0,1,…………….,n-k-1.
where coefficients pi,j are defined as
-- (3)
; where j = 0,1,…..,k-1 6
Matrix Notation
and
Coefficient Matrix P = --
k x (n-k)
(8)
7
from (4), (5) & (6) we can write C as a partitioned vector as
C =[ b m ] --(9)
1x n
1x (n-k) 1x k
Substituting (7) in (9), we can write
C =[ m P m ]
1x n
1x k kx(n- k) 1x k
C =[ m [ P Ik ] ] 1x n --(10)
1x k kx(n- k) kx k
Ik = --(11)
8
Defining the ( k x n ) Generator matrix G as
G =[ P Ik ] --(12)
kxn
kx(n- k) kx k
where
PT is transpose of coefficient matrix P and
In-k is (n-k) x(n-k) identity matrix
Then (n-k) x k
[ H * GT ] (n-k) x k = [ In-k PT ] (n-k) x n kxk
(n-k) x n nxk (n-k) x (n-k) (n-k) x k
nxk
= PT + PT = O
where ‘O’ is an (n-k) x k matrix with all zero elements
Hence H GT = O or equivalently G HT = O. --(15)
10
Multiplying both sides of equation (13) by HT and using
equation (15), we get
C HT = m G HT --(16)
11
Syndrome Decoding
where,
S = CHT + eHT
S = eHT since CHT = O
Property 2 : All error patterns that differ at most by a
codeword have the same syndrome.
for k message bits – there are 2k (n-bit)codewords denoted
Ci, i = 0,1,…..,(2k-1).
We have Wi = e + Ci ; i = 0,1,…..,(2k-1) -- Coset of the code
The (n,k) LBC has 2(n-k) possible cosets. Then
S = e HT = [ e1, e2,………, en ]
S=
16
A (6,3) linear block code can correct all single errors.
Assuming a generator matrix
[G] =
17
Standard Array for (6,3) LBC
18
Table-Lookup Decoding Algorithm
19
20
Minimum distance considerations
Hamming Distance : d( X , Y ) number of bit positions X and Y differ
22
r (7, 4) Hamming code, n = 7, k = 4, n – k = 3 and with G given as below
c0 c1 cn-k-1
24
ci =
; where j = 0,1,…..,k-1
25
Input W
w0 w1 w2 wn-2 wn-1
w0 wn-k wn-k+1 wn-1 w1 wn-k wn-k+1 wn-1 wn-k-1 wn-k wn-k+1 wn-1
26
H = [ In-k PT ]
HT =
Hence
wn-k = m0, wn-k+1 = m1, ………, wn-1 = mk-1
&
si = wi + pi,0m0 + pi,1m1+ ……………………..+ pi,k-1mk-1.
for i = 0,1,…………….,(n-k-1).
27
W
w0 w1 wn-1
w0 w1 wn-1
c0 c1 cn-1
28
Problem :The Generator matrix for (7 , 4) LBC is given as
Encoding expressions :
c0 = m0+m2+m3 c1 = m0+m1+m2 c2 = m1+m2+m3
c3 = m0 c4 = m1 c5 = m2 c6 = m3
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 0 1 0 0 0 1 3
0 0 1 0 1 1 1 0 0 1 0 4
0 0 1 1 0 1 0 0 0 1 1 3
0 1 0 0 0 1 1 0 1 0 0 3
0 1 0 1 1 1 0 0 1 0 1 4
0 1 1 0 1 0 0 0 1 1 0 3
0 1 1 1 0 0 1 0 1 1 1 4
1 0 0 0 1 1 0 1 0 0 0 3
1 0 0 1 0 1 1 1 0 0 1 4
1 0 1 0 0 0 1 1 0 1 0 4
1 0 1 1 1 0 0 1 0 1 1 4
1 1 0 0 1 0 1 1 1 0 0 4
1 1 0 1 0 0 0 1 1 0 1 3
1 1 1 0 0 1 0 1 1 1 0 4
1 1 1 1 1 1 1 1 1 1 1 7
m
Input
Message
Message Register
m0 m1 m2 m3
To Channel
C
Output
Code word
m0 m1 m2
m3 m2 m0 m2 m1 m3
b0 b1 b2
c0 c1 c2
Parity Register
32
(iii) The Received codevector is W = 1 0 0 1 1 1 1
33
Hence
We have S = W HT = [ w0 w1 w2 w3 w4 w5 w6 ]
s1 = w1 + w3 + w4 + w5
s2 = w2 + w4 + w5 + w6
34
Given W = [ w0 w1 w2 w3 w4 w5 w6 ] = [ 1 0 0 1 1 1 1 ]
is e = [ 0 0 0 0 1 0 0 ]
C= [1001111]+[0000100]
C= [1001011]
36
(iv) Syndrome circuit :
Input W w4 w5 w6
w0 w1 w2 w3
w3 w5 w3 w4 w4 w5
w0 w6 w1 w5 w2 w6
s0 s1 s2
37
(v) From decoding table, we can write the expressions for
error bits as Syndrome Coset Leader/ Error pattern
s0 s1 s2 e0 e1 e2 e3 e4 e5 e6
e0 = s0 s1 s2 0 0 0 0 0 0 0 0 0 0
e1 = s0 s1 s2
1 0 0 1 0 0 0 0 0 0
e2 = s0 s1 s2 0 1 0 0 1 0 0 0 0 0
e3 = s0 s1 s2 0 0 1 0 0 1 0 0 0 0
1 1 0 0 0 0 1 0 0 0
e4 = s0 s1 s2
0 1 1 0 0 0 0 1 0 0
e5 = s0 s1 s2 1 1 1 0 0 0 0 0 1 0
e6 = s0 s1 s2 1 0 1 0 0 0 0 0 0 1
38
Error pattern circuit :
s0 s1 s2
e0 e1 e2 e3 e4 e5 e6
w0 w1 w2 w3 w4 w5 w6
c0 c1 c2 c3 c4 c5 c6
Corrected Codeword 39
(vi) Decoder :
W w0 w1 w2 w3 w4 w5 w6
Received
Codeword
Syndrome s0 s1 s2
Error
Pattern e0 e1 e2 e3 e4 e5 e6
w0 w1 w2 w3 w4 w5 w6
c0 c1 c2 c3 c4 c5 c6
Corrected Codeword 40
41
C=[m b]
Since G = [Ik p]
42
43
44
For a systematic linear block code (6,3) three parity check digits are given by :
C4 =d1 ⊕d2⊕d3
C5 =d1 ⊕d2
C6 =d1 ⊕d3
Construct generator matrix, prepare a suitable decoding table.
G=
Find the Parity check matrix and code word that begins with 1011?
45
END OF LBC
46