5G/NR - Pseudo-Random Sequence

 

 

 

Pseudo Random Sequence

The Pseudo Random Sequence generation algorithm in NR is same as the one in LTE , as the equations in the next section show. The usage of the sequence is also almost same as in LTE. Only minor difference would be the value initialization part.... overall you may think there is almost no difference from LTE.

Sequence Generation

Two things have to be settled before a scrambling sequence exists at all. The first is the generator, which produces the bits. The second is the starting state, which decides where in the sequence a particular channel begins reading. NR changes only the second of them.

The equations are set out twice, with the NR block above the LTE block, so the two can be compared line by line. Nothing differs between them. The same three expressions appear on both sides, with the same taps and the same modulo 2 addition.

The three pseudo random sequence generator equations for c(n), x1(n+31) and x2(n+31), given once for NR and once for LTE, and identical in both

As shown in the equations above, in both NR and LTE, the sequences are generated using the same polynomial functions:

  • The scrambling sequence c(n) is created by the sum of x1(n + Nc) and x2(n + Nc), modulo 2.
  • The first long-term sequence x1(n+31) is updated using the sum of x1(n+3) and x1(n), modulo 2.
  • The second long-term sequence x2(n+31)  is updated using the sum of x2(n+3), x2(n+2), x2(n+1), and x2(n), modulo 2.

Despite the similarities, there are minor differences in how the sequences are initialized, but overall, they are nearly the same between NR and LTE.

Those three lines describe a Gold sequence. Each of x1 and x2 is an m-sequence from a shift register of 31 stages, and the two use different taps. Adding them modulo 2 is what makes the result a Gold sequence rather than an m-sequence.

The two halves do not play the same role. The x1 register has a fixed initial condition, so it is the same in every case and distinguishes nothing. All of the variation sits in x2, and its initial condition is the value the next section is about.

  • The generator is identical in NR and LTE : the same three equations, with the same taps and the same modulo 2 addition.
  • c(n) is a Gold sequence : it is the modulo 2 sum of two m-sequences of 31 stages, x1 and x2.
  • x1 never varies : its initial condition is fixed, so it separates nothing.
  • x2 carries the difference : its initial condition is cinit, and that is the only place NR and LTE part company.

Initialization and Usage

The generator is common to every user of the sequence, so everything that makes one scrambling sequence different from another sits in the starting state. 38.211 gives that state a name, cinit, and defines it once for each channel that needs a sequence.

Following is the case showing how pseudo random sequence is being used for PDSCH and PDCCH channel coding process in NR.

The whole chain appears in one picture. The initial condition of x1 is at the top, and the generator equations are in the middle. The per-channel initialisations sit in the two boxes at the bottom, each with the clause it is taken from.

The pseudo random sequence chain, with the initial condition of x1, the generator equations, Nc equal to 1600, the c_init summation that sets the initial condition of x2, and two per-channel initialisation boxes citing 38.211 clauses

  • The sequence generation begins with initial conditions for two long-term sequences x1 and x2. The initial condition for x1 is given for indices 0 to 30, while the initial condition of x2 is defined by a given formula.
  • The scrambling sequence c(n) is computed from the x1 and x2 sequences, which together form a Gold sequence, using modulo 2 arithmetic, where Nc is a constant set to 1600.
  • For PDSCH scrambling, the initialization sequence cinit is calculated using the RNTI (Radio Network Temporary Identifier), the codeword index q, and the scrambling identity nID. The scrambling identity is either set to a value from 0 to 1023 if configured, or to the physical cell ID NIDcell otherwise.
  • For the initialization in the lower box, cinit is directly set to the physical cell ID NIDcell.

Nc earns a sentence of its own. The sequence is not read from its first bit. The output starts 1600 bits in, which discards the transient while the two registers fill, so the bits actually used no longer depend on how the registers were loaded.

One label in the picture is wrong, and it matters because the clause number is what a reader would look up. The lower box is titled Scrambling (PDCCH) and cites 38.211 clause 7.3.3.1. In 38.211 v19.4.0, clause 7.3.3 is the physical broadcast channel and 7.3.3.1 is its scrambling, so cinit = NIDcell is the PBCH value. PDCCH scrambling is clause 7.3.2.3, and it is not initialised this way.

  • Only cinit changes : the generator is fixed, so the initial condition of x2 is what separates one channel or one device from another.
  • The first 1600 bits are discarded : Nc removes the start-up transient before any output is used.
  • PDSCH mixes three things : the RNTI, the codeword index q, and the scrambling identity nID.
  • nID falls back to the cell ID : it is Data-scrambling-Identity where that is configured, and NIDcell otherwise.
  • Check the clause in the lower box : it cites 7.3.3.1, which is PBCH scrambling rather than PDCCH.

Reference

[1] 38.211 v19.4.0 : NR - Physical channels and modulation. Clause 5.2.1 defines the sequence generator, clause 7.3.1.1 the PDSCH scrambling initialisation, clause 7.3.2.3 the PDCCH scrambling and clause 7.3.3.1 the PBCH scrambling.