nrPUSCHDescramble

Perform PUSCH descrambling

Description

example

cw = nrPUSCHDescramble(in,nid,rnti) returns a column vector of soft bits resulting from the inverse operation of physical uplink shared channel (PUSCH) scrambling from TS 38.211 Section 6.3.1.1 [1]. in is a vector of scrambled soft bits, nid is the scrambling identity, and rnti is the radio network temporary identifier (RNTI) of the user equipment (UE). The function only performs data descrambling. Because uplink control information (UCI) placeholder bit locations are unknown, the function cannot correctly descramble UCIs if present in the input.

Examples

collapse all

Create a random sequence of binary values corresponding to a codeword containing 3000 bits. Perform PUSCH scrambling initialized with the specified physical layer cell identity number and RNTI.

cw = randi([0 1],3000,1);
ncellid = 42;
rnti = 101;
scrambled = nrPUSCHScramble(cw,ncellid,rnti);

Modulate the scrambled data using 16-QAM modulation. Demodulate the result.

modulation = '16QAM';
sym = nrSymbolModulate(scrambled,modulation);
demod = nrSymbolDemodulate(sym,modulation);

Perform PUSCH descrambling of the demodulated symbols.

descrambled = nrPUSCHDescramble(demod,ncellid,rnti)
descrambled = 3000×1
1010 ×

   -1.6000
   -1.6000
    0.4000
   -0.4000
   -1.6000
    0.4000
    0.4000
   -0.4000
   -0.4000
   -0.4000
      ⋮

Perform hard decision on the soft metric.

rxcw = double(descrambled<0)
rxcw = 3000×1

     1
     1
     0
     1
     1
     0
     0
     1
     1
     1
      ⋮

Compare the result with the original codeword.

isequal(cw,rxcw)
ans = logical
   1

Input Arguments

collapse all

Approximate log-likelihood ratio (LLR) soft bits, specified as a real column vector. Sign represents scrambled hard bit.

Data Types: double | single

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

Output Arguments

collapse all

Descrambled approximate LLR soft bits, returned as a numeric column vector. Sign represents descrambled hard bit.

Data Types: double | single

References

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

Extended Capabilities

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

See Also

Functions

Introduced in R2019a