Using AI Machine Learning to Improve Ranging Accuracy

There’s new research from Oregon State University, USA and Peking University, Beijing, China on A Machine Learning Approach to Improve Ranging Accuracy with AoA and RSSI.

System Workflow

Machine learning was used to determine the line-of-sight distance in a multipath (reflective) environment. Due to the multipath effect, acquired signals indoors have complex mathematical models. A machine learning Artificial Neural Networks (ANN) is the most efficient way to process these signals.

The system achieved accuracy where 75% of the errors were less than 0.1 m with a median error of 0.037 m and a mean error of 0.092 m. This reduced ranging errors to under 10cm. The researchers were able to achieve high-precision indoor ranging without the need for a wide signal bandwidth nor synchronisation. The system was also simple and low cost to deploy due to low complexity of the equipment.

Making an iBeacon Using ESP32

Circuit Digest has a new tutorial ESP32 based Bluetooth iBeacon. ESP32 is a small single board computer that can easily be programmed to do different tasks. Many ESP32 boards include Bluetooth so it’s possible to program them to be an iBeacon.

The article first explains how to detect beacons on Android using nRF Connect. This is similar to our post Testing if a Beacon is Working. There’s also a useful table that explains the different ranges for received signal strength (RSSI):

Creating your own beacons means you can customise the advertising and do other IoT-related things at the same. The downside is bare ESP32 boards aren’t as physically robust, easy to configure nor power friendly as a dedicated beacon.

View iBeacons

The Problems of Using Bluetooth RSSI

There’s some older but nevertheless useful research from Chung-Ang University, Seoul, Republic of Korea on A Measurement Study of BLE iBeacon and Geometric Adjustment Scheme for Indoor Location-Based Mobile Applications.

The research looks into detecting beacons on smartphones and using the received signal level (RSSI) to infer distance. The aim was to understand the nuances of the variation of signal to be able to create an automatic attendance checker system.

The researchers looked into the differences between iOS and Android phones, the affect of device placement height, differences between iBeacons from different manufacturers, the affect of reducing to minimum transmit (Tx) power, indoors versus outdoors and the affect of obstacles and WiFi.

iOS showed notably shorter maximum distances of 85 meters and the difference between the maximum distances of iOS and Android turned out to be very large. RSSI readings on Android phone decreased more gradually with distance while iOS showed a sudden drop in RSSI after 10 meters. RSSI readings on the Android platform had more temporal (stability) variation than iOS.

The researchers found it difficult to create a model that could take into account all the variations of RSSI. They said:

We believe that our work provides evidence on the challenges for designing an indoor localization system using commercial-off-the-shelf (COTS) iBeacons devices.


The researchers were trying to create a very accurate RSSI-based system that could use any smartphone and any beacon manufacturer. This isn’t possible. Instead, accuracy has to be compromised, hardware restricted or a different technique used.

Most RSSI systems such as these use gateways rather than smartphones to perform Bluetooth scanning. This removes the smartphone model variability. Using only one beacon model reduces variability.

Newer Bluetooth Direction Finding provides a newer way than RSSI to obtain much better accuracy.

Bluetooth RSSI Measurement for Indoor Positioning

There’s a research paper by researchers from Taiwan on A practice of BLE RSSI measurement for indoor positioning. The paper looks into received signal strength (RSSI) to distance conversion, the significance of antenna plane (orientation) and measurements in two different situations, a low noise classroom and a more noisy manufacturing site workshop.

Techniques employed included developing a signal propagation model, trilateration, modification coefficients and Kalman filtering.

The hardware used included an Arduino Nano 33 (Bluetooth 5) and Linkit 7697 (Bluetooth 4.2). Over 1.6 million samples were collected generating over 13Mb of data.

“Multiple factors affected the RSSI, such as the device performance, antenna direction and radio wave refraction”

A positional accuracy of 10cm was achieved in ideal conditions dropping to meter level accuracy in more challenging setups and environments. The sensitivity of the (ceramic) antenna was found to fluctuate widely with orientation/topology. The researchers concluded that the key factor for reliable indoor positioning, based on RSSI, is maintaining good signal measurement quality.

Fingerprinting Positioning Using Multiple Advertising Slots

There’s interesting research from Spain on Multi-Slot BLE Raw Database for Accurate Positioning in Mixed Indoor/Outdoor Environments. It looks into fingerprinting with beacons simultaneously advertising six slots rather than one slot.

Fingerprinting is where you first measure the signal levels at various known points and then later compare new data with the old to work out the position. This is usually performed with one signal from each beacon. The researchers increased this to six signals to attempt to improve positional accuracy.

Tests were performed at the campus of the University of Extremadura in Badajoz in the Physics and Mathematics buildings and also outside. Beacons were set up to transmit four slots using the Eddystone protocol and two using the iBeacon protocol. Different transmit powers were used for each slot. Measurements were performed using three different smartphones with a custom developed Android application. The resultant data is available on Zonodo.

The researchers compared a simple Nearest Neighbours algorithm (NN) using all the slots, the one slot with the highest transmission power and the average of all slots from the same beacon. The results showed that using all the slots or just one per beacon gives similar results for accuracy, floor, and Tag ID recognition. Results using the averaged values increased the accuracy by 10%.

Beacon Signal Stability Observations

As previously mentioned, we perform signal strength and stability tests across beacons. The data feeds into our consultancy work. Here are some high level observations.

The following graph shows the standard deviation of the RSSI @ 1m, for some of our beacons, measured over a 60 second time period:

beaconsignalstability

Smaller bars are better and represent beacons
whose RSSI varied the least over time.

We found that beacons belonged to one or two groups. Firstly those with very stable RSSI and secondly those with an RSSI that had a standard deviation between about 4 and 6 dBm.

Signal stability is more important when you are using the RSSI to infer distance, either directly from the RSSI itself or indirectly via, for example, the iOS immediate, near and far indicators. RSSI varying without a change of distance might cause more spurious triggering. However, you should keep in mind that environmental factors can often cause variation much larger than the 4 to 6 dBm found in this test. Moving obstacles, for example people, will cause significant variation in RSSI.

Bluetooth LE advertising moves pseudo-randomly between radio channels. The channels use different radio frequencies that, in turn, results in fading of the signal at different distances. We experienced and mitigated similar behaviour in our LocationEngine™. Different radio frequencies experience different constructive and destructive interference at different physical locations. Beacons that move more between channels can cause more rapidly varying received signal strength (RSSI).

Processing iBeacon RSSI Using AI Machine Learning

There’s new research from China on Regional Double-Layer, High-Precision Indoor Positioning System Based on iBeacon Network.

The project used extended Gaussian filtering to delete and filter significant abnormal data values caused by multipath radio noise indoors. A deep neural network was also used to fingerprint data.

The system resulted in a maximum error positional error of only 1.02m.

Using iBeacon for Team Management

There’s useful research by Sindhumol S of Cochin University of Science and Technology, India on Implementation and Analysis of a Smart Team Management System using iOS Devices as iBeacon.

The system provides location-based task monitoring and presence detection. Task details and announcements are available when a team member enters the range of an iBeacon broadcast. The system also provides typical project management facilities such as task allocation, notification, instant chat, status reports and employee logs.

From a technical perspective, the paper describes setting the beacon measure power, the affect of distance change on accuracy and the change in accuracy/RSSI depending on obstacle blocking.

View iBeacons

Finding the Nearest Beacon

There’s new research from Faculty of Electrical Engineering and Computer Science, University of Maribor, Slovenia on Improved Bluetooth Low Energy Sensor Detection for Indoor Localization Services.

While there has been lots of research into server-side processing to improve location accuracy, this research instead looks into improving accuracy locally, in terms of finding the nearest beacon. This kind of processing is often needed where smartphone apps provide users with contextual information based on their location, for example, in museums.

It’s not possible to use the raw received signal strength (RSSI) because it changes frequently due to changes in blocking and reflection in a room. Any errors in determining the correct transmitter can cause errors in displaying relevant information which, in turn, leads to a poor visitor user experience.

The study involved use of iBeacons detected by Android smartphones, both in a controlled room with three obstacles and a real-world setting Expo Museum.

The proposed algorithm stabilised the RSSI by considering previous measurements to filter out sudden fluctuation of the RSSI signal or the rapid movement of the mobile device. The smartphone’s accelerometer was also used dynamically change the scan interval based on the user’s movement.

In the controlled room, the proposed algorithm had a 14.29% better success rate than a standard algorithm using the raw RSSI values. It performed particularly (20%) better in spaces having medium or high density of physical obstacles. It also performed better in the real-world Expo environment with a success rate of 95% compared to 87% with a standard algorithm.

Using Bluetooth RSSI for Visually Impaired Navigation

There’s new research from the University of Bristol on Outdoor Localization Using BLE RSSI and Accessible Pedestrian Signals for the Visually Impaired at Intersections.

The idea is to use Bluetooth received signal strength (RSSI) to enable the blind and visually impaired (BVI) to safely to cross intersections on foot. Audible systems already exist but users find them confusing when crossing complex road intersections. The researchers developed a system called CAS (Crossing Assistance System) that provides pedestrian positioning.

The system uses k-nearest neighbors (kNN) method Support Vector Machine (SVM) with various RSSI features for classification, including a moving average filter, that was able to localise people with 97.7% accuracy.