You are on page 1of 4

Single-Scan Min-Sum Algorithms

for Fast Decoding of LDPC Codes


Xiaofei Huang

School of Information Science and Technology


Tsinghua University, Beijing, P. R. China, 100084
Email: huangxiaofei@ieee.org
(Accepted by IEEE Information Theory Workshop, Chengdu, China, 2006)
arXiv:cs/0609090v1 [cs.IT] 16 Sep 2006

Abstract— Many implementations for decoding LDPC codes circuit areas because the number of nonzero elements is not
are based on the (normalized/offset) min-sum algorithm due small in practice. Manipulating those values also takes a lot
to its satisfactory performance and simplicity in operations. of system time and consumes much of system power at run-
Usually, each iteration of the min-sum algorithm contains two
scans, the horizontal scan and the vertical scan. This paper time. We concluded that further simplification of the min-sum
presents a single-scan version of the min-sum algorithm to speed algorithm is needed to suit the ever demanding requirements
up the decoding process. It can also reduce memory usage or of the next generation communication systems.
wiring because it only needs the addressing from check nodes This paper presents two simplified versions of the min-
to variable nodes while the original min-sum algorithm requires sum algorithm to increase its decoding speed and reduce the
that addressing plus the addressing from variable nodes to check
nodes. To cut down memory usage or wiring further, another requirement on memory usage. Those simplifications are based
version of the single-scan min-sum algorithm is presented where on several obvious observations with some of them already
the messages of the algorithm are represented by single bit values mentioned by other researcher [12]. However, no detail has
instead of using fixed point ones. The software implementation been offered in the previous literature in the form of algorithms
has shown that the single-scan min-sum algorithm is more than which can be directly used by engineers and practitioners in
twice as fast as the original min-sum algorithm.
the communication area. Furthermore, the advantage of the
simplifications is not neglectable because the simplified min-
I. I NTRODUCTION
sum algorithm more than doubles the decoding speed of the
The sum-product algorithm [1], [2], also known as the standard min-sum algorithm in our software implementation
belief propagation algorithm [3], is the most powerful iter- (in C language) for decoding the quasi-cyclic irregular LDPC
ative soft decoding algorithm for LDPC (low density parity codes used for China’s HDTV, the irregular LDPC codes used
check) codes [4], [5], [6]. The normalized/offset min-sum for European digital video broadcasting using satellites (DVB-
algorithm [7], [8], [9], [10] has demonstrated in [9], [10] as S2), and the regular/irregular LDPC codes from Dr. MacKay’s
a good approximation to the sum-product algorithm. It is a website. The comparison is fair because both algorithms are
parallel, iterative soft decoding algorithm for LDPC codes. simple in operations and can be implemented in software in a
It is simpler in computation than the sum-product algorithm straightforward way without much room for further improve-
because it uses only minimization and summation operations ment. Our HDTV research group at Tsinghua University has
instead of multiplication and summation operations used by benefited from the simplifications because we most often use
the latter. It is also simpler in computation than the sum- software simulations first to test the performance of different
product algorithm in the log domain because the latter uses LDPC codes for China’s HDTV which could be very time-
non-linear functions. For hardware/software implementations, consuming and may take hours or even days running on fast
multiplication operations and non-linear functions are, in Intel-based desktop computers.
general, more expensive than minimization and summation
operations. II. D EFINITIONS AND NOTATIONS
Despite of its reduced complexity, we found out, in imple- LDPC codes belong to a special class of linear block codes
menting the normalized/offset min-sum algorithm for China’s whose parity check matrix H has a low density of ones.
HDTV, that the min-sum algorithm is still expensive for hard- LDPC codes were originally introduced by Gallager in his
ware/software implementations since two scans are required thesis [4]. After the discovery of turbo codes in 1993 by Berrou
by the algorithm at each iteration, and its convergence rate et al. [11], LDPC codes were rediscovered by Mackay and
is generally not satisfactory. The min-sum algorithm is also Neal [5] in 1995. Both classes have excellent performances
not memory efficient. The temporary results of the algorithm in terms of error correction close to the Shannon limit. For
are stored in memory as fixed point values. The number of a binary LDPC code, H is a binary matrix with elements,
values is proportional to the number of non-zero elements of denoted as hmn in {0, 1}. Let the code word length be N ,
the parity check matrix of a LDPC code. They require large then H is a M × N matrix, where M is the number of rows.
Each row Hi (1 ≤ i ≤ M ) of H introduces one parity check 2) Vertical scan (variable node update rule) :
constraint on input data x = (x1 , x2 , . . . , xn ), i.e.,
(k)
X
(k)
Zmn = Zn(0) + L m′ n . (2)
Hi xT = 0 mod 2.
m′ ∈M(n)\m
So there are M constraints on x in total.
3) Decoding :
Let N (m) be the set of variable nodes that are included in
For each bit, compute its posteriori log-likelihood ratio
the m-th parity check constraint. Let M(n) be the set of check
(LLR)
nodes which contain the variable node n. N (m) \ n denotes X (k)
the set of variable nodes excluding node n that are included Zn(k) = Zn(0) + L m′ n .
in the m-th parity check constraint. M(n) \ m stands for the m′ ∈M(n)

set of check nodes excluding the check node m which contain Then estimate the original codeword x̂(k) as
the variable node n. The symbol ‘\’ denotes the set minus.  (k)
For an additive white Gaussian noise channel and a binary 0, if Zn > 0;
x̂(k)
n = for n = 1, 2, . . . , N .
modulation, let yn be the received data bit at position n, 1, otherwise;
yn = (−1)xn + ξn , If H (x̂(k) )T = 0 or the iteration number exceeds some
cap, stop the iteration and output x̂(k) as the decoded
where ξn is the channel noise. The initial Log-likelihood ratio
(0) codeword.
(LLR) for the input data bit n, denoted as Zn , is
One performance improvement to the above standard min-
p(xn = 0/yn ) (k)
Zn(0) ≡ ln = 2yn /σ 2 , sum algorithm is to multiply Lmn computed in (1) by a
p(xn = 1/yn ) positive constant λk smaller than 1, i.e.,
where σ 2 is the estimated variance of the channel noise. The
L(k) (k)
mn ⇐ λk Lmn ,
performance of the min-sum algorithm does not depend on the
(0)
channel estimate. We can, thus, set Zn = yn in practice. The min-sum algorithm with such a modification is referred
to as the normalized min-sum algorithm [9], [10].
III. T HE (N ORMALIZED /O FFSET ) M IN - SUM A LGORITHM
Another improvement to the standard min-sum algorithm,
The standard min-sum algorithm [7], [8] for decoding (k)
is to reduce the reliability values Lmn computed in (1) by a
LDPC is a parallel, iterative soft decoding algorithm. At each positive value βk , i.e.,
iteration, messages first are sent from the variable nodes to  
the check nodes, called the horizontal scan. Then messages L(k)
mn ⇐ max L (k)
mn − β k , 0 ,
are sent from the check nodes back to the variable nodes,
called the vertical scan. During each iteration, the a-posteriori The min-sum algorithm with such a modification is referred to
probability for each bit is also computed. A hard decoding as the offset min-sum algorithm [10]. The difference between
decision is made for each bit based on the probability, and the standard min-sum algorithm and the normalized/offset one
decoded bits are checked against all parity check constraints is minor for software/hardware implementations.
to see if they are a valid codeword. IV. T HE S INGLE -S CAN M IN -S UM A LGORITHM
(k)
At iteration k, let Zn be the posteriori LLR for the input
(k) It is very straightforward to rewrite the variable node update
data bit n. Let Zmn denote the message sent from variable
(k) rule (2) as
node n to check node m. Zmn is the log-likelihood ratio that (k)
Zmn = Zn(k) − L(k)
mn .
the n-th bit of the input data x has the value 0 versus 1, given
(k) (k)
the information obtained via the check nodes other than check If we have computed Zn , the variable node message Zmn can
(k) (k)
node m. Let Lmn denote the message sent from check node be obtained from the check node message Lmn . Hence, we can
(k)
m to variable node n. Lmn is the log-likelihood ratio that the merge the horizontal scan and the vertical scan into a single
(k)
check node m is satisfied when the input data bit n is fixed to horizontal scan where only the check node messages Lmn are
value 0 versus value 1 and the other bits are independent with (k−1) (k−1)

computed directly from Zn and Lmn . In summary, the
log-likelihood ratios Zmn′ , n ∈ N (m) \ n. The pseudo-code single-scan min-sum algorithm consists of the following major
for the min-sum algorithm is given as follows. steps.
Initialization : For n ∈ {1, 2, . . . , N }, (0)
Initialization : Lmn = 0.
(0)
Zmn = Zn(0) , for m ∈ M(n). Horizontal scan (check node update rule) :

Iteration Zn(k) = Zn(0) ,


(k−1)
Y
1) Horizontal scan (check node update rule) : L(k)
mn = sgn(Zn(k−1) − Lmn′ ) ×
For each m and each n ∈ N (m), n′ ∈N (m)\n
(k−1) (k−1) (k−1)
Y
L(k)
mn = sgn(Zmn′ ) · ′ min |Zmn′ | ′
min |Zn(k−1) − Lmn′ | , (3)
n ∈N (m)\n n ∈N (m)\n
n′ ∈N (m)\n
(1) Zn(k) += L(k)
mn .
(k) (k) (k)
Decoding : x̂n = 0, if Zn > 0; x̂n = 1, otherwise. equation. This paper offers the detail of exploring this unique
Compared with the original double-scan min-sum algorithm, characteristic to possibly cut down the memory usage of the
the single-scan version could not only be possibly faster, but single-scan min-sum algorithm further.
(k)
also be more memory efficient. We can save memory by To be more specific, for the check node messages Lmn of
(k) (k) (k)
storing Zn s, which are of N items, instead of Zmn , which the same check node m, let Am be the first absolute value,
are of N ·dv (average variable node degree) items. For software
implementations, the single-scan version needs only to store A(k)
m ≡ min |L(k)
mn | .
n∈N (m)
the addressing (indexing) from check nodes to variable nodes.
However, for the original version, both the addressing from From Eq. (1), we have
check nodes to variable nodes and the one from variable nodes
to check nodes are required. The single-scan version cuts down A(k)
m =
(k−1)
min |Zmn |,
n∈N (m)
the amount of memory used for addressing by half. Such
(k−1)
memory saving could be important if the min-sum algorithm which is the minimal value of |Zmn |s of the same check
is implemented in next-generation wireless/mobile computing node m.
devices where available memory could be very limited. (k)
Let Bm be the second absolute value,
Could the memory saving be directly translated into the
(k)
saving of wiring for hardware implementations? It has been Bm ≡ max |L(k)
mn | ,
n∈N (m)
found that our hardware implementation of the original min-
sum algorithm for decoding the LDPC codes used for China’s (k) (k)
and let ñm be the position of Lmn of the second minimal
HDTV takes a significant amount of circuit area (sometimes absolute value,
50%) just for implementing the connections from the variable
nodes to the check nodes and the connections from the ñ(k) (k)
m ≡ arg max |Lmn | .
n∈N (m)
check nodes to variable nodes. Since the simplified min-sum
algorithm has only the horizontal scan, the circuit area could From Eq. (1), we have
be reduced if only the connections from the check nodes
to variable nodes are required. We are now at the stage of ñ(k) (k−1)
m = arg min |Zmn | .
n∈N (m)
verifying this statement in our lab.
(k)
That is, the position of Lmn of the second minimal absolute
V. F URTHER S IMPLIFICATION FOR THE S INGLE -S CAN (k) (k) (k−1)
value Bm , ñm , is at the position of Zmn of the minimal
A LGORITHM
absolute value.
The original min-sum algorithm uses a lot of memory for From Eq. (1), we also have
(k)
storing the variable node messages Zmn and the check node
(k) (k−1)
(k)
messages Lmn . Although we can use one memory cell to store Bm = min |Zmn |,
(k)
(k) (k) P n∈N (m)\ñm
both Zmn and Lmn , we still need n |M(n)| memory cells
to store them, one for each non-zero element of the parity (k)
which is the second minimal value of |Zmn |s of the same
check matrix H. This statement still holds for the single-scan check node m.
(k)
min-sum algorithm where only the check node messages Lmn (k)
Hence, for the check node messages Lmn of the same check
are stored. node, to save memory, we only need to store the two absolute
If we use b bits (b = 6 ∼ 8 in practice) to store P a value
(k)
values, the position of the first one, and the signs of Lmn .
(containing its sign), then in total they require b · n |M(n)| (k) (k) (k)
Let the sign of Lmn be smn , smn = sgn(Lmn ). Let
(k)
bits. For VLSI implementations, that could take a significant f (A, B, n, ñ) be a function defined as
amount of circuit area. It also leads to high energy consump- 
tion due to the intensive manipulation (reading/writing) of B, if n = ñ;
f (A, B, n, ñ) =
those memory cells at each iteration, two writing operations A, otherwise.
for each cell by the original min-sum algorithm.
(k)
Our simplification comes from the following observation The check node message Lmn can be recovered from its sign
(k) (k) (k) (k)
of the check node messages Lmn computed at the horizontal smn , the two absolute values, Am and Bm , and the position
(k) (k)
scan. The check node messages Lmn is computed using (1) ñm as
(k)
or (3). For the check node messages Lmn of the same check L(k) (k) (k) (k) (k)
mn = smn f (Am , Bm , n, ñm ) .
node m, all have the same absolute value except one. The first
(k−1) In the single-scan min-sum algorithm presented in the
absolute value is the minimal absolute value of |Lmn |s, for
(k)
the same m. The second absolute value is the second minimal previous section, substituting the computation of Lmn by the
(k−1) (k) (k) (k) (k)
absolute value of |Lmn |s. This observation is quite obvious. computation of smn , Am , Bm , and ñm , we have a memory
Dr. Guilloud also mentioned in his thesis [12] (section 4.1.2) efficient version of the single-scan min-sum algorithm.
(0) (0) (0) (0) (0)
that two messages need to be saved for each parity-check Initialization : Am = Bm = ñm = 0, smn = sgn(Ln ).
Horizontal scan (check node update rule) : R EFERENCES
[1] F. R. Kschischang, B. J. Frey, and H. andrea Loeliger, “Factor graphs and
Zn(k) = Zn(0) , the sum-product algorithm,” IEEE Transactions on Information Theory,
(k−1) (k−1) (k−1) (k−1) (k−1) vol. 47, no. 2, pp. 498–519, February 2001.
Lmn = smn f (Am , Bm , n, ñm ),
[2] S. M. Aji and R. J. McEliece, “The generalized distributive law,” IEEE
(k−1)
Y
(k) (k−1)
Lmn = sgn(Zn − Lmn′ ) × Transactions on Information Theory, vol. 46, no. 2, pp. 325–343, March
2000.
n′ ∈N (m)\n [3] J. Pearl, Probabilistic Reasoning in Intelligent Systems: Networks of
(k−1) Plausible Inference. Morgan Kaufmann, 1988.
min |Zn(k−1) − Lmn′ | , [4] R. G. Gallager, “Low-density parity-check codes,” Ph.D. dissertation,
n′ ∈N (m)\n
Department of Electrical Engineering, M.I.T., Cambridge, Mass., July
Zn(k) (k)
+ = Lmn , 1963.
[5] D. J. C. MacKay and R. M. Neal, “Good codes based on very sparse
A(k)
m = min |L(k)
mn | , (4) matrices,” in Cryptography and Coding, 5th IMA Conference, December
n∈N (m)
1995.
(k)
Bm = max |L(k)
mn | , (5) [6] T. J. Richardson, M. A. Shokrollahi, and R. L. Urbanke, “Design of
n∈N (m) capacity-approaching irregular low-density parity-check codes,” IEEE
Transactions on Information Theory, vol. 47, no. 2, pp. 619–637,
ñ(k)
m = arg max |L(k)
mn | , February 2001.
n∈N (m)
[7] N. Wiberg, “Codes and decoding on general graphs,” Ph.D. dissertation,
(k)
smn = sgn(L(k)
mn ) . Department of Electrical Engineering, Linkoping University, Linkoping,
Sweden, 1996.
(k) (k) (k) [8] M. Fossorier, M. Mihaljevic, and H. Imai, “Reduced complexity iterative
Decoding : x̂n = 0, if Zn > 0; x̂n = 1, otherwise. decoding of low density parity check codes based on belief propagation,”
In the memory efficient version of the single-scan min-sum IEEE Transactions on Communications, vol. 47, pp. 673–680, May
(k−1) 1999.
algorithm, the previous check node messages Lmn of the
[9] J. Chen and M. Fossorier, “Density evolution of two improved BP-based
check node m are computed on fly and stored as temporary algorithms for LDPC decoding,” IEEE Communications Letters, vol. 6,
(k)
data during the computation of check node messages Lmn of pp. 208–210, 2002.
(k) (k) (k) (k) (k) [10] J. Chen, “Reduced complexity decoding algorithms for low-density
the same check node m. smn , Am ,Bm , ñm , and Zn are parity check codes and turbo codes,” Ph.D. dissertation, University of
persistent data stored in memory. Hawaii, Dept. of Electrical Engineering, 2003.
The single-scan min-sum algorithm is fully equivalent to the [11] C. Berrou, A. Glavieux, and P. Thitimajshima, “Near shannon limit
error-correcting coding and decoding: turbo codes,” in Proceedings of
original min-sum algorithm. To modify the single-scan min- the 1993 IEEE International Conference on Communication, 1993, pp.
sum algorithm to be equivalent to the normalized min-sum 1064–1070.
algorithm, Eq. (4) and Eq. (5) should be changed to [12] F. Guilloud, “Generic architecture for LDPC codes decoding,” Ph.D.
dissertation, ENST Paris, 2004.
(k) [13] X. Huang, “Near perfect decoding of LDPC codes,” in Proceedings of
Am = λk min |L(k)
mn |, IEEE International Symposium on Information Theory (ISIT), 2005, pp.
n∈N (m)
302–306.
(k)
Bm = λk max |L(k)
mn |.
[14] J. Yedidia, W. Freeman, and Y. Weiss, “Constructing free-energy
n∈N (m) approximations and generalized belief propagation algorithms,” IEEE
Transactions on Information Theory, vol. 51, no. 7, pp. 2282–2312,
where λk is a constant at iteration k satisfying 0 < λk < 1. July 2005.
[15] S. Aji and R. McEliece, “The generalized distributive law,” IEEE
To modify the single-scan min-sum algorithm to be equiv- Transactions on Information Theory, vol. 46, pp. 325–343, March 2000.
alent to the offset min-sum algorithm, Eq. (4) and Eq. (5) [16] E. Boutillon, J. Castura, and F. R. Kschischang, “Decoder-first code
should be changed to design,” in Proceedings of the 2nd International Symposium on Turbo
Codes and Related Topics, 2000, pp. 459–462.
[17] M. M. Mansour and N. R. Shanbhag, “Low-power VLSI decoder archi-
A(k)
m = max( min |L(k)
mn | − β, 0), tectures for LDPC codes,” in Proceedings of International Symposium
n∈N (m)
on Low Power Electronics and Design, 2002.
(k)
Bm = max( max |L(k)
mn | − β, 0) , [18] C. Howland and A. Blanksby, “A 220 mW 1 Gb/s 1024-bit rate-1/2
n∈N (m) low density parity check code decoder,” in Proceedings of IEEE Conf.
Custom Integrated Circuits, 2001, pp. 293–296.
where β is a constant, satisfying β > 0. [19] E. Yeo, P. Pakzad, B. Nikolic, and V. Anantharam, “High throughput
low-density parity-check decoder architectures,” in Proceedings of IEEE
GlobalComm, 2001.
VI. S UMMARY [20] A. Blanksby and C. Howland, “A 690-mW 1-Gbps 1024-b, rate-1/2 low-
density parity-check code decoder LDPC decoding,” Journal of Solid
This paper presents the single-scan min-sum algorithm as a State Circuits, vol. 37(3), pp. 404–412, 2002.
simplified version of the original (normalized/offset) min-sum [21] S. Kim, G. E. Sobelman, and J. Moon, “Parallel VLSI architectuers for
algorithm for decoding LDPC codes. It merges the horizontal a class of LDPC codes,” ISCAS, 2002.
[22] D. E. Hocevar, “LDPC code construction with flexible hardware im-
scan and the vertical scan in the original min-sum algorithm plementation,” in Proceedings of IEEE International Conference on
into a single horizontal scan. A memory efficient version of Communications, 2003, pp. 2708–2712.
the single-scan min-sum algorithm is also presented where [23] Y. Chen and D. Hocevar, “A FPGA and ASIC implementation of rate
1/2 8088-b irregular low density parity check decoder,” in IEEE Global
the check node messages of each check node are stored Telecommunications, 2003.
using their signs together with two of the messages of the
minimal absolute values. All the simplifications are applicable
for decoding binary LDPC codes.

You might also like