Channel Coding

Channel coding adds redundancy to transmitted data so the receiver can detect and correct errors. 5G NR uses LDPC for high-throughput data channels and Polar codes for reliable control channels. Covers rate matching and HARQ soft-combining (Chase/IR).

#1Why Channel Coding — The Shannon Limit

Every communication channel has a theoretical maximum data rate — the Shannon capacity — beyond which error-free transmission is impossible:

Shannon-Hartley Theorem

C = B × log2(1 + SNR)   [bits/s]

Channel coding bridges the gap between uncoded performance and the Shannon limit. A good code achieves near-capacity throughput at the target BLER.

BLER vs SNR for uncoded, LDPC, and Polar codes — see how coding gain bridges the Shannon gap

Code Rate — The Efficiency Metric

  Code Rate R = k / n

  k = information bits (payload)     n = coded bits (after redundancy)

  Rate 1/2: 100 info → 200 coded (50% overhead) → strong protection
  Rate 3/4: 100 info → 133 coded (33% overhead) → moderate protection
  Rate 5/6: 100 info → 120 coded (20% overhead) → high throughput
  Rate 1:   100 info → 100 coded (no protection) → uncoded

  5G NR dynamically adapts code rate based on CQI.

#2LDPC Codes — Data Channel (PDSCH/PUSCH)

Low-Density Parity-Check codes are the channel coding scheme for 5G NR data channels, chosen for excellent throughput at moderate-to-long block lengths:

PropertyLDPC Advantage for Data
Block lengthExcellent at long blocks (1000–8448+ bits)
ThroughputHighly parallelizable decoder → multi-Gbps
LatencyConverges in 5–20 iterations
FlexibilityAny code rate and block length via rate matching

Parity Check Matrix & Tanner Graph

An LDPC code is defined by a sparse parity check matrix H. A valid codeword c satisfies H × cT = 0 (mod 2):

Tanner graph with belief propagation — messages pass between variable nodes (bits) and check nodes (equations) each iteration

5G NR LDPC Base Graphs

ParameterBase Graph 1 (BG1)Base Graph 2 (BG2)
Mother matrix46 × 68 (22,168 bits max)42 × 52 (3,840 bits max)
Used forLarge code blocksSmall code blocks
Mother rateR = 1/3 (kb=22)R = 1/5 (kb=10)
SelectionTBS > 3824 OR R > 0.67Otherwise

#3Polar Codes — Control Channel (PDCCH/PUCCH)

Invented by Erdal Arıkan (2009), Polar codes are the first provably capacity-achieving codes with low-complexity encoding/decoding. Used for 5G NR control channels:

PropertyPolar Advantage for Control
Block lengthExcellent at short blocks (12–1024 bits)
ReliabilitySuperior BLER at short lengths (CA-SCL)
Capacity-achievingProvably achieves Shannon as N → ∞
Error floorNo error floor (unlike LDPC)

Channel Polarization

Polar codes exploit channel polarization — combining N channels and splitting them into nearly-perfect and nearly-useless channels:

Channel polarization — as levels increase, channels split into "good" (data) and "bad" (frozen) channels

Decoding: SC → SCL → CA-SCL

AlgorithmComplexityPerformance5G NR
SC (Successive Cancellation)O(N log N)ModerateNo
SCL (SC List, L paths)O(L·N log N)GoodNo
CA-SCL (CRC-Aided SCL)O(L·N log N)Near-ML boundYes (L=8)

#4LDPC vs Polar — Head-to-Head

AspectLDPC (Data)Polar (Control)
Used forPDSCH, PUSCHPDCCH, PUCCH, PBCH
Block lengthLong (1000–8448+)Short (12–1024)
InventorGallager (1963)Arıkan (2009)
DecodingBelief PropagationCA-SCL (list)
ParallelismExcellentLimited (sequential)
Max throughputMulti-Gbps~100 Mbps
Error floorYes (at low BLER)No
Capacity-achievingEmpirically closeProven (N→∞)

BLER performance comparison — Polar wins at short blocks, LDPC wins at long blocks with faster decode


#5Rate Matching — Adapting Code Rate

Rate matching adjusts the effective code rate by selecting bits from a circular buffer. This allows a single mother code to support any desired rate:

  Mother code: k info bits → n coded bits (R_mother)
  Need E bits to transmit:
    E < n → PUNCTURE (remove bits) → higher effective rate
    E > n → REPEAT (duplicate bits) → lower effective rate

LDPC Rate Matching — Circular Buffer

Circular buffer rate matching — adjust code rate and redundancy version (RV) to see which bits are transmitted

Polar Rate Matching

TechniqueConditionMethod
PuncturingE < NRemove last (N-E) bits, decoder LLR = 0
ShorteningE < N, N > 2ESet last bits to known 0, decoder LLR = +∞
RepetitionE > NRepeat first (E-N) bits at end

#6HARQ — Hybrid ARQ Soft-Combining

HARQ combines error detection (CRC), error correction (channel coding), and retransmissions for reliable communication:

Chase Combining (CC)

Retransmit same coded bits. Receiver adds LLRs: LLR_combined = LLR₁ + LLR₂. Gain: 3 dB per reTX (energy only).

Incremental Redundancy (IR)

Retransmit different coded bits (new parity from circular buffer). Gain: 3 dB + coding gain. R_eff decreases each reTX.

HARQ process — step through retransmissions to see LLR combining and effective code rate evolution

HARQ in 5G NR

ParameterDL (PDSCH)UL (PUSCH)
Max HARQ processes1616
Max retransmissions4 (configurable)4 (configurable)
HARQ typeAsynchronous (DCI)Synchronous (K2)
Default schemeIR (RV sequence)IR (RV sequence)
RV sequence{0, 2, 3, 1} — configurable via RRC

#7Soft Buffer Management

The UE maintains a soft buffer to store LLR values from failed transmissions for HARQ combining:

  Total soft buffer: N_soft (UE capability)
  Per HARQ process: N_IR = floor(N_soft / (C × N_cells × K_MIMO × 16))

  Example: N_soft = 10M bits, 1 CC, 2×2 MIMO
  → N_IR = 10M / (1 × 1 × 2 × 16) = 312,500 bits per process
  → BG1 mother code (8448 bits) fits easily ✅

Soft Buffer Overflow Risk

If N_IR < mother code size, LLR values must be discarded → IR-HARQ performance degrades. Monitor utilization in dense carrier aggregation scenarios.


#8End-to-End Coding Chain

PDSCH processing chain: TB → CRC → segmentation → LDPC encode → rate match → modulate


#9Practical Field Considerations

PitfallImpactBest Practice
High code rate + poor channelBLER spike → HARQ stormCQI-based MCS; target BLER ≤ 10%
Ignoring HARQ RTTPipeline stallsEnsure K1 + delay ≤ slot budget
Soft buffer overflowLLR truncation → IR degradesMonitor utilization; reduce processes
Wrong BG selectionSuboptimal decodeVerify BG1/BG2 per TS 38.214
Polar list size too smallBLER floor at short blocksL = 8 minimum for CA-SCL
RV mismatch between gNB/UEHARQ combining failsVerify RV sequence via RRC

Common Misconception

Myth: "More retransmissions always improve throughput." Reality: Each reTX consumes radio resources. If BLER > 30%, reduce MCS instead of relying on HARQ retransmissions.

LTE vs 5G NR Coding

AspectLTE5G NR
Data codeTurbo codesLDPC (faster, parallel)
Control codeTail-biting convolutionalPolar (capacity-achieving)
Max block length6144 bits8448 bits (BG1)
Max HARQ processes8 (FDD)16

#10Further Reading

3GPP Specifications

Research Papers

6G AI-Native MAC

☆ AI/ML Scheduling →