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');

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.

Property FieldValuesDescription
SubcarrierSpacing

15 (default), 30, 60, 120, 240

Subcarrier spacing in kHz

CyclicPrefix

'normal' (default), 'extended'

Cyclic prefix length, specified as one of these options.

  • 'normal' corresponds to 14 OFDM symbols in a slot.

  • 'extended' corresponds to 12 OFDM symbols in a slot.

For the numerologies specified in TS 38.211 Section 4.2, extended cyclic prefix length applies only for 60 kHz subcarrier spacing.

NSizeGrid

52 (default), integer from 1 to 275

Number of resource blocks in the carrier resource grid

NStartGrid

0 (default), integer from 0 to 2199

Start of carrier resource grid relative to common resource block 0 (CRB 0)

NSlot

0 (default), nonnegative integer scalar

Slot number. You can set NSlot to a value larger than the number of slots per frame.

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

Property FieldValuesDescription
NSizeBWP

[] (default), integer from 1 to 275

Size of the bandwidth part (BWP) in terms of number of physical resource blocks (PRBs). The default value of [] implies that the value is equal to NSizeGrid of carrier input argument.

NStartBWP

[] (default), integer from 0 to 2473

Starting PRB index of BWP relative to CRB 0. The defualt value of [] implies that the value is equal to NStartGrid of carrier input argument.

ReservedPRB

nrPDSCHReservedConfig (default), cell array of nrPDSCHReservedConfig objects

Reserved PRBs and OFDM symbols pattern in BWP, specified as a cell array of objects of class nrPDSCHReservedConfig.

NumLayers

1 (default), integer from 1 to 8

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

MappingType

'A' (default), 'B'

Mapping type of PDSCH

SymbolAllocation

[0 14] (default), two-element vector of nonnegative integers

OFDM symbols allocated for PDSCH

PRBSet

[0:51] (default), vector of nonnegative integer from 0 to 274

PRBs allocated for PDSCH within the BWP

DMRS

nrPDSCHDMRSConfig object

DMRS configuration object only uses these properties.

  • DMRSConfigurationType

  • DMRSTypeAPosition

  • DMRSLength

  • DMRSAdditionalPosition

  • CustomSymbolSet

  • DMRSPortSet

For more information, see nrPDSCHDMRSConfig.

Name-Value Pair 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.

Resource element indexing form, specified as the comma-separated pair consisting of 'IndexStyle' and 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

Resource element indexing base, specified as the comma-separated pair consisting of 'IndexBase' and one of these values:

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

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

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