Professional Documents
Culture Documents
10.1007@978 981 15 2780 7 Pages 974 983
10.1007@978 981 15 2780 7 Pages 974 983
1 Introduction
Radio Frequency Identification (RFI) Device, or Ultra-Wideband [1, 2]. Out of these
techniques, BLE seems to be a better solution, especially with the introduction of
BLE iBeacon by Apple Inc. in 2013. iBeacon is a small, wireless device that can send
its advertisements to compatible smartphones in its proximity via BLE [3]. A great
number of recent research have focused on the use of beacons, since they are simpler
to deploy, more energy efficient, and low-cost compared to other technologies. Also,
as most of the smartphones on the market now support BLE, an iBeacon-based
indoor positioning system can be built and utilized as a localization app running on
smartphones.
Taking algorithms into consideration, the most popular method in iBeacon-based
indoor positioning is based on Received Signal Strength (RSS). This method can be
divided into two main approaches: trilateration and fingerprinting. The main problem
of RSS-based methods is the instability of the beacons’ RSS due to noises, multipath
fading, non-light-of-sight (NLOS), and other factors caused by the indoor environ-
ment [1, 2]. Another popular algorithm is Pedestrian Dead Reckoning (PDR), which
is based on sensors, such as accelerometers and magnetometers embedded in smart-
phones. The current position of the user can be computed from the sensors’ data.
The problem of PDR is that in a long tracking path, the sensors can drift over time
and lead to a high cumulative error [4, 5].
In order to achieve a more accurate indoor positioning system, recent studies tend
to fuse BLE beacon’s RSS-based methods with PDR. A number of studies [5, 6]
combine them by a particle filter; while others [7–9] use Kalman filter or extended
Kalman filter. In addition, a number of authors [10–12] fuse PDR, iBeacon, and
Wi-Fi fingerprinting.
Hence, there has been a lot of work that chose iBeacon—PDR fusion as the main
approach for indoor positioning. Most of them resulted in quite low positioning errors.
However, the algorithms in those works require complex and heavy computation.
This is not suitable especially if we want to implement the system as an app running
on a smartphone, as the app’s response time can be delayed due to those complex
algorithms. Therefore, the main aim of this paper is to design a fusion-based indoor
positioning system that not only provide fast, accurate real-time positioning services
on smartphones, but also can overcome the ever-present problems of iBeacon and
PDR-based techniques. To avoid heavy computation, we use a Kalman filter instead
of a particle filter, as the fusion algorithm to combine fingerprinting and PDR. In
fingerprinting, we build a multi-direction-database for its online phase, in order to
reduce the effect of NLOS. Also, we proposed an effective and lightweight algorithm
that we call “Distance-based Position Correction” to improve the user’s position
based on the beacon nearest to the user. In experiments, the proposed system is built
into an app running on an iPhone. It results in a low average positioning error of only
0.63 m.
The rest of the paper is structured as follows: Sect. 2 presents an overview and each
component of the system, in which we focus on our main contribution—the Distance-
based Position Correction algorithm. Next, we show the experimental results in
Sect. 3. Finally, Sect. 4 concludes the paper.
Indoor Positioning Using BLE iBeacon, Smartphone Sensors … 1009
2 Proposed System
The diagram of the proposed system is shown in Fig. 1. In order to integrate the system
into an iOS app running on an iPhone, we use two development frameworks provided
by Apple Inc., which are called CoreLocation and CoreMotion. These frameworks
allow us to read data from the beacons and from the smartphone’s embedded sensors
[13–16].
The sensors reading module is responsible for reading the heading direction and
acceleration values, which are provided by the magnetometer and accelerometer of
the smartphone. Let It = [xt , yt ]T be the two-dimensional position of the user at time
step t. In our study, the updated time (between t−1 and t) is 1 s. From the sensors’
data, the PDR-based position can be computed as follows:
˜It = Iˆt−1 + t cosθt (1)
t sinθt
where t is the user’s step length and θt is the heading direction at time step t. Thus,
in order to calculate the PDR-based position, we need to determine the following
information: the user’s step detection, step length, and heading direction.
For step detection, the acceleration values from the accelerometer are used.
According to Apple Inc., iOS devices’ accelerometers deliver acceleration mea-
surements in each of the three axes [16], as shown in Fig. 2. In the scenario of our
study, the user holds the smartphone on his/her hands so that the back of the phone
is opposite and parallel to the ground. Therefore, the vertical acceleration, a y , i.e.,
the acceleration measurement in the y-axis, is sufficient to detect the user’s step. A
double threshold is then applied for the vertical acceleration as follows:
Fig. 2 Three-axis +Y
accelerometer
-Z
-X
+X
+Z
-Y
Indoor Positioning Using BLE iBeacon, Smartphone Sensors … 1011
o o
270 90
o
180
O x
For step length, we let equal to a fixed value of 0.6 m. Finally, the user’s heading
direction θ is taken from the device magnetometer, and its value varies from 0 to
360°, as shown in Fig. 3.
As the iBeacon’s RSS value is heavily influenced by the indoor environment,
filtering the RSS values from each iBeacon is necessary. There are a number of
methods to filter the RSS, such as average filter, median filter, and Kalman filter [7].
In this work, we used a simple moving average filter with a window of 6 consecutive
RSS values to avoid heavy computation.
6
RSSk
RSSfiltered = k=0
n
(2)
The filtered RSS values are then used in fingerprinting, which consists of two
phases: offline phase and online phase. In the offline phase, we collect RSS data at
several location points on the indoor area. At each point, data is collected when we
stand in each of the four directions of the coordinates systems: 0, 90, 180, and 270°.
In other words, for a point, there will be four RSS vectors in total. Each RSS vector
includes the RSS values received from every iBeacon when we stand in one of four
directions. This will help reduce the effect of NLOS to iBeacons’ RSS values, as the
user’s body can block the signals from the iBeacons. There are four offline databases
in total, each one corresponds to each of four directions. Then, in the online phase,
based on the heading direction from the sensors reading module, the fingerprinting
module will choose the database corresponding to that heading direction. Finally, the
online RSS vector that the user’s device receives is compared with the vectors in the
chosen database using k-Nearest Neighbor (kNN) to predict the fingerprinting-based
position.
Finally, the sensor-based position and the fingerprinting-based position are fused
using a Kalman filter, which is similar to the works in [7–9].
1012 A. V.-T. Trinh et al.
Fig. 4 Distance-based
position correction scenario
Indoor Positioning Using BLE iBeacon, Smartphone Sensors … 1013
yc = axc + b (6)
With:
yb −y p
a= xb −x p (7)
yb −y p
b = yp − xb −x p
xp (8)
In addition, to ensure that the RSS value from the nearest iBeacon is stable and
reliable, the proposed algorithm will only be used when the distance d between the
user and that iBeacon is computed to be lower than 3 m, and when the user stands
still in a short amount of time (m seconds for example).
3 Experimental Results
the experiment in two cases, one with the proposed system that has the Distance-
based Position Correction algorithm, and another when the system does not have
the algorithm. The results collected from two different walking paths are shown in
Fig. 6.
In Fig. 6, the orange line indicates the true path, the blue line is the tracked path
with correction algorithm, and the gray line is the tracked path without it. In the
case of a simple walking path (Fig. 6a), without the correction algorithm, the system
performance results in a very high error of up to 5.49 m, with an average error of
1.99 m. This is due to the drift of PDR and mostly due to the instability of iBeacon
signals. However, with the correction algorithm, the performance is significantly
improved. The maximum error is reduced to 2.49 m, and the average error is only
0.63 m. In addition, the system also runs and responds well on the iPhone 5C.
With a more complex walking path (Fig. 6b), the results are similar. Without the
correction module, the maximum error is 5.03 m and the average error is 2.25 m. The
performance is again improved with the proposed algorithm, with the maximum and
average errors of 3.05 m and 0.90 m, respectively. A summary of our experimental
results including maximum error, average error, variance (VAR), and Mean Squared
Error (MSE) is given in Table 2.
Indoor Positioning Using BLE iBeacon, Smartphone Sensors … 1015
4 Conclusion
Acknowledgements This work has been supported by Vietnam National University, Hanoi (VNU),
under Project No. QG.19.25.
References
9. Chen Z, Zhu Q, Soh YC (2016) Smartphone inertial sensor-based indoor localization and
tracking with iBeacon corrections. IEEE Trans Industr Inf 12(4):1540–1549
10. Sung K, Lee DK, Kim H (2018) Indoor pedestrian localization using iBeacon and improved
Kalman filter. Sensors 18(6)
11. Zou H, Chen Z, Jiang H, Xie L, Spanos C (2017) Accurate indoor localization and tracking
using mobile phone inertial sensors, WiFi and iBeacon. In: 2017 IEEE international symposium
on inertial sensors and systems (INERTIAL), Kauai, HI, pp 1–4
12. Chen J, Zhang Y, Xue W (2018) Unsupervised indoor localization based on smartphone sensors,
iBeacon and Wi-Fi. Sensors 18(5)
13. Apple, Getting Started with iBeacon. Available https://developer.apple.com/ibeacon/Getting-
Started-with-iBeacon.pdf
14. Zafari F, Papapanagiotou I (2015) Enhancing iBeacon based microLocation with particle fil-
tering. In: 2015 IEEE global communication conference (GLOBECOM), San Diego, CA, pp
1–7
15. CoreLocation. Retrieved https://developer.apple.com/documentation/corelocation
16. CoreMotion. Retrieved https://developer.apple.com/documentation/coremotion