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.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25503 )
Change subject: MS Power Control Loop: Fix oscillations within good MS Power Levels
......................................................................
MS Power Control Loop: Fix oscillations within good MS Power Levels
Related: SYS#4917
Change-Id: Ib33a94eba92004f9327c91e020a506dfa9a957c3
---
M src/common/power_control.c
M tests/power/ms_power_loop_test.c
M tests/power/ms_power_loop_test.err
M tests/power/ms_power_loop_test.ok
4 files changed, 42 insertions(+), 20 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/common/power_control.c b/src/common/power_control.c
index 62905bd..a3334be 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -199,6 +199,7 @@
uint8_t rxlev_avg;
int16_t ul_lqual_cb_avg;
const struct gsm_power_ctrl_meas_params *ci_meas;
+ bool ignore;
if (!trx_ms_pwr_ctrl_is_osmo(trx))
return 0;
@@ -254,7 +255,29 @@
return 0;
}
- if (state->current == new_power_lvl) {
+ current_dbm = ms_pwr_dbm(band, state->current);
+
+ /* In this Power Control Loop, we infer a new good MS Power Level based
+ * on the previous MS Power Level announced by the MS (not the previous
+ * one we requested!) together with the related computed measurements.
+ * Hence, and since we allow for several good MS Power Levels falling into our
+ * thresholds, we could finally converge into an oscillation loop where
+ * the MS bounces between 2 different correct MS Power levels all the
+ * time, due to the fact that we "accept" and "request back" whatever
+ * good MS Power Level we received from the MS, but at that time the MS
+ * will be transmitting using the previous MS Power Level we
+ * requested, which we will later "accept" and "request back" on next loop
+ * iteration. As a result MS effectively bounces between those 2 MS
+ * Power Levels.
+ * In order to fix this permanent oscillation, if current MS_PWR used/announced
+ * by MS is good ("ms_dbm == new_dbm", hence within thresholds and no change
+ * required) but has higher Tx power than the one we last requested, we ignore
+ * it and keep requesting for one with lower Tx power. This way we converge to
+ * the lowest good Tx power avoiding oscillating over values within thresholds.
+ */
+ ignore = (ms_dbm == new_dbm && ms_dbm > current_dbm);
+
+ if (state->current == new_power_lvl || ignore) {
LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS power at control level %d (%d dBm): "
"ms-pwr-lvl[curr %" PRIu8 ", max %" PRIu8 "], RSSI[curr %d, avg %d, thresh %d..%d] dBm,"
" C/I[curr %d, avg %d, thresh %d..%d] dB\n",
@@ -264,7 +287,6 @@
return 0;
}
- current_dbm = ms_pwr_dbm(band, state->current);
LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS power control level %d (%d dBm) => %d (%d dBm): "
"ms-pwr-lvl[curr %" PRIu8 ", max %" PRIu8 "], RSSI[curr %d, avg %d, thresh %d..%d] dBm,"
" C/I[curr %d, avg %d, thresh %d..%d] dB\n",
diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c
index d8d1c71..e54d75f 100644
--- a/tests/power/ms_power_loop_test.c
+++ b/tests/power/ms_power_loop_test.c
@@ -398,11 +398,11 @@
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);
+ apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 0, 10);
+ apply_power_test_ext(lchan, 10, good_rxlev, good_lqual, 0, 10);
+ apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 0, 10);
+ apply_power_test_ext(lchan, 10, good_rxlev, good_lqual, 0, 10);
+ apply_power_test_ext(lchan, 9, good_rxlev, good_lqual, 0, 10);
}
int main(int argc, char **argv)
diff --git a/tests/power/ms_power_loop_test.err b/tests/power/ms_power_loop_test.err
index 5a68e3b..07d9069 100644
--- a/tests/power/ms_power_loop_test.err
+++ b/tests/power/ms_power_loop_test.err
@@ -58,8 +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
+(bts=0,trx=0,ts=0,ss=0) Keeping MS power at control level 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) Keeping MS power at control level 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) Keeping MS power at control level 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) Keeping MS power at control level 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) Keeping MS power at control level 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 4dc01e4..09e19ad 100644
--- a/tests/power/ms_power_loop_test.ok
+++ b/tests/power/ms_power_loop_test.ok
@@ -166,14 +166,14 @@
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)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 0 (expected 0)
+ MS current power 9 -> 10 (expected 10)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 0 (expected 0)
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)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 0 (expected 0)
+ MS current power 9 -> 10 (expected 10)
+lchan_ms_pwr_ctrl(RxLvl=-78 dBm) returns 0 (expected 0)
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 0 (expected 0)
+ MS current power 9 -> 10 (expected 10)
Power loop test OK
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25503
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib33a94eba92004f9327c91e020a506dfa9a957c3
Gerrit-Change-Number: 25503
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210920/46896dfa/attachment.htm>