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
- NR SA SRS : Antenna Switch
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. (