Professional Documents
Culture Documents
6.0 Decoding BCH and RS Codes
6.0 Decoding BCH and RS Codes
6.0 Decoding BCH and RS Codes
• where
c(αj ) = 0, j = 1, 2, . . . , 2t.
• Compute syndromes:
ei` = 1, ` = 1, 2, . . . , ν ≤ t
0, otherwise.
• Then,
Expanding gives,
S1 = X1 + X2 + · · · + Xν
S2 = X12 + X22 + · · · + Xν2
..
.
S2t = X12t + X22t + · · · + Xν2t
Let
Λ(x) = (1 − X1 x)(1 − X2 x) · · · (1 − Xν x)
Xν
= Λi xi
i=0
Clearly
Λ(1/X` ) = 0, ` = 1, 2, . . . , ν
and
Λ0 = 1
Λν = X1 X2 · · · Xν
Λ1 = X1 + X2 + · · · + Xν
X
Λ2 = Xi Xj
i<j
..
.
S1 + Λ 1 = 0
S3 + Λ1 S2 + Λ2 S1 + Λ3 = 0
S5 + Λ1 S4 + Λ2 S3 + Λ3 S2 + Λ4 S1 + Λ5 = 0
..
.
S2t−1 + Λ1 S2t−2 + Λ2 S2t−3 + · · · + Λt St−1 = 0
Sj = X1j , j = 1, 2.
Λ(x) = (1 − X1 x) = 1 − S1 x.
c
°2003, A. Brinton Cooper III 9
Example Suppose ν = 2.
S1 = X1 + X2
S3 = X13 + X33
Λ(x) = (1 − X1 x)(1 − X2 x)
= 1 + (X1 + X2 )x + X1 X2 x2
• Clearly, Λ0 = 1, Λ1 = S1 .
• Cubing S1 and solving simultaneously with S3 gives
S3 + S13
Λ2 = .
S1
c
°2003, A. Brinton Cooper III 10
Λ1 −S1
1 0 0 0 ··· 0
Λ2 −S3
S2 S1 1 0 ··· 0
Λ −S
. · 3 = 5 ,
.. . .
. .
. .
S2t−2 S2t−3 S2t−4 S2t−5 ··· St−1
Λt −S2t−1
A · Λ = −S (1)
c
°2003, A. Brinton Cooper III 11
Properties:
• A (known) must be non-singular in order to solve for Λ.
• A is non-singular if t or t − 1 errors have occurred.
• More generally,
¯¹ º¯
¯ t − deg Λ(x) ¯
¯ ¯
¯ 2 ¯
Peterson’s algorithm:
1. Write down Newton’s Identities (N.I.) as above.
2. If det[A] = 0, remove 2 rightmost columns and 2 bottom rows.
3. Test and repeat until det[A] 6= 0
4. Invert and solve for the {Λi }.
5. Find roots of Λ(x).
• If roots are not distinct or Λ(x) does not have roots in the
desired field, go to 9
6. Complement bit positions in received vector that correspond to
roots of Λ(x).
7. If the corrected word does not satisfy all syndromes, go to 9
8. Output corrected word. STOP
9. Declare decoder failure. STOP
c
°2003, A. Brinton Cooper III 13
Λ1 −S1
1 0 0 0 ··· 0
Λ2 −S3
S2 S1 1 0 ··· 0
Λ −S
. · 3 = 5 , (3)
.. . .
. .
. .
S2t−2 S2t−3 S2t−4 S2t−5 ··· St−1
Λt −S2t−1
or,
A · Λ = −S
Λ1 = S1
S3 + S13
Λ2 =
S1
c
°2003, A. Brinton Cooper III 15
Λ1 = S1
S12 S3 + S5
Λ2 =
S13 + S3
Λ3 = (S13 + S3 ) + S1 Λ2
c
°2003, A. Brinton Cooper III 16
Λ1 = S1
Λ3 = (S13 + S3 ) + S1 Λ2
Λ3 = (S13 + S3 ) + S1 Λ2
Another example
···
c
°2003, A. Brinton Cooper III 22
3. If Λ(αj ) = 0 then
• Ai = 1 and an error occurred at the coordinate associated with
α−j = αn−1 .
• So, add 1 to received bit rn−j .
4. Otherwise do nothing.
Verification:
• Use similar circuit with Λi replaced by ci (decoder output) and
include c0 = 1.
• This tests for whether the powers of α are roots of c(x).
c
°2003, A. Brinton Cooper III 24
1 if error,
else 0 Verify FAIL
Ai
+ c0,c1,...,cn-1
Λ1 Λ2 ----- Λt
t
X X X Ai=ΣΛjαij
j=1
α α2 αt
c
°2003, A. Brinton Cooper III 25
Recall:
ν
Y
Λ(x) = (1 − X` x).
`=1
Therefore, for some error locator X` :
−(ν−1)
Λ(X`−1 ) = Λν X`−ν + Λν−1 X` + · · · + Λ0 = 0
Then form
ν
X
ei` X`j Λ(X`−1 ),
`=1
and substitute
This gives
Also, recall Λ0 = 1.
c
°2003, A. Brinton Cooper III 28
Notes:
1. Comparison of the coefficients with Newton’s identities shows that
the coefficients of the odd powers of x are identically zero.
c
°2003, A. Brinton Cooper III 33
for k from 1 to t.
c
°2003, A. Brinton Cooper III 34
6.4.3 Examples:
1. (15, 5), 3-error correcting binary BCH code (6.6, p 215, L&C)
• Receive r(x) = x3 + x5 + x12 . Then
S1 = S2 = S4 = 1 S3 = α10
S5 = α10 S6 = α5
• Initialize k = 0, Λ(0) = 1, T (0) (x) = 1.
• ∆(0) is the coefficient of x in
Λ(0) (x)[1 + S1 x + · · · ]
So, ∆(0) = S1 = 1
k Λ(2k) ∆(2k) T (2k)
0 1 S1 = 1 1
c
°2003, A. Brinton Cooper III 36
• k = k + 1 = 1. ∆(2) = coefficient of x3 in
Λ(2) (x)[1 + S1 x + S2 x2 + S3 x3 + · · · ].
Λ(4) (x)[1 + S1 x + S2 x2 + S3 x3 + S4 x4 + S5 x5 + · · · ]
Or ∆(4) = S5 + S4 + α5 · S3 = α10 .
and
1. Alg. can terminate with Λ(x) of correct degree and roots (RARE).
2. Λ(x) can decode to (incorrect but) closest code word.
3. Λ(x) will have degree ν ≤ t but fewer than ν distinct roots,
making it an illegitimate error locator polynomial.
c
°2003, A. Brinton Cooper III 43
Preliminaries
1. Terminology:
Details of BMA
k = 0
Λ(0) (x) = 1
L = 0
T (x) = x
3. k = k = 1; Compute discrepancy.
L
X (k−1)
∆(k) = Sk − Λi Sk−1 .
i=1
L = k−L
T (x) = Λ(k−1) (x)/∆(k)
T (x) = x · T (x)