Amarisoft

NR SA SRS : Codebook

 

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.  This tutorial is mainly for SRS configuraton in default configuration (gnb-sa.cfg) with usage=codebook. For SRS with usage = antenna switching, 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-auto-condebook.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 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 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 resource_type and period parameter.

NR SA SRS ReferenceConfig Config 03

 

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 */

          c_srs: 13,

          b_srs: 1,

          b_hop: 0,

        }

      ],

      srs_resource_set: [

        {

          srs_resource_id_list: [ 0 ],

          slot_offset: 7,

          usage: "codebook",

        },

      ],

    },

#endif

#if USE_SRS

    srs: {

      resource_auto: {

        codebook: {

          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.

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 ReferenceConfig Log 01

By the same logic, I would check scs-SpecificCarrierList and initialUplink BWP in SIB1 just to make it sure that enough bandwidth has been allocated for the SRS configuration.

NR SA SRS ReferenceConfig Log 02

Now check out how rsr-Config is setup in RRC Setup message. This is not your choise of configuration since you used auto confic, but it is good to know how all of these parameters are configured by the auto config. These IEs are configured based on BWP bandwidth and TDD pattern that you configured in configuration file.

NR SA SRS ReferenceConfig Log 03

 

 

 

Test 1 : Periodic/Codebook SRS

The purpose of this test is to show you how to configured the detailed srs configuration manually. It is a little bit complicated to configure comparing to auto configuration, but the advatage is that you can configure the detailed configuration as you want.

 

Configuration

I have used gnb-sa-srs.cfg which is copied and modified from gnb-sa.cfg.

NR SA SRS Config 01

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

NR BWP Test1 Configuration 02

In gnb-sa-srs.cfg, I made a modification as follows (this is because the commercial UE that I have support TDD only. You may use whatever configuration that your UE support). 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).

NR SA SRS Config 02

In the tutorial, I will try a couple of tests with the modification to the parameters highlighted below. In default configuration, c_srs, b_srs, b_hop is not configured and the call box will use the default configuration if it is not configured in the configuration file.

NOTE : In the configuration in this release (2022-01-17), 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.

Main purpose of this test is to configure c_srs, b_srs, b_hop parameter as you like and check how it works. These three parameters are about SRS bandwidth configuration. Check out this note if you are new to SRS bandwidth configuration details.

NR SA SRS 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

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.

NR SA SRS Log 01

You can confirm the srs resource configuration and periodicity including the slot offset in srs-Config IE of RRC Setup message.

NR SA SRS 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. If you filter out SRS signal only using the [Info] field on WebGUI, you can get all the SRS signals received by gNB. From this, you can check the periodicity of SRS and bandwidth pattern. You can confirm on periodicity from consecutive SFN values and bandwidth pattern from prb field. The prb is printed in the form of prb=S:N, S indicates the starting PRB and N indicates the number of consecutive PRBs for the SRS signal.

NR SA SRS Log 03

 

 

Sub Test 1 : SRS with default configuration

In this test, I set the srs configuration as follows. (NOTE : As of Release 2022-03-10, slot offset in period is not user configurable. It is automatically configured by Callbox software. If you want to know of the slot offset that is used for your test, you need to check Rrc message and check srs configuration there)

Main purpose of this test is to remove c_srs, b_srs, b_hop parameter  and let the callbox apply the default configuration. You can check how the detault SRS bandwidth configuration is configured in this test. These three parameters are about SRS bandwidth configuration. Check out this note if you are new to SRS bandwidth configuration details.

NR SA SRS Test 1 01

Check if SRS is received with the interval, frequency domain position as you configure. If you filter out SRS signal only using the [Info] field on WebGUI, you can get all the SRS signals received by gNB. From this, you can check the periodicity of SRS and bandwidth pattern. You can confirm on periodicity from consecutive SFN values and bandwidth pattern from prb field. The prb is printed in the form of prb=S:N, S indicates the starting PRB and N indicates the number of consecutive PRBs for the SRS signal.

NR SA SRS Test 1 02

 

 

Sub Test 2 : SRS with c_srs 13, b_srs 1, b_hop 0

In this test, I set the srs configuration as follows.

Main purpose of this test is to configure another set of c_srs, b_srs, b_hop parameter as you like and check how it works. These three parameters are about SRS bandwidth configuration. Check out this note if you are new to SRS bandwidth configuration details.

NR SA SRS Test 2 01

Check if SRS is received with the interval, frequency domain position as you configure.  If you filter out SRS signal only using the [Info] field on WebGUI, you can get all the SRS signals received by gNB. From this, you can check the periodicity of SRS and bandwidth pattern. You can confirm on periodicity from consecutive SFN values and bandwidth pattern from prb field. The prb is printed in the form of prb=S:N, S indicates the starting PRB and N indicates the number of consecutive PRBs for the SRS signal.

NR SA SRS Test 2 02

 

 

Sub Test 3 : SRS with c_srs 13, b_srs 0, b_hop 0

In this test, I set the srs configuration as follows.

Main purpose of this test is to configure another set of c_srs, b_srs, b_hop parameter as you like and check how it works. These three parameters are about SRS bandwidth configuration. Check out this note if you are new to SRS bandwidth configuration details.

NR SA SRS Test 3 01

Check if SRS is received with the interval, frequency domain position as you configure.  If you filter out SRS signal only using the [Info] field on WebGUI, you can get all the SRS signals received by gNB. From this, you can check the periodicity of SRS and bandwidth pattern. You can confirm on periodicity from consecutive SFN values and bandwidth pattern from prb field. The prb is printed in the form of prb=S:N, S indicates the starting PRB and N indicates the number of consecutive PRBs for the SRS signal.

NR SA SRS Test 3 02

 

 

 

Test 2 : Aperiodic/Codebook SRS

The purpose of this test is to show how to configure Aperiodic SRS with the usage of codebook and how to verify it from the log. The way how Aperiodic SRS works is that gNB enables SRS request field in DCI 1_1 and UE is supposed to send SRS when it recieves the DCI with SRS Request field is enabled. Exactly when UE is supposed to send SRS (i.e, what is the time gap between DCI and SRS transmission) ?  This timegap (offset) is configured in RRC message.

 

Configuration

I have used gnb-sa-srs-ap.cfg which is copied and modified from gnb-sa.cfg.

NR SA SRS Ap Config 01

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

NR BWP Test1 Configuration 02

In gnb-sa-srs-ap.cfg, I made a modification as follows (this is because the commercial UE that I have support TDD only. You may use whatever configuration that your UE support). 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).

NR SA SRS Config 02

In the tutorial, I will try a couple of tests with the modification to the parameters highlighted below. In default configuration, c_srs, b_srs, b_hop is not configured and the call box will use the default configuration if it is not configured in the configuration file.

NR SA SRS Ap 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

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.

NR SA SRS Ap Log 01

You can confirm the srs resource configuration and periodicity including the slot offset with srs-Config IE in RRC Setup message.  You should note that resourceType is set to aperiodic and slotOffset is set to 4 as set in the configuration file. The slotOffset indicates the timegap between SRS Trigger(DCI 1_1 with srs request field enabled) and SRS transmission.

NR SA SRS Ap 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. You see that srs_request is set to 1 (enabled) in DCI field. Check out the time gap between the DCI 1_1(SRS trigger) and the first SRS after the trigger and see if the timegap matches the offset value in RRC.

NR SA SRS Ap Log 03

 

 

 

Test 3 : Periodic/Non-Codebook SRS

The purpose of this test is to show how to configure non-Codebook based SRS and how to verify it from the test log.

 

Configuration

I have used gnb-sa-srs-noncodebook.cfg which is copied and modified from gnb-sa.cfg.

NR SA SRS NonCodebook SubTest 01 01

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

NR BWP Test1 Configuration 02

In gnb-sa-srs-noncodebook.cfg I made a modification 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).

NR SA SRS NonCodebook SubTest 01 02

In this test, I am using pucch format 0 instead of pucch 1.

NR SA SRS NonCodebook SubTest 01 03

Applying non_codebook configuration is simple. Just use non_codebook parameter instead of codebook parameter.

NR SA SRS NonCodebook SubTest 01 04

To apply the non-condebook SRS, you need to set PUSCH tx_config to "non_codebook" as well.

NR SA SRS NonCodebook SubTest 01 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

Since we changed pucch format in the configuration file, it would be good to check if the changed configuration is properly applied in the log.  Look into RRC Setup message and check if the pucch configuration is changed as you set in the configuration file. I see pucch format 0 is used as I set in the configuration file.

NR SA SRS NonCodebook SubTest 01 Log 01

Now check out srs-Config in RRC Reconfiguration and you should see the srs usage is set to nonCodebook in the srs resourceSet in srs-ResourceSetToAddModList.

NR SA SRS NonCodebook SubTest 01 Log 03

Once the configuration in RRC is properly set and the connection is established, you should be able to see SRS reception. Filter out SRS (and/or CSI) in [Info] field for easy analysis and confirm on SRS reception timing and periodicity with SFN.

NR SA SRS NonCodebook SubTest 01 Log 04

 

 

 

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

                      },

                      resourceType aperiodic: {

                        aperiodicSRS-ResourceTrigger 1,

                        slotOffset 4

                      },

                      usage codebook,

                      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 aperiodic: {

                      },

                      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

 

Interpretation of srs_symbols array

 

NR SA SRS Tips srs symbols 01