# 05-14 LSR vs AA evaluation

Here are the results of the log scaled averaging I switched to yesterday. The plotted data consist of averages of 3500 received signal strengths taken over the course of 5 minutes. They combine RSSI values for all five peripherals.

In red are the average RSSI values of measurements taken at 50cm intervals (0.5m, 1m, 1.5m, 2m, etc.) The green line's curvature is based on the result of my log scaled antialiasing algorithm on the server side. The blue line's curvature is calculated using the least squares algorithm in GNUPlot, a statistical tool.

Logarithmically scaled RSSI{width=75%}

Here is the same chart of a single server for reference. The antialiased function seems less prone to drifting due to the outlier at 4.5m.

Least squares regression vs Antialiasing{width=75%}

# Problem

The constants I feed into the path loss model are inaccurate. At distances greater than 3.5m, the same RSSI value can be associated with very different distances due to the flattening of the graph. Consider the value -65: according to the blue function, the distance is 4m. Yet the green curve suggests that the distance for the same RSSI value is actually 5m. This is a very large difference.

# Path loss model:

Signal power is a function of the distance between the transmitter and receiver. describes the signal propagation potential of the room the sensors are in. is defined as the reference path loss at 1m distance. I currently derive it by averaging 70 RSSI measurements at said distance. The logarithmic nature of the PLM exaggerates errors at higher distances.

My statistical evaluation methods yield different results.

Linear regression

Anti-aliasing

# Solutions

In tomorrow's blogpost I outline a more detailed list of solutions that I will use.

# LS Regression in backend

Generally speaking linear regression is more accurate than taking averages. consistently is closer to the measurements than the anti-aliased versions.

# Smooth measurements with band filters

Since the incoming data is very noisy, a band filter can remove outliers and reduce the measurement error. The problem I see with this is that the RSSI tend to oscillate between two values with . This is already a very large margin that the band filter might have problems with.

# Smooth measurements with a Kalman Filter

The Kalman filter I was planning on implementing might improve the quality of the RSSI I receive. The problem with calculating a correct and will still persist nonetheless.

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