Change in osmo-bts[master]: osmo-bts-trx: implement BCCH carrier power reduction mode

fixeria gerrit-no-reply at lists.osmocom.org
Sat Jun 26 15:34:00 UTC 2021


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


Change subject: osmo-bts-trx: implement BCCH carrier power reduction mode
......................................................................

osmo-bts-trx: implement BCCH carrier power reduction mode

The BCCH carrier (sometimes called C0) of a BTS shall maintain
discontinuous Downlink transmission at full power in order to
stay 'visible' to 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.

The power reduction operation can be controlled by the BSC by
sending BS POWER CONTROL on the A-bis/RSL with the Channel Number
IE set to 0x80 (RSL_CHAN_BCCH).  This makes osmo-bts reduce the
transmission power on inactive timeslots of the BCCH carrier.

This is a non-standard, Osmocom specific extension, so indicate
support of this feature to the BSC in the feature vector.

Change-Id: I3dcee6e910ccc61c5c63c728db9ea04327e2fc98
Depends: I69283b3f35988fc7a1a1dcf1a1ad3b67f08ec716
Related: SYS#4919
---
M include/osmo-bts/gsm_data.h
M src/common/rsl.c
M src/common/scheduler.c
M src/common/vty.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-trx/scheduler_trx.c
6 files changed, 65 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/76/24776/1

diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 808b48a..352f727 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -451,6 +451,9 @@
 	/* Training Sequence Set (range 0..3) */
 	uint8_t tsc_set;
 
+	/* Actual BCCH carrier power reduction */
+	uint8_t bcch_power_red_db;
+
 	/* Frequency hopping parameters (configured via OML) */
 	struct {
 		bool enabled;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 502e619..618a82d 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2174,6 +2174,48 @@
 	return 0;
 }
 
+/* BCCH carrier power reduction */
+static int rsl_rx_bcch_pwr_ctrl(struct msgb *msg, const uint8_t red)
+{
+	const struct gsm_lchan *lchan = msg->lchan;
+	struct gsm_bts_trx *c0 = lchan->ts->trx;
+	const uint8_t chan_nr = RSL_CHAN_BCCH;
+	unsigned int tn;
+
+	if (c0->bts->c0 != c0) {
+		LOGPTRX(c0, DRSL, LOGL_ERROR, "BCCH carrier power reduction "
+			"is not expected on this transceiver\n");
+		return rsl_tx_error_report(c0, RSL_ERR_PROTO, &chan_nr, NULL, msg);
+	}
+
+	LOGPTRX(c0, DRSL, LOGL_NOTICE, "BCCH carrier power reduction: "
+		"%u dB (%s)\n", red, red ? "enabled" : "disabled");
+
+	/* Timeslot 0 is always transmitting BCCH/CCCH */
+	c0->ts[0].bcch_power_red_db = 0;
+
+	for (tn = 1; tn < ARRAY_SIZE(c0->ts); tn++) {
+		struct gsm_bts_trx_ts *ts = &c0->ts[tn];
+		const struct gsm_bts_trx_ts *next;
+
+		if (ts_pchan(ts) == GSM_PCHAN_CCCH)
+			ts->bcch_power_red_db = 0;
+		else
+			ts->bcch_power_red_db = red;
+
+		if (ts->bcch_power_red_db > 0) {
+			/* Next timeslot following this one */
+			next = &c0->ts[(tn + 1) % 8];
+
+			/* If BCCH/CCCH is following, limit to 2 dB */
+			if (ts_pchan(next) == GSM_PCHAN_CCCH)
+				ts->bcch_power_red_db = 2;
+		}
+	}
+
+	return 0;
+}
+
 /* 8.4.16 BS POWER CONTROL */
 static int rsl_rx_bs_pwr_ctrl(struct msgb *msg)
 {
@@ -2197,6 +2239,10 @@
 	new = BS_POWER2DB(*TLVP_VAL(&tp, RSL_IE_BS_POWER));
 	old = lchan->bs_power_ctrl.current;
 
+	/* Osmocom specific extension for BCCH carrier power reduction */
+	if (dch->chan_nr == RSL_CHAN_BCCH)
+		return rsl_rx_bcch_pwr_ctrl(msg, new);
+
 	/* 9.3.32 (TLV) BS Power Parameters IE (vendor specific) */
 	if ((ie = TLVP_GET(&tp, RSL_IE_BS_POWER_PARAM)) != NULL) {
 		struct gsm_power_ctrl_params *params = &lchan->bs_dpc_params;
@@ -3555,6 +3601,10 @@
 	case RSL_MT_OSMO_ETWS_CMD:
 		ret = rsl_rx_osmo_etws_cmd(trx, msg);
 		break;
+	/* Osmocom specific extension for BCCH carrier power reduction */
+	case RSL_MT_BS_POWER_CONTROL:
+		ret = rsl_rx_bs_pwr_ctrl(msg);
+		break;
 	default:
 		LOGPLCHAN(msg->lchan, DRSL, LOGL_NOTICE, "undefined RSL cchan msg_type 0x%02x\n",
 			  cch->c.msg_type);
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 93c1e85..ded77aa 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1318,6 +1318,8 @@
 	/* BS Power reduction (in dB) per logical channel */
 	if (l1cs->lchan != NULL)
 		br->att = l1cs->lchan->bs_power_ctrl.current;
+	else
+		br->att = 0;
 
 	/* encrypt */
 	if (br->burst_len && l1cs->dl_encr_algo) {
diff --git a/src/common/vty.c b/src/common/vty.c
index 039e929..3a794f3 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -1421,6 +1421,11 @@
 	vty_out(vty, "%s", VTY_NEWLINE);
 	vty_out(vty, "  NM State: ");
 	net_dump_nmstate(vty, &ts->mo.nm_state);
+
+	if (ts->trx == ts->trx->bts->c0) {
+		vty_out(vty, "  BCCH carrier power reduction: %u dB%s",
+			ts->bcch_power_red_db, VTY_NEWLINE);
+	}
 }
 
 DEFUN(show_ts,
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 7134939..be3715c 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -147,6 +147,7 @@
 	osmo_bts_set_feature(bts->features, BTS_FEAT_ACCH_REP);
 	osmo_bts_set_feature(bts->features, BTS_FEAT_MULTI_TSC);
 	osmo_bts_set_feature(bts->features, BTS_FEAT_VAMOS);
+	osmo_bts_set_feature(bts->features, BTS_FEAT_BCCH_POWER_RED);
 
 	bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB);
 
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index ef50e8d..6fd5d1a 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -195,9 +195,13 @@
 	for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
 		struct phy_instance *pinst = bts->c0->pinst;
 		struct trx_dl_burst_req *br = &pinst->u.osmotrx.br[tn];
+		const struct gsm_bts_trx_ts *ts = &bts->c0->ts[tn];
 
 		memcpy(br->burst, _sched_dummy_burst, GSM_BURST_LEN);
 		br->burst_len = GSM_BURST_LEN;
+
+		/* BCCH carrier power reduction for this timeslot */
+		br->att = ts->bcch_power_red_db;
 	}
 }
 

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I3dcee6e910ccc61c5c63c728db9ea04327e2fc98
Gerrit-Change-Number: 24776
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/20210626/9a8bb45f/attachment.htm>


More information about the gerrit-log mailing list