5G NR2 min read

Deep Dive into 5G NR PBCH Encoding and Rate Matching

An in-depth exploration of the Physical Broadcast Channel (PBCH) channel coding pipeline in 5G NR, focusing on polar coding, rate matching, and cell search procedures.

難易度:Intermediate
分類: 5G NR

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:

  1. CRC Attachment: Append a 24-bit CRC to the payload.
  2. Polar Coding: Apply Polar coding to the CRC-attached payload.
  3. Rate Matching: Match the polar coded bits to the resource elements allocated to PBCH.
  4. 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:

gCRC24C(D)=D24+D23+D21+D20+D17+D15+D11+D9+D8+D6+D5+D+1g_{\text{CRC24C}}(D) = D^{24} + D^{23} + D^{21} + D^{20} + D^{17} + D^{15} + D^{11} + D^{9} + D^{8} + D^{6} + D^{5} + D + 1

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 NN identical independent channels into reliable (frozen) and unreliable channels.

For PBCH:

  • The input payload size is K=56K = 56 (including CRC).
  • The mother code size is N=512N = 512.
  • 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 EE is selected from the circular buffer. For PBCH, E=864E = 864 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.