MS Power Control Loop: Fix oscillations within good MS Power Levels
Related: SYS#4917 Change-Id: Ib33a94eba92004f9327c91e020a506dfa9a957c3
This commit is contained in:
parent
43a4a1d5e7
commit
c56d120b29
|
@ -199,6 +199,7 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
|
|||
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 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
|
|||
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 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
|
|||
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",
|
||||
|
|
|
@ -398,11 +398,11 @@ static void test_good_threshold_convergence(void)
|
|||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -166,14 +166,14 @@ 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)
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue