# 05-13 Systematic errors in PLM constant derivations

Today I implemented the ideas from yesterday in ble-ips-rpi-client and ble-ips-api. During testing it became very evident that the RSSI between servers also wildly fluctuate. Now I only average the RSSI to get based on a single servers measurements. describes the slope and curvature of the logarithmic curve.

# Problem

Path loss model applied to server data{width=75%} In red are the average RSSI values at known distances. The blue curve uses a global calculated through averaging the values for at every single distance. The green curve's is calculated using least squares regression. The resulting curves look relatively similar.

Antialiasing:

Regression:

Path loss model applied to even more server data{width=75%} This data is very noisy and does not look logarithmic at all. The blue curve does not accurately describe the relation between the distance and RSSI. The least squares method works better with noisy data.

The main problem is that the data between the servers has large deviations. I cannot emphasize enough how hard it is to measure RSSI. Every graph plotted above is based on averaged values of ~750 measurements. In normal circumstances that would reduce random errors by a lot, but here they persist.

# Solution (Fixes for systematic errors)

# Run calibration tests with more servers

So far I only ran tests with a single server being calibrated for. Due to the improved speed of my calculations (process is automated, no excel spreadsheets etc.), it is viable to test with 3 or more servers to get a more accurate picture of the environment. Instead of taking 4 hours, it takes roughly 5 minutes.

# Average absolute values

A good friend of mine pointed out to me that I was averaging relative values to get the blue curve's . This is probably wrong, since the RSSI is measured in dBm. dBm are a logarithmic reference to a linear value in mWatt. For continuous wave signals like the sin wave, taking the average of the log and log scaling the average leads to the same result.

In noisy test measurements, the logarithmic average is not the same as the linear average. The logarithmic averaging of (unadjusted) RSSI measurements in dBm exaggerates power swings much more than linear averaging. Often times the RSSI measurements fluctuate between two values. If for example the oscillation is between -50 dBm and -60 dBm (50% of measurements are -50.0dBm, and 50% are -60.0 dBm), the log average is -55.0 dBm. But the log-scaled average given by conversion of dbm to mW is actually -52.6 dBm.

Due to the logarithmic nature of the path loss model, the power loss between 10m and 20m is only a few miliwatt so reducing statistical errors is paramount.

# Further actions

I will just go ahead and fix the things I listed above and see if it

  1. Reduces variance of plotted values
  2. Improves reliability of and for use in the log distance PLM.

Calibration setup with SSH connections

Last Updated: 11/23/2020, 9:42:47 PM