Low-density parity-check code 516393 223000561 2008-07-02T03:10:26Z Dicklyon 869314 copyedit; fix haphazard footnote punct. order and spacing In [[information theory]], a '''low-density parity-check code (LDPC code)''' is an [[error correcting code]], a method of transmitting a message over a [[signal noise|noisy]] transmission channel.<ref>[[David J.C. MacKay]] (2003) Information theory, inference and learning algorithms, CUP, ISBN 0-521-64298-1, (also [http://www.inference.phy.cam.ac.uk/mackay/itila/book.html available online])</ref><ref>[[Todd K. Moon]] (2005) Error Correction Coding, Mathematical Methods and Algorithms. Wiley, ISBN 0-471-64800-0 (Includes code)</ref> While LDPC and other error correcting codes cannot guarantee perfect transmission, the probability of lost information can be made as small as desired. LDPC was the first code to allow data transmission rates close to the theoretical maximum, the [[Shannon-Hartley theorem|Shannon Limit]]. Impractical to implement when developed in 1963, LDPC codes were forgotten.<ref name=MacKay96>[[David J.C. MacKay]] and Radford M. Neal, ''Near Shannon Limit Performance of Low Density Parity Check Codes'', Electronics Letters, July 1996</ref> The next 30 or so years of [[information theory]] failed to produce anything nearly as effective, and LDPC remains, in theory, the most effective developed to date (2007). The explosive growth in information technology has produced a corresponding increase of commercial interest in the development of highly efficient data transmission codes as such codes impact everything from signal quality to battery life. Although implementation of LDPC codes has lagged that of other codes, notably the [[turbo code]], the absence of encumbering [[software patent]]s has made LDPC attractive to some and LDPC codes are positioned to become a standard in the developing market for highly efficient data transmission methods. In 2003, an LDPC code beat six turbo codes to become the error correcting code in the new [[DVB-S2]] standard for the satellite transmission of [[digital television]].<ref name="hughesdvb">[http://www.ieeevtc.org/vtc2003fall/2003panelsessions/llee.pdf Presentation by Hughes Systems]</ref> LDPC codes are also known as '''Gallager codes''', in honor of [[Robert G. Gallager]], who developed the LDPC concept in his doctoral dissertation at [[Massachusetts Institute of Technology|MIT]] in 1960. ==Function== LDPC codes are defined by a sparse [[parity-check matrix]]. This [[sparse matrix]] is often randomly generated, subject to the [[sparsity]] constraints. These codes were first designed by [[Robert G. Gallager|Gallager]] in 1962. Below is a graph fragment of an example LDPC code using [[factor graph|Forney's factor graph notation]]. The bits of a valid message, when placed on the '''T's''' at the top of the graph, satisfy the graphical constraints. Specifically, all lines connecting to a variable node (box with an '=' sign) have the same value, and all values connecting to a factor node (box with a '+' sign) must sum, [[modular arithmetic|modulo]] two, to zero (in other words, they must sum to an even number). [[Image:ldpc_code_fragment_factor_graph.svg|none]] If we ignore constraints for lines going out of the picture, then there are 8 possible 6 bit strings which correspond to valid codewords: (i.e., 000000, 011001, 110010, 111100, 101011, 100101, 001110, 010111). Thus this LDPC code fragment represents a 3-bit message encoded as 6 bits. The purpose of this redundancy is to aid in recovering from channel errors. This is a (6,3) [[linear code]] with <math>n=6</math> and <math>k=3</math>. Again, if we ignore lines going out of the picture, then the parity-check matrix representing this graph fragment is :<math> \mathbf{H} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 1 & 0 \\ \end{pmatrix}. </math> In this matrix, each row represents one of the three parity-check constraints, whereas each column represents one of the six bits in the received codeword. In this example, the 8 codewords can be obtained by putting the [[parity-check matrix]] '''H''' into this form <math>\begin{bmatrix} -P^T | I_{n-k} \end{bmatrix}</math> through basic row operations: :<math>\mathbf{H} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 1 & 0 \\ \end{pmatrix} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ \end{pmatrix} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 \\ \end{pmatrix} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 \\ \end{pmatrix}. </math> From this, the [[generator matrix]] '''G''' can be obtained as <math>\begin{bmatrix} I_k | P \end{bmatrix}</math> (noting that in the special case of this being a binary code <math>P = -P</math>), or specifically: :<math>\mathbf{G} = \begin{pmatrix} 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 \\ \end{pmatrix}. </math> Finally, by multiplying all 8 possible 3 bit strings by '''G''', all 8 valid codewords are obtained. For example the codeword for the bitstring '101' is obtained by: :<math> \begin{pmatrix} 1 & 0 & 1 \\ \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 \\ \end{pmatrix} = \begin{pmatrix} 1 & 0 & 1 & 0 & 1 & 1 \\ \end{pmatrix}. </math> ==Decoding== {{Expert-subject|Telecommunications|section}} Optimally decoding an LDPC code is an [[NP-complete]] problem, but suboptimal techniques based on [[belief propagation]] are used in practice and lead to good approximations. For example, consider that the valid codeword, 101011, from the example above is transmitted across a [[binary erasure channel]] and received with the 1st and 4th bit erased to yield ?01?11. We know that the transmitted message must have satisfied the code constraints which we can represent by writing the received message on the top of the factor graph as shown below. Belief propagation is particularly simple for the binary erasure channel and consists of iterative constraint satisfaction. In this case, the first step of belief propagation is to realize that the 4th bit must be 0 to satisfy the middle constraint. Now that we have decoded the 4th bit, we realize that the 1st bit must be a 1 to satisfy the leftmost constraint. [[Image:ldpc_code_fragment_factor_graph_w_erasures_decode_step_2.svg|none]] Thus we are able to iteratively decode the message encoded with our LDPC code. For other channel models, the messages passed between the variable nodes and check nodes are real numbers which express probabilities and likelihoods of belief. We can validate this result by multiplying the corrected codeword '''r''' by the parity-check matrix '''H''': :<math>\mathbf{z} = \mathbf{Hr} = \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 1 & 0 \\ \end{pmatrix} \begin{pmatrix} 1 \\ 0 \\ 1 \\ 0 \\ 1 \\ 1 \\ \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ \end{pmatrix}. </math> Because the outcome '''z''' (the [[Decoding_methods#Syndrome_decoding|syndrome]]) of this operation is the 3 x 1 zero vector, we have successfully validated the resulting codeword '''r'''. == Code construction == For large block sizes, LDPC codes are commonly constructed by first studying the behaviour of decoders. As the block-size tends to infinity, LDPC decoders can be shown to have a noise threshold below which decoding is reliably achieved, and above which decoding is not achieved.<ref name=richardson01>Thomas J. Richardson and M. Amin Shokrollahi and Rüdiger L. Urbanke Design of Capacity-Approaching Irregular Low-Density Parity-Check Codes, IEEE Transactions in Information Theory, 47(2), February 2001</ref> This threshold can be optimised by finding the best proportion of arcs from check nodes and arcs from variable nodes. An approximate graphical approach to visualising this threshold is an [[EXIT chart]]. The construction of a specific LDPC code after this optimisation falls into two main types of techniques: *Pseudo-random techniques *Combinatorial approaches Construction by a pseudo-random approach builds on theoretical results that, for large block-size, a random construction gives good decoding performance.<ref name=MacKay96/> In general, pseudo-random codes have complex encoders, however pseudo-random codes with the best decoders also can have simple encoders.<ref name=richardson01b>Thomas J. Richardson and Rüdiger L. Urbanke, Efficient Encoding of Low-Density Parity-Check Codes, IEEE Transactions in Information Theory, 47(2), February 2001</ref> Various constraints are often applied to help the good properties expected at the theoretical limit of infinite block size to occur at a finite block size. Combinatorial approaches can be used to optimise properties of small block-size LDPC codes or create codes with simple encoders. One more way of constructing LDPC code is to use [[Finite geometry]]. This method was proposed by Y. Kou ''et al.'' in 2001.<ref name=Kou1>Y. Kou, S. Lin and M. Fossorier, “Low-Density Parity-Check Codes Based on Finite Geometries: A Rediscovery and New Results”, IEEE Transactions on Information Theory, vol. 47, no. 7, Nov. 2001, pp. 2711- 2736.</ref> ==See also== === People === *[[Richard Hamming]] *[[Claude Shannon]] *[[Robert G. Gallager]] === Theory=== *[[Hamming code]] *[[Graph theory]] *[[Belief propagation]] *[[Sparse graph code]] *[[Linear code]] ===Applications=== *[[DVB-S2]] (Digital video broadcasting) *[[WiMAX]] (IEEE 802.16e standard for microwave communications) *[[802.3an#10GBASE-T|10GBase-T Ethernet]] (802.3an) == References == <references/> ==External links== * [http://www.inference.phy.cam.ac.uk/mackay/itila/ The on-line textbook: Information Theory, Inference, and Learning Algorithms], by [[David J.C. MacKay]], discusses LDPC codes in Chapter 47. * [http://geilenkotten.homeunix.org/wikicoding/index.php/LDPC_codes Tutorial on LDPC codes and Gallager's original paper (re-typeset)] * [http://www.inference.phy.cam.ac.uk/mackay/CodesFiles.html LDPC codes and performance results] * [http://www.sigpromu.org/ldpc/DE/index.php Online density evolution for LDPC codes] *Source code for encoding, decoding, and simulating LDPC codes is available from a variety of locations: ** [http://www.cs.utoronto.ca/~radford/ldpc.software.html Binary LDPC codes in C] ** [http://freshmeat.net/projects/pycodes/ Binary LDPC codes for Python (core algorithm in C)] ** [http://www.kozintsev.net/soft.html LDPC codes over GF(q) in [[MATLAB]]] ** [http://www.mathworks.com/access/helpdesk/help/toolbox/comm/ug/fec.ldpcenc.html LDPC encoder] and [http://www.mathworks.com/access/helpdesk/help/toolbox/comm/ug/fec.ldpcdec.html LDPC decoder] in [[MATLAB]] ** [http://www.opencores.org/projects.cgi/web/ldpc_decoder_802_3an/overview LDPC at Opencores] Open source hardware implementation of LDPC encode/decode in [[Verilog]]. [[Category:Error detection and correction]] [[de:Low-Density-Parity-Check-Code]] [[nl:Low-density Parity-check code]] [[ja:低密度パリティ検査符号]] {{Telecommunications-stub}}