Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 2.49 KB

README.md

File metadata and controls

25 lines (20 loc) · 2.49 KB

Indoor-BLE-Positioning-System

Indoor positioning system using a network of 4 ESP32 Bluetooth Low-Energy (BLE) microcontrollers, a Tile BLE Beacon, and machine learning to identify which room the Tile is in. Each BLE Scanner posts the RSSI signal strength between the beacon and scanner to an API here. ML algorithm reads these values to get and post location here.

Components

  • 4 ESP32 microcontrollers (supporting BLE) connected directly to outlets around home. They run /esp32/BLE-Scan/BLE-Scan.ino from Arduino IDE plus esp32/BLE-Scan/Utilities.cpp. They scan every half-minute for 10 seconds according to a real-time API so that they are roughly synchronized. In each BLE Scan, the ESP32 searches for the MAC address of the Tile and POSTs the Received Signal Strength Indicator (RSSI) to the REST API in /api folder.
  • 1 Tile is used to advertise signal periodically. The Tile I used advertised via BLE about every 2 seconds. This required no configuration on my end.
  • REST API (hosted on Azure) in /api folder accepts POST requests to update RSSI readings, accepts GET requests to get readings, and accepts GET request to query the Azure ML HTTP endpoint for the predicted location with the POSTed RSSI readings.
  • Azure Machine Learning to train model on remote cluster and deploy HTTP endpoint.
  • API logging webpage (not hosted) to gather data in /api-logging folder. Folder stores webpage code and CSV data files.
  • Webpage to display location (hosted on Azure) in /webpage

ML Algorithm: Voting Ensemble

The algorithm with the highest accuracy (77.6%) was a Voting Ensemble of 7 classification algorithms.

Metrics:

Accuracy Macro AUC Weighted Precision Weighted Recall
0.776 0.961 0.809 0.766

Confusion Matrix: image

For every class but "hallway", the model was quite accurate, which makes sense. The precision score for the hallway was 0.6969 - relatively low.

References

This project was inspired by Filips's project Cat-Localizer in terms of hardware used and the general idea, but is otherwise entirely my work.