Introducing Low-Density Parity-Check Codes
Introducing Low-Density Parity-Check Codes
net/publication/228977165
CITATIONS READS
127 8,513
1 author:
Sarah J Johnson
The University of Newcastle, Australia
164 PUBLICATIONS 4,025 CITATIONS
SEE PROFILE
All content following this page was uploaded by Sarah J Johnson on 21 May 2014.
Sarah J. Johnson
School of Electrical Engineering and Computer Science
The University of Newcastle
Australia
email: sarah.johnson@newcastle.edu.au
Topic 1: Low-Density
Parity-Check Codes
1.1 Introduction
Low-density parity-check (LDPC) codes are forward error-correction codes,
first proposed in the 1962 PhD thesis of Gallager at MIT. At the time, their
incredible potential remained undiscovered due to the computational demands
of simulation in an era when vacumm tubes were only just being replaced by
the first transistors. They remained largely neglected for over 35 years. In the
mean time the field of forward error correction was dominated by highly struc-
tured algebraic block and convolutional codes. Despite the enormous practical
success of these codes, their performance fell well short of the theoretically
achievable limits set down by Shannon in his seminal 1948 paper. By the late
1980s, despite decades of attempts, researchers were largely resigned to this
seemingly insurmountable theory–practice gap.
The relative quiescence of the coding field was utterly transformed by the
introduction of “turbo codes,” proposed by Berrou, Glavieux and Thitimajshima
in 1993, wherein all the key ingredients of successful error correction codes
were replaced: turbo codes involve very little algebra, employ iterative, distrib-
uted algorithms, focus on average (rather than worst-case) performance, and
rely on soft (or probabilistic) information extracted from the channel. Overnight,
the gap to the Shannon limit was all but eliminated, using decoders with man-
ageable complexity.
As researchers struggled through the 1990s to understand just why turbo
codes worked as well as they did, two researchers, McKay and Neal, intro-
duced a new class of block codes designed to posses many of the features of the
new turbo codes. It was soon recognized that these block codes were in fact a
rediscovery of the LDPC codes developed years earlier by Gallager. Indeed, the
algorithm used to decode turbo codes was subsequently shown to be a special
case of the decoding algorithm for LDPC codes presented by Gallager so many
years before.
New generalizations of Gallager’s LDPC codes by a number of researchers
including Luby, Mitzenmacher, Shokrollahi, Spielman, Richardson and Ur-
banke, produced new irregular LDPC codes which easily outperform the best
turbo codes, as well as offering certain practical advantages and an arguably
cleaner setup for theoretical results. Today, design techniques for LDPC codes
exist which enable the construction of codes which approach the Shannon’s
capacity to within hundredths of a decibel.
So rapid has progress been in this area that coding theory today is in many
ways unrecognizable from its state just a decade ago. In addition to the strong
3
theoretical interest in LDPC codes, such codes have already been adopted in
satellite-based digital video broadcasting and long-haul optical communication
standards, are highly likely to be adopted in the IEEE wireless local area net-
work standard, and are under consideration for the long-term evolution of third-
generation mobile telephony.
Example 1.1.
The 7-bit ASCII string for the letter S is 1010011, and a parity bit is to be added
as the eighth bit. The string for S already has an even number of ones (namely
four) and so the value of the parity bit is 0, and the codeword for S is 10100110.
More formally, for the 7-bit ASCII plus even parity code we define a code-
word c to have the following structure:
c = [c1 c2 c3 c4 c5 c6 c7 c8 ],
c1 ⊕ c2 ⊕ c3 ⊕ c4 ⊕ c5 ⊕ c6 ⊕ c7 ⊕ c8 = 0. (1.1)
Example 1.2.
A 7-bit ASCII letter is encoded with the single parity check code from Exam-
ple 1.1. The resulting codeword was sent though a noisy channel and the string
y = [1 0 0 1 0 0 1 0] was received. To check if y is a valid codeword we test y
with (1.1).
y1 ⊕ y2 ⊕ y3 ⊕ y4 ⊕ y5 ⊕ y6 ⊕ y7 ⊕ y8 = 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 = 1.
Since the sum is 1, the parity-check equation is not satisfied and y is not a
valid codeword. We have detected that at least one error occurred during the
transmission.
Example 1.3.
A code C consists of all length six strings
c = [c1 c2 c3 c4 c5 c6 ],
c1 ⊕ c 2 ⊕ c 4 = 0
c2 ⊕ c 3 ⊕ c 5 = 0 (1.2)
c1 ⊕ c 2 ⊕ c 3 ⊕ c 6 = 0
Codeword constraints are often written in matrix form and so the constraints
of (1.2) become
c1
c2
1 1 0 1 0 0 c3
0
0 1 1 0 1 0 = 0 . (1.3)
c4
1 1 1 0 0 1 0
| {z } c5
H c6
HyT = 0. (1.4)
1.2.1 Encoding
To distinguish between the message bits and parity bits in the codeword in Ex-
ample 1.3 we re-write the code parity-check constraints so that each one solves
for a different codeword bit.
The codeword bits c1 , c2 , and c3 contain the three bit message, c1 , c2 , and
c3 , while the codeword bits c4 , c5 and c6 contain the three parity-check bits.
Written this way the codeword constraints show how to encode the message.
Example 1.5.
Using the constraints in (1.5) the message 110 produces the parity-check bits
c4 = 1 ⊕ 1 = 0,
c5 = 1 ⊕ 0 = 1,
c6 = 1 ⊕ 1 ⊕ 0 = 0,
and so the codeword for this message is c = [1 1 0 0 1 0].
where the matrix G is called the generator matrix of the code. The message bits
are conventionally labeled by u = [u1 , u2 , · · · uk ], where the vector u holds the
k message bits. Thus the codeword c corresponding to the binary message
u = [u1 u2 u3 ] can be found using the matrix equation
c = uG. (1.7)
For a binary code with k message bits and length n codewords the generator
matrix, G, is a k × n binary matrix. The ratio k/n is called the rate of the code.
A code with k message bits contains 2k codewords. These codewords are a
subset of the total possible 2n binary vectors of length n.
Example 1.6.
Substituting each of the 23 = 8 distinct messages c1 c2 c3 = 000, 001, . . . , 111
into equation (1.7) yields the following set of codewords for the code from
Example 1.3:
[0 0 0 0 0 0] [0 0 1 0 1 1] [0 1 0 1 1 1] [0 1 1 1 0 0]
[1 0 0 1 0 1] [1 0 1 1 1 0] [1 1 0 0 1 0] [1 1 1 0 0 1] (1.8)
This code is called systematic because the first k codeword bits contain the
message bits. For systematic codes the generator matrix contains the k × k
identity, Ik , matrix as its first k columns. (The identity matrix, Ik , is a k × k
square binary matrix with ‘1’ entries on the diagonal from the top left corner to
the bottom right corner and ‘0’ entries everywhere else.)
Example 1.7.
The code C in Example 1.3 can also be described by four parity-check equa-
tions:
c1 ⊕ c 2 ⊕ c 4 = 0
c2 ⊕ c 3 ⊕ c 5 = 0
(1.11)
c1 ⊕ c 2 ⊕ c 3 ⊕ c 6 = 0
c3 ⊕ c 4 ⊕ c 6 = 0
The extra constraint in Example 1.7 is the linear combination of the 1-st
and 3-rd parity-check equations in and so the new equation is said to be linearly
dependent on the existing parity-check equations. In general, a code can have
any number of parity-check constraints but only n − k of them will be linearly
independent, where k is the number of message bits in each codeword. In matrix
notation n − k is the rank of H
n − k = rank2 (H), (1.12)
where rank2 (H) is the number of rows in H which are linearly dependent over
GF(2).
The result is nonzero and so the string y is not a codeword of this code. We
therefore conclude that bit flipping errors must have occurred during transmis-
sion.
The vector
s = HyT ,
is called the syndrome of y. The syndrome indicates which parity-check con-
straints are not satisfied by y.
Example 1.9.
The result of Equation 1.13, in Example 1.8, (i.e. the syndrome) indicates that
the first parity-check equation in H is not satisfied by y. Since this parity-check
equation involves the 1-st, 2-nd and 4-th codeword bits we can conclude that at
least one of these three bits has been inverted by the channel.
To go further and correct the bit flipping errors requires that the decoder
determine which codeword was most likely to have been sent. Based only on
In general, for a code with minimum distance dmin , e bit flips can always
be corrected by choosing the closest codeword whenever
e ≤ ⌊(dmin − 1)/2⌋, (1.15)
where ⌊x⌋ is the largest integer that is at most x.
The smaller the code rate the smaller the subset of 2n binary vectors which
are codewords and so the better the minimum distance that can be achieved
by a code with length n. The importance of the code minimum distance in
determining its performance is reflected in the description of block codes by the
three parameters (n, k, dmin ).
Error correction by directly comparing the received string to every other
codeword in the code, and choosing the closest, is called maximum likelihood
decoding because it is guaranteed to return the most likely codeword. How-
ever, such an exhaustive search is feasible only when k is small. For codes
with thousands of message bits in a codeword it becomes far too computation-
ally expensive to directly compare the received string with every one of the 2k
codewords in the code. Numerous ingenious solutions have been proposed to
make this task less complex, including choosing algebraic codes and exploiting
their structure to speed up the decoding or, as for LDPC codes, devising decod-
ing methods which are not ML but which can perform very well with a much
reduced complexity.
Example 1.12.
A regular parity-check matrix for the code in Example 1.3 with wc = 2, wr = 3
and rank2 (H) = 3, which satisfies (1.4) is
1 1 0 1 0 0
0 1 1 0 1 0
H= 1 0 0 0 1 1 .
(1.16)
0 0 1 1 0 1
Example 1.13.
The parity-check matrix in Equation 1.3 is irregular with degree distribution
v1 = 1/2, v2 = 1/3, v3 = 1/6, h3 = 2/3 and h4 = 1/3.
Example 1.14.
A length 12 (3,4)-regular Gallager parity-check matrix is
1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1
1 0 1 0 0 1 0 0 0 1 0 0
H=
0 1 0 0 0 0 1 1 0 0 0 1 .
0 0 0 1 1 0 0 0 1 0 1 0
1 0 0 1 0 0 1 0 0 1 0 0
0 1 0 0 0 1 0 1 0 0 1 0
0 0 1 0 1 0 0 0 1 0 0 1
Example 1.15.
A length 12 (3,4)-regular MacKay Neal parity-check matrix is
1 0 0 0 0 1 0 1 0 1 0 0
1 0 0 1 1 0 0 0 0 0 1 0
0 1 0 0 1 0 1 0 1 0 0 0
0 0 1 0 0 1 0 0 0 0 1 1
H=
0 0 1 0 0 0 1 1 0 0 0 1 .
0 1 0 0 1 0 0 0 1 0 1 0
1 0 0 1 0 0 1 0 0 1 0 0
0 1 0 0 0 1 0 1 0 1 0 0
0 0 1 1 0 0 0 0 1 0 0 1
Example 1.16.
A length 12 rate-1/4 repeat-accumulate code is
1 0 0 1 0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0 0 0 0 0
0 1 0 0 1 1 0 0 0 0 0 0
0 0 1 0 0 1 1 0 0 0 0 0
H= 0 0 1 0 0 0 1 1 0 0 0 0 .
0 1 0 0 0 0 0 1 1 0 0 0
1 0 0 0 0 0 0 0 1 1 0 0
0 1 0 0 0 0 0 0 0 1 1 0
0 0 1 0 0 0 0 0 0 0 1 1
The first three columns of H correspond to the message bits. The first parity-bit
(the fourth column of H) can be encoded as c4 = c1 , the second as c5 = c4 ⊕ c1
and the next as c6 = c5 ⊕ c2 and so on. In this way each parity-bit can be
computed one at a time using only the message bits and the one previously
calculated parity-bit.
Example 1.17.
The Tanner graph of the parity-check matrix Example 1.12 is shown in Fig. 1.1.
The bit vertices are represented by circular nodes and the check vertices by
square nodes.
The Tanner graph is sometimes drawn vertically with the bit nodes on the
left and check nodes on the right with bit nodes sometimes referred to as left
nodes or variable nodes and the check nodes as right nodes or constraint nodes.
For a systematic code the message bit nodes can be distinguished from the parity
bit nodes by placing them on separate sides of the graph.
bit nodes
Figure 1.2: The Tanner graph representation of the parity-check matrix in Ex-
ample 1.16
Example 1.18.
The Tanner graph of the parity-check matrix in Example 1.16 is shown in
Fig. 1.2. The message bit nodes are shown at the top of the graph and the
parity bit nodes at the bottom.
Example 1.19.
A cycle of size 6 is shown in bold in Fig. 1.1.
Removing the 4-cycles does have the effect of disturbing the row degree dis-
tribution. For long codes H will be very sparse and so 4-cycles very uncommon
and the effect on the row degrees will be negligible. However, for short codes
4-cycle free parity-check matrices can be constructed much more effectively by
Example 1.20.
If a 4-cycle free code was required in Example 1.15 the fourth column would
have been discarded, and a new one chosen, because it causes a 4-cycle with
the first column in H.
1.3.2 Encoding
Earlier we noted that a generator matrix for a code with parity-check matrix H
can be found by performing Gauss-Jordan elimination on H to obtain it in the
form
H = [A, In−k ],
where A is a (n − k) × k binary matrix and In−k is the size n − k identity
matrix. The generator matrix is then
G = [Ik , AT ].
Example 1.21.
We wish to encode the length 10 rate-1/2 LDPC code
1 1 0 1 1 0 0 1 0 0
0 1 1 0 1 1 1 0 0 0
H= 0 0 0 1 0 0 0 1 1 1 .
1 1 0 0 0 1 1 0 1 0
0 0 1 0 0 1 0 1 0 1
First, we put H into row-echelon form (i.e. so that in any two successive rows
that do not consist entirely of zeros, the leading 1 in the lower row occurs further
to the right than the leading 1 in the higher row).
The matrix H is put into this form by applying elementary row operations
in GF (2), which are; interchanging two rows or adding one row to another
modulo 2. From linear algebra we know that by using only elementary row
operations the modified parity-check matrix will have the same codeword set
as the original, (as the new system of linear equations will have an unchanged
solution set).
The 1-st and 2-nd columns of H already have ones on the diagonal and
entries in these columns below the diagonal are removed by replacing the 4-th
row with the modulo-2 sum of the 1-st and 4-th rows. The 3-rd column of H
does not have a one on the diagonal but this can be obtained by swapping the
All of this processing can be done off-line and just the matrices G and H ′
provided to the encoder and decoder respectively. However, the drawback of
this approach is that, unlike H, the matrix G will most likely not be sparse and
so the matrix multiplication
c = uG,
at the encoder will have complexity in the order of n2 operations. As n is
large for LDPC codes, from thousands to hundreds of thousands of bits, the
encoder can become prohibitively complex. Later we will see that structured
parity-check matrices can be used to significantly lower this implementation
complexity, however for arbitrary parity-check matrices a good approach is to
avoid constructing G at all and instead to encode using back substitution with
H as is demonstrated in the following.
where the matrix T is a lower triangular matrix (that is T has ones on the
diagonal from left to right and all entries above the diagonal zero) of size
(m − g) × (m − g). If Ht is full rank the matrix B is size m − g × g and
A is size m − g × k. The g rows of H left in C, D, and E are called the
gap of the approximate representation and the smaller g the lower the encoding
complexity for the LDPC code.
Example 1.22.
We wish to encode the message u = [1 1 0 0 1] with the same length 10
to give
Im−g 0 A B T
H̃ = −1 Ht =
−ET Ig C̃ D̃ 0
where
C̃ = −ET −1 A + C,
and
D̃ = −ET −1 B + D.
Example 1.23.
Continuing from Example 1.22 we have
1 0 0
T −1 = 1 1 0 ,
0 0 1
and
1 0 0 0 0
0 1 0 0 0
Im−g 0
= 0 0 1 0 0 ,
−ET −1 Ig
1 1 1 1 0
1 0 1 0 1
Example 1.24.
Continuing from Example 1.23 we partition the length 10 codeword c = [c1 , c2 , . . . , c10 ]
as c = [u, p1 , p2 ] where p1 = [c6 , c7 ] and p2 = [c8 , c9 , c10 ]. The parity bits
in p1 are calculated from the message using Equation 1.21:
1
1
1 0 0 1 1 0 0
p1 = D̃−1 C̃u = 0 = 1 0
1 1 1 0 0 1 0 0
p21 = u1 ⊕ u2 ⊕ u4 ⊕ u5 = 1 ⊕ 1 ⊕ 0 ⊕ 1 = 1
p22 = u4 ⊕ p11 ⊕ p21 = 0 ⊕ 1 ⊕ 1 = 0
p23 = u2 ⊕ u3 ⊕ u5 ⊕ p12 = 1 ⊕ 0 ⊕ 1 ⊕ 0 = 0
The class of decoding algorithms used to decode LDPC codes are collectively
termed message-passing algorithms since their operation can be explained by
the passing of messages along the edges of a Tanner graph. Each Tanner graph
node works in isolation, only having access to the information contained in the
messages on the edges connected to it. The message-passing algorithms are also
known as iterative decoding algorithms as the messages pass back and forward
between the bit and check nodes iteratively until a result is achieved (or the
process halted). Different message-passing algorithms are named for the type
of messages passed or for the type of operation performed at the nodes.
In some algorithms, such as bit-flipping decoding, the messages are binary
and in others, such as belief propagation decoding, the messages are probabil-
ities which represent a level of belief about the value of the codeword bits. It
is often convenient to represent probability values as log likelihood ratios, and
when this is done belief propagation decoding is often called sum-product de-
coding since the use of log likelihood ratios allows the calculations at the bit
and check nodes to be computed using sum and product operations.
Example 2.1.
The code in example 1.3 includes the parity-check equation
c1 ⊕ c2 ⊕ c4 = 0.
If the value of bit c1 is known to be ‘0’ and the value of bit c2 is known to be ‘1’,
then the value of bit c4 must be ‘1’ if c1 , c2 and c4 are part of a valid codeword
for this code.
21
The messages passed along the Tanner graph edges are straightforward: a
bit node sends the same outgoing message M to each of its connected check
nodes. This message, labeled Mi for the i-th bit node, declares the value of the
bit ‘1’, ‘0’ if it is known or ‘x’ if it is erased. If a check node receives only
one ‘x’ message, it can calculate the value of the unknown bit by choosing the
value which satisfies parity. The check nodes send back different messages to
each of their connected bit nodes. This message, labeled Ej,i for the message
from the j-th check node to the i-th bit node, declares the value of the i-bit ‘1’,
‘0’ or ‘x’ as determined by the j-th check node. If the bit node of an erased bit
receives an incoming message which is ‘1’ or ‘0’ the bit node changes its value
to the value of the incoming message. This process is repeated until all of the
bit values are known, or until some maximum number of decoder iterations has
passed and the decoder gives up.
We use the notation Bj to represent the set of bits in the j-th parity-check
equation of the code. So for the code in Example 1.12 we have
A1 = {1, 3}, A2 = {1, 2}, A3 = {2, 4}, A5 = {1, 4}, A5 = {2, 3}, A6 = {3, 4}.
Example 2.2.
The LDPC code from Example 1.12 is used to encode the codeword
c = [0 0 1 0 1 1].
y = [0 0 1 x x x]
Initialization is Mi = ri so
M = [0 0 1 x x x].
For Step 1 the check node messages are calculated. The 1-st check node is
joined to the 1-st, 2-nd and 4-th bit nodes, and so has incoming messages ‘1’,
‘0’ and ‘x. Since the check node has one incoming ‘x’ message, from the 4-th
bit node, its outgoing message on this edge, E1,4 , will be the value of the 4-th
codeword bit:
E1,4 = M1 ⊕ M2
= 0⊕0
= 0.
The 2-nd check includes the 2-nd, 3-rd and 5-th bits, and so has incoming mes-
sages ‘0’, ‘1’ and ‘x. Since the check node has one incoming ‘x’ message, from
the 5-th bit node, its outgoing message on this edge, E2,5 , will be the value of
the 5-th codeword bit:
E2,5 = M2 ⊕ M3
= 0⊕1
= 1.
The 3-rd check includes the 1-st, 5-th and 6-th bits, and so has incoming mes-
sages ‘0’, ‘x’ and ‘x’. Since this check node receives two ‘x’ messages, it can-
not be used to determine the value of any of the bits. In this case the outgoing
messages from the check node are all ‘x’. Similarly, the 4-th check includes the
3-rd, 4-th and 6-th bits and so receives two ‘x’ messages and thus also cannot
used to determine the value of any of the bits.
In Step 2 each bit node that has an unknown value uses its incoming mes-
M = [0 0 1 0 1 x].
For the test, there is a remaining unknown bit (the 6-th bit) and so the algo-
rithm continues.
Repeating Step 1 the 3-rd check node is joined to the 1-st, 5-th and 6-th
bit nodes, and so this check node has one incoming ‘x’ message, M6 . The
outgoing message from this check to the 6-th bit node, E3,6 , is the value of the
6-th codeword bit.
E3,6 = M1 ⊕ M5
= 1⊕0
= 1.
The 4-th check node is joined to the 3-rd, 4-th and 6-th bit nodes, and so the this
check node has one incoming ‘x’ message, M6 . The outgoing message from
this check to the 6-th bit node, E4,6 , is the value of the 6-th codeword bit.
E3,6 = M3 ⊕ M4
= 0⊕1
= 1.
In Step 2 the 6-th bit is unknown and has incoming messages, E3,6 and E4,6
with value ‘1’ and so it changes its value to ‘1’. Since the received bits from
the channel are always correct the messages from the check nodes will always
agree. (In the bit-flipping algorithm we will see a strategy for when this is not
the case.)
This time at the test there are no unknown codeword bits and so the algorithm
halts and returns
M = [0 0 1 0 1 1]
as the decoded codeword. The received string has therefore been correctly de-
termined despite half of the codeword bits having been erased. Fig 2.1 shows
graphically the messages passed in the message-passing decoder.
Since the received bits in an erasure channel are either correct or unknown
(no errors are introduced by the channel) the messages passed between nodes
are always the correct bit values or ‘x’. When the channel introduces errors into
the received word, as in the binary symmetric or AWGN channels, the messages
in message-passing decoding are instead the best guesses of the codeword bit
values based on the current information available to each node.
0 0 1 x x x
0 0 1 0 1 x
check messages bit messages
0 0 1 0 1 1
Figure 2.1: Message-passing decoding of the received string y = [0 0 1 x x x]. Each sub-
figure indicates the decision made at each step of the decoding algorithm based on the messages
from the previous step. For the messages, a dotted arrow corresponds to the messages “bit = 0”
while a solid arrow corresponds to “bit = 1”, and a light dashed arrow corresponds to “bit x”.
E1,4 = M1 ⊕ M2
= 1⊕0
= 1.
The 2-nd check includes the 2-nd, 3-rd and 5-th bits, B2 = [2, 3, 5], and so the
message for the 2-nd check is
E2,2 = M3 ⊕ M5
= 1⊕1
= 0,
E2,3 = M2 ⊕ M5
= 0⊕1
= 1,
E2,5 = M2 ⊕ M3
= 0⊕1
= 1.
In Step 2 the 1-st bit has messages from the 1-st and 3-rd checks, A1 = [1, 3]
both zero. Thus the majority of the messages into the 1-st bit node indicate a
value different from the received value and so the 1-st bit node flips its value.
The 2-nd bit has messages from the 1-st and 2-nd checks, A2 = [1, 2] which
are one and so agree with the received value. Thus the 2-nd bit does not flip
its value. Similarly, none of the remaining bit nodes have enough check to bit
messages differing from their received value and so they all also retain their
current values. The new bit to check messages are thus
M = [0 0 1 0 1 1].
For the test the parity-checks are calculated. For the first check node
L1 = M1 ⊕ M2 ⊕ M4
= 0⊕0⊕0
= 0.
L3 = 0,
L4 = 0.
There are thus no unsatisfied checks and so the algorithm halts and returns
M = [0 0 1 0 1 1]
as the decoded codeword. The received string has therefore been correctly de-
coded without requiring an explicit search over all possible codewords. The
decoding steps are shown graphically in Fig. 2.2.
The existence of cycles in the Tanner graph of a code reduces the effective-
ness of the iterative decoding process. To illustrate the detrimental effect of a
4-cycle we use a new LDPC code with Tanner graph shown in Fig. 2.3. For this
Tanner graph there is a 4-cycle between the first two bit nodes and the first two
check nodes.
Example 2.4.
A valid codeword for the code with Tanner graph in Fig. 2.3 is
c = [0 0 1 0 0 1].
1 0 1 0 1 1 1 0 1 0 1 1
0 0 1 0 1 1 0 0 1 0 1 1
Figure 2.2: Bit-flipping decoding of the received string y = [1 0 1 0 1 1]. Each sub-figure
indicates the decision made at each step of the decoding algorithm based on the messages from
the previous step. A cross (×) represents that the parity check is not satisfied while a tick (X)
indicates that it is satisfied. For the messages, a dashed arrow corresponds to the messages “bit
= 0” while a solid arrow corresponds to “bit = 1”.
This codeword is sent through a binary input additive white Gaussian noise
channel with binary phase shift keying (BPSK) signaling and
is received. The detector makes a hard decision on each codeword bit and re-
turns
y = [1 0 1 0 0 1]
As in Example 2.4 the effect of the channel has been that the first bit is incorrect.
The steps of the bit-flipping algorithm for this received string are shown in
Fig. 2.3. The initial bit values are 1, 0, 1, 0, 0, and 1, respectively, and mes-
sages are sent to the check nodes indicating these values. Step 1 reveals that
the 1-st and 2-nd parity-check equations are not satisfied and so at the test the
algorithm continues. In Step 2 both the 1-st and 2-nd bits have the majority of
their messages indicating that the received value is incorrect and so both flip
their bit values. When Step 1 is repeated we see that the 1-st and 2-nd parity-
check equations are again not satisfied. In further iterations the first two bits
continue to flip their values together such that one of them is always incorrect
and the algorithm fails to converge. As a result of the 4-cycle, each of the first
two codeword bits are involved in the same two parity-check equations, and
so when both of the parity-check equations are unsatisfied, it is not possible to
determine which bit is in error.
1 0 1 0 0 1 1 0 1 0 0 1
0 1 1 0 0 1 0 1 1 0 0 1
1 0 1 0 0 1 1 0 1 0 0 1
Figure 2.3: Bit-flipping decoding of y = [1 0 1 0 0 1]. Each sub-figure indicates the decision
made at each step of the decoding algorithm based on the messages from the previous step. A
cross (×) represents that the parity check is not satisfied while a tick (X) indicates that it is
satisfied. For the messages, a dashed arrow corresponds to the messages “bit = 0” while a solid
arrow corresponds to “bit = 1”.
where Pj,iint is the current estimate, available to check j, of the probability that
′
′
bit i is a one. The probability that the parity-check equation is satisfied if bit i
ext . Expressed as a log-likelihood ratio,
is a zero is thus 1 − Pj,i
1−P ext
ext ) = log
Ej,i = LLR(Pj,i j,i
, (2.5)
ext
Pj,i
where !
int
1 − Pj,i′
int
Mj,i′ = LLR(Pj,i′) = log int
.
Pj,i′
Q (2.8)
Ej,i = 2 tanh−1 i′ ∈B j ,i′ 6=i tanh(Mj,i′ /2) .
Each bit has access to the input a priori LLR, ri , and the LLRs from every
connected check node. The total LLR of the i-th bit is the sum of these LLRs:
X
Li = LLR(Piint ) = ri + Ej,i . (2.9)
j∈Ai
Example 2.5.
Here we repeat Example 2.3 using sum-product instead of bit-flipping decoding.
The codeword
c = [0 0 1 0 1 1],
is sent through a BSC with crossover probability p = 0.2 and
y = [1 0 1 0 1 1]
is received. Since the channel is binary symmetric the probability that 0 was
sent if 1 is received is the probability, p, that a crossover occurred while the
probability that 1 was sent if 1 is received is the probability, 1 − p, that no
crossover occurred. Similarly, the probability that 1 was sent if 0 is received is
the probability that a crossover occurred while the probability that 0 was sent
if 0 is received is the probability that no crossover occurred. Thus the a priori
probabilities for the BSC are
( p
log 1−p , if yi = 1,
ri = 1−p
log p , if yi = 0.
To begin decoding we set the maximum number of iterations to three and pass
in H and r. Initialization is
Mj,i = ri .
The 1-st bit is included in the 1-st and 3-rd checks and so M1,1 and M3,1 are
initialized to r1 :
Similarly, the extrinsic probability from the 1-st check to the 2-nd bit depends
on the probabilities of the 1-st and 4-th bits
1+tanh(M1,1 /2) tanh(M1,4 /2)
E1,2 = log 1−tanh(M1,1 /2) tanh(M1,4 /2)
1+tanh(−1.3863/2) tanh(1.3863/2)
= log 1−tanh(−1.3863/2) tanh(1.3863/2)
= log 1+−0.6∗0.6
1−−0.6∗0.6 = −0.7538,
and the extrinsic probability from the 1-st check to the 4-th bit depends on the
LLRs sent from the 1-st and 2-nd bits to the 1-st check.
1+tanh(M /2) tanh(M1,2 /2)
E1,4 = log 1−tanh(M1,1 1,1 /2) tanh(M1,2 /2)
1+tanh(−1.3863/2) tanh(1.3863/2)
= log 1−tanh(−1.3863/2) tanh(1.3863/2)
= log 1+−0.6∗0.6
1−−0.6∗0.6 = −0.7538.
Next, the 2-nd check includes the 2-nd, 3-rd and 5-th bits and so the extrinsic
LLRs are:
1+tanh(M /2) tanh(M2,5 /2)
E2,2 = log 1−tanh(M2,3 2,3 /2) tanh(M2,5 /2)
1+tanh(−1.3863/2) tanh(−1.3863/2)
= log 1−tanh(−1.3863/2) tanh(−1.3863/2)
1+−0.6∗−0.6
= log 1−−0.6∗−0.6 = 0.7538,
1+tanh(M2,2 /2) tanh(M2,5 /2)
E2,3 = log 1−tanh(M2,2 /2) tanh(M2,5 /2)
1+tanh(+1.3863/2) tanh(−1.3863/2)
= log 1−tanh(+1.3863/2) tanh(−1.3863/2)
1+0.6∗−0.6
= log 1−0.6∗−0.6 = −0.7538,
1+tanh(M /2) tanh(M2,3 /2)
E2,5 = log 1−tanh(M2,2 2,2 /2) tanh(M2,3 /2)
1+tanh(+1.3863/2) tanh(−1.3863/2)
= log 1−tanh(+1.3863/2) tanh(−1.3863/2)
1+0.6∗−0.6
= log 1−0.6∗−0.6 = −0.7538.
To save space the extrinsic LLRs are given in matrix form where the (j, i)-th
entry of E holds Ej,i . A ‘.’ entry in E indicates that an LLR does not exist for
that i and j.
Thus even though the LLR from the channel is negative, indicating that the bit
is a one, both of the extrinsic LLRs are positive indicating that the bit is zero.
The extrinsic LLRs are strong enough that the total LLR is positive and so the
decision on bit one has effectively been changed. Repeating for bits two to six
gives:
L2 = r2 + E1,2 + E2,2 = 1.3863
L3 = r3 + E2,3 + E4,3 = −2.8938
L4 = r4 + E1,4 + E4,4 = 1.3863
L5 = r5 + E2,5 + E3,5 = −1.3863
L6 = r6 + E3,6 + E4,6 = −1.3863
The hard decision on the received bits is given by the sign of the LLRs,
z= 0 0 1 0 1 1 .
Since s is zero z is a valid codeword, and the decoding stops, returning z as the
decoded word.
Example 2.6.
Using the LDPC code from Example 1.12, the codeword
c = [0 0 1 0 1 1]
is sent though a BPSK AWGN channel with ES /N0 = 1.25 (or 0.9691dB) and
the received signal is
(If a hard decision is made without decoding, there are two bits in error in this
received vector, the 1-st and 6-th bits.) For an AWGN channel the a priori LLRs
are given by
ES
ri = 4yi
N0
Iteration 1
r = −0.5 2.5 −4.0 5.0 −3.5 2.5
2.4217 −0.4930 . −0.4217 . .
· 3.0265 −2.1892 . −2.3001 ·
E =
−2.1892
. . . −0.4217 0.4696
· . 2.4217 −2.3001 . −3.6869
L = −0.2676 5.0334 −3.7676 2.2783 −6.2217 −0.7173
z = [ 1 0 1 0 1 1 ]
HzT = [ 1 0 1 0 ]T ⇒ Continue
−2.6892 5.5265 · 2.6999 · ·
· 2.0070 −1.5783 . −3.9217 ·
M =
1.9217
. · · −5.8001 −1.1869
· . −6.1892 4.5783 . 2.9696
Iteration 2
2.6426 −2.0060 . −2.6326 . .
· 1.4907 −1.8721 . −1.1041 .
E =
1.1779 · · . −0.8388 −1.9016
· . 2.7877 −2.9305 · −4.3963
L = 3.3206 1.9848 −3.0845 −0.5630 −5.4429 −3.7979
z = [ 0 0 1 1 1 1 ]
HzT = [ 1 0 0 1 ]T ⇒ Continue
0.6779 3.9907 · 2.0695 . ·
· 0.4940 −1.2123 . −4.3388 ·
M =
2.1426 · · · −4.6041 −1.8963
· · −5.8721 2.3674 · 0.5984
z = [ 0 0 1 0 1 1 ]
HzT = [ 0 0 0 0 ]T ⇒ Terminate
The sum-product decoder converges to the correct codeword after three itera-
tions.
where
αj,i′ = sign(Mj,i′ ),
(2.11)
βj,i′ = |Mj,i′ |.
Using this notation we have that
Y Y Y
tanh(Mj,i′ /2) = αj,i′ tanh(βj,i′ /2).
i′ i′ i′
Next, we define
x ex + 1
φ(x) = − log tanh( ) = log x
2 e −1
The product of the signs can be calculated by using modulo 2 addition of the
hard decisions on each Mj,i′ while the function φ can be easily implemented
using a lookup table.
Alternatively, the min-sum algorithm, simplifies the calculation of (2.7) by
recognizing that the term corresponding to the smallest Mj,i′ dominates the
product term and so the product can be approximated by a minimum:
!
Y
Ej,i ≈ sign(Mj,i′ ) |{z}
Min Mj,i′ .
i′ i′
Again, the product of the signs can be calculated by using modulo 2 addition of
the hard decisions on each Mj,i′ and so the resulting min-sum algorithm thus
requires calculation of only minimums and additions.
41
calculate the probability, ql , that a check to bit message is ‘x’ at iteration l we
make the assumption that all of the incoming messages are independent of one
another. That is, we are assuming firstly that the channel is memoryless, so that
none of the original bit probabilities were correlated, and secondly that there
are no cycles in the Tanner graphs of length 2l or less, as a cycle will cause the
messages to become correlated. With this assumption, the probability that none
of the other wr − 1 incoming message to the check node is ‘x’ is simply the
product of the probabilities, (1 − pl ), that each individual message is not ‘x’. So
the probability that one or more of the other incoming messages are ‘x’ is one
minus this:
ql = 1 − (1 − pl )(wr −1) (3.1)
At iteration l the bit to check message will be ‘x’ if the original message
from the channel was an erasure, which occurs with probability ε, and all of the
incoming messages at iteration l − 1 are erasures, which each have probability
ql . Again we make the assumption that all of the incoming messages are inde-
pendent of one another, and so the probability that the bit to check message is an
‘x’ is the product of the probabilities that the other wc − 1 incoming messages
to the bit node, and the original message from the channel, were erased.
Prior to decoding the value of p0 is the probability that the channel erased a
codeword bit:
p0 = ε.
Thus for a (wc , wr )-regular ensemble
(wc −1)
p0 = ε, pl = ε 1 − (1 − pl−1 )(wr −1) (3.4)
Example 3.1.
A code from the (3,6)-regular ensemble is to be transmitted on a binary erasure
channel with erasure probability ε = 0.3 and decoded with the message-passing
algorithm. The probability that a codeword bit will remain erased after l iter-
ations of message-passing decoding (if the code Tanner graph is cycle free) is
given by the recursion:
2
p0 = 0.3, pl = p0 1 − (1 − pl−1 )5 .
Applying this recursion for 7 iterations gives the sequence of bit erasure proba-
bilities,
0.45
0.4
0.35
Erasure probability
0.3
0.25
p = 0.5
0
0.2
p0 = 0.43
0.15 p = 0.42
0
p0 = 0.3
0.1
0.05
0
0 5 10 15 20 25 30 35 40
Iteration number
Example 3.2.
Extending Example 3.1 we would like to know which erasure probabilities the
codes from a (3,6)-regular ensemble are likely to be able to correct. Apply-
ing the recursion (3.3) to a range of channel erasure probabilities we see, in
Fig. 3.1, that for values of ε ≥ 0.43 the probability of remaining erasures does
not decrease to zero even as l gets very large, whereas, for values of ε ≤ 0.42
the probability of error does approach zero as l → ∞. The transition value of
ε, between these two outcomes is the called the threshold of the (3,6)-regular
ensemble, a term we make more precise in the following. Again applying the
recursion (3.3), Fig. 3.2 demonstrates that the threshold for a (3,6)-regular en-
semble on the binary erasure channel is between 0.4293 and 0.4294.
0.4
0.35
Erasure probability
0.3
0.25
0.2
0.15
0.1
0.05
0
0 50 100 150 200 250 300
Iteration number
and X
ρi = 1. (3.6)
i
The functions
ρi /i
hi = P .
j ρj /j
ql = 1 − ρ (1 − pl ) .
From (3.2) we know that the probability that a bit to check message is ‘x’,
at the l-th iteration of message-passing decoding if all incoming messages are
independent, is
pl = ε (ql−1 )(wc −1)
for an edge is connected to a degree wc bit node. For an irregular Tanner graph
the probability that an edge is connected to a degree wc bit node is λwc . Thus
averaging over all the edges in the Tanner graph gives the average probability
that a bit to check message is in error:
X
pl = ε λi (ql−1 )(i−1) .
i
pl = ελ (ql−1 ) .
pl = ελ (1 − ρ (1 − pl−1 )) .
Prior to decoding the value of p0 is the probability that the channel erased a
codeword bit:
p0 = ε,
and so for irregular LDPC codes we have the recursion:
p0 = ε, pl = p0 λ (1 − ρ (1 − pl−1 )) . (3.9)
3.1.3 Threshold
The aim of density evolution is to determine for which channel erasure prob-
abilities, ε, the message-passing decoder is likely to correct all of the erased
bits. Using (3.9) we have a means of approximating this as an average over all
LDPC Tanner graphs with a given degree distribution λ, ρ, by assuming that the
graphs are cycle free.
To examine the influence of ε on pl we define the function
f (p, ε) = ελ (1 − ρ (1 − p)) .
pl (ε) = f (pl−1 , ε)
0.5
Erasure probability
0.4
0.3 p0 = 0.6
p = 0.5
0
0.2 p0 = 0.4
p = 0.3
0
0.1
0
0 5 10 15 20 25
Iteration number
where p and ε are probabilities, and so can take values between 0 and 1. Here,
f (p, ε) is a strictly increasing function in p for ε > 0. Thus if pl > pl−1 then
f (1, ε) = ελ (1 − ρ (1 − 1)) = ελ (1 − 0) = ε.
0 ≤ f (p, ε) ≤ ε,
for all p ∈ [0, 1] and ε ∈ [0, 1]. Thus pl converges to an element p∞ ∈ [0, ε].
Further, for a degree distribution pair (λ, ρ), and an ε ∈ [0, 1], it can be proven
that if pl (ε) → 0 then pl (ε′ ) → 0 for all ε < ε′ . Indeed, there is a value ε∗
called the threshold such that for values of ε below ε∗ , pl approaches zero as
the number of iterations goes to infinity while for values of of ε above ε∗ it does
not. The threshold, ε∗ , for (λ, ρ) is defined as the supremum of ε for which
pl (ε) → 0:
ε∗ (λ, ρ) = sup{ε ∈ [0, 1] : pl (ε)l→∞ → 0}.
Example 3.3.
We wish to find the threshold of an irregular LDPC ensemble with degree dis-
tributions
λ(x) = 0.1x + 0.4x2 + 0.5x19
0.4
p = 0.475
0
p0 = 0.45
0.2
p0 = 0.425
p = 0.4
0
0.1
0
0 5 10 15 20 25 30 35 40 45 50
Iteration number
and
ρ(x) = 0.5x7 + 0.5x8 .
This code has rate P
λi /i
1 − Pi ≈ 0.5.
i ρi /i
To find the threshold we apply the recursion from (3.9) over a wide range of
different channel erasure probabilities. We see in Fig. 3.3, that for values of ε
0.5 and above the probability of remaining erasures does not decrease to zero
even as l gets very large, whereas, for values of ε of 0.4 and below the probabil-
ity of error does go to zero. To close in on the threshold further we thus apply
the recursions to channel erasure probabilities between these values. Fig. 3.4,
shows that for values of ε ≥ 0.475 the probability of remaining erasures does
not decrease to zero even as l gets very large, whereas, for values of ε ≤ 0.45
the probability of error does go to zero. To close in on the threshold even fur-
ther we now apply the recursions to channel erasure probabilities between these
values. Fig. 3.5, shows that for values of ε ≥ 0.475 the probability of remain-
ing erasures does not decrease to zero even as l gets very large, whereas, for
values of ε ≤ 0.465 the probability of error does go to zero. For ε = 0.47 we
would need to consider a larger number of decoder iterations to determine if the
decoder would converge to zero. We can conclude, however, that the threshold
for this ensemble is an erasure probability between 0.465 and 0.475.
3.1.4 Stability
The recursion in (3.9) quickly results in very high order polynomials as the
iteration number is increased. However, to understand its behavior when pl is
0.45
p = 0.475
0
0.4 p = 0.47
0
p0 = 0.465
0.35
p = 0.46
0
Erasure probability
0.3 p = 0.455
0
0.25
0.2
0.15
0.1
0.05
0
0 10 20 30 40 50 60 70 80 90 100
Iteration number
small we can approximate it by a Taylor series expansion of the right hand side
around 0. i.e.
pl = f (pl−1 , ε) ≈ f ′ (p, ε)pl−1 . (3.10)
A function f (x) = g(h(x)) has a derivative with respect to x given by
df dg dh
= .
dx dh dx
Thus for
h(p = 0) = 1 − ρ(1) = 0
and so
dλ dλ
= = λ2 + 2λ3 h + · · · + (i − 1)λi h(i−2) + · · · = λ2 ,
dh p=0 dh h=0 h=0
and
dh d(1 − ρ(1 − p))
= = ρ′ (1).
dp p=0 dp (1−p)=1
Example 3.4.
Fig. 3.6 shows a gaussian pdf for p(r). The probability that the bit is a ‘1’ is
given by the shaded area under the curve.
Since the incoming messages are independent, the pdf of the random variable
formed from this summation can be obtained by the convolution [13, eqn 6.39]
0.035
Density 0.02
0.015
0.01
0.005
0
−50 −40 −30 −20 −10 0 10 20 30 40 50
LLR
Figure 3.6: The probability density function for additive white Gaussian noise.
See Example 3.4.
of the pdfs of the wc − 1 incoming messages from the check nodes and the pdf
of the incoming message from the channel:
where
ex − 1
tanh(x/2) = log
.
ex + 1
Thus to sum over two messages x and y requires the calculation of the proba-
bility density function of
1+tanh(x/2) tanh(y/2) x
(e +1)(e +1)+(e −1)(e −1) y x y
f (x, y) = log 1−tanh(x/2) tanh(y/2) = log (ex +1)(ey +1)−(ex −1)(ey −1)
e +e x y
= − log 1+e x+y .
(3.14)
A method to find the pdf of a function of two random variables is given in
[13, eqn 6.36]. Briefly, given two random variables x and y and the function
0.035
0.03 iteration 0
0.025
iteration 50
Density 0.02
iteration 100
0.015
iteration 107
0.01
0.005
0
−10 0 10 20 30 40 50
LLR
Figure 3.7: The evolution of probability density functions with iteration num-
ber in density evolution. See Example 3.5.
where Dz is the region of the xy plane such that z < g(x, y) < z + dz.
To apply density evolution on general channels it is assumed that the origi-
nal codeword was all zeros. Consequently the probability that the bit is in error
is the probability that the LLR is negative.
Example 3.5.
Fig. 3.7 shows the evolution of q(El ) for a (3,6)-regular ensemble on an AWGN
channel with signal-to-noise ratio (Eb /N0 ) of 1.12. On an AWGN channel the
pdf of the original received signal will be Gaussian with variance σ, reflecting
the pdf of the noise. As the iteration number is increased the area under the
curve for negative LLRs decreases and so the probability of error is decreasing.
Although the pdfs start as gaussian, the result of the convolution of gaussian
pdfs is not gaussian except in the limit. However an approximation for den-
sity evolution on the AWGN channel assumes that the pdfs do in fact remain
gaussian. Since a Gaussian pdf is completely described by its mean and vari-
ance this approximation greatly simplifies the application of density evolution
as only the mean and variance are tracked through the message-passing decod-
ing and not the entire pdf.
It can be shown (we don’t do it here see reference [14]) that the sum-product
decoding algorithm preserves the order implied by degradation of the channel.
i.e. as the channel improves the performance of the sum-product decoder will
−1
10
−2
10
−4
10
−5
10
E /N = 1.12 dB
b 0
E /N = 1.04 dB
−6 b 0
10
−7
10
0 100 200 300 400 500 600 700 800 900 1000
Iterations
also improve. For example, on a AWGN channel with variance σ for all σ ′ <
σ the expected bit error probability of sum-product decoding, PSP , satisfies
PSP (σ ′ ) < PSP (σ).
The threshold of a given degree distribution for sum-product decoding is
again the supremum of the channel noise values for which the probability of
decoding error goes to zero as the iteration number is allowed to go to infinity.
For an AWGN channel with variance σ the threshold is denoted σ ∗ :
Example 3.6.
We would like to know at which AWGN signal-to-noise ratios the codes from
a (3,6)-regular ensemble are likely to be able to correct the noise. Applying
density evolution for different channel erasure probabilities we see, in Fig. 3.8,
that the threshold is an Eb /N0 between 1.04 and 1.12.
In this topic low-density parity-check (LDPC) codes are discussed in detail with
a focus on code design, encoding, and performance. Firstly the properties of
LDPC codes are considered and the difference between classical decoders and
message-passing decoders is made apparent when considering how and why
message-passing decoding algorithms fail.
Secondly, LDPC codes with linear-time encoders, in particular quasi-cyclic
codes and repeat-accumulate codes, are considered. Finally, a number of spe-
cific methods for code design are presented. Pseudo-random constructions
are considered with many of the more recent strategies for cycle and pseudo-
codeword removal presented and structured LDPC codes are considered with a
focus on codes from combinatorial designs.
55
medium-length LDPC codes irregular constructions are generally not better
than regular ones and graph-based or algebraic constructions can outperform
random ones. In addition, using structured parity-check matrices can lead to
much simpler implementations, particularly for encoding, and can guarantee
girth and minimum distance properties difficult to achieve randomly for shorter
codes. In particular, for very low error floors a reasonably short algebraic con-
struction with large column weight will produce the required performances,
with the trade off of a larger gap to capacity.
Example 4.1.
The parity-check matrices
1 1 0 1 0 0
0 1 1 0 1 0
H1 =
1
0 0 0 1 1
1 0 1 1 1 0
and
1 1 0 1 0 0
0 1 1 0 1 0
H2 =
1
0 0 0 1 1
0 0 1 1 0 1
both describe the same code, but have Tanner graphs with different girth. Fig-
ure 4.1 shows the performance of sum-product decoding using each of these
parity-check matrices on the same channel. Removing a single 4-cycle from
the parity-check matrix has noticeably improved the performance of the sum-
product decoder even though exactly the same code is being decoded. In Topic 5
we will outline some of the methods used to construct Tanner graphs without
short cycles.
A related concept to the graph girth is the graph expansion. In a good ex-
pander every subset of vertices has a large number of neighbors that are not
1
A small subset of LDPC codes which include 4-cycles have been shown to perform well with
sum-product decoding, however this effect is due to the large number of extra linearly dependent
rows in these parity-check matrices which helps to overcome the negative impact of the cycles.
−3
10
1 1.5 2 2.5 3 3.5 4 4.5 5
Signal−to−noise ratio E /N (dB)
b 0
Figure 4.1: The bit error rate performance of sum-product decoding on an AWGN channel
using the parity-check matrices from Example 4.1.
in the subset. More precisely, any subset S of bit vertices of size m or less is
connected to at least ǫ|S| constraint vertices, for some defined m and ǫ.
If a Tanner graph is a good expander then the bit nodes of a small set of
erroneous codeword bits will be connected to a large number of check nodes,
all of which will be receiving correct information from an even larger number of
the correct codeword bits. Sipser and Spielman [19] showed that the expansion
of the graph is a significant factor in the application of iterative decoding. Using
only a simple hard decision decoding algorithm they proved that a fixed fraction
of errors can be corrected in linear time provided that the Tanner graph is a good
enough expander.
at least two bits in S. The size of a stopping set is the number of bits it includes,
and the minimum stopping set size of a parity-check matrix is denoted Smin .
Example 4.2.
Fig. 4.2 shows the Tanner graph of a length 5 parity-check matrix with 3 parity-
check equations and filled bit nodes representing a stopping set of size three.
Example 4.3.
c = [0 0 1 0 1 1].
c is sent though an erasure channel but this time the 3-rd, 5-th and 6-th bits are
erased and so the vector
y = [0 0 x 0 x x]
is received. Message-passing decoding is used to recover the erased bits.
Initialization is Mi = yi which gives
M = [0 0 x 0 x x].
Knowing exactly the places where the decoding algorithm will fail allows us
to predict its performance. Indeed, if the stopping set distribution of an LDPC
parity-check matrix were known, the performance of the message-passing de-
coder on the BEC could be determined exactly by counting the stopping sets.
The probability of bit erasure for a given parity-check matrix, H, of length n
on a binary erasure channel with erasure probability ǫ is
n
X N (v)
P (H, ǫ) = (nv )ǫv (1 n−v
− ǫ) , (4.1)
T (v)
v=0
where T (v) is the total of number bit sets of size v and N (v) is the number of
those bit sets which are stopping sets.
Finding the stopping set distribution of an individual parity-check matrix is
as prohibitively complex as finding its codeword distance distribution, however,
the average stopping set distribution of a regular LDPC ensemble can be found
combinatorially. This technique, called finite-length analysis, gives the exact
average bit and block error probabilities for any regular ensemble of LDPC
codes over the binary erasure channel (BEC) when decoded iteratively. From
the ensemble perspective T (v) is the total of number of ways a bit set of size
v can be constructed over all possible codes in the ensemble and N (v) is the
number of those ways which result in the v points being a stopping set. Thus
N (v)/T (v) can be considered the probability that a given set of v points is a
stopping set.
Every codeword is a stopping set. This is easy to see since any check on a
non-zero bit in the codeword must include an even number of non-zero code-
word bits to ensure even parity. Thus the set of stopping sets includes the set of
codewords. However, not all of the stopping sets correspond to codewords. The
stopping set in Fig. 4.2 for example is not a codeword.
Not all parity-check matrices for the same code will have the same stop-
ping set distribution or same minimum stopping set size. Fig. 4.3 for exam-
ple shows the Tanner graphs of two parity-check matrices for the same code,
one with three size-3 stopping sets and one with two size-3 stopping sets. The
two common stopping sets include bits {1, 2, 4} and {1, 3, 5}. Every possible
parity-check matrix for this code will also contain stopping sets in these bit
locations.
The role of stopping sets in predicting the performance of message-passing
decoding on the BEC tells us that for message-passing decoding, unlike for ML
decoding, properties other than the codeword set influence the decoder perfor-
mance. The same is true of message-passing decoding on more general chan-
nels, however defining the configurations which lead to decoder failure in the
general case, called pseudo-codewords is less straightforward.
Stepping back briefly we note that the low complexity of iterative message-
passing decoding is because the algorithm operates locally on the Tanner graph
representing the matrix H (i.e. each node in the decoding algorithm acts only
on the messages it can see, not on the other messages in the graph). This same
operation also leads to a fundamental weakness of the algorithm: because it acts
locally, each node does not know the whole structure of the Tanner graph.
An alternative graph which would produce, locally, the same LLRs as the
actual Tanner graph is called a finite lift or cover of the Tanner graph. Pseudo-
codewords can be thought of as the set of valid codewords in all finite lifts of
the Tanner graph. Since the message-passing decoder cannot locally distinguish
between the actual Tanner graph and the lifted graphs, any codeword in any of
the lifted graphs is as equally valid as a codeword in the Tanner graph. Thus
when we say that the decoder has failed to converge it has actually converged
to one of these pseudo-codewords.
The word error rate on the BEC with erasure probability ǫ is lower bounded by
summing over the contribution of stopping sets of size s = 2, . . . , ψ2 n in the
ψ2 n degree-2 bit nodes:
ψ2 n
X ψ2 n
EWER (Cλ(x),ρ(x) , n, ǫ) ≥ ǫs PSS (Cλ(x),ρ(x) , s)
s
s=2
ψ2 n
X
s (λ2 ρ′ (1))s −1/3
= ǫ + O(n ) , (4.3)
2s
s=2
ψ2 n
X (λ2 ρ′ (1)ǫ)s
lim EWER (Cλ(x),ρ(x) , n, ǫ) ≥ lim
n→∞ ψ2 n→∞ 2s
s=2
!
1 (λ2 ρ′ (1)ǫ)
= ln p − . (4.4)
1 + λ2 ρ′ (1)ǫ 2
For randomly constructed LDPC codes from the ensemble with degree dis-
tribution pair (λ(x),ρ(x)) and girth g, the expected error floor performance of
the ensemble will be dominated by stopping sets of size g/2 and the word error
rate is approximated by
g
(λ2 ρ′ (1)ǫ) 2
Wg , . (4.5)
g
To bound the ensemble degree distribution to obtain a word error rate below Wg
the degree distribution is constrained to satisfy:
E
λ2 ≤ , where E , (gWg )2/g , (4.6)
ρ′ (1)ǫ∗
and ǫ∗ is the threshold value returned by density evolution. Thus ǫ < ǫ∗ corre-
sponds to the error floor region of the WER curve, making ǫ∗ an ideal erasure
probability at which to evaluate (4.5). Note that setting E = 1 returns the sta-
bility constraint for the BEC and the traditional optimized degree distribution is
returned.
−1 E=1
10
E = 0.44
−2 E = 0.02
10
(3,6)−regular
−3
10
Erasure Rate
−4
10
−5
10
−6
10
−7
10
−8
10
−9
10
0.55 0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1
BEC erasure probability (ε)
Example 4.4.
Fig. 4.4 shows the simulated ensemble average performance, using message-
passing decoding, of codes with varying degree distributions. The irregular en-
semble gives the best threshold performance, but a very poor error floor, while
the regular LDPC ensemble has a better error floor and worse threshold. The
constrained degree distributions allow a tradeoff between the threshold and er-
ror floor performance to be made.
H = [A1 , A2 , . . . , Al ], (4.7)
Example 4.5.
A rate- 12 quasi-cyclic code with v = 5, is made up of a first circulant described
by a1 (x) = 1 + x, and a second circulant described by a2 (x) = 1 + x2 + x4 .
1 1 1 1 1
1 1 1 1 1
H= 1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
Figure 4.5: A Tanner graph for the quasi-cyclic LDPC code in Example 4.5
and so the generator matrix contains a 5 × 5 identity matrix and the 5 × 5 matrix
described by the polynomial
T 2 T 3
(a−1
2 (x) ∗ a1 (x)) = (1 + x ) = 1 + x .
1 1 1
1 1
1
G=
1 1 1
1 1 1
1 1 1
Fig. 4.5 shows the Tanner graph for H.
Example 4.6.
A quasi-cyclic, length-108, rate-3/4 LDPC code has the parity-check matrix:
H = [A1 , A2 , A3 , A4 ].
a1 (x) = 1 + x3 + x16 ,
a2 (x) = x2 + x6 + x8 ,
a3 (x) = x + x8 + x9 ,
a4 (x) = x + x13 + x23 .
The polynomial a4 (x) is invertible with inverse given by
4 5 6 7 9 12 13 15 17 20 21 23 24 25
a−1
4 (x) = x+x +x +x +x +x +x +x +x +x +x +x +x +x +x ,
Hs = [A−1 −1 −1
4 A1 , A4 A2 , A4 A3 , I27 ].
We thus have,
a−1 4 5 7 9 11 13
4 (x)a1 (x) = 1 + x + x + x + x + x + x + x + x + x + x
15 18 19
(A−1
4 A3 )
T
Using G in this form the code can be encoded using shift registers. Figure 4.6
shows an encoding circuit for this code.
Note that although we use Hs to construct G we will use the original ma-
trix, H to do our decoding. Both H and Hs are valid parity-check matrices for
the code, however H has the properties required for sum-product decoding.
More general quasi-cyclic codes are the block circulant codes. The parity-
check matrix of a block circulant quasi-cyclic LDPC code is:
Ip Ip Ip ... Ip
Ip Ip (p1,1 ) Ip (p1,2 ) ... Ip (p1,wr )
.. .. .. ,
. . .
Ip Ip (pwc −1,1 ) Ip (pwc −1,2 ) . . . Ip (pwc −1,wr −1 )
where Ip represents the p×p identity matrix and Ip (pi,j ) represents the circulant
shift of the identity matrix by r+pi,j ( mod p) columns to the right which gives
the matrix with the r-th row having a one in the (r + pi,j mod p)-th column.
Block circulant LDPC codes can have better minimum distances and girths than
row-circulant codes.
H = [H1 , H2 ], (4.10)
: : :
+
+
+
: : :
C82... C108
+
Figure 4.6: Encoding circuit for the n = 108, k = 81 LDPC code from Exam-
ple 4.6.
Example 4.7.
A (3,2)-regular RA parity-check matrix for a length-10 rate-2/5 code is:
1 . 1 . 1 . . . . .
. 1 . 1 1 1 . . . .
1 1 . . . 1 1 . . .
H= (4.12)
. . 1 1 . . 1 1 . .
1 . 1 . . . . 1 1 .
. 1 . 1 . . . . 1 1
Encoding RA codes
The encoding of an RA code is split into four main operations. Firstly, since
H is systematic we know that the columns of H1 correspond to the message
bits. From the column regularity of H1 we see that each message bit is repeated
q times, which can be implemented with a rate 1/q repetition code. Next, the
row regularity of H1 shows that for every parity-bit a of these repeated message
bits are summed modulo 2, a process that we implement using a combiner. The
final step is to define the mapping of the repeated message bits to the combiner
inputs. This is done by defining a permutation pattern Π called an interleaver.
parity bits
Figure 4.7: The Tanner graph for the RA parity-check matrix in Example (4.7).
Example 4.8.
The code in Example 4.7 is a length-10 RA code with q = 3 repetition code,
a = 2 combiner and the interleaver Π = [1, 7, 4, 10, 2, 5, 8, 11, 3, 9, 6, 12].
The encoding process is as follows: The qK bits at the output of the rep-
etition code are q copies of the K message bits m = [m1 , . . . , mK ], in the
form
b = [b1 , b2 , . . . , bqK ]
= [m1 , m1 , . . . , m1 , m2 , m2 , . . . , m2 , . . . , mK , mK , . . . , mK ],
| {z } | {z } | {z }
q q q
and so we have
bi = mf (i) , f (i) = ⌈i/q⌉, (4.13)
where ⌈x⌉ denotes the smallest integer greater than or equal to x.
The interleaver pattern, Π = [π1 , π1 , . . . , πn ], defines a permutation of the
input bits, b = [b1 , b2 , . . . , bn ], to the output bits
Thus two different interleaver patterns will describe the same RA code if the
difference in the permutation pattern results in a difference in which copy of the
same message bit is used.
The bits at the output of the interleaver are combined, modulo-2, in sets
of a bits, before being passed to the accumulator. Thus the M = Kq/a bits,
r = [r1 , r2 , . . . , rM ], at the output of the combiner, are given by
pi = pi−1 ⊕ ri , i = 1, 2, . . . , M. (4.16)
Interleaver
m repetition b d combiner r accumulator p
K
code
Kq Kq M M
We consider systematic RA codes, that is codes for which both the original
message bits and the parity bits are explicitly sent to the receiver, and so the
final codeword is c = [m1 , m2 , . . . , mK , p1 , p2 , . . . , pM ], and thus we have a
a
code with length, N = K(1 + q/a), and rate R = a+q .
The rows of H1 describe the equations in (4.13)-(4.15), e.g. if we have
ri = mc1 + mc2 then the i-th row of H1 is ‘1’ in the columns c1 and c2 and ‘0’
elsewhere. In equation (4.10), H2 is an M × M matrix which describes (4.16):
Fig. 4.8 shows the encoding circuit for RA codes.
Those familiar with turbo codes will note that the encoder of an RA code
looks a lot like that of a serially concatenated turbo code. Indeed RA codes
were first presented as a simple class of turbo codes for which coding theories
could be developed. The two component codes are the repetition code and
1
1+D
convolutional code which is the accumulator. Fig. 4.9 shows the relationship
between the LDPC and turbo code representations of an RA code.
In the previous topic a number of the properties that make a good LDPC code
have been discussed. In this section some of the methods used to construct
LDPC codes which achieve these properties are outlined.
Example 5.1.
Figure 5.1 shows column splitting applied to remove a 4-cycle.
71
Figure 5.2: Row splitting to remove a 4-cycle.
1
2 2 3
3 1
1
2
1
2 3
Example 5.2.
Figure 5.2 shows row splitting applied to remove a 4-cycle.
In bit filling bit nodes are added to the Tanner graph one at a time and edges
connecting the new bit nodes to the graph are chosen to avoid cycles of size
g. For each new bit node bi , wc check nodes are selected to join by an edge to
bi . The set of feasible check nodes are the nodes that are distance g/2 or more
edges away from all of the check nodes already connected to b + i. From each
set of feasible check nodes the check node chosen is the one which least used
so far (i.e. with the lowest degree). Fig 5.3 shows this process.
In progressive edge growth Tanner graphs edges are similarly added to the
graph one at a time but instead of meeting some fixed girth requirement g the
edge is added so as to maximize the local girth at the current bit node.
These techniques can also be applied to semi-structured codes, i.e. an RA
code can be constructed by fixing the accumulator portion of the Tanner graph
and applying bit filling to the remaining bit nodes.
Example 5.3.
A simple combinatorial problem is to arrange a set of seven academics into
seven committees with three academics in each committee, every academic
serving on the same number of committees, and each pair of academics serving
together in exactly one committee. The set of academics (points)
P = {1, 2, 3, 4, 5, 6, 7}
B = {[1, 3, 5], [2, 3, 7], [4, 5, 7], [1, 6, 7], [1, 2, 4], [3, 4, 6], [2, 5, 6]}. (5.1)
Example 5.4.
The design in Example 5.3 can easily be seen to satisfy the regularity constraint
with γ = 3 points in every block (3 academics in every committee) and each
point in exactly r = 3 blocks (each academic on exactly three committees). An
incidence matrix and incidence graph for this design are shown in Fig 5.4 using
1
3 5
The design in Example 5.3 is from a class of designs called 2-designs. These
designs have the property that every pair of points appear together in a fixed
number λ of blocks together and are denoted 2-(v, b, r, γ, λ). For the design in
Example 5.3, each pair of points (academics) occurs in one block (committee)
together thus the blocks in B form a 2-design with v = b = 7, γ = r = 3,
and λ = 1. The 2-designs with λ = 2, called Steiner 2-designs, are particularly
useful for LDPC codes. An LDPC code is defined by setting the incidence
matrix of the design as the parity-check matrix of the code. Designs which
are regular give regular LDPC codes and sparse codes are defined by choosing
designs with γ and r small relative to v and b. In particular 4-cycle free LDPC
codes are guaranteed by choosing Steiner 2-designs since each pair of points
(rows of H) cannot occur in more than one block (column of H) together and
so a 4-cycle cannot be formed.
Combinatorial designs and error correction codes have a long history to-
gether. The blocks of a design can be associated with the codewords of a code,
as for the geometric codes, which have minimum weight codewords the inci-
dence vectors of the blocks of a projective or Euclidean geometry designs. The
minimum weight codewords of Reed-Muller and punctured Reed Muller codes
are the blocks of the PG(m, 2) designs while the generalized Reed-Muller codes
have as minimum weight codewords the blocks of the geometries PG(m, q).
Designs have also played a role in defining new codes such as in the case
of difference set cyclic codes. In this case the codes were defined using the
transpose of the incidence matrix of the projective geometry design, PG(2, q),
as the code parity-check matrix. The properties of these projective geometry
designs are well suited to the majority logic decoding algorithm. More recently
these codes have had an important impact on the field of iterative decoding
Finite geometries
An area closely related to designs is that of finite geometries. The finite
projective geometry of a vector space V of dimension m + 1, PG(V ), has
as elements the subspaces of V . The points of PG(V ) are the 1-dimensional
subspaces of V , the lines are 2-dimensional subspaces of V , the planes are
3-dimensional subspaces of V and so on to hyperplanes the m-dimensional
subspaces of V . The incidence between elements of PG(V ) corresponds to
containment between subspaces of V . Thus a point P is incident with a line L
in PG(V ) if the 1-dimensional subspace corresponding to P is contained in the
2-dimensional subspace corresponding to L. For V a vector space of dimen-
sion m + 1 over the field F = GF(q), the projective geometry is often written
PG(m, q). A Euclidean geometry EG(V ) has as elements the cosets x + U of
the subspaces U of V where x is any vector in V and incidence is again given
by containment.
Designs can be formed by taking as points of the design the points of the
geometries and as blocks the lines, planes or hyperplanes of the geometry with
the incidence of the geometry carried into the design. The designs consisting
of the points and lines of PG(2, q) are finite projective planes of order q. The
PG designs, which give us PG-LDPC codes, are the set of q 2 + q + 1 lines and
q 2 + q + 1 points such that every line passes through exactly q + 1 points and
every point is incident on exactly q + 1 lines. Since, any pair of points in the
plane must be incident together in exactly one line. The points and lines of a
projective plane are the points and blocks of a 2-(q 2 + q + 1, q + 1, 1) design
with the incidence of the design given by the incidence of the plane. Fig. 5.5
shows the typical representation of the finite projective plane of order 3. The
designs of points and lines of PG(m, 2) are the classical Steiner triple systems
or 2-(v, 3, 1) designs which lead to STS-LDPC codes.
Example 5.5.
Figure 5.5 shows the finite projective plane of order 3 which consists of 13
points on 13 lines.
An important outcome of the work with algebraic codes was the demonstra-
tion that highly redundant parity-check matrices can lead to very good iterative
decoding performances without the need for very long block lengths. While the
probability of a random graph having a highly redundant parity-check matrix
is vanishingly small, the field of combinatorial designs offers a rich source of
algebraic constructions for matrices which are both sparse and redundant.
Example 5.6.
Starting with the Euclidean geometry EG(2, 24 ) the EG design is the 22s − 1
points of the geometry not including the origin and blocks of the design are
the 22s − 1 lines of the geometry which do not pass through the origin. The
incidence matrix of this EG design is thus a square 255 × 255 matrix with
column and row weights both 16. Although this incidence matrix is square it
has a large number of linearly dependent rows, and rank 80.
The dual of the block code of this EG design, i.e. the code with parity-check
matrix N , produces a length 255 rate-175/255 LDPC code with a 16, 16-regular
parity-check matrix.
Figure 5.6 shows the bit error rate performance on an AWGN channel of a
short EG LDPC code from a Euclidean geometry compared to an LDPC con-
structed pseudo-randomly using Neal’s construction. Although both codes have
the same length and rate the EG code has significantly more rows in its parity-
check matrix, and a much greater minimum distance, of 17, which gives it its
improved performance.
Partial geometries
LDPC codes have also been defined from a more general class of designs
called partial geometries. A partial geometry is a set of points, and subsets
of those points, called blocks or lines, completely specified by three parame-
ters, s, t, and α. A partial geometry, denoted pg(s, t, α), satisfies the following
properties:
P1. Each point P is incident with t + 1 blocks and each block B is incident
with s + 1 points.
−2
10
−3
10
−5
10
Uncoded BPSK
Random LDPC [256,214,≥ 4]
−6 TD LDPC [256,214,6]
10
Random LDPC [255,175,≥ 4]
EG LDPC [255,175,≥ 17]
−7
10
1 2 3 4 5 6 7
Signal−to−noise ratio E /N (dB)
b 0
P3. For any non-incident point-block pair (P, B) the number of blocks inci-
dent with P and intersecting B equals some constant α.
Example 5.7.
The incidence matrix of the partial geometry pg(1, 2, 1) is:
1 1 1 0 0 0 0 0 0
1 0 0 1 0 0 1 0 0
0 0 0 1 1 1 0 0 0
N = 0 1 0 0 1 0 0 1 0 .
0 0 1 0 0 1 0 0 1
0 0 0 0 0 0 1 1 1
9
1 6
3 5 7
5 1 2
4
6 3
Figure 5.7: The incidence graph for the partial geometry pg(1,2,1) in Exam-
ple 5.7.
Example 5.8.
The incidence matrix of the transversal design, with α = s = 2 and t = 15,
produces the parity-check matrix of a length-256 rate-214/256, (3, 16)-regular
LDPC code. Figure 5.6 also shows the bit error rate performance on an AWGN
channel of a short LDPC code from a transversal design compared to an LDPC
constructed pseudo-randomly using Neal’s Algorithm.
Difference families
Row-circulant quasi-cyclic LDPC codes can be constructed using combi-
natorial deigns called difference families. A difference family is an arrange-
ment of a group of v elements into not necessarily disjoint subsets of equal
size which meet certain difference requirements. More precisely: The t γ-
element subsets, called base blocks, of an Abelian group G, D1 , . . . , Dt with
Di = {di,1 , di,2 , . . . , di,γ } form a (v, γ, λ) difference family if the differences
di,x − di,y , (i = 1, . . . t; x, y = 1, . . . , γ, x 6= y) give each non-zero element
From D1 : 2 − 1 = 1, 1 − 2 = 12, 5 − 1 = 4,
1 − 5 = 9, 5 − 2 = 3, 2 − 5 = 10,
From D2 : 3 − 1 = 2, 1 − 3 = 11, 9 − 1 = 8,
1 − 9 = 5, 9 − 3 = 6, 3 − 9 = 7.
[8] S. B. Wicker, Error Control Systems for Digital Communication and Stor-
age. Upper Saddle River, NJ 07458: Prentice Hall, 1995.
[9] S. Lin and D. J. Costello Jr., Error Control Coding, 2nd ed. New Jersey:
Prentice Hall, 2004.
[12] C. Berrou and A. Glavieux, “Near optimum error correcting coding and
decoding: Turbo codes,” IEEE Trans. Commun., vol. 44, no. 10, pp. 1261–
1271, October 1996.
80
[14] T. J. Richardson and R. L. Urbanke, “The capacity of low-density parity-
check codes under message-passing decoding,” IEEE Trans. Inform. The-
ory, vol. 47, no. 2, pp. 599–618, February 2001.
[20] M. Karlin, “New binary coding results by circulants,” IEEE Trans. Inform.
Theory, vol. IT-15, no. 1, pp. 81–92, 1969.
[31] K. Karplus and H. Krit, “A semi-systolic decoder for the PDSC-73 error-
correcting code,” Discrete Applied Math, vol. 33, no. 1–3, pp. 109–128,
November 1991.
[32] J. L. Fan, Constrained Coding and Soft Iterative Decoding, ser. The
Kluwer International Series in Engineering and Computer Science.
Kluwer Academic Publishers, 2001.
[37] S. J. Johnson and S. R. Weller, “Codes for iterative decoding from partial
geometries,” IEEE Trans. Commun., vol. 52, no. 2, pp. 236–243, February
2004.
[43] E. F. Assmus, Jr. and J. D. Key, Designs and their Codes, ser. Cambridge
Tracts in Mathematics. Cambridge, U.K.: Cambridge University Press,
1993, vol. 103.
[44] P. J. Cameron and J. H. van Lint, Graphs, Codes and Designs, ser. London
Mathematical Society Lecture Note Series, No. 43. Cambridge: Cam-
bridge University Press, 1980.