• 沒有找到結果。

BCH code is a kind of cyclic codes and can be view as a generalization of the Hamming codes for multiple errors correction. An (N, K; t) BCH code has block length of N bits and information length of K bits. While operating under GF (2m), it has the error correcting capability t with N − K ≤ m × t. In the encoding procedure, a generator polynomial g(x) is defined by the least common multiple (LCM) of the minimum polynomials over GF (2) M1(x), M2(x), . . . , and M2t(x), where Mi(x) is the minimal polynomial for αi for i = 1 ∼ 2t, and α is primitive in GF (2m).

g(x) = LCM{M1(x), M2(x), · · · , M2t(x)}. (2.5)

Notice that, not only αi for i = 1 ∼ 2t but also their conjugates (αi)2j are roots of g(x), implying that Mi×2j(x) = Mi(x) for each positive integer j and 1 ≤ i × 2j ≤ 2t. Therefore, the generator polynomial g(x) can be reduced to

g(x) = LCM{M1(x), M3(x), · · · , M2t−1(x)}, (2.6)

and the degree of each minimal polynomial is a factor of m.

There are two type methods for encoding a BCH codeword: non-systematic encoding and systematic encoding. According to the coding theory, a codeword polynomial c(x) must be a multiple of g(x), that is g(x)|c(x). From this definition, the non-systematic encoding of a message polynomial u(x) = u0+ u1x + u2x2 + · · · + uk−1xk−1 can be directly obtained by multiplying u(x) with g(x) = g0+ g1x + · · · + grxr.

c(x) = u(x) · g(x). (2.7)

The matrix formulation of (2.7) can be expressed as

where the K × N generator matrix G is defined as

G =

On the other hand, the systematic encoding generates the remainder polynomial r(x) at first according to the modulo operation between u(x)xN −K and g(x):

r(x) = u(x) × xN −K mod g(x). (2.10)

Then the systematic code c(x) is obtained by adding r(x) to xN −Ku(x):

c(x) = u(x) × xN −K + r(x). (2.11)

Since xN −Ku(x) = q(x)g(x) + r(x) where q(x) is the quotient polynomial, the systematic code c(x) becomes

c(x) = xN −Ku(x) + r(x) = q(x)g(x), (2.12) which is a multiple of g(x), and the message polynomial u(x) is shown in the K successive positions of c(x). The advantage of the systematic encoding is that we can get u(x) directly from part of c(x) without any computation. Thus, it is the most common way for encoding a BCH codeword.

Because αi for 1 ≤ i ≤ 2t are roots of g(x), they are also roots of c(x), indicating

c(αi) = c0+ c1αi+ c2α2i+ · · · + cN −1α(N −1)i = 0, for 1 ≤ i ≤ 2t. (2.13)

Hence, the matrix formulation of (2.13) is

In the receiver, the received data R(x) includes the transmitted codeword c(x) and noise signal:

R(x) = c(x) + e(x), (2.16)

where e(x) is the error pattern. The syndrome polynomial corresponding R(x) is defined as S(x) = S1+ S2x1+ · · · + S2tx2t−1, in which

Si = R(αi) = c(αi) + e(αi) = e(αi), for 1 ≤ i ≤ 2t. (2.17)

If e(x) has v (≤ t) errors in the positions j1, j2, · · · , jv with 0 ≤ j1 < j2 < · · · < jv ≤ N − 1, e(x) can be expressed as

e(x) = xj1 + xj2 + · · · + xjv. (2.18)

According to (2.17) and (2.18), the i-th coefficient of S(x) will be

Si = (αj1)i+ (αj2)i+ · · · + (αjv)i

= β1i + β2i + · · · + βvi, (2.19)

where βx = αjx for x = 1, 2, . . . , v. Then the relation between {S1, S2, · · · , S2t} and {β1, β2, · · · , βv} can be derived as

S1 = β1+ β2+ · · · + βv

S2 = β12+ β22+ · · · + βv2

S3 = β13+ β23+ · · · + βv3 (2.20) ...

S2t = β12t+ β22t+ · · · + βv2t

To solve e(x), an error location polynomial is defined as

Λ(x) = (1 − β1x)(1 − β2x) · · · (1 − βvx)

= Λ0+ Λ1x + · · · + Λvxv, (2.21)

whose roots are β1−1, β2−1, · · · , and βv−1. After observation, we can see that the relation between {Λ0, Λ1, · · · , Λv} and {β1, β2, · · · , βv} is as follows:

Λ0 = 1

Λ1 = β1+ β2+ · · · + βv

Λ2 = β1β2+ β2β3+ · · · + βv−1βv (2.22) ...

Λv = β1β2· · · βv

Furthermore, from (2.20) and (2.22), Peterson proposed the first decoding algorithm for BCH codes in 1960 according to the following Newton’s identities [38]:

Si+ Λ1Si−1+ · · · + Λi−1S1+ iΛi = 0, for 1 ≤ i ≤ v.

Si+ Λ1Si−1+ · · · + Λv−1Si−v+1+ ΛvSi−v = 0, for i > v. (2.23)

That is,

i = 1 : S1 + Λ1 = 0

i = 2 : S2 + Λ1S1+ 2Λ2 = 0

i = 3 : S3 + Λ1S2+ Λ2S1+ 3Λ2 = 0

... (2.24)

i = v : Sv + Λ1Sv−1+ Λ2Sv−2+ · · · + vΛv = 0 i = v + 1 : Sv+1+ Λ1Sv+ Λ2Sv−1+ · · · + S1Λv = 0

...

i = 2t : S2t+ Λ1S2t−1+ Λ2S2t−2+ · · · + ΛvS2t−v = 0

That means Λ(x) can be obtained once S(x) is calculated. However, it is inefficient to directly solve (2.24) for large v.

In addition to Peterson’s method, Λ(x) can be solved by the definition of the key equa-tion [39]:

S(x)Λ(x) = Ω(x) mod x2t. (2.25)

In(2.24), there is a linear feedback shift register relationship between {S1, S2, · · · , S2t} and {Λ0, Λ1, · · · , Λv} for i > v:

Si = Xv

j=1

ΛjSi−j, (2.26)

which can be expressed as a matrix form

Berlekamp-Massey algorithm is an efficient iterative algorithm for solving key equation (2.25) which was developed by Berlekamp [39, 40] and independently by Massey [41, 42]. This algorithm iteratively generates Λ(x) for satisfying (2.27). The detailed procedure is given as follows.

After 2t iterations, the error location polynomial is obtained from Λ(x) = Λ2t(x). In (2.28),

the operation compensates the difference to make Λ(x)i satisfy the discrepancy ∆i−1 = 0.

And the operation in (2.29) evaluates a new discrepancy ∆ito verify the correctness of Λ(x)i. Besides, the control signal L indicates the degree of Λ(x).

Another famous algorithm for solving the key equation is Euclidean algorithm [43, 44], which rewritten the key equation as

S(x)Λ(x) + Q(x)x2t = Ω(x). (2.30)

Notice that Q(x) is the quotient polynomial and Ω(x) is the remainder polynomial while S(x)Λ(x) is divided by x2t. According to Euclidean algorithm, Λ(x) and Ω(x)) can be obtained by deriving the greatest common divisor (GCD) algorithm between S(x) and x2t with a termination condition. The algorithm proceeds as follows.

• Initial conditions

(−1) = x2t, Ω(0) = S(x) Λ(−1)(x) = 0, Λ(0)(x) = 1

• Iterations from i = 1:

(i)(x) = Q(i)(x)Ω(i−1)(x) + Ω(i−2)(x) (2.31) Λ(i)(x) = Q(i)(x)Λ(i−1)(x) + Λ(i−2)(x) (2.32)

• Iteration terminated

deg(Λ(x)) > deg(Ω(x))

The error location polynomial is acquired as long as the iteration is terminated and Λ(x) = Λ(i)(x). In the decoding procedure, the degree of Ω(i)(x) decreases with i whereas Λ(i)(x) has an increasing degree. Once the degrees of Λ(x) and Ω(x) satisfy the stopping criterion, Λ(x)) has the degree v and Ω(x) has the degree at most v − 1.

As a result, the decoding procedure contains three major steps: syndrome calculator, key equation solver and Chien search as shown in Fig. 2.1. If the syndromes {S1, S2, · · · , S2t} are

Figure 2.1: Binary BCH decoding process

calculated according to (2.19), the error location polynomial can be obtained by using Peter-son’s method or by solving the key equation (2.25) with either Berlekamp-Massey algorithm or Euclidean algorithm. The error locations can be found by calculating {β1, β2, · · · , βv} through solving the roots of Λ(x) = 0. However, it is not easy to find a root of a polyno-mial by directly solving the equation. Since the number of elements in GF (2m) is finite, an efficient process known as Chien search [45] is exploited to substitute each nonzero element of GF (2m) into the equation. If α−i is a root of Λ(x), an error is assumed at the i − th position. Finally, the estimated codeword polynomial ˆc(x) is obtained by inverting those values at error locations in R(x).

2.3 RS Code

RS code is a kind of cyclic codes and can be classified into non-binary BCH codes [18]. An (N, K; t) RS code over GF (2m) has block length of N symbols and information length of K symbols, where a symbol consists of m-bit. It has the error correcting capability t = N −K

2

 for error only decoding and can correct up t errors and ρ erasures with t = N −K−ρ

2

 for error and erasure decoding. Notice that, an erasure is defined to be an error with a known error location. For the encoding procedure, there are two distinct constructions for RS codes. Although these two constructions initial appear to describe different codes, it is can be proved that the families of codes described are in fact equivalent according to Galois field Fourier transform techniques [4]. No matter which construction method is applied, the number of parity check symbols are 2t and the minimum distance is 2t + 1.

The first RS code construction is proposed by I. S. Reed and G. Solomon in 1960 [17].

The original definition of RS codes is based on evaluation map encoding method: a codeword c(x) is formed by evaluating the message polynomial u(x) = u0+u1x+u2x2+· · ·+uK−1xK−1 at N elements of GF (2m).

c(x) = c0+ c1x + c2x2 + · · · + cN −1xN −1

= u(1) + u(α)x + u(α2)x2+ · · · + u(αN −1)xN −1. (2.33)

It is obvious that this construction method is a non-systematic encoding. This evaluation map encoding method is useful because it provides insight leading to interpolation-based decoding algorithms, such as Guruswami-Sudan (GS) and Koetter-Vardy (KV) algorithms, and we will discuss these algorithms in Section 2.4.

However, the second RS code construction is more popular because of its relation with BCH codes and their associated decoding algorithms. According to the definition of gener-ator polynomial in (2.5), the g(x) of a RS code that corrects up to t errors is constructed with the minimum polynomials of α, α2, α3, · · · , and α2t, where α is a primitive element in GF (2m). Notice that, the minimal polynomial mi(x) over GF (2m) for any element αi is simply mi(x) = x − αi. Therefore, the generator polynomial becomes

g(x) = (x − α)(x − α2) · · · (x − α2t). (2.34)

The codeword can be generated either in the non-systematic form of (2.7) or in the systematic form of (2.11). Both non-systematic and systematic encoding schemes make the codeword c(x) be a multiple of g(x), indicating that c(αi) = 0 for 0 ≤ i ≤ 2t − 1. In this thesis, most of the encoders and decoders are concerned with the second code construction.

The decoding of RS codes is quite similar to BCH code except for the requirement of error value calculation. In the receiver, the received data R(x) is the transmitted codeword c(x) corrupted by the error pattern e(x):

R(x) = c(x) + e(x). (2.35)

The syndrome polynomial corresponding R(x) is defined as S(x) = S1+S2x1+· · ·+S2tx2t−1, in which

Si = R(αi) = c(αi) + e(αi) = e(αi), for 1 ≤ i ≤ 2t. (2.36) If e(x) has v (≤ t) errors in the positions j1, j2, · · · , jv with 0 ≤ j1 < j2 < · · · < jv ≤ N − 1, e(x) can be expressed as

e(x) = e1xj1 + e2xj2 + · · · + evxjv, (2.37)

where e1, e2, · · · , evare error values corresponding to error locations j1, j2, · · · , jv. Therefore, the i-th coefficient of S(x) will be

Si = e1j1)i+ e2j2)i+ · · · + evjv)i

= e1β1i + e2β2i + · · · + evβvi, (2.38)

where βx = αjx for x = 1, 2, . . . , v. The syndrome polynomial S(x) becomes

S(x) =

2t−1X

i=0

Sixi

=

2t−1X

i=0

Xv j=1

ejβji+1xi

= Xv

j=1 2t−1X

i=0

ejβji+1xi

= Xv

j=1

ejβj(1 − (βjx)2t)

1 − βjx . (2.39)

The error location polynomial Λ(x) is also defined as shown in (2.21). The relation of S(x)

and Λ(x) can be formulated as

According to the definition of key equation in (2.25), the error evaluator polynomial Ω(x) becomes

The error values can be calculated from Ω(x) based on Forney’s algorithm [46]:

ej = −Ω(βj−1)

Λj−1) . (2.42)

Notice that Λ(x) indicates the derivative of Λ(x) and therefore

Λ(x) = dΛ(x)

From (2.41), the degree of Ω(x) is v − 1, implying that, in S(x)Λ(x), the coefficients of the terms with powers large than v − 1 must be zero. Consequently, the following Newton’s identity can be derived [39].

As we have described in Section 2.2, it is inefficient to directly solve (2.44) for large v.

The Berlekamp-Massey and Euclidean algorithms can be employed for solving the the key equation (2.41). In the error-only decoding, the Euclidean algorithm described in Section 2.2 computes Λ(x) and Ω(x) simultaneously; therefore, it can be applied for RS code without modification. However, the Berlekamp-Massey algorithm described in Section 2.2 only cal-culates Λ(x). The evaluation of Ω(x) can be derived according to the key equation (2.44) after Λ(x) is obtained from Berlekamp-Massey algorithm:

Ω(x) = Xv−1

i=0

ixi

= Xv−1

i=0

Xi j=0

ΛjSi+1−jxi (2.45)

Nevertheless, the Berlekamp-Massey algorithm can be modified to evaluate Λ(x) and Ω(x) simultaneously. The Ω(x) is iteratively updated with similar operations as Λ(x) does. The detailed procedure is given as follows.

• Initial conditions:

Λ(0)(x) = 1, Ω(0)(x) = x1, τ(0)(x) = 1, γ(0)(x) = 1,

0 = S1, δ = 1, L0 = 0.

• Iteration from i = 1 to 2t:

Λ(i)(x) = Λ(i−1)(x) + ∆i−1

δ τ(i−1)(x) · x. (2.46)

(i)(x) = Ω(i−1)(x) + ∆i−1

δ γ(i−1)(x) · x. (2.47)

i = Xt−1

j=0

Λ(i)j Si+1−j. (2.48)

If ∆i−1 = 0 or Li−1 ≥ i − Li−1,

τ(i)(x) = τ(i−1)(x) · x, γ(i)(x) = γ(i−1)(x) · x, Li = Li−1.

Otherwise,

τ(i)(x) = Λ(i−1)(x), γ(i)(x) = Ω(i−1)(x),

Li = i − Li−1, δ = ∆i−1.

After 2t iterations, the error location polynomial is obtained from Λ(x) = Λ2t(x) and the error evaluator polynomial is obtained from Ω(x) = Ω2t(x).

In summary, the error only decoding procedure of RS codes contains four major steps:

syndrome calculator, key equation solver, Chien search, and error value evaluator as shown in Fig. 2.2. The received polynomial R(x) is fed into syndrome calculator to generate syndrome polynomial S(x) according to (2.36). The key equation solver calculates the error location polynomial Λ(x) and error evaluator polynomial Ω(x) according to the key equation with either Berlekamp-Massey algorithm or Euclidean algorithm. After the key equation solver, Chien search is applied to find the roots of Λ(x) while error value evaluator is utilized to calculate error values based on Forney’s algorithm. Finally, the estimated codeword polynomial ˆC(x) is obtained by adding those error values at error locations in R(x).

As consider to the error and erasure decoding, we will find that it is quite similar to the above mentioned error only decoding procedure. If the received data R(x) contains v errors

Syndrome Calculator

KEY Equation

Solver

Chien Search

FIFO

S(x) (x)

C(x) R(x)

Error Value Evaluator ^ (x)

Figure 2.2: Error only RS decoding process

and u erasures with 2v + u ≤ 2t, the erasure symbols are replaced with arbitrary values, such as zeros, for the syndrome calculation in (2.36). A erasure location polynomial is defined as

θ(x) = (1 − αl1x)(1 − αl2x) · · · (1 − αlux), (2.49)

where l1, l2, . . . , lu are erasure positions. The key equation should be modified by

S(x)θ(x)Λ(x) = Ω(x) mod x2t. (2.50)

The errata location polynomial Φ(x) = θ(x)Λ(x) identifies both error and erasure locations.

The known polynomials S(x) and θ(x)(x) can be combined as Forney syndrome polyno-mial [46]:

T (x) , S(x)θ(x) mod x2t (2.51)

= T1+ T2x + T3x2+ · · · + T2tx2t−1.

Consequently, the key equation (2.50) is written as:

T (x)Λ(x) = Ω(x) mod x2t. (2.52)

It is can be proved that the maximum degree of Ω(x) is (v + u − 1) while the degree of Λ(x)θ(x) is (v + u). As a result, the similar equation as (2.44) is derived:

The error location polynomial Λ(x) can be iteratively computed with Berlekamp-Massey algorithm as follows [47]:

• Initial conditions:

Λ(u)(x) = 1, Ω(u)(x) = 1x, τ(u)(x) = 1, γ(u)(x) = 1,

u = Tu+1, δ = 1, Lu = 0.

• Iteration from i = (u + 1) to 2t:

Λ(i)(x) = Λ(i−1)(x) + ∆i−1

δ τ(i−1)(x) · x (2.54)

(i)(x) = Ω(i−1)(x) + ∆i−1

δ γ(i−1)(x) · x (2.55)

i = Xt−1

j=0

Λ(i)j Ti+1−j (2.56)

If ∆i−1 = 0 or Li−1 ≥ i − u − Li−1,

τ(i)(x) = τ(i−1)(x) · x, γ(i)(x) = γ(i−1)(x) · x, Li = Li−1.

Otherwise,

τ(i)(x) = Λ(i−1)(x), γ(i)(x) = Ω(i−1)(x),

Li = i − u − Li−1, δ = ∆i−1

After 2t iterations, the error location polynomial is obtained from Λ(x) = Λ2t(x) and the error evaluator polynomial is obtained from Ω(x) = Ω2t(x).

On the other hand, Euclidean algorithm is also applicable for solving (2.52).

• Initial conditions

(−1) = x2t, Ω(0) = T (x) Λ(−1)(x) = 0, Λ(0)(x) = 1

• Iterations from i = 1:

(i)(x) = Q(i)(x)Ω(i−1)(x) + Ω(i−2)(x) (2.57) Λ(i)(x) = Q(i)(x)Λ(i−1)(x) + Λ(i−2)(x) (2.58)

• Iteration terminated

deg(Λ(x)) + u > deg(Ω(x))

After the termination of Euclidean algorithm, Λ(x) = Λ(i)(x) and Ω(x) = Ω(i)(x), where Λ(x)) has the degree v and Ω(x) has the degree at most u + v − 1.

After the error locations are found with Chien search, the error values can be evaluated according to Forney’s algorithm:

eκ = −Ω(βκ−1)

Φκ−1) = −Ω(α−jκ)

Φ−jκ) , for 1 ≤ κ ≤ v, (2.59)

and the erasure values are

ˆ

eρ = −Ω(α−lρ)

Φ−lρ) , for 1 ≤ ρ ≤ u, (2.60)

where Φ(x) indicates the derivative of Φ(x).

In summary, the major difference in error and erasure decoding algorithm is the Forney syndrome polynomial T (x) in (2.51) and key equation (2.52). In addition, both Berlekamp-Massey and Euclidean algorithms are modified for the known erasure location polynomial θ(x) and T (x). There are five major steps in the error and erasure decoding procedure of RS codes: syndrome calculator, Forney syndrome calculator, key equation solver, Chien search and error value evaluator as shown in Fig. 2.3. The syndrome calculator generates 2t syndromes from the received vector R(x). If there are erasure symbols, T (x) is evaluated by the Forney syndrome calculator. Then the key equation solver delivers Λ(x) and Ω(x) with either Berlekamp-Massey or Euclidean algorithm. According to S(x) or T (x), Λ(x) and

Forney Syndrome Calculator

lρ

α

Figure 2.3: Error and erasure RS decoding process

Ω(x) are generated from the key equation solver with either Berlekamp-Massey or Euclidean algorithm. Additionally, the errata location polynomial Φ(x) is required when θ(x) exists.

After Chien search finds the error locations, error value evaluator uses (2.42) for computing error values or uses (2.59) and (2.60) for computing both error and erasure values Finally, the estimated codeword polynomial ˆc(x) is obtained by correcting the received data R(x), which is stored in the first-in and first-out (FIFO).