decoding algorithms of reed-solomon code - diva portal833161/fulltext… ·  · 2015-06-30decoding...

125
Master’s Thesis Computer Science Thesis no: MCS-2011-26 October 2011 School of Computing Blekinge Institute of Technology SE – 371 79 Karlskrona Sweden Decoding algorithms of Reed-Solomon code Szymon Czynszak

Upload: dinhnhu

Post on 04-Apr-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Master’s Thesis Computer Science Thesis no: MCS-2011-26October 2011

School of Computing Blekinge Institute of Technology SE – 371 79 Karlskrona Sweden

Decoding algorithms of Reed-Solomon code

Szymon Czynszak

Page 2: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

ii

This thesis is submitted to the School of Computing at Blekinge Institute of Technology in partial fulfillment of the requirements for the degree of Master of Science in Computer Science. The thesis is equivalent to 20 weeks of full time studies.

Contact Information: Author(s): Szymon Czynszak E-mail: [email protected]

University advisor(s): Mr Janusz Biernat, prof. PWR, dr hab. inż. Politechnika Wrocławska E-mail: [email protected] Mr Martin Boldt, dr Blekinge Institute of Technology E-mail: [email protected]

School of Computing Blekinge Institute of Technology SE – 371 79 Karlskrona Sweden

Internet : www.bth.se/com Phone : +46 455 38 50 00 Fax : +46 455 38 50 57

Page 3: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Abstract

Reed-Solomon code is nowadays broadly used in many fields of data trans-mission. Using of error correction codes is divided into two main operations:information coding before sending information into communication channeland decoding received information at the other side. There are vast of decod-ing algorithms of Reed-Solomon codes, which have specific features. There isneeded knowledge of features of algorithms to choose correct algorithm whichsatisfies requirements of system. There are evaluated cyclic decoding algo-rithm, Peterson-Gorenstein-Zierler algorithm, Berlekamp-Massey algorithm,Sugiyama algorithm with erasures and without erasures and Guruswami-Sudan algorithm. There was done implementation of algorithms in softwareand in hardware. Simulation of implemented algorithms was performed. Al-gorithms were evaluated and there were proposed methods to improve theirwork.

Page 4: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Contents1 Introduction 6

1.1 Structure of document . . . . . . . . . . . . . . . . . . . . . . 71.2 Research questions . . . . . . . . . . . . . . . . . . . . . . . . 81.3 Aims and objectives . . . . . . . . . . . . . . . . . . . . . . . 81.4 Research methodology . . . . . . . . . . . . . . . . . . . . . . 9

2 Galois fields 122.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2 Representation of elements in GF (2m) . . . . . . . . . . . . . 13

2.2.1 Polynomial representation . . . . . . . . . . . . . . . . 132.2.2 Positive integer representation . . . . . . . . . . . . . . 142.2.3 Vector representation . . . . . . . . . . . . . . . . . . . 15

2.3 Zech logarithms . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3.1 Imamura algorithm . . . . . . . . . . . . . . . . . . . . 17

2.4 LUT tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.4.1 Addition . . . . . . . . . . . . . . . . . . . . . . . . . . 202.4.2 Multiplication . . . . . . . . . . . . . . . . . . . . . . . 21

3 Reed-Solomon code 223.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.2 Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.2.1 Original method . . . . . . . . . . . . . . . . . . . . . 233.2.2 RS code as nonbinary BCH code . . . . . . . . . . . . 24

4 Decoding algorithms 254.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.1.1 Complete decoder . . . . . . . . . . . . . . . . . . . . . 254.1.2 Standard array . . . . . . . . . . . . . . . . . . . . . . 254.1.3 Syndrome decoding . . . . . . . . . . . . . . . . . . . . 254.1.4 Decoding of cyclic code . . . . . . . . . . . . . . . . . . 29

4.2 Finding position of errors . . . . . . . . . . . . . . . . . . . . . 344.2.1 Peterson-Gorenstein-Zierler algorithm . . . . . . . . . . 344.2.2 Berlekamp-Massey algorithm . . . . . . . . . . . . . . . 404.2.3 Sugiyama algorithm . . . . . . . . . . . . . . . . . . . 454.2.4 Chien search . . . . . . . . . . . . . . . . . . . . . . . . 47

4.3 Finding error values . . . . . . . . . . . . . . . . . . . . . . . . 484.3.1 Forney algorithm . . . . . . . . . . . . . . . . . . . . . 49

4.4 Erasure decoding . . . . . . . . . . . . . . . . . . . . . . . . . 50

1

Page 5: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4.5 Guruswami-Sudan algorithm . . . . . . . . . . . . . . . . . . . 544.5.1 Kotter algorithm . . . . . . . . . . . . . . . . . . . . . 614.5.2 Roth-Ruckenstein algorithm . . . . . . . . . . . . . . . 664.5.3 Kotter-Vardy algorithm . . . . . . . . . . . . . . . . . 70

5 Implementation 775.1 Arithmetic operations for Galois fields . . . . . . . . . . . . . 785.2 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835.3 Error trapping decoder . . . . . . . . . . . . . . . . . . . . . . 865.4 Peterson-Gorenstein-Zierler algorithm . . . . . . . . . . . . . . 925.5 Berlekamp-Massey algorithm . . . . . . . . . . . . . . . . . . . 975.6 Sugiyama algorithm . . . . . . . . . . . . . . . . . . . . . . . . 975.7 Chien search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995.8 Forney algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 995.9 Guruswami-Sudan algorithm . . . . . . . . . . . . . . . . . . . 100

6 Evaluation 1056.1 Simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . 105

7 Results and discussion 1067.1 Cyclic decoding . . . . . . . . . . . . . . . . . . . . . . . . . . 1067.2 Computing error positions . . . . . . . . . . . . . . . . . . . . 109

7.2.1 Peterson-Gorenstein-Zierler algorithm . . . . . . . . . . 1107.2.2 BMA algorithm and Sugiyama algorithm . . . . . . . . 111

7.3 Computing error values . . . . . . . . . . . . . . . . . . . . . . 1147.4 Guruswami-Sudan algorithm . . . . . . . . . . . . . . . . . . . 1157.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

8 Conclusions and future work 120

2

Page 6: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

List of Figures4.1 LFSR for polynomial Λ(x) = α12x3 + 1 . . . . . . . . . . . . . 414.2 Branches of recursion for Roth-Ruckenstein algorithm. . . . . 68

5.1 Symbols of elements . . . . . . . . . . . . . . . . . . . . . . . 775.2 Adder for GF (8). . . . . . . . . . . . . . . . . . . . . . . . . . 785.3 Multiplication element for GF (8). . . . . . . . . . . . . . . . . 795.4 Unit which computes multiplicative inverses in GF (8). . . . . 815.5 Division of element a by element b in field. . . . . . . . . . . . 815.6 Multiplication unit by constant . . . . . . . . . . . . . . . . . 835.7 Multiplication of polynomials . . . . . . . . . . . . . . . . . . 845.8 Division of polynomials . . . . . . . . . . . . . . . . . . . . . . 855.9 Combinational evaluation of polynomial. . . . . . . . . . . . . 855.10 Sequential evaluation of polynomial. . . . . . . . . . . . . . . . 865.11 Error trapping decoder - general overview. . . . . . . . . . . . 875.12 Error trapping decoder for RS(7, 3) code. . . . . . . . . . . . . 885.13 Error pattern 1 for error trapping decoding. . . . . . . . . . . 885.14 Error pattern 2 for error trapping decoding. . . . . . . . . . . 895.15 Error pattern 3 for error trapping decoding. . . . . . . . . . . 895.16 Error trapping decoding for RS(15, 5) – 1 . . . . . . . . . . . 905.17 Error trapping decoding for RS(15, 5) – 2 . . . . . . . . . . . 905.18 Error trapping decoding for RS(15, 5) – 3 . . . . . . . . . . . 915.19 Peterson-Gorenstein-Zierler decoder for RS(n, n− 4). . . . . . 945.20 Computing error values for RS(7, 3). . . . . . . . . . . . . . . 955.21 Combinational decoder for RS(7, 3). . . . . . . . . . . . . . . 965.22 Exemplary result of work of decoder for RS(7, 3). . . . . . . . 965.23 Berlekamp-Massey algorithm for RS(n, n− 4). . . . . . . . . . 985.24 Sugiyama algorithm. . . . . . . . . . . . . . . . . . . . . . . . 995.25 Chien search for RS(7, 3). . . . . . . . . . . . . . . . . . . . . 1005.26 Forney algorithm for RS(7, 3). . . . . . . . . . . . . . . . . . . 101

7.1 Cyclic decoding for RS(31, 23) . . . . . . . . . . . . . . . . . . 1077.2 Cyclic decoding for RS(63, 55) . . . . . . . . . . . . . . . . . . 1077.3 Cyclic decoding for RS(15, 7) . . . . . . . . . . . . . . . . . . 1087.4 Cyclic decoding for RS(15, k), RS(31, k), RS(63, k) . . . . . . 1087.5 Cyclic decoding with multithreading. . . . . . . . . . . . . . . 1097.6 Computing syndromes with classic method and with Horner’s

rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1107.7 PGZ algorithm and error correction capability . . . . . . . . . 111

3

Page 7: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

7.8 BMA algorithm for codes of variable error correction capability.1127.9 Sugiyama algorithm and error correction capability . . . . . . 1127.10 BMA and Sugiyama algorithms, and number of errors . . . . . 1137.11 Comparision of decoding with erasures and without erasures . 1147.12 Comparision of Gaussian elimination and Forney algorithm . . 1157.13 Error correction capability and multiplicity of zeroes . . . . . 1167.14 Time of decoding and order of multiplicity of zeroes . . . . . . 116

4

Page 8: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

List of Tables2.1 Addition table for elements in GF (8). . . . . . . . . . . . . . . 182.2 Multiplication table for elements in GF (8). . . . . . . . . . . . 192.3 Addition table for elements in GF (2m). . . . . . . . . . . . . . 192.4 Multiplication table for elements in GF (2m). . . . . . . . . . . 20

4.1 Fragment of syndrome array for RS(7, 3) code. . . . . . . . . . 294.2 Next steps of Berlekamp-Massey algorithm . . . . . . . . . . . 454.3 Fragment of ordered list of monomials of type xinyjn . . . . . . 574.4 Transformation from soft to hard information . . . . . . . . . 72

5.1 Multiplication of linear independent vectors by constant. . . . 815.2 Multiplication of vectors by constant α4. . . . . . . . . . . . . 82

5

Page 9: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

1. IntroductionWith evolution of digital systems, the communication channels transport

more and more data. This data may be affected by harmful factors likedamping or interference. When this happens, then information which wastransferred may be corrupted. To provide better performance for data trans-fer there can be used error-correction codes. Error-correction coding is atechnique of adding redundance to transmitted data in order to detect andpossibly repair damaged received data. Data must be encoded before send-ing into communication channel and decoded at the other end. There weredevised several error-correction codes like Golay code, Goppa code, Turbocode, Hamming code, Reed-Solomon code etc. Main focus in the master the-sis lies on decoding algorithms of Reed-Solomon code. Reed-Solomon codeis widely used in CDs, DVDs, Blu-Ray, DSL, WiMAX or RAID 6.

Reed-Solomon code was invented in 1960 [1]. The RS(n, k), where ndenotes length of codeword, k denotes number of data symbols and thereare n − k control symbols is able theoretically to correct up to t = n−k

2er-

rors. Reed-Solomon code may be seen as non-binary BCH (Bose- Chaudhuri-Hocquenghem) code and particular decoding algorithms for BCH code canbe used together for Reed-Solomon code. Reed-Solomon code is also cycliccode, so decoding algorithms for cyclic codes can be used. In 1960 [2] Peter-son presented a method for decoding BCH codes and in 1961 [3] Gorensteinand Zierler tailored Peterson’s method to Reed-Solomon code’s purpose. In1968 [4] Berlekamp presented an algorithm which was simplified by Masseyin 1969 [5]. In 1975 [14] Sugiyama et al. invented another algorithm fordecoding Reed-Solomon codewords. All these algorithms have in commonthat they employ error-locator polynomials to produce the result, but theydo this step in a different way. They are called bounded distance decodingalgorithms, because they produce one unique result.

In 1997 Sudan developed algorithm for decoding Reed-Solomon code-words, which was improved by Sudan and Guruswami in 1999 [7]. Thisalgorithm, in contradistinction to bounded distance decoding algorithms,generates list of codewords within given range from decoded word. In 2003Koetter and Vardy presented modification of Guruswami-Sudan algorithmto employ soft-decoding [19].

Algorithms are characterized by different computational complexity whichis dependent on number of information and control elements in a codeword,degree of scalability, memory requirements, performance of processing, typeof given output, suitability to use in multithreaded environment or vector-ization. There are different environments where decoding algorithms may

6

Page 10: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

be used. Some of them are personal computers, industry computers, em-bedded systems, specific assembled hardware devices etc. Each of them arecharacterized by specific requirements and impose several contraints.

Implementation of decoding algorithms both in hardware and softwaremay be accomplished in different ways. To construct decoder there can beused several mechanisms and algorithms which usually come from algebradomain. Algorithms are built with use of Galois field arithmetic which in-cludes basic operations like addition, multiplication and calculation of fieldelements and operations which involve addition, multiplication, division andcalculation of division’s remainder for polynomials. There are vast of elec-tronical elements, which may be used to construct hardware decoder.

However this is not simple task to build efficient decoder, when thereare several ways to implement it. Furthermore, there are different typesof algorithms, including bounded distance decoding algorithms, list decod-ing algorithms and soft decoding algorithms and there may be confusion tochoose right one without knowing their characteristics of processing. Analy-sis of complexity and scalability is done to find out the main advantages anddisadvantages of algorithms. There will be processed evaluation of presentedsolutions of implementation of algorithms.

1.1 Structure of document

Master thesis report is divided into several chapters. First is presented in-formation about Galois fields. There are described what are Galois fields, howarithmetic operations work for them, how can be they represented in com-puter systems. Next chapter describes Reed-Solomon codes. There are giventwo definitions of Reed-Solomon code and is shown that these definitionsgenerate the same code. Next chapter presents decoding algorithms. First isgiven introduction to basic decoding methods like complete decoder, standardarray and syndrome decoding, then cyclic decoding, Peterson-Gorenstein-Zierler algorithm, Berlekamp-Massey algorithm, Sugiyama algorithm. Thereare described also auxiliary like Chien search and Forney algorithm. Thereis described modified Sugiyama algorithm which employs decoding with era-sures. Last sections in the chapter presents Guruswami-Sudan algorithm.Guruswami-Sudan algorithm can employ Kotter algorithm for polynomialinterpolation, Roth-Ruckenstein algorithm for polynomial factorization andKotter-Vardy algorithm for transformation of soft information to hard infor-mation. Next chapter gives overview how algorithms were implemented bothin software and hardware. Next, there are chapters which describe simula-

7

Page 11: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

tion environment, results from experiments and evaluation of results. Lastchapter includes conclusions and future work topics.

1.2 Research questions

There are several decoding algorithms of Reed-Solomon code and theydiffer in their features like computional complexity and error-correction ca-pability. Other factors which influence work of algorithms are number ofoccured error, codeword length, number of control elements etc. Construct-ing decoder, there can be defined several requirements like time of decoding,ability to decoding specific number of errors or complexity of algorithm. Firstresearch question which is used to solve this problem is:

1. What are the features of scalability and complexity ofimplemented algorithms?

Decoding algorithms usually consist of several steps. Some of these stepscan be executed by different algorithms. Algorithms may be also modifiedin order to improve their work. Question which is used to find what can bedone to improve algorithm work on algorithm level is:

2. What mathematical functions and modifications on algorithmlevel can improve performance of decoding algorithms?

Work of algorithms can be also improved by using features of softwareand hardware. Some steps of algorithms can be done by parallel units orfor instance some precomputed data may be used to decrease time of decod-ing. Question which is used to find what can be done to improve work ofalgorithms on software and hardware level is:

3. Which features of software and hardware can improve per-formance of decoding algorithms?

1.3 Aims and objectives

Aim of the master thesis is to evaluate implemented decoders of Reed-Solomon code under criteria of scalability and complexity.

There are following objectives which are fullfiled in order to answer re-search questions:

• preparation of mathematical functions which concern mainly Galoisfields, polynomial arithmetic, matrices and vectors.

• implementation of algorithms in software and hardware,• finding out improvements for algorithms,• simulation of proposed solutions in simulator,

8

Page 12: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• evaluation of proposed solutions in terms of complexity and scalability.

1.4 Research methodology

To get overview of current knowledge in decoding algorithms of Reed-Solomon code area, background study is done. Main research method used inthe master thesis is an experiment. To get done experiment, algorithms fromgiven set must be implemented. Set consists of Peterson-Gorenstein-Zierleralgorithm, Berlekamp-Massey algorithm, Sugiyama algorithm, Guruswami-Sudan algorithm. Hard-decision algorithms which include Peterson-Gorenstein-Zierler algorithm, Berlekamp-Massey algorithm, Sugiyama algorithm, Guruswami-Sudan algorithm are popular methods for decoding Reed-Solomon words [26]and Koetter-Vardy algorithm is a popular soft-decision algorithm [21]. Thatwas the criterion to complete the set. There is created list of criteria underwhich algorithms and decoders will be compared. Implementation is donein C++ programming language. First are implemented basic mathematicalfunctions which include arithmetic of Galois field, arithmetic of polynomials,functions needed for operations with matrices and vectors. After this step,implementation of selected decoding algorithms is done. To provide usefulinformation how algorithms work in software, simulator is created. Simula-tor allows to define Galois fields of characteristic 2 and of chosen exstension,create Reed-Solomon code of given number of information words and con-trol words, choose number of random selected errors. The other advantageof simulator is that it can be used to validate correctness of implementedalgorithms. Simulator may gather information like time of decoding of re-ceived word, how much memory was used during decoding process, whetherreceived word was correctly decoded. Implementation of decoding algorithmsin hardware is preceded by design of decoder. The most popular decoding al-gorithms used in hardware employ error locator polynomials to compute theresult of decoding [27]. Peterson-Gorenstein-Zierler algorithm, Berlekamp-Massey algorithm, Sugiyama algorithm use error locator polynomials duringdecoding operation. There must be chosen which electronic elements canbe used and how to solve construction of decoder. Implementation is donein VHDL language. Correctness of developed algorithms is checked in ISimsimulator which provides valuable information about time of decoding, resultof decoding. Evaluation of decoding algorithms is mainly based on resultsdelivered in simulation process conducted in software and information gath-ered from simulator ISim.Independent variables of experiment are:

• length of codeword,

9

Page 13: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• number of control elements,• number of occured errors,• noise in the communication channel,• number of threads.

Dependent variables are:

• time of decoding,• memory required,• status of decoding (no errors, corrected, not correctable),• quality of decoding (correctness of decoding, number of results in list

decoding),• complexity of decoder (number of executed loops, number of electronic

elements in circuit).

To evaluate scalability of algorithms, independent variables of experimentare manipulated. Algorithms’ processing may (but not must) vary with dif-ferent values of number of errors, length of codeword, number of controlelements etc. Threads may be used to lessen processing time of decoding.Number of control elements and length of codeword may affect complexityof hardware decoder, because mostly of length of registers. As a result ofexperiment there will be given an answer how these independent variablesaffect dependent variables. Simulator is used to provide information aboutprocessing of algorithms. Gathered data will be evaluated in relation toscalability and complexity.

Threats to internal validity:

• implementation of algorithms is affected by programming skills of pro-grammer, so the theoretical decoding process may be different thanreal life decoding process. That’s why there is not compared exacttime of decoding between different algorithms, but complexity - howworking of algorithms is affected by independent variables.

• there can occur confounding variables during testing, for example ex-changing content of cache memory can affect working of big data struc-tures, while it is not problem for small data structures.

Threats to external validity:

• there is evaluated set of Reed-Solomon codes, but not all codes areincluded in this set, because there is no time to evaluate them all.Codes to evaluate are chosen so, that there are representatives fromReed-Solomon codes of length 7, 15, 31, 63. Using longer codes takestoo much time to evaluate them.

• algorithms are implemented on x86 machine and they use specific fea-tures of this hardware. However, there are no tested on other machines,whose features may affect decoding process.

10

Page 14: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• disrupting of received vector from communication channel is occuredby noise. The method used for noise generation is designed by authorof master thesis. However there are some “standard” channel mod-els like AWGN (Additive White Gaussian Noise) etc., where decodingalgorithm can work differently.

11

Page 15: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

2. Galois fields2.1 Introduction

Reed-Solomon codes use as code symbols elements from extended fieldswhich are also known as extended Galois fields [9]. Galois field is a finiteset of elements with defined operations of addition and multiplication, whichhas following properties:

• result of adding or multiplying two elements in Galois field is an elementin the same Galois field,

• identity element of addition is 0, each element in Galois field has ad-ditive inverse,

• identity element of multiplication is 1, each element in Galois field hasmultiplicative inverse,

• addition and multiplication are commutative and associative,• multiplication distributes over addition.

Galois field which consists of q elements is denoted as GF (q). Number ofelements of GF (q) is pm, where p is a prime number which is called charac-teristic of field, and m is called extension order. Field A is extension of fieldB, if field B is a subfield of field A. Subfield of field A is field B, if eachelement of field B lies in the field A and properties of the field B are satisfiedfor operations of addition and multiplication which come from field A.

Following set describes elements in GF (q):

0, α0, α1, . . . , αq−2 ≡ 0, 1, α, . . . , αq−2

Element α in GF (pm) is the root of primitive polynomial w(x) of degreem with coefficients from field GF (p). A primitve polynomial w(x) is irre-ducible and divides polynomial xn+1, where n = pm−1, and does not divideany polynomial xz + 1, where z < n. Polynomial w(x) of degree m is irre-ducible, if it is not divided by any polynomial of degree z, where 0 < z < m.Roots of polynomial w(x) of degree m with coefficients from GF (p) are allprimitive elements of GF (pm). Primitive elements of GF (pm) are definedas elements, which has multiplicative order equal to pm − 1. Multiplicativeorder of element αi is such natural number r, which satisfies (αi)r = 1 for0 ≤ i ≤ q − 2. Reciprocal polynomials of primitive polynomials are alsoprimitive polynomials. Reciprocal polynomial for polynomial w(x) of degreem satisfies:

w∗(x) = xm

w0w( 1

x)

12

Page 16: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

If reciprocal polynomial is identical to original polynomial, then such poly-nomial is called self-reciprocal.

2.2 Representation of elements in GF (2m)

Reed-Solomon codes are often based on Galois field of characteristic 2, be-cause elements in GF (2m) can be expressed as binary vectors, and arithmeticunits for binary elements in GF (2) can be used.

2.2.1 Polynomial representation

Elements in GF (2m) can be expressed as [9]:

αi → R(αi)(x) = xi mod p(x) ,

where p(x) is primitive polynomial over GF (2m). Element αi in GF (2m) canbe expressed as m-dimensional vector of binary coefficients of polynomial

R(αi)(x)→ (R(αi)0 , R

(αi)1 , . . . , R

(αi)m−2, R

(αi)m−1). This method is often used in dig-

ital technology. Element 0→ R(0)(x) is represented as m-dimensional vectorfilled with zeroes.

Addition

Adding two elements in GF (2m) in polynomial representation can be donewith XOR function:

αi + αj →m−1∑n=0

(R(αi)n ⊕R(αj)

n )xn

Furthermore:

0 + αi = αi + 0 = αi

Choice of primitive polynomial affects addition operations GF (2m).

Example 2.1.Field GF (8) can be created by primitive polynomials:p1(x) = x3 + x+ 1 and p2(x) = x3 + x2 + 1. Polynomial p2(x) is reciprocalpolynomial of p1(x). For field created by p1(x) is true that α3 = α + 1, andfor field created by p2(x) is true that α3 = α2 + 1.

13

Page 17: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Subtraction

Subtraction is equivalent to addition in fields of characterstic 2.

αi + αj = αi − αj

Multiplication

Multiplication of two elements in GF (2m) for polynomial representationis done as follows:

Furthermore, true is that:

0 · αi = αi · 0 = 0

Division

Division of two elements in GF (2m) for polynomial representation is doneas follows:

αi

αj→ αi · α−j

Additive inverse

Each element in GF (2m) is also own additive inverse:

αi = −αi

Multiplicative inverse

In GF (2m) multiplicative inverse can be expressed as:

α−i =

α2m−1−i for 1 ≤ i ≤ 2m − 2,

1 for i = 0.

Element 0 doesn’t have multiplicative inverse.

2.2.2 Positive integer representation

Elements in GF (2m) can be expressed as [9]:

αi → N (αi) = logα(αi) + 1 = i+ 1

Element 0 is express as N (0) = 0.

14

Page 18: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Addition

Addition of two elements in GF (2m) in positive integer representation isas follows:

αi + αj →

(N (αj) + Z(N (αi) −N (αj))− 1) mod (2m − 1) + 1 for i > j,

0 for i = j.

Z(N (αi)) denotes Zech logarithm for element αi.Furthermore, true is that:

0 + αi = αi + 0 = αi

Multiplication

Multiplication of two elements in GF (2m) in positive integer representa-tion is as follows:

αi · αj → (N (αi) +N (αj) − 2) mod (2m − 1) + 1

Furthermore, true is that:

0 · αi = αi · 0 = 0

Principles for subtraction, division, additive inverse and multiplicativeinverse are the same as for polynomial representation.

2.2.3 Vector representation

There is given following primitive polynomial: Dany jest wielomian pier-wotny

p(x) = pmxm + pm−1x

m−1 + . . .+ p1x+ p0,

which can be used for creation of GF (2m). With this primitive polynomialgenerated is periodic sequence, which can be used for representation of ele-ments in GF (2m) [9]. Equation for j+m’s element sj+m of periodic sequenceis as follows:

sj+m = sj+m−1pj+m−1 + sj+m−2pj+m−2 + . . .+ sjpj

At the beginning of algorithm there must be stated which element ini-tializes sequence. During writing this master thesis, following elements wereused:s0 = 1, s1 = 0, s2 = 0, . . . , sm−1 = 0.

Representation of elements in GF (2m) is as follows:

15

Page 19: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• element 0 is denoted as m-dimensional vector of zeroes – (0, 0, . . . , 0)︸ ︷︷ ︸m

,

• element αi for 0 ≤ i ≤ 2m − 2 is denoted as following vector –(si, si+1, si+2, . . . , si+m−1).

Addition in vector representation is done the same as for polynomialrepresentation, but method for multiplication for polynomial representationcannot be used for vector representation.

2.3 Zech logarithms

Zech logarithms can be used for addition of elements in GF (2m) in loga-rithmic domain [9]. Zech logarithm is defined as:

αZ(x) = 1 + αx Z(x) = logα(1 + αx)

Addition of two elements in GF (2m) can be done as follows:

αi + αj = αi(1 + αj−i) = αiαZ(j−i) = αi+Z(j−i)

For GF (2m) it is assumed that Z(0) = −∞ and Z(−∞) = 0.For GF (2m) it is true that:

(Z(x)− x)2i mod (2m − 1) = Z((2m − 1− x)2i mod (2m − 1)) (2.1)

Z(x)2i mod (2m − 1) = Z(2ix mod (2m − 1)) (2.2)

Using equations 2.1 and 2.2 there can be created table of Zech logarithms.

Example 2.2.There will be computed table of Zech logarithms for field GF (8) created bypolynomial p(x) = x3 + x+ 1. It is true that:

α3 = α + 1 and αZ(x) = αx + 1,

so Z(1) = 3. Using equations 2.1 i 2.2 and assigning m = 3, x = 1, there canbe computed next Zech logarithms.Equation 2.1:

dla i = 0 (Z(1)− 1)20 mod (23 − 1) = Z((23 − 1− 1)20 mod (23 − 1))

(3− 1)1 mod 7 = Z(6 · 1 mod 7)

2 mod 7 = Z(6 mod 7)

2 = Z(6)

16

Page 20: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

dla i = 1 (Z(1)− 1)21 mod (23 − 1) = Z((23 − 1− 1)21 mod (23 − 1))

(3− 1)2 mod 7 = Z(6 · 2 mod 7)

4 mod 7 = Z(12 mod 7)

4 = Z(5)

dla i = 2 (Z(1)− 1)22 mod (23 − 1) = Z((23 − 1− 1)22 mod (23 − 1))

(3− 1)4 mod 7 = Z(6 · 4 mod 7)

8 mod 7 = Z(24 mod 7)

1 = Z(3)

Equation 2.2:

dla i = 1 Z(1)21 mod (23 − 1) = Z(21 · 1 mod (23 − 1))

3 · 2 mod 7 = Z(2 mod 7)

6 = Z(2)

dla i = 2 Z(1)22 mod (23 − 1) = Z(22 · 1 mod (23 − 1))

3 · 4 mod 7 = Z(4 mod 7)

5 = Z(4)

Z(−∞) = 0 Z(0) = −∞ Z(1) = 3 Z(2) = 6Z(3) = 1 Z(4) = 5 Z(5) = 4 Z(6) = 2

2.3.1 Imamura algorithm

Imamura algorithm is an iterative algorithm for computing Zech loga-rithms, which can be easily implemented programmatically [16].

Imamura algorithm is as follows (logα(0) doesn’t exist and is denoted aslimx→0

logα x = −∞):

1. Each element ofGF (2m) express as polynomialR(i)(x), where i ∈ 0, 1, α, . . . , α2m−2.

17

Page 21: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

+ 0 1 α α2 α3 α4 α5 α6

0 0 1 α α2 α3 α4 α5 α6

1 1 0 α3 α6 α α5 α4 α2

α α α3 0 α4 1 α2 α6 α5

α2 α2 α6 α4 0 α5 α α3 1

α3 α3 α 1 α5 0 α6 α2 α4

α4 α4 α5 α2 α α6 0 1 α3

α5 α5 α4 α6 α3 α2 1 0 α

α6 α6 α2 α5 1 α4 α3 α 0

Table 2.1: Addition table for elements in GF (8) created by polynomialp(x) = x3 + x+ 1.

2. For each polynomial R(i)(x) compute N(logα(i)) = R(i)(2) in the fieldof integer numbers.

3. Assign:

N(Z(logα(i))) =

N(logα(i))− 1 for N(logα(i)) odd,

N(logα(i)) + 1 for N(logα(i)) even.

4. With values N(logα(i)) and N(Z(logα(i))), find Z(logα(i)).

Example 2.3.Example of calculation of Zech logarithms for field GF (8) created by poly-nomial p(x) = x3 + x+ 1:

logα(i) i R(i)(x) N(logα(i)) N(Z(logα(i))) Z(logα(i))−∞ 0 0 0 1 0

0 1 1 1 0 −∞1 α x 2 3 32 α2 x2 4 5 63 α3 x+ 1 3 2 14 α4 x2 + x 6 7 55 α5 x2 + x+ 1 7 6 46 α6 x2 + 1 5 4 2

Results are the same as for example 2.2.

18

Page 22: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

· 0 1 α α2 α3 α4 α5 α6

0 0 0 0 0 0 0 0 0

1 0 1 α α2 α3 α4 α5 α6

α 0 α α2 α3 α4 α5 α6 1

α2 0 α2 α3 α4 α5 α6 1 α

α3 0 α3 α4 α5 α6 1 α α2

α4 0 α4 α5 α6 1 α α2 α3

α5 0 α5 α6 1 α α2 α3 α4

α6 0 α6 1 α α2 α3 α4 α5

Table 2.2: Multiplication table for elements in GF (8) created bypolynomial p(x) = x3 + x+ 1.

+ 0 1 . . . α2m−3 α2m−2

0 0 1 . . . α2m−3 α2m−2

1 1 0 . . .α2m−3

+1

α2m−2

+1

......

... 0 ......

α2m−3 α2m−31+

α2m−3. . . 0

α2m−2

+α2m−3

α2m−2 α2m−21+

α2m−2. . .

α2m−3

+α2m−2

0

Table 2.3: Addition table for elements in GF (2m).

19

Page 23: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

· 0 1 . . . α2m−3 α2m−2

0 0 0 0 0 0

1 0 1 . . . α2m−3 α2m−2

... 0 .... . .

......

α2m−3 0 α2m−3 . . .α2m−3

·α2m−3

α2m−2

·α2m−3

α2m−2 0 α2m−2 . . .α2m−3

·α2m−2

α2m−2

·α2m−2

Table 2.4: Multiplication table for elements in GF (2m).

2.4 LUT tables

2.4.1 Addition

Addition table for elements in GF (2m) is shown in table 2.3.Looking at addition table, it can be noticed that:

• if one of element in addition is 0, then the result of addition will be thesecond element, so from table there can be excluded 2 ·2m−1 elements(results of operations, where one of components is 0),

• if added are the same elements, then result will be 0, so from tablethere can be excluded 2m elements (diagonal of zero elements),

• table is symmetric for diagonal of zeroes, so there can be excluded 22m

2−

2m

2elements (half of all elements minus half of elements on diagonal of

zeroes)/

Elements, which can be excluded are marked with orange colour in ta-ble 2.3. After calculation, there must be stored following number of elementsin addition LUT:

NLUT+ = 22m−1 − 3 · 2m−1 + 1

20

Page 24: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Addition algorithm with use of LUT table is as follows:

1. Return 0, if added are the same elements, else continue.2. If one component in addition is 0, then return second component, else

continue.3. For αi + αj and i > j, return value from cell [αi][αj], where first

parameter is number of column of LUT table, and second parameteris number of row in LUT table, else for i < j return result from cell[αj][αi].

2.4.2 Multiplication

Multiplication table for elements in GF (2m) is shown in table 2.4. Simi-larly like in addition table, multiplication table is symmetric.

There can be noticed following properties of multiplication table:

• if one of components in multiplication is zero, then result will be alsozero, so from table can be excluded 2 · 2m − 1 elements ( results ofoperations, where one of components is 0),

• if one of components is 1, then result will be second component, sofrom table can be excluded 2 · 2m − 1 elements (result of operations,where one of components is 1),

• table is symmetric for diagonal of products of the same elements, sofrom table can be excluded 22m

2− 2m

2elements (half of all elements

minus half of elements on diagonal of results of the same elements).

Elements which can be excluded from table are marked with orange colourin table 2.4. After calculcation, number of elements which must be stored inLUT table is as follows:

NLUT · = 22m−1 − 3 · 2m−1 + 1

Multiplication algorithm with use of LUT table is as follows:

1. Return element 0, if one of multiplication components is 0, else conit-nue.

2. If one of multiplication components is 1, then return second compo-nent, else continue.

3. For αi + αj and i ≥ j, return result from cell [αi][αj], where firstparameter is number of column in LUT, and second parameter isnumber of row in LUT, else for i < j return result from cell [αj][αi].

Exemplary addition and multiplication tables for GF (8) created by poly-nomial p(x) = x3 + x+ 1 are presented respectively in table 2.1 and 2.2.

21

Page 25: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

3. Reed-Solomon code3.1 Introduction

Reed-Solomon code is error-correction code [9] [1] [12] [14]. Error-correctionis such code, which can be used for error correction. Furthermore, Reed-Solomon code is:

• linear code, where result of linear combination of any two codewordsis codeword,

• cyclic code, where result of cyclic shift of codeword is codeword,• block code, where data sequence is divided into blocks of fixed lengths

and these blocks are coded independently,• nonbinary code, where code symbols are not binary - 1 nor 0.

Codeword is ordered set of code symbols and belongs to code. Codesymbols are elements in GF (q), which are used to code construction.

Reed-Solomon, where codeword is of length n elements and encodes kinformation elements, is denoted as RS(n, k). Code RS(n, k) has followingproperties:

• codeword consists of n code symbols,• codeword encodes k information elements,• number of redundant control elements is r = n− k,• code has correction capability equals to t = b r

2c,

• minimal Hamming distance is dmin = r + 1.

Code can correct all error patterns, where number of errors is less orequal error capability t. Minimal Hamming distance dmin determines minimalnumber of positions, where two vectors are different. If code is created overGF (2m), then code is of form RS(2m− 1, 2m− 1− 2t). Reed-Solomon codessatifies Singleton bound with equality– dmin ≤ n− k + 1, which means, thathas the best error-correction capability with given n and given informationelements k [6]. Codes which satisfy Singleton bound with equality are calledMDS codes - Maximum Distance Separable.

3.2 Encoding

Encoding is process of transformation information elements into code-word. There are presented two methods for creation of Reed-Solomon code-word.

22

Page 26: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

3.2.1 Original method

Given are information elements mi ∈ GF (2m) for 0 ≤ i ≤ k − 1, whichare used for codeword construction [1] [7]. Given is polynomial:

m(x) = mk−1xk−1 +mk−2x

k−2 + . . .+m1x+m0 (3.1)

Given is set of different non-zero elements in GF (q) which is called supportset [7]:

(α1, α2, . . . , αn)

Codeword of RS(n, k) code can be expressed as:

c = (m(α1),m(α2), . . . ,m(αn))

During work on master thesis, used support set was:

(1, α, α2, . . . , αn−1) (3.2)

Codeword of RS(n, k) code created with support set (3.2) can be expressedas:

c = (m(1),m(α), . . . ,m(αn−1)) (3.3)

or

c(x) = m(αn−1)xn−1 +m(αn−2)xn−2 + . . .+m(α)x+m(1) (3.4)

For codeword of RS(n, k) code created with support set (3.2) satisfied isthat:

c(α) = c(α2) = . . . = c(α2t) = 0

Equation for Galois Field Fourier Transform for polynomial f(x) of degreen− 1 is as follows [8]:

F (x) = GFFT (f(x)) = f(1) + f(α)x+ f(α2)x2 + . . .+ f(αn−1)xn−1

With use of this equation, there can be shown for codeword c(x) ofRS(n, k) code created with support set (3.2) that 2t next coefficients areequal to zero. Codeword c(x) is in encoded in time domain, and C(x) isencoded in frequency domain [14].

Example 3.1.Given is following vector of information elements:

m = (α, α2, 1)→ m(x) = α + α2x+ x2

23

Page 27: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Codeword c of RS(7, 3) code for this vector is as follows:

c = (m(1),m(α),m(α2),m(α3),m(α4),m(α5),m(α6))

= (α5, α6, α, 0, α6, 0, α5)

Codewordc→ c(x) = α5 + α6x+ αx2 + α6x4 + α5x6

transformed with Galois Field Fourier Transform is as follows:

C = (c(1), c(α), c(α2), c(α3), c(α4), c(α5), c(α6))

= (α, 0, 0, 0, 0, 1, α2)

Consecutive 2t positions in C are zeroes.

3.2.2 RS code as nonbinary BCH code

Reed-Solomon codes can be seen as nonbinary BCH codes [10] [9]. Forconstruction of codeword of RS(n, k) code can be used following generatorpolynomial:

g(x) = (x− α)(x− α2) . . . (x− α2t) where αi ∈ GF (n+ 1)

Given is information polynomial m(x) 3.1. Codeword of nonsystematiccode RS(n, k) is as follows:

c(x) = m(x)g(x)

Codeword of systematic RS(n, k) code is as follows:

c(x) = m(x)x2t +Q(x) where Q(x) = m(x)x2t mod g(x)

RS(n, k) code can be created with use of original method and as nonbi-nary BCH code. Both of there codes satisfy [8]:

• code created with both definitions creates the same linear space,• code created with both definitions is cyclic,• for codeword created by both definitions satisfied isc(α1) = c(α2) = . . . = c(α2t) = 0 for some 2t consecutive elements inGF (q).

24

Page 28: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4. Decoding algorithms4.1 Introduction

Decoding is a process of transformation of received vector from commu-nication channel onto sequence of information elements which were used tocreate codeword. It may happen that received vector is not codeword, be-cause codeword was corrupted in communication channel. In this case codecan correct number of errors up to value of error correction capability. Ifdecoder is not able to correct received vector and such situation can be rec-ognized then it is called decoder failure [15]. If there occured so many errorsthat received vector is decoded onto different codeword than original, thensuch situation is called decoder error.

4.1.1 Complete decoder

Complete decoder works as follows [12]:

1. Compute Hamming distance between received vector and each code-word of RS(n, k) code,

2. Choose codeword, where value of Hamming distance was least.

Complete decoder is impractical, because there are qk of codewords ofRS(n, k) code and it would take much time to find result.

4.1.2 Standard array

Standard array is such matrix of RS(n, k) which consists of qk columnsand qn−k rows [10]. In first rows there are written all qk codewords of RS(n, k)code, and in last rows vectors which are close to them within Hammingdistance. Decoding is a process of finding received vector in standard arrayand result of decoding is codeword in first row of the same column wherereceived vector was found. This method is also impractical, because theremust be stored qn vectors, which may be huge number.

4.1.3 Syndrome decoding

RS(n, k) code is a k-dimensional subspace of n-dimensional space. It isconnected with two following matrices [10] [9]:

• generator matrix G, which consists of k linear independent vectors,which are used to create codeword – c = mG, where m denotes k-dimensional vector of information elements,

25

Page 29: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• parity check matrix H, which is used to decode received vector.

Parity check matrix is used to compute syndromes. Syndrome s is com-puted as follows:

s = rHT ,

where r denotes received vector, and HT is transpozed matrix H. If receivedvector is codeword, then syndrome is zero-value vector – s = cHT = 0, elsethere are errors, which can be written that to codeword in communicationchannel was added error vector – r = c+ e, where e denotes error vector.

For RS(n, k) code generator matrix is as follows:

G =

g1g2g3...gk

=

1 1 1 . . . 11 α α2 . . . αn−1

1 (α)2 (α2)2 . . . (αn−1)2

......

... . . ....

1 (α)k−1 (α2)k−1 . . . (αn−1)k−1

Codeword for information elements m = (m1, . . . ,mk) can be expressed

as:c = mG = m1g1 +m2g2 + . . .+mkgk

Example 4.1.Given is RS(7, 3) code created in GF (8) by polynomial p(x) = x3 + x + 1.Generator matrix G is as follows:

G =

1 1 1 1 1 1 11 α α2 α3 α4 α5 α6

1 α2 α4 α6 α α3 α5

For m = (α, α2, 1):

c = mG = (α, α2, 1)

1 1 1 1 1 1 11 α α2 α3 α4 α5 α6

1 α2 α4 α6 α α3 α5

= (α, α, α, α, α, α, α) + (α2, α3, α4, α5, α6, 1, α) + (1, α2, α4, α6, α, α3, α5)

= (α5, α6, α, 0, α6, 0, α5)

Construction of codeword with matrix G gives the same results as to useoriginal method. Let m→ m(x):

(α, α2, 1)→ α + α2x+ x2

26

Page 30: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Using original method of encoding 3.3:

c = (m(1),m(α),m(α2),m(α3),m(α4),m(α5),m(α6))

= (α5, α6, α, 0, α6, 0, α5)

Parity check matrix for RS(n, k) code is as follows:

H =

1 α α2 . . . αn−1

1 (α)2 (α2)2 . . . (αn−1)2

1 (α)3 (α2)3 . . . (αn−1)3

......

... . . ....

1 (α)2t (α2)2t . . . (αn−1)2t

Let received vector be r = (r0, r1, r2, . . . , rn−1):

s = rHT = (r0, r1, r2, . . . , rn−1)

1 α α2 . . . αn−1

1 (α)2 (α2)2 . . . (αn−1)2

1 (α)3 (α2)3 . . . (αn−1)3

......

... . . ....

1 (α)2t (α2)2t . . . (αn−1)2t

T

= (r0, r1, r2, . . . , rn−1)

1 1 1 . . . 1α (α)2 (α)3 . . . (α)2t

α2 (α2)2 (α2)3 . . . (α2)2t

......

... . . ....

αn−1 (αn−1)2 (αn−1)3 . . . (αn−1)2t

= (r0, r0, r0, . . . , r0) + (r1α, r1(α)2, r1(α)3, . . . , r1(α)2t) + . . .

+(rn−1αn−1, rn−1(α

n−1)2, rn−1(αn−1)3, . . . , rn−1(α

n−1)2t)

= (r0 + r1α + r2α2 + . . .+ rn−1α

n−1,

r0 + r1(α)2 + r2(α2)2 + . . .+ rn−1(α

n−1)2, . . . ,

r0 + r1(α)2t + r2(α2)2t + . . .+ rn−1(α

n−1)2t)

= (n−1∑i=0

riαi,

n−1∑i=0

ri(αi)2, . . . ,

n−1∑i=0

ri(αi)2t)

= (n−1∑i=0

riαi,

n−1∑i=0

ri(α2)i, . . . ,

n−1∑i=0

ri(α2t)i)

It can be noticed, that computing particular syndrome elements is com-puting value of polynomial r(x), where

r(x) = rn−1xn−1 + rn−2x

n−2 + . . .+ r1x+ r0

27

Page 31: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For RS(n, k) code, where roots of generator polynomial g(x) are consec-utive 2t elements α, α2, . . . , α2t, it is true that:

s = (r(α), r(α2), . . . , r(α2t)) (4.1)

Particular elements of syndrome vector are:

s1 = r(α)

s2 = r(α2)

. . .

s2t = r(α2t)

Example 4.2.Parity check matrix for RS(7, 3) code:

H =

1 α α2 α3 α4 α5 α6

1 α2 α4 α6 α α3 α5

1 α3 α6 α2 α5 α α4

1 α4 α α5 α2 α6 α3

It can be written that:

s = rHT = (c+ e)HT = cHT + eHT = 0 + eHT = eHT

Syndrome is then dependent only from error vector, which means, thatthere can be created array, where syndrome vectors are assigned to error pat-terns. Such array has 2 columns and qn−k rows for RS(n, k) code in GF (q).Decoding is a process of computing syndrome and then finding error patternin array which is assigned to computed syndrome. When error pattern isfound, then it is added to received vector. This method is still impractical,because size of such array may be huge.

Example 4.3.There are given three codewords of RS(7, 3) code created over GF (8) withgenerator polynomial p(x) = x3 + x+ 1:

• c1(x) = x6 + α5x5 + α2x4 + αx2 + α3x+ α4,• c2(x) = x6 + α2x5 + αx4 + α4x3 + α5x2 + α3,• c3(x) = α5x6 + α6x4 + αx2 + α6x+ α5.

All three vectors are results of decoding information vector m = (α, α2, 1)with three methods: as nonsystematic BCH code, as systematic BCH code,with original method. All three vectors lies in the same linear space ofRS(7, 3) code. Let error vector be e(x) = αx6 → e = (0, 0, 0, 0, 0, 0, α).Received vectors are as follows:

28

Page 32: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Error pattern e Syndrome vector s(0, 0, 0, 0, 0, 0, 0) (0, 0, 0, 0)(0, 0, 0, 0, 0, 0, 1) (α6, α5, α4, α3)(0, 0, 0, 0, 0, 0, α) (1, α6, α5, α4)(0, 0, 0, 0, 0, 0, α2) (α, 1, α6, α5). . . . . .(0, 0, 0, 0, 0, 1, 0) (α5, α3, α, α6)(0, 0, 0, 0, 0, α, 0) (α6, α4, α2, 1). . . . . .(0, 0, 0, 0, 0, 1, 1) (α, α2, α2, α4)(0, 0, 0, 0, 0, α, 1) (0, 1, α, α). . . . . .

Table 4.1: Fragment of syndrome array for RS(7, 3) code.

• r1(x) = c1(x) + e(x) = α3x6 + α5x5 + α2x4 + αx2 + α3x+ α4,• r2(x) = c2(x) + e(x) = α3x6 + α2x5 + αx4 + α4x3 + α5x2 + α3,• r3(x) = c3(x) + e(x) = α6x6 + α6x4 + αx2 + α6x+ α5.

Syndrome vector s = (s1, s2, s3, s4) for these received vector is as follows

• s1 = r1(α) = r2(α) = r3(α) = 1,• s2 = r1(α

2) = r2(α2) = r3(α

2) = α6,• s3 = r1(α

3) = r2(α3) = r3(α

3) = α5,• s4 = r1(α

4) = r2(α4) = r3(α

4) = α4.

Values of syndrome vectors for these three received vectors are the same.Syndrome vector for received vector is s = (1, α6, α5, α4). Fragment of syn-drome array for RS(7, 3) code is shown in table 4.1. For syndrome vectors = (1, α6, α5, α4) there is assigned error pattern e = (0, 0, 0, 0, 0, 0, α). Re-ceived vectors are corrected by adding error pattern to received vector.

4.1.4 Decoding of cyclic code

Generator matrix for cyclic code is as follows [10] [9]:

G =

g(x)xg(x)x2g(x)

...xk−1g(x)

=

g0 g1 . . . g2t 0 0 0 . . . 00 g0 g1 . . . g2t 0 0 . . . 00 0 g0 g1 . . . g2t 0 . . . 0...

......

......

......

......

0 . . . 0 0 0 g0 g1 . . . g2t

29

Page 33: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Example 4.4.For RS(7, 3) code over GF (8) created by p(x) = x3 + x + 1, there is givenfollowing generator polynomial:

g(x) = (x− α)(x− α2)(x− α3)(x− α4) = x4 + α3x3 + x2 + αx+ α3

G =

α3 α 1 α3 1 0 00 α3 α 1 α3 1 00 0 α3 α 1 α3 1

Let information vector be m = (α, α2, 1). Code for this vector is:

c = mG = (α, α2, 1)

α3 α 1 α3 1 0 00 α3 α 1 α3 1 00 0 α3 α 1 α3 1

= (α4, α2, α, α4, α, 0, 0) + (0, α5, α3, α2, α5, α2, 0) + (0, 0, α3, α, 1, α3, 1)

= (α4, α3, α, 0, α2, α5, 1)

Vector m = (α, α2, 1) can be written as polynomial m(x) = α+α2x+x2.Codeword can be created as follows:

c(x) = m(x)g(x) = (x2 + α2x+ α)(x4 + α3x3 + x2 + αx+ α3)

= x6 + α5x5 + α2x4 + αx2 + α3x+ α4

Results of both methods are the same.

Systematic code can be created, if generator matrix G will be of suchform that in the right part there will be identity matrix.

Example 4.5.To generate generator matrix of systematic code RS(7, 3) is used matrix Gfrom example 4.4. This matrix can be transform into such matrix:

G′ =

α3 α 1 α3 1 0 0α6 α6 1 α2 0 1 0α5 α4 1 α4 0 0 1

Let information vector be m = (α, α2, 1). Codeword for this vector is:

c = mG′ = (α, α2, 1)

α3 α 1 α3 1 0 0α6 α6 1 α2 0 1 0α5 α4 1 α4 0 0 1

= (α4, α2, α, α4, α, 0, 0) + (α, α, α2, α4, 0, α2, 0) + (α5, α4, 1, α4, 0, 0, 1)

= (α3, 0, α5, α4, α, α2, 1)

30

Page 34: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For the same vector m → m(x) = α + α2x + x2, codeword can be alsocreated as follows:

c(x) = m(x)x2t +Q(x) gdzie Q(x) = m(x)x2t mod g(x)

Q(x) = m(x)x4 mod g(x)

= (x6 + α2x5 + αx4) mod (x4 + α3x3 + x2 + αx+ α3)

= α4x3 + α5x2 + α3

c(x) = m(x)x4 +Q(x) = (x6 + α2x5 + αx4) + (α4x3 + α5x2 + α3)

= x6 + α2x5 + αx4 + α4x3 + α5x2 + α3

Results of both methods are the same.

Generator polynomial of cyclic RS(n, k) code divides polynomial xn + 1.To create parity check matrix H, there must be computed polynomial h(x)of form:

h(x) =xn + 1

g(x)

Parity check matrix for RS(n, k) code is as follows:

H =

hk hk−1 . . . h0 0 0 . . . 00 hk hk−1 . . . h0 0 . . . 0...

......

......

......

...0 . . . 0 0 hk hk−1 . . . h0

(4.2)

It is true that:cHT = 0

Example 4.6.For RS(7, 3) code, where g(x) = x4 + α3x3 + x2 + αx+ α3:

h(x) =x7 + 1

x4 + α3x3 + x2 + αx+ α3= x3 + α3x2 + α2x+ α4

Parity check matrix for RS(7, 3) code is of form:

H =

1 α3 α2 α4 0 0 00 1 α3 α2 α4 0 00 0 1 α3 α2 α4 00 0 0 1 α3 α2 α4

(4.3)

31

Page 35: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Parity check matrix 4.2 can be of such form, that in the left part is placedidentity matrix.

H ′ =

1 0 0 . . . 0 h′k−1 . . . h′00 1 0 . . . 0 h′′k−1 . . . h′′0...

......

......

......

...0 . . . 0 0 1 h′′′k−1 . . . h′′′0

(4.4)

Zachodzi:cH ′T = 0

Using parity check matrix in this form, there can be generated syndroms,which will be also self error patterns. The constraint is so, that errors mustbe located on positions r0, r1, . . . , rn−k−1 of received vector r. Furthermore,there cannot be more errors than error correction capability of code.

Example 4.7.Parity check matrix 4.3 for RS(7, 3) code after some transformations can bewritten as:

H ′ =

1 0 0 0 α3 α6 α5

0 1 0 0 α α6 α4

0 0 1 0 1 1 10 0 0 1 α3 α2 α4

Given is following received vector:

r(x) = c(x) + e(x) = (x6 + α5x5 + α2x4 + αx2 + α3x+ α4) + (x3 + α3x2)

= x6 + α5x5 + α2x4 + x3 + x2 + α3x+ α4

Using parity check matrix, there can be computed syndrome vector:

s′ = rH ′T = (α4, α3, 1, 1, α2, α5, 1)

1 0 0 00 1 0 00 0 1 00 0 0 1α3 α 1 α3

α6 α6 1 α2

α5 α4 1 α4

= (α4, 0, 0, 0) + (0, α3, 0, 0) + (0, 0, 1, 0) + (0, 0, 0, 1)

+(α5, α3, α2, α5) + (α4, α4, α5, 1) + (α5, α4, 1, α4) = (0, 0, α3, 1)

32

Page 36: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Syndrome in polynomial form s′ = (0, 0, α3, 1)→ s′(x) = x3 +α3x2 is thesame as error vector e(x). Received vector can be corrected as follows:

c(x) = r(x)− e(x) = r(x)− s′(x)

= (x6 + α5x5 + α2x4 + x3 + x2 + α3x+ α4)− (x3 + α3x2)

= x6 + α5x5 + α2x4 + αx2 + α3x+ α4

For cyclic codes it is true that:

m(x)g(x) + s′(x) = r(x)

s′(x) = r(x) mod g(x)

It is also true that:

r(x) = c(x) + e(x) and r(x) = c(x) + s′(x)

e(x) = r(x) mod g(x)

From above equations it can be noticed that e(x) = s′(x). It is true whenerrors are on positions r0, r1, . . . , rn−k−1 of received vector r.

Decoding algorithm for cyclic codes:

1. Let i = 0 and i denotes number of shift of received vector in leftdirection.

2. Let ri(x) denotes received vector r(x) and shifted i-times in left di-rection. Compute:

s′i(x) = ri(x) mod g(x)

3. Let w(y) denotes value of Hamming weight of vector y. Hammingweight describres number of nonzero elements of vector. Compute:

w = w(s′i(x))

4. If w ≤ t, where t denotes error correction capability of code, thencompute:

ri(x) = ri(x)− s′i(x) ,

then shift ri(x) in right direction i-times and finish. If w > t, thencontinue.

5. If i = k, where k denotes number of control elements of codeword,then finish and signal that not correctable error pattern occured. Ifi < k, then continue.

6. Shift cyclically one time ri(x) in left direction.7. Increase i by 1:

i = i+ 1

8. Return to point 2.

33

Page 37: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4.2 Finding position of errors

Reed-Solomon can be treated as nonbinary BCH code, which means thatcode symbols are nonbinary. During decoding binary codes there is neededone information to correct error, which is error position. These errors can becorrected by adding 1 to value on error position. For nonbinary codes this isa bit more complicated, because except error position, there must be knownerror value also. In this chapter, there are described algorithms for findingerror positions and error values.

4.2.1 Peterson-Gorenstein-Zierler algorithm

Peterson-Gorenstein-Zierler algorithm finds error positions [10] [2] [3].Using definition 4.1, it is true that:

si = r(αi) = c(αi) + e(αi)

For consecutive 2t roots of code generator polynomial, it is true that:

si = c(αi) = 0

Syndrome can be expressed as:

si = e(αi) =n−1∑j=0

ej(αi)j

Error occurs in place, where ej 6= 0, so for number of occured errors v, errorpositions are denoted as k1, k2, . . . , kv:

si =v∑j=1

ekj(αi)kj =

v∑j=1

ekj(αkj)i

Let Xj = αkj . This value is dependent from error positions and is callederror locator:

si =v∑j=1

ekj(Xj)i (4.5)

Consecutive 2t values of syndromes can be expressed as:

s1 = ek1X1 + ek2X2 + . . .+ ekvXv

s2 = ek1X21 + ek2X

22 + . . .+ ekvX

2v

. . .

s2t = ek1X2t1 + ek2X

2t2 + . . .+ ekvX

2tv

34

Page 38: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Let there be a polynomial with roots of multiplicative inverses of Xj.Such polynomial is called error-locator polynomial:

Λ(x) =v∏j=1

(1−Xjx) = Λvxv + Λv−1x

v−1 + . . .+ Λ1x+ Λ0 (4.6)

Looking at definition of error-locator polynomial 4.6, it can be noticedthat Λ0 = 1. kth syndrome can be expressed as [12]:

Λvsk−v + Λv−1sk−v+1 + . . .+ Λ1sk−1 = −sk (4.7)

Example 4.8.For RS(7, 3) code of error-correction capability t = 2, let number of occurederrors be v = t. It is true that Λ0 = 1 and polynomial Λ(x) should be ofdegree 2:

Λ(x) = Λ2x2 + Λ1x+ 1

Using equation 4.7, it can be computed:

dla k = 3 Λ2s3−2 + Λ2−1s3−2+1 = −s3Λ2s1 + Λ1s2 = −s3

dla k = 4 Λ2s4−2 + Λ2−1s4−2+1 = −s4Λ2s2 + Λ1s3 = −s4

Assuming that number of occured errors is v, next v equations 4.7 canbe expressed as:

M (v)Λ(v) =

s1 s2 . . . svs2 s3 . . . sv+1...

......

...sv sv+1 . . . s2v−1

Λv

Λv−1...

Λ1

=

−sv+1

−sv+2...−s2v

(4.8)

If there are known 2t consecutive syndrome values s1, s2, . . . , s2t−1, s2t andit is not true that s1 = s2 = . . . = s2t = 0, then Peterson-Gorenstein-Zierleralgorithm is as follows:

1. Assume that v = t.2. Check if matrix M (v) is singular.

35

Page 39: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• If determinant of matrix M (v) is equal to 0, which means thatdetM (v) = 0, then matrix is singular. In this case decrease valuev by 1, v = v − 1. If v = 0, then finish and signal that notcorrectable error pattern has occured, else return to point 2.

• If determinant of matrix M (v) is not equal to 0, which meansthat detM (v) 6= 0, then matrix is nonsingular and continue.

3. Solve following equation set:Λv

Λv−1...

Λ1

=

−sv+1

−sv+2...−s2v

s1 s2 . . . svs2 s3 . . . sv+1...

......

...sv sv+1 . . . s2v−1

−1

4. The result is error-location polynomial which is:

Λ(x) = Λvxv + Λv−1x

v−1 + . . .+ Λ1x+ 1

Determinant of matrix M (v) can be computed by Laplace expansion. Letthere be a matrix of m rows and columns:

A =

a1,1 a1,2 . . . a1,na2,1 a2,2 . . . a2,n

......

......

am,1 am,2 . . . am,n

Laplace expansion can be expressed as follows:

detA = det

a1,1 a1,2 . . . a1,ma2,1 a2,2 . . . a2,m

......

......

am,1 am,2 . . . am,m

=m∑j=1

ai,jDi,j

Index 1 ≤ i ≤ m denotes number of row of matrix A. Cofactor Di,j ofelement ai,j can be expressed as:

Di,j = (−1)i+j detAi,j,

where Ai,j denotes matrix A od order m − 1 which is result of erasing ithrow and jth column of matrix A [11]. In Galois field of characteristic 2, itcan be reduced that (−1)i+j = 1 for each row i and column j, so cofactorcan be expressed as:

Di,j = detAi,j

36

Page 40: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Equations sets can be computed by Gaussian elimination. Let there be afollowing set of equations:

AX = Ba1,1 a1,2 . . . a1,ma2,1 a2,2 . . . a2,m

......

......

am,1 am,2 . . . am,m

xmxm−1

...x1

=

b1b2...bm

Algorithm of Gaussian elimination is as follows:

1. Move matrix B to the right side of matrix A:a1,1 a1,2 . . . a1,m bma2,1 a2,2 . . . a2,m bm−1

......

......

...am,1 am,2 . . . am,m b1

2. Set variable i = 1.3. Multiply ith row by a−1i,i .4. For 1 ≤ j ≤ m; i 6= j compute rj = aj,iri + rj, where rj denotes jth

row.5. Increase i by 1, i = i+ 1. If i > m then finish, else go to point 3.

The result is following matrix:1 0 . . . 0 xm0 1 . . . 0 xm−1...

......

......

0 0 . . . 1 x1

Example 4.9.For RS(15, 7) code let exemplary codeword be:

c(x) = α6x14 + αx13 + x12 + α2x11 + αx10 + αx9

+α2x8 + α3x7 + α7x6 + α9x5 + α5x4 + α9x3 + x+ α10

Error vector is as follows:

e(x) = αx14 + α2x9 + x4

Received vector is as follows:

r(x) = α11x14 + αx13 + x12 + α2x11 + αx10 + α5x9

+α2x8 + α3x7 + α7x6 + α9x5 + α10x4 + α9x3 + x+ α10

37

Page 41: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

RS(15, 7) code has error correction capability of t = 4. First step of find-ing error position is to compute 2t syndrome values. Roots of code generatorpolynomial are consecutive elements α, α2, . . . , α2t.s1 = r(α) = α6

s2 = r(α2) = α9

s3 = r(α3) = α7

s4 = r(α4) = α3

s5 = r(α5) = α6

s6 = r(α6) = α4

s7 = r(α7) = 1s8 = r(α8) = α3

Next stage is to check if matrix M (v=t=4) is nonsingular:

M (4) =

α6 α9 α7 α3

α9 α7 α3 α6

α7 α3 α6 α4

α3 α6 α4 1

38

Page 42: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

detM (4) = det

α6 α9 α7 α3

α9 α7 α3 α6

α7 α3 α6 α4

α3 α6 α4 1

= α6 det

α7 α3 α6

α3 α6 α4

α6 α4 1

+ α9 det

α9 α3 α6

α7 α6 α4

α3 α4 1

+ α7 det

α9 α7 α6

α7 α3 α4

α3 α6 1

+ α3 det

α9 α7 α3

α7 α3 α6

α3 α6 α4

= α6(α7 det

[α6 α4

α4 1

]+ α3 det

[α3 α4

α6 1

]+ α6 det

[α3 α6

α6 α4

])

+ α9(α9 det

[α6 α4

α4 1

]+ α3 det

[α7 α4

α3 1

]+ α6 det

[α7 α6

α3 α4

])

+ α7(α9 det

[α3 α4

α6 1

]+ α7 det

[α7 α4

α3 1

]+ α6 det

[α7 α3

α3 α6

])

+ α3(α9 det

[α3 α6

α6 α4

]+ α7 det

[α7 α6

α3 α4

]+ α3 det

[α7 α3

α3 α6

])

= α6(α7(α6 + α8) + α3(α3 + α10) + α6(α7 + α12))

+ α9(α9(α6 + α8) + α3(α7 + α7) + α6(α11 + α9))

+ α7(α9(α3 + α10) + α7(α7 + α7) + α6(α13 + α6))

+ α3(α9(α7 + α12) + α7(α11 + α9) + α3(α13 + α6))

= 0

Determinant of matrix M (4) is equal to zero, which means that matrix issingular. Next step is to compute determinant of matrix M (3):

detM (3) = det

α6 α9 α7

α9 α7 α3

α7 α3 α6

= α9

Determinant of matrix M (3) is not equal to zero, which means that matrixis nonsingular. It means also that three errors has occured. There must befollowing set of equations:α6 α9 α7

α9 α7 α3

α7 α3 α6

Λ3

Λ2

Λ1

=

α3

α6

α4

39

Page 43: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Using Gaussian elimination there are computed coefficients of polynomialΛ(x): α6 α9 α7 α3

α9 α7 α3 α6

α7 α3 α6 α4

Variable i = 1, so first row is multiplied by a−1i,i = a−11,1 = α−6 = α9: 1 α3 α α12

α9 α7 α3 α6

α7 α3 α6 α4

To the second row is added first row multiplied by α9, and to the third rowis added first row multiplied by α7.1 α3 α α12

0 α2 α12 00 α12 α14 0

As the result of next steps following matrix is obtained:1 0 0 α12

0 1 0 00 0 1 0

Result of set of equations is Λ3 = α12, Λ2 = 0, Λ1 = 0. The error locatorpolynomial is as follows:

Λ(x) = α12x3 + 1

Roots of this polynomial are x1 = α, x2 = α6, x3 = α11. Error locators areX1 = x−11 = α14, X2 = x−12 = α9, X3 = x−13 = α4. Error locator polynomialcan be expressed as:

Λ(x) = (α14x− 1)(α9x− 1)(α4x− 1)

It means that errors have occured on positions 14, 9 and 4 of received vector.

4.2.2 Berlekamp-Massey algorithm

Berlekamp-Massey algorithm finds error-locator polynomial [10] [14] [4] [5].Using equation 4.7 for some first elements of code of error-correction capa-

40

Page 44: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

α12

α6

α6,α9,α7,α3,α6,α4,1,α3

0 0

α9 α7

Figure 4.1: LFSR generates next syndromes with use of polynomialΛ(x) = α12x3 + 1.

bility of t, it can be expressed for v and v < j ≤ 2t as:

−sv+1 = Λ1sv + Λ2sv−1 + . . .+ Λvs1

−sv+2 = Λ1sv+1 + Λ2sv + . . .+ Λvs2

. . .

−s2t = Λ1s2t−1 + Λ2s2t−2 + . . .+ Λvs2t−v

Example 4.10.Give is RS(15, 7) code of error-correction capability t = 4. In received vectoroccured 3 errors. There was computed following error-locatory polynomial:

Λ(x) = α12x3 + 1

Next 2t syndromes for received vector:s1 = α6

s2 = α9

s3 = α7

s4 = α3

s5 = α6

s6 = α4

s7 = 1s8 = α3

41

Page 45: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For number of errors v = deg Λ(x) = 3, it is true that:

−s4 = Λ1s3 + Λ2s2 + Λ3s1

α3 = 0 · α7 + 0 · α9 + α12 · α6

−s5 = Λ1s4 + Λ2s3 + Λ3s2

α6 = 0 · α3 + 0 · α7 + α12 · α9

−s6 = Λ1s5 + Λ2s4 + Λ3s3

α4 = 0 · α6 + 0 · α3 + α12 · α7

−s7 = Λ1s6 + Λ2s5 + Λ3s4

1 = 0 · α4 + 0 · α6 + α12 · α3

−s8 = Λ1s7 + Λ2s6 + Λ3s5

α3 = 0 · 1 + 0 · α4 + α12 · α6

LFSR (Linear Feedback Shift Register) can be used to compute next syn-dromes. LFSR, which generates next syndromes s1, s2, . . . , s8 is shown on pic-ture 4.1. At the beginning flip-flops are initialized with syndromes s1, s2, s3.Multiplicators multiply by constant, which is one of coefficient of error-locator polynomial Λ(x). With each clock cycle there is generated next valueof syndrome.

Problem of finding coefficients of error-locator polynomial can be ex-pressed as problem of construction such LFSR, which generates next syn-dromes s1, s2, . . . , s2t. Berlekamp-Massey algorithm generates such LFSRduring 2t iterations.

Berlekamp-Massey algorithm is as follows for s1, s2, . . . , s2t, where it isnot true that s1 = s2 = . . . = s2t = 0:

1. Set variable L0 = 0. Variable L0 represents length of LFSR in rthiteration. Set variable r = 0. Variable r represents iteration counter.Set error-locator polynomial as Λ(0)(x) = 1. Set auxiliary polynomialas B(x) = 1, which will be used to construct LFSR.

2. Increase iteration counter r by 1, r = r + 1.3. Compute value of discrepancy ∆(r). Discrepancy is defined as dif-

ference between value of syndrome sr, which should be produced by

42

Page 46: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

LFSR and value, which is really produced by LFSR:

∆(r) = sr −Lr−1∑j=1

Λ(r−1)j sr−j

Recall that Λ0 = 1:

∆(r) =

Lr−1∑j=0

Λ(r−1)j sr−j

4. Compare ∆(r) with zero:

• If ∆(r) = 0, then it means that LFSR really produces syndrome srand it shouldn’t be modified, so Λ(r)(x) = Λ(r−1)(x), Lr = Lr−1.

• If ∆(r) 6= 0, then it means, that LFSR should be modified. Therecan be modified two things – length of LFSR and coefficients ofpolynomial Λ(r−1)(x). There are computed new coefficients ofΛ(r)(x):

Λ(r)(x) = Λ(r−1)(x)−∆(r)xB(x)

New length of LFSR in given iteration r is described as:

Lr = max [Lr−1, r − Lr−1]

It is true, that length of LFSR must be changed, if:

2Lr−1 ≤ r − 1

– if 2Lr−1 ≤ r − 1, then:

Lr = r − Lr−1

B(x) =Λ(r−1)(x)

∆(r)

– if 2Lr−1 > r − 1, then:

Lr = Lr−1

B(x) = xB(x)

5. If deg Λ(r)(x) > t, where t denotes error correction capability of code,then finish and signal that not correctable error pattern has occured,else continue.

6. If r = 2t, then finish. The error-locator polynomial is Λ(x) = Λ(2t)(x).If r < 2t, then return to point 2.

43

Page 47: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Example 4.11.Give are following syndromes:s1 = α6

s2 = α9

s3 = α7

s4 = α3

s5 = α6

s6 = α4

s7 = 1s8 = α3

With use of Berlekamp-Massey algorithm, there will be created LFSR, whichgenerates these syndromes, and error-locator polynomial Λ(x).First, variables are initialized:

Λ(0)(x) = 1 B(x) = 1 L0 = 0 r = 0

Variable r is increased by 1, r = 1Discrepancy is computed:

∆(1) =

Lr−1∑j=0

Λ(r−1)j sr−j =

0∑j=0

Λ(0)j s1−j = Λ

(0)0 s1 = α6

Discrepancy is not equal to zero, then LFSR should be modified:

Λ(1)(x) = Λ(r−1)(x)−∆(r)B(x) = Λ(0)(x)−∆(1)B(x)x = 1−α6 ·1x = α6x+1

It is satisfied also that:2Lr−1 ≤ r − 1

0 ≤ 0

Length of LFSR should be also changed and auxiliary polynomial B(x) ismodified:

Lr = r − Lr−1L1 = 1− 0 = 1

B(x) =Λ(r−1)(x)

∆(r)=

Λ(0)(x)

∆(1)

B(x) = 1 · α−6 = α9

Iteration counter is increased sequentially and algorithms finishes workswhen r = 8. Result of algorithm is Λ(x) = Λ(8)(x) = α12x3 + 1. Changesof variables in each iteration are show in table 4.2. Result of algorithm isthe same as for example 4.9, where for identical input data computed waserror-locator polynomial with use of Peterson-Gorensteina-Zierler algorithm.

44

Page 48: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

r Lr sr ∆(r) Λ(r)(x) B(x)0 0 – – 1 11 1 α6 α6 α6x+ 1 α9

2 1 α9 α8 α3x+ 1 α9x3 2 α7 α2 α11x2 + α3x+ 1 αx+ α13

4 2 α3 α14 α12x2 + α10x+ 1 αx2 + α13x5 3 α6 α α2x3 + α5x2 + α10x+ 1 α11x2 + α9x+ α14

6 3 α4 α11 α12x3 + 1 α11x3 + α9x2 + α14x7 3 1 0 α12x3 + 1 α11x4 + α9x3 + α14x2

8 3 α3 0 α12x3 + 1 α11x5 + α9x4 + α14x3

Table 4.2: Next steps for Berlekamp-Massey algorithm for example 4.11

4.2.3 Sugiyama algorithm

Sugiyama algorithm is used to find error-locator polynomial and it em-ploys extended Euclidean algorithm to solve this task [14]. Given is followingpolynomial, where coefficients are next syndromes:

S(x) = s1x+ s2x2 + s3x

3 + . . .+ s2tx2t =

2t∑n=1

snxn

Given is following equation:

Λ(x)S(x) = Ω(x) mod x2t+1

This equation is called key equation. Polynomial Ω(x) is called error-evaluatorpolynomial and is ussed to find error values. Above equation can be expressedas:

a(x)x2t+1 + Λ(x)S(x) = Ω(x),

where a(x) is some polynomial which satisfy equation.Bezout identity for two polynomials a(x) and b(x), for which greatest com-mon divisor is GCD(a(x), b(x)) = c(x), can be expressed as:

a(x)m(x) + b(x)n(x) = c(x),

where m(x) and n(x) are some polynomials. This equation can be solved byextended Euclidean algorithm. Result of algorithm is error-locator polyno-mial Λ(x).Sugiyama algorithm for syndrome polynomial S(x), where degS(x) > 0, isas follows:

45

Page 49: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

1. Set variables s(x) = x2t+1, t(x) = S(x), A(x) =

[1 00 1

].

2. Check if degree of t(x) is less or equal than error correction capabilityof code t:

• If deg t(x) ≤ t, finish. The result is:

Λ(x) = (A2,2(0))−1A2,2(x)

If deg Λ(x) = 0, signal that not correctable error pattern hasoccured.

• Jesli deg t(x) > t, then continue.

3. Compute:

Q(x) =s(x)

t(x)

4. Compute: [s(x)t(x)

]←[0 11 −Q(x)

] [s(x)t(x)

]5. Oblicz:

A(x)←[0 11 −Q(x)

]A(x)

6. Return to point 2.

Example 4.12.Given are following syndromes:s1 = α6

s2 = α9

s3 = α7

s4 = α3

s5 = α6

s6 = α4

s7 = 1s8 = α3

Initialization of variables:s(x) = x9

t(x) = S(x) = α3x8 + x7 + α4x6 + α6x5 + α3x4 + α7x3 + α9x2 + α6xAlgorithms proceeds for RS(15, 7) code of error-correction capability t = 4.

deg t(x) = 8 > t = 4,

so algorithm continues. Compute:

Q(x) =s(x)

t(x)=

x9

α3x8 + x7 + α4x6 + α6x5 + α3x4 + α7x3 + α9x2 + α6x

= α12x+ α9

46

Page 50: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Compute:[s(x)t(x)

]←[0 11 −Q(x)

] [s(x)t(x)

]=

[0 11 α12x+ α9

] [x9

α3x8+x7+α4x6+α6x5+α3x4+α7x3+α9x2+α6x

]=

[α3x8+x7+α4x6+α6x5+α3x4+α7x3+α9x2+α6x

α3x7 + α8x6 + α6x4 + α11x3 + x

]Compute:

A(x)←[0 11 −Q(x)

]A(x) =

[0 11 α12x+ α9

] [1 00 1

]=

[0 11 α12x+ α9

]Algorithm continues until deg t(x) ≤ t. The result of algorithm is Λ(x) =α12x3+1, which is the same as result of Peterson-Gorenstein-Zierler algorithmand Berlekamp-Massey algorithm for the same input data.

4.2.4 Chien search

Chien search is a method of finding roots of error-locator polynomialΛ(x) [13] [14]. For field GF (2m) there are check next elements 1, α, . . . , α2m−2

whether they are roots or not of Λ(x).Polynomial Λ(x) can be expressed as:

Λ(x) = Λtxt + Λt−1x

t−1 + . . .+ Λ1x+ Λ0

Element αi is root of polynomial Λ(x) if it satisfies:

Λ(αi) = Λtαit + Λt−1α

i(t−1) + . . .+ Λ1αi + Λ0 = 0

Recall that Λ0 = 1:

Λ(αi)− 1 = Λtαit + Λt−1α

i(t−1) + . . .+ Λ1αi = −1

It is true for element αi+1 that:

Λ(αi+1)− 1 = Λtα(i+1)t + Λt−1α

(i+1)(t−1) + . . .+ Λ1αi+1

Λ(αi+1)− 1 = Λtαitαt + Λt−1α

i(t−1)αt−1 + . . .+ Λ1αiα

It can be noticed that value of Λ(αi+1) can be computed with use of previouslycomputed value of Λ(αi). If value of polynomial (Λ(αi)− 1) is equal to −1,then it means, that element αi is root of polynomial Λ(x).

47

Page 51: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4.3 Finding error values

Using definition of syndrome 4.5, it is true that:

si =v∑j=1

ekj(Xj)i, (4.9)

Next 2t values of syndromes can be expressed as:

s1 = ek1X1 + ek2X2 + . . .+ ekvXv

s2 = ek1X21 + ek2X

22 + . . .+ ekvX

2v

. . .

s2t = ek1X2t1 + ek2X

2t2 + . . .+ ekvX

2tv

After finding of error-locator polynomial Λ(x), there are known numberof occured errors which is v = deg Λ(x), error locators X1, X2, . . . , Xv andnext syndromes s1, s2, . . . , s2t. Above equation limited to v syndromes canbe expressed as [12]:

X1 X2 . . . Xv

X21 X2

2 . . . X2v

......

......

Xv1 Xv

2 . . . Xvv

ek1ek2...ekv

=

s1s2...sv

Above set of equations can be solved with use of Gaussian elimination. Recallthat error locator is of form Xj = αkj , then error vector can be expressed as:

e(x) = ek1xlogαX1 + ek2x

logαX2 + . . .+ ekvxlogαXv

Example 4.13.Given are following syndromes:s1 = α6

s2 = α9

s3 = α7

Error-locator polynomial Λ(x) = α12x3 + 1 = (α14x− 1)(α9x− 1)(α4x− 1) isof degree 3, which means, that there occured 3 errors. To find error values,following set of equations must be solved: α14 α9 α4

(α14)2 (α9)2 (α4)2

(α14)3 (α9)3 (α4)3

ek1ek2ek3

=

α6

α9

α7

48

Page 52: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

With use of Gaussian elimination, there can be found error values: α14 α9 α4 α6

(α14)2 (α9)2 (α4)2 α9

(α14)3 (α9)3 (α4)3 α7

→1 0 0 α

0 1 0 α2

0 0 1 1

The results of set of equations are: ek1 = α, ek2 = α2, ek3 = 1. Error vectoris of following form:

e(x) = ek1xlogαX1 + ek2x

logαX2 + ek3xlogαX3 = αx14 + α2x9 + x4

4.3.1 Forney algorithm

Forney algorithm is used to find error values. Error value can be computedwith use of following equation [14]:

ekj = −Xj

Ω(X−1j )

Λ′(X−1j )(4.10)

Error evaluator polynomial is computed as follows:

Ω(x) mod x2t+1 = Λ(x)S(x)

Polynomial Λ′(x) is a formal derivative of Λ(x) and it is computed as follows:

Λ′(x) =t∑

j=1

Λjxj−1

Example 4.14.Given is syndrome polynomial:

S(x) = α3x8 + x7 + α4x6 + α6x5 + α3x4 + α7x3 + α9x2 + α6x

Given is error-locator polynomial:

Λ(x) = α12x3 + 1 = (α14x− 1)(α9x− 1)(α4x− 1)

Formal derivative of error-locator polynomial is expressed as:

Λ′(x) = α12x2

RS(15, 7) code is used, so error correction capability is t = 4. PolynomialΩ(x) is as follows:

Ω(x) mod x2t+1 = Λ(x)S(x)

49

Page 53: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Ω(x) mod x9 = (α12x3+1)(α3x8+x7+α4x6+α6x5+α3x4+α7x3+α9x2+α6x)

Ω(x) mod x9 = x11 + α12x10 + αx9 + α7x3 + α9x2 + α6x

Ω(x) = α7x3 + α9x2 + α6x

Errors are computed:

ek1 = −X1Ω(X−11 )

Λ′(X−11 )= −α14 Ω(α)

Λ′(α)= α

ek2 = −X2Ω(X−12 )

Λ′(X−12 )= −α9 Ω(α6)

Λ′(α6)= α2

ek3 = −X3Ω(X−13 )

Λ′(X−13 )= −α4 Ω(α11)

Λ′(α11)= 1

Error polynomial is as follows:

e(x) = ek1xlogαX1 + ek2x

logαX2 + ek3xlogαX3 = αx14 + α2x9 + x4

4.4 Erasure decoding

Erasure decoding gives the opprtunity to increase number of erroneouspositions which can be corrected [12] [14]. There is added new symbol whichis called erasure. This symbol denotes that receiver couldn’t recognize re-ceived symbol and marked it as erasure. Code with error correction capabilityt can correct following number of errors v and erasures f :

v +f

2≤ t

Erasures give additional information before decoding start – it is known whatare erroneous positions. Given is following polynomial:

Γ(x) =

f∏j=1

(1− Yjx),

where f denotes number of erasures in received vector, and Yj denotes jthposition of erasure. This polynomial is called erasure locator polynomial.Modified syndrome polynomial for erasures is as follows:

Θ(x) = Γ(x)S(x) mod x2t+1

50

Page 54: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Key equation for erasures is as follows:

Λ(x)Θ(x) = Ω(x) mod x2t+1

Sugiyama algorithm can be used to solve this equation. Values of syndromesare computed in such way, that erased positions are filled with zeroes.

Modified Sugiyama algorithm for erasures is as follows:

1. Set variables s(x) = x2t+1, t(x) = Θ(x), A(x) =

[1 00 1

].

2. Check if degree of t(x) is less or equal than error correction capabilityt:

• If

deg t(x) ≤ t+f

2for f even

lub

deg t(x) ≤ t+f − 1

2for f odd,

then finish. The result is:

Λ(x) = (A2,2(0))−1A2,2(x)

• Else continue.

3. Compute:

Q(x) =s(x)

t(x)

4. Compute: [s(x)t(x)

]←[0 11 −Q(x)

] [s(x)t(x)

]5. Compute:

A(x)←[0 11 −Q(x)

]A(x)

6. Return to point 2.

After calculation of error positions, error and erasure values have to befound. There is given following polynomial:

Φ(x) = Λ(x)Γ(x)

This polynomial is called error/erasure locator polynomial. This polynomialcan be used in modified Forney algorithm to find error and erasure values.

Modified Forney algorithm is as follows:

ekj = −Xj

Ω(X−1j )

Φ′(X−1j )

51

Page 55: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

fkj = −YjΩ(Y −1j )

Φ′(Y −1j )

Example 4.15.Codeword of RS(15, 7) code is as follows:

c(x) = α6x14 + αx13 + x12 + α2x11 + αx10 + αx9

+α2x8 + α3x7 + α7x6 + α9x5 + α5x4 + α9x3 + x+ α10

Error vector is as follows:

e(x) = αx14 + α2x9 + x4

Erasures are marked on positions 10 and 1, so Y1 = α10 i Y2 = α. Receivedvector is:

r(x) = α11x14 + αx13 + x12 + α2x11 + fk1x10 + α5x9

+α2x8 + α3x7 + α7x6 + α9x5 + α10x4 + α9x3 + fk2x+ α10

Code can correct up to t = 4 errors. There occured v = 3 errors and f = 2erasures. It is satisfied that:

v +f

2≤ t

3 + 1 ≤ 4

Erasure locator polynomial is as follows:

Γ(x) =

f∏j=1

(1− Yjx) = (1− α10x)(1− αx) = α11x2 + α8x+ 1

Erasure positions are filled with zeroes:

r(x) = α11x14 + αx13 + x12 + α2x11 + 0 · x10 + α5x9

+α2x8 + α3x7 + α7x6 + α9x5 + α10x4 + α9x3 + 0 · x+ α10

Computed syndromes are as follows:s1 = 0s2 = αs3 = 1s4 = α8

s5 = α5

s6 = α13

s7 = α2

52

Page 56: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

s8 = 1Modified syndrome polynomial is as follows:

Θ(x) = Γ(x)S(x) mod x2t+1

Θ(x) = (α11x2+α8x+1)(x8 +α2x7 +α13x6 +α5x5 +α8x4 +x3 +αx2) mod x9

Θ(x) = α6x8 + α9x7 + α4x6 + α9x5 + α12x4 + α7x3 + αx2

Error-locator polynomial is found by modified Sugiyama algorithm. Inputdata is:

s(x) = x9 t(x) = Θ(x)

Result of Sugiyama algorithm is:

Λ(x) = α12x3 + 1 = (α14x− 1)(α9x− 1)(α4x− 1)

Error evaluator polynomial is as follows:

Λ(x)Θ(x) = Ω(x) mod x2t+1

(α12x3 + 1)(α6x8 +α9x7 +α4x6 +α9x5 +α12x4 +α7x3 +αx2) = Ω(x) mod x9

Ω(x) = α10x5 + α12x4 + α7x3 + αx2

Error/erasure locator polynomial is as follows:

Φ(x) = Λ(x)Γ(x)

Φ(x) = (α12x3 + 1)(α11x2 + α8x+ 1)

Φ(x) = (α12x3 + 1)(α11x2 + α8x+ 1)

Φ(x) = α8x5 + α5x4 + α12x3 + α11x2 + α8x+ 1

Formal derivative of error/erasure locator polynomial is as follows:

Φ′(x) = 5 · α8x4 + 4 · α5x3 + 3 · α12x2 + 2 · α11x+ 1 · α8

Φ′(x) = α8x4 + α12x2 + α8

Error values are as follows:

ek1 = −X1Ω(X−11 )

Φ′(X−11 )= −α14 Ω(α)

Φ′(α)= α

ek2 = −X2Ω(X−12 )

Φ′(X−12 )= −α9 Ω(α6)

Φ′(α6)= α2

53

Page 57: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

ek3 = −X3Ω(X−13 )

Φ′(X−13 )= −α4 Ω(α11)

Φ′(α11)= 1

Erasure valus are as follows:

fk1 = −Y1Ω(Y −11 )

Φ′(Y −11 )= −α10 Ω(α5)

Φ′(α5)= α

fk2 = −Y2Ω(Y −12 )

Φ′(Y −12 )= −α Ω(α14)

Φ′(α14)= 1

Received vector is corrected as follows:

c(x) = r(x)− (e(x) + f(x)) = r(x)− ((αx14 + α2x9 + x4) + (αx10 + x))

Polynomial f(x) denotes erasure polynomial, which is used to correct receivedvector.

4.5 Guruswami-Sudan algorithm

Algorithms which were described in sections 4.2.1, 4.2.3, 4.2.2 can correcterrors, which number is not bigger than error correction capability of code.Error capability of code is equal to t = dmin−1

2. Decoding can be described

as searching codeword in sphere surrounding received vector of radius t. Ifnumber of errors is not greater than t, then in this sphere is placed only onecodeword. Increasing radius of this sphere and searching codeword in newsphere, it may happen, that there will be found two or more codewords andprobably only one of them is original codeword. Such decoding is called listdecoding and it lets to decode received vectors above limit of error correctioncapability t [7] [17] [12].

Guruswami-Sudan algorithm is used to decode codewords created by orig-inal method (3.2.1). Codeword is created by evaluating information polyno-mial for elements in support set, which is set of nonzero elements of field usedto create code. Given is some information polynomial of degree less than kfor code RS(n, k). Codeword is created as follows:

c = (m(α1),m(α2), . . . ,m(αn))

Codeword can be expressed also as ordered set of points:

c = ((α1,m(α1)), (α2,m(α2)), . . . , (αn,m(αn)))

Received vector from communication channel can be expressed as follows:

r = ((α1, r0), (α2, r1), . . . , (αn, rn−1))

54

Page 58: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

If on i-th position m(αi) 6= ri−1, then it means that error occured on thisposition.

Guruswami-Sudana algorithm finds such set of polynomial p(x), whichcan transform received vector r into codeword which is in Hamming distanceless or equal to given error correction capability of algorithm. Guruswami-Sudan algorithm consists of two main steps:

• Interpolation step: First step of decoding is to construct polynomial oftwo variables:

Q(x, y) =∑i

∑j

ai,jxixj,

where zeroes of this polynomial are points of received vector (αi, ri−1),Q(αi, ri−1) = 0. PolynomialQ(x, y) is of degree (1, k−1) of the smallestpossible. To construct polynomial Q(x, y) there is used parametercalled multiplicity of zeroes m, which denotes the number of timeswhere points (αi, ri−1) are zeroes of polynomial Q(x, y) or how manytimes polynomial Q(x, y) goes through points (αi, ri−1).

• Factorization step: Second step of decoding is factorization of polyno-mial Q(x, y) to polynomials of type y − pi(x), where pi(x) is of degreeless than k. One of polynomials pi(x) is probably original informationpolynomial which is used to create codeword.

To work with Guruswami-Sudan algorithm, there must be presented basicmathematical methods, which are used with algorithm.

Weighted degree

Guruswami-Sudan algorithm employs monomials of type xiyj. Duringdecoding process there is proceeded comparision of such monomials. One ofthe methods to solve this problem is introduction of (u, v)-weighted degree(w-degree), where u and v are some positive integer numbers and they arenot both zeroes:

degw xiyj = ui+ vj

Sometimes it may happen, that for two different monomials xi1yj1 and xi2yj2

values of weighted degree are the same. In order to solve such problem, thereis introduced lexicographical order (w-lex) and reverse lexicographical order(w-revlex), where:

xi1yj1 < xi2yj2 , for ui1 + vj1 < ui2 + vj2

or ui1 + vj1 = ui2 + vj2 and

i1 < i2 for w-lex

i1 > i2 for w-revlex

55

Page 59: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Weighted degree of polynomialQ(x, y) which consists of monomials anxinyjn :

an 6= 0 is the biggest degree of n-th monomial:

degwQ(x, y) = maxdegw anxinyjn : an 6= 0

When given is some (u, v) weighted degree, there can be created orderedlist of monomials by using w-lex or w-revlex order. For some monomial xinyjn

its order number on list is denoted as Ind(xinyjn).

Example 4.16.Given is (u, v) = (1, 2) weighted degree. For exemplary monomials, theirweighted degree is as follows:

degw xy = degw x1y1 = 1 · 1 + 2 · 1 = 3

degw x2y = 1 · 2 + 2 · 1 = 4

degw x3 = 1 · 3 + 2 · 0 = 3

It can be observed that degw xy = degw x3. For w-lex order:

xy < x3,

because looking at exponents of variable x, 1 < 3. For w-revlex order:

xy > x3,

because 1 ≮ 3.

Fragment of ordered list for (1, 2) w-revlex is shown in table 4.3.

Multiplicities of zeroes

Multiplicity of zero in point (0, 0) is such number m, for which a polyno-mial Q(x, y) cannot be factorized to any polynomial of type ai,jx

iyj, whereai,j 6= 0, ze i+j < m. For point (α, β) polynomial Q(x, y) polynomial Q(x, y)is of multiplicity of zeroes of order m, if polynomial Q(x+α, y+β) is of mul-tiplicity of zeroes of order m in point (0, 0). To compute what multiplicityof zeroes is given polynomial Q(x, y), there can be used Hasse derivative.Equation for Hasse derivative is as follows:

Qr,s(x, y) =∑i

∑j

(i

r

)(j

s

)ai,jx

i−ryj−s

56

Page 60: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

xinyjn degw xinyjn Ind(xinyjn)

x0y0 0 0x1y0 1 1x2y0 2 2x0y1 2 3x3y0 3 4x1y1 3 5x4y0 4 6x2y1 4 7x0y2 4 8. . . . . . . . .

Table 4.3: Fragment of ordered list of monomials of type xinyjn for order(1, 2) w-revlex.

For binomial coefficient(nk

)it is true that n ≥ k ≥ 0, then Hasse derivative

can be expressed as:

Qr,s(x, y) =∑i≥r

∑j≥s

(i

r

)(j

s

)ai,jx

i−ryj−s

Some polynomial Q(x, y) is of multiplicity of zeroes of order m in points(α, β), if:

Qr,s(α, β) = 0 for 0 ≤ r + s < m

Example 4.17.Given is polynomial Q(x, y) = xy + x2y3. Order of multiplicity of zeroes inpoint (0, 0) is m = 2, because the smallest sum of exponents is the smallestfor nonzero monomial xy and is equal to 2.

Hasse derivative for polynomial Q(x, y) is expressed as:

Qr,s(x, y) =

(1

r

)(1

s

)x1−ry1−s +

(2

r

)(3

s

)x2−ry3−s

If order of multiplicity of zeroes is m = 2, then it must be satisfied for0 ≤ r+ s < 2 that Qr,s(0, 0) = 0. Such (r, s) pairs are (0, 0), (0, 1) and (1, 0):

Q0,0(0, 0) =

(1

0

)(1

0

)01−001−0 +

(2

0

)(3

0

)02−003−0 = 0

Q0,1(0, 0) =

(1

0

)(1

1

)01−001−1 +

(2

0

)(3

1

)02−003−1 = 0

57

Page 61: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Q1,0(0, 0) =

(1

1

)(1

0

)01−101−0 +

(2

1

)(3

0

)02−103−0 = 0

However for (r, s) = (1, 1), where 0 ≤ 2 ≮ 2 and if 00 = 1, then:

Q1,1(0, 0) =

(1

1

)(1

1

)01−101−1 +

(2

1

)(3

0

)02−103−1 = 1

Number of polynomial coefficients

Interpolation step of Guruswami-Sudan algorithm produces following poly-nomial of two variables:

Q(x, y) =∑i

∑j

ai,jxiyj

This polynomial can be expressed also as:

Q(x, y) =C∑i=0

aiφi(x, y),

where φi(x, y) denotes i-th monomial xiyj in given order (w-lex or w-revlex).Parameter C can be expressed as follows:

C = n

(m+ 1

2

)It is true that some polynomial Q(x, y) goes through point (xi, yi) m times,if Hasse derivative Qr,s(x, y) for points (xi, yi) is equal to Qr,s(xi, yi) = 0 forall pairs 0 ≤ r + s < m. The number of such pairs (r, s) can expressed as:(

m+ 1

2

)For code RS(n, k) there n points, through which goes polynomial Q(x, y), sonumber of pairs (r, s) for n points is expressed as:

n

(m+ 1

2

)Example 4.18.Given is polynomial Q(x, y) = xy+x2y3, which is of multiplicity of zeroes inpoint (0, 0) equal to m = 2. In this case all monomials of type ai,jx

iyj, wherei + j < 2, have coefficients ai,j = 0. It can be observed that for a0,0x

0y0,

58

Page 62: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

a0,1x0y1 and a1,0x

1y0, the coefficient is zero. The number of these monomialscan be expressed as: (

m+ 1

2

)=

(2 + 1

2

)=

(3

2

)= 3

Polynomial goes through point (0, 0) m = 2 times. This only one point mustbe passed, so:

C = 1 ·(

3

2

)= 3

Minimal polynomial, which goes through (0, 0) m = 2 times is as follows:

Q(x, y) =C∑i=0

aiφi(x, y)

Q(x, y) = 0 · x0y0 + 0 · x1y0 + 0 · x0y1 + a1,1 · x1y1

or

Q(x, y) = 0 · x0y0 + 0 · x1y0 + 0 · x0y1 + a2,0 · x2y0

or

Q(x, y) = 0 · x0y0 + 0 · x1y0 + 0 · x0y1 + a0,2 · x0y2

Coefficients a1,1, a2,0, a0,2 are not equal to zero.

Error correction capability

Error correction capability of Guruswami-Sudan algorithm for codeRS(n, k)depends on length of codeword n, number of information elements k and pa-rameter m, which is order of multiplicity of zeroes. Weighted degree for codeRS(n, k) is set to (1, k − 1). Weighted degree and w-lex order settles orderof monomials of type xiyj. During writing this master thesis, there was usedw-revlex order. Error correction capability of algorithm for parameter m isas follows:

tm = n− 1− bmaxK : Ind(xK) ≤ Cm

c

Example 4.19.Given is code RS(7, 3). There is used (1, k − 1) w-revlex order, which isequal to (1, 2) w-revlex. Error correction capability of Guruswami-Sudan

59

Page 63: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

algorithm depends on parameter m.For m = 2:

C = n

(m+ 1

2

)= 7 ·

(3

2

)= 21

tm = n− 1− bmaxK : Ind(xK) ≤ Cm

c

t2 = 7− 1− bmaxK : Ind(xK) ≤ 212

c

On the ordered list( if there were shown more elements on table 4.3)Ind(x8) = 20 and this value is greatest for monomial of type xK , whereInd(xK) ≤ 21, so:

t2 = 6− b82c = 2

For m = 3:

C = 7

(3 + 1

2

)= 42

t3 = 7− 1− bmaxK : Ind(xK) ≤ 423

c

For monomial x12 it is true that Ind(x12) = 42.

t3 = 6− b12

3c = 2

For m = 4:

C = 7

(4 + 1

2

)= 70

t4 = 7− 1− bmaxK : Ind(xK) ≤ 704

c

For monomial x15 it is true that Ind(x15) = 64.

t4 = 6− b15

4c = 6− 3 = 3

For parameter m = 4 algorithm can correct 1 more errors than it is denotedby error correction capability of code which is t = 2.

60

Page 64: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

List of results

Guruswami-Sudan algorithm returns list of polynomials, where proba-bly is placed original information polynomial. Maximal number of returnedelements is as follows:

Lm = maxK : Ind(yK) ≤ C

Example 4.20.For code RS(7, 3), order (1, 2) w-revlex, parameter m = 4, maximal numberof returned elements is as follows:

L4 = maxK : Ind(yK) ≤ 70 = 7,

because for monomial y7 it is true that Ind(y7) = 63 and it is greatest foryK , where Ind(yK) ≤ 70.

4.5.1 Kotter algorithm

Kotter algorithm computes Hasse derivative Qr,s(x, y) for all points ofreceived vector. On of the key element of algorithm is order of pairs (r, s),which are parameters of Hasse derivative. This order is as follows:

(0, 0), (0, 1), . . . , (0,m− 1), (1, 0), (1, 1), . . . , (1,m− 2), . . . , (m− 1, 0)

It can be also expressed as:

K = (0, 0), (0, 1), . . . , (0,m−1), (1, 0), . . . , (m−1,m−1)\(i, j) : i+j < m

Kotter algorithm is used to construct polynomial Q(x, y) during interpolationstep of Guruswami-Sudan algorithm and is as follows:

1. Given is following input data:

• maximal number of returned elements on the list Lm,• set of n points (αi, βi) for i = 1, 2, . . . , n, which symbolize

received vector,• order of multiplicities of zeroes for points (αi, βi) – m,• order of type (1, k − 1) w-revlex for code RS(n, k),• ordered table of pairs (r, s) – K.

2. Create Lm + 1 polynomials gj(x, y) = yj, where j = 0, 1, . . . , Lm.3. Set variable i = 1, which will point number of currently evaluated

point (αi, βi).4. If i > n, then go to point 14, else set new point (a, b) = (αi, βi) and

continue.

61

Page 65: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

5. Set variable j = 1, which will point (r, s) pair in table K.6. If j >

(m+12

), then increase variable i = i + 1 and return to point 4,

else set current pair of Hasse derivative arguments (r, s) = K[j].7. For each polynomial gj(x, y), where j = 0, 1, . . . , Lm, compute dis-

crepancy ∆j, which will be used to modify polynomial gj(x, y):

∆j = Qr,sgj(a, b)

8. Construct set J , which consists of indices j, where ∆j 6= 0.9. If set J is empty, then increase j = j + 1 and go to point 6, else

continue.10. Find polynomial of least degree in set J and remember its index j∗:

j∗ = arg mingj(x, y) : j ∈ J

11. Set two auxiliary variables:

f = gj∗(x, y) ∆ = ∆j∗

12. For each polynomial gj(x, y), where j ∈ J , do:

• if j 6= j∗, compute:

gj(x, y) = ∆gj(x, y)−∆jf

• if j = j∗, compute:

gj(x, y) = ∆(x− a)f

13. Increase variable j = j + 1 and go to point 6.14. Choose polynomial of least degree within set gj(x, y) and return it:

Q(x, y) = gj(x, y),

where degw gj(x, y) is least for j = 0, 1, . . . , Lm.

Example 4.21.Given is code RS(7, 3), parameter m = 4. Algorithm can correct up to t4 = 3errors and returns maximally L4 = 7 potential information polynomials.Given is vector of information elements:

m = (α, α2, 1)

Codeword created with original method is as follows:

c = (α5, α6, α, 0, α6, 0, α5)

62

Page 66: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Received vector is as follows:

r = (α5, α6, α, 0, α2, 1, α4)

Error vector is as follows:

e = (0, 0, 0, 0, 1, 1, 1)

There occured 3 errors. Previously described algorithms (PGZ, BMA etc.)are able to correct up to 2 errors. There will be created polynomial Q(x, y),which will be m = 4 times go through points:

(1, α5), (α, α6), (α2, α), (α3, 0), (α4, α5), (α5, 1), (α6, α4)

First point comes from support set, and second point comes from receivedvector. Parameter m is equal to 4, so parameters (r, s) of Hasse derivativeare:

K = (0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (3, 0)

For code RS(7, 3) there is used (1, k − 1) = (1, 2) w-revlex order.First step of Kotter algorithm is to created Lm + 1 polynomials gj(x, y):

g0(x, y) = 1 g1(x, y) = y g2(x, y) = y2

g3(x, y) = y3 g4(x, y) = y4 g5(x, y) = y5

g6(x, y) = y6 g7(x, y) = y7

Variable i is set to i = 1. Evaluated point is:

(a, b) = (αi, βi) = (α1, β1) = (1, α5)

Variable j is set to j = 1 and points on first pair (r, s) from table K: (r, s) =K[1] = (0, 0) For each polynomial gj(x, y) there is computed Hasse derivativewith parameters (r, s) = (0, 0) and for point(x, y) = (a, b) = (1, α5):

∆j = (gj)r,s(x, y) =∑i≥r

∑j≥s

(i

r

)(j

s

)ai,jx

i−ryj−s

For g0(x, y) = 1:

∆0 = (g0)0,0(1, α5) =

(0

0

)(0

0

)10−0(α5)0−0 = 1

63

Page 67: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For g1(x, y) = y:

∆1 = (g1)0,0(1, α5) =

(0

0

)(1

0

)10−0(α5)1−0 = α5

For g2(x, y) = y2:

∆2 = (g2)0,0(1, α5) =

(0

0

)(2

0

)10−0(α5)2−0 = α3

For g3(x, y) = y3:

∆3 = (g3)0,0(1, α5) =

(0

0

)(3

0

)10−0(α5)3−0 = α

For g4(x, y) = y4:

∆4 = (g4)0,0(1, α5) =

(0

0

)(4

0

)10−0(α5)4−0 = α6

For g5(x, y) = y5:

∆5 = (g5)0,0(1, α5) =

(0

0

)(5

0

)10−0(α5)5−0 = α4

For g6(x, y) = y6:

∆6 = (g6)0,0(1, α5) =

(0

0

)(6

0

)10−0(α5)6−0 = α2

For g7(x, y) = y7:

∆7 = (g7)0,0(1, α5) =

(0

0

)(7

0

)10−0(α5)7−0 = 1

All values of ∆j are not equal to zero, so set J is as follows:

J = 0, 1, 2, 3, 4, 5, 6, 7

The least weighted degree degw is g0(x, y) = 1, so:

j∗ = 0

f = g0(x, y) = 1

∆ = ∆0 = 1

64

Page 68: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Polynomials gj(x, y) are modified. For j = j∗ = 0:

g0(x, y)← ∆(x− a)f = 1 · (x− 1) · 1 = x+ 1

For j 6= j∗:

g1(x, y)← ∆g1(x, y)−∆1f = 1 · y − α5 · 1 = y + α5

g2(x, y)← ∆g2(x, y)−∆2f = 1 · y2 − α3 · 1 = y2 + α3

g3(x, y)← ∆g3(x, y)−∆3f = 1 · y3 − α · 1 = y3 + α

g4(x, y)← ∆g4(x, y)−∆4f = 1 · y4 − α6 · 1 = y4 + α6

g5(x, y)← ∆g5(x, y)−∆5f = 1 · y5 − α4 · 1 = y5 + α4

g6(x, y)← ∆g6(x, y)−∆6f = 1 · y6 − α2 · 1 = y6 + α2

g7(x, y)← ∆g7(x, y)−∆7f = 1 · y7 − 1 · 1 = y7 + 1

Next, there is increased variable j ← j+1 and algorithm modifies polynomialsgj(x, y) for next pair (r, s). When there have been evaluated all points, thenfrom polynomials gj(x, y) must be choosen this of least weighted degree. Theresult of algorithm is as follows:

Q(x, y) = y7(α2) + y6(α5x3 + αx2 + α6x+ α6)

+ y5(αx5 + α6x4 + α4x3 + α4x2 + α2)

+ y4(x7 + α3x6 + αx5 + x4 + α2x3 + α5x+ α2)

+ y3(αx9 + α6x8 + α6x7 + α4x6 + α6x5 + α2x4

+α3x3 + α3x2 + α3x+ α2)

+ y2(α2x11 + α4x10 + α4x9 + αx8 + α5x7 + α4x6

+x5 + α2x4 + x3 + α4x2 + x+ α3)

+ y(αx13 + α6x12 + α6x11 + x9 + α4x8 + α5x7 + α2x5

+α6x4 + α5x3 + α4x+ α4)

+ (α6x14 + x13 + α3x12 + α6x11 + α3x10

+αx9 + α5x8 + α4x7 + αx6 + α4x4 + x2 + α2x)

Each points from received vector:

(1, α5), (α, α6), (α2, α), (α3, 0), (α4, α5), (α5, 1), (α6, α4),

is zero ofpolynomial Q(x, y). Furthermore, each point is zero of multiplicityof order 4, which means that polynomial Q(x, y) goes through points 4 times.Hasse derivative of polynomial Q(x, y) for each points and all pairs r+ s < 4is equal to zero.

65

Page 69: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4.5.2 Roth-Ruckenstein algorithm

Roth-Ruckenstein algorithm is used to factorize polynomial Q(x, y) topolynomials y−pi(x), which divide Q(x, y) [18]. It is possible to set maximalydegree of polynomials pi(x) and for code RS(n, k) it is k−1. Algorithm worksrecursively and searches in depth all possible solutions. Each recursive call isto find new coefficient of some of searched polynomial pi(x). Maximal depthof recursion is k − 1.Roth-Ruckenstein algorithm is as follows:

1. Input data is as follows:

• polynomial of two variables Q(x, y), which is factorized to poly-nomials of type y − pi(x) of degree less or equal to k − 1,

• maximal degree of polynomials pi(x), which is k − 1,• variable u which describes depth of recursion. For first call of

algorithm u = 0 and for next calls this value is passed as param-eter.

• polynomial pi(x). For first call it is pi(x) = 0, and for all nextcalls it is passed as parameter. On recursion depth u = 0 thereare computed coefficients for x0, on depth u = 1 for x1 etc. Foreach new call of algorithm there is passed copy of polynomialpi(x), whose coefficients were computed in previous branch ofrecursion.

2. Find roots of polynomial Q(0, y), substituting y with all elements ofGalois field over which is created code.

3. For each root αn of polynomial Q(0, y) do:

• compute:Qi(x, y)← Q(x, xy + αn)

• find such monomial of type xr for greatest exponent r, where xr

divides Qi(x, y) without remainder,• divide polynomial Qi(x, y) by monomial xr:

Qi(x, y)← Qi(x, y)

xr

• set root αi as coefficient of polynomial pi(x) for xu,

– if (u+ 1) < k, then open new recursive call and go to point 2with parameters of polynomial Qi(x, y), polynomial pi(x) anddepth of recursion u+ 1,

– else if (u + 1) = k and Qi(x, 0) = 0, then polynomial pi(x) isreturned as result and evaluated branch of recursion is closed,

– else close currect branch of recursion.

66

Page 70: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Example 4.22.There will be factorized following polynomial:

Q(x, y) = y7(α2) + y6(α5x3 + αx2 + α6x+ α6)

+ y5(αx5 + α6x4 + α4x3 + α4x2 + α2)

+ y4(x7 + α3x6 + αx5 + x4 + α2x3 + α5x+ α2)

+ y3(αx9 + α6x8 + α6x7 + α4x6 + α6x5 + α2x4

+α3x3 + α3x2 + α3x+ α2)

+ y2(α2x11 + α4x10 + α4x9 + αx8 + α5x7 + α4x6

+x5 + α2x4 + x3 + α4x2 + x+ α3)

+ y(αx13 + α6x12 + α6x11 + x9 + α4x8 + α5x7 + α2x5

+α6x4 + α5x3 + α4x+ α4)

+ (α6x14 + x13 + α3x12 + α6x11 + α3x10

+αx9 + α5x8 + α4x7 + αx6 + α4x4 + x2 + α2x)

For code RS(7, 3) information polynomials can be of maximal degree of k −1 = 3− 1 = 2. Initial depth of recursion is u = 0. Firstly, there are searchedroots of polynomial:

Q(0, y) = y7(α2) + y6(α6) + y5(α2) + y4(α2) + y3(α2) + y2(α3) + y(α4)

Following elements are roots of polynomial:

α1 = 0 α2 = 1 α3 = α

α4 = α2 α5 = α6

First there will be evaluated element α1 = 0. There is created polynomial:

Q1(x, y)← Q(x, xy + α1) = Q(x, xy + 0)

67

Page 71: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Q (x,y)

0

1

α

α2

α6

α5

1

α2

0

α5

0

α2

1

α3

α4 is not root

Figure 4.2: Branches of recursion for Roth-Ruckenstein algorithm.

Q1(x, y) = y7(α2x7)

+ y6(α5x9 + αx8 + α6x7 + α6x6)

+ y5(αx10 + α6x9 + α4x8 + α4x7 + α2x5)

+ y4(x11 + α3x10 + αx9 + x8 + α2x7 + α5x5 + α2x4)

+ y3(αx12 + α6x11 + α6x10 + α4x9

+α6x8 + α2x7 + α3x6 + α3x5 + α3x4 + α2x3)

+ y2(α2x13 + α4x12 + α4x11 + αx10

+α5x9 + α4x8 + x7 + α2x6 + x5 + α4x4 + x3 + α3x2)

+ y(αx14 + α6x13 + α6x12 + x10 + α4x9

+α5x8 + α2x6 + α6x5 + α5x4 + α4x2 + α4x)

+ (α6x14 + x13 + α3x12 + α6x11 + α3x10

+αx9 + α5x8 + α4x7 + αx6 + α4x4 + x2 + α2x)

The greatest monomial of type xr which divides Q1(x, y) withour remainderis x1. Polynomial Q1(x, y) is divided by x1:

Q1(x, y)← Q1(x, y)

x

68

Page 72: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Q1(x, y) = y7(α2x6)

+ y6(α5x9 + αx7 + α6x6 + α6x5)

+ y5(αx9 + α6x8 + α4x7 + α4x6 + α2x4)

+ y4(x10 + α3x9 + αx8 + x7 + α2x6 + α5x4 + α2x3)

+ y3(αx11 + α6x10 + α6x9 + α4x8

+α6x7 + α2x6 + α3x5 + α3x4 + α3x3 + α2x2)

+ y2(α2x12 + α4x11 + α4x10 + αx9

+α5x8 + α4x7 + x7 + α2x5 + x4 + α4x3 + x2 + α3x)

+ y(αx13 + α6x12 + α6x11 + x9 + α4x8

+α5x7 + α2x5 + α6x4 + α5x3 + α4x+ α4)

+ (α6x13 + x12 + α3x11 + α6x10 + α3x9

+αx8 + α5x7 + α4x6 + αx5 + α4x3 + x+ α2)

There is remembered root α1 = 0 and it becomes coefficient for x0 of poly-nomial p1(x) = 0 · x0. Then there is called new recursive procedure forQ1(x, y), recursion depth u← u + 1, polynomial p1(x). Subsequent steps ofalgorithm are shown on picture 4.2. There result of algorithms are following4 polynomials:

p1(x) = α5x

p2(x) = α2x2 + x+ 1

p3(x) = x2 + α2x+ α

p4(x) = α3x2 + α2

Polynomial α4x2 + α5x + α6 is not result of algorithm work, because in thelast evaluated recursion element α4 is not root of polynomial Q5,1,1(x, 0).Returned polynomials creates following codewords of code RS(7, 3):

c1 = (α5, α6, 1, α, α2, α3, α4)

c2 = (α2, α6, 0, 0, α2, 1, α6)

c3 = (α5, α6, α, 0, α6, 0, α5)

c4 = (α5, α3, α6, 0, α, 1, α4)

Original received vector was:

r = (α5, α6, α, 0, α2, 1, α4)

Hamming distance for vector r in order to each codeword ci is equal to 3.Codeword c3 is original codeword.

69

Page 73: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

4.5.3 Kotter-Vardy algorithm

Kotter-Vardy algorithm is used to transform probabilistic reliability in-formation to set of points which will next used to construct polynomialQ(x, y) [19] [18]. To each point is assigned own order of multiplicity ofzeroes mb. Next, there is created set of points and it is used as input datafor Guruswami-Sudan algorithm.Kottera-Vardy algorithm is as follows:

1. Input data is as follows:

• reliability matrix Π, where for code RS(n, k) created over GF (q),it consists of n columns and q rows. Each column describesparticular element in received vector and in rows there is givenprobability which describes that given element is some elementin GF (q). For each column sum of probabilities is 1.

• parameter s, which denotes sum of all orders of multiplicity ofzeroes mb, s =

∑nb=1mb.

2. Create matrix M with the same number columns and rows as matrixΠ, and set all values to zero.

3. Find in matrix Π an element with greatest value on some position(i, j), which means i-th row and j-th column.

4. Compute:

Πi,j ←Πi,j

Mi,j + 2

5. Compute:Mi,j ←Mi,j + 1

6. Decrease s by 1, s ← s − 1. If s = 0 then return matrix M . Pointswhich are used during interpolation are nonzero elements of matrix Mon position (j, i), where j denotes number of column, and i numberof row. Order of multiplicity of zeroes for given points is mb ← Mj,i.If s > 0, then return to point 3.

Decoder which employs Kotter-Vardy algorithm, receives as input datareceived vector from communication channel. In the case of previously de-scribed algorithm it was hard information, which means that elements ofvector were elements of Galois field. In Kotter-Vardy algorithm’s case this issoft information, where for each element of received vector there is computedprobability that element is some element in Galois field. During writing thismaster thesis, Galois field elements were represented as binary vectors, sothey consists of elements 1 and 0. For soft decoding elements of Galois fieldare represented as vectors of rational numbers. They provide more informa-tion for soft decoding and sometimes it is possible to correct more errors than

70

Page 74: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

for hard decoding. For master thesis’ purpose, there was created a methodfor interfering received vector and for creating reliability matrix.Algorithm for interfering codeword is as follows:

1. Input data:

• codeword of RS(n, k) code, where elements of vector are binary,• parameter d, which influences amplitude of noise,• parameter e, which influences frequency of noise.

2. Modulate codeword, that 1→ −1 and 0→ 13. For each bit of codeword do:

• choose random value erand from 0 to 32767, using uniform prob-ability distribution. If erand < e, compute:

X =(erand mod d)

1000,

then, if erand is even then to evaluated bit add value X, and iferand is odd then from evaluated bit subtract value X.

The method to generate reliability matrix Π is as follows:

1. Input data:

• received vector from communication channel, whose bits are rep-resented as rational numbers,

• parameter s, which is used to compute probability for some ele-ments that it is one of elements in GF (q).

2. For each element of received vector ri, where i = 0, 1, . . . , n− 1, do:

• Compute Manhattan distance between vector of element of re-ceived vector and each element in GF (pm):

d(ri, αj) =m∑a=1

|r(a)i − α(a)j |,

where r(a)i denotes a-th bit of vector ri, αj denotes j-th element of

GF (pm), α(a)j denotes a-th bit of element αj. Recall that 0→ 1

and 1→ −1.• next, for each computed value of distance do:

d(ri, αj)← d(ri, αj)−s

• compute, where GF (pm) = GF (q):

d(ri, αj)←d(ri, αj)∑qa=1 d(ri, αa)

71

Page 75: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

codeword received vectorsoft information hard information

(-1,-1,-1) (-0.942,-0.736,0.155) (-1,-1,1)(-1,-1,1) (0.034,-0.941,1.569) (1,-1,1)(1,1,-1) (0.815,0.611,-1.837) (1,1,-1)(1,1,1) (0.241,1.571,1.681) (1,1,1)

(-1,-1,1) (-2.282,-1.92,2.231) (-1,-1,1)(1,1,1) (1.964,-0.043,0.039) (1,-1,1)

(-1,-1,-1) (0.109,-1.28,-1.65) (1,-1,-1)

Table 4.4: Transformation from soft to hard information

• values d(ri, αj), where 1 ≤ j ≤ q are values of column for givenelement ri.

Example 4.23.Given is vector of information elements:

m = (α, α2, 1)

Codeword for RS(7, 3) code created by original method is as follows:

c = (α5, α6, α, 0, α6, 0, α5)

Codeword can be also expressed in vector form:

c = ((1, 1, 1), (1, 1, 0), (0, 0, 1), (0, 0, 0), (1, 1, 0), (0, 0, 0), (1, 1, 1))

After modulation 0→ 1 and 1→ −1, codeword is as follows:

c = ((−1,−1,−1),(−1,−1,1),(1,1,−1),(1, 1, 1),(−1,−1, 1),(1, 1, 1),(−1,−1,−1))

Let the codeword be disrupted by the method described previously for someparameter of noise frequency and noise amplitude. In table 4.4 there areshown elements of codeword and elements of disrupted word. Hard infor-mation is determined from soft information, that elements which are less orequal zero are transformed to −1, and elements greater than zero are trans-formed to 1. If received vector would be decoded as hard vector, then therewould occur 4 errors. Kotter-Vardy algorithm can help to transform softinformation to hard information in such way, that it would be possible tocorrect more errors. Using received vector, there is created reliability ma-trix. For next elements of received vector there is computed probability, that

72

Page 76: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

given element is some element in GF (q). Reliability matrix fo received vectorand parameter s = 20, 5 is as follows:

Π =

0 0 0 0.99 0 0.22 00 0 0 0.012 0 0 00 0 1 0 0 0.13 00 0.7 0 0 0 0.41 00 0 0 0 0 0 00 0 0 0 0 0.24 0.91

0.0079 0 0 0 0 0 0.090.99 0.3 0 0 1 0 0

For clarity, values less than 0.0001 are denoted as 0. Furthermore, sometimessum of elements is close to 1 and to equal 1, because of floating point numberrounding. In the last but one column it can be observed the biggest uncer-tainty. Received element is (1.964,−0.043, 0.039). The greatest probabilityis, that this element is α2, which is denoted as (0, 1, 0). It would be recog-nized so as hard information. But probability is also big, that given elementcan be also 0 – (0, 0, 0), α – (0, 0, 1) and α4 – (0, 1, 1). First position is mostfirm, which is 1.964, and it can be described as “strong” 1. Values −0.043and 0.039 are more or less between −1 and 1, so probability that they are 1or 0 is almost equal.The next step is transformation of reliability matrix Π to multiplicity ma-trix M . Kotter-Vardy algorithm is used to this task. Returned matrix fromKotter-Vardy algorithm for parameter s = 35 is as follows:

M =

0 0 0 3 0 2 00 0 0 0 0 0 00 0 4 0 0 2 00 3 0 0 0 3 00 0 0 0 0 0 00 0 0 0 0 2 30 0 0 0 0 0 24 3 0 0 4 0 0

Points, which will be used to interpolate polynomial Q(x, y) are (with mul-tiplicities of zero):(1, α6) m1 = 4(α, α6) m2 = 3(α, α2) m3 = 3(α2, α) m4 = 4(α3, 0) m5 = 3

73

Page 77: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

(α4, α6) m6 = 4(α5, α4) m7 = 2(α5, α2) m8 = 3(α5, α) m9 = 2(α5, 0) m10 = 2(α6, α5) m11 = 2(α6, α4) m12 = 3

Comparing Kotter-Vardy construction of set of points to interpolate poly-nomial Q(x, y) and original method for Guruswami-Sudan algorithm, it canbe observed that:

• number of points used to interpolation for RS(n, k) code can vary thann,

• the value of order of multiplicity of zeroes can vary from point to point.

Number of all iterations which must be done to interpolate polynomialQ(x, y) is as follows:

C =1

2

∑i=1

mi(mi + 1)

Maximal number of returned polynomials L during factorization of Q(x, y)polynomial can be expressed as:

L ≥ ∆1,k−1(C)

k − 1

∆wX ,wY (v) = minδ ∈ Z : NwX ,wY (δ) > vNwX ,wY (δ) = |xiyj : i, j ≥ 0 i iwX + jwY ≤ δ|

Example 4.24.For previous set of points and code RS(7, 3), weighted degree is (1, 2) w-revlex. Number of iterations is as follows:

C =1

2

∑i=1

mi(mi + 1) = 72

Minimal value of value of weighted degree δ, which satisfies that number ofmonomials of type xiyj is greater than 72 is as follows:

∆1,2(72) = minδ ∈ Z : N1,2(δ) > 72

Monomial x16, where deg1,2 = 16, is on 73th place on monomial list of order(1, 2) w-revlex, so:

∆1,2(72) = 16

74

Page 78: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Maximal number of returned polynomials is at least:

L ≥ 16

3− 1= 8

If there are given points to interpolate polynomial Q(x, y), their ordersof multiplicity of zeroes, maximal number of returned polynomials, then in-terpolation of Q(x, y) can be started.Modified Kotter algorithm for Kotter-Vardy algorithm is as follows:

1. Given is following input data:

• maximal number of returned polynomials L,• set of h points (αi, βi) for i = 1, 2, . . . , h, created by Kotter-

Vardy algorithm,• set of multiplicities of zeroes for each pointmi for i = 1, 2, . . . , h,• order (1, k − 1) w-revlex for RS(n, k) code,• set of ordered tables of pairs (r, s) for each point (αi, βi) – Ki fori = 1, 2, . . . , h.

2. Create L+ 1 polynomials gj(x, y) = yj, where j = 0, 1, . . . , L.3. Set variable i = 1, which will point number of current evaluated point

(αi, βi).4. If i > h, then go to point 14, else set point (a, b) = (αi, βi) and

continue.5. Set variable j = 1, which will point pair (r, s) in table Ki.6. If j >

(mi+1

2

), the increase variable i = i + 1 and return to point 4,

else set as current pair (r, s) = Ki[j].7. For each polynomial gj(x, y), where j = 0, 1, . . . , L, compute value

of discrepancy ∆j, which is used to modify polynomial gj(x, y):

∆j = Qr,sgj(a, b)

8. Create set J , which consists of indices j, where ∆j 6= 0.9. If set J is empty, then increase variable j = j + 1 and go to point 6,

else continue.10. In set J find polynomial of least weighted degree and remember its

index j∗:j∗ = arg mingj(x, y) : j ∈ J

11. Set two auxiliary variables:

f = gj∗(x, y) ∆ = ∆j∗

12. For each polynomial gj(x, y), where j ∈ J , do:

75

Page 79: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

• if j 6= j∗, compute:

gj(x, y) = ∆gj(x, y)−∆jf

• if j = j∗, compute:

gj(x, y) = ∆(x− a)f

13. Increase variable j = j + 1 and go to point 6.14. From set of polynomials gj(x, y), choose this one of least weighted

degree and return it:Q(x, y) = gj(x, y),

where degw gj(x, y) is least for j = 0, 1, . . . , L.Original Roth-Ruckenstein algorithm can be used to factorize polynomial

Q(x, y).

76

Page 80: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

5. ImplementationAlgorithms described previously were implemented in hardware and in

software. Following algorithms were implemented in software:

• cyclic decoding with use of remainder of division of received vector bygenerator polynomial,

• Peterson-Gorenstein-Zierler algorithm,• Berlekamp-Massey algorithm,• Sugiyama algorithm without erasures,• Sugiyama algorithm with erasures,• Forney algorithm and Chien search,• Guruswami-Sudan algorithm, and Kotter algorithm and Roth-Ruckenstein

algorithm for hard decoding,• Guruswami-Sudan algorithm, and Kotter-Vardy algorithm and modi-

fied Kotter algorithm for soft decoding.

Algorithms which were implemented in hardware:

• error trapping decoder,• Peterson-Gorenstein-Zierler algorithm,• Berlekamp-Massey algorithm,• Sugiyama algorithm,• Forney algorithm, Chien search.

Algorithms are based on mathematical functions of Galois fields, and therewere also implemented functions for polynomials of one and two variables,vectors and matrices.

a) b) c) d) e)

Figure 5.1: Symbols of elements: a) element which adds two elements offield or two polynomials, b) registers which holds one element of field, c)

element which divides two elements of field or two polynomials, d) elementwhich multiplies two elements of field or two polynomials, e) element which

gives out multiplicative inverse of element in field.

77

Page 81: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

a0

b0

a1

b1

a2

b2

c0

c1

c2

Figure 5.2: Adder for GF (8).

5.1 Arithmetic operations for Galois fields

Implementations of operations in Galois fields in hardware and softwareare different. It is mainly caused by representation of field elements. Insoftware Galois field elements are represented as positive integer numbers0, 1, 2, . . . , q − 1, and in hardware as binary vectors. There are used Galoisfields of characteristic 2. Characteristic of fields doesn’t complicate imple-mentation in software much, but it affects much hardware implementation. Insoftware implementation biggest field which can be used is GF (256), becauseelements are represented as bytes. Of course, elements can be representedby bigger data types than byte, but there was no need to use so big fields.Elements of GF (256) use all 8 bits of byte, and elements of fields less thanGF (256) waste some space. In software implementation there can be usedfields from GF (4) to GF (256), and for hardware implementation it is morestatic, because decoders are implemented just for one field.

In software implementation there are two solutions for multiplication ofGalois field elements: LUT tables and computing multiplication in real timewith use of Zech logarithm. LUT tables don’t require implementation ofarithmetic operations, and result of multiplication is read straight from mem-ory addressed by multiplication operands. The drawback is that data mustbe stored in memory. With increase of number of field elements, multipli-cation will work slower because data in cache memory is exchanged moreoften. However for field GF (256) number of elements which must be storedis (results of multiplication):

NLUT = 22m−1 − 3 · 2m−1 + 1

NLUT = 215 − 3 · 27 + 1 = 32768− 384 + 1 = 32385

78

Page 82: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

a1

a2

a0

b0

b1

b2

a2b2

a1b0

a0b1

a2b1

a1b2

a0b0

c0

c1

c2

Figure 5.3: Multiplication element for GF (8).

To store results of multiplication and addition there is needed 2 · 32385 =64770 bytes of memory, which is not so big constraint for current technology.

In the case of computing result in real time, there must be implementedunits which multiply and add elements of Galois field. Furthermore, there isneeded table of Zech logarithms values. Zech logarithms can be computedwith use of Imamura algorithm. For field GF (q) there must be stored qZech logarithms. For example, for GF (256) there must be stored 256 bytes.Addition in real time complicates structure of decoder, but it doesn’t requiremuch of memory, so it can be used in systems, where memory is limited.

For fields of characteristic 2 subtraction is equivalent to addition, so allsolutions of addition can be used for subtraction.

Division can be processed as multiplication of dividend and multiplicativeinverse of divisor. Multiplicative inverse of element x in Galois field GF (q)is q − x except for 1 it is 1. Then multiplication is done.

In hardware implementation elements of field are stored in registers. Reg-isters consist of flip flops, where one flip fop stores one bit of element vector.

79

Page 83: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For GF (2m) registers is of length m. There is used representation as poly-nomials for Galois field elements. Its advantage is that it’s easy to constructmultiplication units for this representation. Addition is done with use ofXOR function. Exemplary adder of two elements in GF (8) is shown on pic-ture 5.2. Each bit of the first operand is XOR’ed with adequate bit of secoindoperand. Multiplication can be done as multiplication of two polynomials.Let one of factor of product be a(x) = am−1x

m−1 + . . . + a1x + a0, and theother is b(x) = bm−1x

m−1 + . . . + b1x + b0. Operations are done in GF (2m)created by primitive polynomial p(x) = pmx

m+ . . .+p1x+p0. Multiplicationcan be expressed as follows:

c(x) = a(x)b(x) mod p(x)

Example 5.1.There will be designed multiplication unit for elements of field GF (8) createdby primitive polynomial p(x) = x3 + x + 1. Elements of GF (8) can berepresented as polynomials of type:

a2x2 + a1x+ a0

Multiplication can be expressed as:

c(x) = a(x)b(x) mod p(x)

c(x) = (a2x2 + a1x+ a0)(b2x

2 + b1x+ b0) mod (x3 + x+ 1)

c(x)=(a2b0+a1b1+a0b2+a2b2)x2+(a1b0+a0b1+a2b2+a2b1+a1b2)x+(a0b0+a2b1+a1b2)

Addition can be proceeded by XOR function, and multiplication can be donewith AND function. Multiplication unit for any two elements of field is shownon picture 5.3.

Sometimes there is need to multiply elements of Galois field by constant.Unit which multiplies elements by constant is less complicated than unitwhich multiplies any elements of field. To construct unit which multiplies byconstant, there must be known vector representation of constant and m linearindependent vectors for GF (2m). There are used to construct multiplicationunit by constant αc linear indenpendent vectors for elements 1, α, . . . , αm−1.

Taking into account table 5.1 there can be devised functions which willbe used to create multiplication unit by constant:

a(x)R(αc)(x) = b(x)

80

Page 84: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

100→ 100

010→ 101

001→ 111

110→ 011

011→ 110

111→ 001

101→ 010

a1

a2

a0 c0

c1

c2

Figure 5.4: Unit which computes multiplicative inverses in GF (8).

a

b

c

Figure 5.5: Division of element a by element b in field.

αi a0 a1 . . . am−1 αc+i b0 b1 . . . bm−1

1 1 0 . . . 0 αc b(1)0 b

(1)1 . . . b

(1)m−1

α 0 1 . . . 0 αc+1 b(α)0 b

(α)1 . . . b

(α)m−1

......

αm−2 0 0 . . . 1 αc+m−2 b(αm−2)0 b

(αm−2)1 . . . b

(αm−2)m−1

Table 5.1: Multiplication of linear independent vectors by constant.

81

Page 85: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

αi a0 a1 a2 α4+i b0 b1 b21 1 0 0 α4 0 1 1α 0 1 0 α5 1 1 1α2 0 0 1 α6 1 0 1

Table 5.2: Multiplication of vectors by constant α4.

b0 = b(1)0 a0 + b

(α)0 a1 + . . .+ b

(αm−2)0 am−1

b1 = b(1)1 a0 + b

(α)1 a1 + . . .+ b

(αm−2)1 am−1

...

bm−1 = b(1)m−1a0 + b

(α)m−1a1 + . . .+ b

(αm−2)m−1 am−1

Using these functions, there can be created multiplication unit by constant.

Example 5.2.There will be designed multiplication unit by constant α4 for field GF (8).Element α4 in polynomial representation is as follows:

R(α4)(x) = x2 + x

There are needed 3 linear independent vectors (here they are represented aspolynomials):

R(1)(x) = 1

R(α)(x) = x

R(α2)(x) = x2

Using table 5.2, there can be devised following equations:

b0 = 0 · a0 + 1 · a1 + 1 · a2b1 = 1 · a0 + 1 · a1 + 0 · a2b2 = 1 · a0 + 1 · a1 + 1 · a2

After elimination of not needed values:

b0 = a1 + a2

b1 = a0 + a1

b2 = a0 + a1 + a2

82

Page 86: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

a0

a1

a2

b0

b1

b2

Figure 5.6: Multiplication unit by constant α4 in GF (8).

Multiplication unit by constant α4 is shown on picture 5.6.

Computing multiplicative inverse of some element can be worked out assimple memory, which stores pairs of Galois field element and its multiplica-tive inverse. Exemplary unit which computes multiplicative inverse is shownon picture 5.4. There can be made reduction of stores pairs by half, becauseelements are first half elements is symmetric to the second half. Input ele-ment will be compared with two elements in pair and there will be returnedelement which is not equal to input element.

Division can be done as multiplication of multiplicative inverse of divisor.Division for Galois field elements is shown on picture 5.5.

5.2 Polynomials

Polynomials, whose coefficients are Galois fields elements, are broadlyused in Reed-Solomon decoders. The often used operations associated withpolynomials are:

• addition of polynomials,• multiplication of polynomials,• division of polynomials (Sugiyama algorithm),• computing remainder of polynomial division (cyclic decoding),• evaluation of polynomials.

Addition of polynomials can be done by addition of coefficients on thesame position in both polynomials.

Multiplication of polynomials gives as a result polynomial of degree ofsum of degrees of multiplied polynomials. On picture 5.7 there is shown unitfor multiplication of polynomials. One of the multiplication factors is polyno-

83

Page 87: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

. . . , an−1, an

bt bt−1 b0

. . . , cn+t−1, cn+t

Figure 5.7: Multiplication of polynomial a(x) by polynomial b(x). Theresult is polynomial c(x).

mial b(x) of degree t. On this position there can be placed any polynomial ofdegree not greater than t. If there is need that factor on this place is polyno-mial of degree m, where m < t, then on position b0 must be placed coefficientof this polynomial on position x0 and on next positions there is placed rest ofcoefficients. Positions from t to t−m+ 1 are filled with zeroes. All registersmust be filled with zeroes before polynomial multiplication. Combinationalunit for polynomial multiplication can be designed similar to multiplicationof two Galois field elements represented as polynomials.

Division of polynomials is base of Euclidean algorithm which is used inSugiyama algorithm. On picture 5.8 is shown unit for polynomial division.This unit is used also to compute remainder of polynomial division. Maximaldegree of divisor is t. Any polynomial of degree not greater than t can bedivisor. If divisor is of degree m, where m < t, then highest coefficient ofpolynomial is on position bt, and on lower positions is stored remainder ofcoefficients. Positions from t−m− 1 to 0 are filled with zeroes. All registersmust be filled with zeroes before division.

Evaluation of polynomial can be done by multiplication of coefficientswith consecutive powers of variable and after that sum of all products isdone. Number of multiplications can be reduced with use of Horner’s rule.Given is polynomial:

w(x) = atxt + . . .+ a1x+ a0

This polynomial can be also rewritten as:

w(x) = x(x(x(. . . x(atx+ at−1) + at−2) . . .) + a0

On picture 5.10 is shown unit, which sequentially evaluates polynomial, andon picture 5.9 is shown unit, which evaluates polynomial combinationally.

84

Page 88: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

b0 b1 bt

d0 dt−1

. . . , an−1, an

. . . , cn−t−1, cn−t

Figure 5.8: Division of polynomial a(x) by polynomial b(x). Result ofdivision is polynomial c(x) and remainder is polynomial d(x).

x

an

an−1

a1

a0

x x

a(x)

Figure 5.9: Combinational evaluation of polynomial with use of Horner’srule.

85

Page 89: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

. . . , an−1, an

x

a(x)

Figure 5.10: Sequential evaluation of polynomial with use of Horner’s rule.

Sequential unit’s registers must be filled with zeroes before polynomial eval-uation.

5.3 Error trapping decoder

Error trapping decoder decodes received vectors cyclically [9]. It is usedfor systematic RS(n, k) code with error correction capability of t. It consistsof four parts:

• syndrome register,• buffer register,• unit which checks Hamming weight of syndrome,• control unit.

Syndrome registers is built on division unit which divides received vector byg(x). It consists of 2t registers which store Galois field elements, not morethan 2t multiplication units and 2t addition units. There are processed twooperations, division of received vector by code generator, and also there iscomputed remainder of this division. Remainder of this division is syndromevector.

Buffer register consists of k registers which store Galois field elements.Unit which checks Hamming weight of syndrome is used to signal situa-

tion when Hamming weight of syndrome is less or equal to error correctioncapability t. It can be constructed as counter of ones and comparator. Ifgiven element of Galois field represented as vector is nonzero vector, then itcan be interpreted as element 1. To this transformation OR gate can be used.

86

Page 90: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

syndrome register

buffer register

control register

unit which

checks Hamming weight

r0, . . . , rn−2, rn−1

m0, . . . ,mk−2,mk−1

Figure 5.11: Error trapping decoder - general overview.

Next ones are counted and number of ones is compared with error correctioncapability of code.

Control unit is used to control buffers b1 and b2, and syndrome registersand buffer register. Control unit’s work is influenced by signals received fromunit which checks Hamming weight of syndrome register.

Error trapping decoding algorithm is as follows:

1. Fill all registers with zeroes.2. Fill buffer register and syndrome register in k cycles with information

elements of received vector. Freeze state of buffer register. Gate b1 isopen, and gate b2 is closed.

3. In the next n − k cycles feed syndrome register with remainder ofreceived vector.

4. Check Hamming weight of syndrome.

• if Hamming weight of syndrome is less or equal to error correctioncapability, then it means, that there are no errors or there arecontained within control elements of received vector. Open gateb2 and close gate b1. In next k cycles move out simultaneouslyelements from buffer register and syndrome register. Correcterrors if it is necessary.

• if Hamming weight of syndrome is greater than error correctioncapability, then continue.

5. Shift syndrome register in 1 ≤ i ≤ k cycles.

87

Page 91: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

αα3 α3

r0, . . . , r5, r6

y

y = 1;w(s) ≤ 2

s0 s1 s2s3

m0,m1,m2

b1

b2

Figure 5.12: Error trapping decoder for RS(7, 3) code with code generatorg(x) = x4 + α3x3 + x2 + αx+ α3.

Figure 5.13: Errors which are corrected during step 4 for RS(15, 5) code.With the red color there are marked positions, where error can occur, and

with green color are marked positions where error cannot occur.

88

Page 92: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Figure 5.14: Errors which are corrected during step 5 for RS(15, 5) code.With the red color there are marked positions, where error can occur, and

with green color are marked positions where error cannot occur.

Figure 5.15: Errors which are corrected during step 6 for RS(15, 5) code.With the red color there are marked positions, where error can occur, and

with green color are marked positions where error cannot occur.

89

Page 93: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Figure 5.16: Error trapping decoding for RS(15, 5). Syndrome register’sstate during first n = 15 cycles.

Figure 5.17: Shifting syndrome register until Hamming weight is less thanerror correction capability of code (pointed by red line).

• if during i-th cycle Hamming weight of syndrome is less or equalto error correction capability of code, then errors are contained onri−1, . . . , rn−k+i−1 positions of received vector. Gate b1 and b2 areclosed, syndrome register is frozen. From buffer register there aremoved out first i elements, then gate b2 is opened and syndromeregister is shifted out and eventually errors are corrected.

• if during 1 ≤ i ≤ k cycles Hamming weight was always higherthan error correction capability, then continue.

6. Shift syndrome register 1 ≤ j ≤ n− k times.

• if during j-th cycle Hamming weight of syndrome is less or equalto error correction capability of code, then errors are contained onr0, . . . , rj−1 and on rn−j−1, . . . , rn−1 positions. Gate b1 is closedand syndrome register is shifted n− k− j times. After that gateb2 is opened and with next cycles content of syndrome registerand buffer register are moved out.

7. If after n cycles there was found no syndrome with Hamming weightless or equal to error correction capability, then signal that there oc-cured non correctable error pattern.

90

Page 94: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Figure 5.18: Correction of received vector r(x) with syndrome register e(x).

Example 5.3.Given is code RS(15, 5) and following codeword:

c = ((1000), (0001), (1000), (0001), (0010), (1100), (0011), (1010),

(0101), (0010), (1110), (0011), (1100), (0001), (0100))

Error vector is as follows:

e = ((0000), (0100), (0000), (1110), (0000), (0000), (0000), (0000),

(0000), (0000), (0000), (0000), (0011), (0000), (1000))

Received vector is as follows:

r = ((1000), (0101), (1000), (1111), (0010), (1100), (0011), (1010),

(0101), (0010), (1110), (0011), (1111), (0001), (1100))

To buffer register are moved in following elements r0, . . . , r4:

(1000), (0101), (1000), (1111), (0010)

Entire received vector is shifted to syndrome register, what is is shown onpicture 5.16. There is checked Hamming weight of syndrome. It is greaterthan error correction capability of code t = 5, so syndrome register is cycli-cally shifted. First k = 5 shifts didn’t result with appropriate syndrome.Then syndrome is shifted j = 4 times more, what is shown on picture 5.17.There is found syndrome with Hamming weight less than error correctioncapability. Syndrome must be then shifted n− k− j times, which is 6 timesand then received vector is corrected, what is shown on picture 5.18.

Cyclic decoding with multithreading

Multithreading can be used to boost speed of cyclic decoding which isfinding remainder of division of received vector by code generator polynomial.This remainder should be of Hamming weight less or equal to error correctioncapability. Division of polynomials is not dependable from previous division,so this task can be splitted within threads. For example one thread candecode original received vector and second vector can decode received vectorshifted n

2times. First thread which finds solution, signals it, corrects received

vector and returns it.

91

Page 95: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

5.4 Peterson-Gorenstein-Zierler algorithm

Decoding with Peterson-Gorenstein-Zierler algorithms consists of threemain steps:

• finding number of errors,• finding positions of errors,• finding values of errors.

Finding number of errors can be done by computation of determinant ofmatrix M (v) (4.8) for v = t and then by checking whether matrix is invertibleor not. If matrix isn’t invertible then there is computed determinant formatrix M (v), where new v = t−1 etc. If matrix is invertible, then there mustbe solved set of equations 4.8. The result is polynomial, whose multiplicativeinverses of roots are positions of errors. Syndromes values and error positionsare used to compute error values.

As it was stated earlier, determinant of matrix can be computed withLaplace expansion. Laplace expansion is of complexity O(n!). To solve setof equations Gauss elimination is used.

For small values of error correction capability of RS(n, k) code it is easyto design combinational decoder [24].

Example 5.4.There will be designed combinational decoder forRS(7, 3) code. Error correc-tion capability is t = 2. There must be compute 2t = 4 values of syndromes.Combinational units to evaluation of polynomials will be used 5.9.

Next step is to compute number of errors. If syndromes values are zeroes,then there are no errors or error pattern cannot be recognized. If two errorsoccured then following set of equations must be solved:[

s1 s2s2 s3

] [Λ2

Λ1

]=

[−s3−s4

]Above set of equations can be rewritten as:

s1Λ2 + s2Λ1 = −s3s2Λ2 + s3Λ1 = −s4

Coefficients of error locator polynomial are:

Λ1 =−s1s4 + s2s3−s22 + s1s3

Λ2 =−s2s4 + s23s22 − s1s3

92

Page 96: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

It can be observed, that in denominators of coefficients is contained valueof determinant of M (2).

If one error occured, then there must be solved following equation:[s1] [

Λ1

]=[−s2

]Coefficient of error locator polynomial is:

Λ1 =−s2s1

Unit on picture 5.19 computes values of coefficients of error locator poly-nomial Λ(x) and computes number of occured errors. Following things canhappen according to occured errors:

• if values of syndromes are all zeroes, then there are no errors or errorpattern is not recognizable,

• if value s22 + s1s3 is not equal to zero, then there occured two errors,• if value s22 +s1s3 is equal to zero and value s2 is not equal to zero, then

one error occured,• if value s22 + s1s3 is equal to zero and value s2 is equal to zero and at

least one of syndromes is not equal to zero, then error pattern cannotbe corrected.

Computing zeroes of error locator polynomial can be done by use of combina-tional units which evaluate polynomial for all elements of Galois field exceptzero. For RS(n, k) code there are needed n units which compute zeroes.

When positions of errors are known, then there must be found values oferrors. There must be solved following set of equations:

s1 = ek1X1 + ek2X2 + . . .+ ekvXv

s2 = ek1X21 + ek2X

22 + . . .+ ekvX

2v

. . .

sv = ek1Xv1 + ek2X

v2 + . . .+ ekvX

vv

Error values can be rewritten as: For v = 1:

ek1 =s1X1

ek2 = 0

For v = 2:

ek1 =s2 + s1X2

X21 +X1X2

93

Page 97: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

s1

s2

s1

s4

s2

s3

s2

s2

s1

s3

s2

s4

s3

s3

s22 + s1s3

Λ1 for v = 1

0 for v = 0

Λ1 for v = 2

Λ2

for v = 2

0 for v < 2

Λ1

Λ2

Figure 5.19: Peterson-Gorenstein-Zierler decoder for RS(n, n− 4).

94

Page 98: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

X1

s1

s2

s1

X2

X1

X1

X1

X2

X2

X2

s2

s1

X2

ek1 for v = 1

ek1 for v = 2

0 for v = 0

0 for v < 2

ek2 for v = 2

ek1

ek2

Figure 5.20: Computing error values for RS(7, 3).

95

Page 99: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

r(α)

r(α2)

r(α3)

r(α4)

PGZ

algorithm

Λ(1)

Λ(α)

Λ(α2)

Λ(α3)

Λ(α4)

Λ(α5)

Λ(α6)

computingerror

valuesand

formingerrorvector

r(x) c(x)

Figure 5.21: Combinational decoder for RS(7, 3).

Figure 5.22: Exemplary result of work of decoder for RS(7, 3).

96

Page 100: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

ek2 =s2 + s1X1

X1X2 +X22

After computing error values, there must be constructed error vector andthis vector is then added to received vector in order to correct errors. Onpicture 5.20 there is shown unit which computes error values. On picture 5.21there is shown general project of decoder for RS(7, 3) code. On picture 5.22there is shown result of simulation from iSim software. Received vectors arecorrected within one cycle.

5.5 Berlekamp-Massey algorithm

Berlekamp-Massey algorithm computes error locator polynomial Λ(x) anduses syndromes for that. Schema of decoder for RS(n, n− 4) code is shownon picture 5.23. It consists of four registers, one to store value of discrep-ancy ∆ and other 3 registers to store coefficients of error locator polynomialΛ(x), auxiliary polynomial B(x) and syndrome vector. First, decoder com-putes value of discrepancy ∆, multiplying elements of syndrome vector bycoefficients of error locator polynomial Λ(x). In parallel, there are computedtwo new values of coefficients of auxiliary polynomial B(x). Multiplexer isused to choose one of these values and it depends on value of discrepancy ∆and result of 2L ≤ r − L. Length of LFSR can be determined by checkingcurrent degree of polynomial Λ(x). Multiplication by polynomial x can bedone by shifting second polynomial one time into higher position. The resultof decoder work is error locator polynomial Λ(x).

5.6 Sugiyama algorithm

Sugiyama algorithm computes error locator polynomial Λ(x) and errorevaluator polynomial Ω(x). It consists of 4 registers which store coefficientsof polynomials. There is also included unit for polynomial division. Resultsof algorithm are multiplied by constant A2,2(0). There is no need howeverto get rid off this constant, because roots of Λ(x) are still the same and inForney algorithm, these constants are reduced:

ekj = −Xj

A2,2(0)Ω(X−1j )

A2,2(0)Λ′(X−1j )= −Xj

Ω(X−1j )

Λ′(X−1j )

On picture 5.24 is shown Sugiyama algorithm.

97

Page 101: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

s1, s2, s3, s4

Λ(x)

B(x)

? ∆ = 0 and 2L ≤ r − L

x

x

. . . ,Λ1,Λ0

L = deg Λ(x)

Figure 5.23: Berlekamp-Massey algorithm for RS(n, n− 4).

98

Page 102: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

t(x) s(x)

A2,2(x)

A1,2(x)

A2,2(0)Λ0, . . .s(x)t(x)

A2,2(0)Ω0, . . .S(x)

Figure 5.24: Sugiyama algorithm.

5.7 Chien search

Chien search is used to find error positions. For consecutive elements ofGalois field 1, . . . , αq−2 there is checked whether evaluated element is root oferror locator polynomial. On picture 5.25 is shown design of Chien search.It was mentioned ealier, that element Λ0 is always 1, so it can be added tovalue of polynomial for Λ1, . . ..

5.8 Forney algorithm

Forney algorithm is used to find error values. To determine error value,there is needed derivative of error locator polynomial Λ′(x), error evaluatorpolynomial Ω(x) and error locators Xj. For Galois fields of characteristic 2derivative of Λ(x) can be computed as filling with zeroes all coefficients oneven positions of polynomials and then division of polynomial by polynomialx:

Λ′(x) =

∑j=0 Λjx

j

x; Λj = 0 : for j even

99

Page 103: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

α2

Λ1

Λ2

Λ(αi)

Figure 5.25: Chien search for RS(7, 3).

Polynomial Ω(x) is as follows:

Ω(x) mod x2t+1 = Λ(x)S(x)

It can be rewritten as:

Ω(x) =2t∑j=0

Djxj, where D(x) = Λ(x)S(x)

Operation modx2t+1 is done by omitting all coefficients on positions greaterthan 2t of polynomial. Forney algorithm for RS(7, 3) code is shown onpicture 5.26. It computes error values for all elements in Galois field exceptzero. Forney algorithm equation is as follows:

ekj = −Xj

Ω(X−1j )

Λ′(X−1j )

Values of polynomials Ω(x) and Λ′(x) are computed for consecutive elements1, α, . . . , α6. Elements Xj are then as follows: 1, α6, α5, . . . , α.

5.9 Guruswami-Sudan algorithm

Gurusuwami-Sudan algorithm decodes received vector by interpolationof polynomial of two variablies and then factorization of this polynomial.

100

Page 104: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Λ1

Ω1

α

Ω2

α2

Ω3

α3

Ω4

α4

1α6

ekj

Figure 5.26: Forney algorithm for RS(7, 3).

101

Page 105: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

During implementation of Guruswami-Sudan algorithm there were writtenfunctions which are used to operate on polynomials of two variables, likedetermining degree of polynomial, evaluation of polynomial or multiplicationof polynomial. Polynomials of two variables are ordered for variable y:

Q(x, y) = y0(w0(x)) + y1(w1(x)) + y2(w2(x)) + . . .

In order to find degree of polynomial for some order, there must be choosenmonomial from this polynomial of greatest degree:

degwQ(x, y) = maxdegw yi(wi(x))

To check if polynomial Q(x, 0) is equal to zero, then there must be checkwhether polynomial w0(x) is equal to zero.

To determine error correction capability of algorithm and maximal num-ber of returned results, there must be known positions of monomial of typexi and yj on ordered list of monomials. Such list can be created by listingmonomials xiyj in some order (1, k − 1) w-revlex. To find position of somemonomial xiyj on this list, there is done simple search and when monomialis found then its position is returned. Size of list increases together with k.Furthermore, this list contains many monomials which are not needed, soplace is wasted.

It can be observed positions of monomials xi are regular and they generatea sequence. For order (1, 2) w-revlex:

Ind(x0) = 0,

Ind(x1) = 1(+1), Ind(x2) = 2(+1),

Ind(x3) = 4(+2), Ind(x4) = 6(+2),

Ind(x5) = 9(+3), Ind(x6) = 12(+3),

Ind(x7) = 16(+4), Ind(x8) = 20(+4),

Ind(x9) = 25(+5), Ind(x10) = 30(+5),

Ind(x11) = 36(+6), Ind(x12) = 42(+6)

102

Page 106: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

For order (1, 4) w-revlex:

Ind(x0) = 0,

Ind(x1) = 1(+1), Ind(x2) = 2(+1), Ind(x3) = 3(+1), Ind(x4) = 4(+1)

Ind(x5) = 6(+2), Ind(x6) = 8(+2), Ind(x7) = 10(+2), Ind(x8) = 12(+2)

Ind(x9) = 15(+3), Ind(x10) = 18(+3), Ind(x11) = 21(+3), Ind(x12) = 24(+3)

Function which determines position of monomial xj on ordered list fororder (1, k − 1) w-revlex is as follows:

Dane wejsciowe: order (1, k - 1) w-revlex,

exponent j of monomial x^j

int order = 0; //position on the list

int counter = k - 1; //variable which is used to increase

//value which is added to position

//during iterations

int add_value = 1; //value which is added to position

//during iterations

for(int i = 0; i < j; i++)

order = order + add_value;

counter--;

if(counter == 0)

counter = k - 1;

add_value = add_value + 1;

return order;

For monomials of type yj first positions on the list of order (1, 4) w-revlexare as follows:

Ind(y0) = 0, Ind(y1) = 5(+1 + 4), Ind(y2) = 14(+1 + 4 + 4),

Ind(y3) = 27(+1 + 4 + 4 + 4), Ind(y4) = 44(+1 + 4 + 4 + 4 + 4),

Ind(y5) = 65(+1 + 4 + 4 + 4 + 4 + 4)

For order (1, 2) w-revlex:

Ind(y0) = 0, Ind(y1) = 3(+1 + 2), Ind(y2) = 8(+1 + 2 + 2),

Ind(y3) = 15(+1 + 2 + 2 + 2), Ind(y4) = 24(+1 + 2 + 2 + 2 + 2),

Ind(y5) = 35(+1 + 2 + 2 + 2 + 2 + 2)

103

Page 107: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Dane wejsciowe: order (1, k - 1) w-revlex,

exponent j of monomial y^j

if(j == 0)

return 0;

int add_value = k; //value which is added to position

//during iterations

int order = 0; //position on the list

for(int i = 0; i < j; i++)

order = order + add_value;

add_value = add_value + k - 1;

return order;

104

Page 108: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

6. Evaluation6.1 Simulation setup

Implemented algorithms are tested in order to evaluate time of decoding,because this variable describes mostly computional complexity of algorithms:

• number of errors in received vectors,• length of codeword,• number of control elements,• value of order of multiplicity of zeroes (Guruswami-Sudan algorithm),• noise intensity in received vector (soft Guruswami-Sudan algorithm -

Kotter-Vardy algorithm).

The focus was mainly on testing of software implementation. To check howmuch time decoders were working, there was used class CStopWatch [20]. Tosimulate algorithms implemented in hardware, there was used iSim simulator,which is part of Xilinx ISE Webpack. Results of tests and conclusions arewritten in the next part of this chapter.

There were done 100 iterations for each experiment case and mean fromreturned values is given as final result. Simulator lets to specify followingproperties of code:

• length of codeword,• field used to create code,• number of control elements,• number of occured errors,• noise in communication channel.

All independent variables except noise in communication channel are appliedto all decoding algorithms. Noise in communication is applied only for softdecoding Guruswami-Sudan algorithm, because only this algorithm can usesoft information.

Returned results from decoders are compared with original codeword inorder to check whether decoding process was correct. There is also returnedstatus information which determines if received vector was without errors orthere occured errors and they were corrected or there occured errors and theycannot be corrected. Another variable which describes decoding process istime of decoding.

105

Page 109: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

7. Results and discussion7.1 Cyclic decoding

Cyclic decoding is done by searching some remainder of division of re-ceived vector by code generator polynomial. To find appropriate remainder,sometimes received vector must be shifted some times and division must beprocessed. If there is the same probability that errors occur on some position,then average there must be done about n

2shifts for RS(n, k), so decoding

takes more time with increase of length of codeword.Degree of code generator polynomial is associated with error correction

capability. If error correction capability is higher, then there must be done di-vision on longer polynomials. Remainder from division covers more elementsin received vector when error correction capability increases. For small codeslike RS(7, 5) or RS(7, 3) time of decoding can differ much, but with increaseof information elements in code, the difference is less. On picture 7.4 is showngraph for 3 codes of constant codeword length, but variable information el-ements in codeword. With increase of information elements, degree of codegenerator polynomial is smaller, and thus, division takes more time.

Cyclic decoder in hardware implementation consists of 4 parts:

• syndrome register,• buffer register,• unit which checks Hamming weight of syndrome,• control unit.

Syndrome register becomes bigger together with error correction capabil-ity. It consists of division unit with 2t registers for Galois field elements, atleast 2t multiplication elements by constant and 2t addition elements. Withincrease divisor by 1, there is added 1 register for Galois field element, 1multiplication element and 1 addition element.

Buffer register consists of k registers for Galois field elements. It becomesbigger linearly with increase of information elements in code.

Unit which checks Hamming weight of syndrome must recognize moresyndrome patterns when error correction capability increases, so unit be-comes more complicated.

Cyclic decoding has a drawback, that errors must be contained within2t consecutive positions on received vector. For 1 error patterns it is noconstraint, but for 2 error patterns this is possible that no error patternswill be corrected, altough code theoreticaly should correct there errors. Ongraphs 7.1, 7.2 and 7.3 there are shown times of decoding for 3 codes RS(n, k)and amount of received vectors which were decoded not correctly. It can

106

Page 110: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

number of errors

tim

eof

dec

odin

g[s]

0 1 2 3 40

2

4

6

8

10

12

14RS(31, 23)

0%

52%80%

92%

Figure 7.1: Cyclic decoding for RS(31, 23) with amount in % of notcorrected received vectors.

number of errors

tim

eof

dec

odin

g[s]

0 1 2 3 40

306090

120150180210240270

RS(63, 55)

0%

80%

98% 99%

Figure 7.2: Cyclic decoding for RS(63, 55) with amount in % of notcorrected received vectors.

107

Page 111: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

number of errors

tim

eof

dec

odin

g[s]

0 1 2 3 40

1 RS(15, 7)

0%

0%

28%66%

Figure 7.3: Cyclic decoding for RS(15, 7) with amount in % of notcorrected received vectors.

number of information elements k

tim

eof

dec

odin

g[s]

1 3 5 7 9 11 130123456789

RS(15, k)

RS(31, k)

RS(63, k)

Figure 7.4: Cyclic decoding for RS(15, k), RS(31, k), RS(63, k).

108

Page 112: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

be observed, that decoding time for RS(63, 55) is about 10 times longerthan for code RS(31, 23) and about 90 times longer than for RS(15, 7) code.All of these codes have the same error correction capability. The factorwhich influences time of decoding is that for longer codes there must be conemore shifts to find appropriate remainder from division, and for longer codesdivision is done on longer polynomials. It can be also observed that amountof not correctly decoded received vectors increases with length of codeword.For example for RS(15, 7) there doesn’t exist error pattern with 1 or 2 errorswhich cannot be correct, but it doesn’t correct all 3 error patterns. It is worsefor longer codes, RS(65, 55) cannot correct about 80% of error patterns with2 errors, however theoretically it can correct up to 4 errors.

Decoding can be boosted with use of multithreading. In the worst casethere must be done n− 1 shifts in order to correct received vector. Divisionsof polynomials can be split between 2 or more threads. On graph 7.5 thereis shown that two threads can speed up decoding.

error position

tim

eof

dec

odin

g[s]

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 300

2

4

6

8

10

12

14

16

18

20

1 thread

2 threads

Figure 7.5: Cyclic decoding with multithreading.

7.2 Computing error positions

To compute error positions are used following 3 algorithms:

• Peterson-Gorenstein-Zierler algorithm,• Berlekamp-Massey algorithm,

109

Page 113: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

length of codeword n, r=6

tim

eof

dec

odin

g[s]

15 31 63 127 2550

0.002

0.004

0.006

0.008

0.01classic method

Horner’s rule

Figure 7.6: Computing syndromes with classic method and with Horner’srule.

• Sugiyama algorithm with erasures and without erasures.

These algorithms can correct number of errors up to theoretical error correc-tion capability.

Input data for algorithms are 2t syndromes. Syndromes can be computedwith classic method by multiplying all coefficients of received vector by pow-ers of variable and sum of all products. Horner’s rule can be used to reducenumber of multiplications and boost syndrome computing. On graph 7.6is shown difference between computing syndromes with classic method andwith Horner’s rule. Syndromes can be computed with use of sequential andcombinational units.

7.2.1 Peterson-Gorenstein-Zierler algorithm

Peterson-Gorenstein-Zierler algorithm consists of two main steps: com-puting number of errors and finding positions of errors. Computing numberof errors can be done by computing determinant of matrix. There was usedLaplace expansion for this task with complexity O(n!), but there exist fasteralgorithms to solve this task for example Sarrus method. Next, there issolved set of equations in order to find positions of errors. There was usedGaussian elimination for this task. On picture 7.7 is shown graph for codeRS(31, 31 − 2t), where error correction capability is variable. Time of de-

110

Page 114: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

error correction capability t

tim

eof

dec

odin

g[s]

1 2 3 4 5 6 7 8 9 10 110

60

120

180

240

300

360

420

480

540

600

RS(31, 31 - 2t)

Figure 7.7: PGZ algorithm and error correction capability.

coding up to t = 8 is constant in presented time dimension, but for t > 8 itincreases fast.

For codes of small error correction capability there can be designed notmuch complicated decoders. Example of design of such decoder was pre-sented in last chapter. Error correction capability influences complexity ofdecoder. To compute roots of error locator polynomial, there can be usedcombinational units for polynomial evaluation. For RS(n, k) there must bechecked n − 1 elements of GF (n + 1), so there must be used n − 1 unitsof combinational polynomial evaluation, what becomes problem for longercodes. There must be also used n addition elements which add error vectorwith received vector in order to correct errors.

7.2.2 BMA algorithm and Sugiyama algorithm

Berlekamp-Massey algorithm within 2t iterations constructs error locatorpolynomial. Number of iterations is constant and is not dependent from num-ber of occured errors. Sugiyama algorithm computes error locator polynomialwithin e iterations, where e denotes number of errors, so number of iterationsis variable. With increase of error correction capability, Berlekamp-Masseyalgorithms needs more iterations to construct error locator polynomial, andSugiyama algorithms employs longer polynomials in division. On picture 7.8is shown how error correction capability affects (63, 63 − 2t) code decoding

111

Page 115: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

error correction capability t

tim

eof

dec

odin

g[s]

1 3 5 7 9 11 13 15 17 19 21 230

1

2RS(63, 63 - 2t)

Figure 7.8: BMA algorithm for codes of variable error correction capability.

error correction capability t

tim

eof

dec

odin

g[s]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 150

0.2

RS(63, 63 - 2t) - 1 error

RS(63, 63 - 2t) - 2 errors

Figure 7.9: Sugiyama algorithm for RS codes of variable error correctioncapability.

112

Page 116: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

number of errors in received vector

tim

eof

dec

odin

g[s]

1 2 3 4 5 6 7 8 9 10 11 12 13 140

1

BMA algorithm

Sugiyama algorithm

Figure 7.10: Berlekamp-Massey algorithm and Sugiyama algorithm forRS(63,3) and variable number of errors in received vector.

for Berlekamp-Massey algorithm, and on picture 7.9 is shown Sugiyama al-gorithm for code of variable error correction capability and for the cases of 1and 2 errors. It can be observed, that increase of error correction capabilityinfluences much Berlekamp-Massey algorithm, but not Sugiyama algorithm.However decoding time for Sugiyama algorithm is dependent from numberof occured errors. On picture 7.10 are compared Berlekamp-Massey andSugiyama algorithms for variable number of errors. It can be observed tofor small number of errors Sugiyama algorithm works faster, but time ofdecoding increases together with number of errors. For Berlekamp-Masseyalgorithm time is constant.

It can be observed that for next iterations of Berlekamp-Massey algorithmthere are needed consecutive syndromes s1, s2, . . . , s2t. In first iteration thereis needed s1, in second s1 and s2 and so on. Decoder can work in parallel withsyndrome computation unit. If iteration in Berlekamp-Massey algorithmlasts for 1 cycle, then syndrome computation and error locator computationwill take 2t+ 1 cycles.

Sugiyama algorithm returns error locator polynomial and also error eval-uator polynomial. Berlekamp-Massey returns only error locator polynomial,so there must be still computed error evaluator polynomial.

Time decoding can be speeded up by use of erasures. It requires that re-

113

Page 117: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

number of errors

tim

eof

dec

odin

g[s]

1 2 3 4 5 6 7 8 9 10 11 120

1

RS(31, 7) with erasures

RS(31, 7) without erasures

Figure 7.11: Comparision of decoding with erasures and without erasures.For case with erasures, number of true errors (one symbol was changed to

another symbol) is equal to number of errors, and for case without erasuresnumber of errors and erasures is equal to half of number of errors.

ceivers understund erasures. Erasures give additional knowledge, it is knownwhere errors occured before starting of decoding. Moreover, more erroneouspositions can be corrected. There was implemented modified Sugiyama al-gorithm for erasures. Decoding is faster as it is shown on picture 7.11. Forthe same number of erroneous positions, there are needed less iterations.However algorithm is a bit more complicated.

7.3 Computing error values

Error values can be computed by solving set of equation with use ofGaussian elimination. Another method is to use Forney algorithm. Forneyalgorithm uses derivative of error locator polynomial and error evaluatorpolynomial. It is computed for each error position. On picture 7.12 thereare compared Forney algorithm and Gaussian elimination. Forney algorithmsolves problem by evaluation of polynomial, Gaussian eliminations solve setsof equations. Gaussian elimination can be better for codes of small errorcorrection capability, but Forney algorithm has advantage when codes arelonger.

Forney algorithm can work in parallel with Chien search. In the sametime are computed error positions and error values. Chien search determineswhether position is erroneous or not.

114

Page 118: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

number of errors

tim

eof

dec

odin

g[s]

1 3 5 7 9 11 13 15 170

0.6 Gaussian elimination

Forney algorithm

Figure 7.12: Comparision of Gaussian elimination and Forney algorithm.

7.4 Guruswami-Sudan algorithm

Guruswami-Sudan algorithm consists of two steps:

• interpolation step,• factorization step.

Interpolation step is solved by Kotter algorithm. Its complexity is dependentfrom number of points which are used for interpolation and from order ofmultiplicity of zeroes for these points.

Order of multiplicity of zeroes influences error correction capability ofalgorithm and also time of decoding. On graph 7.13 is shown how order ofmultplicity of zeroes affects error correction capability. It can be observed,that for smaller values of m it is easier to improve error correction capabilityfor codes with greater number of control elements. For codes with less numberof control elements improvement is worse.

On picture 7.14 is shown how order of multiplicity of zeroes affects time ofdecoding. When parameter m increases, then time of decoding increases also.For constant m for all points complexity for Guruswami-Sudan algorithm isO(n2m4) [7].

Kotter-Vardy algorithm is used to transform soft information to hardinformation, which is then used by Guruswami-Sudan decoder.

Example of corrected vector for original codeword of RS(7, 3):

c(x) = α5x6 + α6x4 + αx2 + α6x+ α5

115

Page 119: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

order of multiplicity of zeroes m

erro

rco

rrec

tion

capab

ilit

yof

GS

algo

rith

m

1 2 3 4 5 6

123456789

10111213141516

RS(31, 19)

RS(31, 15)

RS(31, 11)

RS(31, 7)

Figure 7.13: Error correction capability and multiplicity of zeroes.

order of multiplicity of zeroes m

tim

eof

dec

odin

g[s]

1 2 3 4 5 60

90

180

270

360

450

540

630

720

810

900 RS(31, 23)

Figure 7.14: Time of decoding and order of multiplicity of zeroes.

116

Page 120: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Received vector with 6 errors:

r = ((−0.718,−0.958,−1.926), (−1.203,−1.894,−0.145),

(0.799,−0.033,−0.868), (−0.269, 0.965, 0.825), (0.054,−1.471, 1.874),

(−0.281, 2.204, 1.537), (−2.24,−1.753, 0.013))

Transformation of soft received vector to hard received vector, that values< 0 are changed to 1, and values ≥ 0 are changed to 0:

r(x) = α6x6 + x5 + α2x4 + x3 + α4x2 + α5x+ α5

Result of Guruswami-Sudan algorithm:

w1(x) = α3x2 + α6x+ 1

w2(x) = x2 + α2x+ α

Algorithm was able to crrect 6 errors in received vector of RS(7, 3) code.Possibility of error correcting depends on noise which disrupted codeword.Algorithm works good, if given value is more or less equally between −1 and1. Furthermore, modulation can affect decoding and also method which com-putes reliability matrix. Error correction capability of algorithm is variableand it depends on occured errors. During tests for RS(7, 3) code algorithmcould correct all 3 error patterns, often 4 errors patterns, and seldom errorpatterns with greater number of occured errors.

7.5 Summary

Summarizing this chapter, there are given answers for research questionsstated before writing master thesis:

Question: What are the features of scalability and complexity of imple-mented algorithms?Answer: Cyclic decoding algorithm is not always able to correct all validerror patterns, however theoretically it should be able to do it. Errors mustbe contained within 2t consecutive positions of received vector in order to becorrected. Cyclic decoding algorithm is able to correct all error patterns of 1error. Time of decoding depends on error correction capability of code andlength of codeword. With increase of error correction capability there mustbe executed less divisions in order to decode received word. With increaseof codeword length there must be executed on average more divisions anddivision takes more time, because dividend is of higher degree.

117

Page 121: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Peterson-Gorenstein-Zierler algorithm is able to correct all error patternsindependently from error positions. It is not practical (due to time of decod-ing in software implementation) for codes of high error correction capability(for tests it was t > 8), because time of decoding increases fast as errorcorrection capability increases. For codes of small error correction capability(for tests t = 2), there can be constructed efficient decoders in hardware. Forcodes of higher error correction capability decoders become much more com-plex, because additional circuits are needed. Time of decoding depends onerror correction capability and number of errors (software implementation),but it doesn’t depend on length of codeword and number of information ele-ments. With increase of error correction capability there must be computeddeterminants of bigger matrices. If number of errors decreases, then theremust be computed determinents of higher number of matrices. Complexityof algorithm is dependent from method of computing determinant of matrixand from method used to solve set of equations.

Berlekamp-Massey algorithm decodes received vector within constant num-ber of iterations, which is dependent from error correction capability. Timeof decoding depends on error correction capability. It doesn’t depend onlength of codeword, number of occurred errors and number of informationelements. Algorithm decodes received vector within 2t iterations.

Sugiyama algorithm decodes received vector within variable number ofiterations, which is determined by number of occurred errors in receivedvector. Algorithm computes also error evaluator polynomial. Sugiyama al-gorithm employs division of polynomials, which is time-consuming operation.Time of decoding depends on number of occurred errors in received vectorand on error correction capability, it doesn’t depend on length of codeword,number of information elements. With increase of number of errors theremust be executed more iterations of division of polynomials.

Guruswami-Sudan algorithm is able to correct more errors than it the-oretically should be. Time of decoding depends on length of codeword andorder of multiplicity of zeroes.Question: What mathematical functions and modifications on algorithmlevel can improve performance of decoding algorithms?Answer: Addition in Galois fields can be done in real time with use ofZech logarithms. Imamura algorithm can be used to compute values of Zechlogarithms.

Using erasures can cause that decoder is able to correct more erroneouspositions in received vector. However decoder is then more complicated, buton average it can decode faster.

Computing of orders of monomials of type xi and yj can be described asproblem of computing next values of arithmetic progression.

118

Page 122: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Question: Which features of software and hardware can improve perfor-mance of decoding algorithms?Answer: Multithreading can speed up cyclic decoding. Decoding processcan be done by independently working threads. Decoding process is finishedwhen one of these threads manages to decode received vector.

Addition and multiplication can be implememented with using LUT ta-bles or computing results in real time. LUT tables dont’t require imple-mentation of arithmetic functions for Galois fields, but they require memory.Computing results in real time requires implementation of Galois field arith-metic, but it requires less memory, just to store Zech logarithms.

Berlekamp-Massey algorithm can work in parallel with syndrome com-puting unit. If one iteration in Berlekamp-Massey algorithm takes time ofone cycle and syndrome unit computes syndrome value within one cycle, thencomputation of error locator polynomial takes 2t+ 1 cycles.

119

Page 123: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

8. Conclusions and future workThere are several decoding algorithms of Reed-Solomon code which have

different approaches for the same task. It’s hard to say which algorithm is thebest at all, for example Guruswami-Sudan algorithm can correct more errorsthan other algorithms, but is also of biggest complexity, Peterson-Gorenstein-Zierler algorithm can be efficiently implemented for small codes, Berlekamp-Massey algorithm works constant time for any valid number of errors, butwork of similar algorithm, which is Sugiyama algorithm, is dependent fromnumber of errors. Each of evaluated algorithms have some advantages anddisadvantages. Evaluation of algorithms gives answer for choice of decodingalgorithm according to system requirements.

Except evaluated decoding algorithms there some more which weren’tmentioned here like Welch-Berlekamp algorithm [23], GMD algorithm [22]or Jiang-Narayanan algorithm [21]. Not all algorithms were implemented inhardware, furthermore evaluated were codes with length up to 255. Thesethings can be objects of future researches.

120

Page 124: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

Bibliography[1] I. S. Reed, G. Solomon, Polynomial Codes Over Certain Finite Fields,

Journal of Society for Industrial and Applied Mathematics, vol.8, no.2,pp.300-304, 1960.

[2] W. W. Peterson, Encoding and Error-Correction Procedures for theBose-Chaudhuri-Codes, Information and Theory, vol.6, no.4, pp.459-470, 1960.

[3] D. Gorenstein, N. Zierler, A Class Of Error-Correcting Codes In pm

Symbols, Journal of the Society for Industrial and Applied Mathematics,vol.9, no.2, pp.207-214, 1961.

[4] E. Berlekamp, Non-binary BCH Decoding, Information Theory, IEEETransactions on, vol.14, no.2, p.242, 1968.

[5] J. L. Massey, Shift-Register Synthesis and BCH Decoding, InformationTheory, IEEE Transactions on, vol.15, no.1, p.122, 1969.

[6] R. Singleton, Maximum distance q-nary codes, Information Theory,IEEE Transactions on, vol.10, no.2, pp.116-118, 1964.

[7] R. J. McEliece, The Guruswami-Sudan decoding algorithm for Reed-Solomon codes, IPN Progress Report, Tech. Rep. 42–153, 2003.

[8] S.-W. Lee, B. V. K. V. Kumar, Application of Soft-Decision Decodersto Non Narrow-Sense Reed-Solomon Codes, Communications,IEEE International Conference on, 2007.

[9] W. Mochnacki, Kody korekcyjne i kryptografia, Oficyna WydawniczaPolitechniki Wroc lawskiej, 2000.

[10] J. Biernat, Wyk lady z przedmiotu Kodowanie i szyfrowanie danych,Politechnika Wroc lawska, 2009.

[11] T. Jurlewicz, Z. Skoczylas, Algebra liniowa 1. Definicje, twierdzenia,wzory, Oficyna Wydawnicza GiS, 2000.

[12] T. K. Moon, Error correction coding: mathematical methods andalgorithms, 2005.

[13] R. T. Chien, Cyclic Decoding Procedures forBose-Chaudhuri-Hocquenghem Codes, Information Theory,IEEE Transactions on, vol. 10, no.4, pp.357-363, 1964.

121

Page 125: Decoding algorithms of Reed-Solomon code - DiVA portal833161/FULLTEXT… ·  · 2015-06-30Decoding algorithms of ... Reed-Solomon code is also cyclic code, so decoding algorithms

[14] R. E. Blahut, Algebraic Codes for Data Transmission, CambridgeUniversity Press, 2003.

[15] R. E. Blahut, Algebraic Codes on Lines, Planes and Curves, CambridgeUniversity Press, 2008.

[16] K. Imamura, A method for computing addition tables in GF (pn),Information Theory, IEEE Transcations on, vol.26, no.3, p.367, 1980.

[17] L. Chen, R.A. Carrasco, E.G. Chester, Decoding Reed-Solomon codesusing the Guruswami-Sudan algorithm, Proc. 5th IEEE InternationalSymposium of Communication Systems, Networks and Digital SignalProcessing (CSNDSP), 2006.

[18] R. A. Carrasco, M. Johnston, Non-binary error control coding for wire-less communication and data storage, Wiley, 2008.

[19] R. Koetter, A. Vardy, Algebraic Soft-Decision Decoding of Reed-SolomonCodes, Information Theory, IEEE Transactions on, vol.49, no.11,pp.2809-2825, 2003.

[20] D. Bolton, How do I do High Resolution Timing in C++ on Windows?,http://cplus.about.com/od/howtodothingsi2/a/timing.htm

[21] J. Jiang, K. R. Narayanan, Iterative Soft Decoding of Reed-SolomonCodes, IEEE Communications Letters, vol.8, no.4, pp.244-246, 2004.

[22] G. Forney, Generalized minimum distance decoding, Information Theory,IEEE Transactions on, vol.12, no.2, pp. 125-131, 1966.

[23] L. R. Welch, E. Berlekamp, Error correction for algebraic block codes,US Patent, Number 4,633,470, 1986.

[24] S.-F. Wang, H.-Y. Hsu, A.-Y. Wu, A very low-cost multi-mode ReedSolomon decoder based on Peterson-Gorenstein-Zierler algorithm, SignalProcessing Systems, IEEE Workshop on, pp.37-48, 2001.

[25] S. Czynszak, Proposal for Master Thesis in Computer Science, 2011.

[26] B. Vucetic, V. Ponampalam, J. Vuckovic, Low Complexity Soft DecisionDecoding Algorithms for Reed-Solomon Codes, IEICE Trans. Commun.,Vol. E84-B, No. 3, 2001.

[27] H.-C. Chang, C. B. Shung, New Serial Archtecture for Berlekamp-Massey Algorithm, IEEE Transactions on Communications, Vol. 47, No.4, 1999.

122