aboutsummaryrefslogtreecommitdiffstats
path: root/tests/power/bs_power_loop_test.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-08 18:57:21 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-01-08 20:14:00 +0100
commitef53ffe8bbc5a70518bb6bc9072655ec3a4d83c2 (patch)
treedd7e6276166abc04cda07a4824347cf463e37837 /tests/power/bs_power_loop_test.c
parentef99e366262b381773783ea45f50be7d59a42e8e (diff)
power_control: rework handling of DL RxQual measurements
This change makes BS power control loop: - take the lower RxQual threshold (L_RXQUAL_XX_P) into account, so the BS power is increased only if RxQual exceeds this threshold; - apply the configured increase step size instead of reducing the current attenuation by half. MS power loop is not affected, it does not even handle RxQual yet. Change-Id: Ib3c740b9a0f3ba5dfb027e144dc13f456cb26ae2 Related: SYS#4918
Diffstat (limited to 'tests/power/bs_power_loop_test.c')
-rw-r--r--tests/power/bs_power_loop_test.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/tests/power/bs_power_loop_test.c b/tests/power/bs_power_loop_test.c
index 06b53da4..7301b7f3 100644
--- a/tests/power/bs_power_loop_test.c
+++ b/tests/power/bs_power_loop_test.c
@@ -291,7 +291,7 @@ static const struct power_test_step TC_dtxd_mode[] = {
{ .meas = { DL_MEAS_FULL(0, 63), DL_MEAS_SUB(0, PWR_TEST_RXLEV_TARGET) } },
};
-/* Verify that RxQual > 0 reduces the current attenuation value. */
+/* Verify that high RxQual reduces the current attenuation value. */
static const struct power_test_step TC_rxqual_ber[] = {
/* Initial state: 16 dB, up to 20 dB */
{ .type = PWR_TEST_ST_SET_STATE,
@@ -301,25 +301,30 @@ static const struct power_test_step TC_rxqual_ber[] = {
{ .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 },
{ .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 },
- /* MS indicates target RxLev, but RxQual values > 0 */
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 2 },
- { .meas = DL_MEAS_FULL_SUB(4, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 4 },
- { .meas = DL_MEAS_FULL_SUB(1, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 8 },
+ /* MS indicates target RxLev, but RxQual values better than L_RXQUAL_XX_P=3 */
+ { .meas = DL_MEAS_FULL_SUB(1, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 },
+ { .meas = DL_MEAS_FULL_SUB(2, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 },
+ { .meas = DL_MEAS_FULL_SUB(3, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 },
- /* MS indicates target RxLev, and no bit errors anymore */
- { .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 8 },
- { .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 8 },
+ /* MS indicates target RxLev, but RxQual values worse than L_RXQUAL_XX_P=3 */
+ { .meas = DL_MEAS_FULL_SUB(4, PWR_TEST_RXLEV_TARGET + 0), .exp_txred = 16 - 4 },
+ { .meas = DL_MEAS_FULL_SUB(5, PWR_TEST_RXLEV_TARGET + 4), .exp_txred = 16 - 8 },
+ { .meas = DL_MEAS_FULL_SUB(6, PWR_TEST_RXLEV_TARGET + 8), .exp_txred = 16 - 12 },
+ { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET + 12), .exp_txred = 16 - 16 }, /* max */
+ { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET + 16), .exp_txred = 16 - 16 }, /* max */
- /* Reset state: 16 dB, up to 20 dB */
+ /* MS indicates target RxLev, but no bit errors anymore => reducing Tx power */
+ { .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET + 16), .exp_txred = 2 },
+ { .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET + 14), .exp_txred = 4 },
+ { .meas = DL_MEAS_FULL_SUB(0, PWR_TEST_RXLEV_TARGET + 12), .exp_txred = 6 },
+
+ /* Reset state: 0 dB, up to 20 dB */
{ .type = PWR_TEST_ST_SET_STATE,
- .state = { .current = 16, .max = 2 * 10 } },
+ .state = { .current = 0, .max = 2 * 10 } },
- /* MS indicates target RxLev, but RxQual values > 0 again */
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 2 },
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 4 },
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 8 },
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 16 },
- { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET), .exp_txred = 16 / 32 },
+ /* MS indicates target RxLev, but RxQual values worse than L_RXQUAL_XX_P=3 */
+ { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET) }, /* max */
+ { .meas = DL_MEAS_FULL_SUB(7, PWR_TEST_RXLEV_TARGET) }, /* max */
};
/* Verify that invalid and dummy SACCH blocks are ignored. */