Professional Documents
Culture Documents
Communications II
Dr. Ahmed Khattab
Linear Block Codes & Syndrome Decoding
1
Error Control Codes
• The introduction of controlled redundancy in the transmitted bit
stream to enable detection and/or correction of errors at the Rx that
occur due to channel noise and other impairments.
2
Forward error correction (FEC)
• The decoder at the Rx attempts to correct all errors.
Types of Errors
• Single Error
• Due to uncorrelated AWGN
• Burst Error
• Due to fading, interference, crosstalk
• Using INTERLEAVER convert it to many single errors
• The interleaver randomizes the order of transmitted bits in time at
the Tx. The de-interleaver returns the bits to their original coder prior
to decoding at the Rx.
Info. bits
Channel Encoder Interleaving Modulator
3
Channel Capacity and Channel Coding
• In 1948, Shannon demonstrated that by proper encoding of
the information, errors induced in the channel can be reduced
(Pe 0) subject to (R < C).
4
Linear Block Codes
• For every k message (info) bits , n code bits are generated, where n > k
• i.e: (n-k) redundant (parity) bits are introduced.
m Linear Block c
• The code rate R = k/n 0 < R < 1
k bits Encoder n bits
5
P0, 0 P0,1 ... P0,( n K 1)
P ... ... ...
b mP where P
1, 0
K 1
bi m j pij pij 0 or 1
j 0
• Notes:
• Any codeword is a linear combination of the rows of G.
• The set of all possible code words is called ‘the code’,
there are 2K code words obtained by multiplying all m by
11
G.
ECNG 4302 A. Khattab
6
• Note:
• a linear block code must contain the all zeros codeword
• From the closure property,
• dmin = min w (ci ) excluding the all zeros codeword
• In the previous example, dmin = 3
• In general, the larger the dmin, the higher the error
correcting/detecting capability of the code.
• For correction:
d 1
t min will be corrected
2
• For detection
t d min 1 will be detected
13
14
7
• Example: Consider the generator matrix
0 1 1 0 0
G 1 0 0 1 0
1 1 0 0 1
• Obtain the code described by G, find dmin
• Solution:
• GKxn K=3 n= 5
• mG = c
15
8
LBC Encoding Circuits
m0 m1 mk-1
gk-1,0
g0,0
+ + +
c0 c1 cn-1
17
Channel Model
c + r=c+e
1xn 1xn
e
1xn
18
9
Decoding of LBC’s:
• The parity check matrix H
•
Define H | I n k | p(Tn k )k |
I
H T nk
P
I n k
Hence GHT = |P|Ik| x = P+P = 0
P
Recall that c = mG
Post multiplying by HT
cHT = mGHT = 0 (1x n-K)
19
20
10
• Example:
• A repetition code rate = 1/5
• G = [ 1 1 1 1| 1] k =1 n = 5
• c1 = 00000 c2 = 11111 dmin = 5
• It is guaranteed to correct up to 2 errors
• It is guaranteed to detect up to 4 errors
• Assume e = [01001] and c= [11111]
• r = [10110]
1 0 0 0
0 1 0 0
• s = rHT = [10110] 0 0 1 0 = [1011]
0 0 0 1
21
1 1 1 1
ECNG 4302 A. Khattab
22
11
• Syndrome decoding:
• I )We form the standard array :
1. List all the code words in the first row starting with the
zeros code word.
2. List error patterns (co-set leaders) in the first column
starting with the lowest weight error vectors (ie all
single errors then all double errors and so on)
3. After inserting each error vector (co-set leader) add the
co-set leader to all code words in the first row to
complete the co-set. In choosing each co-set leader it
must not have appeared in the array thus far (steps 2 and
3 are together).
• Repeat steps 2 and 3 until rows are filled 2n-k rows.
23
All
• c1 =e1 c2 c3 ….. c2k codewords
e2 c 2 + e2 c3 + e3 …… cosets
Coset e3 c 2 + e3 c3 + e3 ..... 2n-k
leaders
S1 = e1HT E1
S2 = e2HT E2
…… …….
12
• We compute the syndrome s from the received codeword r
^
and pick the corresponding most likely error e
• Then
cˆ r eˆ c e eˆ ( c if ê e )
• Ex:
10101
• A code with G = [ I k | P]
01011
• Assume that the codeword 01011 was sent. The received
vector was
a) 11011 1 error
b) 11001 2 errors
c) 11010 2 errors
• Decodes in each time
25
13
• To calculate the syndrome table, we must obtain HT
• Since, G = [ Ik |P]
• Hence H = [PT | In-k]
P
• Therefore HT
I n k
Syndrome Error Pattern
000 00000
101 001 00001
011 010 00010
• H T 100 100 00100
010 011 01000
001 101 10000 27
110 11000
ECNG 4302 A. Khattab
111 10010
a) r = 11011 ^
s = rHT = [101]
• From syndrome table,e 10000
^ ^
• c = r + e = 01011 (which is the transmitted signal)
dmin=3, guarantees correcting all single errors
b) r = 11001
^
• s = rHT = 111 therefore e 10010
^ ^
• c = r + e = 01011 (which is the transmitted signal)
28
14