Fusing Bluetooth Beacon Data with Wi-Fi Radiomaps for Improved Indoor Localization

Indoor user localization and tracking are instrumental to a broad range of services and applications in the Internet of Things (IoT) and particularly in Body Sensor Networks (BSN) and Ambient Assisted Living (AAL) scenarios. Due to the widespread availability of IEEE 802.11, many localization platforms have been proposed, based on the Wi-Fi Received Signal Strength (RSS) indicator, using algorithms such as K-Nearest Neighbour (KNN), Maximum A Posteriori (MAP) and Minimum Mean Square Error (MMSE). In this paper, we introduce a hybrid method that combines the simplicity (and low cost) of Bluetooth Low Energy (BLE) and the popular 802.11 infrastructure, to improve the accuracy of indoor localization platforms. Building on KNN, we propose a new positioning algorithm (dubbed i-KNN) which is able to filter the initial fingerprint dataset (i.e., the radiomap), after considering the proximity of RSS fingerprints with respect to the BLE devices. In this way, i-KNN provides an optimised small subset of possible user locations, based on which it finally estimates the user position. The proposed methodology achieves fast positioning estimation due to the utilization of a fragment of the initial fingerprint dataset, while at the same time improves positioning accuracy by minimizing any calculation errors.


Introduction
In the Internet of Things (IoT) and Body Sensor Networks (BSN), several scenarios envision the integration of various wireless technologies that will provide services based on the user behaviour [1,2]. Typical scenarios enabled by BSN technologies, include m-Health, e-Sport, e-Fitness, and e-Wellness. In all these applications, numerous programmable wireless sensors, with enhanced capabilities, are combined and configured in order to directly monitor several parameters in a non-invasive way [3]. A comprehensive and systematic review of the state-of-the-art techniques on multi-sensor fusion in the BSN research area is provided in [4]. Nowadays, where user profiling is very important, user localization and tracking are instrumental to a broad range of such services and applications [5][6][7][8] Wireless Indoor Positioning Techniques have been surveyed in [9][10][11][12], while key approaches on Visual Light Positioning Systems (VLP) were discussed in [13]. Among all of these, fingerprint-based positioning is one of the most popular indoor localization techniques implemented by Real-Time Localization Systems (RTLS).
Localization applications implementing fingerprint methods can find use in malls, for navigating people and providing marketing alerts; in hospitals, for monitoring patients, doctors and critical equipment; in logistics, for tracking assets and optimizing empty spaces in ports or inland storages; and in homes, for Ambient Assisted Living (AAL) services [14]. The main advantage of fingerprinting techniques is that they can utilize the existing wireless communication infrastructures, without the need to deploy any additional, specialized equipment. The dataset of fingerprints, called a "radiomap", is the basis behind the positioning algorithms. Radiomaps can be generated rapidly and at a relatively low cost, particularly when a deterministic radio propagation simulator is used, instead of performing costly and lengthy measurement campaigns [15]. Fingerprinting requires both an offline and an online phase. During the offline phase, the radiomap is generated by recording the Access Points (AP) RSS values (that can be either measured or obtained through a simulator) for each location in the area of interest. Calibration and training techniques are usually used during this phase, in order to improve the quality of the radiomap [16]. During the online phase, the Mobile Station (MS) performs network discovery as well as real-time RSS measurements. Different positioning algorithms are then applied in order to identify the best match between the observed RSS fingerprint and the respective mean value of the fingerprints recorded during the offline phase. An overview of the most significant fingerprint-based methods is provided in [17].
New opportunities in user's localization and indoor positioning have emerged with the introduction of Body Sensor Networks and smart devices that are able to support several IEEE technologies like 802.15.4 and IEEE 802.11 technologies. A promising research direction is based on Visual Light Positioning (VLP). In this case, positioning accuracy can be achieved only through dense smart light grids, thus incurring excessive infrastructure costs [12]. In addition, mobile users need to have a line-of-sight with smart lights while their smart devices have to support the required technology and provide the necessary processing power [18]. On the other hand, by combining existing well-established Wi-Fi positioning systems with Bluetooth Low Energy (BLE) i-beacons, an excellent opportunity is created to enhance the user's localization accuracy. This approach can make fingerprinting even more favourable, particularly in smart homes, since localization accuracy can be pursued by deploying only a small number of low-cost BLEs on top of the existing Wi-Fi infrastructure. This is, in fact, the methodology pursued in this paper, whereby we introduce a new method to combine BLE with Wi-Fi fingerprint positioning, in order to significantly improve the achieved localization accuracy.
The rest of the paper is organised as follows: Section 2 presents related work on radio RSS fingerprint-based methods and summarizes the BLE technology. We introduce our method in Section 3, explaining the rationale for the formulation of the i-KNN algorithm. Sections 4 and 5 describe the testing methodology and performance evaluation that is based on both simulations and actual measurements. Finally, Section 6 draws the conclusions and makes suggestions for future work.

Radio RSS Fingerprint-Based Indoor Positioning Methods
RSS fingerprint-based positioning methods are utilized in various wireless technologies (IEEE 802.11,IEEE 802.15.4,etc.). The main advantage of these methods is the relatively low complexity of the positioning system, which utilizes existing infrastructure, rather than requiring the deployment of specialized equipment. The positioning algorithms retrieve the RSS at the user location and implement either deterministic or probabilistic methodologies to estimate the actual user location. The concept that lies behind both methodologies is common; searching a database of fingerprints and identifying one or more positions whose RSS signature has the highest similarity with the observed one. More specifically, deterministic positioning methods estimate location as a convex combination of the K reference locations with the shortest distance between r i and s in the n-dimensional space [19][20][21]. The aforementioned statement is mathematically expressed with the following equation: The set { 1 , . . . , l } denotes the ordering of reference locations with respect to increasing distance D i , which is measured between the respective database fingerprint r i and the observed measurement during positioning s, i.e., D i = r i − s . The distance can be calculated using standard norms, such as the Manhattan (1-norm) [22], the Euclidean (2-norm) [23] or the Mahalanobis norm [24]. Focusing on the Euclidean distance, D i can be expressed by the following equation: The non-negative weight coefficient w i in Equation (1) represents a value that can be allocated to each reference location in the radiomap and differentiates its weight, hence its importance from other fingerprints. In other words, the value of this w i coefficient may vary in a way that each fingerprint influences differently the positioning estimation. In such a case of weight allocation, Equation (1) expresses the Weighted K-Nearest Neighbour (WKNN) algorithm [22]. A typical value for w i can be the inverse of r i − s . Simplifying the aforementioned algorithm, it can be assumed that equal weights are allocated to all utilized fingerprints. Such an assumption results in the elimination of w i and the equation is converted to the K-Nearest Neighbour (KNN) method. Finally, setting K = 1, the formula leads to the simple Nearest Neighbour (NN) method [23,25]. According to [22,23], KNN and WKNN methods provide higher positioning accuracy compared to the NN, for K = 3 and K = 4. On the other hand, NN seems to perform satisfactorily and provides equally good results in scenarios with high density RSS radiomaps [19]. More complex deterministic algorithms are discussed in literature, such as the linear discriminant analysis [26] and the Database Correlation Method (DCM) [27]. They generally claim better localization accuracy but at a higher computational cost.
In probabilistic methods, location can be estimated by calculating and maximising the conditional posterior probabilities p( i |s), where i = 1, . . . , l, given an observed point s and a reference radiomap of l fingerprints.
The posterior probability p( i |s) is obtained by applying Bayes' rule: where p(s| i ) is a conditional probability calculated through statistics at the survey stage and p( i ) is the a priori probability, a weighting factor based on the probability distribution of the observation over the reference position candidates included in the fingerprint database. In case of no prior knowledge, this prior is assumed to be unity, meaning that all fingerprint candidates have equal a priori probability. Probabilistic methods have been used in the Maximum A Posteriori (MAP) approach [28] and the Minimum Mean Square Error (MMSE) approach [29] to estimate the expected value of . In a continuous effort for improving localization accuracy in fingerprint-based systems, the research community investigated the fusion of data retrieved by the indoor mapping of buildings. Towards this direction, Evennou et al. in [30] proposed the use of particle filters to make use of the inherent structure of indoor environments, while, more recently, Kokkinis et al. in [21], proposed a method of imposing map-constraints into the positioning algorithms in the form of a-priori knowledge. Finally, the fusion of information received by several sources was examined in [31], while the incorporation of wearable devices for indoor localization was also investigated in [14].

BLE and the iBeacon Technology
BLE was introduced as part of Bluetooth 4.0 specifications, allowing the devices to support both BLE and classic Bluetooth protocols simultaneously [32]. The power efficiency of Bluetooth with low energy functionality was especially created for IoT applications. It allows devices to run for long periods on extremely low power sources, such as coin-cell batteries or energy-harvesting devices.
BLE operates at 2.4 GHz and uses Gaussian Frequency Shift Key (GFSK) modulation in 40 channels of 2 MHz. Three of the channels, called "advertising channels", are used to ensure connectivity with other nodes, while the remaining 37 are the "data channels". BLE has a range of around 100 m in an outdoor environment, a maximum data rate of 1 Mbit/s and an application throughput up to 305 kbit/s [32]. Finally, it supports point-to-point and mesh networks.
iBeacon was developed by Apple (Cupertino, CA, USA) in order to provide a higher level of location awareness, by utilizing the BLE technology. iBeacon is a cross platform technology for both Android and iOS devices that are able to support the BLE standard [33]. Devices, acting as beacons, generate iBeacon advertisements through which they establish a region around them. Android and iOS mobile devices receiving the advertisements can determine the entrance and exiting borders from each Beacon's region, can estimate the nearest beacon and can approximate the distance between the two devices. The aforementioned advertisements contain three identifying fields, as described in [34]: • UUID: Universally Unique Identifier is a 128-bit integer used as an ID for all beacons in an application; • Major: is a 16-bit integer, used to differentiate Beacons with the same UUID; • Minor: is a 16-bit integer used to further differentiate Beacons that have the same UUIDs and Major values.
Due to their design philosophy, iBeacons are flexible in deployment and can be used in mobile objects or to temporarily define a region and subregions.
The possibilities introduced by BLE and iBeacon technologies in indoor positioning are currently a topic of investigation from the research community. The authors of [35] proposed a software framework that can be used to automate IoT applications based on the proximity triggered by AltBeacon devices.
AltBeacon is an open and interoperable specification that defines the format of the advertisement message that BLE proximity beacons broadcast. In [36], InLoc is introduced, which is a positioning and tracking system using commercial mobile devices, with a navigation (routing) capability. With InLoc, the authors propose, among others, a method for independent fusion of location information from phone Inertial Measurement Unit (IMU) sensors and BLE beacons. In [37], the authors propose a solution for the creation of study groups in future smart libraries, featuring a smart-phone application to create study groups and a hybrid BLE and Wi-Fi indoor positioning system. Their hybrid indoor positioning system calculates two probable user locations every time, utilizing each technology separately, compares the estimated conditional probabilities and selects the most reliable. Following a different approach, researchers in [38] assume a very dense IoT environment with BLE compatible devices and propose an Iterative Weighted KNN (IW-KNN) indoor localization method based on RSS of the BLE, which has a low power consumption and hence a long life expectancy. Finally, a combination of Wi-Fi and BLE fingerprints was implemented in [39], utilizing the conventional WKNN algorithm. The test case included the deployment of 17 Estimote BLEs (Estimote Inc., New York, NY, USA) on top of the existing Wi-Fi network, in a study area of 52 m × 43 m. Positioning was performed by utilizing both BLE and Wi-FI RSS fingerprints, resulting in a 23% accuracy improvement of the RTLS system.

Proposed Approach
Our approach is to gather general localization data from BLE devices deployed in an IoT environment and use them to optimize the data retrieved from existing popular and low cost IEEE 802.11 RSS fingerprint-based indoor positioning systems, in order to improve the provided positioning accuracy. Implementing this concept, a new enhanced KNN positioning algorithm was developed (i-KNN), which is able to filter the initial Wi-Fi fingerprint dataset (radiomap), taking into consideration the proximity of the RSS fingerprints to the BLE devices. By choosing to filter the initial dataset instead of simply combining BLE and Wi-Fi fingerprints, i-KNN utilizes an optimised small size subset of possible user locations for the final position estimation.
The i-KNN algorithm uses the data transmitted from the i-Beacons concerning the estimated distance between a BLE device and the mobile user (mobile device or body sensor), as well as the information referring to the nearest i-Beacon of the whole BLE network. These data are used as an input to the filtering processes of the i-KNN in order to roughly estimate a probable area A which encloses the user's position. The aforementioned donut-shape area, A, is formulated between a minimum and a maximum radius (R BLE min and R BLE max ) measured from a center point, where the BLE device is located. The R BLE min and R BLE max values are calculated, taking into consideration a predefined tolerance (Tol) parameter, which accommodates any positioning error factors. As illustrated in Figure 1, area A is then used to screen the number of candidate fingerprints, down to a subset (S : { 1 , . . . , k }) extracted from the initial IEEE 802.11 fingerprint dataset (D : { 1 , . . . , j } Wi−Fi ). The filtered fingerprint data subset S is finally used as the optimized input, to typical indoor positioning algorithms (in our case the KNN). The proposed methodology serves two purposes: firstly, achieving fast positioning estimation due to the utilization of a fragment of the initial fingerprint dataset and secondly achieving improved positioning accuracy by constraining any possible calculation errors within a very specific area A, where the user is actually located. The latter is achieved due to the inherited short range of IEEE 802.15 and its capability to identify the nearest i-beacon device to each mobile user. For clarity, a self-explanatory pseudocode of the i-KNN filtering algorithm used to calculate the subset S : { 1 , . . . , k } is presented in Algorithm 1 and explained in Subsection 3.1.

i-KNN Algorithm Explanation
The filtering algorithm receives as an input the Wi-Fi radiomap D : { 1 , . . . , j } Wi−Fi and BLE locations B : {BLE 1 . . . , BLE i }. A procedure named FINGERPRINTS TO BLE DISTANCE pre-calculates in advance distances between BLE devices and all fingerprint locations for easier estimation of the final output, which is subset S. Calculated distances are given at the form of a matrix L : {r 1 ,BLE 1 . . . , r j ,BLE i }. During the real-time positioning estimation, the algorithm initially scans for traceable BLEs by running BLE DISCOVERY (B) procedure, retrieves their parameters and sorts them accordingly based on their Received Signal Strength. Upon retrieval of BLE information, i-KNN selects the nearest BLE device and utilizes the distance information broadcast by the beacon (Range BLE i ) to additionally calculate the Tolerance Tol level and designate the donut-shape area, A, shown in Figure 1. Tol can be either a constant number as in this research work, or can be dynamically calculated as a percentage b% of the distance information: ±Range BLE i b%. In the latter case, the closer the MS user is to the BLE, the smaller the Tol will be, and hence a smaller optimized dataset will be selected. This methodology is a more optimized option, since the BLE-MS user distance calculation is more reliable at smaller distances. In either case, upon calculation of area A, the optimized dataset, S : { 1 , . . . , k }, is extracted by utilizing the pre-calculated distances retrieved from L : {r 1 ,BLE 1 . . . , r j ,BLE i } matrix. Finally, instead of utilizing the heavy initial radiomap D, the much smaller dataset S feeds the typical KNN methods in order to estimate the location of the MS user.

i-KNN in Pseudocode Form
For clarity reasons, the i-KNN is presented below in the form of a pseudo-code:

Test Environment
The i-KNN algorithm was tested by combining actual measurements and simulations. In order to accomplish this task, two independent networks were deployed in an indoor environment of approximately 160 m 2 . The IEEE 802.11 wireless network is composed of six D-Link 802.11 APs, the allocation of which is shown in Figure 2. The BLE network consisted of four IEEE 802.15 BLE Estimote devices. Each device was located in a different room of the test environment as illustrated in Figure 2. Two radiomaps were then generated: the first one through a measurement campaign; and the second one through TruNET wireless, a full 3D Ray tracing simulator [40].

Radiomap from Actual Measurements
During the measurement campaign, fingerprints collected at 110 equally-spaced (1 m spacing) locations, at a constant height of 90 cm. At every measurement point, 30 district RSS samples (1 sample/sec) were recorded using an application developed for Android-based MS devices. The RSS values recorded in the radiomap ranged from -99 dBm to -34 dBm. During the network discovery procedure, the system recorded data from 24 APs from other neighbouring networks, hence a filtering procedure was implemented prior to the finalization of the dataset.

Simulated Radiomap
The second radiomap was generated by using a deterministic 3D Ray Tracing propagation model, employed by TruNET wireless [40]. The building structure and the different furniture were configured using material constitutive parameters as obtained from literature [41]. They were finally calibrated as presented in Table 1 in order to better match the MS device characteristics. A detailed analysis of the Ray tracing calibration procedure can be found in [42]. The same 110 measurement points, were defined as receiver cells. Finally, the six APs were configured as per the characteristics provided by the manufacturers.

BLE Filtering
Initially, testing measurements were performed by implementing the simple KNN algorithm (K = 4) on an IEEE 802.11 typical radiomap, in order to retrieve reference benchmark values, at 12 randomly selected locations. This strategy allowed the authors to perform result analysis that could objectively depict the improvement on the localization accuracy of the positioning algorithms under study. Objective evaluation is achieved through the use of benchmark values by maintaining the external environment unmodified during the experiment execution, keeping the testing locations constant and performing the measurements under static conditions (no mobility allowed). After the retrieval of the benchmark values, the proposed i-KNN filtering algorithm was implemented for two different scenarios and test measurements were once again performed at the same 12 locations. The first scenario assumed that only one i-Beacon device existed in the study area, while the second scenario took into consideration that all four i-Beacons were deployed as per Figure 2. In all test cases, an average number of 28 samples was collected, in order to ensure that the sample size was large enough for the normal distribution statistical parameters to apply. In other words, the calculated standard deviation values, and consequently any extracted confidence levels, were statistically acceptable and could provide reliable result analysis [16]. The user orientation was also examined for investigating the body presence effect. Finally, the influence of i-Beacon number and location was also examined by varying the number of active BLEs. The variation of the localization error in the above cases defined the maximum tolerance Tol parameter value at Tol = 2 m. In this way, it was ensured that the user's actual location was falling within the candidate fingerprints chosen in the optimized dataset. Our findings were consistent with [38], where BLE RSS indication fluctuated up to 10 dB. Error factors covered by the introduction of the Tol parameter included the actual number of active BLEs, user/device orientation, body and multipath effects.

Performance Evaluation
For the practical implementation and testing of the positioning algorithms, an Android fingerprint-based localization platform (φ map) was developed, providing configuration capabilities for several parameters related with KNN and i-KNN algorithms. The most important parameters include K value, number of samples recorded per point, time interval between each sample and Tolerance (Tol) value. φ map also provides the possibility to select between different radiomaps (generated by both actual measurements or simulations) and to upload a 2D blueprint of the study area for user friendly visualization of the user position. A snapshot of the application is illustrated in Figure 3.
The Wi-Fi Indoor Positioning system was fully deployed, and tests were performed at 12 randomly selected locations as described previously for the benchmark (Wi-Fi only) case and the two hybrid (Wi-Fi and BLE) scenarios. Data retrieval was performed with the MS user to be static, in order to retrieve a statistically adequate number of samples allowing a valid statistical analysis. However, both φ map platform and i-KNN algorithm can support real-time moving MS users, within the typical constraints of the KNN algorithm. In other words, a time delay may occur on tracking a fast moving user, depending on the K value and the number of samples retrieved per point. The experimental results concerning the positioning error of the platform utilizing only the IEEE 802.11 radiomap and implementing the typical KNN algorithm, is presented in Table 2. An average positioning error of e = 4.05 m with standard deviation σ = 2.13 is achieved for the specific environment under study. The findings of the benchmark case are aligned with the performance of other typical Wi-Fi indoor localization systems, a comparison of which is illustrated in Table 3. A general conclusion extracted from the aforementioned table is that typical RSS fingerprint-based positioning systems can provide an accuracy ranging from 3 m to 7 m, practically meaning a room level designation.   Test results for the first hybrid scenario (existence of a single BLE device) are shown in Table 4. The positioning error e is improved to 3.07 m with a smaller standard deviation of σ = 1.60, while the utilized fingerprint dataset size is reduced to an average of 67%. At five out of 12 test points, the i-KNN algorithm utilized the total number of fingerprints as included in the initial radiomap, since no BLE signal was identified in these specific locations, due to wall attenuation effects. Although BLE signals could penetrate single plasterboard walls and double glass windows, they were heavily weakened when transmission occurred through cement and brick walls. At those five test points, the i-KNN algorithm did not have any effect and φ map operated as a Wi-Fi only platform. During the second hybrid scenario, the full deployment of the BLE devices ensured that location information from at least one i-Beacon was retrieved in all 12 test locations. Test results of this scenario are presented in Table 5. A radical improvement of the positioning accuracy and optimization of the utilized dataset occurred. More specifically, the error was reduced to 2.33 m for the same study area, indicating an improvement of 42%. Standard deviation was also significantly reduced to 1.22, depicting the much higher concentration of results around the mean values of positioning results. Additionally, the utilized dataset size was significantly reduced, ranging between 12% and 37%, depending on the test point. Taking into consideration the comparison Table 3, it is observed that the proposed i-KNN algorithm overperforms the typical Wi-Fi localization platforms. As a price for increased accuracy, the RTLS operators need to deploy a number of BLE systems is such a geometry that can cover the maximum area of interest. Obviously, such a deployment depends on the complexity of the indoor environment; open plan spaces require less BLE devices than wall-separated areas.   Figures 6 and 7 refer to the outcomes of the second scenario. What is obvious from the graphs is that the combination of Wi-Fi and BLE systems in the proposed i-KNN algorithm constantly outperforms the simple KNN, especially when the BLE deployment is such that it can provide adequate signal coverage in the study area. In such scenarios, accuracy is improved and positioning results fluctuate much less, as indicated by the lower standard deviation. Dataset utilization is optimized to an average of 20% for typical scenarios and can be further improved if the set Tolerance Tol factor is further optimized to a minimum value. Overall, the findings provide hard evidence that the proposed i-KNN algorithm improves the computational and processing requirements, provides faster and more accurate positioning and incurs lower power consumption.

Conclusions
In this work, a novel positioning algorithm (i-KNN) is proposed, which fuses information available from the emerging low cost BLE technology with popular IEEE 802.11 based fingerprint localization platforms. The new algorithm was tested by combining actual measurements and simulations, and evidence was provided that it significantly improves localization accuracy and computational performance. Localization accuracy for the test case was improved from 4.05 m to 2.33 m. Computational performance was indicated by the reduction of the utilized dataset size, to a range between 12% and 37% of the initial radiomap size. The scalability of the i-KNN algorithm makes it ideal for advancing the performance of existing fingerprint based RTLS systems. BLE devices can be either deployed solely for positioning purposes or can be combined with other uses. Future work includes investigating an optimal BLE deployment and an in-depth analysis of the body effect and sensor orientation, in order to further optimize the indoor localization performance. Computational performance improvements as well as battery saving may also be investigated, utilizing different models of smart devices under intensive use of the i-KNN algorithm versus other hybrid solutions.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: