Main Content

nrSRSIndices

Generate uplink SRS resource element indices

Since R2020a

Description

[ind,info] = nrSRSIndices(carrier,srs) returns resource element indices ind for the uplink sounding reference signal (SRS), as defined in TS 38.211 section 6.4.1.4.3 [1]. The input carrier specifies carrier configuration parameters for a specific OFDM numerology. The input srs specifies SRS configuration parameters.

example

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

example

Examples

collapse all

Configure the carrier with default configuration parameters.

carrier = nrCarrierConfig;

Configure a two-port SRS transmission of 4 OFDM symbols.

srs = nrSRSConfig;
srs.NumSRSPorts = 2;
srs.NumSRSSymbols = 4;

Set the time-domain starting position of the SRS to 8 and the bandwidth configuration index to 5.

srs.SymbolStart = 8;
srs.CSRS = 5; 

Generate SRS resource element indices for the specified carrier and SRS configuration parameters.

ind = nrSRSIndices(carrier,srs,'IndexStyle','subscript');

Verify that the index matrix has three columns corresponding to the [subcarrier, symbol, antenna] subscripts.

size(ind)
ans = 1×2

   960     3

Configure the SRS and the carrier with default configuration parameters.

carrier = nrCarrierConfig;
srs = nrSRSConfig;

Generate SRS symbols and indices using the specified carrier and SRS configuration parameters.

srsSym = nrSRS(carrier,srs);
srsInd = nrSRSIndices(carrier,srs);

Create a carrier grid corresponding to the number of subcarriers, OFDM symbols, and number of antenna ports specified in the configuration objects.

K = carrier.NSizeGrid*12;       % Number of subcarriers
L = carrier.SymbolsPerSlot;     % Number of OFDM symbols per slot
P = srs.NumSRSPorts;  % Number of antenna ports
gridSize = [K L P];

Initialize the carrier grid for one slot with all zeros.

slotGrid = complex(zeros(gridSize));

Map the SRS symbols to the carrier grid using the indices.

slotGrid(srsInd) = srsSym;

Input Arguments

collapse all

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

SRS configuration parameters, specified as an nrSRSConfig 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 Arguments

collapse all

SRS resource element indices, returned as one of these values:

  • N-by-P matrix — When 'IndexStyle' is set to 'index' and where P is the number of antenna ports.

  • M-by-3 matrix — 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.

The number of rows depends on the SRS configuration specified by srs. The NumSRSPorts property of srs determines the number of antenna ports. Depending on 'IndexBase', the indices are either 1-based or 0-based.

Data Types: uint32

Information about the SRS index generation, returned as a structure containing these fields:

FieldsValuesDescription
SubcarrierOffsetsrs.NumSRSPorts-by-srs.NumSRSSymbols integer matrixFrequency starting position per antenna port and OFDM symbol (parameter k0 in TS 38.211 Section 6.4.1.4.3)
FreqIndex(srs.BSRS + 1)-by-srs.NumSRSSymbols integer matrixFrequency position index per OFDM symbol (parameter nb in TS 38.211 Section 6.4.1.4.3, where b is an integer from 0 to srs.BSRS)
HoppingOffset(srs.BSRSsrs.BHop)-by-srs.NumSRSSymbols integer matrixHopping offset per OFDM symbol (parameter Fb in TS 38.211 Section 6.4.1.4.3, where b is an integer from srs.BHop + 1 to srs.BSRS)
PRBSet srs.NRBPerTransmission-by-srs.NumSRSSymbols integer matrix

Resource blocks allocated for SRS per OFDM symbol

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