Deep Dive into 5G NR PBCH Encoding and Rate Matching
The Physical Broadcast Channel (PBCH) is a critical channel in 5G New Radio (NR) that carries the Master Information Block (MIB). The MIB is crucial for initial access as it provides the essential parameters needed for the User Equipment (UE) to acquire system synchronization and retrieve remaining system parameters.
In this article, we'll walk through the mathematical formulation and signal processing steps required to encode and match the rate of the PBCH.
The PBCH Processing Pipeline
The general processing pipeline for PBCH in 5G NR consists of the following steps:
- CRC Attachment: Append a 24-bit CRC to the payload.
- Polar Coding: Apply Polar coding to the CRC-attached payload.
- Rate Matching: Match the polar coded bits to the resource elements allocated to PBCH.
- Scrambling & Modulation: Scramble the bits with cell-specific sequences and modulate them using QPSK.
+---------------+ +---------------+ +---------------+ +--------------------+
| PBCH Payload | --> | CRC Attachment| --> | Polar Encoder | --> | Rate Matcher |
| (56 bits) | | (24 bits) | --> | (N = 512) | --> | (E = 864 or basic) |
+---------------+ +---------------+ +---------------+ +--------------------+
1. Payload and CRC Attachment
The PBCH payload size is 56 bits including 24 bits of CRC. The generator polynomial for the 24-bit CRC is defined by:
This CRC ensures robust error detection during initial access.
2. Polar Encoding
Unlike LTE which uses tail-biting convolutional codes for broadcast channels, 5G NR adopts Polar Codes for control channels (PBCH and PDCCH). Polar codes are based on channel polarization, transforming identical independent channels into reliable (frozen) and unreliable channels.
For PBCH:
- The input payload size is (including CRC).
- The mother code size is .
- The frozen bits indices are predetermined according to the reliability sequence specified in 3GPP TS 38.212.
// Conceptual representation of Polar freezing in TS 38.212
function constructPolarInput(payload: number[], frozenIndices: Set<number>, N: number): number[] {
const polarInput = new Array(N).fill(0);
let payloadIdx = 0;
for (let i = 0; i < N; i++) {
if (!frozenIndices.has(i)) {
polarInput[i] = payload[payloadIdx++];
}
}
return polarInput;
}3. Rate Matching
Rate matching for polar codes involves three main operations: Sub-block interleaving, Bit selection, and Channel interleaving.
The output sequence of length is selected from the circular buffer. For PBCH, bits (excluding the DMRS).
Summary
The switch from convolutional codes to Polar codes in 5G NR PBCH provides a significant coding gain, especially in low SNR conditions. Understanding this encoding pipeline is key to designing high-performance 5G NR physical layer receivers.