Main Content

nrPDSCHDMRSIndices

Generate PDSCH DM-RS indices

Description

example

ind = nrPDSCHDMRSIndices(carrier,pdsch) returns a matrix containing demodulation reference signal (DM-RS) resource element (RE) indices of a physical downlink shared channel (PDSCH), as defined in TS 38.211 Section 7.4.1.1.2 [1]. carrier specifies the carrier configuration parameters for a specific OFDM numerology. pdsch specifies the PDSCH configuration parameters. The returned indices are 1-based using linear indexing form.

ind = nrPDSCHDMRSIndices(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 specifying the slot number as 10.

carrier = nrCarrierConfig('NSlot',10);

Create a physical downlink shared channel (PDSCH) configuration object, pdsch, with physical resource blocks (PRBs) allocated from 0 to 30.

pdsch = nrPDSCHConfig;
pdsch.PRBSet = 0:30;

Create a PDSCH demodulation reference signal (DM-RS) object, dmrs, with specified properties.

dmrs = nrPDSCHDMRSConfig;
dmrs.DMRSConfigurationType = 2;
dmrs.DMRSLength = 2;
dmrs.DMRSAdditionalPosition = 1;
dmrs.DMRSTypeAPosition = 2;
dmrs.DMRSPortSet = 5;
dmrs.NIDNSCID = 10;
dmrs.NSCID = 0;

Assign the PDSCH DM-RS configuration object to DMRS property of PDSCH configuration object.

pdsch.DMRS = dmrs;

Generate PDSCH DM-RS symbols and indices for the specified carrier, PDSCH configuration, and output formatting name-value pair argument.

sym = nrPDSCHDMRS(carrier,pdsch,'OutputDataType','single')
sym = 496x1 single column vector

  -0.7071 - 0.7071i
  -0.7071 + 0.7071i
  -0.7071 + 0.7071i
   0.7071 + 0.7071i
   0.7071 + 0.7071i
  -0.7071 - 0.7071i
   0.7071 - 0.7071i
  -0.7071 + 0.7071i
   0.7071 - 0.7071i
  -0.7071 - 0.7071i
      ⋮

ind = nrPDSCHDMRSIndices(carrier,pdsch,'IndexBase','0based','IndexOrientation','carrier')
ind = 496x1 uint32 column vector

   1252
   1253
   1258
   1259
   1264
   1265
   1270
   1271
   1276
   1277
      ⋮

Display the generated DM-RS symbols on the carrier resource grid.

grid = complex(zeros([carrier.NSizeGrid*12 carrier.SymbolsPerSlot pdsch.NumLayers]));
grid(ind+1) = sym;
imagesc(abs(grid(:,:,1)));
axis xy;
xlabel('OFDM Symbols');
ylabel('Subcarriers');
title('PDSCH DM-RS Resource Elements in the Carrier Resource Grid');

Figure contains an axes object. The axes object with title PDSCH DM-RS Resource Elements in the Carrier Resource Grid contains an object of type image.

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 uses only these properties of the nrPDSCHConfig object.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'IndexStyle','subscript','IndexBase','0based' specifies nondefault resource element index formatting properties.

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 carrier grid.

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

Data Types: char | string

Output Arguments

collapse all

DM-RS RE indices, returned as one of these values:

  • N-by-P matrix — The function returns this type of value when 'IndexStyle' is set to 'index'. The matrix columns correspond to the antenna ports configured.

  • 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

References

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

Extended Capabilities

Introduced in R2020a