Main Content

nrPDSCH

Generate PDSCH modulation symbols

Description

example

sym = nrPDSCH(cws,mod,nlayers,nid,rnti) returns sym containing physical downlink shared channel (PDSCH) modulation symbols, as defined in TS 38.211 Sections 7.3.1.1–3 [1]. The process consists of scrambling with scrambling identity nid, performing symbol modulation with modulation scheme mod, and layer mapping. cws represents one or two downlink shared channel (DL-SCH) codewords, as described in TS 38.212 Section 7.2.6. nlayers specifies the number of transmission layers. rnti is the radio network temporary identifier (RNTI) of the user equipment (UE).

example

sym = nrPDSCH(carrier,pdsch,cws) returns PDSCH modulation symbols for the specified carrier configuration, carrier, and PDSCH configuration, pdsch. The input cws specifies a downlink shared channel (DL-SCH) codeword.

sym = nrPDSCH(___,'OutputDataType',datatype) specifies the PDSCH symbol data type, in addition to the input arguments in any of the previous syntaxes.

Examples

collapse all

Specify a random sequence of binary values corresponding to a codeword of 8000 bits using 256-QAM modulation. Generate PDSCH modulation symbols for the specified physical layer cell identity number, RNTI, and number of transmission layers.

modulation = '256QAM';
nlayers = 4;
ncellid = 42;
rnti = 6143;
data = randi([0 1],8000,1);
sym = nrPDSCH(data,modulation,nlayers,ncellid,rnti)
sym = 250×4 complex

  -0.2301 + 0.5369i  -0.3835 + 0.9971i   0.3835 + 1.1504i  -0.2301 + 0.9971i
   0.8437 - 0.0767i  -0.9971 + 0.6903i  -0.6903 - 0.6903i   0.6903 - 0.6903i
   0.2301 - 1.1504i  -0.9971 + 0.0767i   0.6903 - 1.1504i   1.1504 + 0.6903i
  -0.3835 - 1.1504i  -0.0767 - 0.0767i  -0.3835 + 0.3835i  -0.3835 - 0.3835i
   0.9971 + 0.5369i  -0.3835 - 0.5369i   0.3835 - 0.6903i  -0.3835 - 0.8437i
  -0.0767 + 1.1504i   0.6903 - 0.8437i  -0.2301 + 0.2301i   0.8437 - 0.0767i
  -0.3835 - 1.1504i  -0.6903 - 0.9971i   0.9971 - 0.3835i  -0.9971 + 0.0767i
  -0.0767 + 0.6903i  -0.0767 + 0.8437i   1.1504 + 0.0767i   0.6903 + 1.1504i
  -0.5369 - 0.9971i  -0.8437 + 0.0767i   0.8437 - 0.3835i  -0.9971 - 1.1504i
   0.2301 - 0.6903i  -0.6903 - 0.5369i  -0.6903 + 1.1504i   0.8437 - 0.2301i
      ⋮

Specify two random sequences of binary values. The first sequence corresponds to a codeword of 6000 bits using 64-QAM modulation. The second sequence corresponds to a codeword of 8000 bits using 256-QAM modulation. Generate PDSCH modulation symbols for the specified physical layer cell identity number and RNTI using a total of 8 transmission layers.

modulation = {'64QAM' '256QAM'};
nlayers = 8;
ncellid = 1;
rnti = 6143;
data = {randi([0 1],6000,1) randi([0 1],8000,1)};
sym = nrPDSCH(data,modulation,nlayers,ncellid,rnti)
sym = 250×8 complex

  -0.4629 - 0.7715i   0.4629 - 0.4629i   0.4629 + 0.1543i   0.7715 - 1.0801i   0.3835 - 0.9971i  -0.5369 + 0.6903i   0.6903 - 0.6903i  -0.5369 + 0.0767i
   0.1543 + 0.4629i  -1.0801 + 1.0801i  -0.7715 + 0.7715i  -0.1543 + 0.7715i  -0.2301 + 0.9971i  -1.1504 + 1.1504i  -0.0767 + 1.1504i  -0.6903 + 0.9971i
  -0.1543 + 0.1543i   0.7715 - 1.0801i  -0.4629 + 0.7715i   0.1543 + 1.0801i   0.0767 - 0.8437i   0.0767 - 0.9971i   0.3835 + 0.3835i   1.1504 - 0.9971i
  -0.7715 - 0.4629i  -0.1543 + 0.7715i  -0.7715 - 0.7715i  -0.4629 - 0.1543i  -0.6903 + 0.5369i  -0.8437 - 0.5369i  -0.5369 + 0.0767i  -0.0767 - 1.1504i
   1.0801 - 1.0801i  -1.0801 + 0.7715i   0.1543 - 0.4629i   0.4629 - 0.4629i  -1.1504 + 0.2301i  -0.9971 + 0.9971i  -1.1504 + 0.8437i   0.2301 - 0.2301i
   0.4629 + 0.4629i   0.1543 + 0.1543i  -0.1543 + 0.1543i   0.1543 - 0.4629i   0.6903 + 0.2301i  -0.6903 + 0.6903i   0.3835 + 0.5369i   0.3835 + 0.0767i
  -1.0801 + 0.7715i   0.4629 - 1.0801i   0.4629 + 1.0801i  -0.4629 + 0.4629i  -0.6903 + 0.8437i  -0.3835 - 0.2301i   0.5369 + 0.8437i   0.9971 - 0.9971i
  -1.0801 + 0.7715i  -0.1543 - 0.1543i   0.7715 + 1.0801i  -0.4629 - 0.1543i   0.8437 + 0.5369i  -0.2301 + 0.0767i  -0.6903 - 0.0767i  -0.0767 - 0.6903i
  -0.4629 - 1.0801i  -0.7715 - 0.1543i   0.1543 - 1.0801i  -0.1543 + 0.1543i   0.2301 - 0.3835i   1.1504 + 0.2301i  -1.1504 - 1.1504i  -1.1504 - 1.1504i
   0.7715 + 1.0801i   1.0801 - 0.4629i   1.0801 + 1.0801i  -0.1543 - 1.0801i  -0.0767 + 0.0767i   0.3835 + 0.9971i   0.0767 - 0.6903i   0.5369 - 0.8437i
      ⋮

Create a carrier configuration object with default properties. Specify the physical layer cell identity as 42 and slot number as 10.

carrier = nrCarrierConfig;
carrier.NCellID = 42;
carrier.NSlot = 10;

Create a PDSCH configuration object with a 16-QAM modulation scheme. Set the radio network temporary identifier to 1005, size of the BWP to 25, starting PRB index of the BWP to 10, and PRB set to occupy the whole BWP.

pdsch = nrPDSCHConfig;
pdsch.Modulation = '16QAM';
pdsch.RNTI = 1005;
pdsch.NID = []; % Set NID equal to the NCellID property of carrier
pdsch.NSizeBWP = 25;
pdsch.NStartBWP = 10;
pdsch.PRBSet = 0:pdsch.NSizeBWP-1;

Generate PDSCH indices in subscript form and set the index orientation to bandwidth part.

[ind,info] = nrPDSCHIndices(carrier,pdsch,'IndexStyle','subscript','IndexOrientation','bwp')
ind = 3900x3 uint32 matrix

    1    1    1
    2    1    1
    3    1    1
    4    1    1
    5    1    1
    6    1    1
    7    1    1
    8    1    1
    9    1    1
   10    1    1
      ⋮

info = struct with fields:
                G: 15600
               Gd: 3900
        NREPerPRB: 156
    DMRSSymbolSet: 2
    PTRSSymbolSet: [1x0 double]

Generate PDSCH symbols of data type single.

numDataBits = info.G;
cws = randi([0 1],numDataBits,1);
sym = nrPDSCH(carrier,pdsch,cws,'OutputDataType','single')
sym = 3900x1 single column vector

  -0.9487 + 0.9487i
  -0.9487 - 0.9487i
  -0.3162 - 0.9487i
   0.9487 - 0.3162i
  -0.9487 + 0.3162i
   0.3162 + 0.9487i
   0.3162 + 0.9487i
  -0.3162 + 0.3162i
   0.3162 + 0.3162i
   0.9487 - 0.3162i
      ⋮

Input Arguments

collapse all

DL-SCH codewords, specified as one of these values:

  • Cell array of one or two binary column vectors — Use this value to specify one or two DL-SCH codewords, as described in TS 38.212 Section 7.2.6.

  • Binary column vector — Use this value to specify one DL-SCH codeword.

Data Types: double | single | cell

Modulation scheme, specified as 'QPSK', '16QAM', '64QAM', or '256QAM', a string array, or a cell array of character vectors. This modulation scheme specifies the modulation type of the codewords and the number of bits used per modulation symbol. If cws contains two codewords, the modulation scheme applies to both codewords. Alternatively, you can specify different modulation schemes for each codeword by using a string array or a cell array of character vectors.

Modulation SchemeNumber of Bits Per Symbol
'QPSK'2
'16QAM'4
'64QAM'6
'256QAM'8

Example: To specify different modulation schemes for two codewords, you can use any of these formats: {'QPSK','16QAM'} or ["QPSK","16QAM"].

Data Types: char | string | cell

Number of transmission layers, specified as an integer from 1 to 8. For one codeword, use an integer between 1 to 4. For two codewords, use an integer between 5 to 8.

Data Types: double

Scrambling identity, specified as an integer from 0 to 1023. nid is the physical layer cell identity number (0 to 1007) or higher layer parameter dataScramblingIdentityPDSCH (0 to 1023). For more information, see TS 38.331 Section 6.3.2.

Data Types: double

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

Data Types: double

Data type of the output symbols, specified as 'double' or 'single'.

Data Types: char | string

Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object. This function uses only NCellID property of this nrCarrierConfig object.

Property FieldValuesDescription
NCellID

1 (default), integer from 0 to 1007

Physical layer cell identity

PDSCH configuration parameters, specified as an nrPDSCHConfig object. This function uses only these nrPDSCHConfig object properties.

Property FieldValuesDescription
Modulation

'QPSK' (default), '16QAM', '64QAM', or '256QAM', a string scalar, a string array, or a cell array of character vectors

Modulation scheme(s) of codeword(s)

NumLayers

1 (default), integer from 1 to 8

Number of transmission layers

NID

[] (default), integer from 0 to 1023

Scrambling identity, specified as an integer from 0 to 1023. Use [] value to allow this property to be equal to NCellID of carrier input.

RNTI

1 (default), integer from 0 to 65,535

Radio network temporary identifier of the user equipment

Output Arguments

collapse all

PDSCH modulation symbols, returned as a complex matrix.

Data Types: single | double
Complex Number Support: Yes

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

Introduced in R2018b