# 05-15 RSSI correction strategy

LSR applied on server data of 5 devices{width=75%} I was looking into ways of making the blue and green lines look better yesterday. My main concern was that my statistical evaluation of the incoming measurements was not accurate and thus, the green and blue lines are wrong. I see no immediate need to alleviate statistics issues about reconstructing a nice curve from the data. It is more pressing to fix the variance of the red dots above by changing the way I collect data and postprocess it.

# Solutions and further actions

# Signal diversity

Real time RSSI with no postprocessing BLE advertising uses three channels of different frequencies. The RSSI can be very different depending on which channel the packet was sent through, since the frequency deltas between them are fairly large. Averaging multiple RSSI values over all three channels makes use of time and frequency diversity. Placing a second antenna at least 6 cm apart (), spatial diversity would also improve the quality of the measurements. A rolling average with a window size of 20 measurements strikes an optimal balance between latency and accuracy.

# Select 3 Peripherals with highest RSSI

This method improves trilateration by taking only the RSSI of the 3 closest devices. Like this, far away beacons with their high RSSI variance are ignored and values with higher certainty are emphasizes. The position is calculated with least squares regression.

# Extended Kalman filtering

The array size of the kalman filter should be 10 measurements. Above and below, the precision decreases due to over / underfitting. Directly filtering the RSSI instead of trilaterated positions has reduced computational complexity and is cheaper. The results outperform trilaterated EKF.

The observation function is given by a matrix from the first reference RSSI to

The extended Kalman filter is suited for gaussian distributed measurements, which direct RSSI measurements are. The starting point for the filter can be chosen randomly. The RMSE of measurements increases linearly with distance, so again the farest distances should be ignored.

# Real time RSSI correction

A client anchor node is placed in the room as a second client. Since it does not move and it's position is known, the beacon can compute the difference between fluctuating RSSI and reference values in real time. The RSSI is adjusted for this delta and the channel hopping is filtered out. For this I will switch the 50 measurement upload limit for each client side request to upload each measurement in real time (maybe only for the anchor node). In the backend the incoming measurements will be stored in a FIFO style queue that has access to the fluctuations in real time.

The real time RSSI is given by

where is the RSSI correction offset and is the RSSI in real time.

The errors introduced by fluctuating transmitter power are eliminated. The gateway gets a distinct script that instructs it to record , the average time taken to achieve the average signal strength. It uploads the average and raw RSSI to server, so that the measured RSSI of the mobile blind client can be compared to it. It is corrected and then kalman filtered.

# Further actions

I will start off by implementing the correction algorithm with the second client. The reason for this is because the kalman filter takes the corrected RSSI as an input. I want to proceed in chronological order so that I do not waste time tweaking a system that is intaking "corrupted" data.

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