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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/21786 ) Change subject: power_control: add new structures and default parameters ...................................................................... power_control: add new structures and default parameters Change-Id: I7fb8ccb997490b40a061d09c241359aaabc37c4a Related: SYS#4918 --- M include/osmocom/bsc/bts.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bts.c M src/osmo-bsc/gsm_data.c 4 files changed, 140 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index d2f1307..7c988a8 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -470,6 +470,10 @@ /* osmocom specific FACCH/SACCH repetition mode flags set by VTY to * enable/disable certain ACCH repeation features individually */ struct abis_rsl_osmo_rep_acch_cap repeated_acch_policy; + + /* MS/BS Power Control parameters */ + struct gsm_power_ctrl_params ms_power_ctrl; + struct gsm_power_ctrl_params bs_power_ctrl; }; #define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i]) diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3472f39..f9d5736 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1269,4 +1269,74 @@ int bsc_sccp_inst_next_conn_id(struct osmo_sccp_instance *sccp); +/* 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; + }; +}; + +enum gsm_power_ctrl_dir { + GSM_PWR_CTRL_DIR_UL, /* MS Power Control */ + GSM_PWR_CTRL_DIR_DL, /* BS Power Control */ +}; + +enum gsm_power_ctrl_mode { + /* Do not send MS/BS Power Control IEs */ + GSM_PWR_CTRL_MODE_NONE = 0, + /* Send MS/BS Power IE only (with target level) */ + GSM_PWR_CTRL_MODE_STATIC, + /* Send MS/BS Power [Parameters] IEs (dynamic mode) */ + GSM_PWR_CTRL_MODE_DYN_BTS, +}; + +/* MS/BS Power Control Parameters */ +struct gsm_power_ctrl_params { + /* Power Control direction: Uplink or Downlink */ + enum gsm_power_ctrl_dir dir; + /* Power Control mode to be used by the BTS */ + enum gsm_power_ctrl_mode mode; + + /* Power change step size (dynamic mode only) */ + 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; +}; + +extern const struct gsm_power_ctrl_params power_ctrl_params_def; + #endif /* _GSM_DATA_H */ diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 0c7fde9..d5a848d 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -349,6 +349,14 @@ bts->repeated_acch_policy.rxqual = 4; + /* MS Power Control parameters (defaults) */ + bts->ms_power_ctrl = power_ctrl_params_def; + bts->ms_power_ctrl.dir = GSM_PWR_CTRL_DIR_UL; + + /* BS Power Control parameters (defaults) */ + bts->bs_power_ctrl = power_ctrl_params_def; + bts->bs_power_ctrl.dir = GSM_PWR_CTRL_DIR_DL; + return bts; } diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 28f7c27..0b5650f 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -966,3 +966,61 @@ return GSM48_RR_CAUSE_ABNORMAL_UNSPEC; } } + +/* Default MS/BS Power Control parameters (see 3GPP TS 45.008, table A.1) */ +const struct gsm_power_ctrl_params power_ctrl_params_def = { + /* Static Power Control is the safe default */ + .mode = GSM_PWR_CTRL_MODE_STATIC, + + /* Power increasing/reducing step size */ + .inc_step_size_db = 4, /* 2, 4, or 6 dB */ + .red_step_size_db = 2, /* 2 or 4 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) */ + + /* Increase {UL,DL}_TXPWR if at least LOWER_CMP_P averages + * out of LOWER_CMP_N averages are lower than L_RXLEV_XX_P */ + .lower_cmp_p = 10, /* P1 as in 3GPP TS 45.008, A.3.2.1 (case a) */ + .lower_cmp_n = 12, /* N1 as in 3GPP TS 45.008, A.3.2.1 (case a) */ + /* Decrease {UL,DL}_TXPWR if at least UPPER_CMP_P averages + * out of UPPER_CMP_N averages are greater than L_RXLEV_XX_P */ + .upper_cmp_p = 19, /* P2 as in 3GPP TS 45.008, A.3.2.1 (case b) */ + .upper_cmp_n = 20, /* N2 as in 3GPP TS 45.008, A.3.2.1 (case b) */ + + /* No averaging (filtering) by default */ + .algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_NONE, + + /* Hreqave: the period over which an average is produced */ + .h_reqave = 4, /* TODO: investigate a reasonable default value */ + /* Hreqt: the number of averaged results maintained */ + .h_reqt = 6, /* TODO: investigate a reasonable default value */ + }, + + /* RxQual measurement parameters */ + .rxqual_meas = { + /* Thresholds for RxQual (see 3GPP TS 45.008, A.3.2.1) */ + .lower_thresh = 0, /* L_RXQUAL_XX_P (BER < 0.2%) */ + .upper_thresh = 3, /* U_RXQUAL_XX_P (0.8% <= BER < 1.6%) */ + + /* Increase {UL,DL}_TXPWR if at least LOWER_CMP_P averages + * out of LOWER_CMP_N averages are lower than L_RXLEV_XX_P */ + .lower_cmp_p = 5, /* P3 as in 3GPP TS 45.008, A.3.2.1 (case c) */ + .lower_cmp_n = 7, /* N3 as in 3GPP TS 45.008, A.3.2.1 (case c) */ + /* Decrease {UL,DL}_TXPWR if at least UPPER_CMP_P averages + * out of UPPER_CMP_N averages are greater than L_RXLEV_XX_P */ + .upper_cmp_p = 15, /* P4 as in 3GPP TS 45.008, A.3.2.1 (case d) */ + .upper_cmp_n = 18, /* N4 as in 3GPP TS 45.008, A.3.2.1 (case d) */ + + /* No averaging (filtering) by default */ + .algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_NONE, + + /* Hreqave: the period over which an average is produced */ + .h_reqave = 4, /* TODO: investigate a reasonable default value */ + /* Hreqt: the number of averaged results maintained */ + .h_reqt = 6, /* TODO: investigate a reasonable default value */ + }, +}; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21786 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7fb8ccb997490b40a061d09c241359aaabc37c4a Gerrit-Change-Number: 21786 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy 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/20201221/1a1c2fd3/attachment.htm>