Low-Density Parity-Check (LDPC) Codes
Definition: Low-Density Parity-Check (LDPC) Code
Low-Density Parity-Check (LDPC) Code
An LDPC code is a linear block code defined by a sparse parity-check matrix β one in which the number of ones per row and column is much smaller than the block length .
A regular -LDPC code has exactly ones in every column and ones in every row of , with and . The code rate satisfies
An irregular LDPC code allows variable column weights and row weights, described by degree distributions and . Irregular codes can be optimised to approach capacity more closely than regular codes.
The sparsity of is critical: it enables low-complexity iterative decoding and allows density evolution analysis.
Definition: Tanner Graph
Tanner Graph
The Tanner graph of an LDPC code is a bipartite graph with two types of nodes:
- Variable nodes : one for each codeword bit.
- Check nodes : one for each parity-check equation (row of ).
An edge connects variable node to check node if and only if . The degree of variable node is (the column weight), and the degree of check node is (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
Theorem: Capacity-Approaching Design via Density Evolution
Density evolution tracks the probability density of the messages in BP decoding as the block length (assuming a cycle-free graph). Under this analysis:
-
The decoder converges (error probability ) if and only if the SNR exceeds a threshold that depends on the degree distributions .
-
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.
Concentration theorem
For a randomly chosen LDPC code from the ensemble defined by , the decoder's empirical message distribution concentrates around the density-evolution prediction as .
Threshold characterisation
Density evolution computes the error probability after iterations, , recursively. The threshold is the supremum of noise levels for which as .
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
Example: A Simple (8, 4) LDPC Code
Consider the (8, 4) LDPC code with parity-check matrix
(a) Draw the Tanner graph and identify the variable/check node degrees.
(b) Verify that is sparse and determine the code rate.
(c) Run one iteration of BP decoding given channel LLRs .
Tanner graph
The Tanner graph has 8 variable nodes ( to ) and 4 check nodes ( to ). Each column has weight 2 () and each row has weight 4 (). This is a regular (2, 4)-LDPC code.
Code parameters
Rate: .
Equivalently: .
The matrix is sparse: only 16 ones out of entries (50% density), which is denser than practical LDPC codes but illustrates the concept.
One BP iteration
Variable-to-check (initialisation): Each variable node sends its channel LLR to connected check nodes. E.g., (connected to ) sends to each.
Check-to-variable: Each check node computes outgoing messages using the rule. For example, (connected to ) sends to :
After one iteration, the updated LLRs show initial refinement of the bit estimates.
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 . This structure enables:
- Efficient encoding in time using the dual-diagonal or raptor-like structure.
- High-throughput hardware decoding with -fold parallelism.
- Rate compatibility through puncturing and extending.
The 5G NR LDPC code uses two base graphs: BG1 (for large transport blocks, up to with 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
BP decoding updates all variable/check nodes simultaneously, enabling massive parallelism in hardware. Turbo decoding requires sequential trellis processing, limiting throughput.
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 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.
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 -fold parallelism (with up to 384), processing 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 ( 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.
- β’
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
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 .
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