Error Coding Reed Solomon
Error Coding Reed Solomon
Error Coding Reed Solomon
1
results on the mathematical structure of the codes as well as a number of very
efficient coding techniques.
Consequently, steady increase in use of error- control coding in a variety of digital
communication systems.
The basic theorems of information theory not only mark the limits of efficiency in
communication performance but also define the role that coding plays in achieving
these limits. [4]
Shannon’s 1948 paper presented a statistical formulation of the communication
problem, unifying earlier work. Shannon’s results showed that as long as the
information transmission rate is below capacity, the probability of error in the
information delivered can in principle be made arbitrarily low by using sufficiently
long coded transmission signals and according to this result, this thesis is based
relating to the use of Reed Solomon Codes. Thus, noise limits the achievable
information communication rate but not the achievable accuracy. [4]
2
1.2.3 Soft-Decision Decoding
Channel noise is almost always a continuous phenomenon. What is transmitted may
be selected from a discrete set, but what is received comes from a continuum of
values. This leads to the soft-decision decoder (SDD), which accepts a vector of real
samples of the noisy channel output & estimates the vector of channel input symbols
that was transmitted. Hard decision decoders are available, but performance is limited.
Soft decision decoding algorithms have a trade off between performance optimality
and decoding complexity.
By contrast the hard –decision decoder (HDD) requires that its input be from the same
alphabet as the channel input.
On a memory less channels, the noise affects each transmitted symbol independently.
[4] Each transmitted bit has a probability p of being received incorrectly & a
probability 1-p of being received correctly independently of other transmitted bits.
Hence transmission errors occur randomly in the received sequence & memory less
channels are called random- error channels. Good examples of random-error
channels are the deep-space channel & many satellite channels. The codes devised for
correcting random errors are called random-error-correcting codes.
On channel with memory, the notice is not independent from transmission to
transmission. Consequently, transmission errors occur in clusters or bursts because of
3
the high transition probability in the bad state, and channels with memory are called
burst-error channels.
Finally, some channel contains a combination of both random & burst. These are
called compound channel.
4
In the decades since their discovery, Reed Solomon has enjoyed countless
applications, from compact discTM players to spacecraft that are now well beyond the
orbit of Pluto.
Reed Solomon codes have been an integral part of the telecommunications revolution
in the last half of the twentieth century.
A Reed Solomon code of length q and dimension k can thus correct up to t errors,
where t is as follows 2t < q-k+1. In 1964, Singleton codes showed that this was the
best possible error correction capability for any code of the same length & dimension.
Codes that can achieve “optimal” error correction capability are called maximum
distance separable (MDS). Reed Solomon codes are by far the dominant members,
both in number and utility, of the class of MDS codes.
Reed Solomon’s original approach to constructing their codes fell out of favour
following the discovery of the “Generator Polynomial Approach”. At the time, it was
felt that the latter approach led to better decoding algorithms.
Yaghoobian and Blake began considered Reed Solomon’s construction from an
algebraic geometric perception.
After the discovery of Reed-Solomon codes, a search began for an efficient decoding
algorithm. In their 1960 paper, Reed and Solomon proposed a decoding algorithm
based on the solution of sets of simultaneous equations.
In 1960, Peterson provided the first explicit description of a decoding algorithm for
binary BCH codes. This algorithm is quite useful for correcting small numbers of
errors but becomes computationally intractable as the number of errors increases.
The Breakthrough came in 1967 when Berlekamp demonstrated his efficient decoding
algorithm for both nonbinary BCH and Reed-Solomon codes. Berlekamp’s algorithm
allows for the efficient decoding of dozens of errors at a time using very powerful
Reed-Solomon codes. Massey showed that the BCH decoding problem is equivalent
to Berlekamp’s algorithm and demonstrated a fast shift register-based encoding
algorithm for BCH and Reed-Solomon codes that is equivalent to Berlekamp’s
algorithm, which is referred as Berlekamp-Massey algorithm.
In 1975 Sugiyama, Kasahara, Hirasawa, and Namekawa showed that Euclid’s
algorithm can also be used to efficiently decode BCH and Reed-Solomon codes.
2.1.1 Galois Field
In abstract algebra, a finite field or Galois field (so named in honour of Évariste
Galois) is a field that contains only finitely many elements. Finite fields are important
in number theory, algebraic geometry, Galois Theory, cryptography, and coding
theory. As set is an arbitrary collection of objects, or elements, without any predefined
operations between set elements. [4]
The finite fields are classified as follows:
Every finite field has pn elements for some prime p and some integer n ≥ 1. (This p is
the characteristic of the field.)
For every prime p and integer n ≥ 1, there exists a finite field with pn elements.
All fields with pn elements are isomorphic (that is, their addition tables are essentially
the same, and their multiplication tables are essentially the same). This justifies using
5
the same name for all of them; they are denoted by GF (pn). The letters "GF" stand for
"Galois field".
For example, there is a finite field GF (8) = GF (23) with 8 elements and every field
with 8 elements is isomorphic to this one. However, there is no finite field with 6
elements, because 6 is not a power of any prime.
Characteristics
What’s special about Reed Solomon codes? Reed Solomon have higher error
correcting capability that any other codes. [8]. Having an elegant and intricate
mathematical structure that allows for accurate mathematical analysis.
2.2.1 Parameters
The parameters of a Reed-Solomon code are:
m = the number of bits per symbol
n = the block length in symbols
k = the un coded message length in symbols
(n-k) = the parity check symbols (check bytes)
t = the number of correctable symbol errors
(n-k) = 2t (for n-k even)
(n-k)-1 = 2t (for n-k odd)
Therefore, an RS code may be described as an (n, k) code for any RS code where,
n = 2m - 1, and n - k = 2t.
6
In general, an RS decoder can detect and correct up to (t = r/2) incorrect symbols if
there are (r = n - k) redundant symbols in the encoded message. One redundant
symbol is used in detecting and locating each error, and one more redundant symbol
is used in identifying the precise value of that error.
This concept of using redundant symbols to either locate or correct errors is useful in
the understanding of erasures. The term “erasures” is used for errors whose position is
identified at the decoder by external circuitry. If an RS decoder has been instructed
that a specific message symbol is in error, it only has to use one redundant symbol to
correct that error and does not have to use an additional redundant symbol to
determine the location of the error. [9]
If the locations of all the errors are given to the RS codec by the control logic of the
system, 2t erasures can be corrected. In general, if (E) symbols are known to be in
error (eg. erasures ) and if there are (e) errors with unknown locations, the block can
be correctly decoded provided that (2e + E) < r. [8]
2.3 Encoding Approaches
The Galois filed elements {0, α, α2... αq-1 = 1} are treated as points on a rational curve;
along with the point at infinity, they form the one-dimensional projective line.
where c is a Reed Solomon code, which is evaluated P(x) at each of the q elements in
the finite field GF (q).
A complete set of code words is constructed by allowing the k information symbols to
take on all possible values. Since the information symbols are selected from GF (q),
they can each take on q different values. There are thus qk code words in this Reed-
Solomon code. A code word is said to be linear if the sum of any two code words is
also a code word.
The number of information symbols k is frequently called the dimension of the code.
This term is derived from the fact that the Reed-Solomon code words form a vector
space of dimension k over GF (q). Since each code word has q coordinates, it is
usually said that the code has length n=q. [9]
7
2.3.2 Generator Polynomial Approach
The generator polynomial construction for Reed-Solomon codes is the approach most
commonly used today in the error control literature. If an (n, k) code is cyclic, it can
be shown that the code can always be defined using a generator polynomial g(x) =g 0,
g1x, g2x2,...., gn-kxn-k. In this definition, each code word is interpreted as a code
polynomial.
A code c is a code word in the code defined by g(x) if and only if its corresponding
code polynomial c(x) is a multiple of g(x). This provides a very convenient means for
mapping information symbols onto code words. Let m = (m0, m1, ... , mk-1xk-1 ) which
is encoded through multiplication by g(x).
c(x) = m(x) g(x) (3)
The third approach to Reed-Solomon codes uses the various techniques of Fourier
transforms to achieve some interesting interpretations of the encoding and decoding
process. Once again, let α be a primitive element in the Galois field GF(q). The Galois
field Fourier Transform (GFFT) of an n-bit vector c= (c0, c1, ...., cn-1) is defined as
follows.
F {(c0, c1, ...., cn-1)} = (C0, C1, ...., Cn-1) (5)
Where Cj = i=0 ∑n-1 ci αij i =0, 1,...., n-1
Let the error vector be e = [e0, e1,...... ,en-1 ] with polynomial representation
8
The received polynomial at the input of the decoder is then
This first step in decoding is the evaluation of syndromes given by equation 10.
Evaluate the received polynomial at α to obtain the syndrome S1.
S1 = v (α)
= e(α) = ei1αi1 + ei2αi2 +......+ eivαiv (11)
In the second step, the direct solution of a system of nonlinear equations is difficult
except for small values of t. A better approach requires intermediate steps. For this
purpose, the error locator polynomial Λ(x) is introduced as follows:
Berlekamp’s algorithm allowed for the first time the possibility of a quick and
efficient decoding of dozens of symbol errors in some powerful RS codes.
9
Figure 2.2: Decoding Architecture
In algebraic decoding, syndromes are evaluated using equation 2. Then, based on the
syndromes, the error locator polynomial Λ(x) is found. Once the error locator
polynomial is found, its roots are evaluated in order to find the locations of the error.
The Chien search method can be used to evaluate the roots. This method simply
consists of the computation of Λ (αj) for j=0, 1,......., n-1 and checking for a result
equal to zero. Use of this trial-error method is feasible, since the number of elements
in a Galois field is finite.
This method is not efficient because of the extensive computation required for the
matrix inversion. [9]
A more efficient method to find the error values is called Forney’s algorithm. Once
again, this algorithm follows evaluation of Λ(x). Define the syndrome polynomial
S(x) = i=1∑2t Si xi (13)
And define the error evaluator polynomial Ω(x) in terms of these know polynomials
by the key equation,
Ω(x) = [1 + S(x)] Λ (x) mod x2t+1 (14)
The error evaluator polynomial is related to the error locations and error values
defining Yl = eiv αiv and error location Xl = αil for l=1,.....v.
Ω (Xl-1) = Yl ∏i≠l (1-XiXl-1) (15)
After evaluation of the error values, the received vector can be corrected by
subtracting the error values from the received vector.
In transform decoding, the code word c is assumed to have been transformed into the
frequency domain. The syndromes of the noisy code word v =c + e are defined by the
set of 2t equations in equation 2. Clearly, from the definition of a finite field Fourier
transform, the syndromes are computed as 2t components of a Fourier transform. The
10
received noisy code word has a Fourier transform given by Vj = Cj + Ej for j=0, 1,...,
n-1 and the syndrome are the 2t components of this spectrum from 1 to 2t.
Cj =0, j=1, 2,......, 2t
which yields
Sj = Vj = Ej, j= 1, 2,......., 2t.
The above equation implies that out of n components of the error pattern, 2t can be
directly obtained from the syndromes. Given the 2t frequency domain components
and the additional information that at most, t components of the time domain error
pattern are nonzero, the decoder must find the entire transform of the error pattern.
After evaluation of the frequency domain vector E, decoding can be completed by
evaluating the inverse Fourier transform to find the time domain error vector e and
subtracting e from v.
Let Λ be the vector whose components are coefficients of the polynomial Λ(x). The
vector Λ has an inverse transform λ = [λ0, λ1,........, λn-1], where
λi= j=0∑n-1 λj α-ij = Λ (α-i) (16)
Now, using equation
λi = l=1∏v (1- α-i αil) (17)
Assuming that the coefficients of the error locator polynomial Λ(x) are known, the
convolution can be considered as a set of n equations in k unknown components of E.
The known frequency components of E can be obtained by recursive extension. [9]
Thus, with transform decoding, the received vector is first transformed to the
frequency domain by computing syndromes. Then, the frequency domain error vector
is recursively obtained, and finally an inverse Fourier transform is performed to find
the time domain error vector. Therefore, all computations involved in finding the error
values are performed in the frequency domain.
11
Figure 2.3: Referencing Results (left [10], right [11]) using different RS Algorithms
2.6 Summary
In summary, RS block codes have four basic properties which make them powerful
codes for digital communications:
1) An RS decoder acts on multi-bit symbols rather than only on single bits. Thus, up
to eight bit-errors in a symbol can be treated as a single symbol error. Strings of
errors, or bursts, are therefore handled efficiently.
2) The RS codes with very long block lengths tend to average out the random errors
and make block codes suitable for use in random error correction.
3) RS codes are well-matched for the messages in a block format, especially when the
message block length and the code block length are matched.
4) The complexity of the decoder can be decreased as the code block length increases
and the redundancy overhead decreases.
Hence, RS codes are typically large block length, high code rate, codes. [8]
12
3. Soft In Soft Out Decoding
Description
All the error –correcting algorithm developed so far are based on hard decision in &
out puts of the matched filter in the receiver demodulator.
Then, the decoder processes this hard-decision received sequence based on a specific
decoding method.
If the outputs of the matched filter are unquantized or quantized in more than two
levels, the demodulator makes soft decisions. A sequence of soft-decision outputs of
the matched filter is referred to as a soft-decision received sequence. Because the
decoder uses the additional information contained in the unquantized received
samples to recover the transmitted codeword soft-decision decoding provides better
error performance than hard-decision decoding.
Soft Algorithm Classification
Many soft-decision decoding algorithm have been devised.
These decoding algorithms can be classified into two major-categories.
Reliability-Based (or probabilistic) decoding algorithms & code structure-based
decoding algorithms.
3.2.1 Reliability-Based Decoding
Reliability-based decoding algorithms generally require generation of a list of
candidate code words of a predetermined size to restrict the search space for finding
maximum likelihood codeword.
These candidate codeword is generated serially one at a time. Each time a candidate
codeword is generated, its metric is computed for comparison & final decoding.
3.2.2 Structure-Based Decoding
13
The most well known structure-based decoding algorithm is the Viterbi algorithm,
which is devised based on the trellis representation of a code. This project based on
this type of soft in soft out decoding but instead of using typical trellis structure, a
new algorithm [1] based on Vardy & Be’ery Decomposition Factor graph.
14
Figure 4. 1: Model of a Coded Digital Communication System
The technique mainly used in decoding based on the reference algorithm[1] was to
first encode and later decode by factor graph instead of trellis structure. The
information bits are encoded by using the BCH extended matrix [2].
Let R (N, K) be the Reed-Solomon code over GF (2m) of length N=2m-1 and
dimension K. Assume that R is used on a binary channel. Hence, the encoder must
employ some fixed linear mapping ø: GF(2m)N –› GF(2)mN to convert a sequence of N
elements of GF(2m) into string of mN binary digits. Now let α be a primitive element
of GF(2m) and let αS, αS+1,….αS+N-K-1 and their cyclotomic conjugate over GF(2)
employed for the linear mapping ø. Defining the codes B1, B2, ….. , Bm
As Bj = {(γjbo, γjb1, γj bN-1) | b= (b0, b1,…, bn-1) Є B (19)
For j=1, 2, ….., m
15
Where, bi Є GF(2) and product γjbi is in GF(2m). B is a subfield subcode of R and,
hence , the m codes defined (1) are also subcodes of R. Therefore if (vi1,…….,vkj) is a
set of k generators for Bj and the set is
j=1 Ųm {ø(v1j), ø(v2j ), ……., ø(vkj )} ( 20)
as the first mk rows of a binary generator matrix for R. By rearranging the columns
the structure of Fig.1 is obtained.
4.3.2 Encoding
After implementing the structure for matrix the information vector is multiplied with
BCH extended matrix and generating an encoded data with addition to parity bits. In
next step interleave the encoded bits. Such as if the encoded bits are n then after
interleaving the bits length would become n*rate. Transmission of the signal is
randomizing, therefore randomizing the error distribution by applying interleaving.
Rate is the square of the minimum hamming distance between two codewords. It
specifics the duration or span of the channel memory, not its exact statistical
characterization, which is used as time diversity or interleaving. The idea behind
interleaving is to separate the codeword symbol in the time. Separating the symbols in
time effectively transforms a channel with memory to a memory less one, and thereby
enables the random-error-correcting codes to be useful in a burst-noise channel.
Figure 4.2: Structure of the Generator Matrix of the binary image of Crs where B generates
Cbch.
16
Figure 4.3: BCH Extended Matrix Structure
17
Figure 4.4: RS Code Factor Graph based on the Vardy-Be'ery Decomposition
As the other common structure of trellis gets very complexed with the Reed Solomon
interleaving nature, this factor graph simplifies the structure of the decoding. Each
1…m part of the encoded bits are separately sent into 1….m branch of the graph
respectively. The result from each branch for example B1……Bm are generated after
passing through the trellis and by using soft information the best resultant decoded
bits vector is taken by using equation 21.
Where j=0,......k-1.
18
5. Performance Measures
5.1 AWGN channel
In comparing error performance, Additive White Gaussian noise (AWGN) channel
was used. The AWGN channel is not always representative of the performance for
real channels particular for radio transmission where fading and nonlinearities tend to
dominate. Nevertheless, error performance for the AWGN channel is easy to derive
and serves as a useful benchmark in performance comparisons.
The error performance is a function of the signal-to-noise (S/N) ratio. Out of the many
definitions possible for S/N, the one most suitable for comparison of decoding
techniques is the ratio of energy, Eb, to noise density (No). To arrive at this definition
and to obtain an appreciation for its usefulness let relate definitions for S/N and Eb/No.
The noise source is assumed Gaussian-distributed
The effectiveness of the coding scheme is measured in terms of the Coding gain,
which is the difference of the SNR levels of the uncoded and coded systems required
to reach the same BER levels.
5.2 Simulation Results
The variation of bit error rate with the E b/No ratio of a primitive Reed-Solomon code
with coherent BPSK signals & Vardy & Be’ery algorithm decoding for AWGN
channels has been measured by computer simulations.
Figure 5.1: Simulation result for comparison within (15, 13, 4), (7, 5, 4) RS codes
19
Figure 5.2: Performance of Reed-Solomon codes with Vardy-Be'ery Algorithm decoding in
AWGN Channel
Comparisons are made between the coded & uncoded coherent BPSK systems. At
high Eb/No ratio, it can be see that the performance of the coded BPSK system is
better than the uncoded BPSK systems. At a bit error rate of 10-4 the (15, 13, 4)
double-error-correcting Reed-Solomon coded BPSK systems give nearly 3db of
coding gain over the uncoded BPSK systems respectively.
The results were generated for 1000 iteration in C code by passing through Gaussian
noise on rate 0.5.
5.2.1 Complexity:
Above from the result Figure 5.1 it can be seen that coding gain increases as the rate
of the code decreases. Unfortunately, so does the computational complexity of the
algorithm. The algorithm has high complexity as it has to search n length codewords
for m times (2m(n-k)).
6. Future Researches
Error-control coding covers a large class of codes & decoding techniques. New error-
control codes & decoding methods are the result of ongoing research activities in
digital communications. After the discovery of Reed-Solomon codes, a search began
20
for an efficient decoding algorithm. None of the standard techniques used at the time
were very helpful.
A number of researches are going on for a better db gain over uncoded , hard-decision
and other soft decoding algorithms. The aim is not letting get waste the soft
information when a signal faces the noise channel. The commercial world is
becoming increasingly mobile, while simultaneously demanding reliable, rapid access
to sales, marketing and accounting information. Unfortunately the mobile channel is a
nasty environment in which to communicate, with deep fades an ever present
phenomenon. Reed-Solomon codes are the single best solution; there is no other error
control system that can match their reliability performance in the mobile environment.
Shot noise and a dispersive, noisy medium plague line-of-sight optical systems,
creating noise bursts that are best handled by Reed-Solomon codes. Reed Solomon
codes will continue to be used to force communication system performance ever
closer to the line drawn by Shannon.
7. Conclusion
This dissertation was based on Vardy and Be’ery Decomposition Algorithm [1], for
reducing the complexity of decoding Reed Solomon codes by using soft information
through factor graph. The plot clearly shows a nearly 3 db gain over uncoded BPSK
signal when comparison is done with RS(15,13,4) and Uncoded(15) code rate.
The Soft-In Soft-out Decoding Of Reed-Solomon Codes Based on Vardy and Be’ery
Decomposition Computing [1] is soft-decision decoding algorithm for Reed Solomon
codes that incorporate soft-decisions into algebraic decoding framework.
The soft-decision front end can be implemented with a reasonable complexity using
the proposed algorithm [1]. Presented simulation results to characterize the coding
gains possible from the soft-decision Vardy & Be’ery algorithm for Reed-Solomon
codes.
The Vardy & Be’ery algorithm exhibits a performance-complexity tradeoff which is
tuneable by the choice of Mmax, n & k.
References
21
Vardy and Be’ery Decomposition Computing. IEEE Transactions on Information
Theory, Vol. -51, No. 12, December 2005.
[2] Alexander Vardy (Member, IEEE) and Yair Be’ery (Member, IEEE.), Bit Level
Soft-Decision decoding Of Reed-Solomon Codes. IEEE Transactions on
Information Theory, Vol. 39, No. 3, January 1991.
[7] Stephen B. Wicker. “Error Control Systems, For Digital Communication and
Storage”, Prentice-Hall, Inc, 1995. ISBN 0-13-200809-2
[9] Wicker Bhargava. “Reed Solomon Codes and Their Applications”, IEEE PRESS
Marketing © 1994 ISBN 0-7803-1025-X
[10] Jing Jiang, Student Member, IEEE and Krishna R. Narayanan, Member, IEEE
“Iterative Soft Decoding of Reed Solomon Codes” Department of Electrical
Engineering, Texas A&M University, College Station, USA
[11] Ralf Koetter, Member, IEEE, and Alexander Vardy, Fellow, IEEE
“Algebraic Soft-Decision Decoding of Reed–Solomon Codes”
22
23