aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-02-07 06:00:46 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-02-07 19:20:12 +0100
commitea8d6939e6dc6f3a2c235c45ce63ae4cd5d9009f (patch)
tree1502e1af2835a459d60ac68d623f0f316ed4e5c1
parente1d2691e691c5de26294e4d38198edc41862db7b (diff)
power_control: make P_CON_INTERVAL parameter configurable
-rw-r--r--doc/manuals/chapters/power_control.adoc23
-rw-r--r--include/osmocom/bsc/gsm_data.h3
-rw-r--r--src/osmo-bsc/bsc_vty.c18
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts.c4
-rw-r--r--tests/power_ctrl.vty29
5 files changed, 73 insertions, 4 deletions
diff --git a/doc/manuals/chapters/power_control.adoc b/doc/manuals/chapters/power_control.adoc
index dbe2d1381..4c1a275b8 100644
--- a/doc/manuals/chapters/power_control.adoc
+++ b/doc/manuals/chapters/power_control.adoc
@@ -88,6 +88,7 @@ OsmoBSC(config-ms-power-ctrl)# list with-flags
...
. l. mode (static|dyn-bts) [reset]
. l. bs-power (static|dyn-max) <0-30>
+ . lv ctrl-interval <0-31>
. lv step-size inc <2-6> red <2-4>
. lv rxlev-thresh lower <0-63> upper <0-63>
. lv rxqual-thresh lower <0-7> upper <0-7>
@@ -135,6 +136,27 @@ that allows to configure the maximum BS power reduction value in `dyn-bts` mode,
and a fixed power reduction value in `static` mode. In the later case, no
attenuation (0 dB) is applied by default (full power).
+==== Power control interval
+
+Having requested a transmit power level, the MS/BS power control loop may optionally
+by suspended for a certain number of SACCH multiframes defined by VTY parameter
+`ctrl-interval`. Given that SACCH is relatively slow and transmission of a data block
+takes 480 ms, suspension allows an observation of the effect of one power control
+decision before initiating the next one.
+
+----
+OsmoBSC(config-bs-power-ctrl)# ctrl-interval ?
+ <0-31> P_CON_INTERVAL, in units of 2 SACCH periods (0.96 seconds)
+----
+
+By default, the suspension interval is set to 0 for both MS/BS power control loops,
+therefore the power control decision is taken every 480 ms (one SACCH block period).
+Setting `ctrl-interval` to 1 increases the interval to 960 ms, so basically every
+second Uplink SACCH block is skipped; value 2 corresponds to the interval of
+1920 ms, so 3/4 received SACCH blocks are skipped.
+
+3GPP TS 45.008 briefly mentiones this parameter in table A.1 (P_Con_INTERVAL).
+
==== Power change step size
In order to slow down the reactivity of the power control loop and thus make it more
@@ -302,7 +324,6 @@ network
<4> Osmocom specific EWMA is applied to RxQual values with smoothing factor = 50% (beta=0.5).
<5> RxQual: Hreqave and Hreqt values: 2 out of 3 SACCH blocks produce an averaged measurement.
-// TODO: Document P_Con_INTERVAL (not implemented yet)
// TODO: Document other power control parameters:
// OsmoBSC(config-net-bts)# ms max power <0-40>
// OsmoBSC(config-net-bts-trx)# max_power_red <0-100>
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index edfae269e..af1c8e853 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1346,6 +1346,9 @@ struct gsm_power_ctrl_params {
uint8_t inc_step_size_db; /* increasing direction */
uint8_t red_step_size_db; /* reducing direction */
+ /* Minimum interval between power level changes */
+ uint8_t ctrl_interval; /* 1 step is 2 SACCH periods */
+
/* Measurement averaging parameters for RxLev & RxQual */
struct gsm_power_ctrl_meas_params rxqual_meas;
struct gsm_power_ctrl_meas_params rxlev_meas;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 567b1680c..26941e209 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -957,6 +957,8 @@ static void config_write_power_ctrl(struct vty *vty, unsigned int indent,
if (cp->dir == GSM_PWR_CTRL_DIR_DL)
cfg_out(" bs-power dyn-max %u%s", cp->bs_power_max_db, VTY_NEWLINE);
+ if (cp->ctrl_interval > 0)
+ cfg_out(" ctrl-interval %u%s", cp->ctrl_interval, VTY_NEWLINE);
cfg_out(" step-size inc %u red %u%s",
cp->inc_step_size_db, cp->red_step_size_db,
VTY_NEWLINE);
@@ -4938,6 +4940,21 @@ DEFUN_USRATTR(cfg_power_ctrl_bs_power,
return CMD_SUCCESS;
}
+DEFUN_USRATTR(cfg_power_ctrl_ctrl_interval,
+ cfg_power_ctrl_ctrl_interval_cmd,
+ X(BSC_VTY_ATTR_VENDOR_SPECIFIC) |
+ X(BSC_VTY_ATTR_NEW_LCHAN),
+ "ctrl-interval <0-31>",
+ "Set power control interval (for dynamic mode)\n"
+ "P_CON_INTERVAL, in units of 2 SACCH periods (0.96 seconds)\n")
+{
+ struct gsm_power_ctrl_params *params = vty->index;
+
+ params->ctrl_interval = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
DEFUN_USRATTR(cfg_power_ctrl_step_size,
cfg_power_ctrl_step_size_cmd,
X(BSC_VTY_ATTR_VENDOR_SPECIFIC) |
@@ -7742,6 +7759,7 @@ int bsc_vty_init(struct gsm_network *network)
install_node(&power_ctrl_node, dummy_config_write);
install_element(POWER_CTRL_NODE, &cfg_power_ctrl_mode_cmd);
install_element(POWER_CTRL_NODE, &cfg_power_ctrl_bs_power_cmd);
+ install_element(POWER_CTRL_NODE, &cfg_power_ctrl_ctrl_interval_cmd);
install_element(POWER_CTRL_NODE, &cfg_power_ctrl_step_size_cmd);
install_element(POWER_CTRL_NODE, &cfg_power_ctrl_rxlev_thresh_cmd);
install_element(POWER_CTRL_NODE, &cfg_power_ctrl_rxqual_thresh_cmd);
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 707690866..16fa20121 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -896,8 +896,8 @@ static void enc_power_params(struct msgb *msg, const struct gsm_power_ctrl_param
thresh_comp->p4 = cp->rxqual_meas.upper_cmp_p & 0x1f;
thresh_comp->n4 = cp->rxqual_meas.upper_cmp_n & 0x1f;
- /* FIXME: TIMER_PWR_CON_INTERVAL (P_Con_INTERVAL) */
- thresh_comp->pc_interval = 0; /* 0 .. 30 seconds */
+ /* Minimum interval between power level changes (P_CON_INTERVAL) */
+ thresh_comp->pc_interval = cp->ctrl_interval;
/* Change step limitations: POWER_{INC,RED}_STEP_SIZE */
thresh_comp->inc_step_size = cp->inc_step_size_db & 0x0f;
diff --git a/tests/power_ctrl.vty b/tests/power_ctrl.vty
index 7e4382a66..ff387ce33 100644
--- a/tests/power_ctrl.vty
+++ b/tests/power_ctrl.vty
@@ -29,6 +29,7 @@ OsmoBSC(config-bs-power-ctrl)# list with-flags
...
. l. mode (static|dyn-bts) [reset]
. l. bs-power (static|dyn-max) <0-30>
+ . lv ctrl-interval <0-31>
. lv step-size inc <2-6> red <2-4>
. lv rxlev-thresh lower <0-63> upper <0-63>
. lv rxqual-thresh lower <0-7> upper <0-7>
@@ -83,12 +84,23 @@ OsmoBSC(config-bs-power-ctrl)# show running-config
mode dyn-bts
... !bs-power
+OsmoBSC(config-bs-power-ctrl)# ctrl-interval 31
+OsmoBSC(config-bs-power-ctrl)# show running-config
+...
+ bs-power-control
+...
+ ctrl-interval 31
+... !ctrl-interval
+ ms-power-control
+... !ctrl-interval
+
OsmoBSC(config-bs-power-ctrl)# exit
OsmoBSC(config-net-bts)# ms-power-control
OsmoBSC(config-ms-power-ctrl)# list with-flags
...
. l. mode (static|dyn-bts) [reset]
. l. bs-power (static|dyn-max) <0-30>
+ . lv ctrl-interval <0-31>
. lv step-size inc <2-6> red <2-4>
. lv rxlev-thresh lower <0-63> upper <0-63>
. lv rxqual-thresh lower <0-7> upper <0-7>
@@ -119,6 +131,20 @@ OsmoBSC(config-ms-power-ctrl)# bs-power static 30
OsmoBSC(config-ms-power-ctrl)# bs-power dyn-max 30
% This command is only valid for 'bs-power-control' node
+OsmoBSC(config-ms-power-ctrl)# ctrl-interval 2
+OsmoBSC(config-ms-power-ctrl)# show running-config
+...
+ bs-power-control
+ mode dyn-bts
+...
+ ctrl-interval 31
+... !ctrl-interval
+ ms-power-control
+ mode dyn-bts
+...
+ ctrl-interval 2
+... !ctrl-interval
+
OsmoBSC(config-ms-power-ctrl)# step-size inc 5 red 4
% Power change step size must be an even number
OsmoBSC(config-ms-power-ctrl)# step-size inc 2 red 3
@@ -131,11 +157,12 @@ OsmoBSC(config-ms-power-ctrl)# show running-config
...
bs-power-control
mode dyn-bts
- bs-power dyn-max 30
+...
step-size inc 4 red 2
...
ms-power-control
mode dyn-bts
+...
step-size inc 6 red 4
...