This document describes an indoor tracking system that uses Bluetooth Low Energy (BLE) devices and the K-Nearest Neighbor algorithm. The system was deployed in a laboratory measuring 990cm x 770cm. BLE scanners collected signal strength data from BLE beacons placed in the lab. Using the highest signal strength values from 3 scanners, the KNN algorithm estimated the region where the beacon was located. Testing found the system was able to accurately estimate the location region of target beacons.
2. used a reverse function to determine the location of an
object in indoor environment given a real-time RSS value.
They further commented that this technique often results in
a coarse measurements and troublesome calibration step to
build up the radio map. The technique started by setting grid
at the desired area. The next procedure will be taking
samples of RSS values at the different grid points and stored
in a database. However, the offline fingerprints data alone is
not enough to obtain an accurate and reliable prediction of
indoor position due to dynamic nature of the Wi-Fi or
Bluetooth RSSI signals. Once the system is brought online,
a localization algorithm has to be utilized to estimate an
online RSSI measurement with the offline fingerprints for a
more precise localization result.
3. Trilateration
Trilateration is another technique that is based on the RSSI
method, though it can also be based on other technique such
as Time of Arrival (ToA). In contrast to fingerprinting
technique which is an estimation approach, trilateration is a
mathematical approach that is currently applied in the GPS
system. Trilateration measures distances between 3 anchor
nodes with known position and 1 mobile device which the
position is to be found. It can be said that one of the benefits
of trilateration technique is that it does not require tedious
offline scene analysis, unlike fingerprinting technique [4].
The information needed for this technique is the position of
the anchor nodes, in order to estimate the position of the
mobile device. Theoretically, when one anchor node
received the RSSI from the mobile device, the possible
position of the mobile device will be any point on the
imaginary sphere formed with the distance as the radius and
the anchor node at the center. When the second node is
added to form the second sphere, the possible position of
mobile node is now narrowed down to the two intersection
points between the spheres. When third anchor node is
added, the only possible position of the mobile node is the
only intersection point between all the three imaginary
spheres formed with anchor node as center and distance
measured as radius. Multipath effect is often being observed
in different tests that applied trilateration technique [5].
III. EXISTING TECHNOLOGY
1. Wi-Fi
Wi-Fi is a trademark term registered under Wi-Fi Alliance
where it is defined under IEEE’s 802.11 standards as any
wireless local area network (WLAN) products. In the aspect
of indoor positioning, researchers had exploited the nature
of the Wi-Fi that sent its Service Set Identifier (SSID),
timestamps and RSSI in estimating the position of a mobile
device with Wi-Fi detection ability, for example a
smartphone. With this information in its signals, localization
technique such as fingerprinting, multilateration or even
ToA can be easily done. Another reason that gained the
attention of researchers towards the possibility of applying
Wi-Fi in IPS is that the Wi-Fi signal is commonly available
in in indoor environment nowadays and therefore the cost of
installation is low [6].
2. Bluetooth
Bluetooth is a wireless communication technology that
allows devices to transmit data over a short distance.
Developed in 1994, Bluetooth uses 2.4GHz frequency, the
same frequency as most of the other wireless technologies,
such as Wi-Fi. Bluetooth 4.0, which is more commonly
known as BLE, featured lower power consumption and
lower cost at a higher range, which attracted the attention of
researchers to be implemented in an IPS [7]. The low power
consumption feature allowed BLE to be one of the main
competitors of Wi-Fi for IPS, where one coin cell in the
BLE beacons can last up to a few years. Bluetooth uses 40
channels, each 2MHz wide spreading from 2.4GHz to
2.48Hz [8]. Only 3 channels that are labelled 37, 38 and 39
which center at 2.402GHz, 2.426GHz and 2.48GHz are the
advertising channels that commonly used to broadcast the
information in IPS applications. However, BLE signal is
easily interfered by other signals that use 2.4GHz such as
Wi-Fi. Nevertheless, it has been observed that the
performance and accuracy of BLE is higher compared to the
other method and it is found that the mean RSSI provides
the most accurate result for the localization [9].
3. Infrared
Infrared is considered as one of the earliest tools that
attempted to develop an IPS. Unlike Wi-Fi and Bluetooth
which operating principle is based on radio frequency, IR is
a type of electromagnetic wave that has shorter wavelengths
than radio frequency. IR is said to be more stable than most
of the other wireless technologies because the structure of
the room is not a concern [10]. However, IR is more suitable
to be used only in a room as its coverage is very low.
Another problem of IR is that it is vulnerable to sunlight,
but this problem can be neglected as there will be low
sunlight interference in most indoor environment.
Furthermore, due to IR signal is transmitted in a straight
line, clear LOS is the priority when using IR.
IV. METHODOLOGY
The aim of this project is to create an indoor positioning
system using Bluetooth Low Energy technology. In this
project, IGS01 Bluetooth scanner (Fig 1) and IGB01 BLE
beacon (Figure 2) manufactured by Ingics Technology [11]
is used to support the BLE functionality of the project. The
reason for choosing IGS01 Bluetooth scanner is because it
has built in Wi-Fi, where received message is supported
with various protocols and to be sent to server such as
Message Queuing Telemetry Transport (MQTT),
Transmission Control Protocol (TCP) and Hypertext
Transfer Protocol (HTTP). In this project, the MQTT
protocol of IGS01 is exploited and the received message is
published to the MQTT host on the public broker.
The BLE scanners are configured to connect to a Wi-Fi
modem that is prepared for the project purpose and also to
connect to a MQTT broker for data publication purpose.
Once activated, the scanners start to scan for Bluetooth
signals in the range of its effectiveness while publishing the
data to the MQTT broker in real time. The message that is
published include the ID of the scanner, the detected ID of
the beacons in the surrounding, the RSSI from the specific
beacon, the timestamp in epoch format and other raw packet
content which is not needed. The timestamp in epoch format
156
Authorized licensed use limited to: University of Exeter. Downloaded on June 24,2020 at 01:22:58 UTC from IEEE Xplore. Restrictions apply.
3. is converted into human readable format. However, this
scanner has no capability to filter and select a specific BLE
beacon. Therefore, specific beacon tracking process has to
be done in the data processing part
Fig 1: IGS01 BLE scanner Fig 2: IBS01 BLE beacon
.
Python is used for the data processing. Two separate
modules are developed for this system and they run
simultaneously to produce correct output for the system.
The first module retrieves data from the MQTT broker and
data storage in database. The second module retrieves the
data from the database to process and produces the
localization output. Ubuntu OS is used in the development
of this project. In this project SQL database serves as the
medium to store the data that is obtained from the MQTT
broker before the large amount of data is processed.
A laboratory with dimension of 990cm x 770cm is
converted into grids of 198 x 154 is to be used as the testing
venue. 10 BLE scanners are setup as shown in Fig 3. The
scanners are setup at a height of 1 m from the ground.
Fig 3: Plan of the laboratory with dimension and the distribution of
10 IGS01 BLE scanners with coordinate
For every second when the system is running, the system
retrieves data from the database where their time value
matches with the current time. The system then identifies
each data by the ID of the scanners that publish them, to
find the average RSSI values of all the 10 BLE scanners that
are deployed in the laboratory. The transmission interval of
the BLE beacon is set to be 100ms, therefore it is expected
that each scanner is able to detect 10 signals from the
targeted beacon in a second, if the beacon is in the
detectable area of the scanner.
Distance between each coordinate in the laboratory grid map
with every BLE scanners is calculated to produce arrays of
10 distance values. The calculation of distance is done by
using Euclidean distance formula:
= ( − ) + ( − ) (1)
For each of the 10 distance values, K-nearest neighbor
(KNN) algorithm in the Python code is used to find the 3
lowest average distance values. The 3 BLE scanners that
have the returned the mentioned 3 distance values are used
to represent that specific coordinate. Coordinate with same
representative of 3 BLE scanners are grouped together as a
region. The result is used to produce the theoretical region
map with 20 regions as shown in Fig 4. This procedure is
important to produce this region map as a reference for the
actual system to make a prediction on the region of the
targeted beacon, when 3 BLE scanners with highest RSSI
value are identified, assuming BLE scanners that return
higher RSSI values are nearer to the targeted beacon.
Fig 4: Classification of 20 regions in the laboratory.
Table I: The region and its respective combination of scanners
Region Combination Region Combination
1 [8,9,10] 11 [6,7,8]
2 [1,9,10] 12 [5,7,8]
3 [1,2,10] 13 [5,7,10]
4 [7,8,9] 14 [3,5,10]
5 [7,8,10] 15 [2,3,5]
6 [2,8,10] 16 [2,3,4]
7 [2,3,10] 17 [3,5,7]
8 [1,2,3] 18 [5,6,7]
9 [5,8,10] 19 [3,4,5]
10 [2,5,10] 20 [4,5,6]
Next, we carried out a test to observe the relationship
between RSSI value and scanner-beacon distance. The setup
consists of only 1 BLE scanner and 1 BLE beacon. RSSI
value is collected at different distance between the scanner
and beacon to plot a graph of RSSI VS Distance as shown in
Fig 5. An equation of y = 0.0052x2
- 0.7824x - 49.851 is
curved-fitted where y is the RSSI and x is the distance
between the BLE scanner and beacon. This equation can be
used for reversed calculation to predict the distance when
the RSSI data from the BLE scanner is obtained in the
system.
157
Authorized licensed use limited to: University of Exeter. Downloaded on June 24,2020 at 01:22:58 UTC from IEEE Xplore. Restrictions apply.
4. Fig 5: Graph of RSSI VS Distance
V. RESULTS AND DISCUSSIONS
During the experiment, the system recorded all readings
detected by the BLE scanner through MQTT broker every
second. The system then used the RSSI values obtained to
perform KNN to sort out the 3 strongest RSSI values. The 3
strongest RSSI values indicate the 3 scanners that were
nearest to the targeted beacon. The result was then be used
to predict the region of the targeted beacon every second.
100 sets of readings were obtained from each region to
investigate the reliability and accuracy of the system.
Reliability of the system is judged by the ability of the
system to make consistent estimation while the accuracy is
judged by the correctness of the estimation. For example, it
can be seen from Figure 6 that the system has made 2
correct estimations of Region 3, 1 wrong estimation at
Region 8 and 1 with no output. The reliability of the system
is calculated by the number of times the system is able to
make a estimation even if the prediction is incorrect, which
in this case 3 out of 4 iterations yield a reliability of 75%.
The accuracy on the other hand only looks at the number of
times the system is able to make a correct region estimation.
As mentioned previously, the estimation of Region 3 is a
correct estimation, therefore there are 2 success attempts to
make a correct estimation out of 4 iterations which give an
accuracy of 50%.
Fig 6: Results of a few iterations to show the output of the system
The system is tested for 3 times, where the beacon are
placed at 3 different grid locations, where the coordinates
are (30,130), (95,80) and (168,35) respectively. The location
of these coordinates in the laboratory are shown in Fig 7.
The results are calculated into reliability and accuracy to be
recorded in Table II and presented graphically in Fig 8.
Fig 7: The testing positions
Table II: Results obtained from the system
Coordinate Reliability Accuracy
(30,130) 98% 92%
(95,80) 98% 85%
(168,35) 97% 93%
Fig 8: Graphical representation of accuracy and reliability of the
system
The reliability of the system is investigated to optimize the
BLE scanners location in the laboratory. When the BLE
scanners are placed too near to each other, the system
reliability is jeopardized of the system and therefore the
system will never be able to make any estimation at all. The
result that is obtained will always be similar to the 36th
iteration in Fig 6 (no match of any of the region defined in
Table I). The reliability of the system is utmost important
compare to accuracy of the system. Because even if the
accuracy is not at a satisfactory level, enhancement effort to
improve accuracy still can possibly be done by intelligent
coding and algorithm, however there would be not much to
do if the system is not reliable.
As in Fig 8, it can be seen that the reliability of the system is
very good, being able to achieve more than 95 valid
estimation out of 100. This means that the system is able to
constantly generate valid estimation without fail. On the
other hand, for the accuracy of the system, it can be seen
that for the coordinates of (30,130) and (168,35), the
accuracy is considered very good with 92% and 93% of
accuracy respectively while for the coordinate of (95,80),
the accuracy slightly drops. This is because as referred to
Fig 4, the center part of the region map is more compact and
therefore it is highly possible that the system gives an
estimation of other nearby regions rather than the correct
prediction.
y = 0.0052x2 - 0.7824x - 49.851
-80
-75
-70
-65
-60
-55
-50
0 20 40 60 80
RSSI
Distance (unit)
RSSI VS Distance
0
50
100
30,130 95,80 168,35
Accuracy and Reliability of the system
Correct Estimation Acceptable Estimation Error
158
Authorized licensed use limited to: University of Exeter. Downloaded on June 24,2020 at 01:22:58 UTC from IEEE Xplore. Restrictions apply.
5. Next, using the formula of y = 0.0052x2
- 0.7824x - 49.851
described in the part III, the accuracy test for the system to
make an estimation of the actual position is carried out. By
using 3 distance values calculated from the 3 highest
average RSSI value, trilateration method can be applied to
estimate the actual position of the beacon. The system is put
into an iteration of 100 runs to obtain 100 estimated
coordinates. Then, the relative distance between each of the
coordinates and the actual coordinate are calculated to
produce the graph as shown in Fig 9. When the relative
distance between the predicted coordinate and the actual
coordinate is 0, it means that the estimation is accurate. As
seen from the graph, 42 correct estimations are made out of
100 iterations which can be said that the accuracy of the
system to make an exact prediction of coordinate is 42%.
The number of occurrence of the coordinates decreases as
the distance between the incorrect predictions and the actual
position increases.
Fig 9: Graph of frequency of occurrence vs relative distance
between predictions and actual coordinate
VI. CONCLUSIONS
As a conclusion, this project is able to utilize the
functionality of BLE scanners to setup an indoor positioning
system that is able to predict the region of the beacon in a
laboratory. The system are tested where beacon is placed at
3 different locations. It showed that the reliability of the
system is very good. On the other hand, the accuracy of the
system varies with location of the beacon. The accuracy
tends to be higher when the beacon is placed at the outer
part of the laboratory while lower when the beacon is placed
at the center part.
There are a few future works that can be done. For example,
applying w-KNN algorithm to the RSSI obtained in the
system so that instead of predicting regions, more precise
coordinate can be predicted.
REFERENCES
[1] Faheem Zahari, Athanasios Gkelias, Kin K. Leung, "A Survey of
Indoor Localization Systems and Technologies," IEEE
Communications Surveys & Tutorials (Early Access), pp. 1-1, 2019.
[2] Wen-Ching Chen, Kuo-Fong Kao, Yung-Tsang Chang, Chih-Hung
Chang, "An RSSI-based distributed real-time indoor positioning
framework," 2018 IEEE International Conference on Applied System
Invention (ICASI), pp. 1288-1291, 2018.
[3] W. K. Zegeye, S. B. Amsalu, Y. Astatke and F. Moazzami, "WiFi
RSS fingerprinting indoor localization for mobile devices," 2016
IEEE 7th Annual Ubiquitous Computing, Electronics & Mobile
Communication Conference (UEMCON), pp. 1-6, 2016.
[4] Mohd Ezanee Rusli, Mohammad Ali, Norziana Jamil, Marina Md
Din1, "An Improved Indoor Positioning Algorithm Based on RSSI-
Trilateration technique," 2016 International Conference on Computer
& Communication Engineering, pp. 72-77, 2016.
[5] Hwi-Hwan Kim, Byeong-Gwon Kang, "A study on the
implementation of a 3-dimensional positioning system on indoor
environments," 2014 International Conference on Advanced
Technologies for Communications (ATC 2014), pp. 750-753, 2014.
[6] Anum Hameed, Hafiza Anisa Ahmed, "Survey on indoor positioning
applications based on different technologies," 2018 12th International
Conference on Mathematics, Actuarial Science, Computer Science
and Statistics (MACS), pp. 1-5, 2018.
[7] A. Satan, "Bluetooth-based Indoor Navigation Mobile System," 2018
19th International Carpathian Control Conference (ICCC), pp. 332-
337, 2018.
[8] Ramsey Faragher and Robert Harle, "Location Fingerprinting with
Bluetooth Low Energy Beacons," IEEE JOURNAL ON SELECTED
AREAS IN COMMUNICATION, vol. 33, no. 11, pp. 2418-2428, 2015.
[9] Kevin Bouchard, Ramin Ramezani, Arash Naeim, "Features based
proximity localization with Bluetooth emitters," 2016 IEEE 7th
Annual Ubiquitous Computing, Electronics & Mobile Communication
Conference (UEMCON), pp. 1-5, 2016.
[10] Wanye Yao and Liqi Ma, "Research and Application of Indoor
Positioning Method Based on Fixed Infrared Beacon," 2018 37th
Chinese Control Conference (CCC), pp. 5375-5379, 2018.
[11] "INGICS Technology," [Online]. Available:
https://www.ingics.com/index.html. [Accessed 27 February 2020].
159
Authorized licensed use limited to: University of Exeter. Downloaded on June 24,2020 at 01:22:58 UTC from IEEE Xplore. Restrictions apply.