ELEC405 Error Control Coding and Sequences

25
ELEC 405/ELEC 511 Error Control Coding and Sequences Decoding BCH Codes 1 ELEC 405

Transcript of ELEC405 Error Control Coding and Sequences

Page 1: ELEC405 Error Control Coding and Sequences

ELEC 405/ELEC 511 Error Control Coding and Sequences

Decoding BCH Codes

1 ELEC 405

Page 2: ELEC405 Error Control Coding and Sequences

ELEC 405 2

Decoding 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

0)()()( 121 tbbb ccc

1

0

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

j j j k

j k

k

S r e e j t

Page 3: ELEC405 Error Control Coding and Sequences

ELEC 405 3

Decoding 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

iii ,,, 21

1 1 1

( ) ( ) , 1, ,2l l

l

v v vi ij j j

j i l

l l l

S e X j t

Page 4: ELEC405 Error Control Coding and Sequences

Power-Sum Symmetric Equations

ELEC 405 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: ELEC405 Error Control Coding and Sequences

ELEC 405 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: ELEC405 Error Control Coding and Sequences

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

ELEC 405 6

1 0

1

( ) (1 ) ...v

v

l v

l

x X x x x

Page 7: ELEC405 Error Control Coding and Sequences

ELEC 405 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: ELEC405 Error Control Coding and Sequences

ELEC 405 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: ELEC405 Error Control Coding and Sequences

Binary BCH Codes

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

thus every second equation in Newton’s identities is redundant

ELEC 405 9

2

2 2

2

1 1

v vj j

j l l j

l l

S X X S

Page 10: ELEC405 Error Control Coding and Sequences

Newton’s Identities for Binary Codes

ELEC 405 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: ELEC405 Error Control Coding and Sequences

Peterson’s Direct Solution

ELEC 405 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 0

1 0 0 0

0 0

0 0

t t t 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 S S S S S

S S S S S S S

Page 12: ELEC405 Error Control Coding and Sequences

• 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

ELEC 405 12

Page 13: ELEC405 Error Control Coding and Sequences

• 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

ELEC 405 13

Page 14: ELEC405 Error Control Coding and Sequences

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.

ELEC 405 14

Page 15: ELEC405 Error Control Coding and Sequences

Peterson’s Algorithm (Cont.)

• For simple cases, the equations can be solved directly

• Single error correction

• Double error correction

• Triple error correction

ELEC 405 15

1 1S

1 1S 3

3 12

1

S S

S

1 1S 2

1 3 52 3

1 3

S S S

S S

3

3 1 3 1 2S S S

Page 16: ELEC405 Error Control Coding and Sequences

Peterson’s Algorithm (Cont.)

• Four error correction

ELEC 405 16

7 5

1 7 1 3 1 5

2 3 5

3 1 3 1 1 5

S S S S S S

S S S S S S

1 1S

2 3

1 3 5 1 3 2

4

1

S S S S S

S

3

3 1 3 1 2S S S

Page 17: ELEC405 Error Control Coding and Sequences

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

ELEC 405 17

28414

833

14212

71 )( )(

SS

rSSSrS

Page 18: ELEC405 Error Control Coding and Sequences

Example 9-1 (Cont.)

• Double error correction

• Error locator polynomial

• The error locators are X1 = α5 and X2 = α10

ELEC 405 18

7

1 1S

3

8 73153 1

2 7

1

S S

S

7 15 2

5 10

( ) 1

(1 )(1 )

x x x

x x

Page 19: ELEC405 Error Control Coding and Sequences

Example 9-1 (Cont.)

r = (001000011001100000000000000000)

e = (000001000010000000000000000000)

c = (001001011011100000000000000000)

check:

c(x) = x2 + x5 + x7 + x8 + x10 + x11 + x12

= x2g(x)

ELEC 405 19

Page 20: ELEC405 Error Control Coding and Sequences

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 roots {α,α2,α3,α4,α5,α6}

r(x) = x10

ELEC 405 20

10 2 20 3 30

1 2 1 3

4 9 5 19 2 29

4 1 5 6 3

( ) ( )

( )

S r S S S r

S S S r S S

Page 21: ELEC405 Error Control Coding and Sequences

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

ELEC 405 21

20 10

9 30 20

1 0 0

1

A

1A

Page 22: ELEC405 Error Control Coding and Sequences

Example 9-2 (Cont.)

• Using the direct solution

ELEC 405 22

10

1 1S

2 20 30 19

1 3 52 3 30 30

1 3

0S S S

S S

3 30 30

3 1 3 1 2 0S S S

Page 23: ELEC405 Error Control Coding and Sequences

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

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

r(x) = 1+x9+x11+x14

ELEC 405 23

2 3 29

1 2 1 3

4 5 23 2 27

4 1 5 6 3

( ) 1 1 ( )

1 ( )

S r S S S r

S S S r S S

Page 24: ELEC405 Error Control Coding and Sequences

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

ELEC 405 24

7

1 1S

16 2 17 3( ) 1x x x x

2161 3 5

2 3

1 3

S S S

S S

3 17

3 1 3 1 2S S S

Page 25: ELEC405 Error Control Coding and Sequences

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)

ELEC 405 25