Merge remote-tracking branch 'origin/fix-delta-mcs' into integration_2026_w13 (!3912)
Fix Delta MCS mode, reimplement UL power control This change set fixes the "delta-MCS" mode, and reimplements the UL power control loops at gNB, i.e., for PUSCH and PUCCH. It further adds new T traces to log PUSCH/PUCCH power infrmation, and cleans up code. The "delta-MCS" mode in OAI refers to configuring a UE with deltaMCS in the PUSCH-PowerControl IE (see TS 38.331). In this mode, the UE adjusts the PUSCH power for transmissions to take into account for MCS (see TS 38.213 Sec. 7.1). In other words, the target SNR can be set to a somewhat low value, and the UE will still use the right power for UL transmissions. Note that the spec only foresees this adjustment of UL power when using one layer. In contrast, in the "normal" mode, the gNB sends TPC commands to keep a UE at a fixed target SNR (default: 20dB), regardless of the MCS or number of layers. Future work is planned to completely remove this fixed target SNR, which is not done in this MR yet. Further, there is a new power control loop implementation. Prior to this MR, on each UL transmissions, the gNB uses the SNR to decide about TPC sent to a UE in the next transmissions. The new implementation relies on averaging the SNR, and a "TPC in flight" average to account for the slow reaction of the average SNR. The sum of both quantities is the current SNR that is used by the UE. See the commit messages or documentation for more information. Further cleanup to group data (e.g., power control configuration, refactoring of code to save space, ...) is done. Two new T traces GNB_MAC_PUSCH_POWER_CONTROL and GNB_MAC_PUCCH_POWER_CONTROL are added; documentation exists to explain how to graphically plot corresponding graphs.
This commit is contained in:
@@ -69,8 +69,6 @@ typedef struct {
|
||||
int nb_nr_macrlc_inst;
|
||||
/// Number of component carriers per instance in this node
|
||||
int *nb_mac_CC;
|
||||
/// Number of component carriers per instance in this node
|
||||
int *nb_nr_mac_CC;
|
||||
/// Number of L1 instances in this node
|
||||
int nb_L1_inst;
|
||||
/// Number of NB_IoT L1 instances in this node
|
||||
|
||||
@@ -213,6 +213,14 @@ ID = GNB_MAC_UL_PDU_WITH_DATA
|
||||
DESC = NR MAC uplink PDU for an UE
|
||||
GROUP = ALL:MAC:GNB:WIRESHARK
|
||||
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
|
||||
ID = GNB_MAC_PUSCH_POWER_CONTROL
|
||||
DESC = NR MAC PUSCH power control-related data
|
||||
GROUP = ALL:MAC:GNB:CSV
|
||||
FORMAT = int,rnti : int,frame : int,slot : int,snrx10 : int,phr : int,tpc : int,tb_size : int,txpower_calc : int,rbSize : int,mcs : int,rssi
|
||||
ID = GNB_MAC_PUCCH_POWER_CONTROL
|
||||
DESC = NR MAC PUCCH power control-related data
|
||||
GROUP = ALL:MAC:GNB:CSV
|
||||
FORMAT = int,rnti : int,frame : int,slot : int,snrx10 : int,tpc : int,rssi
|
||||
ID = GNB_MAC_DL_RAR_PDU_WITH_DATA
|
||||
DESC = NR MAC downlink PDU for RAR
|
||||
GROUP = ALL:MAC:GNB:WIRESHARK
|
||||
|
||||
@@ -393,6 +393,27 @@ static int trigger_bwp_switch(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
}
|
||||
}
|
||||
|
||||
static int set_pusch_target_snr(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
if (!buf)
|
||||
ERROR_MSG_RET("need an SNR to read\n");
|
||||
|
||||
char *end;
|
||||
long new_snr = strtol(buf, &end, 0);
|
||||
if (*end != 0)
|
||||
ERROR_MSG_RET("error: could not parse number in '%s'\n", buf);
|
||||
|
||||
gNB_MAC_INST *nrmac = RC.nrmac[0];
|
||||
NR_SCHED_LOCK(&nrmac->sched_lock);
|
||||
UE_iterator(nrmac->UE_info.connected_ue_list, it) {
|
||||
nr_mac_set_target_snrx10(&it->UE_sched_ctrl.pusch_pc, new_snr * 10);
|
||||
}
|
||||
NR_SCHED_UNLOCK(&nrmac->sched_lock);
|
||||
prnt("set new PUSCH target SNR %d for all UEs\n", new_snr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static telnetshell_cmddef_t cicmds[] = {
|
||||
{"get_single_rnti", "", get_single_rnti},
|
||||
{"force_reestab", "[rnti(hex,opt)]", trigger_reestab},
|
||||
@@ -404,6 +425,7 @@ static telnetshell_cmddef_t cicmds[] = {
|
||||
{"get_current_bwp", "[rnti(hex,opt)]", get_current_bwp},
|
||||
{"trigger_bwp_switch", "newBWPId [rnti(hex,opt)]", trigger_bwp_switch},
|
||||
{"trigger_n2_ho", "[neighbour_pci(uint32_t),ueId(uint32_t)]", rrc_gNB_trigger_n2_ho},
|
||||
{"set_pusch_target_snr", "[somelongSNR(dec)]", set_pusch_target_snr},
|
||||
{"pdu_session_release", "[gNB_ue_ngap_id(int,opt)]", trigger_ngap_pdu_session_release},
|
||||
{"", "", NULL},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user