# lteSRSIndices

## Syntax

• ``ind = lteSRSIndices(ue,chs)``
example
• ``````[ind,info] = lteSRSIndices(ue,chs)``````
example
• ``[___] = lteSRSIndices(ue,chs,opts)``
example

## Description

example

````ind = lteSRSIndices(ue,chs)` returns a column vector of resource element (RE) indices for the Uplink sounding reference signal (SRS) given structures with the UE-specific settings, and the signal transmission configuration settings. For more information, see SRS Processing and TS 36.213 [1], Section 8.2.```

example

``````[ind,info] = lteSRSIndices(ue,chs)``` also returns an SRS information structure array, `info`.```

example

````[___] = lteSRSIndices(ue,chs,opts)` formats the returned indices using the option strings defined in a cell array, `opts`. This syntax supports output options from prior syntaxes.```

## Examples

collapse all

This example creates SRS indices for 3 MHz bandwidth.

Set the signal transmission configuration, `chs` structure fields.

```chs.NTxAnts = 1; chs.BWConfig = 7; chs.BW = 0; chs.ConfigIdx = 7; chs.TxComb = 0; chs.HoppingBW = 0; chs.FreqPosition = 0; ```

Set `ue` structure fields.

```ue.DuplexMode = 'FDD'; ue.CyclicPrefixUL = 'Normal'; ue.NFrame = 0; ue.NULRB = 15; ue.NSubframe = 0; ```

Generate the Uplink SRS resource element indices.

```srsIndices = lteSRSIndices(ue,chs); srsIndices(1:4) ```
```ans = 2401 2403 2405 2407 ```

### Generate SRS Indices for Two Antennas

Generate the SRS indices for two transmit antenna paths. Display the information structure.

Initialize UE-specific and channel configuration structures (`ue` and `chs`) for 3 MHz bandwidth and two antennas. Generate SRS indices and the information structure (`ind` and `info`).

```ue.DuplexMode = 'FDD'; ue.CyclicPrefixUL = 'Normal'; ue.NFrame = 0; ue.NULRB = 15; ue.NSubframe = 0; chs.NTxAnts = 2; chs.BWConfig = 7; chs.BW = 0; chs.ConfigIdx = 7; chs.TxComb = 0; chs.HoppingBW = 0; chs.FreqPosition = 0; [ind,info] = lteSRSIndices(ue,chs); ```

Since there are two antennas, the SRS indices are output as a two column vector and the `info` output structure contains two elements.

```ind(1:10,:) size(info) ```
```ans = 2401 4921 2403 4923 2405 4925 2407 4927 2409 4929 2411 4931 2413 4933 2415 4935 2417 4937 2419 4939 ans = 1 2 ```

View the contents of the two `info` structure elements.

```info(1) info(2) ```
```ans = UePeriod: 10 UeOffset: 0 PRBSet: [4x1 double] FreqStart: 60 KTxComb: 0 BaseFreq: 60 FreqIdx: 0 HoppingOffset: 0 NSRSTx: 0 Port: 0 ans = UePeriod: 10 UeOffset: 0 PRBSet: [4x1 double] FreqStart: 60 KTxComb: 0 BaseFreq: 60 FreqIdx: 0 HoppingOffset: 0 NSRSTx: 0 Port: 1 ```

### Generate SRS Indices Varying Indexing Style

Generate the SRS indices for two transmit antenna paths. Display the information structure.

Initialize UE-specific and channel configuration structures (`ue` and `chs`) for 3 MHz bandwidth and two antennas. Generate SRS indices and the information structure (`ind` and `info`).

```ue.DuplexMode = 'FDD'; ue.CyclicPrefixUL = 'Normal'; ue.NFrame = 0; ue.NULRB = 15; ue.NSubframe = 0; chs.NTxAnts = 2; chs.BWConfig = 7; chs.BW = 0; chs.ConfigIdx = 7; chs.TxComb = 0; chs.HoppingBW = 0; chs.FreqPosition = 0; [ind,info] = lteSRSIndices(ue,chs,{'sub'}); ```

Using `'sub'` indexing style, the indices are output in `[subcarrier,symbol,antenna]` subscript form. View the midpoint of `ind` and observe the antenna index change.

```size(ind) ind(22:27,:) ```
```ans = 48 3 ans = 103 14 1 105 14 1 107 14 1 61 14 2 63 14 2 65 14 2 ```

Since there are two antennas, the `info` output structure contains two elements. View the contents of the second `info` structure element.

```size(info) info(2) ```
```ans = 1 2 ans = UePeriod: 10 UeOffset: 0 PRBSet: [4x1 double] FreqStart: 60 KTxComb: 0 BaseFreq: 60 FreqIdx: 0 HoppingOffset: 0 NSRSTx: 0 Port: 1 ```

## Input Arguments

collapse all

### `ue` — UE-specific settingsstructure

UE-specific settings, specified as a structure containing the following fields.

### `NULRB` — Number of uplink resource blockspositive integer

Number of uplink resource blocks, specified as a positive integer.

Data Types: `double`

### `NSubframe` — Number of subframes0 (default) | optional | nonnegative integer

Number of subframes, specified as a nonnegative integer.

Data Types: `double`

### `NTxAnts` — Number of transmission antennas1 (default) | optional | 2 | 4

Number of transmission antennas, specified as a 1, 2, or 4.

Data Types: `double`

### `CyclicPrefixUL` — Cyclic prefix length`'Normal'` (default) | optional | `'Extended'`

Cyclic prefix length, specified as a string.

Data Types: `char`

### `NFrame` — Initial frame number0 (default) | optional | nonnegative integer

Initial frame number, returned as a nonnegative integer.

Data Types: `double`

### `DuplexMode` — Duplexing mode`'FDD'` (default) | optional | `'TDD'`

Duplexing mode, specified as a string. This string represents the frame structure of the generated waveform.

Data Types: `char`

### `TDDConfig` — Uplink or downlink configuration0 (default) | optional | 0,...,6

Uplink or downlink configuration, returned as a nonnegative integer from 0 to 6. Only required for `'TDD'` duplex mode.

Data Types: `double`

### `SSC` — Special subframe configuration0 (default) | optional | 0,...,9

Special subframe configuration, returned as a nonnegative integer from 0 to 9. Only required for `'TDD'` duplex mode.

Data Types: `double`

### `CyclicPrefix` — Cyclic prefix length`'Normal'` (default) | optional | `'Extended'`

Cyclic prefix length, returned as a string. Only required for `'TDD'` duplex mode.

Data Types: `char`

Data Types: `struct`

### `chs` — Signal transmission configurationstructure

Signal transmission configuration, specified as a structure containing these fields.

### `NTxAnts` — Number of transmission antennas1 (default) | optional | 2 | 4

Number of transmission antennas, specified as a 1, 2, or 4.

Data Types: `double`

### `BWConfig` — Cell-specific SRS bandwidth configuration7 (default) | optional | 0,...,7

Cell-specific SRS bandwidth configuration, specified as a nonnegative integer from 0 to 7. (CSRS)

Data Types: `double`

### `BW` — UE-specific SRS bandwidth0 (default) | optional | 1 | 2 | 3

UE-specific SRS bandwidth, specified as a nonnegative integer from 0 to 3. (BSRS)

Data Types: `double`

### `ConfigIdx` — Configuration index for UE-specific periodicity7 (default) | optional | 0,...,644

Configuration index for UE-specific periodicity, specified as a nonnegative integer from 0 to 644. This parameter contains the configuration index for UE-specific periodicity (TSRS) and subframe offset (Toffset).

Data Types: `double`

### `TxComb` — Transmission comb0 (default) | optional | 1

Transmission comb, specified as a 0 or 1. This parameter controls SRS positions. SRS is transmitted in six carriers per resource block on odd (1) and even (0) resource indices.

Data Types: `double` | `logical`

### `HoppingBW` — SRS frequency hopping configuration index0 (default) | optional | 1 | 2 | 3

SRS frequency hopping configuration index, specified as a nonnegative integer from 0 to 3. (bhop)

Data Types: `double`

### `FreqPosition` — Frequency-domain position0 (default) | optional | 0,...,23

Frequency-domain position, specified as a nonnegative integer from 0 to 23. (nRRC)

Data Types: `double`

### `CyclicShift` — UE-specific cyclic shift0 (default) | optional | 0,...,7

UE-specific cyclic shift, specified as a nonnegative integer from 0 to 7. This parameter applies only when `NTxAnts` is 4. (${n}_{SRS}^{cs}$)

Data Types: `double`

### `NF4RachPreambles` — Number of RACH preamble frequency resources of format 4 in UpPTS0 (default) | optional | 0,...,6

Number of RACH preamble frequency resources of format 4 in UpPTS, specified as a nonnegative integer from 0 to 6. Only required for `'TDD'` duplex mode.

Data Types: `double`

### `OffsetIdx` — SRS subframe offset0 (default) | optional | 1

SRS subframe offset choice for 2 ms SRS periodicity, specified as 0 or 1. Only required for `'TDD'` duplex mode. This parameter indexes the two SRS subframe offset entries in the row of TS 36.213 [1], Table 8.2-2 for the SRS configuration index specified by the `ConfigIdx` parameter.

Data Types: `double`

### `MaxUpPts` — Option to disable reconfiguration of sounding maximum bandwidth1 (default) | optional | 0

Option to disable reconfiguration of sounding maximum bandwidth, specified as 0 or 1. Only required for `'TDD'` duplex mode. Enables (1) or disables (0) reconfiguration of ${m}_{SRS,0}^{max}$ in UpPTS. See TS 36.331 [2] for information on how the system information element srs-MaxUpPts applies to${m}_{SRS,0}^{max}$ configurability.

Data Types: `double` | `logical`

Data Types: `struct`

### `opts` — Output format options for element resource indices{`'ind'`, `'1based'`} (default) | optional | string | cell array of strings

Output format options for element resource indices, specified as a string or a cell array of strings. You can specify a format for the Indexing style and Index base.

Category Options Description

Indexing style

`'ind' (default)`

The returned indices are in linear index form.

`'sub'`

The returned indices are in `[subcarrier,symbol,port]` subscript row form.

Index base

`'1based' (default)`

Indices returned are one-based.

`'0based'`

Indices returned are zero-based.

Example: `{'sub','0based'}` returns zero-based indices in subscript row form.

## Output Arguments

collapse all

### `ind` — Antenna indicesnumeric matrix

Antenna indices, returned as a numeric matrix. By default, the indices are returned in one-based linear indexing form that can directly index elements of a resource matrix. These indices are ordered according to SRS modulation symbols mapping. The `opts` input offers alternative indexing formats. The indices for each antenna are in the columns of `ind`, with the number of columns determined by the number of transmission antennas configured specified in `chs``.``NTxAnts`.

Data Types: `uint32`

### `info` — Information related to SRSstructure array

Information related to SRS, returned as a structure array with elements corresponding to each transmit antenna and containing these fields.

### `UePeriod` — UE-specific SRS periodicity`2` | `5` | `10` | `20` | `40` | `80` | `160` | `320`

UE-specific SRS periodicity, in ms, returned as a positive integer.

Data Types: `double`

### `UeOffset` — UE-specific SRS offset0,...,319 | integer

UE-specific SRS offset, returned as an integer from 0 to 319.

Data Types: `double`

### `PRBSet` — Physical resource block setvector of integers

Physical resource block set, returned as a vector of integers. `PRBSet` specifies the PRBs occupied by the indices (zero-based).

Data Types: `double`

### `FreqStart` — Frequency-domain starting positionnumeric scalar

Frequency-domain starting position (k0), returned as a numeric scalar. This argument is the zero-based subcarrier index of the lowest SRS subcarrier.

Data Types: `double`

### `KTxComb` — Offset to the frequency-domain starting positionnumeric scalar

Offset to the frequency-domain starting position (kTC), returned as a numeric scalar. This argument is a function of the transmission comb parameter.

Data Types: `double`

### `BaseFreq` — Base frequency-domain starting position numeric scalar

Base (cell-specific) frequency-domain starting position (${\overline{k}}_{0}$), returned as a numeric scalar. This UE-specific SRS is offset as a function of the UE-specific SRS bandwidth value, BSRS. UE-specific SRS configuration cannot result in a frequency-domain starting position (k0) lower than this value, given the cell-specific SRS bandwidth configuration value, CSRS.

Data Types: `double`

### `FreqIdx` — Frequency position indexnumeric vector

Frequency position index, returned as a numeric vector. This argument specifies the frequency position index (nb) for each b in the range 0,...,BSRS.

Data Types: `double`

### `HoppingOffset` — Offset term due to frequency hoppingnumeric vector

Offset term due to frequency hopping, returned as a numeric vector. This argument specifies the offset term due to frequency hopping (Fb), used in the calculation of nb.

Data Types: `double`

### `NSRSTx` — Number of UE-specific SRS transmissionspositive integer

Number of UE-specific SRS transmissions (nSRS), returned as a positive integer.

Data Types: `double`

### `Port` — Antenna port number used for transmissionpositive integer

Antenna port number used for transmission (p), returned as a positive integer.

Data Types: `double`

Data Types: `struct`

collapse all

### SRS Processing

As specified in TS 36.213, Section 8.2, a UE shall transmit the sounding reference symbol (SRS) on per serving cell SRS resources, based on two trigger types:

• trigger type 0 — periodic SRS from higher layer signalling

• trigger type 1 — aperiodic SRS from DCI formats 0/4/1A for FDD or TDD and from DCI formats 2B/2C/2D for TDD.

If type 1 triggered SRS transmission is intended, then:

• `chs``.``ConfigIdx` indexes trigger type 1 UE-specific periodicity TSRS,1 and subframe offset Toffset,1. The valid range of `chs``.``ConfigIdx` (ISRS) is from 0 to 16 for FDD and from 0 to 24 for TDD.

• Frequency hopping is not permitted. Therefore, set `chs``.``HoppingBW` to be greater than or equal to `BW`. (bhop ≥ BSRS).

To control whether to call the `lteSRS` and `lteSRSIndices` functions in a subframe, use `info.IsSRSSubframe`, returned by `lteSRSInfo`.

UE-specific configurations determine how `lteSRS` and `lteSRSIndices` operate. When no SRS is scheduled, calling `lteSRS` or `lteSRSIndices` in a subframe:

• May generate an SRS depending on the cell-specific SRS subframe configuration.

• Returns an empty `seq` or `ind` vector, for a given UE-specific SRS configuration. Also, the `info` structure scalar fields are set to –1, and any undefined vector fields are empty.

For short-base reference sequences, used with SRS transmissions spanning 4 PRBs, the `lteSRS` function does not use Zadoff Chu sequences and it sets `info``.``RootSeq` and `info``.``NZC` to –1.

`lteSRSIndices` returns the UE-specific SRS periodicity, `info``.``UePeriod`, and subframe offset, `info``.``UeOffset`. These parameters are distinct from the cell-specific SRS periodicity and subframe offset that `lteSRSInfo` returns.

If `chs``.``NTxAnts` is not present, `ue``.``NTxAnts` is used. If neither is present, the function assumes one antenna. In `lteSRSIndices`, for SRS transmission on multiple antennas:

• When `chs``.``NTxAnts` is set to 2 or 4, the value of `info``.``Port` matches the position in the structure array (0,...,`NTxAnts` – 1).

• If `chs``.``NTxAnts` is set to 1, `lteSRSIndices` uses `info``.``Port` to indicate the port chosen by SRS transmit antenna selection. `info``.``Port` indicates the selected antenna port, 0 or 1.

### UpPTS

Uplink pilot time slot — the uplink part of the special subframe. This special subframe is only applicable for TDD operation. For more information, see Frame Structure Type 2: TDD.

## References

[1] 3GPP TS 36.213. "Physical layer procedures." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). URL: http://www.3gpp.org.

[2] 3GPP TS 36.331. "Radio resource control (RRC); Protocol specification." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). URL: http://www.3gpp.org.