Maino (rapper) and Reed–Solomon error correction: Difference between pages

From Wikipedia, the free encyclopedia
(Difference between pages)
Content deleted Content added
No edit summary
 
 
Line 1: Line 1:
'''Reed-Solomon error correction''' is an [[error-correcting code]] that works by [[oversampling]] a [[polynomial]] constructed from the data. The polynomial is evaluated at several points, and these values are sent or recorded. Sampling the polynomial more often than is necessary makes the polynomial over-determined. As long as it receives "many" of the points correctly, the receiver can recover the original polynomial even in the presence of a "few" bad points.
{{Refimprove|date=June 2008}}


Reed-Solomon codes are used in a wide variety of commercial applications, most prominently in [[CD]]s, [[DVD]]s and [[Blu-ray Disc]]s, in data transmission technologies such as [[DSL]] & [[WiMAX]], and broadcast systems such as [[Digital Video Broadcasting|DVB]] and [[ATSC Standards|ATSC]].
{{Infobox musical artist
== Overview ==
|Img=
Reed-Solomon codes are [[block code]]s. This means that a fixed block of input data is processed
| Img_size =
into a fixed block of output data. In the case of the most commonly used R-S code (255, 223) – 223 Reed-Solomon input symbols (each eight bits long) are encoded into 255 output symbols.
| Landscape =
* Most R-S ECC schemes are systematic. This means that some portion of the output codeword contains the input data in its original form.
| Background = solo_singer
* A Reed-Solomon symbol size of eight bits was chosen because the decoders for larger symbol sizes would be difficult to implement with current technology. This design choice forces the longest codeword length to be 255 symbols.
| Birth_name = Jermaine Michael Curtis Coleman
* The standard (255, 223) Reed-Solomon code is capable of correcting up to 16 Reed-Solomon symbol errors in each codeword. Since each symbol is actually eight bits, this means that the code can correct up to 16 short bursts of error due to the inner convolutional decoder.
| Alias =
| Born = [[Brooklyn]], [[New York]], [[United States|U.S.]]
| Height =
| Origin =
| Instrument = [[Vocals]]
| Genre = [[Hip hop music|Hip hop]]
| Occupation = [[Rapping]]
| Years_active = 2005–present
| Label = [[Hustle Hard Entertainment]]
| URL = [http://www.mainohustlehard.com/ mainohustlehard.com]
}}
'''Maino''' is a rapper from [[Brooklyn, New York]].<ref>Caramanica, Jon. "[http://www.nytimes.com/2008/07/01/arts/music/01jam.html?_r=1&oref=slogin A Singer Who Is Eager to Embrace the Absurd ]", ''[[New York Times]]'', [[2008-07-01]], p. E7.</ref> His first hit single "[[Hi Hater]]" peaked at #16 on the Hot Rap Tracks [[record chart]]s. <ref>[http://www.billboard.com/bbcom/esearch/searchResult.jsp?configType=BBCOM_SIMPLEDEFAULT&pubList=Billboard&an=bbcom&action=Submit&kw=&exposeNavigation=true&keyword=Maino&submit.x=0&submit.y=0&submit=Submit&searchType=ARTICLE_SEARCH Billboard Music Charts - Latest Music News - Music Videos<!-- Bot generated title -->]</ref>
Additionally in 2008, Maino's song "Getaway Driver" was featured on the [[Grand Theft Auto IV soundtrack|Grand Theft Auto Soundtrack]]. Maino then unknown appeared in Lil Kim's 2005 video Lighter's Up. {{Fact|date=August 2008}}


The Reed-Solomon code, like the [[convolutional code]], is a transparent code. This means that if
His debut album ''[[If Tomorrow Comes (album)|If Tomorrow Comes]]'' will be released September 23, 2008.<ref>[http://www.mainohustlehard.com/ Maino official site]</ref>
the channel symbols have been inverted somewhere along the line, the decoders will still
operate. The result will be the complement of the original data. However, the Reed-Solomon
code loses its transparency if virtual zero fill is used. For this reason it is mandatory that the
sense of the data (i.e., true or complemented) be resolved before Reed-Solomon decoding.


In the case of the [[Voyager program]], R-S codes reach near optimal performance when concatenated with the (7, 1/2) convolutional (Viterbi) inner code. Since two check symbols are required for each error to be corrected, this results in a total of 32 check symbols and 223 information symbols per codeword.
==Singles==
* 2008: "[[Hi Hater]]"
* 2008: "Hood Love" ft. [[Trey Songz]]


In addition, the Reed-Solomon codewords can be interleaved on a symbol basis before being
==Videos==
convolutionally encoded. Since this separates the symbols in a codeword, it becomes less likely
* 2005: "Stomp" (remix) ft. [[Lil' Kim]]
that a burst from the Viterbi decoder disturbs more than one Reed-Solomon symbol in any one
* 2008: "Be Me"
codeword.
* 2008: "[[Hi Hater]]"/Hi Hater Remix


== References ==
==Definition==
=== Overview ===
The key idea behind a Reed-Solomon code is that the data encoded is first visualized as a [[polynomial]]. The code relies on a [[theorem]] from [[algebra]] that states that any ''k'' distinct points ''uniquely'' determine a polynomial of [[degree of a polynomial|degree]] at most ''k''-1.

The sender determines a degree <math>k-1</math> polynomial, over a [[finite field]], that represents the <math>k</math> data points. The polynomial is then "encoded" by its evaluation at various points, and these values are what is actually sent. During transmission, some of these values may become corrupted. Therefore, more than ''k'' points are actually sent. As long as sufficient values are received correctly, the receiver can deduce what the original polynomial was, and hence decode the original data.

In the same sense that one can correct a curve by [[interpolation|interpolating]] past a gap, a Reed-Solomon code can bridge a series of errors in a block of data to recover the coefficients of the polynomial that drew the original curve.

=== Mathematical formulation ===

Given a [[finite field]] ''F'' and [[polynomial ring]] ''F''[''x''], let ''n'' and ''k'' be chosen such that 1 &le; ''k'' &le; ''n'' &le; | ''F'' |. Pick ''n'' distinct elements of ''F'', denoted { ''x''<sub>1</sub>, ''x''<sub>2</sub>, ... , ''x''<sub>n</sub> }. Then, the codebook '''C''' is created from the tuplets of values obtained by evaluating every polynomial (over ''F'') of degree less than ''k'' at each ''x''<sub>i</sub>; that is,

: <math>\mathbf{C} = \left\{ \left( f(x_1), f(x_2), ..., f(x_n) \right)| f \in F[x], {\rm deg}(f)<k \right\}</math>

'''C''' is a [''n'', ''k'', ''n''-''k''+1] code; in other words, it is a [[linear code]] of length ''n'' (over ''F'') with [[Dimension (vector space)|dimension]] ''k'' and minimum [[Hamming distance]] ''n''-''k''+1.

A ''Reed-Solomon code'' is a code of the above form, subject to the additional requirement that the set <math>\{x_1, x_2, ..., x_n\}</math> must be the set of ''all'' non-zero elements of the field <math>F</math> (and therefore, <math>n=|F|-1</math>).

===Remarks===

For practical uses of Reed-Solomon codes, it is common to use a finite field <math>F</math> with <math>2^m</math> elements. In this case, each symbol can be represented as an <math>m</math>-bit value.
The sender sends the data points as encoded blocks, and the number of symbols in the encoded block is <math>n = 2^m - 1</math>. Thus a Reed-Solomon code operating on 8-bit symbols has <math>n = 2^8 - 1 = 255</math> symbols per block. (This is a very popular value because of the prevalence of [[byte-oriented]] computer systems.) The number <math>k</math>, with <math>k < n</math>, of ''data'' symbols in the block is a design parameter. A commonly used code encodes <math>k = 223</math> eight-bit data symbols plus 32 eight-bit parity symbols in an <math>n = 255</math>-symbol block; this is denoted as a <math>(n, k) = (255,223)</math> code, and is capable of correcting up to 16 symbol errors per block.

The set <math>\{x_1,...,x_n\}</math> of non-zero elements of a finite field can be written as <math>\{1,\alpha,\alpha^2,...,\alpha^{n-1}\}</math>, where <math>\alpha</math> is a [[primitive nth root of unity|primitive ''n''th root of unity]]. It is customary to encode the values of a Reed-Solomon code in this order. Since <math>\alpha^n=1</math>, and since for every polynomial <math>p(x)</math>, the function <math>p(\alpha x)</math> is also a polynomial of the same degree, it then follows that a Reed-Solomon code is [[cyclic code|cyclic]].

=== Reed-Solomon codes as BCH codes ===

Reed-Solomon codes are a special case of a larger class of codes called [[BCH code]]s. An efficient error correction algorithm for BCH codes (and therefore Reed-Solomon codes) was discovered by [[Berlekamp]] in 1968.

To see that Reed-Solomon codes are special BCH codes, it is useful to give the following alternate definition of Reed-Solomon codes.<ref>R. Lidl and G. Pilz. Applied Abstract Algebra, 2nd edition. Wiley, 1999, p.226.</ref>

Given a [[finite field]] <math>F</math> of size <math>q</math>, let <math>n=q-1</math> and let <math>\alpha</math> be a [[primitive nth root of unity|primitive <math>n</math>th root of unity]] in <math>F</math>. Also let <math>1\leq k\leq n</math> be given. The ''Reed-Solomon code'' for these parameters has code word <math>(f_0,f_1,...,f_{n-1})</math> if and only if <math>\alpha,\alpha^2,...,\alpha^{n-k}</math> are roots of the polynomial
:<math>p(x) = f_0 + f_1x + ... + f_{n-1}x^{n-1}</math>.

With this definition, it is immediately seen that a Reed-Solomon code is a [[polynomial code]], and in particular a [[BCH code]]. The generator polynomial <math>g(x)</math> is the minimal polynomial with roots <math>\alpha,\alpha^2,...,\alpha^{n-k}</math>, and the code words are exactly the polynomials that are divisible by <math>g(x)</math>.

=== Equivalence of the two formulations ===

At first sight, the above two definitions of Reed-Solomon codes seem very different. In the first definition, code words are ''values'' of polynomials, whereas in the second, they are ''coefficients''. Moreover, the polynomials in the first definition are required to be of small degree, whereas those in the second definition are required to have specific roots.

The equivalence of the two definitions is proved using the [[discrete Fourier transform (general)|discrete Fourier transform]]. This transform, which exists in all finite fields as well as the complex numbers, establishes a duality between the coefficients of polynomials and their values. This duality can be approximately summarized as follows: Let <math>p(x)</math> and <math>q(x)</math> be two polynomials of degree less than <math>n</math>. If the ''values'' of <math>p(x)</math> are the ''coefficients'' of <math>q(x)</math>, then (up to a scalar factor and reordering), the ''values'' of <math>q(x)</math> are the ''coefficients'' of <math>p(x)</math>. For this to make sense, the values must be taken at locations <math>x=\alpha^i</math>, for <math>i=0,...,n-1</math>, where <math>\alpha</math> is a [[primitive nth root of unity|primitive <math>n</math>th root of unity]].

To be more precise, let
:<math>p(x) = v_0 + v_1x + v_2x^2 + ... + v_{n-1}x^{n-1}</math> and
:<math>q(x) = f_0 + f_1x + f_2x^2 + ... + f_{n-1}x^{n-1}</math>,
and assume <math>p(x)</math> and <math>q(x)</math> are related by the discrete Fourier transform. Then the coefficients and values of <math>p(x)</math> and <math>q(x)</math> are related as follows: for all <math>i=0,...,n-1</math>, <math>f_i=p(\alpha^i)</math> and <math>v_i=\frac{1}{n}q(\alpha^{n-i})</math>.

Using these facts, we have:
*<math>(f_0,\ldots,f_{n_1})</math> is a code word of the Reed-Solomon code according to the first definition
* if and only if <math>p(x)</math> is of degree less than <math>k</math> (because <math>f_0,\ldots,f_{n_1}</math> are the values of <math>p(x)</math>),
* if and only if <math>v_i=0</math> for <math>i=k,...,n-1</math>,
* if and only if <math>q(\alpha^i)=0</math> for <math>i=1,...,n-k</math> (because <math>q(\alpha^i)=nv_{n-i}</math>),
* if and only if <math>(f_0,\ldots,f_{n_1})</math> is a code word of the Reed-Solomon code according to the second definition.

This shows that the two definitions are equivalent.

==Properties of Reed-Solomon codes==

The error-correcting ability of any Reed-Solomon code is determined by <math>n - k</math>, the measure of redundancy in the block. If the locations of the errored symbols are not known in advance, then a Reed–Solomon code can correct up to <math>(n-k)/2</math> erroneous symbols, i.e., it can correct half as many errors as there are redundant symbols added to the block. Sometimes error locations are known in advance (e.g., “side information” in [[demodulator]] [[signal-to-noise ratio]]s)—these are called '''erasures'''. A Reed–Solomon code (like any [[linear code]]) is able to correct twice as many erasures as errors, and any combination of errors and erasures can be corrected as long as the inequality <math>2E + S < n - k</math> is satisfied, where <math>E</math> is the number of errors and <math>S</math> is the number of erasures in the block.

The properties of Reed-Solomon codes make them especially well-suited to applications where errors occur in bursts. This is because it does not matter to the code how many bits in a symbol are in error—if multiple bits in a symbol are corrupted it only counts as a single error. Conversely, if a data stream is not characterized by error bursts or drop-outs but by random single bit errors, a Reed-Solomon code is usually a poor choice.

Designers are not required to use the "natural" sizes of Reed-Solomon code blocks. A technique known as “shortening” can produce a smaller code of any desired size from a larger code. For example, the widely used (255,223) code can be converted to a (160,128) code by padding the unused portion of the block (usually the beginning) with 95 binary zeroes and not transmitting them. At the decoder, the same portion of the block is loaded locally with binary zeroes. The [[compact disc]] is an example of an application of shortened Reed-Solomon codes.

In 1999 [[Madhu Sudan]] and [[Venkatesan Guruswami]] at MIT, published “Improved Decoding of Reed-Solomon and Algebraic-Geometry Codes” introducing an algorithm that allowed for the correction of errors beyond half the minimum distance of the code. It applies to Reed–Solomon codes and more generally to [[algebraic geometry codes]]. This algorithm produces a list of codewords (it is a [[list-decoding]] algorithm) and is based on interpolation and factorization of polynomials over <math>GF(2^m)</math> and its extensions.

==History==
The code was invented in 1960 by [[Irving S. Reed]] and [[Gustave Solomon]], who were then members of [[MIT]] [[Lincoln Laboratory]]. Their seminal article was entitled "Polynomial Codes over Certain Finite Fields." When it was written, digital technology was not advanced enough to implement the concept. The first application, in 1982, of RS codes in mass-produced products was the [[compact disc]], where two interleaved RS codes are used. An efficient [[Berlekamp-Massey algorithm|decoding algorithm]] for large-distance RS codes was developed by [[Elwyn Berlekamp]] and [[James Massey]] in 1969. Today RS codes are used in [[hard disk drive]], [[DVD]], telecommunication, and digital broadcast protocols.

== Applications ==
===Data storage===
Reed-Solomon coding is very widely used in mass storage systems to correct
the burst errors associated with media defects.

Reed-Solomon coding is a key component of the [[compact disc]]. It was the first use of strong error correction coding in a mass-produced consumer product, and [[digital audio tape|DAT]] and [[DVD]] use similar schemes. In the CD, two layers of Reed-Solomon coding separated by a 28-way [[convolution]]al [[interleaving|interleaver]] yields a scheme called Cross-Interleaved Reed Solomon Coding ([[Cross-interleaved Reed-Solomon coding|CIRC]]). The first element of a CIRC decoder is a relatively weak inner (32,28) Reed-Solomon code, shortened from a (255,251) code with 8-bit symbols. This code can correct up to 2 byte errors per 32-byte block. More importantly, it flags as erasures any uncorrectable blocks, i.e., blocks with more than 2 byte errors. The decoded 28-byte blocks, with erasure indications, are then spread by the deinterleaver to different blocks of the (28,24) outer code. Thanks to the deinterleaving, an erased 28-byte block from the inner code becomes a single erased byte in each of 28 outer code blocks. The outer code easily corrects this, since it can handle up to 4 such erasures per block.

The result is a CIRC that can completely correct error bursts up to 4000 bits, or about 2.5 mm on the disc surface. This code is so strong that most CD playback errors are almost certainly caused by tracking errors that cause the laser to jump track, not by uncorrectable error bursts.<ref>[[Kees Immink|K.A.S. Immink]], ''Reed-Solomon Codes and the Compact Disc'' in S.B. Wicker and V.K. Bhargava, Edrs, ''Reed-Solomon Codes and Their Applications'', [[IEEE Press]], 1994.</ref>

Another product which incorporates Reed–Solomon coding is [[Nintendo]]'s [[e-Reader]]. This is a [[video-game]] delivery system which uses a two-dimensional "[[barcode]]" printed on trading cards. The cards are scanned using a device which attaches to Nintendo's [[Game Boy Advance]] game system.

Reed-Solomon error correction is also used in [[parchive]] files which are commonly posted accompanying multimedia files on [[USENET]]. Distributed online storage service, [http://wua.la/en Wuala], also makes use of Reed-Solomon when breaking up files.

===Data transmission===
Specialized forms of Reed-Solomon codes specifically [[Cauchy_matrix|Cauchy]]-RS and [[Vandermonde_matrix|Vandermonde]]-RS can be used to overcome the unreliable nature of data transmission over [[Binary_erasure_channel|erasure channels]]. The encoding process assumes a code of RS(N,K) which results in N codewords of length N symbols each storing K symbols of data, being generated, that are then sent over an erasure channel.

Any combination of K codewords received at the other end is enough to reconstruct all of the N codewords. The code rate is generally set to 1/2 unless the channel's erasure likelihood
can be adequately modelled and is seen to be less. In conclusion N is usually 2K, meaning that at least half of all the codewords sent must be received in order to reconstruct all of the codewords sent.

Reed-Solomon codes are also used in [[xDSL]] systems and [[CCSDS]]'s [[Space Communications Protocol Specifications]] as a form of [[Forward Error Correction]].

===Mail encoding===
Paper bar codes such as [[PostBar]], [[MaxiCode]], [[Datamatrix]] and [[QR_Code]] use Reed–Solomon error correction to allow correct reading even if a portion of the bar code is damaged.

===Satellite transmission===
One significant application of Reed–Solomon coding was to encode the digital pictures sent back by the [[Voyager program|Voyager]] space probe.

Voyager introduced Reed–Solomon coding in conjunction with [[Viterbi algorithm|ML]] [[convolutional code]]s, a practice that has since become very widespread in deep space and satellite (e.g., direct digital broadcasting) communications.

<br style="clear:both" />
[[Image:NASA ECC Codes-imperfection.png|thumb|600px|left| NASA's Deep Space Missions ECC Codes (code imperfectness)]]
<br style="clear:both" />

[[Viterbi decoder]]s tend to produce errors in short bursts. Correcting these burst errors is a job best done by short or simplified Reed-Solomon codes.

Modern versions of concatenated Reed-Solomon/Viterbi-decoded convolutional coding were and are used on the [[Mars Pathfinder]], [[Galileo probe|Galileo]], [[Mars Exploration Rover]] and [[Cassini probe|Cassini]] missions, where they perform within about 1–1.5 [[decibel|dB]] of the ultimate limit imposed by the [[Shannon capacity]].

These concatenated codes are now being replaced by more powerful [[turbo code]]s where the transmitted data does not need to be decoded immediately.

==Sketch of the error correction algorithm==

The following is a sketch of the main idea behind the error correction algorithm for Reed-Solomon codes.

By definition, a code word of a Reed-Solomon code is given by the sequence of values of a low-degree polynomial over a [[finite field]]. A key fact for the error correction algorithm is that the ''values'' and the ''coefficients'' of a polynomial are related by the [[discrete Fourier transform (general)|discrete Fourier transform]].

[[Image:Reed-Solomon1.png|thumb|right|200px|Figure 1]]
[[Image:Reed-Solomon2.png|thumb|right|200px|Figure 2]]
The purpose of a Fourier transform is to convert a signal from a [[time domain]] to a [[frequency domain]] or vice versa.
In case of the [[discrete Fourier transform (general)|Fourier transform over a finite field]], the frequency domain signal corresponds to the coefficients of a polynomial, and the time domain signal correspond to the values of the same polynomial.

As shown in Figures 1 and 2, an isolated value in the frequency domain corresponds to a smooth wave in the time domain. The wavelength depends on the location of the isolated value.
[[Image:Reed-Solomon3.png|thumb|right|200px|Figure 3]]
[[Image:Reed-Solomon4.png|thumb|right|200px|Figure 4]]
Conversely, as shown in Figures 3 and 4, an isolated value in the time domain corresponds to a smooth wave in the frequency domain.

[[Image:Reed-Solomon5.png|thumb|right|200px|Figure 5]]
In a Reed-Solomon code, the frequency domain is divided into two regions as shown in Figure 5: a left (low-frequency) region of length <math>k</math>, and a right (high-frequency) region of length <math>n-k</math>. A data word is then embedded into the left region (corresponding to the <math>k</math> coefficients of a polynomial of degree at most <math>k-1</math>), while the right region is filled with zeros. The result is Fourier transformed into the time domain, yielding a code word that is composed only of low frequencies. In the absence of errors, a code word can be decoded by reverse Fourier transforming it back into the frequency domain.

[[Image:Reed-Solomon6.png|thumb|right|200px|Figure 6]]
Now consider a code word containing a single error, as shown in Figure 6. The effect of this error in the frequency domain is a smooth, single-frequency wave in the right region, called the ''syndrome'' of the error. The error location can be determined by determining the frequency of the syndrome signal.

[[Image:Reed-Solomon7.png|thumb|right|200px|Figure 7]]
Similarly, if two or more errors are introduced in the code word, the syndrome will be a signal composed of two or more frequencies, as shown in Figure 7. As long as it is possible to determine the frequencies of which the syndrome is composed, it is possible to determine the error locations. Notice that the error ''locations'' depend only on the ''frequencies'' of these waves, whereas the error ''magnitudes'' depend on their amplitudes and phase.

The problem of determining the error locations has therefore been reduced to the problem of finding, given a sequence of <math>n-k</math> values, the smallest set of elementary waves into which these values can be decomposed. It is known from [[digital signal processing]] that this problem is equivalent to finding the roots of the [[recurrence relation|minimal polynomial]] of the sequence, or equivalently, of finding the shortest [[linear feedback shift register]] (LFSR) for the sequence. The latter problem can either be solved inefficiently by solving a system of linear equations, or more efficiently by the [[Berlekamp-Massey algorithm]].

==See also==
* [[Forward error correction]]
* [[BCH code]]
* [[Low-density parity-check code]]
* [[Chien search]]
* [[Datamatrix]]

==References==
{{Reflist}}
{{Reflist}}
* F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Code, New York: North-Holland Publishing Company, 1977.
* Irving S. Reed and Xuemin Chen, Error-Control Coding for Data Networks", Boston: Kluwer Academic Publishers, 1999.


== External links ==
==External links==
* [http://www.mainohustlehard.com/ Maino] official site
* [http://www.schifra.com Schifra Open Source C++ Reed-Solomon Codec]
* [http://www.radionetworkprocessor.com/reed-solomon.html A collection of links to books, online articles and source code]
* {{myspace|maino}}
* [http://rscode.sourceforge.net/ Henry Minsky's RSCode library, Reed-Solomon encoder/decoder]
* [http://www.cs.utk.edu/%7Eplank/plank/papers/SPE-9-97.html A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems]
* [http://runtime-basic.net/Projekt:ReedSolomon A free tool for testing the Reed-Solomon Algorithm (German)]
* An application note from [[4i2i Communications|4i2i]] on some [http://www.4i2i.com/reed_solomon_codes.htm specific implementations]
* A Tutorial from [http://www.highlandcomm.com Highland Communications Technologies] on [http://www.highlandcomm.com/reed_solomon_codes.htm Reed-Solomon codes.]
* A thesis on [http://sidewords.files.wordpress.com/2007/12/thesis.pdf Algebraic soft-decoding of Reed-Solomon codes]. It explains the basics as well.
* [http://dept.ee.wits.ac.za/~versfeld/research_resources/sourcecode/Errors_And_Erasures_Test.zip Matlab implementation of errors-and-erasures decoding]
[[Category:Error detection and correction]]


[[ca:Reed-Solomon]]
[[Category:Living people]]
[[de:Reed-Solomon-Code]]
[[Category:African American rappers]]
[[es:Reed-Solomon]]
[[Category:People from Brooklyn]]
[[fr:Code de Reed-Solomon]]
[[ko:리드 솔로몬 부호]]
[[it:Codice Reed-Solomon]]
[[nl:Reed-Solomoncode]]
[[ja:リード・ソロモン符号]]
[[pl:Reed–Solomon error correction]]
[[ru:Код Рида-Соломона]]
[[simple:Reed-Solomon error correction]]

Revision as of 19:17, 10 October 2008

Reed-Solomon error correction is an error-correcting code that works by oversampling a polynomial constructed from the data. The polynomial is evaluated at several points, and these values are sent or recorded. Sampling the polynomial more often than is necessary makes the polynomial over-determined. As long as it receives "many" of the points correctly, the receiver can recover the original polynomial even in the presence of a "few" bad points.

Reed-Solomon codes are used in a wide variety of commercial applications, most prominently in CDs, DVDs and Blu-ray Discs, in data transmission technologies such as DSL & WiMAX, and broadcast systems such as DVB and ATSC.

Overview

Reed-Solomon codes are block codes. This means that a fixed block of input data is processed into a fixed block of output data. In the case of the most commonly used R-S code (255, 223) – 223 Reed-Solomon input symbols (each eight bits long) are encoded into 255 output symbols.

  • Most R-S ECC schemes are systematic. This means that some portion of the output codeword contains the input data in its original form.
  • A Reed-Solomon symbol size of eight bits was chosen because the decoders for larger symbol sizes would be difficult to implement with current technology. This design choice forces the longest codeword length to be 255 symbols.
  • The standard (255, 223) Reed-Solomon code is capable of correcting up to 16 Reed-Solomon symbol errors in each codeword. Since each symbol is actually eight bits, this means that the code can correct up to 16 short bursts of error due to the inner convolutional decoder.

The Reed-Solomon code, like the convolutional code, is a transparent code. This means that if the channel symbols have been inverted somewhere along the line, the decoders will still operate. The result will be the complement of the original data. However, the Reed-Solomon code loses its transparency if virtual zero fill is used. For this reason it is mandatory that the sense of the data (i.e., true or complemented) be resolved before Reed-Solomon decoding.

In the case of the Voyager program, R-S codes reach near optimal performance when concatenated with the (7, 1/2) convolutional (Viterbi) inner code. Since two check symbols are required for each error to be corrected, this results in a total of 32 check symbols and 223 information symbols per codeword.

In addition, the Reed-Solomon codewords can be interleaved on a symbol basis before being convolutionally encoded. Since this separates the symbols in a codeword, it becomes less likely that a burst from the Viterbi decoder disturbs more than one Reed-Solomon symbol in any one codeword.

Definition

Overview

The key idea behind a Reed-Solomon code is that the data encoded is first visualized as a polynomial. The code relies on a theorem from algebra that states that any k distinct points uniquely determine a polynomial of degree at most k-1.

The sender determines a degree polynomial, over a finite field, that represents the data points. The polynomial is then "encoded" by its evaluation at various points, and these values are what is actually sent. During transmission, some of these values may become corrupted. Therefore, more than k points are actually sent. As long as sufficient values are received correctly, the receiver can deduce what the original polynomial was, and hence decode the original data.

In the same sense that one can correct a curve by interpolating past a gap, a Reed-Solomon code can bridge a series of errors in a block of data to recover the coefficients of the polynomial that drew the original curve.

Mathematical formulation

Given a finite field F and polynomial ring F[x], let n and k be chosen such that 1 ≤ kn ≤ | F |. Pick n distinct elements of F, denoted { x1, x2, ... , xn }. Then, the codebook C is created from the tuplets of values obtained by evaluating every polynomial (over F) of degree less than k at each xi; that is,

C is a [n, k, n-k+1] code; in other words, it is a linear code of length n (over F) with dimension k and minimum Hamming distance n-k+1.

A Reed-Solomon code is a code of the above form, subject to the additional requirement that the set must be the set of all non-zero elements of the field (and therefore, ).

Remarks

For practical uses of Reed-Solomon codes, it is common to use a finite field with elements. In this case, each symbol can be represented as an -bit value. The sender sends the data points as encoded blocks, and the number of symbols in the encoded block is . Thus a Reed-Solomon code operating on 8-bit symbols has symbols per block. (This is a very popular value because of the prevalence of byte-oriented computer systems.) The number , with , of data symbols in the block is a design parameter. A commonly used code encodes eight-bit data symbols plus 32 eight-bit parity symbols in an -symbol block; this is denoted as a code, and is capable of correcting up to 16 symbol errors per block.

The set of non-zero elements of a finite field can be written as , where is a primitive nth root of unity. It is customary to encode the values of a Reed-Solomon code in this order. Since , and since for every polynomial , the function is also a polynomial of the same degree, it then follows that a Reed-Solomon code is cyclic.

Reed-Solomon codes as BCH codes

Reed-Solomon codes are a special case of a larger class of codes called BCH codes. An efficient error correction algorithm for BCH codes (and therefore Reed-Solomon codes) was discovered by Berlekamp in 1968.

To see that Reed-Solomon codes are special BCH codes, it is useful to give the following alternate definition of Reed-Solomon codes.[1]

Given a finite field of size , let and let be a primitive th root of unity in . Also let be given. The Reed-Solomon code for these parameters has code word if and only if are roots of the polynomial

.

With this definition, it is immediately seen that a Reed-Solomon code is a polynomial code, and in particular a BCH code. The generator polynomial is the minimal polynomial with roots , and the code words are exactly the polynomials that are divisible by .

Equivalence of the two formulations

At first sight, the above two definitions of Reed-Solomon codes seem very different. In the first definition, code words are values of polynomials, whereas in the second, they are coefficients. Moreover, the polynomials in the first definition are required to be of small degree, whereas those in the second definition are required to have specific roots.

The equivalence of the two definitions is proved using the discrete Fourier transform. This transform, which exists in all finite fields as well as the complex numbers, establishes a duality between the coefficients of polynomials and their values. This duality can be approximately summarized as follows: Let and be two polynomials of degree less than . If the values of are the coefficients of , then (up to a scalar factor and reordering), the values of are the coefficients of . For this to make sense, the values must be taken at locations , for , where is a primitive th root of unity.

To be more precise, let

and
,

and assume and are related by the discrete Fourier transform. Then the coefficients and values of and are related as follows: for all , and .

Using these facts, we have:

  • is a code word of the Reed-Solomon code according to the first definition
  • if and only if is of degree less than (because are the values of ),
  • if and only if for ,
  • if and only if for (because ),
  • if and only if is a code word of the Reed-Solomon code according to the second definition.

This shows that the two definitions are equivalent.

Properties of Reed-Solomon codes

The error-correcting ability of any Reed-Solomon code is determined by , the measure of redundancy in the block. If the locations of the errored symbols are not known in advance, then a Reed–Solomon code can correct up to erroneous symbols, i.e., it can correct half as many errors as there are redundant symbols added to the block. Sometimes error locations are known in advance (e.g., “side information” in demodulator signal-to-noise ratios)—these are called erasures. A Reed–Solomon code (like any linear code) is able to correct twice as many erasures as errors, and any combination of errors and erasures can be corrected as long as the inequality is satisfied, where is the number of errors and is the number of erasures in the block.

The properties of Reed-Solomon codes make them especially well-suited to applications where errors occur in bursts. This is because it does not matter to the code how many bits in a symbol are in error—if multiple bits in a symbol are corrupted it only counts as a single error. Conversely, if a data stream is not characterized by error bursts or drop-outs but by random single bit errors, a Reed-Solomon code is usually a poor choice.

Designers are not required to use the "natural" sizes of Reed-Solomon code blocks. A technique known as “shortening” can produce a smaller code of any desired size from a larger code. For example, the widely used (255,223) code can be converted to a (160,128) code by padding the unused portion of the block (usually the beginning) with 95 binary zeroes and not transmitting them. At the decoder, the same portion of the block is loaded locally with binary zeroes. The compact disc is an example of an application of shortened Reed-Solomon codes.

In 1999 Madhu Sudan and Venkatesan Guruswami at MIT, published “Improved Decoding of Reed-Solomon and Algebraic-Geometry Codes” introducing an algorithm that allowed for the correction of errors beyond half the minimum distance of the code. It applies to Reed–Solomon codes and more generally to algebraic geometry codes. This algorithm produces a list of codewords (it is a list-decoding algorithm) and is based on interpolation and factorization of polynomials over and its extensions.

History

The code was invented in 1960 by Irving S. Reed and Gustave Solomon, who were then members of MIT Lincoln Laboratory. Their seminal article was entitled "Polynomial Codes over Certain Finite Fields." When it was written, digital technology was not advanced enough to implement the concept. The first application, in 1982, of RS codes in mass-produced products was the compact disc, where two interleaved RS codes are used. An efficient decoding algorithm for large-distance RS codes was developed by Elwyn Berlekamp and James Massey in 1969. Today RS codes are used in hard disk drive, DVD, telecommunication, and digital broadcast protocols.

Applications

Data storage

Reed-Solomon coding is very widely used in mass storage systems to correct the burst errors associated with media defects.

Reed-Solomon coding is a key component of the compact disc. It was the first use of strong error correction coding in a mass-produced consumer product, and DAT and DVD use similar schemes. In the CD, two layers of Reed-Solomon coding separated by a 28-way convolutional interleaver yields a scheme called Cross-Interleaved Reed Solomon Coding (CIRC). The first element of a CIRC decoder is a relatively weak inner (32,28) Reed-Solomon code, shortened from a (255,251) code with 8-bit symbols. This code can correct up to 2 byte errors per 32-byte block. More importantly, it flags as erasures any uncorrectable blocks, i.e., blocks with more than 2 byte errors. The decoded 28-byte blocks, with erasure indications, are then spread by the deinterleaver to different blocks of the (28,24) outer code. Thanks to the deinterleaving, an erased 28-byte block from the inner code becomes a single erased byte in each of 28 outer code blocks. The outer code easily corrects this, since it can handle up to 4 such erasures per block.

The result is a CIRC that can completely correct error bursts up to 4000 bits, or about 2.5 mm on the disc surface. This code is so strong that most CD playback errors are almost certainly caused by tracking errors that cause the laser to jump track, not by uncorrectable error bursts.[2]

Another product which incorporates Reed–Solomon coding is Nintendo's e-Reader. This is a video-game delivery system which uses a two-dimensional "barcode" printed on trading cards. The cards are scanned using a device which attaches to Nintendo's Game Boy Advance game system.

Reed-Solomon error correction is also used in parchive files which are commonly posted accompanying multimedia files on USENET. Distributed online storage service, Wuala, also makes use of Reed-Solomon when breaking up files.

Data transmission

Specialized forms of Reed-Solomon codes specifically Cauchy-RS and Vandermonde-RS can be used to overcome the unreliable nature of data transmission over erasure channels. The encoding process assumes a code of RS(N,K) which results in N codewords of length N symbols each storing K symbols of data, being generated, that are then sent over an erasure channel.

Any combination of K codewords received at the other end is enough to reconstruct all of the N codewords. The code rate is generally set to 1/2 unless the channel's erasure likelihood can be adequately modelled and is seen to be less. In conclusion N is usually 2K, meaning that at least half of all the codewords sent must be received in order to reconstruct all of the codewords sent.

Reed-Solomon codes are also used in xDSL systems and CCSDS's Space Communications Protocol Specifications as a form of Forward Error Correction.

Mail encoding

Paper bar codes such as PostBar, MaxiCode, Datamatrix and QR_Code use Reed–Solomon error correction to allow correct reading even if a portion of the bar code is damaged.

Satellite transmission

One significant application of Reed–Solomon coding was to encode the digital pictures sent back by the Voyager space probe.

Voyager introduced Reed–Solomon coding in conjunction with ML convolutional codes, a practice that has since become very widespread in deep space and satellite (e.g., direct digital broadcasting) communications.


File:NASA ECC Codes-imperfection.png
NASA's Deep Space Missions ECC Codes (code imperfectness)


Viterbi decoders tend to produce errors in short bursts. Correcting these burst errors is a job best done by short or simplified Reed-Solomon codes.

Modern versions of concatenated Reed-Solomon/Viterbi-decoded convolutional coding were and are used on the Mars Pathfinder, Galileo, Mars Exploration Rover and Cassini missions, where they perform within about 1–1.5 dB of the ultimate limit imposed by the Shannon capacity.

These concatenated codes are now being replaced by more powerful turbo codes where the transmitted data does not need to be decoded immediately.

Sketch of the error correction algorithm

The following is a sketch of the main idea behind the error correction algorithm for Reed-Solomon codes.

By definition, a code word of a Reed-Solomon code is given by the sequence of values of a low-degree polynomial over a finite field. A key fact for the error correction algorithm is that the values and the coefficients of a polynomial are related by the discrete Fourier transform.

Figure 1
Figure 2

The purpose of a Fourier transform is to convert a signal from a time domain to a frequency domain or vice versa. In case of the Fourier transform over a finite field, the frequency domain signal corresponds to the coefficients of a polynomial, and the time domain signal correspond to the values of the same polynomial.

As shown in Figures 1 and 2, an isolated value in the frequency domain corresponds to a smooth wave in the time domain. The wavelength depends on the location of the isolated value.

Figure 3
Figure 4

Conversely, as shown in Figures 3 and 4, an isolated value in the time domain corresponds to a smooth wave in the frequency domain.

Figure 5

In a Reed-Solomon code, the frequency domain is divided into two regions as shown in Figure 5: a left (low-frequency) region of length , and a right (high-frequency) region of length . A data word is then embedded into the left region (corresponding to the coefficients of a polynomial of degree at most ), while the right region is filled with zeros. The result is Fourier transformed into the time domain, yielding a code word that is composed only of low frequencies. In the absence of errors, a code word can be decoded by reverse Fourier transforming it back into the frequency domain.

Figure 6

Now consider a code word containing a single error, as shown in Figure 6. The effect of this error in the frequency domain is a smooth, single-frequency wave in the right region, called the syndrome of the error. The error location can be determined by determining the frequency of the syndrome signal.

Figure 7

Similarly, if two or more errors are introduced in the code word, the syndrome will be a signal composed of two or more frequencies, as shown in Figure 7. As long as it is possible to determine the frequencies of which the syndrome is composed, it is possible to determine the error locations. Notice that the error locations depend only on the frequencies of these waves, whereas the error magnitudes depend on their amplitudes and phase.

The problem of determining the error locations has therefore been reduced to the problem of finding, given a sequence of values, the smallest set of elementary waves into which these values can be decomposed. It is known from digital signal processing that this problem is equivalent to finding the roots of the minimal polynomial of the sequence, or equivalently, of finding the shortest linear feedback shift register (LFSR) for the sequence. The latter problem can either be solved inefficiently by solving a system of linear equations, or more efficiently by the Berlekamp-Massey algorithm.

See also

References

  1. ^ R. Lidl and G. Pilz. Applied Abstract Algebra, 2nd edition. Wiley, 1999, p.226.
  2. ^ K.A.S. Immink, Reed-Solomon Codes and the Compact Disc in S.B. Wicker and V.K. Bhargava, Edrs, Reed-Solomon Codes and Their Applications, IEEE Press, 1994.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Code, New York: North-Holland Publishing Company, 1977.
  • Irving S. Reed and Xuemin Chen, Error-Control Coding for Data Networks", Boston: Kluwer Academic Publishers, 1999.

External links