5G Protocol Stack
Understanding the 5G Protocol Stack
The protocol stack is the software architecture that transforms IP packets into over-the-air OFDM symbols and back. Each layer adds specific processing: SDAP maps QoS flows, PDCP encrypts and compresses headers, RLC segments for the radio link, MAC schedules and multiplexes, and PHY modulates and transmits. The stack runs on both the UE and gNB, with peer-to-peer communication at each layer.
The biggest architectural change from LTE is the addition of the SDAP layer for per-flow QoS management and the introduction of the RRC_INACTIVE state for IoT power saving. At PHY, LDPC codes replace turbo codes for data, polar codes replace tail-biting convolutional codes for control, and flexible numerology (15-240 kHz SCS) replaces the fixed 15 kHz of LTE.
PDCP: Ciphering, integrity, ROHC, reordering, DC split
RLC: Segmentation, ARQ (AM), reordering (UM/AM)
MAC: Scheduling, HARQ (16 processes), MUX, BSR, PHR
PHY: LDPC/Polar, OFDM, MIMO, beamforming
RRC: Connection, mobility, measurements, SIB
Data flow (DL):
IP → SDAP (add QFI) → PDCP (encrypt, compress) →
RLC (segment) → MAC (schedule, HARQ) →
PHY (encode, modulate, OFDM, beam) → antenna
5G NR vs. LTE Protocol Differences
| Layer | LTE | 5G NR |
|---|---|---|
| QoS mapping | None (per-bearer QoS) | SDAP (per-flow QoS) |
| Data FEC | Turbo codes | LDPC |
| Control FEC | TBCC | Polar (CA-SCL) |
| SCS | 15 kHz fixed | 15/30/60/120/240 kHz |
| HARQ processes | 8 (FDD), 15 (TDD) | 16 |
| RRC states | IDLE, CONNECTED | IDLE, INACTIVE, CONNECTED |
Frequently Asked Questions
What does each layer do?
PHY: modulation, coding, OFDM, MIMO. MAC: scheduling, HARQ, multiplexing. RLC: segmentation, ARQ. PDCP: encryption, header compression. SDAP: QoS flow mapping. RRC: connection, mobility, measurements.
What changed from LTE?
SDAP layer added for per-flow QoS. LDPC replaces turbo codes. Polar replaces TBCC for control. Flexible SCS (15-240 kHz). RRC_INACTIVE state. Configured grants for URLLC. No RLC concatenation.
How does SDAP enable per-flow QoS?
Maps QoS flows (identified by QFI) to data radio bearers. Multiple flows can share a DRB. Adds 1-byte QFI header. Enables fine-grained QoS without creating separate bearers per flow (LTE scalability problem).