Main Content

nrPDSCHIndices

Generate PDSCH resource element indices

Since R2020a

Description

example

[ind,info] = nrPDSCHIndices(carrier,pdsch) returns ind in matrix form, which contains 1-based physical downlink shared channel (PDSCH) resource element (RE) indices, as defined in TS 38.211 Sections 7.3.1.5 and 7.3.1.6 [1]. The number of columns in ind is equal to the number of antenna ports configured. carrier specifies the carrier configuration parameters for a specific OFDM numerology and pdsch specifies the PDSCH configuration. The function also returns the structure info, which contains additional information about the associated physical reference signals, PDSCH bit capacity, and PDSCH symbol capacity.

[ind,info] = nrPDSCHIndices(carrier,pdsch,Name,Value) specifies output formatting options using one or more name-value pair arguments. Unspecified options take default values.

Examples

collapse all

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]
           PRBSet: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24]

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

Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object. This function uses only these properties of the nrCarrierConfig object.

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

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'IndexStyle','subscript','IndexBase','0based' specifies the RE indexing form and base, respectively, of the output.

RE indexing form, specified as one of these values:

  • 'index' — The indices are in linear index form.

  • 'subscript' — The indices are in [subcarrier, symbol, antenna] subscript row form.

Data Types: char | string

RE indexing base, specified as one of these values:

  • '1based' — The index counting starts from 1.

  • '0based' — The index counting starts from 0.

Data Types: char | string

Indexing orientation of resource elements, specified as the comma-separated pair consisting of 'IndexOrientation' and one of these values:

  • 'carrier' — Indices are referenced with respect to the carrier grid.

  • 'bwp' — Indices are referenced with respect to the bandwidth part.

Data Types: char | string

Output Arguments

collapse all

PDSCH resource element indices, returned as one of these values.

  • N-by-P matrix — The function returns this type of value when 'IndexStyle' is set to 'index'.

  • M-by-3 matrix — The function returns this type of value when 'IndexStyle' is set to 'subscript'. The matrix rows correspond to the [subcarrier, symbol, antenna] subscripts based on the number of subcarriers, OFDM symbols, and number of antennas, respectively.

Depending on the value of 'IndexBase', the function returns either 1-based or 0-based indices. Depending on the value of 'IndexOrientation', the function returns either carrier oriented indices or BWP oriented indices.

Data Types: uint32

PDSCH resource information, returned as a structure containing these fields.

FieldsDescription
G

Bit capacity of the PDSCH. This value must be equal to the length of the codeword from the DL-SCH transport channel. Nominally, the value of G is set to the outlen property of nrDLSCH System object™.

Gd

Number of resource elements per layer or port

DMRSSymbolSet

The OFDM symbol locations in a slot containing demodulation reference signal (DM-RS) (0-based)

NREPerPRB

Number of REs per PRB allocated to PDSCH. This value excludes any reserved resources.

PTRSSymbolSet

The OFDM symbol locations in a slot containing phase tracking reference signal (PT-RS) (0-based)

PRBSet (since R2024a)

The PRBs allocated for PDSCH within the BWP

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™.

Version History

Introduced in R2020a

expand all