aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-18 21:31:40 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-19 17:30:33 +0700
commitbdea34165b0aa8a4880549125c07ac9f223d0ef4 (patch)
treea5da057e2b0978e4406971eb4f19b416cd270b77 /src/common/vty.c
parent284e4c4437cf8fd02e9411ec2810eb752e37d20e (diff)
power_control: tolerate small deviations from 'rx-target'
Recently we've introduced EWMA based uplink power filtering, that should reduce Uplink power oscillations. However, the power loop is still quite sensitive to small deviations from the target power level: even such an insignificant deviation like 2-5 dBm triggers the loop to increase or decrease the MS power level. Even if the EWMA based filtering is enabled with 80% smoothing (alpha = 0.2). This change introduces a new configuration parameter - 'hysteresis': uplink-power-target <-110-0> hysteresis <1-25> that together with the 'uplink-power-target' defines a range: [target - hysteresis .. target + hysteresis] in which the MS power loop would not trigger any power changes. This feature is now *enabled* by default, so given that: - default 'uplink-power-target' is -75 dBm, and - default 'hysteresis' is 3 dBm, the default target Uplink power range is: -78 dBm ... -72 dBm. Change-Id: Iacedbd4d69d3d74e2499af5622a07a8af0423da0 Related: SYS#4916
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index 16ffe729..d20b143b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -255,7 +255,10 @@ static void config_write_bts_single(struct vty *vty, const struct gsm_bts *bts)
VTY_NEWLINE);
vty_out(vty, " paging lifetime %u%s", paging_get_lifetime(bts->paging_state),
VTY_NEWLINE);
- vty_out(vty, " uplink-power-target %d%s", bts->ul_power_target, VTY_NEWLINE);
+ vty_out(vty, " uplink-power-target %d", bts->ul_power_target);
+ if (bts->ul_power_hysteresis > 0)
+ vty_out(vty, " hysteresis %d", bts->ul_power_hysteresis);
+ vty_out(vty, "%s", VTY_NEWLINE);
/* MS Tx power filtering algorithm and parameters */
switch (bts->ul_power_ctrl.pf_algo) {
@@ -615,15 +618,37 @@ DEFUN_ATTR(cfg_bts_agch_queue_mgmt_default,
return CMD_SUCCESS;
}
+#define UL_POWER_TARGET_CMD \
+ "uplink-power-target <-110-0>"
+#define UL_POWER_TARGET_CMD_DESC \
+ "Set the nominal target Rx Level for uplink power control loop\n" \
+ "Target uplink Rx level in dBm\n"
+
DEFUN_ATTR(cfg_bts_ul_power_target, cfg_bts_ul_power_target_cmd,
- "uplink-power-target <-110-0>",
- "Set the nominal target Rx Level for uplink power control loop\n"
- "Target uplink Rx level in dBm\n",
+ UL_POWER_TARGET_CMD, UL_POWER_TARGET_CMD_DESC,
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->ul_power_target = atoi(argv[0]);
+ bts->ul_power_hysteresis = 0;
+
+ return CMD_SUCCESS;
+}
+
+/* FIXME: libosmovty is unable to handle 'foo <-110-0> [bar <1-25>]' */
+DEFUN_ATTR(cfg_bts_ul_power_target_hysteresis,
+ cfg_bts_ul_power_target_hysteresis_cmd,
+ UL_POWER_TARGET_CMD " hysteresis <1-25>",
+ UL_POWER_TARGET_CMD_DESC
+ "Target Rx Level hysteresis\n"
+ "Tolerable deviation in dBm\n",
CMD_ATTR_IMMEDIATE)
{
struct gsm_bts *bts = vty->index;
bts->ul_power_target = atoi(argv[0]);
+ bts->ul_power_hysteresis = atoi(argv[1]);
return CMD_SUCCESS;
}
@@ -1849,6 +1874,7 @@ int bts_vty_init(struct gsm_bts *bts)
install_element(BTS_NODE, &cfg_bts_agch_queue_mgmt_default_cmd);
install_element(BTS_NODE, &cfg_bts_agch_queue_mgmt_params_cmd);
install_element(BTS_NODE, &cfg_bts_ul_power_target_cmd);
+ install_element(BTS_NODE, &cfg_bts_ul_power_target_hysteresis_cmd);
install_element(BTS_NODE, &cfg_bts_no_ul_power_filter_cmd);
install_element(BTS_NODE, &cfg_bts_ul_power_filter_ewma_cmd);
install_element(BTS_NODE, &cfg_bts_min_qual_rach_cmd);