Main Content

nrPUSCHScramble

Perform PUSCH scrambling

Since R2019a

Description

example

scrambled = nrPUSCHScramble(cw,nid,rnti) returns a column vector resulting from physical uplink shared channel (PUSCH) scrambling, as defined in TS 38.211 Section 6.3.1.1 [1]. cw is an uplink shared channel (UL-SCH) codeword, as described in TS 38.212 Section 6.2.7 [2]. nid is the scrambling identity, and rnti is the radio network temporary identifier (RNTI) of the user equipment (UE).

scrambled = nrPUSCHScramble(cw,nid,rnti,nrapid) specifies random access preamble index nrapid to initialize the scrambling sequence for msgA on the PUSCH, as defined in Release 16 of TS 38.211 Section 6.3.1.1.

Examples

collapse all

Create a random sequence of binary values corresponding to a codeword containing 5000 bits.

cw = randi([0 1],5000,1)
cw = 5000×1

     1
     1
     0
     1
     1
     0
     0
     1
     1
     1
      ⋮

Perform PUSCH scrambling initialized with the specified physical layer cell identity number and RNTI.

ncellid = 42;
rnti = 101;
scrambled = nrPUSCHScramble(cw,ncellid,rnti)
scrambled = 5000x1 logical array

   0
   1
   1
   1
   1
   0
   1
   0
   0
   1
      ⋮

Input Arguments

collapse all

UL-SCH codeword from TS 38.212 Section 6.2.7, specified as a column vector of integers from –2 to 1.

  • 0 and 1 represent false and true bit values, respectively.

  • –1 and –2 represent x and y placeholders in the uplink control information (UCI), respectively. For more details, see TS 38.212 Sections 5.3.3.1 and 5.3.3.2.

Data Types: double | int8

Scrambling identity, specified as an integer from 0 to 1023. nid is higher layer parameter dataScramblingIdentityPUSCH, ranging from 0 to 1023, if the higher layer parameter is configured. Otherwise, nid is physical layer cell identity number NCellID, ranging from 0 to 1007. For more information, see TS 38.211 Section 6.3.1.1.

Data Types: double

RNTI of the UE, specified as an integer from 0 to 65,535.

Data Types: double

Random access preamble index, specified as one of these values.

  • [] — Use this value to indicate that the scrambling initialization does not consider msgA on PUSCH.

  • Integer from 0 to 63 — Use this value to initialize the scrambling sequence for msgA on PUSCH, as defined in Release 16 of TS 38.211 Section 6.3.1.1.

Data Types: double

Output Arguments

collapse all

Scrambled UL-SCH codeword, returned as a logical column vector.

Data Types: logical

References

[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] 3GPP TS 38.212. “NR; Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2019a

See Also

Functions