5G NR LDPC
LDPC, or Low-Density Parity-Check coding, is the main shared-data coding family in 5G NR. It is used for DL-SCH on PDSCH and UL-SCH on PUSCH.
Read LDPC as the main data-plane coding path in NR. It works with transport-block CRC attachment, code block segmentation, base-graph selection, lifting-size expansion, and rate matching. That is why LDPC belongs together with MCS, TBS and resource allocation, and HARQ.
| Technology | 5G NR |
|---|---|
| Main spec | 3GPP TS 38.212 |
| Main use | Shared-data coding for DL-SCH and UL-SCH |
| Release | Release 18 |
| Base graphs | Base graph 1 and base graph 2 |
| Key sizing values | Kcb = 8448 for BG1, Kcb = 3840 for BG2 |
| Why it matters | LDPC is the main shared-data coding family behind PDSCH and PUSCH, so it directly affects decode robustness, transport efficiency, and retransmission behavior |
Contents
Overview
LDPC is the main shared-data coding family in NR. It is used when the transport path carries larger payloads on the shared channels rather than shorter control or broadcast messages.
- LDPC is used on the main data paths, not on the main control paths.
- It works with code block segmentation when the payload is too large for one block.
- Base graph selection changes the block-size limit and later encoding structure.
- Rate matching adapts the coded output to the scheduled resources.
Quick interpretation
| Role | Main shared-data coding family in NR |
|---|---|
| Main channels | PDSCH and PUSCH |
| Main structure | Transport-block CRC, base-graph selection, code block segmentation, LDPC encoding, rate matching, concatenation |
| Main graph families | Base graph 1 and base graph 2 |
| Main sizing values | Kcb = 8448 for BG1 and Kcb = 3840 for BG2 |
How the LDPC model works
LDPC coding starts from the transport block after CRC attachment. The transmitter then selects the LDPC base graph, segments the payload if needed, encodes each code block, applies rate matching, and concatenates the coded output for transmission.
transport block
-> TB CRC attachment
-> base graph selection
-> code block segmentation
-> code block CRC attachment
-> LDPC encoding
-> rate matching
-> code block concatenation | Step | Purpose | Reading notes |
|---|---|---|
| TB CRC attachment | Add CRC bits to the transport block | Use the CRC-appended size when deciding whether segmentation is needed |
| Base graph selection | Select BG1 or BG2 | The selected base graph changes the maximum code-block size and later lifting structure |
| Segmentation | Split the payload into encoder-sized code blocks | Needed only when the CRC-appended payload exceeds the base-graph limit |
| Code block CRC | Add per-block CRC when multiple code blocks exist | This overhead changes the total coded size |
| LDPC encoding | Encode each code block using the selected base graph and lifting size | This is the core parity-check coding step |
| Rate matching | Fit the encoded output to the transmission length | Read it together with MCS and resource allocation |
Base graphs
NR uses two LDPC base graphs. They are not interchangeable labels. The selected base graph changes the maximum supported code-block size and the detailed lifted matrix structure used for encoding.
| Base graph | Main reading point | Key sizing value |
|---|---|---|
| BG1 | Main graph used when the transport and code-rate context support the larger LDPC block structure | Kcb = 8448 |
| BG2 | Main graph used for the alternative LDPC sizing context with the smaller code-block limit | Kcb = 3840 |
Base-graph selection is read together with the transport size and code-rate context. This is why LDPC analysis belongs with MCS and TBS, not as an isolated coding problem.
Segmentation and lifting
Segmentation is the point where the CRC-appended transport block is split into one or more code blocks. Each code block is then represented through the selected base graph and a lifting size that expands the graph into the actual encoder dimensions.
When segmentation is needed
If the CRC-appended payload is less than or equal to the maximum code-block size for the selected base graph, no segmentation is needed. If it is larger, segmentation creates multiple code blocks and adds code-block CRC overhead.
Lifting size
The base graph is a compact matrix description. The lifting size expands that compact graph into the actual parity-check structure used for encoding. In practical reading, lifting matters because it determines the final block dimensions after base-graph selection and segmentation.
Code block view
A large transport block may therefore turn into several code blocks, each with its own CRC and encoded output. After rate matching, the code-block outputs are concatenated into the transmitted bit stream.
Important formulas
These are the most useful LDPC formulas for reading the shared-data coding chain in practice.
Transport block after CRC
B = A + L A is the original transport-block size in bits. L is the transport-block CRC length.
B is the size after CRC attachment.
Base-graph code-block limits
Kcb = 8448 for BG1
Kcb = 3840 for BG2 Kcb is the maximum LDPC code-block size used to decide whether segmentation is needed.
Segmentation rule
if B ≤ Kcb:
C = 1
Lcb = 0
B' = B
else:
C = ceil(B / (Kcb - Lcb))
Lcb = 24
B' = B + C × Lcb C is the number of code blocks, Lcb is the code-block CRC length, and
B' is the total size after adding code-block CRC overhead.
Target code rate from the MCS table
R = x / 1024 x is the code-rate field used by the active MCS table.
R is the practical code-rate value used for reading the LDPC scheduling point.
Rate-matched output length
E = number of bits selected by rate matching for one code block E depends on the scheduled resources, modulation order, layers, and transport context. That is
why LDPC cannot be separated from the resource-allocation and MCS side of the transmission.
Rate matching
Rate matching follows LDPC encoding. It selects and arranges coded bits so the final bit count matches the transmission opportunity created by the scheduler.
| Area | Why it matters |
|---|---|
| Bit selection | Chooses the part of the encoded sequence that will actually be sent for the current transmission |
| Interleaving | Reorders coded bits to fit the later modulation and mapping process |
| Redundancy version context | Changes which coded bits are selected across retransmissions |
| Transport efficiency | Connects the LDPC-coded blocks to the actual usable transmission length |
This is where LDPC and HARQ meet directly. Different redundancy versions and retransmission contexts change which coded bits are sent, even when the underlying transport block is the same.
Channel use
| Channel or transport path | LDPC role | What to read with it |
|---|---|---|
| DL-SCH on PDSCH | Main downlink shared-data coding path | MCS, TBS, DMRS overhead, and HARQ |
| UL-SCH on PUSCH | Main uplink shared-data coding path | MCS, Power Control, transform precoding, and HARQ |
LDPC is not the main path for PDCCH or PBCH. Those belong on the Polar coding side of the NR coding model.
Troubleshooting
Start with the transport size and the selected coding context. Many apparent LDPC problems are actually sizing, MCS, rate-matching, or retransmission-interpretation problems.
| Symptom | What to inspect first |
|---|---|
| Shared-data decode looks weaker than expected | Base-graph selection, segmentation, MCS, rate matching, and overhead assumptions |
| Transport size does not match the coded view | Transport-block CRC, code-block CRC overhead, and the selected TBS |
| Retransmissions keep repeating | HARQ context, redundancy version, and whether the effective code rate is too aggressive |
| Uplink shared-data decode collapses at cell edge | Power Control, MCS pressure, and the LDPC transport size being attempted on PUSCH |
| Wrong coding family assumption | Confirm that the path is shared data and not a control or broadcast path that should be read through Polar coding |
References
- 3GPP TS 38.212 Release 18 - main NR LDPC specification covering base graphs, segmentation, encoding, and rate matching
- 3GPP TS 38.214 Release 18 - physical-layer data procedures including code-rate and transport-size context for LDPC-coded transmissions
- 3GPP TS 38.213 Release 18 - physical-layer control procedures that shape scheduling and retransmission context
FAQ
What is LDPC in 5G NR?
It is the main shared-data coding family used for PDSCH and PUSCH.
Does NR use two LDPC base graphs?
Yes. NR uses base graph 1 and base graph 2, and the selected one changes the code-block sizing path.
Why is segmentation important in LDPC?
Because large payloads must be split into code blocks that fit the selected base-graph limit.
Is LDPC used for control channels like PDCCH?
No. Those are read through Polar coding, not LDPC.
What should I check first when LDPC-related decode behavior looks wrong?
Check transport size, base graph, segmentation, rate matching, MCS, and retransmission context together.