fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email )
Change subject: power_control: always feed input values to do_avg_algo()
......................................................................
power_control: always feed input values to do_avg_algo()
The purpose of the power control interval (P_CON_INTERVAL) is to
temporarily suspend the decision-making process of the MS/BS power
control algorithm, allowing time to observe the effects of a
previous adjustment.
However, input value (RxLev/RxQual) averaging must continue
uninterrupted, regardless of the power control interval.
Otherwise we're simply loosing measurement samples.
Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
---
M src/common/power_control.c
1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/31/39831/1
diff --git a/src/common/power_control.c b/src/common/power_control.c
index 7f98a41..45d8969 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -206,6 +206,12 @@
if (params == NULL)
return 0;
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
+ ci_meas = lchan_get_ci_thresholds(lchan);
+ ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
+ rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc,
dbm2rxlev(ul_rssi_dbm));
+
/* Shall we skip current block based on configured interval? */
if (ctrl_interval_skip_block(params, state))
return 0;
@@ -225,15 +231,10 @@
return 0;
}
- ci_meas = lchan_get_ci_thresholds(lchan);
-
/* Is C/I based algo enabled by config?
* FIXME: this can later be generalized when properly implementing P & N counting.
*/
ci_on = ci_meas->lower_cmp_n && ci_meas->upper_cmp_n;
- ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
- rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc,
dbm2rxlev(ul_rssi_dbm));
-
/* If computed C/I is enabled and out of acceptable thresholds: */
if (ci_on && ul_lqual_cb_avg < ci_meas->lower_thresh * 10) {
new_dbm = ms_dbm + params->inc_step_size_db;
@@ -334,10 +335,6 @@
lchan->tch.dtx.dl_active ? "enabled" : "disabled",
lchan->tch.dtx.dl_active ? "SUB" : "FULL");
- /* Shall we skip current block based on configured interval? */
- if (ctrl_interval_skip_block(params, state))
- return 0;
-
/* If DTx is active on Downlink, use the '-SUB' */
if (lchan->tch.dtx.dl_active) {
rxqual = mr->rxqual_sub;
@@ -347,8 +344,15 @@
rxlev = mr->rxlev_full;
}
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc,
rxlev);
rxqual_avg = do_avg_algo(¶ms->rxqual_meas, &state->rxqual_meas_proc,
rxqual);
+
+ /* Shall we skip current block based on configured interval? */
+ if (ctrl_interval_skip_block(params, state))
+ return 0;
+
/* If RxQual > L_RXQUAL_XX_P, try to increase Tx power */
if (rxqual_avg > params->rxqual_meas.lower_thresh) {
/* Increase Tx power by reducing Tx attenuation */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
Gerrit-Change-Number: 39831
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>