Sie sind auf Seite 1von 32

Chapter 5

BCH Codes

1. Introduction
2. Primitive BCH Codes
3. Generator Polynomial of Binary BCH Codes
4. Properties of Binary BCH Codes
5. Decoding of BCH Codes
6. Syndrome computation
7. Syndrome and Error Pattern
8. Error-Location Polynomial
9. Relationship between
S
and L(z)
10. Petersons Direct-Solution
11. Direct Solutions of Some Simple Cases
12. Computation of Error-Location Numbers
13.Peterson-Gorenstein-Zierler Decoding Algorithm
14. BCH Codes as Industry Standards

1. Introduction

BCH (Bose Chaudhuri - Hocquenghem)
Codes form a large class of multiple random
error-correcting codes.
They were first discovered by A.
Hocquenghem in 1959 and independently by
R. C. Bose and D. K. Ray-Chaudhuri in 1960.

BCH codes are cyclic codes. Only the codes,
not the decoding algorithms, were discovered
by these early writers.

The original applications of BCH codes were
restricted to binary codes of length
1 2
m
for
some integer m. These were extended later by
Gorenstein and Zieler (1961) to the nonbinary
codes with symbols from Galois field GF(q).

The first decoding algorithm for binary BCH
codes was devised by Peterson in 1960. Since
then, Petersons algorithm has been refined
by Berlekamp, Massey, Chien, Forney, and
many others.


2. Primitive BCH Codes

For any integer
3 m
and
1
2

<
m
t
, there exists
a primitive BCH code with the following
parameters:
1 2
1 2
min
+

=
t d
mt k n
n
m
(5- 1)

This code can correct t or fewer random
errors over a span of
1 2
m
bit positions.
The code is a t-error-correcting BCH code.

For example, for m=6, t=3
7 1 3 2
18 3 6
63 1 2
min
6
= + =
= =
= =
d
k n
n

This is a triple-error-correcting (63, 45) BCH
code.
3. Generator Polynomial of Binary BCH
Codes

Let

be a primitive element in GF(


m
2
).
For
t i 1
, let
) (
1 2
x
i

be the minimum
polynomial of the field element
1 2 i

.
The degree of
) (
1 2
x
i

is m or a factor of m.

The generator polynomial g(x) of a
t-error-correcting primitive BCH codes of
length
1 2
m
is given by
{ } ) ( , ), ( ), ( ) (
1 2 3 1
x x x LCM x g
t
= L
(5- 2)

Note that the degree of g(x) is mt or less.
Hence the number of parity-check bits, n-k, of
the code is at most mt.

Example 5.1, 5.2, 5.3, 5.4. (pp. 191-196)
(m = 4, m = 5)
Note that the generator polynomial of the
binary BCH code is originally found to be the
least common multiple of the minimum
polynomials
t 2 2 1
, , , L

i.e.
{ } ) ( ), ( , ), ( ), ( ), ( ) (
2 1 2 3 2 1
x x x x x LCM x g
t t


= L

However, generally, every even power of

in
GF(
m
2
) has the same minimal polynomial as
some preceding odd power of

in GF(
m
2
).
As a consequence, the generator polynomial of
the t-error-correcting binary BCH code can be
reduced to
{ } ) ( , ), ( ), ( ) (
1 2 3 1
x x x LCM x g
t
= L
.

Example: m = 4, t = 3
Let

be a primitive element in GF(


4
2
)
which is constructed based on the primitive
polynomial
4
1 ) ( x x x p + + =

4
1
1 ) ( x x x + + =
corresponding to


4 3 2
3
1 ) ( x x x x x + + + + =
corresponding to
3


2
5
1 ) ( x x x + + =
corresponding to
5


{ }
10 8 5 4 2
5 3 1
5 3 1
1
) ( ) ( ) (
) ( , ) ( , ) ( ) (
x x x x x x
x x x
x x x LCM x g
+ + + + + + =
=
=



The code is a (15, 5) cyclic code.


4. Properties of Binary BCH Codes

Consider a t-error-correcting BCH code of
length
1 2 =
m
n
with generator polynomial
g(x).

g(x) has as
t 2 3 2
, , , , L
roots, i.e.
t i g
i
2 1 for 0 ) ( =
(5- 3)

Since a code polynomial c(x) is a multiple of
g(x), c(x) also has
t 2 2
, , , L
as roots, i.e.
t i c
i
2 1 for 0 ) ( =
.

A polynomial c(x) of degree less than
1 2
m
is
a code polynomial if and only if it has
t 2 2
, , , L
as roots.


5. Decoding of BCH Codes

Consider a BCH code with
1 2 =
m
n
and
generator polynomial g(x).

Suppose a code polynomial
1
1 1 0
) (

+ + + =
n
n
x c x c c x c L
is transmitted.
Let
1
1 1 0
) (

+ + + =
n
n
x r x r r x r L
be the received
polynomial.

Then r(x)=c(x)+e(x), where e(x) is the error
polynomial.

To check whether r(x) is a code polynomial or
not, we simply test whether
0 ) ( ) ( ) (
2 2
= = = =
t
r r r L
.
If yes, then r(x) is a code polynomial,
otherwise r(x) is not a code polynomial and
the presence of errors is detected.
Decoding procedure
(1) syndrome computation.
(2) determination of the error pattern.
(3) error correction.
6. Syndrome computation

The syndrome consists of 2t components in
GF(
m
2
)
) (
2 2 1 t
S S S S L =
(5- 4)
and
) (
i
i
r S =
for
t i 2 1
.

Computation:
Let
) ( x
i

be the minimum polynomial of


i

.
Dividing r(x) by
) ( x
i

, we obtain
) ( ) ( ) ( ) ( x b x x a x r
i
+ =

Then
) (
i
i
b S =
(5- 5)


) (
i
i
b S =
can be obtained by linear feedback
shift-register with connection based on
) ( x
i

.


7. Syndrome and Error Pattern

Since r(x)=c(x)+e(x)
then
) ( ) ( ) ( ) (
i i i i
i
e e c r s = + = =
(5- 6)
for
t i 2 1
.
This gives a relationship between the
syndrome and the error pattern.

Suppose e(x) has

errors
) ( t
at the
locations specified by

j j j
x x x , , ,
2 1
L
.
i.e.

j j j
x x x x e + + + = L
2 1
) (
(5- 7)
where
1 0
2 1
< < < n j j j

L
.

From equations (5-6) & (5-7), we have the
following relation between syndrome
components and error location:
t j t j t j t
t
j j j
j j j
e S
e S
e S
2 2 2 2
2
2 2 2 2
2
1
) ( ) ( ) ( ) (
) ( ) ( ) ( ) (
) (
2 1
2 1
2 1




+ + + = =
+ + + = =
+ + + = =
L
M
L
L
(5- 8)
It we can solve the 2t equations, we can
determine


j j j
, , ,
2 1
L
.

The unknown parameter
u
j
Z
u
=
for
, , 2 , 1 L = u
are called the error location
number.
When
u
j

,
< u 1
are found, the powers
u
j
,
, , 2 , 1 L = u
give us the error locations in e(x).
these 2t equations of (5-8) are known as
power-sum symmetric function.

Eq.(5-8) can be written as


) (z ... ) (z ) (z s

z ... z z s
z ..... z z s
2t
?
2t
2
2t
1 2t
2
?
2
2
2
1 2
? 2 1 1
+ + + =
+ + + =
+ + + =
M
(5-8a)

8. Error-Location Polynomial
(Error-Locator Polynomial)

Suppose that
t
errors actually occur.
Define error-locator polynomial L(z) as


z z z
z Z
z Z z Z z Z z L
i
i
+ + + + =
+ =
+ + + =

=
L
L
2
2 1 0
1
2 1
) 1 (
) 1 ( ) 1 )( 1 ( ) (
(5- 9)
where
1
0
=
.

L(z) has
1 1
2
1
1
, , ,

Z Z Z L
as roots.
Note that
u
j
u
Z =
.

If we can determine L(z) from the syndrome
) , , , (
2 2 1 t
S S S S L =
, then the roots of L(z) give us
the error-location numbers.


9. Relationship between
S
and L(z)

From eq. (5-9), we find the following
relationship between the coefficients of L(z)
and the error-locator numbers:

Z Z Z
Z Z Z Z Z Z
Z Z Z
L
M
L
L
2 1
1 3 2 2 1 2
2 1 1
0
1
=
+ + + =
+ + + =
=

(5- 10)
eq. (5-10) is called elementary symmetric
functions.
From eq. (5-8) and eq. (5-10), we have the
following relationship between the syndrome
and the coefficients of L(z):
0
0 3
0 2
0
1 1 2 2 1 1
3 1 2 2 1 3
2 1 1 2
1 1
= + + + + +
= + + +
= + +
= +





S S S S
S S S
S S
S
L
M
(5- 11)
Here, for binary case,
i i
i =
when
i
is odd,
and
0 =
i
i
, otherwise.
The equations of (5-11) are called the
Newtons identities.

If we can determine

, , ,
2 1
L
from the
Newtons identities, then we can determine
the error-location numbers

Z Z Z , , ,
2 1
L
, by
finding the roots of L(z).

Note that the Newtons identities in (5-11) can
be expressed also in the following
single-equation form:
, , 2 , 1 for 0
1 1 2 2 1 1
L L = = + + + + +

i i S S S S
i i i i i

(5- 12)


10. Petersons Direct-Solution
(W. W. Peterson, 1960)

Consider the case for
> i

First multiply L(z) in eq. (5-9) By
i
z

,
we have
i i i i i i
z z z z z z L z


+ + + + + =


1
1
2
2
1
1
) ( L

(5- 13)

Next substituting the roots of L(z) (i.e.
1 1
2
1
1
, , ,

Z Z Z L
) into eq. (5-13) produces the
following set of equations:
0
? i
?
Z
?
s
1 ? i
?
Z
1 ?
s
2 i
?
Z
2
s
1 i
?
Z
1
s
i
?
Z
0
? i
2
Z
?
s
1 ? i
2
Z
1 ?
s
2 i
2
Z
2
s
1 i
2
Z
1
s
i
2
Z
0
? i
1
Z
?
s
1 ? i
1
Z
1 ?
s
2 i
1
Z
2
s
1 i
1
Z
1
s
i
1
Z
=

+
+

+ +

+
=

+
+

+ +

+
=

+
+

+ +

+
L
M
L
L

(5- 14)
Adding these

equation term by term yield



0 )
? i
?
Z
? i
2
Z
? i
1
(Z
?
s
)
1 i
?
Z
1 i
2
Z
1 i
1
(Z
1
s )
i
?
Z
i
2
Z
i
1
(Z
=

+ +

+
+

+ +

+ + + +
L
L L L

(5- 15)
Now express eq. (5-15) in terms of syndrome
components, then


> = + + + +
+
i S S S S
i i i i
for 0
1 1 1 1
L
(5- 16)
In particular, for
1 + = i
, we obtain
0
1 2 1 1 1
= + + + +
+
S S S S

L
(5- 17)
Thus, the Newtons identities can be extended
to the unknown syndrome
i
S
for
> i
.

From eq. (5-16) & eq. (5-17), we can see that
the
j

for
j 0
are closely related to the
syndrome components
i
S
,
1 1 + i
.

Thus,
j

can be determined by solving the set


of syndrome equations eq. (5-16) & eq. (5-17).
Then the error-locations
u
j
Z
u
=
for
u 1

can be found by solving the root of L(z).
This L(z) produces an error-pattern e(x) with
the minimum number of errors. Hence if
t

errors occur, L(z) will give the actual error
pattern e(x).

Finally, the error-correcting procedure for the
binary BCH codes can be outlined as follows:
(1) Compute the syndrome components
j
S
,
t j 2 1
, from the received polynomial r(x).
[eq. (5-5)]
(2) Set each
0 =
j

for
t j +1

and solve the first

equations of eq. (5-11)


for the
j

,
j 1
in terms of
j
S
.
(3) Determine the error-locator polynomial
L(z) from these
j

in terms of syndrome
component
j
S
for
t j 2 0
.
(4) Find the error-location numbers

Z Z Z , , ,
2 1
L
by solving for the roots of L(z).
Use these roots to correct the errors in r(x).
11. Direct Solutions of Some Simple Cases

(1) Single-error correction:
3
1 3
1 1 1 1
0 1 ) (
S S
S z S z L S
=
+ = =

(2) Double-error correction:
2
1
3
3
1
1
3
1 3
1
1 2
3
1 3 1 1 1
1 ) ( ) (
, 0
z
S
S S
z S z L S S S
S S S S

+
+ + = + =
=


(3) Triple-error correction:
2 1 3
3
1 3
3
1 3
3
3
1
5 3
2
1
2
1 1 1
) (

0

S S S
S S
S S
S S S
S S
+ + =

+
+
=
=


Example: m = 4, t = 3 BCH code over GF(
4
2
).
The primitive polynomial for m = 4 is
4
1 ) ( x x x + + =

The minimum polynomials of

,
3

and
5


are
2
5
4 3 2
3
4
1
1 ) (
1 ) (
1 ) (
x x x
x x x x x
x x x
+ + =
+ + + + =
+ + =


15 1 2
4
= = n

10 8 5 4 2
5 3 1
5 3 1
1
)} ( ), ( ), ( { ) (
x x x x x x
x x x LCM x g
+ + + + + + =
=
=



The code is a (15, 5) cyclic code.
The generator polynomial g(x) has
6 5 4 3 2
, , , , ,
as roots. The roots

,
2


and
4

have the same polynomial


4
4 2 1
1 ) ( ) ( ) ( x x x x x + + = = =

The root
3

and
6

have the same


minimum polynomial
4 3 2
6 3
1 ) ( ) ( x x x x x x + + + + = =

The minimum polynomial of
5

is
2
5
1 ) ( x x x + + =

Suppose all-zero code word
) 0 0 0 0 ( L = c
is
transmitted and
12 5 2
) ( x x x x r + + =
is received.
Dividing r(x) by
) (
1
x
,
) (
3
x
and
) (
5
x
,
respectively,
we obtain the remainders:
2
5
3
3
1
) (
1 ) (
1 ) (
x x b
x x x b
x b
=
+ + =
=

The syndrome components are
10 5
3 5
5 18 12 6
3 6
10 9 6 3
3 3
4
1 4
2
1 2
1 1
) (
1 ) (
1 ) (
1 ) (
1 ) (
1 ) (


= =
= + + = =
= + + = =
= =
= =
= =
b s
b s
b s
b s
b s
b s

Hence
) , , 1 , , 1 , 1 (
5 10 10
= S
.




Example: (p. 209) consider t = 2, m = 5, (32, 21)
BCH code

The primitive polynomial for m = 5 is
5 2
1 ) ( x x x + + =

8 4 2
, , ,
and
16

have the same minimum


polynomial
24 12 6 3
, , ,
and
17

have the same minimum


polynomial
5 4 3 2
3
1 ) ( x x x x x + + + + =

9 20 10 5
, , ,
and
8

have the same minimum


polynomial
5 4 2
5
1 ) ( x x x x x + + + + =

25 28 14 7
, , ,
and
19

have the same minimum


polynomial
5 3 2
7
1 ) ( x x x x x + + + + =

26 13 22 11
, , ,
and
21

have the same minimum


polynomial
5 4 3
11
1 ) ( x x x x x + + + + =


The generator polynomial of (32, 21) code is
10 9 8 6 5 3
3 1
1 ) ( ) ( ) ( x x x x x x x x x g + + + + + + = =


The roots of the generator polynomial
include
3 2
, ,
and
4


Since
12 11 8 7 2
) ( x x x x x x r + + + + =

We obtain
28 4
4
8 3
3
14 2
2
7
1
) (
) (
) (
) (




= =
= =
= =
= =
r S
r S
r S
r S

Note here that
4
1
2
2 4
) ( ) ( S S S = =

Then the error-locator polynomial is
obtained by the equation
21 31 10
2
26 31 5
1
10 5 2 15 7
15
7
3 7 8
2
7
1

) 1 )( 1 ( 1 ) (
) (

= =
= =
+ + = + + =
=
+
=
=




Z
Z
z z z z z L

Thereby indicating errors at 26
th
and 21
st

coordinates of
r

12 11 10 8 7 5 2
) ( x x x x x x x x c + + + + + + =

(Note
i
r
i
Z =
)

12. Computation of Error-Location Numbers
Chien Search. (R.T. Chien, 1964)

A Chien-search circuit is shown in Fig. 5.2.

=
+ = + + + + =


1
2
2 1 0
) 1 ( ) (
i
i
z Z z z z z L L

where
1
0
=

The roots of L(z) in GF(
m
2
) can be
determined by substituting the elements of
GF(
m
2
) in L(z).
If
0 ) ( =
i
L
, then
i

is the root of L(z) and


i n i
=
is an error-location number.
To decode the first received digit
1 n
r
, we
check whether

is a root of L(z). If
0 ) ( = L
,
then
1 n
r
is erroneous and must be corrected.
If
0 ) ( L
, then
1 n
r
is error-free.
To decode
i n
r

, we test whether
0 ) ( =
i
L
. if
0 ) ( =
i
L
,
i n
r

is erroneous and must be


corrected, otherwise
i n
r

is error free.


Is a
codeword
1

1 L D
i
t
1 j
ij
j i
= =

=
) (

=
=
otherwise 0,
1 D if 1,
e
i
i
) (
1 - n 1 0
r , , r , r r L =
' c
' c
' c
Yes
decoding failure
i
e
No

Figure 5.2 Chien search and error-correction
for binary code.
13. Peterson-Gorenstein-Zierler Decoding
Algorithm

From equation (5-16) [Chen / Reed eq. (5-38)]


> = + + +
+
j S S S S
j j j j
for
1 1 1 1
L

Assuming that t = , then
t j S S S S
j j t j t t j t
> = + + +
+
for
1 1 1 1
L
(5- 18)
e.g.
1 + = t j
, we have
1 1 2 1 1 +
= + + +
t t t t
S S S S L

The following matrix equation is obtained for
the symmetric function
j

as follows:

=
+
+

+
+

t
t
t
t
t
t t t t
t t
t t
S
S
S
S S S S
S S S S
S S S S
S
2
2
1
1
1
1 2 2 2 1
1 3 2
1 2 1
'
M M M M M M
L
L

(5- 19)

It can be shown that
' S
is nonsingular if the
received word contains exactly t errors.

It also can be shown that
' S
is singular if
fewer than t errors occur. If
' S
is singular,
then the rightmost column and bottom rows
can be removed and the determinant of the
resulting matrix computed.

This process is repeated until one reaches a
non-singular matrix. The coefficients of the
error-locator polynomial are then founded by
the use of standard algebraic technique.

Once the

error locations are known, then


we can use the relation between syndrome
components and error locations.
[eq. (5-8)]
The syndrome components can be computed
by

=

=
= = =


1
1
0
) ( ) (
l
j
l i
n
k
k j
k
j
j
Z e e e S
l
where

= + + + + =
1
0
1
1
2
2 1 0
) (
n
k
k
k
n
n
x e x e x e x e e x e L

Thus we have
t
i
t
i
t
i t
i i i
i i i
Z e Z e Z e S
Z e Z e Z e S
Z e Z e Z e S
2 2
2
2
1 2
2 2
2
2
1 2
2 1 1
2 1
2 1
2 1

+ + + =
+ + + =
+ + + =
L
M
L
L


The system equations can be reduced to the
following matrix form:

S
S
S
e
e
e
Z Z Z
Z Z Z
Z Z Z
e D
i
i
i
M
M
L
M M M
L
L
2
1
2 1
2 2
2
2
1
2 1
2
1
(5- 20)
Decoding is completed by solving for the
} {
l
i
e

This is a general case of nonbinary BCH
codes.







Example (5.9)
Consider a nonbinary BCH code (7, 3) of
length 7 (symbols) this code is constructed
over GF(8) with generator polynomial
3 2 3 3 4
4 3 2
) )( )( )( ( ) (


+ + + =
=
x x x
x x x x x g

Let the received polynomial be
2 5 3 4 2 6 2
) ( x x x x x r + + + =

Then the syndrome components are
3
4
4
3
3
2
6
1
, , , = = = = S S S S

Eq. (5-19) gives



= =

=
2
2
1
3
4
1
2
4 3
3 6
,
' S

Thus
1 ) (
2 2
+ + = x x x L

The error locations are founded to be
5
5
3
3
2 7 5
2
4 7 3
1
) (
,
x e x e x e
Z Z
+ =
= = = =



Eq. (5-20) gives

=
3
6
5
3
3 6
5 3



e
e
e D

The error magnitudes are found to be
5 5 3
5
5 3
) (
,
x x x e
e e


+ =
= =

Finally
2 5 3 3 4 2 5 5 6 2
) ( ) ( ) ( x x x x x x r x e x c + + + + = + =

Note that m = 3, the primitive polynomial is
3
1 ) ( x x x p + + =



14. BCH Codes as Industry Standards

(a) (511, 493) BCH code in ITU-T. Rec. H.261
video codec for audiovisual service at kbit/s
a video coding a standard used for video
conferencing and video phone.
2
18 493
9 511
=
= =
= =
t
k n k
m n


(b) (40, 32) BCH code in ATM (Asynchronous
Transfer Mode) pp. 223-227.
This is shortened cyclic code that can correct
1-bit error and detect 2-bit errors.

Das könnte Ihnen auch gefallen