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-ttcn3-hacks/+/20727 ) Change subject: BTS_Tests: add TC_ms_pwr_ctrl_pf_ewma: test EWMA based power filtering ...................................................................... BTS_Tests: add TC_ms_pwr_ctrl_pf_ewma: test EWMA based power filtering This test case is very similar to TC_ms_pwr_ctrl_constant(), but the key difference that we simulate sharp UL RSSI changes between -50 dBm and -100 dBm on each iteration. The 'uplink-power-target' (-75 dBm) is right in the middle of the change range, so with EWMA filtering and 80% smoothing it's expected that all averaged UL RSSI values would be around -75 dBm. It's expected that the Uplink power level remains constant, however this test case fails at the moment. The problem is that the IUT is still quite sensitive to small deviations from 'uplink-power-target', so ideally we should introduce a 'delta' defining a range: 'uplink-power-target' - 'delta' ... 'uplink-power-target' + 'delta' in which the MS power loop should not trigger any power changes. For example, let's say: 'uplink-power-target' is -75 dBm (default), and 'delta' is 5 dBm, so then the range would be: -80 dBm ... -70 dBm. Change-Id: I3be1a4a4a0ab7eebb9a930eee7039295c045a791 Related: SYS#4916 --- M bts/BTS_Tests.ttcn 1 file changed, 74 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/20727/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 9503bec..6b61f04 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -6862,6 +6862,19 @@ return f_TC_ms_pwr_ctrl_cb_def(l1h, num_blocks); } +private function f_TC_ms_pwr_ctrl_cb_rssi_pwm(inout SacchL1Header l1h, integer num_blocks) +runs on ConnHdlr return octetstring { + /* UL RSSI oscillation driven by SACCH block number */ + if (num_blocks rem 2 == 0) { + f_trxc_fake_rssi(-100); + } else { + f_trxc_fake_rssi(-50); + } + + /* Make sure that MS power level remains constant */ + return f_TC_ms_pwr_ctrl_cb_const(l1h, num_blocks); +} + /* Make sure that MS power level remains constant when 'rx-current' equals 'rx-target' */ private function f_TC_ms_pwr_ctrl_constant(charstring id) runs on ConnHdlr { @@ -6919,6 +6932,66 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Test Exponentially Weighted Moving Average (EWMA) power filtering */ +private function f_TC_ms_pwr_ctrl_pf_ewma(charstring id) +runs on ConnHdlr { + var integer num_blocks := 16; + timer T := int2float(num_blocks); + + f_l1_tune(L1CTL); + RSL.clear; + + /* These IEs are needed for autonomous MS power control */ + var template (value) RSL_IE_List ies := { + t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ + ms_power := ts_RSL_IE_MS_Power(g_pars.l1_pars.ms_power_level) + }), + t_RSL_IE(RSL_IE_MS_POWER_PARAM, RSL_IE_Body:{ + ms_power_params := ts_RSL_IE_MS_Power_Parameters(''O) + }) + }; + + /* Ensure that 'rx-current' equals 'rx-target' */ + f_trxc_fake_rssi(mp_uplink_power_target); + + /* Establish a dedicated channel */ + f_est_dchan(more_ies := valueof(ies)); + + L1CTL.clear; + T.start; + alt { + [] as_TC_ms_pwr_ctrl(refers(f_TC_ms_pwr_ctrl_cb_rssi_pwm), num_blocks); + [] T.timeout { + setverdict(fail, "Not all SACCH blocks were processed in time, ", + num_blocks, " were not handled"); + } + } +} +testcase TC_ms_pwr_ctrl_pf_ewma() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + + f_init(); + + /* Explicitly configure EWMA filtering with 80% smoothing (alpha = 0.2) */ + f_vty_config(BTSVTY, "bts 0", "uplink-power-filtering algo ewma beta 80"); + /* Explicitly configure the Uplink power target (in dBm) */ + f_vty_config(BTSVTY, "bts 0", "uplink-power-target " & int2str(mp_uplink_power_target)); + + // for (var integer i := 0; i < sizeof(g_AllChanTypes); i := i + 1) { + for (var integer i := 0; i < 1; i := i + 1) { + pars := valueof(t_Pars(g_AllChanTypes[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": starting on ", pars.chan_nr); + + vc_conn := f_start_handler(refers(f_TC_ms_pwr_ctrl_pf_ewma), + pars, trxc_comp := true); + vc_conn.done; + } + + /* No need to reset Uplink power parameters - the IUT restarts anyway */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* test generation of RLL ERR IND based on Um errors (TS 48.058 3.9) */ /* protocol error as per 44.006 */ /* link layer failure (repetition of I-frame N200 times without ACK */ @@ -7102,6 +7175,7 @@ execute( TC_chopped_ipa_payload() ); execute( TC_ms_pwr_ctrl_constant() ); + execute( TC_ms_pwr_ctrl_pf_ewma() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20727 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3be1a4a4a0ab7eebb9a930eee7039295c045a791 Gerrit-Change-Number: 20727 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/20201018/6f84e7cc/attachment.htm>