Sie sind auf Seite 1von 7

IPASJ International Journal of Electronics & Communication (IIJEC)

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

A Mathematical Derivation for Error


Correction and Detection in Communication
using BCH Codes
P.Mozhiarasi1, Ms.C.Gayathri2
1

(ME Student VLSI Design, Sri Eshwar College of Engineering, Coimbatore, Tamil Nadu, India)

(Asst. Prof Department of ECE, Eshwar College of Engineering, Coimbatore, Tamil Nadu, India)
3

Third Author Affiliation with address

ABSTRACT
In this paper, (15,5,3)BCH encoder and decoder are designed using mathematical derivation. The codeword length(n), message
length(k) and maximum number of correctable errors(t) are 15, 5 and 3 respectively. The encoding and decoding is done over
the Galois Field GF(24) with an irreducible polynomial of x4 +x+1. The redundant bits(R(X)) are appended with the message
bit, to form a codeword in encoder part and it is transmitted through the channel. In the meanwhile, the Flash memory is used
to store codeword, later for correction part in decoder side. Decoder includes 3 major steps: 1) The Syndrome calculation(SC) is
carried out with the received polynomial(r(x)) and minimum polynomial for detecting errors.2) Berlekamp Massey Algorithm
(BMA) helps in finding the location of the error if error is identified in the received codeword. 3)The Chein Search(CS)
method finds the error. The error is then corrected effectively.

Keywords: BCH (Bose Chaudhuri Hocquenghem), Syndrome calculation(SC), Berlekamp Massey Algorithm (BMA),
Chein Search(CS)

1. INTRODUCTION
In digital communication, the data is transmitted through the channel [Figure 1] to the receiver side [11]. If noise is
included in the channel, data that is received at the receiver side will not be the actual data. This may create a
corruption of data which is unacceptable. There are lots of Error Correcting Codes (ECC) available, one among them is
BCH codes[10]. BCH codes have many advantages compared to other codes. They include cost effective, reliable and
powerful tool for correcting errors. They reduce the complexity, increase the throughput and there is a flexibility in
selection of codeword lengths(n) and code rate(r = k / n). These codes can detect upto t random errors which is
generalization of Hamming codes for multiple error correction. BCH codes are mostly preferred for their simplicity. In
encoder stage, the message bit is padded with zeroes which is then divided with the generator polynomial to obtain the
remainder which is known as redundant bit(R(X)). If remainder is zero then no error in codeword otherwise
error(Syndrome) is present. The decoder has three pipelined stages namely Syndrome calculation, Berlekamp Massey
Algorithm and Chien Search. This syndrome calculation operates over Galois Field(GF) which is also known as Finite
Field[12]. Galois Field(GF) is a set of finite number of elements that may add, subtract, multiply, divide the field
elements and one more field element within that set is obtained. GF(2) is called Base Field, then GF(2m) is an extension
field. The properties of field element are applied for syndrome calculation in decoding stage. The Berlekamp Massey
Algorithm(BMA)[14] is used for finding error locator polynomial[3]. It uses a Key Equation[5] by providing known
number of coefficients of generating function to determine remaining coefficients of the polynomial. After finding the
coefficients of the polynomial[1] the perfects roots are identified and these roots are given to the Chien Search
Algorithm. The Chien Search (CS) Algorithm finds the error location in the received polynomial by inversing the
obtained roots. By performing modulo-2 addition for received polynomial and error pattern polynomial, the actual data
is retrieved. This technique may be applicable for banking account, digital television, satellite, wireless or mobile
communication etc., In this paper (15,5)BCH encoder and decoder are designed[Figure 2] and they can detect and
correct upto triple errors in any position of 15 bit codeword. In early stage, each character is a text message which is
converted to a 5 bit binary data and is encoded to form 15 bit codeword. The BCH decoder is implemented with
Berlekamp Massey Algorithm(BMA) and Chien Search (CS) Algorithm.

Volume 2, Issue 10, October 2014

Page 6

IPASJ International Journal of Electronics & Communication (IIJEC)


A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

Figure 1 Data transmission (a) Transmitter side (b) Receiver side

2. BCH CODES
BCH(Bose Chaudhuri Hocquenghem) code[14] is defined by
Codeword length, n = 2m-1
Number of parity check bits, n-k mt
Minimum distance, dmin 2t+1
where, m primitive polynomial
k message length
t maximum number of correctable errors

Figure 2 Encoding and decoding process


They are superior error correcting code among the other codes. The generator polynomial g(x) of the code is
represented as roots over Galois Field GF(2m). In this work let us consider m=4, n=2m -1= 24-1=15, k=5, t =3, dmin
=2t+1=2(3)+1=7. The generator polynomial g(x) is obtained by finding roots of polynomial P(x) of degree m which is
primitive if and only if smallest integer n for which p(x) divides xn+1[6]. Here addition is performed by modulo 2addition.
P(x) = (x15 +1) = (x+1) (x4+x+1)(x10+x9+x8+x6+x5+x2+1)
q(x)
p(x)
10
8
5
By inversing the root q(x), generator polynomial g(x) will become x +x +x +x4+x2+x+1. Let fi (x), i= 1,2,3,,2t be

Volume 2, Issue 10, October 2014

Page 7

IPASJ International Journal of Electronics & Communication (IIJEC)


A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

the minimal polynomial[3], then g(x) = LCM{f1(x),f2(x),f3(x),,f2t(x)}. But, g(x)[3] is simplified to g(x) =
LCM{f1(x),f3(x),f5(x),,f2t-1(x)}[12] because every even power of primitive element will have same minimal polynomial
as some odd power of the elements having the number of factors in the polynomial[13]. Therefore,
g(x) = LCM{f1(x),f3(x),f5(x)}
(see Table 2 & 3)
where
f1(x) = (x+) (x+2) (x+8) (x+4) = x4+x+1
f3(x) = (x+3) (x+6) (x+12) (x+9) = x4+x3+x2 +x+1
f5(x) = (x+5) (x+10) = x2+x+1
These factors are obtained by primitive polynomial x4+x+1 and conjugates of 16 field elements using Galois Field
theory. (see Table 2)

Table 1: (a) modulo-2 addition


(b) modulo-2 multiplication
Note:
1) Multiplication of two elements of Galois field is done by adding their exponents and applying 15 = 1.
Example: 12. 7 = 19 = 15. 4 = 4
2) Division of two elements of Galois Field is carried out by multiplying numerator with 15, then dividing it by
the denominator. Example 3/ 6 = 18/ 6 = 12
3) Addition of two elements of Galois Field is implemented by using Table 2.Example: 7+ 9 = (3++1) +
(3+) = 1 (see Table 1 & 2)
Table 2: GF(16) generated with Primitive polynomial x4+x+1[15]

The polynomial form is obtained by considering first 6 rows of power form. [12]
When 5 is considered, 5= (4) = (+1) = 2+,
when 6 is considered, 6 = (5) = (2+) = 3+ 2,
finally for 14, 14 = (13) = (3+2+1) = 4+ 3+ = (+1)+ 3+ = 3+1.
The 4-Tuple form is obtained from polynomial form by representing them in 3, 2, , 1 and converted to Decimal
form.
Example: 4 = 03+02++1 = 0011 = 3

Volume 2, Issue 10, October 2014

Page 8

IPASJ International Journal of Electronics & Communication (IIJEC)


A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

Table 3 Minimal Polynomials of the element in GF(16)

1(x)
2(x)
3(x)
4(x)

Conjugate roots
0
1
,2,4,8
3,6,9,12
5,10
7 11 13 14
, , ,

Minimal polynomial
x
x+1
x4+x+1
x4+x3+x2+x+1
x2+x+1
x4+x3+1

The minimal polynomial can be obtained by using conjugate roots as mentioned below.
Those conjugate roots[1] can be found by considering
,
,
,
where i = 1,2,3,[14] For example when i
value is substituted in
, we obtain ,
,
,
and the same procedure is followed for
other roots. Therefore , 2, 4, 8 are used for finding the minimal polynomial 1(x)
1(x) = (x+) (x+2) (x+4) (x+8)
= (x2 + (2+)x + 3) ( x2+(4+8)x+12)
= (x2+5x+3) ( x2+((+1)+(2+1))x+12)
(see Table 2)
= (x2+5x+3) ( x2+(2+)x+12)
(see Table 1)
= (x2+5x+3) ( x2+ 5x+12)
= x4+5x3+12x2+5x3+10x2+ 17x+3x2+ 8x+15
= x4+(5+5) x3+(12+10 +3) x2+ (2+ 8 ) x+1
(see Table 2)
0
= x4 +((3+2++1)+( 2++1)+ 3 )x2+ (2+(2+1)) x+1 (see Table 1)
= x4+x+1
0
similarly, we can calculate minimal polynomial for 2(x), 3(x), 4(x).
2.1 BCH Encoder
In initial stage, the message polynomial(M(x)) is padded with (n-k) zero bits to form Xn-k M(x) i.e., Xn-k M(x) = X15-5
M(x) = X10 M(x) = M + 0000000000 By Xn-k M(x) mod g(x), the remainder polynomial(R(x)) is obtained which should
be appended with the message polynomial(M(x)) to produce the codeword(c(x)) i.e., c(x) = Xn-k M(x) + R(x). This
codeword is then stored in flash memory, later for correction purpose in decoder stage[10]. These encoder procedure is
illustrated by considering M(x) = 10001.
Therefore, Xn-k M(x) = X10 M(x) = 100010000000000. Dividing Xn-k M(x) by g(x)[4] we obtain remainder polynomial
R(x) = 1110101100 which is then appended with X10 M(x) to get codeword, c(x) = 100011110101100.
2.1 BCH Decoder
R(x)
M(x)
2.2.1 Syndrome Calculation
Let us consider c(x) with 3 errors (t = 3) and represent them as r(x) i.e., when noise is added in the channel while
transmitting the data to the receiver[10]. At the receiver side, let us assume r(x) = 110010110100100. The number of
syndrome elements is 2*t = 6, to find t=3 errors. Those syndrome elements[3] are represented as S1, S2, S3, S4, S5, S6 and
they can be calculated by
S1(x) = r(x) mod f1(x)
S2(x) = r(x) mod f2(x) = r(x) mod f1(x)
S3(x) = r(x) mod f3(x)
S4(x) = r(x) mod f4(x) = r(x) mod f1(x)
S5(x) = r(x) mod f5(x)
S6(x) = r(x) mod f6(x) = r(x) mod f3(x)
By the property of Field element[4] several powers of generating element will have the same minimal polynomial (see
Table 2) When f(x) is polynomial over GF(2), is an element of GF(2m)[15]. Thus, syndrome polynomial can be
represented as S(x) = S1x + S2x2 + S3x3++ S2tx2t.
S1() = r() mod f1() = 3+ 2+ +1= 12
S2(2) = r(2) mod f2(2) = r(2) mod f1(2) = 3+ = 9
S3(3) = r(3) mod f3(3) = 3+ 2+ +1= 12
S4(4) = r(4) mod f4(4) = r(4) mod f1(4) = 3
S5(5) = r(5) mod f5(5) = 2+ = 5

Volume 2, Issue 10, October 2014

Page 9

IPASJ International Journal of Electronics & Communication (IIJEC)


Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm
Email: editoriijec@ipasj.org
ISSN 2321-5984

A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

S6(6) = r(6) mod f6() = r(6) mod f3(6) = 3+ = 9


The Syndrome can be calculated by
For S1() = r() mod f1()
r() = 14+ 13+ 10+ 8+ 7+ 5+ 2
= (3+1)+(3+ 2+1)+(2+ +1)+( 2+1)+(3++1)+( 2+ )+2
= 3+ 2+ +1 = 12
f1() = 4+ +1 = (+1)++1 = 0
12
Therefore, S1() = , likewise S2(2), S3(3), S4(4), S5(5), S6(6) syndromes can be calculated. If the remainder
equals zero, then it is declared that no error in the codeword or else error(S) is present. So this error will be a seed for
decoding the codeword and to find error location.
2.2.2 Berlekamp Massey Algorithm:
This method has been reduced by a Berlekamp algorithm and error locator polynomial[Table 4] is obtained by iterative
method[1].
Table 4 Finding error locator polynomial
()

-1/2
0
1
2
t=3

(x)
1
1
12
x+1
7x2+12x+1
25x3+5x2+12x+1

d
1
S1
4
2
-

l
0
0
1
2
-

2-l
-1
0
1
2
-

Note: 1) Lin and Costello notations were used


2) d represents discrepancy value
The Key Equation is given by

Steps:

= 1 + 12 (1)-1x(1)
= 12x + 1

Volume 2, Issue 10, October 2014

Page 10

IPASJ International Journal of Electronics & Communication (IIJEC)


A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

2.2.3 Chien Search Algorithm


The roots of
in GF (24) should be found out by following order[2]. If
11,12, 13, 14 then they are considered as roots.
Example:
= 25(0)3+ 5 (0)2+ 12(0)+1 = 1 0
= 25(1)3+ 5 (1)2+ 12(1)+1
= 10+ 5+ 12+1
= (2+ +1)+(2+ ) +(3+2+ +1)+1
= 3+ 2+ +1 0
= 25()3+ 5 ()2+ 12()+1
= 28+ 7+ 13+1
= 13+ 7+ 13+1
= (3+ 2+1)+(3+ +1) +(3+2+1)+1
= 3+ 0
= 25(2)3+ 5 (2)2+ 12(2)+1
= 31+ 9+ 14+1
= + 7+ 13+1
= +(3+) +(3+1)+1 = 0
= 25(6)3+ 5 (6)2+ 12(6)+1
= 25(18)+ 5(12)+ 12(6)+1
= 43+ 17+ 18+1
= 13+ 2+ 3+1
= (3+2+) +2+3+1 = 0
= 25(12)3+ 5 (12)2+ 12(12)+1
= 25(36)+ 5(24)+ 24+1
= +14+ 9+1
= + 14+ 9+1
= +(3+1) +(3+ )+1 = 0
= 25(14)3+ 5 (14)2+ 12(14)+1
= 25(42)+ 5(28)+ 26+1
= 7+3+ 11+1
= (3++1)+ 3 +(3+ 2+ ) = 3+ 2+1 0
2
6
Therefore, , , 12 are the roots for
= 25x3+ 5 x2+ 12x+1. The bit position of error location will be the
2
6
12
inverse of their roots ( , , ) i.e., 010001000001000

Volume 2, Issue 10, October 2014

Page 11

IPASJ International Journal of Electronics & Communication (IIJEC)


A Publisher for Research Motivation........

Volume 2, Issue 10, October 2014

Web Site: http://www.ipasj.org/IIJEC/IIJEC.htm


Email: editoriijec@ipasj.org
ISSN 2321-5984

Thus, the error pattern polynomial can be written as e(x) = x13 + x9+ x3. As a result, the actual data is recovered by
performing modulo-2 addition for r(x) and e(x)[7].
c(x) = r(x) + e(x)
= 110010110100100 + 010001000001000
= 100011110101100
M(x)

R(x)

3. CONCLUSION
The error correcting technique plays an important role in modern communication system. At first, each character in a
text message is transformed to a binary data. (15, 5)BCH encoder and decoder are designed with mathematical
derivations and upto 3 errors can be detected and corrected by using Berlekamp Massey Algorithm (BMA) and Chien
Search (CS). The derived BCH encoder and decoder can be designed in future using hardware description language
(HDL) known as Verilog, VHDL and synthesized by Xilinx ISE 13.2 simulator.

References
[1] Arul K. Subbiah, Somnath Viswanath,Evolving throughput driven architecture for error correction in NAND
memory, Arasan Chip Systems Inc. White Paper, February 2010.
[2] Berlekamp.E.R, Algebraic Coding Theory, McGrawHill, New York, 1968.
[3] Hank Wallace, Error Detection and Correction using BCH Codes, Copyright 2001 Hank Wallace.
[4] http://en.wikipedia.org/wiki/Polynomial_long_division, an article on polynomial long division in Wikipedia.
[5] Lin. S and Costello Jr. D.J, Error Control Coding, Prentice-Hall, New Jersey, 1983.
[6] Paul Garrett Factoring xn-1: cyclotomic and Aurifeuillian polynomials, March 16, 2004.
[7] Prashanthi. M, Samundiswary. P,An Enhanced (15, 5) BCH Decoder Using Verilog HDL, Pg. No. 4356 - 4361,
International Journal of Advanced Research in Computer and Communication Engineering, Vol. 2, Issue 11,
November 2013.
[8] Rohith S, Pavithra S, FPGA Implementation of (15, 7) BCH encoder and decoder for text message, Pg. No. 209214, International Journal of Research and Technology, Vol. 2, Issue 09, September 2013.
[9] Ryoh Fuji-Hara, Galois Field Manual, University of Tsukuba, Second edition, June 2008.
[10] Shu Lin, Daniel J. Castello, Error control coding: Fundamentals and applications, Prentice-Hall, New Jersey,
1983.
[11] Simon Haykin, Communication Systems, 4th Edition, John Wiley & Sons, Inc.
[12] Ass. Prof. Dr Thamer, Information Theory.
[13] Wireless Information Transmission Systems Lab, BCH Codes, Chapter 6, Institute of Communication
Engineering, National Sun Yat Sen University.
[14] W.W.Peterson, Encoding and error-correction procedures for the Bose-Chaudhuri Codes, IRE Trans. Inf.
Theory, September 1960.
[15] Yunghsiang S. Han, BCH Codes, Graduate Institute of Communication Engineering, National Taipei University
Taiwan.

Volume 2, Issue 10, October 2014

Page 12

Das könnte Ihnen auch gefallen