Chapter 6 Binary BCH Codessite.iugaza.edu.ps/mtastal/files/ch6final1.pdfย ยท 2016. 5. 3.ย ยท...
Transcript of Chapter 6 Binary BCH Codessite.iugaza.edu.ps/mtastal/files/ch6final1.pdfย ยท 2016. 5. 3.ย ยท...
Chapter 6
Binary BCH CodesDr.Mohammed Taha El Astal
Introduction
โข The BCH codes form a large class of cyclic
codes
โข This class is a remarkable generalization of the
Hamming codes for multiple-error correction.
โข Binary BCH codes were discovered by
Hocquenghem in 1959 and independently by
Bose and Chaudhuri in 1960.
โข Cyclic structure was proved by Peterson in
1960.
โข Binary BCH codes were generalized to codes
in pm symbols (p is a prime) by Gorenstein
and Zierler in 1961. (most important subclass
is the class of Reed-Solmon RS codes (1960)2
EELE 6338 3
Definition
Clearly, this code is capable of correct any combination of t
errors or fewer.
The generator polynomial is specified in terms of its roots
from GF(2๐).
Roots of the primitive polynomial
โข Let ๐ผ be a primitive element in GF( 2๐ ). The generator
polynomial of the t-error-correcting BCH code of length 2๐ โ 1is the lowest-degree polynomial over GF(2) that has
๐ผ, ๐ผ2, ๐ผ3, โฏ , ๐ผ2๐ก
as its roots [i.e., ๐ ๐ผ๐ = 0 โ 1 โค ๐ โค 2๐ก].
โข As a result of Theorem 2.11, ๐(๐ฅ) has ๐ผ, ๐ผ2, ๐ผ3, โฏ , ๐ผ2๐ก and their
conjugates as all its roots.
EELE 6338 4
โข Given that ๐ผ๐ has a minimal polynomial denoted as
๐๐(๐ฅ), then ๐(๐ฅ) must be the least common multiple
(LCM) of ๐1 ๐ฅ , ๐2 ๐ฅ ,โฏ , ๐2๐ก ๐ฅ ,
๐ ๐ฅ = ๐ฟ๐ถ๐ ๐1 ๐ฅ , ๐2 ๐ฅ ,โฏ , ๐2๐ก ๐ฅ .
โข Then, you can deduce that for some i, ๐ผ๐ = ๐ผ๐โฒ 2๐
( conjugate of ๐ผ๐โฒ). As a result, both ๐ผ๐ and ๐ผ๐
โฒhave the
same minimal polynomial (๐๐ ๐ฅ = ๐๐โฒ ๐ฅ ).
โข Refer to the chapter 2 note here to recall minimal polynomial 5
Roots of the primitive polynomial (2)
โข If ๐ is an even integer, then it can be expressed as a product of
๐ = ๐โฒ2๐ ,where ๐โฒ is an odd number, and ๐ โฅ 1.
โข i.e: 2=1ร21, 4=1 ร 22,6=3 ร 21,8=1 ร 23,10=5 ร 21,12=3ร22
Roots of the primitive polynomial (3)
โข Summary: Every even power of ๐ผ has same minimal
polynomial as some preceding odd power of ๐ผ.
โข Result: The generator polynomial ๐ ๐ฅ of the binary t-
error-correcting BCH code of length 2๐ โ 1 can be
reduced from๐ ๐ฅ = ๐ฟ๐ถ๐ ๐1 ๐ฅ , ๐2 ๐ฅ ,โฏ , ๐2๐ก ๐ฅ .
to
๐ ๐ฅ = ๐ฟ๐ถ๐ ๐1 ๐ฅ , ๐3 ๐ฅ ,โฏ , ๐2๐กโ1 ๐ฅ .
โข The # become t instead of 2t.
EELE 6338 6
Roots of the primitive polynomial (4)
โข Because the degree of each minimal polynomial is ๐ or less
(Thm. 2.19), then the degree of ๐ ๐ฅ is at most ๐๐ก(๐ ร ๐ก),which is the number of parity-check digits ๐ โ ๐.
โข The parameters of all binary
BCH with m โค10 are given
Table 6.1.
โข Try to generate the table entries for
a given m?EELE 6338 7
Continue (page 195)
Examples
โข Discuss the single error correcting BCH code .
As it is single-error correcting, this means that t=1 and
hence ๐ ๐ฅ = ๐1(๐ฅ). (๐2(๐ฅ) is same as ๐1 ๐ฅ , this is
because ๐ผ2 is conjugate of ๐ผ1).
length 2๐ โ 1
As ๐ผ is a primitive element of GF(2๐) ๐1 ๐ฅ has a
degree m , then ๐ ๐ฅ has degree of m too (as t=1). This
mean that ๐ โ ๐ = ๐.
It is Hamming code
EELE 6338 8
Examples (2)
EELE 6338 9
Double EC BCH
means that t=2,
hence 2t-1=3.
Thus, LCM of
โ 1 ๐ and โ 3 ๐
Examples (3)
EELE 6338 10
This means that
mรt=8=n-k
This mean that
mรt=10=n-k
ELEE 6338 11
The Parity Check Matrix of BCH Codes
โข Let v(X) be a codeword of a t-error correcting BCH code of
length . Then are roots of v(X) (can you
state Why?):
or
12m 2 2, , , t
2 ( 1)
1 2 1v( ) 0 ; 1 2i i i n i
o nv v v v for i t
2
1 1
( 1)
1
, , , 0 ; 1 2
i
i
o n
n i
v v v i t
Why? This is because they are all root of g(X) and based on v(X)=u(X)รg(X),
consequently what is root of g(X) it is directly also root of v(X).
12
โข
1๐ผ๐
โฎ๐ผ ๐โ1 ๐
1 โค ๐ โค 2๐ก
โข As a result of , H is a parity check matrix of the code.
โข Based on (mean is root) and is a conjugate of ,
then too. As any even power of is conjugate of a
proceeding odd power of , the H matrix may be reduced to:
2 3 1
2 2 2 2 3 2 1
3 3 2 3 3 3 1
2 2 2 2 3 2 1
1
1 ( ) ( ) ( )
1 ( ) ( ) ( )
1 ( ) ( ) ( )
n
n
n
t t t t n
H
0T v H
The Parity Check Matrix of BCH Codes (2)
v( ) 0i j
v( ) 0i
2 3 1
3 3 2 3 3 3 1
5 5 2 5 3 5 1
2 1 2 1 2 2 1 3 2 1 1
1
1 ( ) ( ) ( )
1 ( ) ( ) ( )
1 ( ) ( ) ( )
n
n
n
t t t t n
t n
H
13ELEE 6338
t=2 means
that 2ร2
roots which
are=๐ผ1, ๐ผ2 ,
๐ผ3, ๐ผ4
You should
refer to chapter
2 to see how
Table 2.8 can
be generated
Minimum Distance proof
โข Proving that a BCH code with 2t consecutive roots has a
minimum distance :
We need to show that no 2t or fewer columns of H sum to
zero.
Suppose there exists a nonzero codeword v with weight
.
Let be the nonzero components of v.
The product of reduces to:
ELEE 6338 14
2 1t
2t
1 2, , , j j jv v v
v TH
15
Interchanging powers of , we get:
1 1 1
2 2 2
1 2
2 2
2 2
2 2
( ) ( )
( ) ( )( , , , ) 0
( ) ( )
j j jt
j j jt
j j j
j j jt
v v v
1 1 1
2 2 2
2 2
2 2
2 2
( ) ( )
( ) ( )(1, 1, , 1) 0
( ) ( )
j j j t
j j j t
j j j t
ELEE 6338
16
The big matrix is . The product of
with the matrix formed from the first
columns should also be zero.
It follows that the determinant of the following
matrix must be zero:
OR
โข But this is a Vandermonde determinant that is nonzero.
Therefore, our assumption that there exists a nonzero
codeword v of weight is invalid. Consequently, the
minimum distance of the code is at least
2 (2 )t t
(1, 1, , 1)
1 1 1
2 2 2
2 2
2 2
2 2
( ) ( )
( ) ( )0
( ) ( )
j j j t
j j j t
j j j t
ELEE 6338
1 1
2 2
1 2
1
1
( )
1
1 ( )
1 ( )0
1 ( )
j j
j j
j j j
j j
2t 2 1t
17
โข Notes:
โข If g(X) has ๐ roots that are consecutive powers of , an
element of GF( ), then the code generated has a minimum
distance .
โข If , a primitive element of GF( ), the code generated
is a primitive BCH code.
โข If ๐ฝ is not a primitive element of GF( ), the code is not a
primitive BCH code and ๐ โ 2๐ โ 1 .
โข This chapter considers the primitive BCH code
2m
min 1d l
2m
ELEE 6338
2m
18
Decoding BCH Codes
โข Decoding steps:
1. Syndrome computation.
2. Error pattern computation.
3. Correction .*v (X) r(X) e(X)
1. Syndrome computation:
Recalling the structure of H,
Show?
By examining H, you can deduce
that r.HT process is like ๐(๐ผ๐).
Try it by yourself.
r( ) ; 1 2i
iS i t
1 2 2t, , , T S S S S r H
2 3 1
3 3 2 3 3 3 1
5 5 2 5 3 5 1
2 1 2 1 2 2 1 3 2 1 1
1
1 ( ) ( ) ( )
1 ( ) ( ) ( )
1 ( ) ( ) ( )
n
n
n
t t t t n
t n
H
19ELEE 6338
t=2 means that 2ร2
roots which
are=๐ผ1, ๐ผ2 , ๐ผ3 , ๐ผ4
and S is 4-digits too
23
Step 2: Error pattern computation:
An error pattern e(X) of errors at locations
is:
The syndrome and the error pattern are related by:
Let
1 2e(X) X X Xjj j
1 2
1 2
1 2
1
2 2 2
2
2 2 2
2
r( ) v( ) e( ) e( ) ; 1 2
( ) ( ) ( )
( ) ( ) ( )
i i i i
i
jj j
jj j
jj jt t t
t
S i t
S
S
S
1 2, , , j j j
1 2
Solve these equations
for , , ,
There are many solutions
j j j
ELEE 6338
error location numbers ; 1lj
l l
24
Then,
Define the error-location polynomial:
The roots of ๐ ๐ are the inverses of error location #โs.
can be expanded to:
where
1 1 2
2 2 2
2 1 2
2 2 2
2 1 2
( ) ( ) ( )
( ) ( ) ( )t t t
t
S
S
S
Power-sum
symmetric
functions
๐ ๐ฟ โ ๐ + ๐ท๐๐ฟ . ๐ + ๐ท๐๐ฟ โฏ(๐ + ๐ท๐๐ฟ)
(X) 2
1 2(X) X X Xo
1 1 2
2 1 2 2 3 1
1 2
1
o
's are called
elementary symmetric
functions of '
i
l s
25
It is clear that are related to . In fact, their relation
follows the Newtonโs identities:
Again, there are many solutions, but we are interested in
finding the one that yields with minimum degree.
'si 'sjS
ELEE 6338
1 1
2 1 1 2
3 1 2 2 1 3
1 1 1 1
1 1 1 2 1
0
2 0
3 0
0
0
S
S S
S S S
S S S
S S S S
2t equations
๐๐๐ +
๐=๐
๐
๐๐โ๐๐บ๐ = ๐
(X)
26
Decoding procedures (Updated):
1. Compute from r(X) .
2. Determine from by solving Newtonโs
equations.
3. Find the roots of to determine the error location
numbers, then correct the errors in r(X) accordingly.
1 2 2( , , , )tS S S S
(X) 1 2 2( , , , )tS S S
(X)
ELEE 6338
27
Finding the Error Location Polynomial:
1. Find a minimum-degree polynomial whose
coefficients satisfy the 1st Newton identity.
3. Carry on like this until you form ๐ 2๐ก (๐), which is
the required polynomial, i.e. ๐ ๐ = ๐ 2๐ก (๐).
(1) (X)
(1) (X)
(1) (X)(2) (1)(X) (X) term
(2) (X)
EELE 6338
2. Test if also satisfies the 2nd identity. We do this
with the aid of a quantity called the discrepancy โdโ.
(2) (1)(X) (X) add a correction term to ,
i.e. ,
such that satisfies both
identities.
The discrepancy quantity of the step is given by:
Where
In case that ๐๐ โ 0, then go back and find ๐ and determine
If the degree of , then the errors can be correctly
located and corrected.
28
(X) t
th
EELE 6338
โข If ๐๐ = 0, the
๐ ๐+1 ๐ = ๐ ๐ ๐ and๐๐+1 = ๐๐
โข If ๐๐ โ 0, we find another row ๐ prior to the ๐๐กโ row such
that ๐๐ โ 0 and the number ๐ โ ๐๐ in the last column of the
table has the largest value (.
โข The error location polynomial should be modified and ๐๐+1= max ๐๐, ๐๐ + ๐ โ ๐ .
29
Iterative Algorithm
As shown, initialize the rows for ๐= โ1 ๐๐๐ 0
EELE 6338
Example 6.5
EELE 6338 30
Simplified Algorithm for Error Finding
โข The simplified algorithm applies only to binary codes
while the previous algorithm applies for both binary and
non-binary BCH codes including Reed-Solomon codes.
โข The previous algorithm can be simplified into t-steps.
โข The (2๐-1)th and the 2๐ th steps of iteration can be
combined only even steps are needed.
โข Step 1: Initialize the rows
for ๐ = โ1
2๐๐๐ 0 as shown.
31
Simplified Iterative Algorithm (2)
โข If ๐๐ = 0, the ๐ ๐+1 ๐ = ๐ ๐ ๐
โข If ๐๐ โ 0, we find another row ๐ prior to the ๐๐กโ row such that
๐๐ โ 0 and the number 2๐ โ ๐๐ in the last column of the table
has the largest value. The error location polynomial should be
modified and ๐๐+1 = ๐๐๐๐๐๐ ๐๐ ๐ ๐+1 (๐).
โข ๐๐ = ๐2๐+1 + ๐1๐๐2๐ +โฏ+ ๐๐๐
๐๐2๐+1โ๐๐
EELE 6338 32
Example 6.5 can be solved using the simplified algorithm to
get the same solution
โข H.W โ Detail all the steps required to get this table.
Example 6.6
EELE 6338 33
Chien Circuit
โข Used to find the error location number which is the
inverse of the roots of .
โข Remember that the roots of is found by substituting
1, ๐ผ, ๐ผ2, โฏ , ๐ผ๐โ1 in .
โข Since ๐ = 2๐ โ 1 , if ๐ผ๐ is a root ๐ผโ๐ = ๐ผ๐โ๐ is an
error location.
โข The received codeword is decoded bit by bit starting from
the high order bits.
EELE 6338 34
(X)
(X)
(X)
35
Chien Circuit:
If the last bit is erroneous, then is an error location
number and hence is a root of . In this case:
So, by forming this sum we can determine if is
erroneous or not (and can be corrected).
If the bit is erroneous, then is an error location
number and hence is a root of . In this case:
1nr 1n
(X)
2
1 21 0t
t
1nr
2nr 2n
2 (X)
2 4 2
1 21 0t
t
EELE 6338
36
In general, the bit can be checked by the sum: n lr
2
1 21 0l l tl
t
EELE 6338
37
The circuit works as follows:
The logic circuit A is designed to output โ1โ if the sum is
โ1โ. Otherwise the output is zero.
Initially, the buffer contains the received vector, and the
registers contain .
On the first pulse, the registers will contain ,
respectively. If is a root, the output of A will be
โ1โ and the bit will be corrected. If not, the output will
be โ0โ, and the bit is delivered as is.
1 2, , , t
i i
1 i t
1nr
1nr
EELE 6338
38
On the next pulse, the contents of the registers will be
modified to , . If their sum is โ0โ then
is a root. Logic circuit A will generate โ1โ and the bit
is corrected.
On the pulse, the contents of the registers will be
, , and their sum will be used to correct
bit.
thl
2i
i 1 i t 2
1nr
n lr li
i 1 i t