Amarisoft

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

 

 

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.

TestSetup Callbox UE 1sdr 01

 

 

 

Key Configuration Parameters

 

Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.

 

 

 

Reference Configuration  : Auto SRS Configuration

 

NOTE : This feature is supported after 2022-09-16. If you are using the older version or you want to configure the SRS configuration as per your own requirement, refer to various Test configurations shown in this tutorial. If you don't care much of the detailed SRS configuration and you just need some configuration good enough to get SRS signal from UE, I would recommend you to use the auto configuration as in gnb-sa.cfg file. This section is not for testing anything.. this is just to show how the SRS is configured by default for information sharing purpose. The detailed configuration shown in the RRC message varies depending on the number of UL antenna, BWP bandwidth and TDD Pattern you selected in the configuration. The example shown in this section is based on UL SISO and TDD Pattern 2 in gnb-sa.cfg.

 

 

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".  (NOTE :I suggest you to copy and change name for any configuration file if you made even the slightest change (like even a single parameter) from the default configuration.)

NR SA SRS AntSwitch ReferenceConfig Config 01

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. (NOTE : This is just for this sample test. TDD is not mandatory for SRS operation). And then make it sure that you set USE_SRS to 1 to enable srs configuration.

NR SA SRS AntSwitch ReferenceConfig Config 02

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.

NR SA SRS AntSwitch ReferenceConfig Config 03

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.

NR SA SRS AntSwitch ReferenceConfig Config 04

 

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.

NR SA SRS AntSwitch ReferenceConfig Log 01

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

NR SA SRS AntSwitch ReferenceConfig Log 02

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.

NR SA SRS AntSwitch ReferenceConfig Log 03

 

 

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

NR SA SRS AntennaSwitching Config 01

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

NR BWP Test1 Configuration 02

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. (NOTE : This is just for this sample test. TDD is not mandatory for SRS operation). And then make it sure that you set USE_SRS to 1 to enable srs configuration.

NR SA SRS AntennaSwitching Config 02

NOTE : In the configuration in this release (2022-03-08), resource periodicity slot offset is configured automatically by callbox. It is not user configurable.  The slot offset in periodicity is configured differently for each SRS resources depending on the overall cell configuration. You can check up RRC message for the specific slot offset applied for each srs resources. The index of the array with non-zero value indicates the symbols reserved for SRS. Since SRS should be allocated only for UL symbols, you would need to change the position of the non-zero values according to TDD UL/DL config. The number indicates the number of consecutive symbols reserved for SRS.

NR SA SRS AntennaSwitching Config 03

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.

NR SA SRS AntennaSwitching Config 04

 

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

Sample Log

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.

NR SA SRS Log 01

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.

NR SA SRS AntennaSwitching Log 02

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.

NR SA SRS AntennaSwitching Log 03

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.

NR SA SRS AntennaSwitching Log 04

 

 

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.

NOTE :  As of now, we don't allow for user to specify the period only and does not allow to specify the offset and srs startsymbol. So user is not allowed to put the multiple srs resources within one slot in manual configuration.

 

Configuration

I have used gnb-sa-srs-antenna-switch-2rs.cfg which is copied and modified from gnb-sa-srs-antenna-switch.cfg

NR SA SRS AntennaSwitching Test2 Config 01

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

NR BWP Test1 Configuration 02

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. (NOTE : This is just for this sample test. TDD is not mandatory for SRS operation). And then make it sure that you set USE_SRS to 1 to enable srs configuration.

NR SA SRS AntennaSwitching Config 02

NOTE : In the configuration in this release (2022-03-08), resource periodicity slot offset is configured automatically by callbox. It is not user configurable.  The slot offset in periodicity is configured differently for each SRS resources depending on the overall cell configuration. You can check up RRC message for the specific slot offset applied for each srs resources.

Here you see 4 srs resources are configuration in srs_resource array. Periodicity for all 4 srs resources are set to a same value. (NOTE : here you see only period and slotoffset is not configured. The slot offset of srs resource is not configurable in Amarisoft gNB. It is automatically configured by gNB based on various other factors).

NR SA SRS AntennaSwitching Test2 Config 04

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

NR SA SRS AntennaSwitching Test2 Config 05

 

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

Sample Log

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.

NR SA SRS Log 01

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.

NR SA SRS AntennaSwitching Test2 Log 02

NR SA SRS AntennaSwitching Test2 Log 03

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.

NR SA SRS AntennaSwitching Test2 Log 04

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.

NR SA SRS AntennaSwitching Test2 Log 05

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.

NR SA SRS AntennaSwitching Test2 Log 06

 

 

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

NR SA SRS AntennaSwitching Test3 Config 01

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

NR BWP Test1 Configuration 02

NOTE : If you want to use Amarisoft UEsim as a DUT for this test, you may use this configuration for UEsim.

 

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. (NOTE : This is just for this sample test. TDD is not mandatory for SRS operation). And then make it sure that you set USE_SRS to 1 to enable srs configuration.

NR SA SRS AntennaSwitching Test3 Config 02

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.

NR SA SRS AntennaSwitching Test3 Config 03

 

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

Sample Log

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.

NR SA SRS AntennaSwitching Test3 Log 01

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.

NR SA SRS AntennaSwitching Test3 Log 02

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

NR SA SRS AntennaSwitching Test3 Log 03

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.

NR SA SRS AntennaSwitching Test3 Log 04

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.

NR SA SRS AntennaSwitching Test3 Log 05

NR SA SRS AntennaSwitching Test3 Log 06

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.

NR SA SRS AntennaSwitching Test3 Log 07

 

 

RRC / NAS Signaling

 

RrcSetup (SA)

: This is the RrcSetup message sent by gNB  to configure NR SA. (NOTE : You would see some IEs that has a specific assigned vale here, but consider it as just an example value. Those values should vary depending on test requirement)

  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.

NR SA SRS AntSwitch Tips UeCap UEsim

 

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

NR SA SRS AntSwitch Tips UeCap UEsim 02

 

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. (NOTE : The SRS antenna port number is printed only for Antenna switching SRS. It is not printed for non-Antenna Swiching SRS because the port number is determined by RRC configuration and does not change).

Sample Log

NR SA SRS AntSwitch Tips PortPrint