The field of the invention is that of applications using error correction coding.
This invention relates to the encoding and decoding of codewords of error correcting codes which are subject to erasures or errors and provides a means of efficiently encoding codewords, or efficiently determining unknown symbols of a codeword, or determining candidate sets of unknown symbols of a codeword as a step in error correction decoding. It also provides a means of encoding and decoding error correcting codes that use codewords with complex number coefficients. That is, the invention also provides a means of encoding and decoding analog error correcting codes.
The invention is concerned with providing an efficient system of encoding codewords of an error correcting code or decoding codewords of an error correcting code by determining unknown symbols of a codeword. The error correcting code may use symbols with values from a Galois field [1, 2] in the traditional manner or the error correcting code may use symbols with values from the field of complex numbers. In either case the invention provides a means of encoding or decoding codewords from the error correcting code in an efficient manner. Applications include communication, storage or information systems that use a channel or medium characterised by erasures [3, 7, 8, 9] or the deletion of symbols. Error correction systems require the determination of unknown symbols of each codeword in carrying out encoding and decoding and the invention provides an efficient means of encoding and decoding.
Unknown symbols of a codeword of an error correcting code may arise from the action of a channel or may arise from the decoder postulating that some symbols should be declared unknown due to their unreliability. Such decoders feature correction of unknown symbols as a step in the decoding procedure [4, 5, 6]. Standard error correction systems use an error correcting code characterised by parameters n, the length of the code in symbols, k the number of information symbols and d the Hamming distance [1, 2]. Standard methods can determine d−1 unknown symbols by using procedures that have a complexity proportional to n3. One such method is the method originated by Gauss for solving n−k linear equations. As a result of the cubic dependancy with codeword length, standard methods of determining unknown symbols are not practical for long codewords. The invention provides a means of determining the unknown symbols of a codeword with a complexity proportional to (d−2)×n and is therefore much more efficient. Moreover codewords having complex number coefficients may be encoded or decoded by the invention.
In
The minimum Hamming distance between codewords d is equal to n−k+1 and is the reason why the code is capable of regenerating any set of n−k symbols [1, 2]. Each symbol of the code takes values from a field [1]. Error correcting codes are based on a Galois Field having q elements, denoted as GF(q), but the invention may be used with any field including the field of complex numbers. For any Galois Field there is a well known [1] class of codes known as Bose and Ray-Chaudhuri Hocquenghem (BCH) codes. For any other field the corresponding codes are referred to here as analog Bose and Ray-Chaudhuri Hocquenghem (BCH) codes.
For Galois Fields, BCH codes are defined by a generator polynomial g(x) given by
where α is a primitive root of GF(q), or equivalently, a primitive root of unity, and β is a code parameter, an integer between 0 and n−1.
For other fields, analog BCH codes are defined by a generator polynomial g(x) given by
where α is a primitive root of unity, and β is a code parameter, an integer between 0 and n−1.
In either case, codewords, c(x) are given by g(x).d(t) where d(t) is a polynomial of degree less than k having coefficients equal to the information symbols. For every generator polynomial there is a parity check polynomial, h(x) such that g(x).h(x)=xn−1, and g(x).h(x)=0 modulo xn−1.
The efficient realisation of an encoder and decoder for BCH error correcting codes or analog BCH error correcting codes is the subject of this invention. The encoder is shown in
From the parity check polynomial h(x) it follows that c(x).h(x)=γ(x)=0 modulo xn−1.
γ(x)=γ0+γ1x+γ2x2+γ3x3 . . . +γn−1xn−1=0 (3)
and so each coefficient γi=0 for i=0 to n−1 producing n linear, parity check equations. The n linear equations are not all independent but they do allow for any n−k unknown coefficients of c(x) to be solved. In other words any combination of n−k symbols may be erased from a codeword and the erasures may be determined by solving n−k linear equations.
Galois fields and BCH codes are considered first. For any polynomial, f(x) of degree less that n and with coefficients which are elements of GF(q) the Mattson-Solomon polynomial F(z) is given by
The original polynomial f(x) may be obtained from its Mattson-Solomon polynomial via the inverse Mattson-Solomon polynomial
The factor n−1 is the multiplicative inverse of n in GF(q). For q=2m, n−1=1
Any codeword c(x) has a Mattson-Solomon polynomial C(z). The parity check polynomial h(x) has a Mattson-Solomon polynomial H(z). Just as c(x)h(x)=0 modulo xn−1; in the Mattson-Solomon domain C(z){circle around (·)}H(z)=0 where {circle around (·)} represents a multiplication of the coefficients corresponding to the same powers of z.
For each non zero coefficient of C(z) the corresponding coefficient of H(z) is zero and vice versa.
The BCH code provides the basis which can be used to solve for n−k unknown symbols. Let the positions of the unknown symbols be defined by λi where =0 to n−k−1 and let the codeword containing the unknown symbols be denoted as ĉ(x) with coefficients arbitrarily set in the unknown symbol positions. There is a polynomial mλ
ĉ(x).mλ
The polynomial ĉ(x) has coefficients equal to the coefficients of the codeword c(x) except in the unknown symbol positions. The x0 coefficient given by equation (7) is given by
Since none of the unknown coefficients of ĉ(x) feature in equation (8), this equation may be used to solve for the unknown symbol in position λj,
The polynomial sλ
The important point is that the coefficient of xn−λ
Correspondingly,
c(x)ui(x)=0 (11)
If the coefficient of xλ
For the solution of the unknown symbol in position λn−k−1 the polynomial sλ
s
λ
(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x) . . . {circle around (·)}un−k−2(x) (13)
The coefficient ĉλ
For the general case, in order to obtain the solution of the unknown symbol in position λj the polynomial sλ
and the coefficient ĉλ
Fields other than Galois Fields and analog BCH codes are now considered. For any polynomial, f(x) of degree less that n and with coefficients which are elements of a field with
the discrete Fourier Transform of f(x) is given by
where α is a primitive root of unity. For the field of complex numbers
where j=√{square root over (−1)}, and
This equation may be simplified by noticing that substituting
for the variable y in the polynomial f(y)
Furthermore by defining a polynomial
then
Replacing
with α, equation (19) becomes
It will be seen that this is the same as the Mattson-Solomon polynomial given by equation (4).
Similarly the polynomial, f(x) of degree less that n and with coefficients which are elements of a field may be obtained from the inverse discrete Fourier Transform of the Fourier coefficients Fk and is given by
where α is a primitive root of unity. It may be seen that
and that this is the same as the inverse Mattson-Solomon polynomial given by equation (5).
Accordingly any codeword c(x) from an analog BCH code with coefficients from any field has Fourier coefficients given by a polynomial C(z) using equation (19). The parity check polynomial h(x) has Fourier coefficients given by a polynomial H(z). Just as c(x)h(x)=0 modulo xn−1; in the Fourier domain C(z){circle around (·)}H(z)=0 where {circle around (·)} represents a multiplication of the coefficients corresponding to the same powers of z.
For each non zero coefficient of C(z) the corresponding coefficient of H(z) is zero and vice versa.
Given k coefficients of a codeword c(x) from an analog BCH code, and these coefficients may be in any k positions, the n−k parity check coefficients are determined by n−k parity check equations given by the inverse Fourier transform. As for BCH codes, for i greater than zero, the polynomial ui(x) is used to denote the inverse Fourier transform of Fourier coefficients given by the polynomial F(z)=z−αn−λ
For the field of complex numbers
The important point is that the coefficient of xn−λ
As before, to determine the solution of the unknown symbol in position, say, λn−k−1 the parity check polynomial sλ
s
λ
(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x) . . . {circle around (·)}un−k−2(x) (26)
and the coefficient ĉλ
In the encoder shown in
and now the coefficient ĉλ
With this initialisation the derived parity check equation sλ
For the encoder shown in
In the decoder shown in
For the decoder shown in
In another embodiment of the invention, suited to high speed applications, all of the n−k parity check equations, sλ
In a further embodiment of the invention which is suited to very high speed applications, the parity check equations for sets of unknown symbols may be pre-calculated and stored in one or more look up tables. Given a set of unknown symbols, the required parity check equations to solve for these symbols may be accessed from one or more of the look up tables.
In another embodiment of the invention which is suited to low complexity applications, the parity check equation sλ
s
−1(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x) . . . {circle around (·)}un−k−3(x) (29)
and by using equation (9). It will be noticed that s−1(x) consists of the same product terms as sλ
The coefficient ĉλ
s
−2(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x) . . . {circle around (·)}un−k−3(x) (30)
As before there is no necessity to derive this equation again because it has already been derived as an intermediate step. It may be further observed that in deriving sλ
In the first example, the coefficients of codewords are from the Galois field GF(11) whose non zero elements are generated by powers of the primitive root α modulo 11, and for the prime number, p=11, α is equal to 2:
For GF(11), n=10, and the codeword is of length 10 symbols. Consider an example of a codeword with ĉ(x)=3x4+2x5+7x6+ĉ7x7+ĉ8x8+ĉ9x9 where ĉ7, ĉ8 and ĉ9 are parity symbols, and the other coefficients of ĉ(x) are zero. The parity symbol positions are λ0=7, λ1=8 and λ2=9. β=0 and the parity check equation, u0(x), is the all 1's vector. Using equation (12), the parity check equation u1(x) is given by
after evaluation
u
1(x)=(α0−α3)+(α1−α3)x+(α2−α3)x2+(α3−α3)x3+(α4−α3)x4+ . . . (32)
and
u
1(x)=α2+α4x+α7x2+α3x4+α1x5+x6+ . . . (33)
The parity check equation u2(x) is given by
after evaluation
u
2(x)=(α0−α2)+(α1−α2)x+(α2−α2)x2+(α3−α2)x3+(α4−α2)x4+ . . . (35)
and
u
2(x)=α3+α6x+α2x3+x4+α9x5+α4x6+ . . . (36)
The parity check equation to solve for the parity symbol in position λ2=9, s9(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x) and
s
9(x)=α5x+α3x4+x5+α4x6+ . . . (37)
The product s9(x)c(x)=0 and for the coefficient of x0
3α4+2+7α3+ĉ9=0 (38)
and
4+2+1+ĉ9=0 (39)
and ĉ9=7×−1=7×10=4
Referring to
Similarly for the solution of ĉ8, the parity check equation u3(x) is required and given by
u
3(x)=α5+αx2+α9x3+α8x4+α3x5+α7x6+ . . . (40)
and the parity check equation required to solve for the parity symbol in position 8, s8(x) u0(x){circle around (·)}u1(x){circle around (·)}u3(x) is
s
8(x)=α7+α8x2+αx4+α4x5+α7x6+ . . . (41)
The product s8(x)c(x)=0 and for the coefficient of x0
3α7+2α4+7α+α8ĉ8=0 (42)
and
10+10+3+α8ĉ8=0 (43)
and
Referring to
Similarly the parity check equation required to solve for the parity symbol in position 7, s7(x)=u0(x){circle around (·)}u2(x){circle around (·)}u3(x) and after solving gives ĉ7=10 and the complete codeword after all of the updating of coefficients is
c(x)=ĉ(x)=3x4+2x5+7x6+10x7+7x8+4x9 (44)
As a check, determining u0(x)c(x), the coefficient of x0 is 3+2+7+10+7+4=33=0.
As an example of the invention being used as a decoder, consider that the above codeword is retrieved from an information system as
ĉ(x)=ĉ4x4+2x5+ĉ6x6+10x7+7x8+4x9 (45)
The unknown symbol positions are λ0=4, and λ1=6. To determine the coefficient ĉ6, it is sufficient to determine the parity check equation sλ
and after evaluation
s
6(x)=α8+α2x+α9x2+x3+α7x4+x5+αx7+ . . . (47)
As before, the product s6(x)ĉ(x)=0 and for the coefficient of x0
2+ĉ6α7+10α5+7α9+4α2=0 (48)
giving 2+7ĉ6+100+42+16=0 and 7ĉ6=5 and
Referring to
To solve for the unknown symbol ĉ4, sλ
and after evaluation
s
4(x)=α7+α3x+α5x2+α8x3+α4x5+α2x6+ . . . (50)
The product s4(x)ĉ(x)=0 and for the coefficient of x0
10+4+8+10+ĉ4α2=0 (51)
giving 10+α2ĉ4=0 and
the finally updated codeword ĉ(x)=3x4+2x5+7x6+10x7+7x8+4x9 and is equal to the original codeword c(x). Referring to
The second example is for a binary BCH code of length n=15, with codewords generated by the generator polynomial g(x)=(1+x3+x4)(1+x). The Galois field is GF(24) generated by the primitive root oz which is a root of the primitive polynomial 1+x+x4 so that 1+α+α4=0 and the Galois field consists of the following table of 15 field elements, plus the element, 0.
An example of a codeword from the binary BCH code is
c(x)=x+x3+x4+x6+x8+x9+x10+x11 (52)
and consider that in a communication system, the codeword is received with erasures in positions in λ0=5, λ1=0 and λ2=8 so that the received codeword is
ĉ(x)=ĉ0+x+x3+x4+ĉ5x5+x6+ĉ8x8+x9+x10+x11 (53)
Referring to
In
u
1(x)=(α0−α10)+(α1−α10)x+(α2−α10)x2+(α3−α10)x3+(α4−α10)x4+ . . . (55)
and noting that the base field is 2 so that −1=1,
u
1(x)=α5+α8x+α4x2+α12x3+α2x4+x5+α7x6+α6x7+αx8+α13x9+α14x11+α3x12+α9x13+α11x14 (56)
The parity check equation u2(x) has zero in position n−λ1=n−0 and is given by
after evaluation
Referring to
The parity check equation s8(x) which gives the solution for coefficient ĉ8 is s8(x)=u0(x){circle around (·)}u1(x){circle around (·)}u2(x). Multiplying each of the corresponding coefficients together of the polynomials u0(x), u1(x) and u2(x) produces
Referring to
Evaluating the coefficient of x0 of s8(x)ĉ(x) gives α14+α14+α11+α5+ĉ8+α5+α10+α3=0 which simplifies to α11+ĉ8+α10+α3=0. Using Table 2 gives
(α+α2+α3)+ĉ8+(1+α+α2)+α3=0
and ĉ8=1. Referring to
The parity check equation s0(x) which gives the solution for coefficient ĉ0 is s0(x)=u0(x){circle around (·)}u1(x){circle around (·)}u3(x) with u3(x) given by
after evaluation
and s0(x) is now
Referring to
α14ĉ0+α12+α5+α7+α13+α2+α13+α5=0
which simplifies to α14ĉ0+α12+α7+α2=0. Using Table 2 gives
α14ĉ0+(1+α+α2+α3)+(1+α+α3)+α2=0
and ĉ0=0. Referring to
In order to solve for 5 the parity check equation s5(x)=u0(x){circle around (·)}u2(x){circle around (·)}u3(x) is used, and s5(x) is given by
Referring to
α4+α13+α5+α11ĉ5+α7+α8+α8+α4=0
which simplifies to α11ĉ5+α13+α5+α7=0. Using Table 2 gives
α11ĉ5+(1+α2+α3)+(α+α2)+(1+α+α3)=0
and ĉ5=0. Referring to
ĉ(x)=x+x3+x4+x6+x8+x9+x10+x11
It is apparent that the final, updated Input Vector, ĉ(x) is equal to the original codeword c(x).
The third example is for an analog BCH code of length n=8, with codewords generated by the Discrete Fourier Transform using oz equal to the 8th root of unity and with complex codeword coefficients. The powers of α are given in the following table of complex field elements.
Each codeword from the analog BCH code consists of n=8 symbols where each coefficient is a complex number. In this particular example the code is chosen with 3 parity check coefficients and 5 information symbols. In the following, for brevity, the complex numbers are truncated and only two decimal places are shown. Consider the example codeword
The first three coefficients are the parity check symbols and referring to
u
0(x)=1+x+x2+x3+x4+x5+x6+x7 (65)
and u2(x) is
and u3(x) is
The resulting product s0(x) is
Since s0(x)ĉ(x)=0, evaluating the coefficient of x0 gives
and after evaluation
(0.41−j)ĉ0=0.1−0.28j (69)
and
ĉ
0=(0.1−0.28j)(0.35+0.85j)=0.27−0.01j (70)
Referring to
In similar fashion the other two coefficients of c(x), ĉ1 and ĉ2, are derived and used to update the Input Vector to produce finally the codeword of the analog BCH code:
Consider that in an information system, this codeword is partially retrieved with unknown symbols in positions λ0=4, λ1=5 and λ2=7 so that the received codeword is
Referring to
This is input to Multiply and Sum. The other input to Multiply and Sum is the Input Vector, ĉ(x) with unknown coefficients initialised, ĉ4=0, ĉ5=0 and ĉ7=0. The output of Multiply and Sum is 0.4+1.02j which is input to the multiplier. Select B selects from s4(x), the coefficient of x4 which is 1.41j. This is negated and inverted to produce at the output of Invert, 0.71j, which is also input to the multiplier. As shown in
For λ1=5, Controller uses Select A to select the polynomial coefficient vectors α0, αi−α8−4 and αi−α8−7 corresponding to u0(x), u1(x) and u3(x). These are stored in each respective Register and multiplied together to produce s5(x):
This input to Multiply and Sum is s5(x). The other input to Multiply and Sum is the Input Vector, ĉ(x) with unknown coefficients initialised, ĉ5=0 and ĉ7=0. The output of Multiply and Sum is 1.45+1.09j which is input to the multiplier. Select B selects from s5(x) the coefficient of x3 which is −0.41−j. This is negated and inverted to produce 0.35−0.85j which is also input to the multiplier. As shown in
For λ2=7, Controller uses Select A to select the polynomial coefficient vectors α0, αi−α8−4 and αi−α8−5 corresponding to u0(x), u1(x) and u2(x). These are stored in each respective Register and multiplied together to produce s7(x):
s7(x) is input to Multiply and Sum. The other input to Multiply and Sum is the Input Vector, ĉ(x) with unknown coefficient initialised, ĉ7=0. The output of Multiply and Sum is −3.65+2.27j which is input to the multiplier. Select B selects from s7(x) the coefficient of x which is 2.41+j which is negated and inverted to produce −0.35+0.14j which is also input to the multiplier. As shown in