A Lateration Method based on Effective Combinatorial Beacon Selection for Bluetooth Low Energy Indoor Positioning

—Nowadays, the Bluetooth Low Energy (BLE) technology joined with the Received Signal Strength Indicator technique has became a popular approach in Indoor Positioning System, thanks to the wide availability of BLE in anchors and wearable devices and the straightforward implementation of both. Consequently, methods based on geometric properties of anchors, as lateration, are capable of enhancing the positioning accuracy exploiting the growing availability of anchors and their rich geometric distribution in indoor environments. On the downside, an inappropriate selection of anchors decreases the positioning accuracy estimation. Therefore, integrating an effective beacon selection method can enhance the reliability and accuracy of these methods. In this paper, we present a novel and straightforward Lateration indoor positioning method based on effective combinatorial BLE beacon selection. The combinatorial BLE selection approach relies on a geometrical analysis (difference of triangle areas), of each beacon combination, considering the reference beacons’ position with the estimated position using lateration, and with a globally calculated virtual target position as reference. The real-world experiment demonstrated that the proposed method improves the traditional lateration with 5% to 16%, considering different evaluation metrics.


I. INTRODUCTION
In recent years, the number of Indoor Positioning Systems (IPSs) proposals relying on both Bluetooth Low Energy (BLE) technology and the Received Signal Strength Indicator (RSSI) technique have grown [1], [2]. This increase is principally due to wide availability, in indoor environments, of fixed and mobile devices with built-in, low-cost and energy efficient BLE technology that act as reference beacons. Furthermore, the straightforward working principle of the RSSI technique is key for its adoption [3]. Consequently, indoor environments now typically contain an increased amount of reference beacons, with a varied geometric distribution, which may be exploited to enhance the positioning accuracy of methods based on geometric properties and RSSI. Lateration, as part of Triangulation, is one of the most used methods to estimate the target position by computing the distance between the target and multiples reference beacons [4]- [6].
However, IPS based on laterarion are prone to positioning inaccuracy, despite the large number of available reference beacons in the environments. Two main causes of positioning inaccuracy have been identified. The first is related to the presence of noise sources inherent to radio wave propagation in indoor environments, which directly affect to the RSSI, and the second to the ineffective selection of reference beacons for a given localization [1], [7]. Furthermore, since the target to be positioned is typically moving around, the RSSI measurements and the environmental conditions are time-varying. Thus, the IPS requires a dynamic selection of the optimal beacon arrangement in order to provide the most accurate position at each time instant [8].
The problem of reference beacon selection and its geometric analysis to enhance systems' position accuracy has been extensively addressed in Global Navigation Satellite Systems (GNSSs) [9]- [11]. Nevertheless, in indoor environments, it is still an open issue. Some of the proposed approaches for indoor environments rely on variations of Geometric Dilution of Precision (GDOP) [11], [12], Cramér Rao Lower Bound (CRLB) [13] and Mean Square Error (MSE) [14], which are mainly applied to Ultra-wide band (UWB) and Wi-Fi. However, such solutions have not been proposed for BLE yet.
In this paper, we propose a Lateration indoor positioning method based on effective combinatorial BLE beacon selection considering a combinatorial positioning estimation and a geometrical analysis approach of each combination.
The key contributions of this paper are: • We present a novel and straightforward Lateration indoor positioning method based on combinatorial BLE beacon selection. • Our proposed method, unlike IPS which rely on conventional lateration methods, increases reliability and correctness of the position estimation through an effective BLE beacon selection based on a combinatorial positional estimation and a geometrical analysis of them. • We demonstrate experimentally, in a real indoor environment, the usefulness of BLE beacon selection to improve the positioning accuracy.

II. RELATED WORK
The design of IPSs, in ideal conditions, relies on three main elements: the access technologies, technique and method, along with their adequate implementation [15]. Nevertheless, in practical scenarios, factors such as the environment, technology availability, and implementation play a key role. Therefore, given the sources of noise and strong Non-line-ofsight (NLOS) conditions in indoor scenarios, it is crucial to select the most appropriate subset of anchors for a particular position estimation. In literature, some solutions from different perspectives have been proposed, which we briefly detail below.
Hadzic et al. [13] proposed a reference node selection scheme for cooperative localization based on a coalitional game and utility function concept. The utility function (coalition value) considers the energy for communication and CRLB to evaluate the node geometry and channel conditions. The utility value depends on the nodes forming coalition. The utility value is evaluated to all possible coalitions sets and the set with the largest coalition value is the optimal set. The simulation results conclude that it presents a 39% improvement compared with the traditional nearest nodes selection approach, which has 5.8 m error at the 90 th percentile.
Oshiga et al. [12] proposed an anchor selection for localization in large indoor venues based on a weighted-GDOP. The authors create multiple anchor sets considering the median value of the strongest Received Signal Strength (RSS) between the anchors and the target, which are used to provide multiples target position estimations. The estimations are computed using a weighted min-max algorithm. Then, the weighted-GDOP is computed for each set and the set with the minimum weighted-GDOP corresponds to the most accurate target position. The method was evaluated through simulation (16 anchors; 196 target points) and in a real-world experiment using an indoor area of 60 × 60 m 2 (12 Wi-Fi anchors; 2 targets). The authors concluded that the selected set with 4 anchors reduces the Root Mean Square Error (RMSE) with 43% with respect to the use of all anchors.
Huang et al. [14] proposed an indoor positioning based on RSS-Trilateration with reference nodes selection in wireless networks. In this approach, the authors consider the relationship between the MSE performance and the three reference nodes used in trilateration. The distance between the reference points and the unknown node, and the distance between reference points were considered to determine variance values. The reference nodes set with the smallest variation represents the most adequate set for the trilateration method. Additionally, the variance values were weighted to enhance the MSE performance of the positioning system.
Wang et al. [11] presented an optimized deployment of anchors based on GDOP minimization for UWB, together with a cone configuration approach. In this approach, the UWB positioning method relies on the Two-way Ranging (TWR) approach to determine the Time of Flight (ToF) signals travelling between anchor and tags. The experimental phase was conducted considering 4 UWB anchors and one tag, based on which the authors conclude that the GDOP minimization can be solved based on the cone configuration. Nevertheless, there is no unique solution with the lowest GDOP.
To sum up, the aforementioned studies are mostly based on variations of GDOP, CRLB and MSE to evaluate the node selectivity and rely on UWB and Wi-Fi technologies or simulations. To the best of our knowledge, this is the first method for BLE-RSS based on combinatorial position estimation and geometrical analysis.

III. INDOOR POSITIONING METHOD BASED ON EFFECTIVE BLE BEACON SELECTION Lateration BLE-RSSI based IPSs use the Received Signal
Strength Indicator (RSSI) to estimate the distance between the BLE beacons deployed in the indoor environment and the unknown target [16]. In addition to the RSSI-distance relation, the Ground-Truth (GT) position of at least 3 BLE beacons are considered as reference points to estimate the unknown target position. In IPSs based on laterarion, the positioning accuracy mainly depends on the appropriate geometric distribution and position of selected BLE beacons, and on the correctness of the distance estimation [1], [5], [7]. Although in ideal conditions a greater number of BLE beacons can improve the position estimation, in practice, not all of them contribute positively to improving positioning accuracy [13] due to high fluctuations in BLE radio wave propagation signals caused by various noise sources, such as environment geometries, unstable power transmission, NLOS [1]. For the same reason, different BLE beacon set selections provide diverse positioning accuracy of the same target. Consequently, the position estimation fluctuates, resulting in unreliable accuracy of the final position estimations of the target. Therefore, integrating an effective BLE beacon selection method, which can exploit the availability and geometric distribution of BLE beacon, can enhance the reliability and accuracy of IPS.
In this work, we propose an indoor positioning method based on effective BLE beacon selection considering a geometrical analysis based on difference of triangle areas and combinatorial position estimation approach. The Lateration BLE-RSSI based IPS is used as baseline-system to implement it. The following subsections detail both.

A. Lateration BLE-RSSI based Indoor Positioning System
Lateration is one of the most used methods for positioning, computing the distance between the target and M BLE reference beacons [4]- [6]. Since the RSS value decreases as the distance between the transmitting and measuring device increases, a relation between RSS and distance is obtained. The Logarithm Distance Path Loss model (LDPL) is frequently used to express this RSS-distance relation, described by Eq. (4) [5].
Where RSSI(d) is the RSSI at a distance d between transmitter and receiver; RSSI(d 0 ) is the RSSI at a reference distance d 0 (i.e. 1 m); and η is the path-loss attenuation factor. The RSSI and distances are expressed in dBm and m respectively. Having previously estimated the distance between the target and the M BLE reference beacons, it is possible to estimate the target position considering it as an optimal problem, which can be solve using a least squares method [6], [17]. In our case, we use the Levenberg-Marquardt algorithm for nonlinear least squares.The Mathematically, lateration is expressed by Eq. (2) which minimizes the sum of squared errors between the measured distances (d m ) and hypothetical ones (g m (x)), based on the unknown target position, g m (x), which is denoted by Eq. (3) [18].

B. Proposed lateration based on effective combinatorial BLE beacons selection
The BLE beacons selection method aims to improve the accuracy and overall reliability of the target position estimation in the IPS, using the combination of different position estimates based on different combinations of surrounding BLE beacons and the geometric analysis of each of them. Methodologically, the approach can be summarized in four phases, which we implemented in nine practical steps. We first explain the methodological approach and afterwards its practical realization.
In the first methodological phase, all detectable beacons are gathered and their RSS values summarized. To this aim, the surrounding BLE beacons detected by the target device, during a 1 minute time window, are categorized by their minor and major values, which uniquely identify each beacon. This results in a set of RSS values per beacon. Then, for each beacon, their RSS outliers are removed based on three scaled Median Absolute Deviation (MAD) from the median, and the remaining RSS values are averaged. Finally we obtain an initial BLE beacon set, which contains a unique RSS value for every beacon detected by the target. We restrict this initial BLE beacon set in two ways: 1/ we only consider those beacons with averaged RSS value equal or greater than −83 dBm, as a threshold value to consider beacons near (necessary for reliable lateration); 2/ we only consider a maximum of 9 beacons, i.e. those reporting the strongest RSSI value, for reasons of computational feasibility.
In the second phase, the detected beacons are combinatorially grouped and a position estimate for each is calculated. In this article, we focused our analysis on subsets of 5 beacons, as it balances the number of beacons involved in the lateration, with the number of combinations to be explored (a total of 126 according to Eq. (4)). Considering a lower number would be within the lower bounds for 2d and 3d lateration, whereas larger values increase the probability of including information from beacons with strong NLOS components. Next, for each combination of 5 beacons, the lateration method is applied to obtain a single position estimate (p). The number of combinations is given by: Where n corresponds to the number of beacons in the reduced subsets and k is the total number in the pool of available BLE beacons. As above mentioned, k = 9 and n = 5 in this paper. The third phase is dedicated to determining the accuracy deviation of the estimated target position using a triangulation approach. To do so, for all the subsets with 5 beacons, the following steps are performed: • Triangulation: two types of triangles are considered (see Figure 1 for an example): 1/ Area-estimated triangles: consisting of two reference points as vertices, combined with the calculated estimated target position (p) from phase 2 as vertex (green triangles in Figure 1); 2/ Area-Target triangles: consisting of two reference points as vertices, combined with the (virtual) target position (p) as a vertex (blue triangles in Figure 1). The (virtual) target position is hereby estimated by conducting a lateration considering the k beacons used to create the combinations, in our case k = 9. Figure 1 shows an example of the both types of triangles (4 each) for a concrete combination of 5 BLE reference points (b 1 , b 2 , b 3 , b 4 , b 5 ). • Calculate pair-wise accuracy deviation: once these triangles have been calculated, a pair-wise difference (based on shared BLE reference point vertices) is performed between the areas of the area-target (blue -A) and the area-estimated (green -Â) triangles, in order to obtain an individual accuracy deviation of the estimated position.
To do so, we use the Heron's formula to calculate the triangle areas, see Eq. (5) and Eq. (6), and Eq. (7) to calculate the difference between triangles. Hereby, we rely on the fact that the difference should be near zero as the estimated position gets closer to the actual position (p ≈ p). • Calculate overall accuracy deviation: finally, the overall accuracy deviation is calculated as the sum of every pairwise individual degree of error from the previous step.
where M is the number of BLE reference beacons contained in the Set under evaluation. Finally, in the fourth phase, the combination of 5 BLE reference beacons offering the best accuracy is selected. This is done by sorting in ascending order the accuracy deviation results obtained in phase 3 and selecting the combination with the lowest accuracy deviation. The combination of 5 BLE beacons with the lowest accuracy deviation is considered to provide the best individual accuracy and its estimated position is provided as the final estimated position by our method.
Algorithm 1 shows the pseudo-code for the proposed methodological approach, whose workflow is summarized as follows: • 1 st step: Collect the RSS from BLE advertisements for a period of 60 s discarding those not belonging to the reference beacon set (input data for Algorithm 1); • 2 nd step: Group the RSS readings by beacon removing outlier values. We consider those values falling out of 3 times the scaled MAD from the median (lines 1-2 in Algorithm 1) as outliers; • 3 rd step: Apply the average to the RSS values of each reference beacon, getting one averaged RSSI value per reference beacon (line 3 in Algorithm 1); • 4 rd step: Select the reference BLE beacons with averaged RSS equal or greater than −83 dBm (lines 4-8 in Algorithm 1), and in case of more than 9 beacons, only consider the 9 strongest ones (lines 9-11 in Algorithm 1); • 5 th step: Estimate the relative distances of selected reference BLE beacons to the target position, using the LDPL model, which is expressed by eq.(1), and their RSS values (line 12 in Algorithm 1). We considered the path-loss attenuation factor (η) of 2.1 and the RSS(d 0 ) equal to −63.78 dBm (input values in Algorithm 1); • 6 th step: For the set of the 9 selected reference beacons selected in the previous steps, create 5 9 = 126 combinations (without repetitions) of 5 reference beacons (line 13 in Algorithm 1); • 7 th step: Estimate the target position for each combination created, using the Levenberg-Marquardt Least Squares (L-MLS) Lateration method to fit the Euclidean Distance model. We get one estimated target position per combination (line 15 in Algorithm 1). The input data to fit the model are the distances estimated in the fifth step, and the weights and the GT of the BLE beacons corresponding to each subset. The weight value for every BLE beacon is computed as the inverse of its distance square with respect to the target; • 8 th step: We evaluate the appropriateness of the estimated target position of each of the 126 combinations using the difference of triangles approach defined by Eq. (7) and supported by the triangle areas provided in Eq. (5) and Eq. (6) (line 16 in Algorithm 1); • 9 th step: The combination reporting the lowest difference of the triangle approach is selected and its estimated position is set as the final estimated position (line 18 in Algorithm 1). Estimate the target position with the combination (j) using the Levenberg-Marquardt Least Squares (L-MLS) Lateration method 16: Evaluate the target position estimated considering the beacons used in combination (j) and using the difference of triangle approach defined by Eq. (7). 17: end for 18: Select the estimated position considering the combination with lowest difference of triangle approach value.

A. Objectives and Experimental setup
The main objective of the empirical experiments is to demonstrate that the proposed BLE beacon selection is relevant and reduces the positioning error. Specifically, for each evaluation point, its position is estimated with a traditional nearest node lateration strategy -common in Indoor Positioning Systems (IPSs) -and with our proposed method. By comparing both, we aim to validate the accuracy of our method with respect to a well-known baseline.
We conducted the experiments considering our offices as the evaluation area (Office scenario) This area has an approximate area of 10.8 × 16.7 m 2 and contains 20 reference BLE beacons and 13 evaluation points distributed around the office. The targeted evaluation points distribution provides Line-of-sight (LOS) and NLOS conditions with respect to the deployed BLE beacons due to the bookcases and office furniture. Figure  2 shows the Office scenario, the deployed reference BLE beacons (red circles), and the target points (blue circles) where the data was collected. Whereas, Table I   We collected the BLE RSSI data from the reference beacons for 10 minutes in each evaluation point. We used a Samsung A5 smartphone with GetSensorData [19]. Nevertheless, in the lateration methods (traditional and proposed), 10 nonoverlapping intervals of 1 minute in every evaluation points are used. The Lateration method used relies on the LDPL model to determine the relative distances based on the RSSI. The parameters are set to 2.1 for the path-loss attenuation factor (η), and the RSS at 1 m equal to −63.7816 dBm, which were defined experimentally for our scenario.

B. Results
Table II introduces the main positioning results for the traditional nearest node lateration model (Trad.), our proposed approach (Prop.) and an ensemble approach that combines the estimates provided by the traditional and our proposed model (Trad. + Prop). We also show the relative difference (in percentage) of our proposed (Prop.) and the ensemble (Trad. + Prop.) approach with respect the traditional one (Trad.). According to the results reported in the Table II, our proposed approach performs better than the traditional lateration, with between 5% (median) and 16% (90 percentile). However, analysing the errors one by one using the Empirical Cumulative Distribution Function (see Figure 3), we observe that in a few cases our approach provided slightly worse results than the traditional lateration.  Figure 4 provides an overview of the individual positioning errors of both the proposed and traditional approaches. As can be deduced, the proposed approach provides better results than the traditional method in the majority of the cases (points above the red diagonal) -being much better in some of themwhereas the traditional approach is only slightly better than the proposed model in a few cases (points under the red diagonal). As a way to minimise this effect, we decided to combine the estimated positions provided by the traditional lateration and our proposed method with a simple point average. As a result, the ensemble model (combining the traditional and proposed approaches) provided even slightly better results compared to the proposed approach (see Table II), and is the best overall model, generally beating any of the individual models.
V. CONCLUSIONS This paper presented a lateration method based on a combinatorial BLE beacon selection approach to enhance the indoor position estimation. The combinatorial BLE selection relies on a geometrical analysis (difference of triangle areas) of each possible combination of k beacons, considering the reference beacons' position, their estimated position using lateration, and a globally calculated virtual target position used as reference. The BLE beacon combination with the lowest difference of triangle areas is selected to provide the final estimated position.
We evaluated the proposed method 10 times, considering 13 target reference points distributed in a real indoor scenario and compared it with a traditional nearest node lateration strategy. The results demonstrate that the proposed combinatiorial beacon selection of our method provides a more accurate position estimation than the traditional lateration. Specifically, our approach decreases the 90th percentile, average, and RMSE positioning error metric respectively with 16.14%, 13.65%, and 10.75%, with respect to the lateration baseline. Additionally, we proposed an ensemble approach, combining the traditional nearest node lateration model with our proposed model, which provides better positioning accuracy than any of the individual models independently.