Improved Method of Bluetooth-low-energy-based Location Tracking Using Neural Networks

Indoor positioning and tracking technology perform important functions in augmented reality, smart factories, and autonomous driving. The indoor positioning method using a Bluetooth low energy (BLE) beacon has been considered challenging, owing to the deviation of the receiver signal strength indicator (RSSI) value. In this paper, we propose an indoor location tracking method by adding an algorithm to reduce differences between the actual and predicted locations of moving objects. By using synthetic data generated from actual measured values, neural networks were trained and used to predict the location of the beacon. Also, an improved tracking algorithm of moving objects was proposed by considering the angle of rotation relative to the origin. Through the simulation, it was confirmed that the improved tracking results were obtained by applying the proposed tracking algorithm to the locations predicted by neural networks.


Introduction
With the expansion of geographic information system (GIS) services, the location recognition ability of terminals is becoming increasingly important. In general, positioning technology can be divided into two: outdoor positioning technology that uses the global positioning system (GPS) and indoor positioning technology that cannot use GPS. In addition to methods using GPS, the location of a terminal is recognized through a trilateration localization survey using a mobile communication base station. However, it is difficult to accurately locate indoor terminals due to radio wave interference caused by obstacles. (1,2) As a recently developed indoor positioning method, ultrawide band (UWB)'s time of flight (ToF) can be used to measure an exact distance with an accuracy of 5-30 cm. However, the infrastructure and location tags for UWB systems are very expensive and have a limited lifetime because of the short battery life. In contrast, beacons that use Bluetooth low energy (BLE) are easy to access and can be used for more than 10 years. Therefore, research on location tracking that uses beacons is being actively conducted. Specifically, the standard deviation of the signal strength of a beacon is so large that it is difficult to accurately predict the distance, and efforts to overcome this problem are continuing. (3,4) To reduce the deviation of the receiver signal strength indicator (RSSI) value, a Gaussian filter is used or a blocking film is installed to improve the positioning performance by equalizing the signal strength. Since the RSSI value has a Gaussian distribution, a method to remove noise using a Gaussian filter has also been proposed. It was confirmed that applying the Kalman algorithm is effective in improving the accuracy of the BLE beacon's RSSI value with a large error. Moreover, the use of a blocking film can reduce the distance measurement error resulting from the diffused signal reflection between the beacon and the user terminal. (5,6) As a method of indoor positioning, the location of a terminal can be identified through various methods such as fingerprinting and a trilateral survey. In the fingerprinting-based method, a signal received at a specific location is analyzed, and machine learning, particularly k-nearest neighbors (k-NN), is used to find a reference area where the terminal is located. The trilateral survey method calculates the exact distance based on the RSSI value, extracts three sides from three receivers, and finds the location of the terminal. However, in the case of a BLE terminal, it is difficult to calculate the distance based on the RSSI value because of the large RSSI deviation. (7,8) In other research, the location of the terminal was measured by dividing it into units of a certain distance. To reduce the collected RSSI noise, preprocessing is performed using an extended Kalman filter and a signal stabilization filter. Using an artificial neural network, in which the preprocessed RSSI value is defined as an input and the distance is defined as an output, we divided the prediction process into two stages: obtaining a predicted value at every 0.5 m distance and performing detailed distance prediction at every 0.2 m distance with this predicted value. (9,10) Indoor object location tracking is based on location recognition. Various algorithms have been proposed for location tracking. In a study on the tracking method using fingerprinting, the performance according to the number of receivers is analyzed. (11) Also, an observation model based on Wasserstein distance interpolation combined with the sequential Monte Carlo (SMC) method exhibited good performance. (12) For general use, the indoor tracking system was designed and implemented using Java. (13) A method of using the UWB to correct the RSSI value has also been proposed in other tracking research. (14,15) In this study, a neural network was modeled to obtain the distribution and standard deviation of RSSI using the actual RSSI value corresponding to the measured distance. The distribution and standard deviation of RSSI are utilized to obtain synthetic data. A neural network based on the synthetic data is then constructed with the RSSI value as an input and the distance as a target. To improve the tracking of the location with deviation, the rotating angle in which a beacon can move is limited according to the distance. Because of this, an algorithm that reduces the error of the location by limiting the rotating angle according to the distance was added. A simulation was performed with this algorithm, and the location of the beacon could be tracked with less error.
In this paper, Sect. 2 describes a system of indoor tracking by neural networks. Section 3 describes neural network analysis for the localization of a beacon by using synthetic data generated from actual data. In Sect. 4, we outline a simulation by adding the proposed algorithm based on the predicted location and evaluate how accurately it can track the location of the beacon. Section 5 concludes the paper.

Indoor Positioning Improvement Technique Using Neural Network
This section describes a method of generating synthetic data for indoor object tracking and an algorithm that improves object tracking. The purpose of this study is to improve the prediction accuracy of tracking with the algorithm using a limited number of actual RSSI data. The proposed improvement methods include a two-step neural network and a tracking improvement algorithm as shown in Fig. 1. The two-step neural network includes two steps: a step that trains the neural network-S ('NNet-S' in Fig. 1) to obtain the deviation value of RSSI and generate the synthetic data and a step that trains the neural network-D, X, Y to predict the coordinates of the beacon based on the RSSI value ('NNet-D','NNet-X', and 'NNet-Y' in Fig. 1). Using the distance and the x and y coordinates acquired from the two-step neural network, we can detect the location of the beacon with the tracking improvement algorithm.

Synthetic data generation
A number of receivers and a beacon are installed in the field to obtain the deviation value that is required to generate the synthetic data, and the RSSI value is measured at intervals of 1 s at a certain distance. These measured values are used as the training input and target data of NNet-S. The receivers' positions are r i = [x i , y i , z i ], i = 1, 2, 3, 4. The reason for using four receivers is to measure the RSSI value of the beacon at various distances. In addition, the error due to the distance between receivers was checked thoroughly. The location of the beacon is b j = [x j , y j , z j ] and j = 1, 2, 3, ..., N. RSSI values of the four receivers were measured at N points. We define s ij as the RSSI value measured from the message sent by the beacon of location b j that is broadcasted to the receiver of location r i . The distance between the receiver and the beacon is d ij = |r i − b j |. NNet-S with training input I and training target T is defined as where I and T are [d 11 , d 12 , d 13 , ..., d ij ] and [s 11 , s 12 , s 13 , ..., s ij ], respectively. The optimal number of hidden nodes of NNet-S is determined by considering the mean square error (MSE) and regression result. In this study, to make a function f s suitable for the actual data in NNet-S, the appropriate number of nodes in the neural network is obtained experimentally. According to is obtained in order to draw an ideal f s curve. The difference between T and T v represents the RSSI prediction error of NNet-S. Then, the standard deviation σ of the Gaussian distribution for s is calculated using T and T v . The standard deviation σ obtained from NNet-S is used to generate the synthetic data of NNet-D, NNet-X, and NNet-Y. These neural networks are used to predict the location of the beacon in the field. Figure 1 depicts NNet-D, NNet-X, and NNet-Y, which are the neural networks used to predict the distance from the origin and the coordinates of a beacon. The inputs of the neural networks are arbitrary RSSI values received by the receivers. The outputs of NNet-X, NNet-Y, and NNet-D are the x and y coordinates and the distance between a beacon and receivers, respectively. To create the neural networks, we define arbitrary receiver coordinates r si = [x si , y si , z si ], si = 1, 2, 3, ..., 8. Through an experiment, it was proved that there should be at least eight receivers to obtain accurate location tracking. The greater the number of receivers, the higher the accuracy. We define arbitrary receiver coordinates as b sj = [x sj , y sj , z sj ], where sj is 1, 2, 3, ..., N. The number of reference points N must cover the field in which the beacon is to be localized. The RSSI value measured by receiver r si is

NNet-D, NNet-X, and NNet-Y for beacon coordinate prediction
where d sj is |r si − b sj | and μ and σ are the mean value and standard deviation obtained from ( The training target values T of NNet-X and NNet-Y are [x s1 , x s2 , x s3 , ..., x si ] and [y s1 , y s2 , y s3 , ..., y si ], respectively. When there are eight receivers to acquire RSSI values, it was found experimentally that seven hidden nodes are suitable for NNet-D, NNet-X, and NNet-Y. In the coordinate system, the rotating angle of the beacon from the receivers is obtained using the x and y values.

Location-tracking algorithm
The location of a beacon can be predicted through NNet-D, NNet-X, and NNet-Y using RSSI values of beacon messages received from eight receivers. The distance of the beacon from the receivers is predicted using NNet-D, and the angle of the beacon is predicted using NNet-X and NNet-Y. The beacon angle θ is However, using the two-step neural network alone causes inaccurate location tracking. Therefore, to prevent the occurrence of location tracking errors, the location-positioning performance was improved using Algorithm 1.
The algorithm was designed by considering the distance from the receivers to the beacon and the rotating angle θ of the beacon as shown in Fig. 2. The algorithm includes offset_angle values of 45°, 22.5°, and 11.25° in the near, middle, and far distances, respectively, to restrict the possible range of angles within which the beacon can move. It is assumed that the angle will show greater variation at nearby locations and that the variation of the angle will decrease as the distance increases. The algorithm then improved the tracking method to retain only the valid angles in the range of offset_angle. Algorithm

Neural Network Analysis for Localization
To collect the actual data, receivers and a beacon were deployed and measured in an office corridor. Figure 3 shows the receivers and beacon. Figure 3(a) shows receivers that receive a beacon message from a beacon. The receivers were designed with a Raspberry Pi board that carries a BLE receiving module. Figure 3(b) shows a beacon. The beacon broadcasts a beacon message once per second. It operates with low power and its battery can last for about 10 years. f s was extracted from the measured data acquired by the board, and the regression results were obtained as shown in Fig. 4. In Figs. 4(a)-4(d), the number of hidden nodes of NNet-S is 3, 4, 5, and 6, respectively. Open circles represent actual RSSI values for different distances. The results in the figure suggest that when the number of hidden nodes is four, RSSI and distance have the most linear relationship. This is plausible because the tendency shown below 20 m also appears above 20 m in Fig. 4(b). We tried to find the general characteristics of the four hidden nodes by including all the RSSI values collected by the four receivers simultaneously. Figure 5 shows the regression results when NNet-S has four hidden nodes. As a result of training, linearity is well maintained in the data sets of Figs. 5(a)-5(d).     Figure 6 shows the RSSI values of synthetic data in one receiver among eight receivers produced using Eq. (2). The figure shows the RSSI values used to train NNet-D at the location of the receiver. In this way, the RSSI values of the corresponding points for the remaining seven receivers are produced and used as synthesized data of NNet-D. The RSSI standard deviation σ of the experimental data is 1.72 dbm. In Fig. 6, it is shown that the strength of the signal increases as the distance decreases. To train NNet-D, we define a field of 1600 m 2 (40 × 40 m 2 ) divided into intervals of 1 m in the x and y directions. To train NNet-D, 1600 (40 × 40) RSSI values are used as an input at each receiver, and 1600 (40 × 40) distance values are used as a target. Figure  7 shows NNet-D with eight inputs and one output. In Eq. (1), T v stands for the mean of the actual RSSI values T on distance I v , and σ is the deviation of all s ij values in T v . NNet-X and NNet-Y are trained to predict the x and y coordinate target values from the receivers at the 1600 (40 × 40) locations with the RSSI values at the eight receivers used in NNet-D. The neural network uses seven hidden nodes in accordance with the experimental results, and the input and target are the RSSI values of the eight receivers and the distances between the beacon and receivers, respectively. Figure 8 shows the regression results of NNet-D. It was verified in the simulation that the distance prediction from the RSSI values of the eight receivers shows linearity, as also shown in the figure.

Performance Analysis of Neural Network Algorithm for Indoor Tracking
A tracking test was executed on a moving beacon in a virtual environment with a target area of dimensions 40 × 40 × 2 m 3 . The moving beacon periodically sends a message and predicts the location based on the RSSI value. The simulation includes eight receivers and a beacon. The beacon delivers a message once per second. We predict the location of the beacon using the RSSI values of the messages received from the eight receivers. Figure 9 shows the tracking of the moving beacon from the starting point. Crosses in Fig. 9 represent the path on which the actual beacon traveled, and pluses and dots represent predicted values of the beacon with and without the proposed algorithm, respectively. The eight receivers in the center are marked with squares. The distance between the receivers is 506 cm. NNet-D was used to predict the distance, and NNet-X and NNet-Y were used to predict the angle with Eq. (4). By observing the dots in Fig. 10, the exact distance at a certain location of the beacon can be obtained, but the exact location of the beacon could not be predicted because the rotation angle is incorrect. The figure shows the beacon tracking result after about 40 s from the starting point. The average distance errors for the dots and pluses are 472 and 169 cm, respectively. Thus, it is demonstrated that the error rate is low when the proposed algorithm is applied to the neural networks.

Conclusions
In this paper, we proposed a BLE-based indoor tracking method using neural networks. The RSSI generation function that contributes to generating synthetic data is introduced by using a neural network based on the actual RSSI data corresponding to the measured distance. Using this synthetic data, we trained three neural networks that can predict x and y coordinates and the distance. The rotation angle is calculated from the x and y coordinates. When using the synthetic data generated from the measured data, the deviation of the RSSI value was 1.72 dbm. By designing a location-tracking algorithm and implementing it in the neural networks, it was confirmed by simulation that the proposed algorithm improves the accuracy of beacon tracking.