More Accurate Beacon Locating Using AI Machine Learning

There’s new research in the Bulletin of Electrical Engineering and Informatics on Bluetooth beacons based indoor positioning in a shopping malls using machine learning. Researchers from Algeria and Italy improved the accuracy of RSSI locating by using AI machine learning techniques. They used extra-trees classifier (ETC) and a k-neighbours classifier to achieve greater than 90% accuracy.

A smartphone app was used to receive beacon RSSI and send it to an indoor positioning system’s data collection module. RSSI data was also filtered by a data processing module to limit the error range. KNN, RFC, extra trees classifiers (ETC), SVM, gradient boosting classifiers (GBC) and decision trees (DT) algorithms were evaluated.

The ETC model gave the best accuracy. ETC is an algorithm that uses a group of decision trees to classify data. It is similar to a random forest classifier but uses a different method to construct the decision trees. ETC fits a number of randomised decision trees on sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting. ETC is a good choice for applications where accuracy is important but the data is noisy and where computational efficiency is important.

Using Beacons for Intelligent In-Room Presence Detection

Most Beacon usecases involve putting beacons on things or in places and triggering notifications on users’ phones. There’s a paper by Yang Yang, Zhouchi Li and Kaveh Pahlavan of Worcester Polytechnic Institute (WPI), Worcester, MA that instead proposes Using iBeacon for Intelligent In-Room Presence Detection.

Their system records users in a room for applications such as graduate seminar check-in, security and in and out counting. It recognises in room presence by analysing path loss and door motion readings to decide whether a person is inside the room. Their custom app receives the beacon data and sends it to a server for analysis. They experimented using two iBeacons, one attached to the outside of the door with another mirroring at the inside and also as single iBeacon implementation that still performed well.

presencedetection

The paper also a useful chart showing the variation of RSSI with how a phone is held:

rssivspostion

Advantages of Real Time Location Systems (RTLS)

RTLS systems are used to track the location of objects or people, tagged with Bluetooth beacons, in real time. Some of the advantages of using a RTLS include:

  1. Improved efficiency: RTLS systems allow organisations to track the location of assets or personnel in real time, which can help improve the efficiency of operations. For example, a RTLS system can be used to track the location of equipment in a warehouse, allowing workers to quickly locate and retrieve items when needed.

  2. Enhanced safety: RTLS systems can also be used to improve safety in a variety of settings. For example, a RTLS system could be used to track the location of workers in a construction site, allowing supervisors to quickly respond to any safety incidents.

  3. Increased visibility: RTLS systems provide organisations with real-time visibility into the location of assets or personnel, which can help with decision making and resource allocation. For example, a RTLS system can be used to track the location of vehicles on a site, allowing managers to optimise routes and reduce fuel consumption.

  4. Improved asset utilisation: RTLS systems can help organisations to better utilise their assets, by providing real-time information about their location and availability. For example, a RTLS system could be used to track the location of equipment in a hospital, allowing better matching of demand with supply.

Overall, the main advantage of using a RTLS system is that it provides organisations with real-time information about the location of assets or personnel, which can help them to improve efficiency, enhance safety, and better utilise their resources.

Read about BeaconRTLS

Integrating Beacons into Existing Systems

There are three main ways beacons can be integrated into existing systems:

1. Using Smartphone Apps

Beacons are usually stationary. Apps on users’ smartphone use the standard Bluetooth iOS and Android APIs to detect beacons and send information to your cloud or servers, typically via HTTP(S).

2. Using Ethernet/WiFi Gateways

Beacons are using moving. Gateways in fixed positions detect beacons and send information to your cloud or servers, typically via HTTP(S) or MQTT.

3. Using an Intermediate Platform Such as a Real Time Location System (RTLS)

This is a variant on #2 in that gateways send information to a system such as BeaconRTLS™ or PrecisionRTLS™. These systems have HTTP(S) APIs that can be used by your cloud or servers.

More information:
What are beacons?
Beacons for the Internet of Things (IoT)

If you need more project specific help we also offer consultancy and feasibility studies.

Indoor Positioning Using iBeacon and ESP32

Bluetooth beacons advertising iBeacon can be used to perform indoor locating using trilateration. Trilateration is where three receivers are used to measure signal strength (RSSI) to calculate the position.

It’s possible to use ESP32 single board computers as Bluetooth receivers. The GitHub project iBeacon-indoor-positioning-demo has an example open source implementation. There’s also an accompanying blog post.

The implementation uses MQTT to send the data to a React app on a server where it’s displayed on a floorplan.

In practice, you might want to consider creating a more robust solution that uses Bluetooth gateways rather than ESP32 devices. There’s also the Bluetooth AoA Direction Finding standard that’s more accurate than using RSSI.

New Bluetooth Location Services Infographic

The Bluetooth SIG, who manage the Bluetooth standards, have a new infographic on location services based on figures from ABI Research.

Some insights:

  • The leading location services category is Retail and Services at 62%.
  • Smartphones are helping drive adoption.
  • There will be 35% compound annual growth in Bluetooth location devices from 2022 to 2026.
  • There will be 547,000 Bluetooth RTLS implementations by 2026.

Learn about BeaconRTLS™

View Bluetooth Beacons

Bluetooth AoA Direction Finding in the Cloud

We have had many enquiries from ISVs regarding the possibility of using AoA in the cloud. The idea is to use a location engine instance to allow their multiple customers to access AoA direction finding as a service.

Bluetooth AoA Direction finding works by having multiple locators that communicate with an on-site gateway that connects to the location engine. This is radio data so there’s lots of information sent very often. For large sites, there are multiple edge gateways. In most systems with more than a few assets, the gateway throughput becomes limited by the gateway hardware and the location engine processing input is limited mainly by the CPU capability.

The location engine has to do a lot of work. It implements computationally intensive radiogoniometry and anti-interference algorithms using data from multiple gateways.

In most cases, with large numbers of assets, the gateways and location engine are working near full capacity with the latency of the whole system being balanced against the number of assets.

While such a system can work in the cloud, the bandwidth and latency of the connection to the cloud means that it usually isn’t technically and financially viable. Sharing such a system across customers is even less viable. Instead, standalone systems have to be set up on-site to provide optimum performance.

Be aware that some ‘toy’ evaluation, as opposed to production, AoA systems perform the radiogoniometry and anti-interference algorithms at the gateway. While might work for a few assets, the gateway usually doesn’t have the processing power to scale to a production environment. Also, the gateway is only processing the radiogoniometry and anti-interference algorithms using data it has seen. Production grade radiogoniometry and anti-interference algorithms need to consider data from multiple gateways.

Read about PrecisionRTLS™

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%.