Change in osmo-bts[master]: power_control: implement EWMA based Uplink power filtering

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
Thu Oct 15 12:49:00 UTC 2020


Hello Jenkins Builder, Hoernchen, laforge, pespin, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/osmo-bts/+/20657

to look at the new patch set (#3).

Change subject: power_control: implement EWMA based Uplink power filtering
......................................................................

power_control: implement EWMA based Uplink power filtering

So far the Uplink power control loop did not filter the Uplink RSSI
measurements (reported by the BTS) at all.  The lack of filtering
makes our implementation too quick on the trigger, so in the real
deployments there will be unneeded Tx power oscillations.

In order to reduce this effect, let's implement a very simple EWMA
(also known as Single Pole IIR) filtering that is defined as follows:

  Avg[n] = a * Pwr[n] + (1 - a) * Avg[n - 1]

where parameter 'a' determines how much weight of the latest UL RSSI
measurement result 'Pwr[n]' carries vs the weight of the average
'Avg[n - 1]'.  The value of 'a' is usually a float in range 0 .. 1, so:

  - value 0.5 gives equal weight to both 'Pwr[n]' and 'Avg[n - 1]';
  - value 1.0 means no filtering at all (pass through);
  - value 0.0 makes no sense.

This formula was further optimized with the use of '+=' operator.
The floating point math was also eliminated by scaling everything
up (by 100).  For more details, see:

https://en.wikipedia.org/wiki/Moving_average
https://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter
https://tomroelandts.com/articles/low-pass-single-pole-iir-filter

The EWMA filtering is now *enabled by default*, but can be disabled
or (re-)configured over the VTY at any time:

  ! Completely disable filtering
  no uplink-power-filtering

  ! Enable EWMA smoothing with the given parameters
  uplink-power-filtering algo ewma beta <1-99>

Note that the VTY command expects 'beta' instead of 'alpha':

  alpha = (100 - beta)

and the value must be in %.  This is done for simplicity:

  1% means lowest smoothing,
  99% means highest smoothing.

Let's say we have EWMA filtering enabled with alpha = 0.4, and get
-98 dBm on the input, while the last output value was -60 dBm.
The new output would be:

  Avg[n] = 0.4 * Pwr[n] + 0.6 * Avg[n - 1]
  Avg[n] = (0.4 * -98) + (0.6 * -60)
  Avg[n] = -75.2 => around -75

Of course, this is not a silver bullet, but better than nothing.

Change-Id: Ib6dcadbf14ef59696c6a546bd323bda92d399f17
Related: SYS#4916
---
M include/osmo-bts/bts.h
M include/osmo-bts/gsm_data.h
M src/common/bts.c
M src/common/power_control.c
M src/common/vty.c
M tests/power/power_test.c
M tests/power/power_test.err
M tests/power/power_test.ok
8 files changed, 238 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/57/20657/3
-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib6dcadbf14ef59696c6a546bd323bda92d399f17
Gerrit-Change-Number: 20657
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201015/fac3ce92/attachment.htm>


More information about the gerrit-log mailing list