Change in osmo-bsc[master]: power_control: add separate 'bs-power-c0' command for C0

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 21 18:06:36 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24739 )


Change subject: power_control: add separate 'bs-power-c0' command for C0
......................................................................

power_control: add separate 'bs-power-c0' command for C0

The BCCH carrier (sometimes called C0) of a BTS shall maintain
discontinuous Downlink transmission at full power in order to
stay 'visible' for the mobile stations.  Because of that, early
versions of 3GPP TS 45.008 prohibited BS power reduction on C0.

However, in the recent 3GPP TS 45.008 there is a feature called
'BCCH carrier power reduction operation'.  This is a special
mode of operation, where the variation of RF level for some
timeslots is relaxed for the purpose of energy saving.

In BCCH carrier power reduction operation, for timeslots on the
C0 carrier, except timeslots carrying BCCH/CCCH, the output power
may be lower than the output power used for timeslots carrying
BCCH/CCCH.  In this case the maximum allowed difference in output
power actually transmitted by the BTS is 6 dB.

Introduce a new 'bs-power-c0' configuration command, complementing
the existing 'bs-power' command, in order to allow constrained BS
power reduction on the BCCH carriers.

Change-Id: Id7c2cf80309532f57621342826acc0e9639733cd
Related: SYS#4919
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/lchan_fsm.c
M tests/power_ctrl.vty
5 files changed, 72 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/24739/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 1755b92..379a5d2 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1452,10 +1452,14 @@
 	/* Power Control mode to be used by the BTS */
 	enum gsm_power_ctrl_mode mode;
 
-	/* BS Power reduction value / maximum (in dB) */
+	/* BS Power reduction value / maximum (in dB) for Cx */
 	uint8_t bs_power_val_db; /* for static mode */
 	uint8_t bs_power_max_db; /* for dynamic mode */
 
+	/* BS Power reduction value / maximum (in dB) for C0 */
+	uint8_t bs_power_c0_val_db; /* for static mode */
+	uint8_t bs_power_c0_max_db; /* for dynamic mode */
+
 	/* Power change step size (dynamic mode only) */
 	uint8_t inc_step_size_db; /* increasing direction */
 	uint8_t red_step_size_db; /* reducing direction */
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 1ec34bc..c26b15b 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -987,12 +987,16 @@
 		cfg_out(" mode static%s", VTY_NEWLINE);
 		if (cp->dir == GSM_PWR_CTRL_DIR_DL && cp->bs_power_val_db != 0)
 			cfg_out(" bs-power static %u%s", cp->bs_power_val_db, VTY_NEWLINE);
+		if (cp->dir == GSM_PWR_CTRL_DIR_DL && cp->bs_power_c0_val_db != 0)
+			cfg_out(" bs-power-c0 static %u%s", cp->bs_power_c0_val_db, VTY_NEWLINE);
 		break;
 	case GSM_PWR_CTRL_MODE_DYN_BTS:
 		cfg_out("%s%s", node_name, VTY_NEWLINE);
 		cfg_out(" mode dyn-bts%s", VTY_NEWLINE);
-		if (cp->dir == GSM_PWR_CTRL_DIR_DL)
+		if (cp->dir == GSM_PWR_CTRL_DIR_DL) {
 			cfg_out(" bs-power dyn-max %u%s", cp->bs_power_max_db, VTY_NEWLINE);
+			cfg_out(" bs-power-c0 dyn-max %u%s", cp->bs_power_c0_max_db, VTY_NEWLINE);
+		}
 
 		if (cp->ctrl_interval > 0)
 			cfg_out(" ctrl-interval %u%s", cp->ctrl_interval, VTY_NEWLINE);
@@ -5120,14 +5124,33 @@
 		return CMD_WARNING;
 	}
 
-	if (dynamic) /* maximum value */
-		params->bs_power_max_db = value;
-	else /* static (fixed) value */
-		params->bs_power_val_db = value;
+	if (!strncmp(self->string, "bs-power-c0", 11)) {
+		if (dynamic) /* maximum value for C0 */
+			params->bs_power_c0_max_db = value;
+		else /* static (fixed) value for C0 */
+			params->bs_power_c0_val_db = value;
+	} else {
+		if (dynamic) /* maximum value for Cx */
+			params->bs_power_max_db = value;
+		else /* static (fixed) value for Cx */
+			params->bs_power_val_db = value;
+	}
 
 	return CMD_SUCCESS;
 }
 
+DEFUN_USRATTR(cfg_power_ctrl_bs_power_c0,
+	      cfg_power_ctrl_bs_power_c0_cmd,
+	      X(BSC_VTY_ATTR_NEW_LCHAN),
+	      "bs-power-c0 (static|dyn-max) <0-6>",
+	      "BS Power IE value to be sent to the C0 (BCCH carrier) of the BTS\n"
+	      "Fixed BS Power reduction value (for static mode)\n"
+	      "Maximum BS Power reduction value (for dynamic mode)\n"
+	      "BS Power reduction value (in dB, even numbers only)\n")
+{
+	return cfg_power_ctrl_bs_power(self, vty, argc, argv);
+}
+
 DEFUN_USRATTR(cfg_power_ctrl_ctrl_interval,
 	      cfg_power_ctrl_ctrl_interval_cmd,
 	      X(BSC_VTY_ATTR_VENDOR_SPECIFIC) |
@@ -8132,6 +8155,7 @@
 	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_bs_power_c0_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);
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 0d1395c..31e00a9 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -1136,10 +1136,14 @@
 	/* Static Power Control is the safe default */
 	.mode = GSM_PWR_CTRL_MODE_STATIC,
 
-	/* BS Power reduction value / maximum (in dB) */
+	/* BS Power reduction value / maximum (in dB) for Cx */
 	.bs_power_val_db = 0,  /* no attenuation in static mode */
 	.bs_power_max_db = 12, /* up to 12 dB in dynamic mode */
 
+	/* BS Power reduction value / maximum (in dB) for C0 */
+	.bs_power_c0_val_db = 0, /* no attenuation in static mode */
+	.bs_power_c0_max_db = 0, /* no attenuation in dynamic mode */
+
 	/* Power increasing/reducing step size */
 	.inc_step_size_db = 4, /* 2, 4, or 6 dB */
 	.red_step_size_db = 2, /* 2 or 4 dB */
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 03ccec0..6b30205 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -669,10 +669,17 @@
 		 * - TA is still zero, to be determined by RACH. */
 
 		/* Default BS Power reduction value (in 2 dB steps) */
-		if (bts->bs_power_ctrl.mode == GSM_PWR_CTRL_MODE_DYN_BTS)
-			lchan->bs_power_db = bts->bs_power_ctrl.bs_power_max_db;
-		else
-			lchan->bs_power_db = bts->bs_power_ctrl.bs_power_val_db;
+		if (bts->bs_power_ctrl.mode == GSM_PWR_CTRL_MODE_DYN_BTS) {
+			if (lchan->trx == bts->c0)
+				lchan->bs_power_db = bts->bs_power_ctrl.bs_power_c0_max_db;
+			else
+				lchan->bs_power_db = bts->bs_power_ctrl.bs_power_max_db;
+		} else {
+			if (lchan->trx == bts->c0)
+				lchan->bs_power_db = bts->bs_power_ctrl.bs_power_c0_val_db;
+			else
+				lchan->bs_power_db = bts->bs_power_ctrl.bs_power_val_db;
+		}
 	}
 
 	if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan))
diff --git a/tests/power_ctrl.vty b/tests/power_ctrl.vty
index ff387ce..d268725 100644
--- a/tests/power_ctrl.vty
+++ b/tests/power_ctrl.vty
@@ -29,6 +29,7 @@
 ...
   . l.  mode (static|dyn-bts) [reset]
   . l.  bs-power (static|dyn-max) <0-30>
+  . l.  bs-power-c0 (static|dyn-max) <0-6>
   . lv  ctrl-interval <0-31>
   . lv  step-size inc <2-6> red <2-4>
   . lv  rxlev-thresh lower <0-63> upper <0-63>
@@ -40,19 +41,36 @@
   . lv  (rxlev-avg|rxqual-avg) algo (unweighted|weighted|mod-median)
   . lv  (rxlev-avg|rxqual-avg) algo osmo-ewma beta <1-99>
 
+OsmoBSC(config-bs-power-ctrl)# bs-power?
+  bs-power  BS Power IE value to be sent to the BTS
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0?
+  bs-power-c0  BS Power IE value to be sent to the C0 (BCCH carrier) of the BTS
+
 OsmoBSC(config-bs-power-ctrl)# bs-power ?
   static   Fixed BS Power reduction value (for static mode)
   dyn-max  Maximum BS Power reduction value (for dynamic mode)
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0 ?
+  static   Fixed BS Power reduction value (for static mode)
+  dyn-max  Maximum BS Power reduction value (for dynamic mode)
+
 OsmoBSC(config-bs-power-ctrl)# bs-power static ?
   <0-30>  BS Power reduction value (in dB, even numbers only)
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0 static ?
+  <0-6>  BS Power reduction value (in dB, even numbers only)
+
 OsmoBSC(config-bs-power-ctrl)# bs-power static 3
 % Incorrect BS Power reduction value, an even number is expected
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0 static 30
+% Unknown command.
+
 OsmoBSC(config-bs-power-ctrl)# bs-power static 6
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0 static 4
 OsmoBSC(config-bs-power-ctrl)# show running-config
 ...
   bs-power-control
    mode static
    bs-power static 6
+   bs-power-c0 static 4
   ms-power-control
    mode dyn-bts
 ... !bs-power
@@ -64,6 +82,7 @@
   bs-power-control
    mode dyn-bts
    bs-power dyn-max 12
+   bs-power-c0 dyn-max 0
    step-size inc 4 red 2
    rxlev-thresh lower 32 upper 38
    rxlev-thresh-comp lower 10 12 upper 19 20
@@ -74,11 +93,13 @@
 ...
 
 OsmoBSC(config-bs-power-ctrl)# bs-power dyn-max 30
+OsmoBSC(config-bs-power-ctrl)# bs-power-c0 dyn-max 6
 OsmoBSC(config-bs-power-ctrl)# show running-config
 ...
   bs-power-control
    mode dyn-bts
    bs-power dyn-max 30
+   bs-power-c0 dyn-max 6
 ... !bs-power
   ms-power-control
    mode dyn-bts
@@ -100,6 +121,7 @@
 ...
   . l.  mode (static|dyn-bts) [reset]
   . l.  bs-power (static|dyn-max) <0-30>
+  . l.  bs-power-c0 (static|dyn-max) <0-6>
   . lv  ctrl-interval <0-31>
   . lv  step-size inc <2-6> red <2-4>
   . lv  rxlev-thresh lower <0-63> upper <0-63>

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24739
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id7c2cf80309532f57621342826acc0e9639733cd
Gerrit-Change-Number: 24739
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210621/483d49f8/attachment.htm>


More information about the gerrit-log mailing list