Change in osmo-bts[master]: tests: MS Power Control Loop: Show oscillation among good power levels

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Sep 17 12:23:55 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25502 )


Change subject: tests: MS Power Control Loop: Show oscillation among good power levels
......................................................................

tests: MS Power Control Loop: Show oscillation among good power levels

This test showcases the current issue where the loop keeps bouncing
between 2 good MS Power Level values due to the loop "accepting" and
"reporting back" the previously considered good MS Power Level
announced/used by the MS. Hence, upon report back from the network, the
MS will switch to this new MS Power Level, and same thing will ocurr
over and over.

Related: SYS#4917
Change-Id: I16ed7fe8a123b99008e0c041d2f3e4232057d55c
---
M tests/power/ms_power_loop_test.c
M tests/power/ms_power_loop_test.err
M tests/power/ms_power_loop_test.ok
3 files changed, 54 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/25502/1

diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c
index 559eacc..d8d1c71 100644
--- a/tests/power/ms_power_loop_test.c
+++ b/tests/power/ms_power_loop_test.c
@@ -70,13 +70,11 @@
 	printf("\nStarting test case '%s'\n", name);
 }
 
-static inline void apply_power_test(struct gsm_lchan *lchan, int rxlev, int lqual_cb, int exp_ret, uint8_t exp_current)
+static void apply_power_test_ext(struct gsm_lchan *lchan, uint8_t ms_pwr, int rxlev, int lqual_cb, int exp_ret, uint8_t exp_current)
 {
-	uint8_t old;
 	int ret;
 
-	old = lchan->ms_power_ctrl.current;
-	ret = lchan_ms_pwr_ctrl(lchan, lchan->ms_power_ctrl.current, rxlev, lqual_cb);
+	ret = lchan_ms_pwr_ctrl(lchan, ms_pwr, rxlev, lqual_cb);
 
 	/* Keep the measurement counter updated */
 	lchan->meas.res_nr++;
@@ -84,7 +82,12 @@
 	printf("lchan_ms_pwr_ctrl(RxLvl=%d dBm) returns %d (expected %d)\n",
 	       rxlev, ret, exp_ret);
 	printf("\tMS current power %u -> %u (expected %u)\n",
-	       old, lchan->ms_power_ctrl.current, exp_current);
+	       ms_pwr, lchan->ms_power_ctrl.current, exp_current);
+}
+
+static inline void apply_power_test(struct gsm_lchan *lchan, int rxlev, int lqual_cb, int exp_ret, uint8_t exp_current)
+{
+	apply_power_test_ext(lchan, lchan->ms_power_ctrl.current, rxlev, lqual_cb, exp_ret, exp_current);
 }
 
 static void test_power_loop(void)
@@ -374,6 +377,34 @@
 	apply_power_test(lchan, -60, too_high_lqual, 1, 14);
 }
 
+/* Test whether ping pong between requested MS Power Level and announced MS
+ * Power level occurs, oscillating between considered good levels all the time:
+ * FIXME: Current code shows there's an issue with oscillating values. */
+static void test_good_threshold_convergence(void)
+{
+	struct gsm_lchan *lchan;
+	const struct gsm_power_ctrl_params *params;
+	int16_t good_lqual, good_rxlev;
+
+	init_test(__func__);
+	lchan = &g_trx->ts[0].lchan[0];
+	params = lchan->ms_power_ctrl.dpc_params;
+	lchan->ms_dpc_params.rxlev_meas.upper_thresh = 37;
+	lchan->ms_dpc_params.rxlev_meas.lower_thresh = 30;
+	lchan->type = GSM_LCHAN_SDCCH;
+	good_lqual = (params->ci_sdcch_meas.lower_thresh + 2) * 10;
+	good_rxlev = rxlev2dbm(params->rxlev_meas.lower_thresh + 2);
+
+	lchan->ms_power_ctrl.current = 10;
+	lchan->ms_power_ctrl.max = 2;
+
+	apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 1, 9);
+	apply_power_test_ext(lchan, 10, good_rxlev, good_lqual, 1, 10);
+	apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 1, 9);
+	apply_power_test_ext(lchan, 10, good_rxlev, good_lqual, 1, 10);
+	apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 1, 9);
+}
+
 int main(int argc, char **argv)
 {
 	printf("Testing power loop...\n");
@@ -394,6 +425,7 @@
 	test_power_hysteresis();
 	test_power_ctrl_interval();
 	test_power_loop_ci();
+	test_good_threshold_convergence();
 
 	printf("Power loop test OK\n");
 
diff --git a/tests/power/ms_power_loop_test.err b/tests/power/ms_power_loop_test.err
index 8f58882..5a68e3b 100644
--- a/tests/power/ms_power_loop_test.err
+++ b/tests/power/ms_power_loop_test.err
@@ -58,3 +58,8 @@
 (bts=0,trx=0,ts=0,ss=0) Lowering MS power control level 11 (8 dBm) => 12 (6 dBm): ms-pwr-lvl[curr 11, max 2], RSSI[curr -100, avg -100, thresh -75..-75] dBm, C/I[curr 17, avg 17, thresh 12..16] dB
 (bts=0,trx=0,ts=0,ss=0) Lowering MS power control level 12 (6 dBm) => 13 (4 dBm): ms-pwr-lvl[curr 12, max 2], RSSI[curr -60, avg -60, thresh -75..-75] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
 (bts=0,trx=0,ts=0,ss=0) Lowering MS power control level 13 (4 dBm) => 14 (2 dBm): ms-pwr-lvl[curr 13, max 2], RSSI[curr -60, avg -60, thresh -75..-75] dBm, C/I[curr 17, avg 17, thresh 12..16] dB
+(bts=0,trx=0,ts=0,ss=0) Raising MS power control level 10 (10 dBm) => 9 (12 dBm): ms-pwr-lvl[curr 9, max 2], RSSI[curr -78, avg -78, thresh -80..-73] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
+(bts=0,trx=0,ts=0,ss=0) Lowering MS power control level 9 (12 dBm) => 10 (10 dBm): ms-pwr-lvl[curr 10, max 2], RSSI[curr -78, avg -78, thresh -80..-73] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
+(bts=0,trx=0,ts=0,ss=0) Raising MS power control level 10 (10 dBm) => 9 (12 dBm): ms-pwr-lvl[curr 9, max 2], RSSI[curr -78, avg -78, thresh -80..-73] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
+(bts=0,trx=0,ts=0,ss=0) Lowering MS power control level 9 (12 dBm) => 10 (10 dBm): ms-pwr-lvl[curr 10, max 2], RSSI[curr -78, avg -78, thresh -80..-73] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
+(bts=0,trx=0,ts=0,ss=0) Raising MS power control level 10 (10 dBm) => 9 (12 dBm): ms-pwr-lvl[curr 9, max 2], RSSI[curr -78, avg -78, thresh -80..-73] dBm, C/I[curr 14, avg 14, thresh 12..16] dB
diff --git a/tests/power/ms_power_loop_test.ok b/tests/power/ms_power_loop_test.ok
index 27992b1..4dc01e4 100644
--- a/tests/power/ms_power_loop_test.ok
+++ b/tests/power/ms_power_loop_test.ok
@@ -164,4 +164,16 @@
 	MS current power 12 -> 13 (expected 13)
 lchan_ms_pwr_ctrl(RxLvl=-60 dBm) returns 1 (expected 1)
 	MS current power 13 -> 14 (expected 14)
+
+Starting test case 'test_good_threshold_convergence'
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 1 (expected 1)
+	MS current power 9 -> 9 (expected 9)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 1 (expected 1)
+	MS current power 10 -> 10 (expected 10)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 1 (expected 1)
+	MS current power 9 -> 9 (expected 9)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 1 (expected 1)
+	MS current power 10 -> 10 (expected 10)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 1 (expected 1)
+	MS current power 9 -> 9 (expected 9)
 Power loop test OK

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25502
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I16ed7fe8a123b99008e0c041d2f3e4232057d55c
Gerrit-Change-Number: 25502
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210917/813674fe/attachment.htm>


More information about the gerrit-log mailing list