Main Content

nrSRSIndices

Generate uplink SRS resource element indices

Description

example

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

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 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 the indexing style and indexing base of the output.

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

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

Introduced in R2020a