CHAPTER 3 CONSTRUCTION OF LOOKUP TABLES AND BINARY-SEARCH
4.2 The direct method algorithm and the LTD Algorithm
1 ( 1
S v could be found in the table and we obtain the error patterns e , According to the m
LTD algorithm, the receive vector could be corrected as rm' rm em ep rm, where e p
is set of binary 2
1
n -tuples in which only the p-th coordinate contains a nonzero value at
p-th position.
The flowchart of the new decoding algorithm is depicted in Figure II. The LTD algorithm, shown in Figure II, has also been programmed in C language.
4.2 The direct method algorithm and the LTD Algorithm
As long as the table is constructed, the direct method algorithm is thus applied to decode the QR codes which can be summarized by the following ten steps:
The direct method algorithm 1) Initialized by letting p k1.
2) Compute the syndromes S1 for a received vector r.
3) If S1=0 go to stop.
4) If syndrome is in T, go to step 9.
5) Check S1+p value in T. If syndrome is in T, go to step 8.
6) Compute p p1.
7) If p>n-1, go to stop. Otherwise return to step 5.
8) If the index corresponding to the syndrome in the lookup table A, then the error pattern
'
em is obtained by index to find in lookup table B. Addition e'm by one bit at p-th position, obtaining error pattern em (i.e., em em' ep where ep is a binary k-tuples in which contains only a nonzero value at p-th position), go to step 10.
9) Look for the index corresponding to the syndrome in the lookup table A, then error pattern em is obtained by index to be found in the lookup table B.
10) Subtract the error pattern em from received vector rm, obtaining the message block cm, go to stop.
The flowchart of the direct method algorithm is shown in Fig. 1.
To decode all the (23, 12, 7), (41, 21, 9) and (47, 24, 11) QR codes, we construct sorted syndrome values in the memory, namely set T. The set T is designated as T
v S1(v) . Thisalgorithm is summarized by the following ten steps:
The LTD algorithm
1) Initialized by letting p0.
2) Compute the syndromes S1 for a received vector r.
3) If S10 go to stop.
4) If syndrome is in T, go to step 9.
5) Check S1p value in T. If syndrome is in T, go to step 8.
6) Compute 1p p .
7) If pnt, go to stop. Otherwise return to step 5.
8) If 1p k ,look for the index corresponding to the syndrome in the lookup table A, then the error pattern e'm is obtained by index to find in lookup table B. Addition e'm
by one bit at p-th position, obtaining error pattern em (i.e., em em' ep where ep is a binary k-tuples in which the p-th coordinate contains a nonzero value only at p-th position), go to step 10.
9) Look for the index corresponding to the syndrome in the lookup table A, then error pattern em is obtained by index to be found in the lookup table B.
10) Subtract the error pattern em from received vector rm, obtaining the message block cm,
go to stop.
The above new decoding schemes have been verified exhaustively for v errors, where t
v
0 , by a software simulation. The new decoding schemes are suitable for both software and hardware realizations. However, in searching the syndrome of t errors case, we could not avoid that all 1 to t-1 error patterns occurred at remainder d(x). In this situation, the error would be found after executing the shift-search algorithm. Therefore, some computer simulation time would be increased. The probability of all errors appeared in the remainder of each QR code is listed in Table 4.1.
Table 4.1 The probabilities of all error patterns that are all appeared in the remainder for each QR code
Number of errors
(23, 12, 7) (41, 21, 9) (47, 24, 11)
1 11/23 20/41 23/47
2 55/253 190/820 253/1081
3 1140/10660 1771/16215
4 8855/178365
The computer simulation comparisons among errors of QR codes with different methods are shown in the Table 4.2. In computer simulation, we test 1,000,000 codewords for each error case. According to the simulation results, all codewords can be decoded within 4*10-6 second. It is quite practical result that can be utilized in the SOC software.
Moreover, the memory requirement of the direct method algorithm is about ten times larger than of the LTD algorithm, but the CPU time of the direct method algorithm is half of the LTD algorithm. In other words, the direct method algorithm increases the memory requirement up to 0.32K bytes and 12Kbytes than the LTD algorithm. However, the CPU time of the direct method algorithm is half of the LTD algorithm except in decoding the t-th error.
Table 4.2 Comparisons among different methods for each QR code QR Code v errors Direct method LTD algorithm
1 0.27s 0.75s
2 0.42s 0.92s
(23, 12, 7)
3 0.58s
10K Bytes
1.34s
1.03K Bytes
1 0.79s 2.36s
2 0.95s 1.89s
3 1.04s 1.93s
(41, 21, 9)
4 1.10s
991K Bytes
2.92s
89.4K Bytes
1 0.516 s 3.765 s
2 1.125 s 2.968 s
3 1.515 s 1.984 s
4 2.063 s 1.782 s
(47, 24, 11)
5 2.094 s
9640 K Bytes
3.884 s
1050 K Bytes
Chapter 5
Conclusions and Recommendations for Further Research
5.1 Conclusions
In this dissertation, we present the direct method algorithm and the LTD algorithm to decode the binary systematic (23, 12, 7), (41, 21, 9) and (47, 24, 11) QR codes, respectively.
Such algorithms determine directly the error locations by lookup tables without the operations of addition and multiplication over a finite field. According to Table 4.2, the memory requirement of the direct method algorithm is about ten times larger than the LTD algorithm, but the CPU time of the direct method algorithm is half of the LTD algorithm. In other words, the direct method algorithm sacrifices some memory requirement to exchange CPU time.
On the other hand, if we take (41, 21, 9), for example, to execute the algorithm in [15], it needs at least a memory requirement of up to 6Mbyte for software implementation of arithmetic operations in a Galois Field GF(220). The time of addition and multiplication operations is not included. It is too huge to be implemented in the SOC system. Therefore, the LTD algorithm mentioned in this paper in terms of both speed and memory requirements could be utilized in real time systems.
5.2 Performance Analysis
Fig. 2 compares the Bit-Error Rate (BER) of Binary Phase-Shift Keying (BPSK), (23, 12,
7), (41, 21, 9) and (47, 24, 11)QR Codes through AWGN channel. A (n, k, t) Binary QR code can correct up to t errors, where t is directly proportional to the number of parity bits.
Hence the performance of various binary QR codes are analyzed by varying n and k and their corresponding energy consumption is measured.
It is clear from Fig. 5.1 that (47, 24, 11) QR code, which can correct up to 5 errors has the lowest BER curve with the highest coding gain.
Bit-error rate versus Eb/No
1.00E-06 1.00E-05 1.00E-04 1.00E-03 1.00E-02 1.00E-01 1.00E+00
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7
Eb/No (dB)
Bit-error rate BPSK
QR23 QR41 QR47
Fig. 5.1 Performance analysis of BPSK and QR codes
5.3 Recommendations for Further Research
The above dissertation of the systematic binary QR codes suggests the following problems for further research:
1. The research accomplished here can be extended to other QR codes.
2. As long as the codeword length becomes longer, the limit of lookup table method would occur. For example, in the (87, 45, 17) QR code, the sum of all error patterns are:
i i . It is impossible to construct such huge table in hardware. Therefore, some new algorithms or ideas need to be considered.
3. The algorithms mentioned in this dissertation could be utilized in hardware design.
4. The research accomplished here can not applied to decode some systematic binary QR codes directly because the elements in Galois Field is fewer than the sum of all correctable error patterns. For example, in (31, 16, 7) QR code, the Galois Field in 2 which contains only 5 25131 elements. However, the sum of all
correctable error patterns are 4991 3
Reference
[1] Amrani, Y. Be’ery, A. Vardy, F.-W. Sun, and H. C. A. van Tilborg, The Leech lattice and the Golay code: Bounded-distance decoding and multilevel constructions, IEEE Trans. Inform. Theory, vol. 40, 1994, 1030-1043.
[2] M. Blaum and J. Bruck, Decoding the Golay code with Venn diagrams, IEEE Trans.
Inform. Theory, vol. 36, no. 4, 1990, 906–910.
[3] X. Chen, I. S. Reed, and T. K. Truong, A performance comparison of the binary quadratic residue codes with the 1/2-rate convolutional codes, IEEE Trans. on Inform.
Theory, vol. 40, 1994, 126–136.
[4] F. J. MacWilliams and N. J. A. Sloan, The theory of error-correcting codes.
Amsterdam, The Netherlands: North-Holland, 1977.
[5] J. Wolfmann, A permutation decoding of the (24, 12, 8) Golay code, IEEE Trans.
Inform. Theory, vol. IT-29, no. 5, 1983, 748–750.
[6] T. Kasami, A decoding procedure for multiple-error-correcting cyclic codes, IEEE Trans. Inform. Theory, vol. IT-10, 1964, 134–138.
[7] E. F. Assmus, Jr., and H. F. Mattson, New 5-designs, Theory, vol. 6, pp. 22-151, 1969.
[8] V. Pless, Decoding the Golay codes, IEEE Trans. Inform. Theory, vol. IT-32, no. 4, 1986, 561–567.
[9] J. Yuan, C. S. Chen, and S. Ma, Two-level decoding of (32, 16, 8) quadratic residue Code, Proc. IEE Commun. Speech Vis., vol. 140, no. 6, 1993, 409–414.
[10] M. Elia, Algebraic decoding of the (23, 12, 7) Golay code, IEEE Trans. Inform.
Theory, vol. 33, no. 1, 1987, 150–151.
[11] X. Chen, I. S. Reed, and T. K. Truong, Decoding the (73, 37, 13) quadratic residue code, Proc. IEE Comput. Digit. Tech., vol. 141, no. 5, 1994, 253–258.
[12] X. Chen, I. S. Reed, T. Helleseth, and T. K. Truong, Use of Gröbner bases to decode binary cyclic codes up to the true minimum distance, IEEE Trans. Inform. Theory, vol.
40, no. 5, 1994, 1654–1661.
[13] I. S. Reed, X. Yin, T. K. Truong, and J. K. Holmes, Decoding the (24, 12, 8) Golay code, Proc. IEE Inst. Elec. Eng., vol. 137, no. 3, 1990, 202–206.
[14] I. S. Reed, X. Yin, and T. K. Truong, Algebraic decoding of the (32, 16, 8) quadratic residue code, IEEE Trans. Inform. Theory, vol. 36, no. 4, 1990, 876–880.
[15] I. S. Reed, T. K. Truong, X. Chen, and X. Yin, The algebraic decoding of the (41, 21, 9) quadratic residue code, IEEE Trans. Inform. Theory, vol. 38, no. 3, 1992, 974–985.
[16] Y. Chang, T. K. Truong, I. S. Reed, H. Y. Cheng, and C. D. Lee, Algebraic decoding of the (71, 36, 11), (79, 40, 15), and (97, 49, 15) quadratic residue codes, IEEE Trans.
Commun., vol. 51, no. 9, 2003, 1463–1473.
[17] R. He, I. S. Reed, T. K. Truong, and X. Chen, Decoding the (47, 24, 11) quadratic residue code, IEEE Trans. Inform. Theory, vol. 47, no. 3, 2001, 1181–1186.
[18] E. R. Berlekamp, Algebraic Decoding Theory. New York, McGraw-Hill, 1968.
[19] J. L. Massey, Shift-register synthesis and BCH decoding, IEEE Trans. On Inform.
Theory, vol. IT-15, no. 1, 1969, 122–127.
[20] I. S. Reed, M. T. Shih, and T. K. Truong, VLSI design of inverse-free Berlekamp-Massey algorithm, Proc. IEE, vol. 138, no. 5, 1991, 295–298.
[21] X. Youzhi, Implementation of Berlekamp-Massey algorithm without inversion, Proc.
IEE Commun. Speech Vis., vol. 138, no. 3, 1991, 138–140.
[22] T. K. Truong, P. D. Chen, L. J. Wang, Y. Chang, I.S. Reed, Fast, prime factor, discrete Fourier transform algorithms over GF(2m) for 8 m 10 Information Sciences, vol.
176, 2006, 1-26
[23] X. Chen, I. S. Reed, and T. K. Truong, “Decoding the (73, 37, 13) quadratic residue code,” Proc. IEE Comput. Digit. Tech., vol. 141, no. 5, pp. 253–258, Sept. 1994.
[24] M. Karlin, “New binary coding results by circulants,” IEEE Trans. Inform. Theory, vol.
15, no. 1, pp. 81–92, Jan. 1969.
[25] D. Coppersmith and G. Seroussi, “On the minimum distance of some quadratic residue codes,” IEEE Trans. Inform. Theory, vol. 30, no. 2, pp. 407–411, March 1984.
[26] I. S. Reed and X. Chen, Error-Control Coding for Data Networks, Massachusetts: KAP, 1999
[27] S. B. Wicker, Error Control Sytems for Digital Comunication and Storage, Canada:
PHI. 1985
[28] T. K. Truong, J. H. Jeng, and I. S. Reed, “Fast algorithm for computing the roots of the error locator polynomials up to degree 11 in Reed-Solomon decoders, “ IEEE Trans.
on Commun., vol. 49, no. 5, pp. 779–783, May 2001.
[29] S. V. Fedorenko and P. V. Trifonov, “Finding roots of polynomials over finite fields,”
IEEE Trans. on Commun., vol. 50, no. 11, pp. 1709–1711, Nov. 2002.
[30] Trieu-Kien Truong、Pei-Yu Shih、Wen-Ku Su、Chong-Dao Lee、Yaotsu Chang,
"Algebraic Decoding of the (89, 45, 17) Quadratic Residue Code," IEEE Transactions on Information Theory , vol.54, no.11, pp.5005-5011, 2008.11
Appendix A
A.1 Construct the Lookup Tables of the (23, 12, 7) QR Code
The (23, 12, 7) QR code could correct up to 3 errors. But in LTD algorithm, we only store t-1=2 error patterns in the lookup tables. The detail of construct tables is shown below.
Case 0) For no error occurred, the received codeword, the syndromes is S1(0) 0 Case 1) For 1 error, S1(1) {s|si for 11i23}.
Case 2) For 2 errors, S1(2) {s|si j for 11i23 , i j 0}.
Let e(ed,em)(e0,e1,,ek2,ek1,ek,,en1), where ed (e0,e1,ek1) and )
, , (
em ek1 en1 be the error vector and ei , where 0 i22, be a set of binary 23-tuples in which only the ith coordinate contains a nonzero value. For example,
) 0 , , 0 , 1 , 0
1 (
e . With the above definitions, the pseudo makes up two tables as follows:
Step 1: Initial index0.
Step 2: Error pattern of 1 for i 11 until 22 do begin
De_tableA[index]record of ; i eei;
De_tableB[index]em; Index index + 1 ; end;
Step 3: Error patterns of 2 for i 11 until 22 do for j i-1 until 0 do begin
De_tableA[index]record of i j; eei ; ej
De_tableB[index]em; index index + 1;
end;
Step 4: De_table[] is sorted according to the sorting pattern of the syndrome array of De_tableA[].
A.2 Construct the Lookup Tables of the (41, 21, 9) QR Code
The (41, 21, 9) QR code could correct up to 4 errors. But in LTD algorithm, we only store t-1=3 error patterns in the lookup tables. The detail of construct tables is shown below.
Case 0) For no error, S1(0) 0.
Case 1) For 1 error, S1(1) {s|si for 20i41}.
Case 2) For 2 errors, S1(2) {s|si j for 20i41, i j 0}
Case 3) For 3 errors, S1(3) {s|si j k for 20i41, i jk0}.
Let e(ed,em) (e0,e1,,ek2,ek1,ek,,en1) , where )
, , ,
( 0 1 2
k
d e e e
e and em (ek1,,en1) be the error vector and ei , where 40
0 i , be a set of binary 41-tuples in which only the i-th coordinate contains a nonzero value. For example, e1 (0,1,0,,0). With the above definitions, the pseudo code makes up two tables as follows:
Step 1: Initial index0.
Step 2: Error pattern of 1 for i 20 until 40 do begin
De_tableA[index]record of i; ei
e ;
De_tableB[index]e ; m index index +1;
end;
Step 3: Error patterns of 2 for i 20 until 40 do for j i-1 until 0 do begin
De_tableA[index]record of i j;
j
i e
e
e ;
De_tableB[index]em; index index +1;
end;
Step 4: Error patterns of 3 for i 20 until 40 do for j i-1 until 1 do for k j-1 until 0 do begin
De_tableA[index]record of i j k;
k j
i e e
e
e ;
De_tableB[index]em; index index +1;
end;
Step 5: De_tableB[] is sorted according to the sorting pattern of the syndrome array of De_tableA[].
A.3 Construct the Lookup Tables of the (47, 24, 11) QR Code
The (47, 24, 11) QR code could correct up to 5 errors. But in LTD algorithm, we only store t-1=4 error patterns in the lookup tables. The detail of construct tables is shown below.
Case 0) For no error in the received codeword, the syndrome is S1(0) 0. Case 1) For 1 error, S1(1) {s|si for 23i47}.
Case 2) For 2 errors, S1(2) {s|sij for 23i47, i j0}.
Case 3) For 3 errors, S1(3) {s|sij k for 23i47,i jk0}
Case 4) For 4 errors in the received codeword, the syndrome is
| 47-tuples in which only the ith coordinate contains a nonzero value. For example,
)
e . With the above definitions, the pseudo code makes up two tables as follows:
Step 1: Initial index0.
Step 2: Error patterns of 1 for i 23 until 46 do
Step 3: Error patterns of 2
for i 23 until 46 do
Step 4: Error patterns of 3 for i 23 until 46 do
Step 5: Error patterns of 4 for i 23 until 46 do indexindext+1;
end;
Step 6: De_tableB[] is sorted according to the sorting pattern of the syndrome array of De_tableA[].
Appendix B
The binary-search algorithm plays an important roll in both the direct method and the LTD algorithm. Therefore, we give the detail algorithm for all codes.
B.1 Binary-Search Algorithm for (23, 12, 7)
int Bin_Search(unsigned int syndrome, De_tableA[]){
int high = 210, low = -1, probe;
while (high-low >1){
probe=(low+high)>>1;
if (De_tablea[probe]>syndrome) high = probe;
else
low = probe;
}
if (low = =-1 ||De_tablea[low] !=syndrome) return -1;
else
return low;
}
B.2 Binary-Search Algorithm for (41, 21, 9)
int Bin_Search(unsigned int syndrome, unsigned int De_tableA[]) { int high =10171, low = -1, middle;
while (high - low > 1){
middle = (low + high) >> 1;
if (De_tableA[middle] > syndrome) high = middle;
else
low = middle;}
if (low == -1 || De_tableA[low] != syndrome) return -1;
else
return low;
}
B.3 Binary-Search Algorithm for (47, 24, 11 )
int Bin_Search(unsigned int syndrome, unsigned int De_tableA[]){
int high =184806, low = -1, middle;
while (high - low > 1){
middle = (low + high) >> 1;
if (De_tableA[middle] > syndrome) high = middle;
else
low = middle;
}
if (low == -1 || De_tableA[low] != syndrome) return -1;
else
return low;
}
Appendix C
C.1 Decoding Process of the LTD Algorithm in Decoding (23, 12, 7)
(1) Initialized by letting p=0.
(2) Compute the syndrome S1 for a received vector r.
(3) If S10 go to stop.
(4) If syndrome is in T, go to step 9.
(5) Check S1p value in T. If syndrome is in T, go to step 8.
(6) Compute p p1.
(7) If p n3, go to stop. Otherwise return to step 5.
(8) If p k1, look for the index corresponding to the syndrome in the lookup table A, then the error pattern em is obtained by index to find in lookup table B. Addition em
by one bit at pth position, obtaining error pattern em (i.e., em emep), go to step 10.
(9) Look for the index corresponding to the syndrome in the lookup table A, then error pattern em is obtained by index to find in the lookup table B.
(10) Subtract the error pattern em from receive vector rm, obtaining the message block em, go to stop.
C.2 Decoding Process of the LTD Algorithm in Decoding (41, 21, 9)
1) Initialized by letting p=0.
2) Compute the syndromes S1 for a received vector r.
3) If S1=0 go to stop.
4) If syndrome is in T, go to step 9.
5) Check S1+p value in T. If syndrome is in T, go to step 8.
6) Compute p p1.
7) If p n4, go to stop. Otherwise return to step 5.
8) If p k1, look for the index corresponding to the syndrome in the lookup table A, then the error pattern e'm is obtained by index to find in lookup table B. Addition e'm by one bit at pth position, obtaining error pattern em (i.e., em em' ep where ep is set of binary 21-tuples in which only the p-th coordinate contains a nonzero value at p-th position), go to step 10.
9) Look for the index corresponding to the syndrome in the lookup table A, then error pattern
em is obtained by index to find in the lookup table B.
10) Subtract the error pattern em from received vector rm, obtaining the message block cm, go to stop.
C.3 Decoding Process of the LTD Algorithm in Decoding (47, 24, 11)
(1) Initialized by letting p=0.
(2) Compute the syndromes S1 for a received vector r.
(3) If S1=0 go to stop.
(4) If the syndrome is in T, go to step 9.
(5) Check S1+p value in T. If the syndrome is in T, go to step 8.
(6) Compute p p1.
(7) If p n5, go to stop. Otherwise return to step 5.
(8) If p k1, look for the index corresponding to the syndrome in the lookup table A, then the error pattern e is obtained by the index to be found in the lookup table B. Addition m'
'
e by one bit at pth position, obtaining error pattern m e (i.e., m em em' ep), go to step 10.
(9) Look for the index corresponding to the syndrome in the lookup table A, then error pattern e is obtained by index to find in the lookup table B. m
(10) Subtract the error pattern e from the received vector m r , obtaining the message m block c , go to stop. m
)
Fig.I The flowchart of direct method algorithm
)
Fig. II. LTD algorithm Flowchart of the (n, k, d) QR encoder and decoder.