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 uploaded this change for review. ( 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, 44 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/03/25503/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index 62905bd..a29d6db 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; @@ -265,15 +266,39 @@ } 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 Powever 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); + 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", - (new_dbm > current_dbm) ? "Raising" : "Lowering", + ignore ? "Ignoring" : ((new_dbm > current_dbm) ? "Raising" : "Lowering"), state->current, current_dbm, new_power_lvl, new_dbm, ms_power_lvl, state->max, ul_rssi_dbm, rxlev2dbm(rxlev_avg), rxlev2dbm(params->rxlev_meas.lower_thresh), rxlev2dbm(params->rxlev_meas.upper_thresh), ul_lqual_cb/10, ul_lqual_cb_avg/10, ci_meas->lower_thresh, ci_meas->upper_thresh); + if (ignore) + return 0; + /* store the resulting new MS power level in the lchan */ state->current = new_power_lvl; bts_model_adjst_ms_pwr(lchan); diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c index d8d1c71..a343ee2 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, 1, 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..a85b9b2 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) Ignoring 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 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) Ignoring 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 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) Ignoring 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 4dc01e4..2bb780d 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 1) + 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: 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/b9c5460e/attachment.htm>