LDPC Codes: Introduction
Theory
LDPC Codes
Recall that a linear code can be described as the set of all vectors which are orthogonal to its parity check matrix , i.e., .
A matrix is said to be sparse when the number of ones is smaller than the number of zeros in the matrix. A Low-Density Parity Check (LDPC) code is one which has a very sparse parity check matrix, i.e., in which the number of ones is much smaller than the number of zeros. For example, consider the matrix ,
The total number of 1s in the above matrix is while the number of zeros is . Clearly this is a sparse matrix. Note also that the all rows of the matrix are linearly independent. We see that and for this code, which means that the rate is . Further, also observe that the first parity check equation as per is . We therefore say that the coordinates of each codeword are participating in the first parity check equation. Similarly, participate in the second parity check equation, and so on.
In a more general sense than the example above, the sparse matrix of an LDPC code may have some linearly redundant rows. Thus, the redundancy of the code can be lower than the number of rows of (i.e., the dimension of the code can be greater than ). However, throughout our lab here, we will only consider matrices of codes which have full rank.
LDPC codes are one of the most widely used codes in practice. Most practical LDPC codes have blocklengths 5000 and above, where each row could have only a few entries which are . Carefully designed LDPC codes have extremely good performance (very low probability of error, and operational rates close to the channel capacity, which is the maximum rate at which a channel with certain noise level can operate) as well as reasonable (though not small) encoding and decoding complexity, which explains their widespread adoption in applications.
Regular and Irregular LDPC codes
An LDPC code is called a Regular LDPC code if the number of 1s in each row of the sparse matrix is identical (say, equal to ) and the number of 1s in each column of is also identical (say, equal to ). Since the number of rows is and the number of columns is , it should therefore be true that . The design rate of such a regular LDPC code is defined as . Note that this corresponds to the actual rate of the code, provided the rows of the matrix are linearly independent, which is our assumption here.
A LDPC code is called an irregular LDPC code if the number of s in the rows (or columns) of the matrix are not identical. That is, different rows could have different number of 1s, and so can columns, in an irregular code. Observe that, the code with the example matrix shown above is an irregular LDPC code. Indeed, the second row has only ones, while the others have ones each.
In practice, regular LDPC codes are easier to analyze theoretically, but carefully designed irregular LDPC codes generally have better performance than regular LDPC codes.
Tanner graphs of LDPC codes
A graph is a collection of vertices (drawn as points on a plane, typically) and edges (drawn as lines or curves between pairs of vertices, typically). A bipartite graph is a graph whose vertex set can be partitioned into two subsets, such that any edge of the graph exists only between pairs of vertices, exactly one from each subset. Thus, no edge of the bipartite graph exists between pairs of vertices in the same subset of the partition.
Any matrix can be represented using a bipartite graph, called a Tanner graph, as follows. Corresponding to the coordinates in the codeword, we construct vertices . We call these vertices as the variable nodes of the Tanner graph. Corresponding to the rows (each one representing one parity equation or parity check equation), we construct check nodes, denoted as . A variable node is connected to a check node , if and only if the entry of the matrix is . In other words, if is an edge of the Tanner graph, then the coordinate participates in the parity check equation.
The figure below shows the Tanner graph of the matrix given in the example above.
Observe that the degree of each variable node, which is the number of check nodes with which it has an edge, represents the number of parity check equations in which the corresponding coordinate participates in. For instance, the coordinate participates in two check equations in the given example. So, the degree of variable node is precisely two in the graph. Similarly, the degree of each check node is the number of coordinates that participate in the specific parity check equation. For instance, the first check node has degree , as the first parity check equation involves three variables.
In the upcoming experiments, we will see how the Tanner graph plays a crucial role in visualizing the decoding of LDPC codes on various channels.