Project Files

Distance Estimation using Wireless Signal Strength

This project aims to investigate the relationship between distance and wireless signal strength; in hopes to accurately estimate the distance between objects given a wireless signal strength reading.

Data Collection

Procedure

11 markers were placed in a straight unobstructed line - each 1 meter apart from the next marker.
An access point (mobile phone) was placed at one end of the line. At each marker, a laptop was positioned - such that its USB WiFi adapter was in direct line of sight with the access point. Beacon frames were captured at each marker for one minute (60 seconds).

This capturing procedure was completed twice - once in an indoor environment and once in an outdoor environment.

Results

Indoor EnvironmentOutdoor Environment
Linear AverageLinear Average
Logarithmic AverageLogarithmic Average

Indoor Environment Averages

Distance (m)Average RSS (dBm)# Data Points
0-16.85530
1-50.01515
2-61.51631
3-67.62561
4-63.11544
5-59.89505
6-63.25603
7-64.67609
8-64.17487
9-71.35496
10-62.64548

Outdoor Environment Averages

Distance (m)Average RSS (dBm)# Data Points
0-21.32584
1-40.47631
2-55.18670
3-47.71711
4-62.47692
5-55.78678
6-57.84668
7-63.09691
8-64.46655
9-67.92662
10-62.67540

Data Fit

To model the data and to verify the distance estimation, 90% of the data was used to train the model, whilst the other 10% of the data was used as sample test data.

Indoor

Outdoor

Legend

  • Blue - Recorded data points
  • Red - Average data points
  • Green - Estimated distances

Naive Distance Estimation

For both indoor and outdoor environments; a linear regression fit was calculated from their sample data.
This linear regression fitted distance (X) to estimated RSS (Y). The formula for RSS to estimated distance was derived by re-ordering the linear regression curve formula.

  • Indoor Estimation - $ d_{indoor}(rss) = -(rss+44.936) / 2.797 $
  • Outdoor Estimation - $ d_{outdoor}(rss) = -(rss+38.521) / 3.303 $

Accuracy

Hit-rate has been defined as the percentage of data points in a distance class, whose distance estimation matches the recorded distance.

IndoorOutdoor

As shown by the hit-rates on both graphs, it is evident that the distance estimation formula is sub-optimal, and is not accurate over a wide range of RSS values. For both indoor and outdoor environments, the normalised mean square error was quite low.

The $R^2$ score for the indoor environment was only $0.38$, indicating a very poor fit.
As a result, many of the test RSS values for each distance class did not return the correct distance; the majority of distance classes had only (at most) 1 correctly estimated distance. This can be attributed due to RF interference within the house (i.e. microwaves and other wireless devices) - which had largely increased the variance of RSS values of each class.

The $R^2$ score for the outdoor environment was $0.62$, which indicated a slightly better fit - with many more distance classes being accurate to at least 10% of their test samples. It is however, still not a good fit for all values