Change in osmo-bts[master]: osmo-bts-trx: implement Temporary Overpower for SACCH/FACCH

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon Sep 27 16:02:27 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25284 )

Change subject: osmo-bts-trx: implement Temporary Overpower for SACCH/FACCH
......................................................................

osmo-bts-trx: implement Temporary Overpower for SACCH/FACCH

GSM/EDGE Evolution and Performance, Section 12.3 suggests Temporary
Overpower as another solution to improve SACCH/FACCH performance in
case of bad C/I. The idea here is that you increment the DL transmit
power by 2..4dB only for FACCH/SACCH bursts, while keeping all voice
bursts at the lower (normal) level as determined by BS power control.

SACCH blocks can be recognized by the channel type, since they're
always transmitted in specific frames of a multiframe.  FACCH blocks,
however, are not predictable and can substitute voice blocks at
(almost) any time.  Thus we need to mark FACCH bursts as such in
the logical channel handlers (using TRX_BR_F_FACCH).

Change-Id: Ie8a626fefccf1eb07271058e5126ec106cb1abcf
Related: SYS#5319
---
M include/osmo-bts/gsm_data.h
M include/osmo-bts/scheduler.h
M src/common/scheduler.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
6 files changed, 43 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 19689e5..fe2862d 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -421,6 +421,9 @@
 	struct gsm_power_ctrl_params ms_dpc_params;
 	struct gsm_power_ctrl_params bs_dpc_params;
 
+	/* Temporary Overpower for SACCH/FACCH */
+	uint8_t bs_acch_overpower_db;
+
 	struct msgb *pending_rel_ind_msg;
 
 	/* ECU (Error Concealment Unit) state */
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 80a260f..d640647 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -128,6 +128,8 @@
 	struct l1sched_meas_set meas_avg_facch;   /* measurement results for last FACCH */
 	uint16_t		ber10k_facch;	  /* bit error rate for last FACCH */
 
+	uint8_t			dl_facch_bursts;  /* number of remaining DL FACCH bursts */
+
 	/* encryption */
 	int			ul_encr_algo;	/* A5/x encry algo downlink */
 	int			dl_encr_algo;	/* A5/x encry algo uplink */
@@ -272,6 +274,8 @@
 	size_t burst_len;
 };
 
+#define TRX_BR_F_FACCH		(1 << 0)
+
 /*! DL burst request with the corresponding meta info */
 struct trx_dl_burst_req {
 	uint8_t flags;		/*!< see TRX_BR_F_* */
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index a07ef68..ffa0ed8 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1287,6 +1287,26 @@
 	return func(l1ts, &dbr);
 }
 
+static void trx_sched_apply_att(const struct gsm_lchan *lchan,
+				struct trx_dl_burst_req *br)
+{
+	const struct trx_chan_desc *desc = &trx_chan_desc[br->chan];
+	const uint8_t overpower_db = lchan->bs_acch_overpower_db;
+
+	/* Current BS power reduction value in dB */
+	br->att = lchan->bs_power_ctrl.current;
+
+	/* Temporary Overpower for SACCH/FACCH bursts */
+	if (overpower_db == 0)
+		return;
+	if (desc->link_id == LID_SACCH || br->flags & TRX_BR_F_FACCH) {
+		if (br->att > overpower_db)
+			br->att -= overpower_db;
+		else
+			br->att = 0;
+	}
+}
+
 /* process downlink burst */
 void _sched_dl_burst(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
 {
@@ -1326,7 +1346,7 @@
 
 	/* BS Power reduction (in dB) per logical channel */
 	if (l1cs->lchan != NULL)
-		br->att = l1cs->lchan->bs_power_ctrl.current;
+		trx_sched_apply_att(l1cs->lchan, br);
 
 	/* encrypt */
 	if (br->burst_len && l1cs->dl_encr_algo) {
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 9720b03..e31597b 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -148,6 +148,7 @@
 	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);
+	osmo_bts_set_feature(bts->features, BTS_FEAT_ACCH_TEMP_OVP);
 
 	bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB);
 
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 85fe207..8cf096d 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -547,10 +547,11 @@
 	}
 
 	/* encode bursts (prioritize FACCH) */
-	if (msg_facch)
+	if (msg_facch) {
 		gsm0503_tch_fr_encode(*bursts_p, msg_facch->l2h, msgb_l2len(msg_facch),
 			1);
-	else if (tch_mode == GSM48_CMODE_SPEECH_AMR)
+		chan_state->dl_facch_bursts = 8;
+	} else if (tch_mode == GSM48_CMODE_SPEECH_AMR)
 		/* the first FN 4,13,21 defines that CMI is included in frame,
 		 * the first FN 0,8,17 defines that CMR is included in frame.
 		 */
@@ -577,6 +578,11 @@
 
 	br->burst_len = GSM_BURST_LEN;
 
+	if (chan_state->dl_facch_bursts > 0) {
+		chan_state->dl_facch_bursts--;
+		br->flags |= TRX_BR_F_FACCH;
+	}
+
 	LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "Transmitting burst=%u.\n", br->bid);
 
 	return 0;
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index a1ed996..ea1060c 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -445,6 +445,7 @@
 	if (msg_facch) {
 		gsm0503_tch_hr_encode(*bursts_p, msg_facch->l2h, msgb_l2len(msg_facch));
 		chan_state->dl_ongoing_facch = 1; /* first of two TCH frames */
+		chan_state->dl_facch_bursts = 6;
 	} else if (chan_state->dl_ongoing_facch) /* second of two TCH frames */
 		chan_state->dl_ongoing_facch = 0; /* we are done with FACCH */
 	else if (tch_mode == GSM48_CMODE_SPEECH_AMR)
@@ -474,6 +475,11 @@
 
 	br->burst_len = GSM_BURST_LEN;
 
+	if (chan_state->dl_facch_bursts > 0) {
+		chan_state->dl_facch_bursts--;
+		br->flags |= TRX_BR_F_FACCH;
+	}
+
 	LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "Transmitting burst=%u.\n", br->bid);
 
 	return 0;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie8a626fefccf1eb07271058e5126ec106cb1abcf
Gerrit-Change-Number: 25284
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210927/cf7273d2/attachment.htm>


More information about the gerrit-log mailing list