Main Content

nrCSIRSIndices

Generate CSI-RS resource element indices

Description

[ind,info] = nrCSIRSIndices(carrier,csirs) returns resource element indices ind for the channel state information reference signal (CSI-RS), as defined in TS 38.211 Section 7.4.1.5.3 [1]. The input carrier specifies carrier configuration parameters for a specific OFDM numerology. The input csirs specifies CSI-RS resource configuration parameters for one or more zero-power (ZP) or non-zero-power (NZP) CSI-RS resources. When configuring both ZP and NZP resources, the returned indices are in the order ZP followed by NZP, irrespective of the resource order specified by csirs. The function also returns the structure info, which contains additional information about the CSI-RS locations.

example

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

Examples

collapse all

Create a carrier configuration object with default properties. This object corresponds to a 10 MHz carrier.

carrier = nrCarrierConfig;

Create a CSI-RS configuration object with default properties.

csirs = nrCSIRSConfig;

Generate CSI-RS symbols of single data type.

[sym,info_sym] = nrCSIRS(carrier,csirs,'OutputDataType','single');

Generate resource element indices for CSI-RS.

[ind,info_ind] = nrCSIRSIndices(carrier,csirs);

Create a carrier configuration object, specifying the slot number as 10.

carrier = nrCarrierConfig('NSlot',10);

Create a CSI-RS resource configuration object for two periodic resources. Specify one NZP resource and one ZP resource with row numbers 3 and 5, symbol locations 13 and 9, and subcarrier locations 6 and 4, respectively. For both resources, set the periodicity to 5, offset to 1, and density to 'one'.

csirs = nrCSIRSConfig;
csirs.CSIRSType = {'nzp','zp'};
csirs.CSIRSPeriod = {[5 1],[5 1]};
csirs.RowNumber = [3 5];
csirs.Density = {'one','one'};
csirs.SymbolLocations = {13,9};
csirs.SubcarrierLocations = {6,4};

Generate CSI-RS symbols and indices for the specified carrier, CSI-RS resource configuration, and output formatting name-value pair arguments. Verify the format of the symbols and indices.

[sym,info_sym] = nrCSIRS(carrier,csirs, ...
                'OutputResourceFormat','cell')
sym=1×2 cell array
    {0x1 double}    {0x1 double}

info_sym = struct with fields:
      ResourceOrder: [2 1]
           KBarLBar: {{1x1 cell}  {1x2 cell}}
    CDMGroupIndices: {[0]  [0 1]}
             KPrime: {[0 1]  [0 1]}
             LPrime: {[0]  [0]}

[ind,info_ind] = nrCSIRSIndices(carrier,csirs, ...
                'IndexStyle','subscript','OutputResourceFormat','cell')
ind=1×2 cell array
    {0x3 uint32}    {0x3 uint32}

info_ind = struct with fields:
      ResourceOrder: [2 1]
           KBarLBar: {{1x1 cell}  {1x2 cell}}
    CDMGroupIndices: {[0]  [0 1]}
             KPrime: {[0 1]  [0 1]}
             LPrime: {[0]  [0]}

Verify that the generated outputs are in the order of ZP-CSI-RS resources followed by NZP-CSI-RS resources in terms of the specified csirs.CSIRSType indices.

info_sym.ResourceOrder
ans = 1×2

     2     1

info_ind.ResourceOrder
ans = 1×2

     2     1

Create a carrier configuration object with default properties.

carrier = nrCarrierConfig;

Create a CSI-RS resource configuration object with CSI-RS parameters set for tracking. Specify four periodic NZP-CSI-RS resources in two consecutive slots. Specify for each slot to contain two periodic NZP-CSI-RS resources with periodicity set to 20. Set the offset for the first two resources to 0. Set the offset for the next two resources to 1. Set the row number to 1 and density to 'three' for all resources.

csirs = nrCSIRSConfig;
csirs.CSIRSType = {'nzp','nzp','nzp','nzp'};
csirs.CSIRSPeriod = {[20 0],[20 0],[20 1],[20 1]};
csirs.RowNumber = [1 1 1 1];
csirs.Density = {'three','three','three','three'};
csirs.SymbolLocations = {6,10,6,10};
csirs.SubcarrierLocations = {0,0,0,0};

Generate CSI-RS symbols and indices for the default slot number of the carrier configuration object (slot number 0).

ind0 = nrCSIRSIndices(carrier,csirs);
sym0 = nrCSIRS(carrier,csirs);

Map the symbols to a carrier grid of one slot duration.

gridSize = [12*carrier.NSizeGrid carrier.SymbolsPerSlot max(csirs.NumCSIRSPorts)];
slotgrid0 = complex(zeros(gridSize));
slotgrid0(ind0) = sym0;

Change the absolute slot number in the carrier configuration from 0 to 1.

carrier.NSlot = 1; 

Generate CSI-RS symbols and indices for slot number 1.

ind1 = nrCSIRSIndices(carrier,csirs);
sym1 = nrCSIRS(carrier,csirs);

Map the symbols to another carrier grid of one slot duration.

slotgrid1 = complex(zeros(gridSize));
slotgrid1(ind1) = sym1;

Concatenate the two slots to form the final grid.

grid = [slotgrid0 slotgrid1];

Plot the grid.

imagesc(abs(grid(:,:,1)));
axis xy;
title('CSI-RS as Tracking Reference Signal');
xlabel('OFDM Symbols');
ylabel('Subcarriers');

Figure contains an axes object. The axes object with title CSI-RS as Tracking Reference Signal, xlabel OFDM Symbols, ylabel Subcarriers contains an object of type image.

Input Arguments

collapse all

Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object.

CSI-RS resource configuration parameters, specified as an nrCSIRSConfig object.

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 indexing style and indexing base 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

Output format of CSI-RS resource element indices, specified as the comma-separated pair consisting of 'OutputResourceFormat' and one of these values:

  • 'concatenated' — The output ind is a single column vector containing all CSI-RS resource element indices concatenated.

  • 'cell' — The output ind is a cell array where each cell corresponds to a single CSI-RS resource.

Data Types: char | string

Output Arguments

collapse all

CSI-RS resource element indices, returned as one of these values:

  • Column vector — The function returns this type of value when 'OutputResourceFormat' is set to 'concatenated' and 'IndexStyle' is set to 'index'.

  • M-by-3 matrix — The function returns this type of value when 'OutputResourceFormat' is set to 'concatenated' and '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.

  • Cell array — The function returns this type of value when 'OutputResourceFormat' is set to 'cell'. If 'IndexStyle' is set to 'index', each cell is a column vector. If 'IndexStyle' is set to 'subscript', each cell is an M-by-3 matrix.

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

Data Types: uint32

CSI-RS locations information, returned as a structure containing these fields:

FieldsDescription
ResourceOrder

Order of CSI-RS resources in terms of CSIRSType indices. CSIRSType is a property of the input csirs configuration object, specifying all CSI-RS resources for which the function generates the output.

KBarLBar

Frequency-domain and time-domain locations of the lowest resource elements corresponding to all code division multiplexing (CDM) groups

CDMGroupIndices

CDM group indices

KPrime

Frequency-domain indexing within a CDM group

LPrime

Time-domain indexing within a CDM group

Each field, apart from ResourceOrder, returns the information in the resource order specified by the CSIRSType property of the input csirs configuration object. These fields represent the frequency-domain and time-domain locations of the CSI-RS within a slot for each resource, as defined in TS 38.211 Table 7.4.1.5.3-1.

References

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

Extended Capabilities

Version History

Introduced in R2019b

expand all