aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-28 23:15:43 +0200
committerfixeria <vyanitskiy@sysmocom.de>2021-07-05 12:17:59 +0000
commit997a257f8dabe5dd940a1271e56e676a871896d7 (patch)
tree75488bca836fefd2d2ff5543e7a3ce5065c92e6c
parentced29cf94cc0bfa82cf62a7b1fa48202145f3fb6 (diff)
power_control: constrain BS power reduction on BCCH carrier
BS Power Control is not allowed on the BCCH/CCCH carrier, unless the BTS is operating in the BCCH carrier power reduction mode. Allow constrained BS power reduction (up to 6 dB) on active logical channels iff BCCH carrier power reduction mode is enabled. Take into account that the maximum power difference between a timeslot used for BCCH/CCCH and the timeslot preceding it shall not exceed 3 dB. Change-Id: I2cc6a86731984f586ef35b43a8d3de631f7d8a2f Related: SYS#4919, SYS#4918
-rw-r--r--doc/manuals/chapters/power_control.adoc24
-rw-r--r--include/osmocom/bsc/gsm_data.h3
-rw-r--r--src/osmo-bsc/bts.c31
-rw-r--r--src/osmo-bsc/lchan_fsm.c7
4 files changed, 65 insertions, 0 deletions
diff --git a/doc/manuals/chapters/power_control.adoc b/doc/manuals/chapters/power_control.adoc
index bb87c850c..d456484ea 100644
--- a/doc/manuals/chapters/power_control.adoc
+++ b/doc/manuals/chapters/power_control.adoc
@@ -357,6 +357,30 @@ TIP: If you're using OsmoBTS, make sure that it reports feature #021 "BCCH carri
power reduction mode" in the feature vector. This can be checked by issuing
`show bts` command in OsmoBSC's VTY interface.
+==== Interworking with static and dynamic power control
+
+The key difference between BCCH carrier power reduction and the BS power control
+is that the former affects *inactive* timeslots (or sub-channels), so only dummy
+bursts are affected. The later depends on the Downlink measurement reports sent
+by the MS, and thus applies to *active* channels only. However, both features
+are interconnected: the maximum BCCH carrier power reduction value constrains
+the BS Power value that can be used for dynamic or static BS power control.
+
+BS power control on the BCCH carrier will not be enabled unless the BTS is in BCCH
+carrier power reduction mode of operation. Once it is, the BS power reduction
+value in either of `dyn-bts` or `static` modes would be constrained by currently
+applied BCCH power reduction value, and thus would never exceed the maximum of 6 dB.
+
+For example, consider a BTS with BS power control configured to use _dynamic_ mode
+and the maximum power reduction of 16 dB. Once this BTS is switched into the BCCH
+carrier power reduction mode with the maximum attenuation of 4 dB, the maximum
+power reduction value for the BS power loop on the C0 carrier would be 4 dB.
+
+Moreover, according to 3GPP TS 45.008, between a timeslot used for BCCH/CCCH and
+the timeslot preceding it, the difference in output power actually transmitted by
+the BTS shall not exceed 3 dB. This means that on some timeslots the power
+reduction value can be constrained even further.
+
==== Managing BCCH carrier power reduction
The BCCH carrier power reduction can be controlled via the CTRL and VTY interfaces.
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 569e2885c..31759cc58 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -841,6 +841,9 @@ struct gsm_bts_trx_ts {
} rbs2000;
};
+ /* Maximum BCCH carrier power reduction */
+ uint8_t c0_max_power_red_db;
+
/* Maximum number of lchans that could become usable, for example by switching a dynamic timeslot's type or by
* enabling VAMOS secondary lchans. This does include the maximum count of possible VAMOS secondary lchans. */
uint8_t max_lchans_possible;
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index c1f09ff07..8608767ec 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -749,6 +749,8 @@ int gsm_bts_set_system_infos(struct gsm_bts *bts)
int gsm_bts_set_c0_power_red(struct gsm_bts *bts, const uint8_t red)
{
+ struct gsm_bts_trx *c0 = bts->c0;
+ unsigned int tn;
int rc;
if (!osmo_bts_has_feature(&bts->features, BTS_FEAT_BCCH_POWER_RED))
@@ -760,6 +762,35 @@ int gsm_bts_set_c0_power_red(struct gsm_bts *bts, const uint8_t red)
if (rc != 0)
return rc;
+ /* Timeslot 0 is always transmitting BCCH/CCCH */
+ c0->ts[0].c0_max_power_red_db = 0;
+
+ for (tn = 1; tn < ARRAY_SIZE(c0->ts); tn++) {
+ struct gsm_bts_trx_ts *ts = &c0->ts[tn];
+ struct gsm_bts_trx_ts *prev = ts - 1;
+
+ switch (ts->pchan_is) {
+ /* Not allowed on CCCH/BCCH */
+ case GSM_PCHAN_CCCH:
+ /* Preceeding timeslot shall not exceed 2 dB */
+ if (prev->c0_max_power_red_db > 0)
+ prev->c0_max_power_red_db = 2;
+ /* fall-through */
+ /* Not recommended on SDCCH/8 */
+ case GSM_PCHAN_SDCCH8_SACCH8C:
+ case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
+ ts->c0_max_power_red_db = 0;
+ break;
+ default:
+ ts->c0_max_power_red_db = red;
+ break;
+ }
+ }
+
+ /* Timeslot 7 is always preceding BCCH/CCCH */
+ if (c0->ts[7].c0_max_power_red_db > 0)
+ c0->ts[7].c0_max_power_red_db = 2;
+
bts->c0_max_power_red_db = red;
return 0;
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 03ccec085..635048167 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -675,6 +675,13 @@ static void lchan_fsm_wait_ts_ready_onenter(struct osmo_fsm_inst *fi, uint32_t p
lchan->bs_power_db = bts->bs_power_ctrl.bs_power_val_db;
}
+ /* BS Power Control is generally not allowed on the BCCH/CCCH carrier.
+ * However, we allow it in the BCCH carrier power reduction mode of operation. */
+ if (lchan->ts->trx == bts->c0) {
+ lchan->bs_power_db = OSMO_MIN(lchan->ts->c0_max_power_red_db,
+ lchan->bs_power_db);
+ }
+
if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan))
return;