NR SA SRS : Antenna Switch
The purpose of this tutorial is to show you how to test SRS in NR SA. In this tutorial, it is assumed that you are faimiliar with basic operations of Amari Callbox operation. So in this tutorial, I will explain only about the configuration and analyzing the test result in the WebGUI log. For SRS with usage = codebook, refer to this tutorial.
SRS is a kind of reference signal for Uplink (i.e, transmitted by UE) so that gNB can perform channel quality estimation for uplink. gNB can perform UL channel estimation from PUSCH DMRS, but PUSCH DMRS is transmitted only when PUSCH is scheduled and only with the bandwidth in which PUSCH is scheduled. On the contrary, SRS can be transmitted independantly of PUSCH scheduling and PUSCH bandwidth(number of PUSCH RB).
In short, the role of SRS is similar to CSI RS. CSI-RS is a reference signal for downlink channel quality estimation independent of PDSCH DMRS and SRS is a reference signal for uplink channel quality estimation independent of PUSCH DMRS
SRS plays more important role in NR because TDD is dominant mode of deployment. In TDD, gNB can utilize the channel estimation result from SRS not only for UL scheduling but also for DL scheduling as well based on channel reciprocity in TDD.
Table of Contents
Introduction
Sounding Reference Signal (SRS) is a fundamental uplink signal in 5G New Radio (NR) Standalone (SA) systems, playing a critical role in enabling efficient and accurate uplink channel quality estimation. Unlike conventional reference signals embedded within scheduled uplink transmissions such as PUSCH DMRS (Demodulation Reference Signal), SRS is uniquely designed to be transmitted independently of uplink data scheduling, providing the gNB (Next Generation NodeB) with a flexible and comprehensive mechanism for assessing uplink channel conditions across the entire system bandwidth. This independence allows for more granular and frequent channel state information, which is particularly advantageous in Time Division Duplex (TDD) deployments where channel reciprocity can be leveraged—meaning the channel characteristics estimated from the uplink can also assist in optimizing downlink transmissions. Architecturally, SRS is configured at the gNB and dynamically scheduled to the User Equipment (UE), with parameters such as frequency, bandwidth, periodicity, and usage type tailored to meet specific deployment and optimization requirements. Its significance is amplified in NR due to the prevalence of TDD, higher frequency bands, and the need for advanced beamforming and massive MIMO operations, where precise uplink channel knowledge directly influences overall system throughput and reliability. Effective configuration and testing of SRS, especially using commercial solutions like the Amari Callbox, are essential for validating NR SA deployments, optimizing radio performance, and ensuring robust support for demanding applications in the 5G ecosystem.
-
Context of the Technology
- 5G NR introduces advanced reference signal structures to optimize both uplink and downlink channel estimation, with SRS providing a dedicated mechanism for uplink channel sounding.
- SRS operates independently from user data and control channel transmissions, enabling the network to capture accurate and wideband channel state information across multiple frequency resources.
- Its flexible configuration allows adaptation to diverse deployment scenarios, including dense urban cells, high-mobility users, and massive MIMO arrays.
-
Relevance and Importance of the Tutorial Topic
- Testing and validating SRS functionality is vital for network performance tuning, especially in NR SA environments where uplink reliability and efficiency are paramount.
- Understanding SRS configuration and analysis in commercial test equipment such as the Amari Callbox empowers engineers to ensure compliance with 3GPP specifications and optimize real-world deployments.
- Accurate SRS operation enhances link adaptation, beam management, and overall spectral efficiency in the 5G network.
-
Learning Outcomes
- Gain practical experience in configuring SRS parameters within a controlled NR SA test environment.
- Acquire skills to interpret SRS-related logs and measurement results in the WebGUI interface of the Amari Callbox.
- Develop the ability to analyze uplink channel quality and make informed decisions on network optimization and troubleshooting.
-
Prerequisite Knowledge and Skills
- Familiarity with basic 5G NR concepts, including the NR air interface, reference signal types, and TDD operation.
- Experience with Amari Callbox basic operations, including device setup, session configuration, and log analysis.
- Understanding of uplink and downlink signal processing fundamentals and general RF measurement principles.
Summary of the Tutorial
This tutorial provides detailed methodologies and procedures for testing SRS (Sounding Reference Signal) configuration and antenna switching in a 5G NR Standalone (SA) environment using Amarisoft gNB and UEsim. The tests focus on both manual and automatic SRS resource configuration, analysis of received SRS signals, and verification of configuration via log analysis. The procedures are structured as follows:
- Test Setup:
- Low layer testing setup with Amarisoft gNB and UE, using the provided SIM card.
- For configuration changes, refer to the Configuration Guide.
- Key Configuration Parameters:
- SRS configuration parameters include srs_symbols, srs_resource (with several sub-parameters), and srs_resource_set (with sub-parameters like srs_resource_set_id, usage, and p0).
- Parameters are set in the gNB configuration file, with options for manual and auto SRS resource allocation.
- Reference Configuration: Auto SRS Configuration
- Starting from release 2022-09-16, Amarisoft’s gnb-sa.cfg includes auto SRS configuration by default.
- Auto SRS configuration simplifies the process: only resource_auto, codebook, resource_type, and period are needed.
- For antenna switching, at least one codebook configuration must be present. antenna_switching resources are also automatically handled.
- With auto configuration, SRS symbols are set automatically based on the TDD pattern.
- Log analysis involves verifying that SRS for both codebook and antenna switching are configured and received as intended (e.g., two SRS in consecutive slots, both received at an 80 slot interval).
- Test 1: 1 SRS Resource (Manual Configuration)
- Configuration is performed in gnb-sa-srs-antenna-switch.cfg with USE_SRS set to 1.
- TDD is enabled (NR_TDD=1) and NR_TDD_CONFIG=2 is selected.
- One SRS resource is defined and referenced by two SRS resource sets: one for codebook usage and one for antenna_switching.
- Slot offset for SRS periodicity is auto-configured by the callbox and is not user adjustable.
- Test Execution: Perform NR SA attach; then analyze logs to confirm the SRS is being received as configured by checking SIB1, RRC Setup, and SRS logs for periodicity and resource allocation.
- Visual verification: Use filters in the log viewer to isolate SRS and check SNR/EPRE plots for the SRS resource.
- Test 2: 2 SRS Resources on Different Slots (Manual Configuration)
- Configuration is performed in gnb-sa-srs-antenna-switch-2rs.cfg with USE_SRS set to 1.
- TDD and NR_TDD_CONFIG=2 are set as in Test 1.
- Four SRS resources are defined, all with the same periodicity. Slot offsets are automatically assigned by the gNB.
- Two SRS resource sets are defined: one mapping to two SRS resources for codebook usage, and another mapping to the other two for antenna_switching.
- Test Execution: Perform NR SA attach; analyze logs to verify that SRS resources are transmitted on different slots within the same radio frame and that configurations match expectations.
- Visual verification: Confirm via log and graphical tools that SRS are received at the correct slots, and check SNR/EPRE plots.
- Test 3: 2 SRS Resources on the Same Slot (Auto Configuration)
- Configuration is performed in gnb-sa-srs-antenna-switch-auto-2rs.cfg with USE_SRS set to 1 and resource_auto parameter enabled.
- Parameter allow_xTyR is introduced to allow the gNB to determine the number of TX and RX SRS ports based on antenna configuration and UE capability.
- Test Execution: NR SA attach is performed. The gNB checks UE capability (supportedSRS-RxPortSwitch) before applying antenna switching SRS.
- Log analysis confirms that two SRS resources are transmitted in the same slot at different OFDM symbol positions, as determined by the auto configuration.
- Visual verification: Use log and graphical tools to confirm SRS reception, symbol positioning, and SNR/EPRE plots.
- Additional Tips:
- To enable antenna switching on UEsim, channel simulation must be enabled in the UE configuration.
- For recent releases, the SRS antenna port number for antenna switching SRS can be checked from the gNB log.
General Methodology Across Tests:
- Configure the gNB and (optionally) UE as per the test scenario, adjusting SRS and antenna switching parameters as required.
- Initiate NR SA attach procedure with the UE.
- After attachment, use log analysis (text and graphical) to verify that SRS resources are configured, transmitted, and received as specified in each test case.
- Check for correct periodicity, slot allocation, symbol position, and SNR/EPRE for SRS.
- For auto SRS configuration, rely on the gNB to select optimal parameter values based on the current network and UE capabilities.
This structured approach ensures that SRS and antenna switching features are correctly implemented and verifiable in both manual and automated configurations, with clear steps for log-based analysis and troubleshooting.
Test Setup
Test setup for this tutorial is as shown below. This is just for low layer testing, you may not need any complicated IP layer setup.
- SIM Card used in this tutorial is the one delivered with the system as it is.
- If you want to change the configuration, The tutorial Configuration Guide would help

Key Configuration Parameters
Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.
- srs : In this link, you can get the descriptions for all the parameters listed below
- srs_symbols
- srs_resource
- srs_resource_id
- n_ports
- transmission_comb
- cyclic_shift
- n_symb
- repetition_factor
- c_srs
- freq_domain_shift
- b_srs
- b_hop
- group_or_sequence_hopping
- n_id
- resource_type
- period
- srs_resource_set
- srs_resource_set_id
- srs_resource_id_list
- aperiodic_srs_trigger
- slot_offset
- usage
- p0
- alpha
Reference Configuration : Auto SRS Configuration
Configuration
From the release 2022-09-16, the default configuration gnb-sa.cfg itself already configured auto srs, but I copied the gnb-sa.cfg and renamed to gnb-sa-srs-antenna-switch-auto.cfg just because I changed one parameter "#define USE_SRS". (

In the configuration file, you can select any specific tdd pattern with the parameter NR_TDD_CONFIG. To apply TDD configuration, you first need to configure the duplex mode (NR_TDD) to 1 (TDD). And then I set NR_TDD_CONFIG to 2 which is one of default sample configuration provided by Amarisoft sample configuration. (

You can configure srs with automatic resource configuration by using the parameter resource_auto within srs object. You only need to configure codebook and set resource_type and period parameter. In addition, I configured the parameter antenna_switching with resource_type and period. Even if you want to test for antenna_switching, you need to have at least one codebook configuration.

Since we have multiple srs resources in this test, I reduced the resources for the pucch1 resource type a little bit to reservce enough spaces for multiple srs resources.

Following table shows an example of srs configuration. You would notice how simple it get with auto SRS configuration. Also you would notice in AutoSRS that you don't see the parts to configure srs_symbols. srs_symbols is automatically configured based on the details of TDD_CONFIG.
|
Configuration without AutoSRSI |
Configuration with AutoSRS |
| This is the configuration in gnb-sa.cfg before AutoSRS feature is supported | This is the configuration in gnb-sa.cfg after AutoSRS feature is supported |
|
#if USE_SRS srs: { #if NR_TDD #if NR_TDD_CONFIG == 1 || NR_TDD_CONFIG == 2 srs_symbols: [ 0, 0, 0, 0, 0, 0, 0, 2, 0, 0 ], #elif NR_TDD_CONFIG == 3 srs_symbols: [ 0, 0, 0, 0, 0, 0, 2, 0, 0, 0 ], #elif NR_TDD_CONFIG == 4 srs_symbols: [ 0, 0, 0, 4, 0, 0, 0, 0, 0, 0 ], #elif NR_TDD_CONFIG == 10 srs_symbols: [ 0, 0, 0, 2, 0 ], #endif #else srs_symbols: [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ], #endif srs_resource: [ { srs_resource_id: 0, n_ports: N_ANTENNA_UL, resource_type: "periodic", period: 80, /* in slots */ } ], srs_resource_set: [ { srs_resource_set_id: 0, srs_resource_id_list: [ 0 ], usage: "codebook", }, { srs_resource_set_id: 1, srs_resource_id_list: [ 0 ], usage: "antenna_switching", }, ], }, #endif |
#if USE_SRS srs: { resource_auto: { codebook: { resource_type: "periodic", period: 80, /* in slots */ }, antenna_switching: { resource_type: "periodic", period: 80, /* in slots */ } } }, #endif |
Log Analysis
This is just for showing the association between the configuration shown above and IE (Information Elements) in RRC.
First confirm that srs for antenna switching is configured in RRC message. Here you see two srs resources are configured in srs-ResourceSetToAddModList. You see two srs resources : One with usage codebook and another one with usage antennaSwitching as set in the configuration file. Also remember that the codebook srs is mapped to srs-ResourceId 0 and the antenna switching srs is mapped to srs-ResourceId 1.

Now let's look into the details of the physical resources of srs signal. First you see two srs resources are configured in srs-ResourceToAddModList with srs-ResourceId 0 and 1 repectively. Comparing the two resources, you would notice everything is same except periodicityAndOffset-p. It means the exactly same srs at positioned at the same OFDM symbol on two different slots (slot 7 and 8 respectively).

Once RRC reconfiguration is set as you configured, If you filter out SRS signal on the log viewer, you will see a sequence SRS signal and two SRS in consecutive slot(slot 7 and 8) are being received in 80 slot interval.

Test 1 : 1 SRS Resource
This test is show you how to configure srs manually. In this test configuration, one srs resource set is using only one srs resources.
Configuration
I have used gnb-sa-srs-antenna-switch.cfg

I am using the default mme, ims config as shown below.

In gnb-sa-srs-antenna-switch.cfg, it is configured as follows. Note that I set USE_SRS to 1 to enable SRS configuration. In the configuration file, you can select any specific tdd pattern with the parameter NR_TDD_CONFIG. To apply TDD configuration, you first need to configure the duplex mode (NR_TDD) to 1 (TDD). And then I set NR_TDD_CONFIG to 2 which is one of default sample configuration provided by Amarisoft sample
configuration. (


In this configuration, there is only one srs resource is configured in srs_resource array and there are two srs resource sets are configured in srs_resource_set array. One is for "codebook" and another one is for "antenna_switching". Both elements of the srs_resource_set uses the same and only one srs resource.

Perform the Test
Testing process is simple. You only have to do NR SA attach (See NR SA Attach tutorial if you are not familiar with the process). The important part is to check the log and verify if you get the SRS as configured.
Log Analysis
First check RRC log and see if the configuration is done as you intended. In this tutorial, I am checking SIB1 for the channel bandwidth and BWP and RrcSetup for SRS configuration.
This is not mandated to check but I would check scs-SpecificCarrierList and initialDownlink BWP in SIB1 just to make it sure that enough bandwidth has been allocated for the SRS configuration.

You can confirm the srs configuration (srs-Config) in RRC setup. Only one srs resources are configured in srs-ResourceToAddModList and the same srs resource are used in two srs resource sets configured in srs-ResourceSetToAddModList. The usage of one srs resource set is set to codebook and the usage of the other srs resource set is set to antennaSwitching.

Then after UE attached, you can check the SRS received by the call box. It would be easier for analysis if you set filters as shown below. Filter out SRS in [Info] field for easy analysis. Check out a few consecutive SFN (SFN.slot) and see if the period and offsets matches with your configuration. Then check out prb(frequency domain position of srs) and symb(the time domain position of srs resorce) within a frame.

You can check SNR and EPRE for SRS on plot as shown below. You can get the SNR plot by hitting [Analysitics] button and selecting [SNR] tab.

Test 2 : 2 SRS Resource on different slots
This test is to show you how to configure multiple resources in one srs_resourceset for the usage of antennaSwitch, but the two resources in the resource set are allocated in two separate slots when you configure it manually as in this test.
Configuration
I have used gnb-sa-srs-antenna-switch-2rs.cfg which is copied and modified from gnb-sa-srs-antenna-switch.cfg

I am using the default mme, ims config as shown below.

In gnb-sa-srs-antenna-switch-2rs.cfg , it is configured as follows. Note that I set USE_SRS to 1 to enable SRS configuration. In the configuration file, you can select any specific tdd pattern with the parameter NR_TDD_CONFIG. To apply TDD configuration, you first need to configure the duplex mode (NR_TDD) to 1 (TDD). And then I set NR_TDD_CONFIG to 2 which is one of default sample configuration provided by Amarisoft
sample configuration. (

Here you see 4 srs resources are configuration in srs_resource array. Periodicity for all 4 srs resources are set to a same value. (

Here you see two srs resource sets are configured in srs_resource_set array. The first resource set is mapped to two srs resources (id 0 and 1) and the other set is mapped to another two srs resources (id 2 and 3). The usage of the first resource set is configured for "codebook" and the usage of the second resource set is configured for "antenna_switching".

Perform the Test
Testing process is simple. You only have to do NR SA attach (See NR SA Attach tutorial if you are not familiar with the process). The important part is to check the log and verify if you get the SRS as configured.
Log Analysis
First check RRC log and see if the configuration is done as you intended. In this tutorial, I am checking SIB1 for the channel bandwidth and BWP and RrcSetup for SRS configuration.
This is not mandated to check but I would check scs-SpecificCarrierList and initialDownlink BWP in SIB1 just to make it sure that enough bandwidth has been allocated for the SRS configuration.

You can confirm the srs configuration in RRC Setup meassage.
You see 4 srs resources are transmitted in the same radio frame and all different slots as you can confirm with periodicityAndOffset-p IE. The srs resource symbol position is same for all 4 resources. It is set to 1 as confirmed with startPosition IE.


Two srs resource sets are configured in srs-ResourceSetToAddModList. The usage of one srs resource set is set to codebook and the usage of the other srs resource set is set to antennaSwitching.

Then after UE attached, you can check the SRS received by the call box. It would be easier for analysis if you set filters as shown below. Filter out SRS in [Info] field for easy analysis. Check out a few consecutive SFN (SFN.slot) and see if the period and offsets matches with your configuration. Then check out prb(frequency domain position of srs) and symb(the time domain position of srs resorce) within a frame.

You can check SNR and EPRE for SRS on plot as shown below. You can get the SNR plot by hitting [Analysitics] button and selecting [SNR] tab.

Test 3 : 2 SRS Resource on same slot
This test is to show you how to configure multiple resources in one srs_resourceset for the usage of antennaSwitch, but the two resources in the resource set are allocated in same slots in this test. This capability is used by autoconfiguration only as shown in this test.
Configuration
I have used gnb-sa-srs-antenna-switch-auto-2rs.cfg which is copied and modified from gnb-sa.cfg

I am using the default mme, ims config as shown below.

In gnb-sa-srs-antenna-switch-auto-2rs.cfg, it is configured as follows. Note that I set USE_SRS to 1 to enable SRS configuration. In the configuration file, you can select any specific tdd pattern with the parameter NR_TDD_CONFIG. To apply TDD configuration, you first need to configure the duplex mode (NR_TDD) to 1 (TDD). And then I set NR_TDD_CONFIG to 2 which is one of default sample configuration provided
by Amarisoft sample configuration. (

In this test, srs resource is configured automatically by using resource_auto parameter. The parameter to be noticed in this test is allow_xTyR. This is just to enable or disable the number of tx and rx srs port. The specific number is automatically set by gNB software based on antenna configuration and UE capability information.

Perform the Test
Testing process is simple. You only have to do NR SA attach (See NR SA Attach tutorial if you are not familiar with the process). The important part is to check the log and verify if you get the SRS as configured.
Log Analysis
When allow_xTyR parameter is enabled, gNB check UE capability first before it apply Antenna switching SRS. The gNB checks the value of supportedSRS-RxPortSwitch IE in UE capability Information message. So when you run this test with your own DUT, make it sure that the DUT notifies the proper value for this IE in UE capability information.

Two srs resource sets are configured in srs-ResourceSetToAddModList. The usage of one srs resource set is set to codebook and the usage of the other srs resource set is set to antennaSwitching.

Three srs resources are configured in srs-ResourceToAddModList and the same srs resource are used in two srs resource sets configured in srs-ResourceSetToAddModList.

You see two srs resources are transmitted in the same radio frame and same slot at different OFDM symbol position as you can confirm with periodicityAndOffset-p IE. First srs resources is transmitted in symbol 2 and the other one is transmitted at symbol 8 as you can confirm with startPosition IE.

Regarding the verification of SRS reception and position, you can check from the SRS log text as shown in previous test or check it graphically as shown here. You can get this plot by hitting [RB] button.


You can check SNR and EPRE for SRS on plot as shown below. You can get the SNR plot by hitting [Analysitics] button and selecting [SNR] tab.

RRC / NAS Signaling
RrcSetup (SA)
: This is the RrcSetup message sent by gNB to configure NR SA. (
message c1: rrcSetup: {
rrc-TransactionIdentifier 0,
criticalExtensions rrcSetup: {
radioBearerConfig {
...
},
masterCellGroup {
...
},
mac-CellGroupConfig {
...
},
physicalCellGroupConfig {
pdsch-HARQ-ACK-Codebook dynamic
},
spCellConfig {
spCellConfigDedicated {
initialDownlinkBWP {
pdcch-Config setup: {
...
},
pdsch-Config setup: {
...
},
firstActiveDownlinkBWP-Id 0,
uplinkConfig {
initialUplinkBWP {
pucch-Config setup: {
...
},
pusch-Config setup: {
...
},
srs-Config setup: {
srs-ResourceSetToAddModList {
{
srs-ResourceSetId 0,
srs-ResourceIdList {
0,
1
},
resourceType periodic: {
},
usage codebook,
p0 -84,
pathlossReferenceRS ssb-Index: 0
},
{
srs-ResourceSetId 1,
srs-ResourceIdList {
2,
3
},
resourceType periodic: {
},
usage antennaSwitching,
p0 -84,
pathlossReferenceRS ssb-Index: 0
}
},
srs-ResourceToAddModList {
{
srs-ResourceId 0,
nrofSRS-Ports port1,
transmissionComb n2: {
combOffset-n2 0,
cyclicShift-n2 7
},
resourceMapping {
startPosition 1,
nrofSymbols n1,
repetitionFactor n1
},
freqDomainPosition 0,
freqDomainShift 5,
freqHopping {
c-SRS 11,
b-SRS 3,
b-hop 0
},
groupOrSequenceHopping neither,
resourceType periodic: {
periodicityAndOffset-p sl80: 7
},
sequenceId 500
},
{
srs-ResourceId 1,
nrofSRS-Ports port1,
transmissionComb n2: {
combOffset-n2 0,
cyclicShift-n2 0
},
resourceMapping {
startPosition 1,
nrofSymbols n1,
repetitionFactor n1
},
freqDomainPosition 0,
freqDomainShift 5,
freqHopping {
c-SRS 11,
b-SRS 3,
b-hop 0
},
groupOrSequenceHopping neither,
resourceType periodic: {
periodicityAndOffset-p sl80: 17
},
sequenceId 500
},
{
srs-ResourceId 2,
nrofSRS-Ports port1,
transmissionComb n2: {
combOffset-n2 0,
cyclicShift-n2 7
},
resourceMapping {
startPosition 1,
nrofSymbols n1,
repetitionFactor n1
},
freqDomainPosition 0,
freqDomainShift 5,
freqHopping {
c-SRS 11,
b-SRS 3,
b-hop 0
},
groupOrSequenceHopping neither,
resourceType periodic: {
periodicityAndOffset-p sl80: 27
},
sequenceId 500
},
{
srs-ResourceId 3,
nrofSRS-Ports port1,
transmissionComb n2: {
combOffset-n2 0,
cyclicShift-n2 5
},
resourceMapping {
startPosition 1,
nrofSymbols n1,
repetitionFactor n1
},
freqDomainPosition 0,
freqDomainShift 5,
freqHopping {
c-SRS 11,
b-SRS 3,
b-hop 0
},
groupOrSequenceHopping neither,
resourceType periodic: {
periodicityAndOffset-p sl80: 37
},
sequenceId 500
}
}
}
},
firstActiveUplinkBWP-Id 0,
pusch-ServingCellConfig setup: {
}
},
pdcch-ServingCellConfig setup: {
},
pdsch-ServingCellConfig setup: {
nrofHARQ-ProcessesForPDSCH n16,
maxMIMO-Layers 2
},
csi-MeasConfig setup: {
...
},
tag-Id 0
}
Tips
Enabling Antenna Switching on UEsim
If you are using Amarisoft UEsim as a DUT, you would see srs-antenna switching not suppored in UE capability information message. In order to let UEsim support antenna switching and notify the capability on UEsim, you need to enable channel sim in ue configuration.
Here goes an example configuration : ue-nr-sa-srs-ant-switch-1t2r and folllowing screenshot shows the UE capability Information from UEsim.

Here goes an example configuration : ue-nr-sa-srs-ant-switch-1t4r and folllowing screenshot shows the UE capability Information from UEsim.

Verifying SRS antenna port number
If you use a later release (e.g, 2024-01-17 or later), you can check the SRS antenna port number from gNB log. (
