Amarisoft

NR SA Power Control

This tutorial is about how to configure UL power control parameter and verify whether the power control works. The type of power control being configured in this tutorial is for closed loop power control. The way this power control works with Amarisoft gNB is as follows.

NOTE : You may use this feature to let UE to transmit max power.  If you set dpc_snr_target very high (e.g, 40) which can never been met, gNB would always send TPC UP and UE Tx power would eventually reach the p_max power set in SIB.

NOTE : Amarisoft Callbox does not support feature to set a specific UL power value or directly set UL max power or set a specific TPC pattern (e.g, All 0, All1, alternating).

Table of Contents

Introduction

Uplink (UL) power control is a critical aspect of radio access network configuration, ensuring optimal transmission power from user equipment (UE) to the base station (gNB) to maintain link quality, minimize interference, and optimize overall system performance. In 5G and advanced LTE networks, closed loop power control mechanisms dynamically adjust UE transmit power based on real-time measurements and feedback, allowing adaptation to varying radio conditions. Amarisoft gNB provides a flexible software environment for experimenting with and configuring these power control parameters, specifically through the adjustment of SNR (Signal-to-Noise Ratio) targets for Physical Uplink Control Channel (PUCCH) and Physical Uplink Shared Channel (PUSCH). By setting these targets, the gNB can instruct the UE to increase or decrease its transmit power via Transmit Power Control (TPC) commands embedded in Downlink Control Information (DCI) messages. This process is integral to maintaining reliable uplink communication, particularly in dense deployments or challenging RF environments. Understanding and effectively configuring UL power control is essential for network engineers and researchers aiming to fine-tune network performance, troubleshoot uplink issues, or explore the behavior of power control algorithms in a controlled testbed.

Summary of the Tutorial

This tutorial outlines the procedures for testing Uplink Power Control in a 5G NR Standalone (SA) setup using a callbox and UE. The focus is on validating the power control mechanism for PUCCH and PUSCH channels based on SNR thresholds configured at the gNB.

The methodology outlined ensures thorough validation of uplink power control by dynamically adjusting receiver gain and analyzing both real-time and logged data to confirm proper TPC operation based on SNR measurements.

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.

A commercial handset is the UE here and it reaches the gNB over the air. There is no RF cable between the two.

Only the first SDR card carries an antenna, which is RF 1 / sdr 0 on the chassis. One cell on one card is all this test needs.

Because the link is over the air, the uplink level arriving at the gNB depends on where the handset sits. That is why the test moves rx_gain later on instead of moving the UE.

handset connecting over the air to the Callbox with one antenna on sdr 0

Key Configuration Parameters

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

Configuration

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

enb config directory with enb.cfg linked to gnb-sa-powercontrol-cl.cfg

I am using the default mme (mme-ims.cfg), ims config as shown below.

mme config directory with mme.cfg linked to mme-ims.cfg

Following is the configuration in gnb-sa-powercontrol-cl.cfg. dpc_snr_target is the important parameter for UL power control. This parameter is configured separately for PUCCH and PUSCH so that we can set the criteria independently for PUSCH and PUCCH.

If PUCCH SNR estimated by gNB is lower than dpc_snr_target value, gNB send TPC UP via DCI and if the SNR is greater than the value, gNB send TPC down via DCI.

Both blocks sit inside nr_cell_default, so what is set there applies to every cell that inherits from it. Bandwidth and the two antenna counts come from the NR_BANDWIDTH, N_ANTENNA_DL and N_ANTENNA_UL macros defined at the top of the file.

head of the nr_cell_default block that holds the pucch and pusch settings

In the pucch block dpc_snr_target is set to 10, so the gNB drives the PUCCH SNR toward 10 dB. The parameter is optional. Leaving it out turns closed-loop power control off for PUCCH altogether, and the TPC commands it produces travel in DCI 1_0 and 1_1.

p0_nominal is -90. That is the open-loop starting point the UE uses before any TPC command arrives, and the allowed range is -202 to 24. dpc_snr_target then corrects from there.

The pucch0 branch is compiled out by #if 0, so pucch1 is the format actually in use, with n_cs 3, n_occ 3 and frequency hopping on. The n_symb 13 line inside it only applies when the file is built with USE_SRS set and NR_TDD 0.

gNB pucch block with dpc_snr_target 10 and p0_nominal -90

If PUSCH SNR estimated by gNB is lower than dpc_snr_target value, gNB send TPC UP via DCI and if the SNR is greater than the value, gNB send TPC down via DCI.

In the pusch block dpc_snr_target is set to 22, which is well above the 10 used for PUCCH. The two settings are independent, so the data channel can be held at a higher SNR than the control channel. The TPC commands for PUSCH travel in DCI 0_0 and 0_1 rather than the 1_0 and 1_1 used for PUCCH.

p0_nominal_with_grant is -84, the open-loop anchor for a PUSCH transmission that has a grant. msg3_delta_power is 0, so Msg3 goes out at that same level.

The rest of the block is the ordinary PUSCH setup and none of it is changed for this test. Mapping type A over 14 symbols, qam256 for both mcs tables, and a max_rank line that only applies when the file is built with USE_SRS.

gNB pusch block with dpc_snr_target 22 and p0_nominal_with_grant -84

Perform the Test

Check the cell configuration and see if it is configured as intended.

The cell is NR band n78 with 20 MHz of bandwidth and 30 kHz subcarrier spacing on both directions. The DL and UL ARFCN are both 632628, so this is a TDD cell. The SSB sits separately at ARFCN 632544.

The downlink has two antennas and two layers while the uplink has one of each. Power control acts on that single uplink chain.

cell phy output for the n78 20 MHz TDD cell with one uplink antenna

Power on UE and get it attached.

The PRACH line at the top is the random access that begins the attach, with seq=7 ta=4 snr=10.0 dB. After it the UE holds RNTI 4601 and appears as UE_ID 1.

The UL snr column is the one to follow for the rest of this test. It sits between roughly 13 and 20 dB at this point. puc1 is the PUCCH column and reads a dash here, since there is nothing on PUCCH to measure yet.

enb trace after attach with UL snr between 13 and 20 dB

Confirm that the attach is complete and UE get the IP address.

REG reads Y and CN reads 5GC, so the UE is registered on the 5G core rather than falling back to EPC. It has one bearer and the address 192.168.3.2.

That address is what the ping in the next step targets.

mme ue listing the registered UE with address 192.168.3.2

Try continuous ping from callbox to UE.  Power Control is for Uplink channel power. So we need UE to generate UL channel traffic continuously. Ping would be the simplest way to do it.

The ping goes to 192.168.3.2, the address the core handed the UE. Every request is answered with ttl 64. The first reply takes 62.0 ms and the next two settle at 20.0 and 19.1 ms.

Leave it running for the rest of the test. Each echo reply is an uplink transmission, and that is what gives the gNB something to measure and correct.

ping from the Callbox to the UE address answered with ttl 64

Tweak rx_gain until it hits snr threshold that you specified in the configuration. Usually the snr would goes under the threshold temperarily and recover quickly as power control works.

rx_gain 50 sets the receiver gain to 50 dB. This is the knob that moves the measured uplink SNR without touching the UE or the antennas.

At this gain the UL snr climbs from 14.5 up to 27.7 dB across the rows. That is above the 22 dB dpc_snr_target set for PUSCH, so the gNB has reason to start sending TPC down. phr reads 22 to 26 and pl 81 to 87, so the UE still has power in hand.

enb trace at rx_gain 50 with UL snr rising to 27.7 dB

Dropping to rx_gain 40 takes 10 dB out of the receiver. The UL snr now moves between 11.0 and 20.4 dB, straddling the 22 dB target instead of sitting above it.

The UL mcs follows the SNR down, from 8.5 to 3.0 across these rows. pl has risen to 92 to 100 and phr has begun to fall, which is the UE starting to spend its power budget.

enb trace at rx_gain 40 with UL snr between 11.0 and 20.4 dB

At rx_gain 30 the UL snr is back in the 15 to 26 dB range rather than falling another 10 dB with the gain. The UE has raised its transmit power in answer to the TPC commands, and that recovery is the effect this test is looking for.

The cost of it shows in the other columns. pl now reads 98 to 104 and phr has come down to 21 or 22, against 22 to 26 at rx_gain 50. A shrinking headroom is the sign that the UE is spending the power it has.

enb trace at rx_gain 30 with UL snr recovered and phr down to 21

Log Analysis

Sample Log

Check UL power profile and see if there is any points where the power control threshold are met. Hit [Analysis] button and then select [SNR] tab and pick the UE ID that you want to check.

The SNR tab draws four traces for the chosen UE. PUCCH snr and PUSCH snr share the upper plot, while UL data EPRE and UL control EPRE share the lower one.

PUSCH snr runs near 20 dB and PUCCH snr near 10 dB. Those are the two dpc_snr_target values from the configuration, and seeing them hold at different levels is the whole reason for setting them independently.

The two EPRE traces below drift down across the same window while the SNR traces above stay roughly level. Average time is set to 250, so every point is smoothed over that many milliseconds.

WebGUI SNR tab with PUCCH and PUSCH snr traces for the selected UE

Check TPC plot and see if how much  and where TPC comments were sent. For this plot, you need to select a specific UE in 'UE ID' pannel. 'Global' would not produce any plot.

NOTE : The plot shown below is the average value of TPC value over a certain time period. If you are using the latest version of callbox software, you can plot the average value and instantaneous value simultaneously as shown in this tutorial.

The trace sits near 1.0 for most of the window. A TPC command of 1 means stay as you are, so the link is at its target most of the time. The excursions above 1.0 are power up and the dips toward 0 are power down.

Because these are averages, a point at 1.2 is not a TPC command of 1.2. It is a mix of 1 and 2 commands falling inside the same 250 ms window.

WebGUI TPC tab showing the averaged TPC command trace for one UE

Filter the channels that help you check out TPC operation. I selected BCCH,CCCH,DCCH to display RRC message and selected PDCCH to check TPC value contained in DCI.

The filter is the Info dropdown along the top bar. The three RRC channels give you the signalling context. PDCCH gives you the DCI itself, and the TPC bits travel inside it.

With the filter applied the PHY rows read like ss_id=0 cce_index=0 al=4 dci=1_0. A dci=1_0 is a downlink assignment, and that is one of the two formats carrying the PUCCH TPC command.

WebGUI Info filter set to the RRC channels and PDCCH

See if the tpc_comman field in DCI carries the proper values as you intended. tpc_command=2 indicates "increase the power", 1 indicates "stay same" and 0 indicates 'decrease the power'.

Typing tpc_command=2 into the search box and stepping with the arrows beside it jumps from one power up command to the next. Change the number to 0 to walk the power down commands instead.

The decode on the right is a dci=0_1, which is an uplink grant, so this tpc_command is acting on PUSCH. The same message also carries mcs=11, dai=3 and ul_sch_indicator=1.

A PUCCH TPC command turns up in a dci=1_0 or 1_1 instead. The DCI format is therefore what tells you which of the two dpc_snr_target settings produced a given command.

WebGUI search for tpc_command=2 with the DCI 0_1 decode shown