ELEC 405/511 Error Control Coding

24
ELEC 405/511 Error Control Coding Decoding Binary BCH Codes

Transcript of ELEC 405/511 Error Control Coding

Page 1: ELEC 405/511 Error Control Coding

ELEC 405/511 Error Control Coding

Decoding Binary BCH Codes

Page 2: ELEC 405/511 Error Control Coding

2

Decoding Binary BCH Codes • c(x) is the transmitted codeword • 2t consecutive powers of α are its roots

• The received word is r(x) = c(x)+e(x) • The error polynomial is

e(x) = e0+e1x+ … +en-1xn-1 • The syndromes are

1 2 1( ) ( ) ( ) 0b b b tc c cα α α+ + −= = = =

1

0

( ) ( ) ( ) , 1, ,2n

j j j kj k

k

S r e e j tα α α−

=

= = = =∑

Page 3: ELEC 405/511 Error Control Coding

3

Decoding Binary BCH Codes • Suppose there are v errors in locations

• The syndromes can be expressed in terms of these

error locations

• The Xl are the error locators • The 2t syndrome equations can be expanded in

terms of the v unknown error locations

1 2, , ,i i iν

1 1 1

( ) ( ) , 1, ,2l l

l

v v vi ij j j

j i ll l l

S e X j tα α= = =

= = = =∑ ∑ ∑

Page 4: ELEC 405/511 Error Control Coding

Power-Sum Symmetric Equations

4

1 1 2

2 2 2

2 1 2

3 3 3

3 1 2

2 2 2

2 1 2

v

v

v

t t t

t v

S X X X

S X X X

S X X X

S X X X

= + + +

= + + +

= + + +

= + + +

Page 5: ELEC 405/511 Error Control Coding

5

• The power-sum symmetric functions are nonlinear equations.

• Any method for solving these equations is a decoding algorithm for BCH codes.

• Peterson showed that these equations can be transformed into a series of linear equations.

Page 6: ELEC 405/511 Error Control Coding

The Error Locator Polynomial

• The error locator polynomial Λ(x) has as its roots the inverses of the v error locators {Xl}

• The roots of Λ(x) are then X1-1, X2

-1, …, Xv-1

• Now express the coefficients of Λ(x) in terms of the {Xl} to get the elementary symmetric functions of the error locators

6

1 01

( ) (1 ) ...v

vl v

l

x X x x x=

Λ = − = Λ + +Λ +Λ∏

Page 7: ELEC 405/511 Error Control Coding

7

0

1 1 2 11

2 1 2 1 3 2 1

3 1 2 3 1 2 4 2 1

1 2

1

v

ii

i ji j

i j ki j k

i

X X X X X

X X X X X X X X X X

X X X X X X X X X X X X

X X X X

ν ν

ν ν ν ν

ν ν ν

ν ν

−=

− −<

− −< <

Λ =

Λ = = + + + +

Λ = = + + + +

Λ = = + + +

Λ = =

Page 8: ELEC 405/511 Error Control Coding

8

From these sets of equations we get Newton’s Identities

1 1

2 1 1 2

3 1 2 2 1 3

1 1 1 1

1 1 1 2 1

2 1 2 1 1 2 1 2

0

2 0

3 0

0

0

0t t t t

S

S S

S S S

S S S

S S S S

S S S S

ν ν ν ν

ν ν ν ν

ν ν ν ν

ν− −

+ −

− − − + −

+ Λ =

+ Λ + Λ =

+ Λ + Λ + Λ =

+ Λ + + Λ + Λ =

+ Λ + + Λ + Λ =

+ Λ + + Λ + Λ =

Page 9: ELEC 405/511 Error Control Coding

Binary BCH Codes

• In fields of characteristic 2, i.e. GF(2m)

thus every second equation in Newton’s identities is redundant

9

22 2

21 1

v vj j

j l l jl l

S X X S= =

= = =

∑ ∑

Page 10: ELEC 405/511 Error Control Coding

Newton’s Identities for Binary Codes

10

1 1

3 1 2 2 1 3

5 1 4 2 3 3 2 4 1 5

2 1 1 2 2 2 2 3 1

0

0

0

0t t t t t

S

S S S

S S S S S

S S S S− − − −

+ Λ =

+ Λ + Λ + Λ =

+ Λ + Λ + Λ + Λ + Λ =

+ Λ + Λ + + Λ =

Page 11: ELEC 405/511 Error Control Coding

Peterson’s Direct Solution

11

1 1

2 1 2 3

4 3 2 1 3 5

6 5 4 3 4 7

2 4 2 5 2 6 2 7 2 3 1 2 3

2 2 2 3 2 4 2 5 1 2 1

1 0 0 0 0 01 0 0 0

0 00 0

t t t t t t t t

t t t t t t t t

SS S SS S S S SS S S S S

S S S S S S SS S S S S S S

− − − − − − − −

− − − − − −

Λ − Λ − Λ − Λ = −

Λ − Λ −

=AΛ S

Page 12: ELEC 405/511 Error Control Coding

• If A is nonsingular, we can solve AΛ = S using linear algebra

• If there are t-1 or t errors, A has a nonzero determinant and a solution for Λ can be obtained

• If fewer than t-1 errors have occurred, delete the last two rows and the two rightmost columns of A and check again for singularity

• Continue until the remaining matrix is nonsingular

12

Page 13: ELEC 405/511 Error Control Coding

• There are two possibilities when a solution of AΛ = S leads to an incorrect error locator polynomial 1. If the received word is within Hamming distance

t of an incorrect codeword, Λ(x) will correct to that codeword, causing a decoding error

2. If the received word is not within Hamming distance t of an incorrect codeword, Λ(x) will not have the correct number of roots, or will have repeated roots, causing a decoding failure

13

Page 14: ELEC 405/511 Error Control Coding

Peterson’s Algorithm 1. Compute the syndromes S from r. 2. Construct the syndrome matrix A. 3. Compute the determinant of A, if it is nonzero, go to 5. 4. Delete the last two rows and columns of A and go to 3. 5. Solve AΛ = S to get Λ(x). 6. Find the roots of Λ(x), if there are an incorrect number of

roots or repeated roots, declare a decoding failure. 7. Complement the bit positions in r indicated by Λ(x). If fewer

than t errors have been corrected, verify that the resulting codeword satisfies the syndrome equations. If not, declare a decoding failure.

14

Page 15: ELEC 405/511 Error Control Coding

Peterson’s Algorithm (Cont.)

• For simple cases, the equations can be solved directly

• Single error correction • Double error correction

• Triple error correction

15

1 1SΛ =

1 1SΛ =3

3 12

1

S SS+

Λ =

1 1SΛ =21 3 5

2 31 3

S S SS S

+Λ =

+( )3

3 1 3 1 2S S SΛ = + + Λ

Page 16: ELEC 405/511 Error Control Coding

Peterson’s Algorithm (Cont.)

• Four error correction

16

( ) ( )( ) ( )

7 51 7 1 3 1 5

2 3 53 1 3 1 1 5

S S S S S S

S S S S S S

+ + +Λ =

+ + +1 1SΛ =

( ) ( )2 31 3 5 1 3 2

41

S S S S S

S

+ + + ΛΛ =( )3

3 1 3 1 2S S SΛ = + + Λ

Page 17: ELEC 405/511 Error Control Coding

Example 9-1

• (31,21,5) 2 error correcting BCH code

g(x) = M1(x)M3(x) = (x5+x2+1)(x5+x4+x3+x2+1) = x10+x9+x8+x6+x5+x3+1 r = (001000011001100000000000000000) r(x) = x2+x7+x8+x11+x12

17

7 2 14 3 81 2 1 3

4 284 1

( ) ( )S r S S S r

S S

α α α α α

α

= = = = = =

= =

Page 18: ELEC 405/511 Error Control Coding

Example 9-1 (Cont.)

• Double error correction

• Error locator polynomial roots are α21 and α26 • The error locators are X1 = α-26 = α5 and X2 = α-21

= α10

18

71 1S αΛ = =

( )38 73153 1

2 71

S SS

α αα

α

++Λ = = =

7 15 2( ) 1x x xα αΛ = + + →

5 10( ) (1 )(1 )x x xα αΛ = + +

Page 19: ELEC 405/511 Error Control Coding

Example 9-1 (Cont.)

r = (001000011001100000000000000000) e = (000001000010000000000000000000) c = (001001011011100000000000000000) check: c(x) = x2 + x5 + x7 + x8 + x10 + x11 + x12

= x2g(x) so it is a valid codeword 19

Page 20: ELEC 405/511 Error Control Coding

Example 9-2

• In this example, the number of errors is less than the number of correctable errors

g(x) = 1+x+x2+x3+x5+x7+x8+x9+x10+x11+x15

has 6 consecutive powers of α as roots {α,α2,α3,α4,α5,α6}

r(x) = x10

20

10 2 20 3 301 2 1 3

4 9 5 19 2 294 1 5 6 3

( ) ( )

( )

S r S S S r

S S S r S S

α α α α α

α α α α

= = = = = =

= = = = = =

Page 21: ELEC 405/511 Error Control Coding

Example 9-2 (Cont.)

• The matrix A is

• row 3 is equal to α20×row 2 • Therefore remove the 2nd and 3rd rows and columns,

giving

• Thus Λ1 = S1 = α10 giving X1 = α10 and e(x) = x10 • c(x) = r(x) + e(x) = x10+ x10 = 0

21

20 10

9 30 20

1 0 01α α

α α α

=

A

[ ]1=A

Page 22: ELEC 405/511 Error Control Coding

Example 9-4 (Direct Solution)

• Triple error correcting BCH code n=31 g(x) = M1(x)M3(x)M5(x) =

1+x+x2+x3+x5+x7+x8+x9+x10+x11+x15

6 consecutive powers of α as roots {α,α2,α3,α4,α5,α6} r(x) = 1+x9+x11+x14

22

2 3 291 2 1 3

4 5 23 2 274 1 5 6 3

( ) 1 1 ( )

1 ( )

S r S S S r

S S S r S S

α α α

α α α

= = = = = =

= = = = = =

Page 23: ELEC 405/511 Error Control Coding

Example 9-4 (Cont.)

• Error locator polynomial • The roots are α12, α15, α18 • The errors are at locations 31-12=19, 31-15=16, 31-18=13

• e(x) = x13+x16+x19 • c(x) = r(x)+e(x) = 1+x9+x11+x13+x14+x16+x19

23

1 1 1SΛ = =

16 2 17 3( ) 1x x x xα αΛ = + + +

2161 3 5

2 31 3

S S SS S

α+Λ = =

+( )3 17

3 1 3 1 2S S S αΛ = + + Λ =

Page 24: ELEC 405/511 Error Control Coding

Error Correction Procedure for BCH Codes

1. Compute the syndrome vector S = (S1, S2, …, S2t) from the received polynomial r(x)

2. Determine the error locator polynomial Λ(x) from the syndromes S1, S2, …, S2t

3. Determine the error locators X1, X2, …, Xv by finding the roots of Λ(x)

4. Correct the errors in r(x)

24