You are on page 1of 6
DSN Progress Report 42:53 A Reed-Solomon Decoding Program for Correc July and August 1879 ig Both Errors and Erasures R. L. Miller, T. K. Truong, 1d B. Benjauthrit ‘Communication Systems Research Section 1.8. Reed Department of Electrical Engineering University of Southern California This article discusses the software implementation of a simplified algorithm for decoding errors and erasures of Reed-Solomon (R-S) code words using the techniques of finite field transforms and continued fractions. In particular, random code words from the (255, 223, 33} R-S code over GF{2*) are corrupted by random error and erasure patterns, and decoded whenever theoretically possible, A matrix of execution times of this decoder under varying sets of errors and erasure patterns is also included. This matrix demonstrates the relative amounts of time required for decoding different error and erasure patterns, ax well as the correctness of the algorithms and the software implementation 1. Introduction Recently the authors in Ref, 1 developed a simplified algorithm for correcting erasures and errors of Reed-Solomon (RS) codes over the finite field GF(p"), where p is a prime and m is an integer. For a space communication link, it was shown (Ref.2) that a 16error-correcting RS code of 255 8-bit symbols, concatenated with a k=7, rate= 1/2 of 1/3, Viterbi decoded convolutional code, can be used to reduce the signal-to-noise ratio required to meet a specified bit-rror rate. Such 2 concatenated code is being considered for the Galileo project and the NASA End-to-End Data System, In such @ concatenated code, the inner convolutional decoder is sometimes able to find only two or more equally 102 probable symbols, Then the best policy is to declare an erasure of the symbol. If the outer RS code is able to use the ‘additional information that erasures have occurred, then itis reasonable to assume that the system performance will be enhanced, In this article, an algorithm based on the ideas in Ref. 1 is, used to correct erasures and errors of R-S code words using a finite field transform over GF(2*). This algorithm is written in FORTRAN V and is implemented on the UNIVAC 1108 computer. A matrix of decoding times for correcting errors and erasures of the code words is given at the end of this paper. Il, The R-S Decoding Algorithm ‘The algorithm given in (Ref. 1) was used to correct patterns fof 1 errors and s erasures of the words of the (255, 223, 33) RS code, where 2¢+ s< 33 and the symbols belong to the finite field GF(2*), Define the following five vectors: op 1s “746 y5q) = €00de vector (ros ys Fagg) = Hy tecelved vector ost gga) = sr erasure vector op eyo 2€ggq) = Gs ett0F vector Gipsy Byga) = Be mew erasure veetor ‘These vectors are related by r= e+ w+ eand = e+ u. Suppose that ¢ errors and s erasures occur in the received vector F of 255 symbols and assume 2¢+ §< 33, Then the decoding procedure consists of the following steps: Step 1: Compute the syndromes S, (1 < &< 32) of the received 255-tuple (ry, Fyx-** sag) ifen YS rat fork=1,2, o where a is an element of order 255 in GF(2°). If S, = 0 for 1< k<32, then r is a code word and no decoding is necessary. Otherwise, Step 2: Compute 1, for j= 0, 1, 2,-++,s from the erasure locator polynomial Il corp @ 1) = T] «-2) re ‘where sis the number of erasures in the received veetor, and Z, (1 33, itis shown in Ref, 4 that the continued fraction algorithm wil not determine the correct error locator polynomial and will (1) cither terminate abnormally, (2) terminate normally with a polynomial whose roots do not represent possible error loca- tions, or (3) terminate normally with a polynomial whose roots do represent possible error locations In the first two cases, « decoding failure will occur; the decoder will be unable to decode the received word. In the third case, a decoding error will occur; there will be no alarm telling of the inability to decode; the decoder will operate as is 2t+ s< 33. The probability of such miscortections of errors and erasures of R-S code words is discussed further in Ref. 4. Step 4: Use 2 Chien-type search to find the 1 roots of the error locator polynomial. If ¢ distinct roots cannot be found that represent possible error locations, then declare a decoding failure. Otherwise, Step $: Compute the combined erasure and error locator polynomial from the equation FO) = of) 7G) = FED) where ofx) and x(x) are now known. Then compute the rest of transform of the erasure and error vector from the equation DL Cvs, _ fore>a-1 = Step 6: Invert the transform of fiat the points correspond- ing to the known error and erasure locations to obtain the amplitudes of That is, a BE) = eu, = YO S,Zh forp= 1,200,540 © Where Z, are the known error and erasure locations of Then subtract’ from the received word the error and erasure vector to obtain the corrected code word. Program Design and Implementation The decoding procedure described in the previous section was implemented on the UNIVAC 1108 computer using FORTRAN V. This program was used to correct any combina- tion of ¢ errors and s erasures occurting in the 255.symbol RS code words, where 2r-4 s<33. The overall basic structure of the program is given in Fig.1, It is divided into a main program and five major subroutines. ‘The Main Program: This is the main driver of the rest of the program, It initializes the decoding process and keeps track of the elapsed CPU time. Input: This subroutine generates a random code vector (polynomial) R(x) for the RS decoder and then adds errors and erasures E(x) to it. Step 1: The first 32 syndromes of the received vectors as well as the corrected vectors are calculated in this subroutine. In case the corrected received word is not an RS code word, the subroutine will output the message, “The corrected received vector is not a codeword.” This is helpful in confirming the correciness of the program, as well as indicat ing that the number of errors and erasures have exceeded the limits allowable by the decoder. Step 2: This subroutine computes the Fomey syndrome vector T (Eq, 3) from the erasure vector Z. The erasure locator polynomial r(x) (Eq, 2) is also calculated here. Step 3: The error locator polynomial o(x) is calculated from the Forney syndrome vector T using the continued fraction algorithm, The product of the error locator polynom- jal o(x) and the erasure locator polynomial 7(x) is next computed (Eq. 4). The coefficients of this erasure and error locator polynomial are used to compute the remaining terms Sy5,°++, Syog» Also, the locations of the errors are now determined. (The erasure locations are known a priori by definition.) Step 4: This step directly computes the inverse Fourier transform of the vector (Sy, S,,-+, Spgg) to obtain the nonzero error and erasure magnitudes, Finally, the received vector Is corrected to provide an estimate of transmitted code word IV. Simulation Results ‘The computation times for decoding numerous code words that were corrupted by errors and erasures are given in Table 1. These results were obtained by computing each entry in Table I five times and then averaging. Along any row or column, the computation times tend to increase with the row for column indices until decoding failures occur due to an excess of allowable errors and erasures. V. Summary ‘A software Reed-Solomon decoder has been developed for the (255, 223, 33) R-S code whose symbols belong to GF(28). ‘The simulation indicates that the decoder correctly recon: structs the transmitted code word from the received word if the code word has been corrupted by f errors and s erasures, where 2r+5<33, Acknowledgment ‘This work was supported in part by the U.S. Air Force Office of Scientific Research under Grant Number AFOSR 75-2798 and also in part by NASA Contract NAS7-100. 108 References 1, 1.$, Reed and T. K. Truong, “A Simplified Algorithm for Correcting Both Errors and Erasures of RS Codes,” in The Deep Space Network Progress Report 42-48, Jet Propulsion Laboratory, Pasadena, California, September 1978, . J. Odenwalder, et al., Hybrid Coding Systems Study Final Report Linkabit Corp., NASA CR114, 486, September 1972. 3. E. R, Berlekamp and J. L, Ramsey “Readable Erasures Improve the Performance of Reed-Solomon Codes” IEEE Transactions on Information Theory, Vol. IT-24, No. 5, Sept. 1978. 4. RL. Miller, I. 8, Reed, and T. K. Truong, “The Probability of Incorrectly Decoding Errors and Erasures and Reed-Solomon Code Words,” submitted to IEEE Trans. on Inform Theory. 108 Erasures 108, o3t4 0342 0377 0382 0439 0437 0439 0474 0492 0583 0.659 0561 0.606 0656 0.620 0.693 0.662 0.802 ose os? 0.756 0.758 0.750 0.769 ost 0.429 sr 0.960 ais 1028 0.985 0.960 0384 0375 0427 0424 0456 oa7t 0472 0492 0610 0.585 0.607 0.695 0.661 0.638 0.760 0778 0.735 07s 0.720 0747 0.740 0.763 0.805 0.807 0.902 as 0.920 0.960 0.908 0.930 0.945 0374 0397 0.466 0439 048s 0.456 0483 0582 0.625 0.687 0.665 0.668 0.682 0.681 0.687 on6 ons ons on? 0.756 om ost 0.954 0.956 0.825 0.893 0.906 0.907 0.935 0.935 0374 0.826 0.463 047 043s o4at 0524 0582 os7a 0612 0661 0.626 0.683 0.661 0.156 0737 0780 0789 0.766 0.800 02s 0.791 0.935 oo 0.898 0.388 0.92 0.945 0.928 0.340 0307 0529 0.483 0485 ost 0594 0383 0574 0588 0.640 0.625 0.730 ors 0.691 0.708 0738 oa 0.758 0789 0.306 0.802 0.831 oat 087s 0310 0.907 0342 0372 ‘Table 1. Decoder execution times in seconds 0483 0495 0387 os7t 0.634 0.596 0631 0.660 0.688 0.664 074 0763 oat 0.740 0779 0.863 0.860 0.882 0.980 0.963 0878 0.899) 1.049 0429 0439 osis 0589 0561 0374 0588 0.609 0.696 0.782 0.699 0.720 0.746 0.733 0.753 0.800 078s 82 0.833 ast 0.859 0397 0972 0.386 0.406 0568 0584 0616 0.607 0.623 0.638 0.656 0679 0.692 0781 0767 770 0.783 oie oss 0.981 0.907 0.864 0.879 0347 0428 Errore 0.608 0.625 0.609 074 0761 0763 0.697 0.770 0.820 0.781 0.769 gis 0.919 0.901 0.924 0.883 oa12 0.402 0.506 06st 0661 0737 0787 0879 0.789 0724 0817 0.897 0.380 0.823 osit 0.830 0.858 0.949 042 0481 10 0.150 0.709 0813 0.697 o7n0 0.782 0.808 0.790 0.784 0812 0.936 0.849 0912 0386 044s n 0.760 om 0.703 0779 o778 0810 0.194 osis 0.864 918 1036 40s 0.462 2 0734 0746 oat oats 0.48 0.868 0.930 0.983 0.906 0432 0.485 B ogi 0.792 0.899 0.880 0.983 Loss 0997 401 0521 “ om 0.887 osm 0.836 0.956 0.409 0521 1s 0940 0.867 0.837 0429 0377 we 17 0878 0592 oat osm TAIN DETERMINE ELAPSEO CrUTINE i WAT “GENEIATE A ANDO ES CODE VECTOR THEN ADD SANDOM ERRORS AND. ERASUEES TOT t Seri ‘COMPUTE SYNOROMES Bye Spe soe Sap Spree Sag) © 0,0. ser? COMPUTE), COMPUTE FoImiey synoROMes FROM vis) AND 3) FOR Batya ae I sera COMPUTE o(x), 15 ROOTS, AND S++ Saas FROM cteleied sere “COMPUTE INVERSE TaANsroen OF (ye Sp oo Sag) TO ORTAIN EROR AND ERASUEE VECTOR AND CORRECTED RECEIVED VECTOR Fig. 1. Basic functional structures of R-S decoding program using ‘and continued fractions ‘anstorm over GF (24) RETURN 107

You might also like