Katana VentraIP

Error correction code

In computing, telecommunication, information theory, and coding theory, forward error correction (FEC) or channel coding[1][2][3] is a technique used for controlling errors in data transmission over unreliable or noisy communication channels.

"Interleaver" redirects here. For the fiber-optic device, see optical interleaver.

The central idea is that the sender encodes the message in a redundant way, most often by using an error correction code or error correcting code (ECC).[4][5] The redundancy allows the receiver not only to detect errors that may occur anywhere in the message, but often to correct a limited number of errors. Therefore a reverse channel to request re-transmission may not be needed. The cost is a fixed, higher forward channel bandwidth.


The American mathematician Richard Hamming pioneered this field in the 1940s and invented the first error-correcting code in 1950: the Hamming (7,4) code.[5]


FEC can be applied in situations where re-transmissions are costly or impossible, such as one-way communication links or when transmitting to multiple receivers in multicast.


Long-latency connections also benefit; in the case of satellites orbiting distant planets, retransmission due to errors would create a delay of several hours. FEC is also widely used in modems and in cellular networks.


FEC processing in a receiver may be applied to a digital bit stream or in the demodulation of a digitally modulated carrier. For the latter, FEC is an integral part of the initial analog-to-digital conversion in the receiver. The Viterbi decoder implements a soft-decision algorithm to demodulate digital data from an analog signal corrupted by noise. Many FEC decoders can also generate a bit-error rate (BER) signal which can be used as feedback to fine-tune the analog receiving electronics.


FEC information is added to mass storage (magnetic, optical and solid state/flash based) devices to enable recovery of corrupted data, and is used as ECC computer memory on systems that require special provisions for reliability.


The maximum proportion of errors or missing bits that can be corrected is determined by the design of the ECC, so different forward error correcting codes are suitable for different conditions. In general, a stronger code induces more redundancy that needs to be transmitted using the available bandwidth, which reduces the effective bit-rate while improving the received effective signal-to-noise ratio. The noisy-channel coding theorem of Claude Shannon can be used to compute the maximum achievable communication bandwidth for a given maximum acceptable error probability. This establishes bounds on the theoretical maximum information transfer rate of a channel with some given base noise level. However, the proof is not constructive, and hence gives no insight of how to build a capacity achieving code. After years of research, some advanced FEC systems like polar code[3] come very close to the theoretical maximum given by the Shannon channel capacity under the hypothesis of an infinite length frame.

Up to 1 bit of triplet in error, or

up to 2 bits of triplet omitted (cases not shown in table).

ECC is accomplished by adding redundancy to the transmitted information using an algorithm. A redundant bit may be a complicated function of many original information bits. The original information may or may not appear literally in the encoded output; codes that include the unmodified input in the output are systematic, while those that do not are non-systematic.


A simplistic example of ECC is to transmit each data bit 3 times, which is known as a (3,1) repetition code. Through a noisy channel, a receiver might see 8 versions of the output, see table below.


This allows an error in any one of the three samples to be corrected by "majority vote", or "democratic voting". The correcting ability of this ECC is:


Though simple to implement and widely used, this triple modular redundancy is a relatively inefficient ECC. Better ECC codes typically examine the last several tens or even the last several hundreds of previously received bits to determine how to decode the current small handful of bits (typically in groups of 2 to 8 bits).

Because of this "risk-pooling" effect, digital communication systems that use ECC tend to work well above a certain minimum and not at all below it.

signal-to-noise ratio

This all-or-nothing tendency – the – becomes more pronounced as stronger codes are used that more closely approach the theoretical Shannon limit.

cliff effect

Interleaving ECC coded data can reduce the all or nothing properties of transmitted ECC codes when the channel errors tend to occur in bursts. However, this method has limits; it is best used on narrowband data.

ECC could be said to work by "averaging noise"; since each data bit affects many transmitted symbols, the corruption of some symbols by noise usually allows the original user data to be extracted from the other, uncorrupted received symbols that also depend on the same user data.


Most telecommunication systems use a fixed channel code designed to tolerate the expected worst-case bit error rate, and then fail to work at all if the bit error rate is ever worse. However, some systems adapt to the given channel error conditions: some instances of hybrid automatic repeat-request use a fixed ECC method as long as the ECC can handle the error rate, then switch to ARQ when the error rate gets too high; adaptive modulation and coding uses a variety of ECC rates, adding more error-correction bits per packet when there are higher error rates in the channel, or taking them out when they are not needed.

Block codes work on fixed-size blocks (packets) of bits or symbols of predetermined size. Practical block codes can generally be hard-decoded in to their block length.

polynomial time

Convolutional codes work on bit or symbol streams of arbitrary length. They are most often soft decoded with the , though other algorithms are sometimes used. Viterbi decoding allows asymptotically optimal decoding efficiency with increasing constraint length of the convolutional code, but at the expense of exponentially increasing complexity. A convolutional code that is terminated is also a 'block code' in that it encodes a block of input data, but the block size of a convolutional code is generally arbitrary, while block codes have a fixed size dictated by their algebraic characteristics. Types of termination for convolutional codes include "tail-biting" and "bit-flushing".

Viterbi algorithm

The two main categories of ECC codes are block codes and convolutional codes.


There are many types of block codes; Reed–Solomon coding is noteworthy for its widespread use in compact discs, DVDs, and hard disk drives. Other examples of classical block codes include Golay, BCH, Multidimensional parity, and Hamming codes.


Hamming ECC is commonly used to correct NAND flash memory errors.[6] This provides single-bit error correction and 2-bit error detection. Hamming codes are only suitable for more reliable single-level cell (SLC) NAND. Denser multi-level cell (MLC) NAND may use multi-bit correcting ECC such as BCH or Reed–Solomon.[7][8] NOR Flash typically does not use any error correction.[7]


Classical block codes are usually decoded using hard-decision algorithms,[9] which means that for every input and output signal a hard decision is made whether it corresponds to a one or a zero bit. In contrast, convolutional codes are typically decoded using soft-decision algorithms like the Viterbi, MAP or BCJR algorithms, which process (discretized) analog signals, and which allow for much higher error-correction performance than hard-decision decoding.


Nearly all classical block codes apply the algebraic properties of finite fields. Hence classical block codes are often referred to as algebraic codes.


In contrast to classical block codes that often specify an error-detecting or error-correcting ability, many modern block codes such as LDPC codes lack such guarantees. Instead, modern codes are evaluated in terms of their bit error rates.


Most forward error correction codes correct only bit-flips, but not bit-insertions or bit-deletions. In this setting, the Hamming distance is the appropriate way to measure the bit error rate. A few forward error correction codes are designed to correct bit-insertions and bit-deletions, such as Marker Codes and Watermark Codes. The Levenshtein distance is a more appropriate way to measure the bit error rate when using such codes. [10]

rectangular (or uniform) interleavers (similar to the method using skip factors described above)

convolutional interleavers

random interleavers (where the interleaver is a known random permutation)

S-random interleaver (where the interleaver is a known random permutation with the constraint that no input symbols within distance S appear within a distance of S in the output).

[25]

a contention-free quadratic (QPP).[26] An example of use is in the 3GPP Long Term Evolution mobile telecommunication standard.[27]

permutation polynomial

(A Fast Forward Error Correction Toolbox): a full communication chain in C++ (many supported codes like Turbo, LDPC, Polar codes, etc.), very fast and specialized on channel coding (can be used as a program for simulations or as a library for the SDR).

AFF3CT

: a C++ library of classes and functions for linear algebra, numerical optimization, signal processing, communications, and statistics.

IT++

: implementation (in C) of the 3GPP specifications concerning the Evolved Packet Core Networks.

OpenAir

Simulating the behaviour of error-correcting codes (ECCs) in software is a common practice to design, validate and improve ECCs. The upcoming wireless 5G standard raises a new range of applications for the software ECCs: the Cloud Radio Access Networks (C-RAN) in a Software-defined radio (SDR) context. The idea is to directly use software ECCs in the communications. For instance in the 5G, the software ECCs could be located in the cloud and the antennas connected to this computing resources: improving this way the flexibility of the communication network and eventually increasing the energy efficiency of the system.


In this context, there are various available Open-source software listed below (non exhaustive).

AN codes

Algebraic geometry code

which can be designed to correct any arbitrary number of errors per code block.

BCH code

used for radar, telemetry, ultra sound, Wifi, DSSS mobile phone networks, GPS etc.

Barker code

Berger code

Constant-weight code

Convolutional code

Expander codes

Group codes

of which the Binary Golay code is of practical interest

Golay codes

used in the McEliece cryptosystem

Goppa code

Hadamard code

Hagelbarger code

Hamming code

for non-white noise (prevalent for example in broadband over powerlines)

Latin square based code

Lexicographic code

a type of erasure correcting code across networks instead of point-to-point links

Linear Network Coding

Long code

also known as Gallager code, as the archetype for sparse graph codes

Low-density parity-check code

which is a near-optimal rateless erasure correcting code (Fountain code)

LT code

m of n codes

used in Geometry and Group Theory[31]

Nordstrom-Robinson code

a near-optimal rateless erasure correcting code

Online code

Polar code (coding theory)

a near-optimal rateless erasure correcting code

Raptor code

Reed–Solomon error correction

Reed–Muller code

Repeat-accumulate code

such as Triple modular redundancy

Repetition codes

Spinal code, a rateless, nonlinear code based on pseudo-random hash functions

[32]

a near-optimal erasure correcting code, and the precursor to Fountain codes

Tornado code

Turbo code

Walsh–Hadamard code

(CRCs) can correct 1-bit errors for messages at most bits long for optimal generator polynomials of degree , see Mathematics of cyclic redundancy checks § Bitfilters

Cyclic redundancy checks

Burst error-correcting code

Code rate

Erasure codes

Error detection and correction

Error-correcting codes with feedback

Linear code

Quantum error correction

Soft-decision decoder

; Sloane, Neil James Alexander (2007) [1977]. Written at AT&T Shannon Labs, Florham Park, New Jersey, USA. The Theory of Error-Correcting Codes. North-Holland Mathematical Library. Vol. 16 (digital print of 12th impression, 1st ed.). Amsterdam / London / New York / Tokyo: North-Holland / Elsevier BV. ISBN 978-0-444-85193-2. LCCN 76-41296. (xxii+762+6 pages)

MacWilliams, Florence Jessiem

Clark, Jr., George C.; Cain, J. Bibb (1981). Error-Correction Coding for Digital Communications. New York, USA: . ISBN 0-306-40615-2.

Plenum Press

Arazi, Benjamin (1987). Swetman, Herb (ed.). A Commonsense Approach to the Theory of Error Correcting Codes. Series in Computer Systems. Vol. 10 (1 ed.). Cambridge, Massachusetts, USA / London, UK: Massachusetts Institute of Technology. ISBN 0-262-01098-4. LCCN 87-21889. (x+2+208+4 pages)

MIT Press

Wicker, Stephen B. (1995). Error Control Systems for Digital Communication and Storage. Englewood Cliffs, New Jersey, USA: . ISBN 0-13-200809-2.

Prentice-Hall

Wilson, Stephen G. (1996). Digital Modulation and Coding. Englewood Cliffs, New Jersey, USA: . ISBN 0-13-210071-1.

Prentice-Hall

2007-02-16

"Error Correction Code in Single Level Cell NAND Flash memories"

2004-11-29

"Error Correction Code in NAND Flash memories"

by James Hamilton, 2012-02-26

Observations on Errors, Corrections, & Trust of Dependent Systems

Sphere Packings, Lattices and Groups, By J. H. Conway, Neil James Alexander Sloane, , 2013-03-09 – Mathematics – 682 pages.

Springer Science & Business Media

Morelos-Zaragoza, Robert (2004). . Retrieved 5 March 2006.

"The Correcting Codes (ECC) Page"

. Database of error correcting codes.

error correction zoo

lpdec: library for LP decoding and related things (Python)