What is Scrambling in 5G?
In 4G and 5G, bits after channel encoding are scrambled with a pseudo-random sequence of bits. The output of the channel encoder can theoretically be the same as another interfering signal, which may lead to failure of decoding at the receiver end.
This scrambling module adds extra randomness to the encoded bits, which provides coding gain by suppressing interference. Crucially, the pseudo-random sequence is different and unique for each channel and each cell.
Scrambling is applied to all channels in 5G NR โ PBCH, PDSCH, PDCCH, PUSCH, and PUCCH. No channel bypasses this step.
How Scrambling Works: The Pseudo-Random Sequence
A pseudo-random (PN) sequence is generated by doing an XOR of two m-sequences:
- 1st m-sequence: always initialized with 1
- 2nd m-sequence: initialized with a seed value called
C_init
where: pseudo_random = m_seq_1 XOR m_seq_2(C_init)
The key insight: the C_init value is what makes the scrambling sequence unique. Different C_init โ different PN sequence โ different scrambling per channel and per UE.
C_init Values Per Channel
Here are the different seed values (C_init) for each channel in 5G NR:
| Channel | C_init Formula | What Makes It Unique |
|---|---|---|
| PBCH | f(Cell_ID) | Physical Cell ID only โ unique per cell |
| PDSCH | f(n_RNTI, q, n_ID) | Per UE, per codeword, per cell |
| PDCCH | f(n_RNTI, n_ID) | Per UE, per cell |
| PUSCH | f(n_RNTI, n_ID) | Per UE, per cell |
| PUCCH | f(n_RNTI, n_ID) | Per UE, per cell (formats 2, 3, 4) |
Parameters Explained
Cell_ID: The physical cell ID, which is unique for each cell. Since PBCH is broadcast and decoded by all UEs in the cell, its scrambling depends only on cell identity.
n_RNTI (Radio Network Temporary Identifier): There are different RNTIs in 5G. It is a unique identity provided to the UE by the network. If PDSCH contains broadcast information (e.g., SIB1) then n_RNTI will be a message-specific RNTI (SI-RNTI), and if PDSCH contains UE-specific data then it will be unique to that UE.
q โ codeword index: Since there can be at most two codewords in PDSCH, q takes values 0 or 1. This makes the scrambling different per codeword even for the same UE.
n_ID: Either the physical cell ID or a unique configured ID, providing an additional degree of separation.
Why Is PBCH Different?
PBCH is the first broadcast message decoded by a UE. Since it is not unique to individual UEs โ any UE in the cell decodes it โ its scrambling seed only uses the Cell ID. This is why the formula is simply f(Cell_ID).
For all other channels, the seed value is unique to the individual UE (via n_RNTI), the codeword (via q for PDSCH), and the cell (via n_ID). This triple uniqueness is what gives 5G scrambling its interference-suppression power.
A Practical Example โ Why This Matters
Let's make this concrete with a realistic scenario:
Suppose there are two cell towers at different distances from a UE. Both cells are synchronized in time and use the same frequency band. Both cells are transmitting different SIB1 (System Information Block 1) but happen to transmit the same DCI (DCI 1_0 with SI-RNTI) to schedule their respective SIB1.
Without scrambling: The UE might decode SIB1 from the wrong cell, or fail to decode either one โ because the encoded bit patterns are identical and the receiver cannot distinguish them.
With scrambling: Each cell uses a different PN sequence (because their Cell_IDs differ), so even if the information and DCI are the same, the over-the-air bit sequences are completely different. The UE can decode only the cell it is synchronized to.
Summary
Scrambling in 5G is a mandatory operation applied to every physical channel. It uses XOR with a pseudo-random sequence whose seed (C_init) is carefully constructed to be unique per channel type, per UE identity, per codeword, and per cell. This uniqueness is what allows multiple cells and multiple UEs to operate in the same spectrum without systematically decoding each other's signals.