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
- NR SA SRS : Codebook
- Test Setup
- Key Configuration Parameters
- Reference Configuration : Auto SRS Configuration
- Test 1 : Periodic/Codebook SRS
- Configuration
- Perform the Test
- Log Analysis
- Sub Test 1 : SRS with default configuration
- Sub Test 2 : SRS with c_srs 13, b_srs 1, b_hop 0
- Sub Test 3 : SRS with c_srs 13, b_srs 0, b_hop 0
- Test 2 : Aperiodic/Codebook SRS
- Test 3 : Periodic/Non-Codebook SRS
- RRC / NAS Signaling
- Tips
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-auto-condebook.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 resource_type and period parameter.
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.
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.
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.
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.
I am using the default mme, ims config as shown below.
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. (
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.
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.
You can confirm the srs resource configuration and periodicity including the slot offset in srs-Config IE of RRC Setup message.
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.
Sub Test 1 : SRS with default configuration
In this test, I set the srs configuration as follows. (
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.
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.
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.
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.
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.
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.
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.
I am using the default mme, ims config as shown below.
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. (
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.
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.
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.
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.
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.
I am using the default mme, ims config as shown below.
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. (
In this test, I am using pucch format 0 instead of pucch 1.
Applying non_codebook configuration is simple. Just use non_codebook parameter instead of codebook parameter.
To apply the non-condebook SRS, you need to set PUSCH tx_config to "non_codebook" as well.
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
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.
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.
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.
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
},
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