Electronic – RSSI to distance moving average

electromagnetismsignal processing

I'm calculating distance from an RSSI, and as it seems to have quite a high variation I want to take an exponential moving average.

My question is: Where in this calculation is it most applicable to apply the moving average filter?

Do I want to take the moving average of:

  • the RSSI in dBm,
  • the power in pW,
  • the distance in m, or
  • something else?

Best Answer

Just "RSSI" is usually a logarithmic signal. As such, it is not appropriate for averaging. I think the most appropriate space for averaging is linear fields strength, proportional to volts/meter. That would be some constant to the power of RSSI.

So for each RSSI reading, do KRSSI, low pass filter those, then invert the low pass filtered value to get a rough idea of distance. Keep in mind that a lot of things effect signal strength than just distance. These include orientation of both the transmitting and receiving antennas, multi-path destructive or constructive interference, and absorption and blocking of things in the environment. You will get only a rough idea of distance at best. If you get within a factor of 2, then consider yourself lucky.