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.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/21904 )
Change subject: power_control: check-in new parameters and default values
......................................................................
power_control: check-in new parameters and default values
For the sake of simplicity, the old structures that are still used
by MS/BS power control loops are kept in place. Migration to the
new structures requires additional changes to the existing power
control logic, so it will be done in the follow-up changes.
The new parameters are integrated as follows:
+ struct gsm_bts - a BTS instance:
| Hard-coded default (fall-back) parameters for all transceivers.
|
+-+-> struct gsm_bts_trx - a TRX instance (transceiver):
| Default parameters for all logical channels inherited from
| 'struct gsm_bts' at start-up. May be overwritten by the
| BSC using ip.access specific 'Measurement Pre-processing
| Defaults' message on the A-bis/RSL interface.
|
+---> struct gsm_lchan - a logical channel (e.g. TCH or SDCCH):
Connection specific parameters inherited from 'struct
gsm_bts_trx'. May be overwritten by parameters sent
by the BSC in CHANnel ACTIVation and other messages.
Change-Id: I6d41eb238aa6d4f5b77596c5477c2ecbe86de2a8
Related: SYS#4918
---
M include/osmo-bts/bts.h
M include/osmo-bts/bts_trx.h
M include/osmo-bts/gsm_data.h
M src/common/bts.c
M src/common/bts_trx.c
M src/common/gsm_data.c
6 files changed, 107 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/04/21904/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 2edc20e..76ab7a4 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -321,10 +321,14 @@
bool vty_override; /* OML value overridden by VTY */
} radio_link_timeout;
- /* Uplink/Downlink power control */
+ /* Uplink/Downlink power control (legacy parameters) */
struct bts_power_ctrl_params ul_power_ctrl;
struct bts_power_ctrl_params dl_power_ctrl;
+ /* Default (fall-back) Dynamic Power Control parameters for all transceivers */
+ struct gsm_power_ctrl_params bs_dpc_params; /* BS Dynamic Power Control */
+ struct gsm_power_ctrl_params ms_dpc_params; /* MS Dynamic Power Control */
+
/* used by the sysmoBTS to adjust band */
uint8_t auto_band;
diff --git a/include/osmo-bts/bts_trx.h b/include/osmo-bts/bts_trx.h
index 08eaf65..4474903 100644
--- a/include/osmo-bts/bts_trx.h
+++ b/include/osmo-bts/bts_trx.h
@@ -32,6 +32,8 @@
struct trx_power_params power_params;
+ struct gsm_power_ctrl_params *bs_dpc_params; /* BS Dynamic Power Control */
+ struct gsm_power_ctrl_params *ms_dpc_params; /* MS Dynamic Power Control */
bool ms_pwr_ctl_soft; /* is power control loop done by osmocom software? */
struct {
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index fdd5ba3..b9e0e88 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -161,10 +161,65 @@
uint32_t fn;
};
-/* Depending on the context (MS or BS power control), fields 'current' and 'max'
- * reflect either the MS power level (magic numbers), or BS Power reduction level
- * (attenuation, in dB). Field 'avg100_rxlev_dbm' is always in dBm. */
+/* MS/BS Power related measurement averaging algo */
+enum gsm_power_ctrl_meas_avg_algo {
+ GSM_PWR_CTRL_MEAS_AVG_ALGO_NONE = 0x00,
+ GSM_PWR_CTRL_MEAS_AVG_ALGO_UNWEIGHTED = 0x01,
+ GSM_PWR_CTRL_MEAS_AVG_ALGO_WEIGHTED = 0x02,
+ GSM_PWR_CTRL_MEAS_AVG_ALGO_MOD_MEDIAN = 0x03,
+ /* EWMA is an Osmocom specific algo */
+ GSM_PWR_CTRL_MEAS_AVG_ALGO_OSMO_EWMA = 0x04,
+};
+
+/* MS/BS Power related measurement parameters */
+struct gsm_power_ctrl_meas_params {
+ /* Thresholds (see 3GPP TS 45.008, section A.3.2.1) */
+ uint8_t lower_thresh; /* lower (decreasing) direction */
+ uint8_t upper_thresh; /* upper (increasing) direction */
+
+ /* Threshold Comparators for lower (decreasing) direction */
+ uint8_t lower_cmp_p; /* P1 for RxLev, P3 for RxQual */
+ uint8_t lower_cmp_n; /* N1 for RxLev, N3 for RxQual */
+ /* Threshold Comparators for upper (increasing) direction */
+ uint8_t upper_cmp_p; /* P2 for RxLev, P4 for RxQual */
+ uint8_t upper_cmp_n; /* N2 for RxLev, N4 for RxQual */
+
+ /* Hreqave and Hreqt (see 3GPP TS 45.008, Annex A) */
+ uint8_t h_reqave;
+ uint8_t h_reqt;
+
+ /* AVG algorithm and its specific parameters */
+ enum gsm_power_ctrl_meas_avg_algo algo;
+ union {
+ /* Exponentially Weighted Moving Average */
+ struct {
+ /* Smoothing factor: higher the value - less smoothing */
+ uint8_t alpha; /* 1 .. 99 (in %) */
+ } ewma;
+ };
+};
+
+/* MS/BS Power Control parameters */
+struct gsm_power_ctrl_params {
+ /* Power change step size (maximum) */
+ uint8_t inc_step_size_db; /* increasing direction */
+ uint8_t red_step_size_db; /* reducing direction */
+
+ /* Measurement averaging parameters for RxLev & RxQual */
+ struct gsm_power_ctrl_meas_params rxqual_meas;
+ struct gsm_power_ctrl_meas_params rxlev_meas;
+};
+
+/* Default MS/BS Power Control parameters */
+extern const struct gsm_power_ctrl_params power_ctrl_params_def;
+
struct lchan_power_ctrl_state {
+ /* Dynamic Power Control parameters (NULL in static mode) */
+ const struct gsm_power_ctrl_params *dpc_params;
+
+ /* Depending on the context (MS or BS power control), fields 'current' and 'max'
+ * reflect either the MS power level (magic numbers), or BS Power reduction level
+ * (attenuation, in dB). */
uint8_t current;
uint8_t max;
bool fixed;
@@ -319,10 +374,14 @@
/* RTP header Marker bit to indicate beginning of speech after pause */
bool rtp_tx_marker;
- /* MS/BS power control */
+ /* MS/BS power control state */
struct lchan_power_ctrl_state ms_power_ctrl;
struct lchan_power_ctrl_state bs_power_ctrl;
+ /* MS/BS Dynamic Power Control parameters */
+ struct gsm_power_ctrl_params ms_dpc_params;
+ struct gsm_power_ctrl_params bs_dpc_params;
+
struct msgb *pending_rel_ind_msg;
/* ECU (Error Concealment Unit) state */
diff --git a/src/common/bts.c b/src/common/bts.c
index ba24497..de07957 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -330,7 +330,7 @@
bts->rtp_port_range_next = bts->rtp_port_range_start;
bts->rtp_ip_dscp = -1;
- /* Default UL/DL power control parameters */
+ /* Default UL/DL power control parameters (legacy) */
bts->ul_power_ctrl = bts->dl_power_ctrl = \
(struct bts_power_ctrl_params) {
.target_dbm = -75,
@@ -346,6 +346,10 @@
}
};
+ /* Default (fall-back) MS/BS Power control parameters */
+ bts->bs_dpc_params = power_ctrl_params_def;
+ bts->ms_dpc_params = power_ctrl_params_def;
+
/* configurable via OML */
bts->load.ccch.load_ind_period = 112;
load_timer_start(bts);
diff --git a/src/common/bts_trx.c b/src/common/bts_trx.c
index 38fb90a..9fc18e4 100644
--- a/src/common/bts_trx.c
+++ b/src/common/bts_trx.c
@@ -113,6 +113,10 @@
if (trx->nr != 0)
trx->nominal_power = bts->c0->nominal_power;
+ /* Default (fall-back) Dynamic Power Control parameters */
+ trx->bs_dpc_params = &bts->bs_dpc_params;
+ trx->ms_dpc_params = &bts->ms_dpc_params;
+
llist_add_tail(&trx->list, &bts->trx_list);
return trx;
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index 978edc4..44ed7e9 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -420,3 +420,31 @@
return -1;
}
}
+
+/* Default MS/BS Power Control parameters (see 3GPP TS 45.008, table A.1) */
+const struct gsm_power_ctrl_params power_ctrl_params_def = {
+ /* Power increasing/reducing step size */
+ .inc_step_size_db = 4, /* FIXME: PWR_RAISE_MAX_DB */
+ .red_step_size_db = 8, /* FIXME: PWR_LOWER_MAX_DB */
+
+ /* RxLev measurement parameters */
+ .rxlev_meas = {
+ /* Thresholds for RxLev (see 3GPP TS 45.008, A.3.2.1) */
+ .lower_thresh = 32, /* L_RXLEV_XX_P (-78 dBm) */
+ .upper_thresh = 38, /* U_RXLEV_XX_P (-72 dBm) */
+
+ /* NOTE: only Osmocom specific EWMA is supported */
+ .algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_OSMO_EWMA,
+ .ewma.alpha = 50, /* Smoothing factor 50% */
+ },
+
+ /* RxQual measurement parameters */
+ .rxqual_meas = {
+ /* Thresholds for RxQual (see 3GPP TS 45.008, A.3.2.1) */
+ .lower_thresh = 3, /* U_RXQUAL_XX_P (0.8% <= BER < 1.6%) */
+ .upper_thresh = 0, /* L_RXQUAL_XX_P (BER < 0.2%) */
+
+ /* FIXME: RxQual averaging is not yet implemented */
+ .algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_NONE,
+ },
+};
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21904
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6d41eb238aa6d4f5b77596c5477c2ecbe86de2a8
Gerrit-Change-Number: 21904
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/20201230/e2716c5b/attachment.htm>