From c85027a510d36b7b0b59ec1a41854e3c6ccc70a5 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 13 Sep 2021 17:56:19 +0200 Subject: Power Control Loop: Set P_CON_INTERVAL to 1 by default TS 45.008 section 4.7.1: """ Upon receipt of a command from an SACCH to change its power level on the corresponding uplink channel, the MS shall change to the new level at a rate of one nominal 2 dB power control step every 60 ms (13 TDMA frames), i.e. a range change of 15 steps should take about 900 ms. The change shall commence at the first TDMA frame belonging to the next reporting period (as specified in subclause 8.4). The MS shall change the power one nominal 2 dB step at a time, at a rate of one step every 60 ms following the initial change, irrespective of whether actual transmission takes place or not. """ Since the reported MS_PWR in L1 SACCH Header is, according to specs, the one used for the last block of the previous SACCH period, it becomes clear the first SACCH block after a requested MS Power Level change by the network may contain mismatches between the announced MS_PWR by the MS and the measured Rxlev/RxQual. Hence, let's better use a P_CON_INTERVAL of 1 which retriggers the MS Power Control Loop every second SACCH block. Change-Id: If6cb8945645a2031f2b2ee65d9b9f51e75cd9af1 Related: SYS#5371 --- src/common/gsm_data.c | 3 +++ tests/power/bs_power_loop_test.c | 11 ++++++++--- tests/power/ms_power_loop_test.c | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c index 76292f7f..ee6e6930 100644 --- a/src/common/gsm_data.c +++ b/src/common/gsm_data.c @@ -504,6 +504,9 @@ int lchan2ecu_codec(const struct gsm_lchan *lchan) /* Default MS/BS Power Control parameters (see 3GPP TS 45.008, table A.1) */ const struct gsm_power_ctrl_params power_ctrl_params_def = { + + .ctrl_interval = 1, /* Trigger loop every second SACCH block. TS 45.008 sec 4.7.1 */ + /* Power increasing/reducing step size (optimal defaults) */ .inc_step_size_db = 4, /* quickly increase MS/BS power */ .red_step_size_db = 2, /* slowly decrease MS/BS power */ diff --git a/tests/power/bs_power_loop_test.c b/tests/power/bs_power_loop_test.c index 53fdbba6..6b67ba2e 100644 --- a/tests/power/bs_power_loop_test.c +++ b/tests/power/bs_power_loop_test.c @@ -112,6 +112,14 @@ static void init_test(const char *name) g_bts->band = GSM_BAND_900; g_bts->c0 = g_trx; + /* Init defaultBS power control parameters, enable dynamic power control */ + struct gsm_power_ctrl_params *params = &g_trx->ts[0].lchan[0].bs_dpc_params; + g_trx->ts[0].lchan[0].bs_power_ctrl.dpc_params = params; + *params = power_ctrl_params_def; + + /* Disable loop SACCH block skip by default: */ + params->ctrl_interval = 0; + printf("\nStarting test case '%s'\n", name); } @@ -219,9 +227,6 @@ static void exec_power_test(const struct power_test_step *steps, struct gsm_lchan *lchan = &g_trx->ts[0].lchan[0]; struct gsm_power_ctrl_params *params = &lchan->bs_dpc_params; - /* Default BS power control parameters */ - memcpy(params, &power_ctrl_params_def, sizeof(*params)); - /* No RxLev hysteresis: lower == upper */ params->rxlev_meas.lower_thresh = PWR_TEST_RXLEV_TARGET; params->rxlev_meas.upper_thresh = PWR_TEST_RXLEV_TARGET; diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c index 5f833290..559eacc7 100644 --- a/tests/power/ms_power_loop_test.c +++ b/tests/power/ms_power_loop_test.c @@ -59,6 +59,9 @@ static void init_test(const char *name) g_trx->ts[0].lchan[0].ms_power_ctrl.dpc_params = params; *params = power_ctrl_params_def; + /* Disable loop SACCH block skip by default: */ + params->ctrl_interval = 0; + /* Disable RxLev pre-processing and hysteresis by default */ struct gsm_power_ctrl_meas_params *mp = ¶ms->rxlev_meas; mp->lower_thresh = mp->upper_thresh = PWR_TEST_RXLEV_TARGET; -- cgit v1.2.3