BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU1 BCH Code a larger class of powerful random error-correcting cyclic codes a remarkable generalization of the Hamming codes for multiple-error correction Def : Let q and m be given and let α be any element of GF(q m ) of order n. Then for any positive integer t and any integer j 0, the corresponding BCH code is the cyclic code of block length n with the generator polynomial g(x) = LCM[f j 0 (x), f j 0 +1 (x), …, f j 0 +2t-1 (x)] where f j (x) is the minimal polynomial at α j ※ Let 1. n = q m – 1 |n | q m j 0 = 1 |α: non-primitive element (α n = 1) | α: primitive element (α n = 1) | α, α 2, α 3, …, α 2t | primitive (or narrow-sense) BCH code|
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU2 ※ Let q = 2, j 0 = 1 ﹡取相鄰 power of Block length : n = 2 m – 1 or n | 2 m – 1 α 保證 d* ≥ 2t + 1 Number of parity-check digits : n – k ≤ mt Minimum distance : d* ≥ 2t + 1 (BCH bound) t-error-correcting BCH code designed distance g(x) = LCM [f 1 (x), f 2 (x), …, f 2t (x)] ∵ i (even) = I ’ 2 l where i ’ is an odd number and l ≥ 1 ∴ α i = (α i ’ ) 2 l is a conjugate of α i ’ ∴ α i & α i ’ have the same minimal polynomial i.e. f i (x) = f i’ (x) ∴ g(x) = LCM [ f 1 (x), f 3 (x), …, f 2t-1 (x) ] ∵ deg[ f i (x) ] ≤ m n – k ≤ mt 2 = 12 4 = = 32 8 = = 52 1 Eg: t = 2 g(x) = LCM [f 1 (x), f 2 (x), f 3 (x), f 4 (x)] q = 2 = LCM [x 4 +x+1, x 4 +x+1, x 4 +x 3 +x 2 +x+1, x 4 +x+1] m = 4 = (x 4 +x+1)(x 4 +x 3 +x 2 +x+1) n = q m – 1 = 15 = x 8 +x 7 +x 6 +x 4 +1 n – k = 8 BCH(15, 7, 5) 2t + 1 ≤ d* ≤ w(g(x)) (n, t) k ! k is unknown until after g(x) is found
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU3 Eg: t = 2 g(x) = LCM [f 1 (x), f 2 (x), f 3 (x), f 4 (x)] q = 4 = (x 2 +x+2)(x 2 +x+3)(x 2 +3x+1) m = 2 = x 6 +3x 5 +x 4 +2x 2 +2x+1 n = q m – 1 = 15 BCH(15, 9) t = 6 g(x) = x 14 +x 13 +…+x 2 +x+1 Q: BCH(15, 1) – it can actually correct 7 errors simple repetition code ※ The single-error-correcting BCH code of length 2 m – 1 is a Hamming Code
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU4 Table 7.1 Representations of GF(2 4 ). p(z) = z 4 + z + 1 Exponential Notation Polynomial Notation Binary Notation Decimal Notation Minimal Polynomial x α0α x + 1 α1α1 z00102x 4 + x + 1 α2α2 z2z x 4 + x + 1 α3α3 z3z x 4 + x 3 + x 2 + x + 1 α4α4 z x 4 + x + 1 α5α5 z 2 + z01106x 2 + x + 1 α6α6 z 3 + z x 4 + x 3 + x 2 + x + 1 α7α7 z 3 + z x 4 + x α8α8 z x 4 + x + 1 α9α9 z 3 + z101010x 4 + x 3 + x 2 + x + 1 α 10 z 2 + z x 2 + x + 1 α 11 z 3 + z 2 + z x 4 + x α 12 z 3 + z 2 + z x 4 + x 3 + x 2 + x + 1 α 13 z 3 + z x 4 + x Α 14 z x 4 + x 3 + 1
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU5 Table 7.2 GF(4 2 ) GF(4)[x]/z 2 +z+2 p(z) = z 2 +z+2 α α 2 α 4 α 8 α 16 α α 3 α 6 α 12 α 24 α 48 α 3 α 9 Exponential Notation Polynomial Notation Binary Notation Decimal Notation Minimal Polynomial α0α0 1011x + 1 α1α1 z104x 2 + x + 2 α2α2 z x 2 + x + 3 α3α3 3z x 2 + 3x + 1 α4α4 z x 2 + x + 2 α5α5 2022x + 2 α6α6 2z208x 2 +2x + 1 α7α7 2z x 2 + 2x + 2 α8α8 z x 2 + x + 3 α9α9 2z x 2 + 2x + 1 α x + 3 α 11 3z3012x 2 + 3x + 3 α 12 3z x 2 + 3x + 1 α 13 2z x 2 + 2x + 2 α 14 3z x 2 + 3x + 3 α = z α 15 = 1
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU6 TABLE 6.1 BCH CODES GENERATED BY PRIMITIVE ELEMENTS OF ORDER LESS THAN 2 10 ( 上 ) mnktmnktmnktnktnkt n = 2 m - 1 For t small n – k = mt
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU7 TABLE 6.1 BCH CODES GENERATED BY PRIMITIVE ELEMENTS OF ORDER LESS THAN 2 10 ( 下 ) nktnktnktnktnkt
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU8 TABLE 6.2 GALOIS FIELD GF(2 6 ) WITH ρ(α) = 1 + α +α 6 = 0 00( )α 15 α 3 +α 5 ( ) 11( )α α +α 4 ( ) α αα 17 α+α 2 +α 5 ( ) α2α2 α 2 ( )α 18 1+α+α 2 +α 3 ( ) α3α3 α 3 ( )α 19 α+α 2 +α 3 +α 4 ( ) α4α4 α 4 ( )α 20 α 2 +α 3 +α 4 +α 5 ( ) α5α5 α 5 ( )α 21 1+α +α 3 +α 4 +α 5 ( ) α6α6 1+α( )α α 2 +α 4 +α 5 ( ) α7α7 α+α 2 ( )α α 3 +α 5 ( ) α8α8 α 2 +α 3 ( )α α 4 ( ) α9α9 α 3 +α 4 ( )α 25 α +α 5 ( ) α 10 α 4 +α 5 ( )α 26 1+α+α 2 ( ) α 11 1+α( )α 27 α+α 2 +α 3 ( ) α α 2 ( )α 28 α 2 +α 3 +α 4 ( ) α 13 α +α 3 ( )α 29 α 3 +α 4 +α 5 ( ) α 14 α 2 +α 4 ( )α 30 1+α +α 4 +α 5 ( )
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU9 TABLE 6.4 GENERATOR POLYNOMIALS OF ALL THE BCH CODES OF LENGTH 63 nk tg(X) g 1 (X) = 1 + X + X g 2 (X) = (1 + X + X 6 )(1 + X + X 2 + X 4 + X 6 ) 45 3 g 3 (X) = (1 + X + X 2 + X 5 + X 6 )g 2 (X) 39 4 g 4 (X) = (1 + X 3 + X 6 )g 3 (X) 36 5 g 5 (X) = (1 + X 2 + X 3 )g 4 (X) 30 6 g 6 (X) = (1 + X 2 + X 3 + X 5 + X 6 )g 5 (X) 24 7 g 7 (X) = (1 + X + X 3 + X 4 + X 6 )g 6 (X) 1810g 10 (X) = (1 + X 2 + X 4 + X 5 + X 6 )g 7 (X) 1611g 11 (X) = (1 + X + X 2 )g 10 (X) 1013g 13 (X) = (1 + X + X 4 + X 5 + X 6 )g 11 (X) 715g 15 (X) = (1 + X + X 3 )g 13 (X)
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU10 TABLE 6.2 Continued α α 2 +α 5 ( )α 47 1+α+α 2 +α 5 ( ) α α 3 ( )α α 2 +α 3 ( ) α 33 α +α 4 ( )α 49 α +α 3 +α 4 ( ) α 34 α 2 +α 5 ( )α 50 α 2 +α 4 +α 5 ( ) α α +α 3 ( )α 51 1+α +α 3 +α 5 ( ) α 36 α+α 2 +α 4 ( )α α 2 +α 4 ( ) α 37 α 2 +α 3 +α 5 ( )α 53 α +α 3 +α 5 ( ) α 38 1+α +α 3 +α 4 ( )α 54 1+α+α 2 +α 4 ( ) α 39 α+α 2 +α 4 +α 5 ( )α 55 α+α 2 +α 3 +α 5 ( ) α 40 1+α+α 2 +α 3 +α 5 ( )α 56 1+α+α 2 +α 3 +α 4 ( ) α α 2 +α 3 +α 4 ( )α 57 α+α 2 +α 3 +α 4 +α 5 ( ) α 42 α +α 3 +α 4 +α 5 ( )α 58 1+α+α 2 +α 3 +α 4 +α 5 ( ) α 43 1+α+α 2 +α 4 +α 5 ( )α α 2 +α 3 +α 4 +α 5 ( ) α α 2 +α 3 +α 5 ( )α α 3 +α 4 +α 5 ( ) α α 3 +α 4 ( )α α 4 +α 5 ( ) α 46 α +α 4 +α 5 ( )α α 5 ( ) α 63 = 1
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU11 TABLE 6.3 MINIMAL POLYNOMIALS OF THE ELEMENTS IN GF(2 6 ) ElementsMinimal polynomials α, α 2, α 4, α 8, α 16, α X + X 6 α 3, α 6, α 12, α 24, α 48, α X + X 2 + X 4 + X 6 α 5, α 10, α 20, α 40, α 17, α X + X 2 + X 5 + X 6 α 7, α 14, α 28, α 56, α 49, α X 3 + X 6 α 9, α 18, α X 2 + X 3 α 11, α 22, α 44, α 25, α 50, α X 2 + X 3 + X 5 + X 6 α 13, α 26, α 52, α 41, α 19, α X + X 3 + X 4 + X 6 α 15, α 30, α 60, α 57, α 51, α X 2 + X 4 + X 5 + X 6 α 21, α X + X 2 α 23, α 46, α 29, α 58, α 53, α X + X 4 + X 5 + X 6 α 27, α 54, α X + X 6 α 31, α 62, α 61, α 59, α 55, α X 5 + X 6
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU12 Def t-error-correcting BCH code of length n = 2 m – 1: A binary n-tuple v = (v 0, v 1, …, v n-1 ) is a code word iff the polynomial v(x) = v 0 + v 1 x + … + v n-1 x n-1 has α, α 2, α 3, …, α 2t as roots. v(α i ) = v 0 + v 1 α i + v 2 α 2i + … + v n-1 α (n-1)i = 0 1 ≤ i ≤ 2t
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU13 By conjugate property if x – α i | v(x) α i α j 互為 conjuqate then x – α j | v(x) Ref: Block Codes – extended 4 Proof: d* ≥ 2t + 1 (BCH bound) suppose code vector v = (v 0, v 1, …, v n-1 ) with weight ≤ 2t Let v j1, v j2, …, v j be the nonzero components of v
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU14 implies (1, 1, …,1) =
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU15 Syndrome S = (S 1, S 2, …, S 2t ) = rH T r = (r 0, r 1, …, r n-1 ) S i = r(α i ) r(x) = r 0 + r 1 x + … + r n-1 x n-1 r(x) = α i (x)f i (x) + b i (x) f i (x): minimal polynomial of α i ∵ f i (α i ) = 0 S i = r(α i ) = b i (α i ) Q: 與 s(x) = r(x)/g(x) 之關係
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU16 Peterson-Gorenstein-Zierler Decoder (1) e(X) = e 0 + e 1 X + … + e n-1 X n-1 where at most t coefficients are nonzero (2) Suppose v errors actually occur, 0 ≤ v ≤ t, in unknown locations i 1, i 2, …,i v ∴ e(X) = e i 1 X i 1 + e i 2 X i 2 + … + e i v X i v (3) S 1 = v(α) = c(α) + e(α) = e(α) = e i 1 α i 1 + e i 2 α i 2 + … + e i v α i v Let Y l = e i l : error magnitude 1 ≤ l ≤ v X l = α i l : error-location number Note : all X l are different ( ∵ α n = 1) S 1 = Y 1 X 1 + Y 2 X 2 + … + Y v X v i j, e i j, v are unknown ! Q
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU17 (4) For α α 2 α 3 … α 2t S 1 = Y 1 X 1 + Y 2 X 2 + … + Y v X v Y l GF(q) S 2 = Y 1 X Y 2 X … + Y v X v 2 X l GF(q m ) S 2 = Y 1 X Y 2 X … + Y v X v 3., S 2t = Y 1 X 1 2t + Y 2 X 2 2t + … + Y v X v 2t 1.( * ) 至少有一解 ∵ Syndrome S i is defined in such way 2. 證明此解 unique ( * ) nonlinear equations
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU18 Consider the polynomial Λ(x) ≡ (1-X 1 x)(1-X 2 x)…(1-X v x) = 1 + Λ 1 x + Λ 2 x 2 + … + Λ v x v – (1) error-locator polynomial If we knew the coefficients Λ l of Λ(x) we could find the zeros of Λ(x) to obtain the error locations X l S i Λ l 1≤i≤2t 1≤l≤v Multiply both sides of (1) by Y l X l j+v and set x = X l -1
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU19 ∵ v ≤ t ∴ S 1 ~ S 2v all known
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU20 Thm : The Vandermonde matrix has a nonzero determinant iff all of X i 1 ≤ i ≤ u are distinct Thm : The matrix of syndromes M is nonsingular if u is equal to v, the number of errors that actually occurred. The matrix is singular if u > v. If v > t i.e. u < v 時 det(M) = ?
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU21
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU22 Enter υ(x) Compute syndromes S j = υ(α j+j 0 -1 ) j = 1 … 2t v = t det(M) = 0 v v-1 Find error location X l (l = 1…..v) by finding zeros of Λ(x) Halt Yes No special case j 0 = 1 α α 2 … α 2t Figure 7.1 The Peterson-Gorenstein-Zierler decoder.
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU23 Eg: BCH(15,5) triple-error-correcting code. g(X) = X 10 + X 8 + X 5 + X 4 + X 2 + X + 1 received code polynomial V(X) = X 7 + X 2 In GF(2 4 ) S 1 = α 7 + α 2 = α 12 S 2 = α 14 + α 4 = α 9 S 3 = α 21 + α 6 = 0 S 4 = α 28 + α 8 = α 3 S 5 = α 35 + α 10 = α 0 S 6 = α 42 + α 12 = 0
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU24
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU25 Reed-Solomon Code (maximum-distance code) (1)The symbol field GF(q) and the error-locator field GF(q m ) are the same (Y l ) (X l ) (i.e. m = 1) (2)Take α as primitive n = q m – 1 = q – 1 (3)The minimal polynomial over GF(q) of an element β in the same GF(q) is f β (X) = X – β (4)Take j 0 = 1 g(X) = (X – α)(X – α 2 )… (X – α 2t ) ∴ n – k = 2t eg1. (15,11) t = 2 GF(16) j 0 = 1 g(X) = (X – α)(X – α 2 ) (X – α 3 )(X – α 4 ) = X 4 + (Z 3 + Z 2 + 1)X 3 + (Z 3 + Z 2 )X 2 + Z 3 X + (Z 2 + Z + 1) = X 4 + α 13 X 3 + α 6 X 2 + α 3 X + α 10 n – k = 4 k = 11 (11 16-ary symbols 44 bits)
BCH_Code 2004/5/5Yuh-Ming Huang, CSIE, NCNU26 ※ 1. n – k + 1 = 2t + 1 ≤ d* ≤ 1 + n – k ∴ d* = 1 + n – k 2. R-S codes always have relatively short block-length as compared to other cyclic codes over the same alphabet ! eg2. (7,3) t = 2 GF(8) j 0 = 4 g(X) = (X – α 4 )(X – α 5 ) (X – α 6 )(X – α 0 ) = X 4 + (Z 2 + 1)X 3 + (Z 2 + 1)X 2 + (Z + 1)X + Z n – k = 4 k = 3 (3 8-ary symbols 9 bits) If i(X) = (Z 2 + Z)X 2 + X + (Z + 1) c(X) = i(X)g(X) = (α 4 X 2 + X + α 3 )(X 4 + α 6 X 3 + α 6 X 2 + α 3 X + α) = α 4 X 6 + αX 5 + α 6 X 4 + 0X 3 + 0X 2 + α 5 X + α 5