Keywords

1 Introduction

Bluetooth Low Energy (BLE) is one of the extensions to the Bluetooth specification. BLE beacons are popular in general because they are low cost, low power consumption, and ease of deployment [6]. The global indoor location market size is expected to grow from USD 7.0 billion in 2021 to USD 19.7 billion by 2026 [3]. However, BLE beacon technology is sensitive to radio waves from other devices and causes distance errors in positioning because its frequency is based on 2.4 [GHz] radio band. The distance error is also caused by desks, chairs, and people. BLE provides several kinds of parameters related to location estimation and received radio signal strength indicator (RSSI). This paper focuses on RSSI, and accurate indoor location estimation requires RSSI converted to actual length.

The rest of this paper is organized as follows. Section 2 describes the related studies for improving the accuracy of indoor positioning using RSSI. Section 3 describes preliminary arrangements, the calculation of the coordinates, and the use-case scenario. Section 4 describes the software architecture created and the experiment method. Section 5 describes the evaluation. Section 6 describes the challenges of this study and analysis the proposed method. Section 7 concludes the paper with some final remarks.

2 Related Studies

Zixiang et al. proposed the fingerprinting method based on the RSSI ranking of BLE [5]. Their method used Kendall Tau Correlation Coefficient. The RSSI ranking was calculated by relating the radio wave location to multiple iBeacon devices placed in the store. The experimental results showed that mean of the distance error was 0.87 [m]. Their results were only done in one room. The architecture needs to be adaptable to multiple locations.

Zhu et al. proposed the method that combines RSSI-based offline learning with online positioning [4]. The offline learning used the classified linear approximation based on the log-normal distribution model. The propagation model of RSSI was learned to reduce the effect of different beacon locations on positioning accuracy. A Gaussian filter was designed for pre-processing the received signals. The online positioning utilized the weighted sliding window. The weighted sliding window was used for online positioning to reduce the variation of the real-time signal. The localization algorithm based on Taylor series expansion reduces the error of target coordinates by the ordinary least squares method. The results showed that the probability of positioning errors is less than 1.5 [m] was more than 80%. The indoor positioning method is known as PDR [1].

Thai-Mai et al. proposed an indoor positioning system using iBeacon and smartphone sensors [2]. The method estimated the initial position by converting RSSI to distance and using the median filter and triangulation method. The position determination utilized fingerprinting method. The results show that the error was less than 1.8 [m] with more than 90% probability.

This method needs improvement because it is not adaptable to each environment, and the error is more than 1 [m]. Indoor navigation in tight hallways requires that the distance error be less than 0.5 [m].

3 Proposed Method

This study aims to reduce the distance error compared to the existing method using three-point positioning of two-dimension. The proposed method is based on the probability of an RSSI value within the 0.5 [m] error range of the typical value per 1 min. The typical value in this paper is the statistically defined standard value in the ever-changing RSSI that can be converted to the distance. In addition, there are two major phases in the proposed method. The first phase obtains RSSI from each installed beacon, and the weights are calculated while selecting representative values from the frequency distribution. This paper defines the first phase as the “Learning Phase.” The second phase is to select several optimal beacons within the range that can be detected by the IoT device and calculate the distance error with multi-point positioning. This paper defines the second phase as the “Calculation Phase.”

3.1 Learning Phase

The Learning Phase calculates the weights by numericizing the differences between each beacon. The beacons have the same standard but different radio wave output strengths and the features are acquired by quantifying the difference. The process is handled in two ways. The first is to convert RSSI to distance using the logarithmic approximation formula. The second is to calculate the Confidence Level for beacon selection in multi-point positioning.

The first process is described in the following sentences. The logarithmic approximation calculates the distance between each beacon and the IoT device from the RSSI. The radio signal strength decays with a shape closer to convex than the Friis transmission formula. The actual distance in this paper is measured using a tape measure. The logarithmic approximation is shown in Fig. 1.

Fig. 1.
figure 1

Logarithmic approximation formula for pre-processing.

Figure 1 shows RSSI values on the y-axis and the distance between the beacon and the IoT device on the x-axis. The data is collected at four different distances from 0.5 [m] to 2 [m]. The device collects data about 400 times in 10 min at each distance. The polynomial for the conversion between RSSI and distance is based on the natural logarithm approximation. The Learning Phase calculates the coefficient of approx. 9.1 and the intercept of approx. –24.3 for LN(x) in Fig. 1. The radio signal strength is decayed as the distance between the transmitter and receiver increases. The attenuation of the radio signal strength is approximated as the convex downward asymptote. Each beacon creates a different polynomial to convert the RSSI value to distance. The different polynomials reduce the distance error due to individual differences. The index for selecting beacons is called Confidence Level (CL) in the proposed method. CL is calculated from three processes. A summary of the three processes is shown in Fig. 2.

Fig. 2.
figure 2

Calculation of the Confidence Level.

The first () is to get RSSI at each beacon for a while and calculate the Typical Value. The Typical Value is calculated for all beacons, with the currently calculating beacon as the target beacon. The Typical Value of the i-th beacon in the proposed method is called \(RSSI_i\). \(RSSI_i\) is the mean of the maximum number of each split. Figure 3 shows the process of calculating the Typical Value from the frequency plot with the number of RSSI collections on the y-axis and the radio signal strength on the x-axis. The value is set to 1 if it increases, –1 if it decreases, and 0 if it is unchanged compared to the previous value.

$$\begin{aligned} \text {Typical\,Value} = ROUND\Biggl (\frac{1}{beaconN}\sum _{i=1}^{beaconN}RSSI_i\Biggl ) \end{aligned}$$
(1)
$$\begin{aligned} \text {Confidence\,Level\,(CL)} = MIN(Probability_A, Probability_B, ...) \end{aligned}$$
(2)

\(RSSI_i\) is the mean value of the \(split_i\), including mode. The second () is to set the Typical Value for the target beacon by calculating the mean of \(RSSI_i\). The number of beacons is beaconN, and the mean value of each beacon is \(RSSI_i\). The Typical Value of the target beacon is described by the formula (1). The third () is that it calculates CL from the probability of receiving the Typical Value. CL is the percentage of the number of RSSI that fall within the specified range. The Calculation Phase is as follows. The RSSI value equal to 0.5 [m] is calculated based on the value of the Learning Phase. The proposed method uses the range of \(\pm 2\) [dBm]. The number of RSSI in the range of \(\pm 2\) [dBm] from the Typical Value is counted, and the overall percentage is calculated.

Fig. 3.
figure 3

Calculation of the Typical Value for each beacon.

CL is calculated for all placed beacons. CL is calculated for the beacons within the range of the correct RSSI to distance conversion among the placed beacons. The flow from to of the proposed method is defined as the Learning Phase. Finally, the Learning Phase impacts RSSI as little as possible.

3.2 Calculation Phase

The proposed method selects beacons based on two parameters to calculate multi-point positioning. The first parameter is the measured value that is not changed easily based on the Learning Phase. The second parameter is close to an IoT device that receives radio signal strength.

The process has three steps. The first is to calculate the weights based on CL calculated in the Learning Phase and the distance between the beacon and the IoT device. The second is to select beacons based on the weights to calculate the coordinates of IoT devices by multi-point positioning. The third is to select the number of beacons with the minor distance error in the multi-point positioning.

The case of nine beacons is shown in Fig. 4. The radio signal strength of BLE becomes smaller as the distance between the IoT device and each beacon increases, and the value of RSSI becomes an evident change. CL and distance define the weights used for calculation in the proposed method.

The IoT device has a limited range that can convert the distance to RSSI. This range is shown by the circle centered on the IoT device. The limited range is the orange circle shown in Fig. 4, and the radius is defined as R. This radius R is calculated by converting the radio signal strength to distance based on the RSSI collected during the Learning Phase.

In this case, Beacon1, 6, and 8 are not used for multi-point positioning. The case of four-point positioning is shown in Fig. 5. The four-point positioning is calculated by selecting four beacons. Each beacon is sorted in descending order of weight (distance and CL). The number of beacons to be used is selected from three to six for increased weight in the case of Fig. 5.

Fig. 4.
figure 4

Calculation of the weight for each beacon.

Fig. 5.
figure 5

Selecting beacons for multi-point positioning.

The result of coordinates at least needs three beacons to calculate, which means there is a \({}_n C_3\) combination of coordinates when running the mean of the calculation process. The four-point positioning calculates the mean of four different coordinates. The proposed method is based on three dimensions and assumes that the radio signal strength propagates spherically around three beacons. The IoT device user is assumed to be at the point of intersection with the sphere. An overview of the coordinate calculation is shown in Fig. 6.

Fig. 6.
figure 6

Point of intersection with the three spheres.

A’s xy and z coordinate is \(a_1, a_2\) and \(a_3\). B’s xy and z coordinate is \(b_1, b_2\) and \(b_3\). C’s xy and z coordinate is \(c_1, c_2\) and \(c_3\). Formulas (3)-(5) show how to calculate the BLE beacons A, B, and C radius.

$$\begin{aligned} (x-a_1)^{2} + (y-a_2)^{2} + (z-a_3)^{2} = r_A^{2} \end{aligned}$$
(3)
$$\begin{aligned} (x-b_1)^{2} + (y-b_2)^{2} + (z-b_3)^{2} = r_B^{2} \end{aligned}$$
(4)
$$\begin{aligned} (x-c_1)^{2} + (y-c_2)^{2} + (z-c_3)^{2} = r_C^{2} \end{aligned}$$
(5)
$$\begin{aligned} \begin{aligned} (2a_1-2b_1)x + (2a_2-2b_2)y + (2a_3-2b_3)z \\ = r_B^{2} - r_A^{2} + (a_1^2 + a_2^2 + a_3^2) - (b_1^2 + b_2^2 + b_3^2) \end{aligned} \end{aligned}$$
(6)
$$\begin{aligned} \begin{aligned} (2b_1-2c_1)x + (2b_2-2c_2)y + (2b_3-2c_3)z \\ = r_C^{2} - r_B^{2} + (b_1^2 + b_2^2 + b_3^2) - (c_1^2 + c_2^2 + c_3^2) \end{aligned} \end{aligned}$$
(7)
$$\begin{aligned} \begin{aligned} (2a_1-2c_1)x + (2a_2-2c_2)y + (2a_3-2c_3)z \\ = r_C^{2} - r_A^{2} + (a_1^2 + a_2^2 + a_3^2) - (c_1^2 + c_2^2 + c_3^2) \end{aligned} \end{aligned}$$
(8)

Formulas (6)–(8) show how to calculate the plan, including the intersection of the three spheres. The coordinate calculation uses two of the formulas (6)–(8). The variables become x and y by inserting the IoT device’s z coordinate \(d_3\).

3.3 Use-Case Scenario

The proposed method can be used for indoor navigation, such as shopping malls. The indoor navigation system determines the position in real-time. An image of the navigation system is shown in Fig. 7.

Fig. 7.
figure 7

Navigation in shopping malls using smartphone or browser.

The Use-case scenario of the proposed method requires two preconditions. The user carries around an IoT device such as a smartphone. The user can visually find his location on the map through the browser. The user uses the proposed method based on these two assumptions. The IoT device receives the radio wave from the beacon and acquires the radio signal strength. The radio signal strength is converted to RSSI and sent to the server. The server then converts the RSSI into the distance and calculates the coordinates on the map. Real-time indoor positioning can be achieved by repeating the proposed method.

Fig. 8.
figure 8

Overview of software.

4 Implementation and Experimentation

An overview of the implementation is shown in Fig. 8. The implementation of the proposed method has three major components.

The first is the IoT device that obtains RSSI from the received radio wave and sends it to the Web Server. The software is implemented using the ESP32 equipped with MicroPython. The second is the BLE beacon which sends radio waves. The developed software is deployed in one IoT device and nine BLE beacons. The third is the Web Server that calculates the coordinates and shows them on the map. The web software is implemented on Python3 and Flask. The RSSI value sent by the ESP32 is received by the Flask software and stored in MongoDB. The RSSI is collected from MongoDB and converted to distance using the polynomial.

The experimental environment consisted of four tables and a center stand. Nine beacons transmitting radio waves and one receiving device are installed. The layout is shown in Fig. 9.

Fig. 9.
figure 9

Layout of the experimental environment.

The tables are at two different heights, 0.7 [m] and 0.66 [m]. The difference is used to check the three-dimensional calculation. Beacons are also placed in the center to check the effect of distance and radio signal strength.

5 Results and Evaluation

Figure 10 shows the distance error variation obtained at the four positions in the experiment. The location of the IoT device is at coordinates (1, 1), (1, 2), (2, 1), (2, 2) in Fig. 10. The graph shows the number of beacons used and the distance error. The results in Fig. 10 was 75% reproducible.

The ESP32 was placed, as shown in Fig. 9, and measurements were taken. The distance error calculations used 15622 records in the Learning Phase and at least 3000 records for each coordinate in the Calculation Phase. The evaluation method compares the distance error of the proposed method with existing methods.

Fig. 10.
figure 10

Distance error results for four locations.

The comparisons are made between the three-point positioning of the proposed method, the existing three-point positioning using the Learning Phase, and the three-point positioning of the existing method. The proposed method has two phases: the Learning and Calculation phases. The proposed method is compared to existing methods to describe the most affected process. The error calculation method uses L2 norm error. The calculated coordinates and the actual position are defined as the points of the cuboid. The distance error can be calculated as the straight line linking the points. The existing method calculates the distance error using the Euclidean distance. The number of pieces with the bit of distance error changed at different acquisition times. The distance error due to the number of pieces decreased until the halfway point, and then it tended to increase again. The optimal number from Fig. 10 is 5 for (a), (d) and 4 for (b), (c). The optimal number of devices varies by location. This graph shows that three or nine pieces increase the distance error by three or more than the number of pieces with the smallest distance error. The optimum number of pieces needs to be found between four and eight. The existing method had a mean distance error of 1.337 [m], and the proposed method had a mean distance error of 0.449 [m]. The proposed method can reduce 66.3% of the distance error.

6 Discussions

Figure 10 shows the results obtained at 75% probability in the experiment. This means that there is 25% probability of obtaining a very different distance error, which needs to be reduced to a lower probability. Figure 11 showed the results when the experiment included a large number of outliers.

Fig. 11.
figure 11

Case with the large number of outliers.

The lowest distance error was calculated when the number of devices placed was the smallest in (e) and the largest in (f). The result in (e) is because the devices selected in the fourth and fifth cases contained a large number of outliers. The result in (f) is because the difference in RSSI distribution obtained in the Learning Phase and the Calculation Phase appeared.

The Learning Phase can be improved in a few ways to increase the probability of correct results. The leading cause of distance error for multi-point positioning is the conversion from RSSI to distance. The error should be as small as possible on converting from RSSI to distance. The Learning Phase requires obtaining accurate coefficients of logarithmic approximation based on the more number of RSSI values. The exact number of RSSI values is determined as the number of RSSI values increases, increasing the reproducibility of Fig. 10. The solution for improving accuracy in the Learning Phase is selecting the best splits among RSSI values. The proposed method selects splits that contain mode, although the acquired RSSI values include outliers. Selecting the correct splits without the outliers can reduce the distance error.

It can also improve the small allowance range used in the Learning Phase. The impact is small and is unlikely to include outliers. However, it is difficult to calculate the RSSI deviation due to radio wave interference. The proposed method uses the minimum value of the 0.5 [m] change (\(\pm 2\) [dBm]) collected in the Learning Phase. The allowable RSSI range can be changed for more accurate CL calculations depending on the distance.

7 Conclusion

This paper focuses on reducing the distance error of indoor positioning using RSSI in BLE. The proposed method was defined by the Learning Phase and the Calculation Phase to reduce the distance error. The Learning Phase calculated the weights by numerically differentiating between each beacon. The Calculation Phase proposed the beacon selection method for multi-point positioning. The beacon selection method is based on the number of RSSI values obtained within the specified threshold range per unit of time. The paper examines the results between the existing methods and proposed methods. The mean distance error on the existing method was 1.337 [m], and the proposed method was 0.449 [m]. The proposed method reduces 66.3% of the distance error.