Low-Density Parity-Check (LDPC) Codes

Definition:

Low-Density Parity-Check (LDPC) Code

An LDPC code is a linear block code defined by a sparse parity-check matrix H\mathbf{H} β€” one in which the number of ones per row and column is much smaller than the block length nn.

A regular (dv,dc)(d_v, d_c)-LDPC code has exactly dvd_v ones in every column and dcd_c ones in every row of H\mathbf{H}, with dvβ‰ͺnd_v \ll n and dcβ‰ͺnd_c \ll n. The code rate satisfies

Rc=1βˆ’dvdcR_c = 1 - \frac{d_v}{d_c}

An irregular LDPC code allows variable column weights and row weights, described by degree distributions λ(x)\lambda(x) and ρ(x)\rho(x). Irregular codes can be optimised to approach capacity more closely than regular codes.

The sparsity of H\mathbf{H} is critical: it enables low-complexity iterative decoding and allows density evolution analysis.

,

Definition:

Tanner Graph

The Tanner graph of an LDPC code is a bipartite graph with two types of nodes:

  • Variable nodes v1,…,vnv_1, \ldots, v_n: one for each codeword bit.
  • Check nodes c1,…,cnβˆ’kc_1, \ldots, c_{n-k}: one for each parity-check equation (row of H\mathbf{H}).

An edge connects variable node vjv_j to check node cic_i if and only if Hij=1H_{ij} = 1. The degree of variable node vjv_j is dv(j)d_v(j) (the column weight), and the degree of check node cic_i is dc(i)d_c(i) (the row weight).

Short cycles (especially cycles of length 4, called 4-cycles) degrade iterative decoding performance by correlating the messages.

The Tanner graph provides both a visual representation and the computational structure for belief-propagation decoding.

Belief Propagation (Message Passing) Decoding

Belief propagation (BP) decoding operates on the Tanner graph by
iteratively passing messages along edges:
Initialisation:
Each variable node vjv_j sends its channel LLR Lch(j)L_{\text{ch}}(j)
to all connected check nodes.
Check-node update (for each check node cic_i):
Lciβ†’vj=2tanhβ‘βˆ’1 ⁣(∏jβ€²βˆˆN(i)βˆ–jtanh⁑ ⁣(Lvjβ€²β†’ci2))L_{c_i \to v_j} = 2\tanh^{-1}\!\left(\prod_{j' \in \mathcal{N}(i) \setminus j} \tanh\!\left(\frac{L_{v_{j'} \to c_i}}{2}\right)\right)
Variable-node update (for each variable node vjv_j):
Lvjβ†’ci=Lch(j)+βˆ‘iβ€²βˆˆM(j)βˆ–iLciβ€²β†’vjL_{v_j \to c_i} = L_{\text{ch}}(j) + \sum_{i' \in \mathcal{M}(j) \setminus i} L_{c_{i'} \to v_j}
Decision:
After each iteration, compute the total LLR:
Ltotal(j)=Lch(j)+βˆ‘i∈M(j)Lciβ†’vjL_{\text{total}}(j) = L_{\text{ch}}(j) + \sum_{i \in \mathcal{M}(j)} L_{c_i \to v_j}
Make hard decisions: c^j=0\hat{c}_j = 0 if Ltotal(j)β‰₯0L_{\text{total}}(j) \geq 0,
else c^j=1\hat{c}_j = 1. Stop if Hc^T=0\mathbf{H}\hat{\mathbf{c}}^T = \mathbf{0}
or the maximum number of iterations is reached.
,

Theorem: Capacity-Approaching Design via Density Evolution

Density evolution tracks the probability density of the messages in BP decoding as the block length nβ†’βˆžn \to \infty (assuming a cycle-free graph). Under this analysis:

  1. The decoder converges (error probability β†’0\to 0) if and only if the SNR exceeds a threshold Οƒβˆ—\sigma^* that depends on the degree distributions (Ξ»,ρ)(\lambda, \rho).

  2. By optimising the degree distributions, the threshold can be made arbitrarily close to the Shannon limit.

Richardson and Urbanke (2001) showed that irregular LDPC codes designed via density evolution can achieve rates within 0.0045 dB of the binary-input AWGN channel capacity.

With infinite block length and no cycles, each message in BP is independent. Density evolution exploits this independence to analytically track how the message distributions evolve, predicting whether decoding will succeed.

,

Iterative Decoding Animation

Watch belief-propagation or turbo decoding converge iteration by iteration. The animation shows how the LLR histogram evolves from a noisy, uncertain distribution toward confident binary decisions.

Parameters
2
20

Example: A Simple (8, 4) LDPC Code

Consider the (8, 4) LDPC code with parity-check matrix

H=[11110000110011001010101001010101]\mathbf{H} = \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \end{bmatrix}

(a) Draw the Tanner graph and identify the variable/check node degrees.

(b) Verify that H\mathbf{H} is sparse and determine the code rate.

(c) Run one iteration of BP decoding given channel LLRs Lch=[+3,βˆ’1,+2,+4,βˆ’2,+1,+3,βˆ’1]\mathbf{L}_{\text{ch}} = [+3, -1, +2, +4, -2, +1, +3, -1].

Quasi-Cyclic LDPC Codes in 5G NR

Practical LDPC codes in standards use quasi-cyclic (QC) structure: the parity-check matrix is composed of circulant permutation matrices (or zero matrices) of size ZΓ—ZZ \times Z. This structure enables:

  • Efficient encoding in O(n)O(n) time using the dual-diagonal or raptor-like structure.
  • High-throughput hardware decoding with ZZ-fold parallelism.
  • Rate compatibility through puncturing and extending.

The 5G NR LDPC code uses two base graphs: BG1 (for large transport blocks, up to n=66Γ—Zn = 66 \times Z with ZZ up to 384) and BG2 (for small blocks).

Quick Check

Which of the following is a key advantage of LDPC codes over turbo codes for high-throughput applications?

LDPC codes always have larger minimum distance

LDPC belief-propagation decoding is inherently parallelisable

LDPC codes require fewer iterations to converge

LDPC codes were invented more recently

Why This Matters: LDPC Codes in Wi-Fi and 5G NR

LDPC codes are deployed in major wireless standards:

  • Wi-Fi (IEEE 802.11n/ac/ax/be): LDPC codes with block lengths 648, 1296, and 1944 bits at rates 1/2, 2/3, 3/4, and 5/6. Mandatory in 802.11ax (Wi-Fi 6) for high-throughput modes.

  • 5G NR (data channels): QC-LDPC codes replace turbo codes from 4G LTE. Two base graphs support transport block sizes from 40 to 8448 bits. The quasi-cyclic structure with lifting size ZZ enables decoder throughputs exceeding 20 Gbps.

  • DVB-S2/T2 (digital TV): LDPC codes with block length 64800 operating within 0.7-1.0 dB of the Shannon limit.

⚠️Engineering Note

LDPC Decoder Throughput and Latency in 5G NR

Practical LDPC decoder implementations in 5G NR base stations must achieve throughputs exceeding 20 Gbps to support eMBB peak rates. Key implementation constraints include:

  • Parallelism: QC-LDPC structure enables ZZ-fold parallelism (with ZZ up to 384), processing ZZ variable/check nodes simultaneously per clock cycle.
  • Iterations: Typically 5-15 BP iterations suffice; more iterations increase latency without significant gain. Early termination (checking syndrome after each iteration) saves power.
  • Quantisation: Fixed-point arithmetic (5-6 bits per LLR) is standard. Below 4 bits, performance degrades noticeably (>0.1> 0.1 dB loss).
  • Memory: Storing soft LLRs for HARQ soft combining requires significant buffer memory β€” up to 3.4 Mbits per UE for 16 parallel HARQ processes.
Practical Constraints
  • β€’

    Decoder throughput must exceed 20 Gbps for eMBB peak rates

  • β€’

    LLR quantisation to 5-6 bits with < 0.1 dB performance loss

  • β€’

    HARQ soft buffer memory up to 3.4 Mbits per UE

  • β€’

    Latency budget of ~1 ms for HARQ round-trip

πŸ“‹ Ref: 3GPP TS 38.212, TS 38.214

Key Takeaway

Modern iterative codes (turbo, LDPC, polar) operate within 1 dB of the Shannon limit β€” a feat that seemed impossible before 1993. The key enabler is iterative decoding on sparse graphs, which achieves near-ML performance at complexity linear in the block length per iteration. 5G NR uses LDPC for data (high throughput via parallelism) and polar codes for control (short blocks with CA-SCL).

LDPC Code

A linear block code defined by a sparse parity-check matrix, enabling efficient iterative decoding via belief propagation. Can be designed to approach channel capacity.

Related: Tanner Graph, Belief Propagation (Message Passing) Decoding, Capacity-Approaching Design via Density Evolution

Tanner Graph

A bipartite graph representation of a parity-check matrix, with variable nodes (coded bits) and check nodes (parity equations) connected by edges corresponding to non-zero entries in H\mathbf{H}.

Related: Low-Density Parity-Check (LDPC) Code, Belief Propagation (Message Passing) Decoding

Belief Propagation

An iterative message-passing algorithm that computes approximate marginal probabilities on a factor graph. Used as the standard decoding algorithm for LDPC codes.

Related: Low-Density Parity-Check (LDPC) Code, Tanner Graph, Iterative Decoding

Density Evolution

An analytical technique that tracks the probability density of messages in belief-propagation decoding as block length tends to infinity, used to determine decoding thresholds and optimise degree distributions.

Related: Low-Density Parity-Check (LDPC) Code, Belief Propagation (Message Passing) Decoding, Multiple Antennas and Capacity