Guoquan Li1,2, Enxu Geng3,4, Zhouyang Ye5, Yongjun Xu6, Jinzhao Lin7, Yu Pang8. 1. School of Communication and Information Engineering, Chongqing University of Posts and Telecommunications, Chongqing 400065, China. ligq@cqupt.edu.cn. 2. Chongqing Key Laboratory of Photoelectronic Information Sensing and Transmitting Technology, Chongqing 400065, China. ligq@cqupt.edu.cn. 3. School of Communication and Information Engineering, Chongqing University of Posts and Telecommunications, Chongqing 400065, China. S160131039@stu.cqupt.edu.cn. 4. Chongqing Key Laboratory of Photoelectronic Information Sensing and Transmitting Technology, Chongqing 400065, China. S160131039@stu.cqupt.edu.cn. 5. International College, Chongqing University of Posts and Telecommunications, Chongqing 400065, China. 2015214742@stu.cqupt.edu.cn. 6. School of Communication and Information Engineering, Chongqing University of Posts and Telecommunications, Chongqing 400065, China. xuyj@cqupt.edu.cn. 7. Chongqing Key Laboratory of Photoelectronic Information Sensing and Transmitting Technology, Chongqing 400065, China. linjz@cqupt.edu.cn. 8. Chongqing Key Laboratory of Photoelectronic Information Sensing and Transmitting Technology, Chongqing 400065, China. pangyu@cqupt.edu.cn.
Abstract
The Global Navigation Satellite System (GNSS) cannot achieve accurate positioning and navigation in the indoor environment. Therefore, efficient indoor positioning technology has become a very active research topic. Bluetooth beacon positioning is one of the most widely used technologies. Because of the time-varying characteristics of the Bluetooth received signal strength indication (RSSI), traditional positioning algorithms have large ranging errors because they use fixed path loss models. In this paper, we propose an RSSI real-time correction method based on Bluetooth gateway which is used to detect the RSSI fluctuations of surrounding Bluetooth nodes and upload them to the cloud server. The terminal to be located collects the RSSIs of surrounding Bluetooth nodes, and then adjusts them by the RSSI fluctuation information stored on the server in real-time. The adjusted RSSIs can be used for calculation and achieve smaller positioning error. Moreover, it is difficult to accurately fit the RSSI distance model with the logarithmic distance loss model due to the complex electromagnetic environment in the room. Therefore, the back propagation neural network optimized by particle swarm optimization (PSO-BPNN) is used to train the RSSI distance model to reduce the positioning error. The experiment shows that the proposed method has better positioning accuracy than the traditional method.
The Global Navigation Satellite System (GNSS) cannot achieve accurate positioning and navigation in the indoor environment. Therefore, efficient indoor positioning technology has become a very active research topic. Bluetooth beacon positioning is one of the most widely used technologies. Because of the time-varying characteristics of the Bluetooth received signal strength indication (RSSI), traditional positioning algorithms have large ranging errors because they use fixed path loss models. In this paper, we propose an RSSI real-time correction method based on Bluetooth gateway which is used to detect the RSSI fluctuations of surrounding Bluetooth nodes and upload them to the cloud server. The terminal to be located collects the RSSIs of surrounding Bluetooth nodes, and then adjusts them by the RSSI fluctuation information stored on the server in real-time. The adjusted RSSIs can be used for calculation and achieve smaller positioning error. Moreover, it is difficult to accurately fit the RSSI distance model with the logarithmic distance loss model due to the complex electromagnetic environment in the room. Therefore, the back propagation neural network optimized by particle swarm optimization (PSO-BPNN) is used to train the RSSI distance model to reduce the positioning error. The experiment shows that the proposed method has better positioning accuracy than the traditional method.
With the rapid development of mobile Internet technology, the demand for location-based services (LBS) has also increased. However, in indoor environments, satellite signals are easily occluded and there are serious multipath effects. Therefore, the positioning accuracy of GNSS is drastically reduced so that it can not meet the positioning requirements. With the emergence of a large number of indoor applications, such as the rapid search for parking spaces in underground parking lots and the search for elevators in large shopping malls, the acquisition of indoor location information is particularly important. People have gradually turned their attention to indoor positioning technology, hoping to solve this problem and achieve new breakthroughs [1]. A variety of indoor positioning technologies have been proposed, such as Bluetooth [2], ultra-wideband (UWB) [3], radio frequency identification (RFID) [4], micro-electro-mechanical system (MEMS) [5], wireless local area networks (WLAN) [6], computer vision [7], magnetic field [8], ultrasonic [9], infrared signal [10] and others.Low-power Bluetooth is favored in indoor positioning because of its advantages such as easy deployment, low power consumption, and low cost. In 2013, Apple introduced the iBeacon technology based on Bluetooth low-energy (BLE), which made BLE widely used in various indoor environments. The positioning algorithms are mainly divided into two categories: the received signal strength indication (RSSI) distance method and wireless fingerprint positioning technology. Generally, the RSSI distance method acquires the received signal strength (RSS) from the Bluetooth anchor point to determine the distance-loss model, and then estimates the user’s position through some algorithms. Neburka [11] investigated the performance of BLE indoor positioning based on RSSI in ideal and real indoor environments. Wang [12] proposed a Bluetooth-based trilateration method employing the Bluetooth transmission model and trilateration positioning, which can only estimate an approximate region of the user. Kotanen [13] adopted an extended Kalman filter to process the Bluetooth signals and estimate the RSSI distance model. This method can obtain an accurate distance with the premise of precise received signal strength. However, in practical tests, the accuracy was still average. Shi [14] proposed a method of estimating the RSSI distance model using the back propagation neural network (BPNN), which improves the estimation accuracy of the distance-loss model but requires a large amount of data to train the neural network model. Zhou [15] employed the Kalman filter to process the collected RSSIs at first. The RSSI-distance model was obtained by curve fitting and the position was determined using the weighted least-squares algorithm. However, the RSSI fluctuation noise is not Gaussian in distribution which implies that the Kalman filter is obviously not optimal. Fingerprint localization is also a RSSI-based method [16,17]. It first collects all of the RSSIs of receivable Bluetooth beacons at the densest locations possible and then uses neural networks to match the locations with the RSSI. Finally, the user’s location can be estimated by the trained neural network. Pelant [18] evaluated BLE localization performances based on RSS fingerprinting mapped by propagation modes in an indoor environment. Liu [19] proposed a novel approach to track a user in an indoor environment by integrating a similarity-based sequence and dead reckoning. Zhou [20] proposed the use of a novel, improved, semi-supervised manifold alignment approach to reduce both the number of reference points (RPs) and the sampling time involved in the fingerprint construction. Fingerprint crowdsourcing has recently been promoted to relieve the burden of site surveying [21,22,23]. Wang [24] combined the fingerprinting-based and distance-based localization algorithms to improve performance. Rozum [25] proposed a new method to suppress RSSI fluctuation by employing spatial diversity and frequency diversity. Botta [26] proposed and analyzed the static calibration and dynamic calibration of a log-normal shadowing radio propagation model for the estimationof the distance between two wireless nodes. Li [27] proposed a method to adjust distance-loss model parameters dynamically. It utilizes the anchor nodes in the area to estimate the distance-loss model parameters in real-time cooperatively. The final location is calculated according to the trilateration or other positioning algorithms. However, the binary equation needs to be solved in real-time which has high complexity and brings about new problems caused by multiple approximations while eliminating a small amount of environmental impact.The above methods may improve the accuracy of the distance estimation to a certain extent with the premire of fixed transmission power of Bluetooth beacons at one location. However, the transmission power fluctuates from time to time which results in an inaccurate distance-loss model and further inaccurate positioning. In order to solve this problem, this paper analyzes the time-varying characteristics of Bluetooth signal strength and proposes a method with real-time corrected RSSI to weaken the fluctuation influence. The contributions of this paper as follows:A RSSI Real-time Correction algorithm is proposed. A Bluetooth gateway is set at a fixed location and collects the RSSI of surrounding Bluetooth beacons to the server in real-time. Since the distance to the beacons is fixed, the server is able to estimate the fluctuation and feeds back to the user (mobile terminal) to correct the RSSI in real-time. Furthermore, the Kalman filtering is used to further smooth the RSSI.A back propagation neural network optimized by particle swarm optimization (PSO-BPNN) RSSI distance model is built. Then, the distance between the blind node and the anchor node is estimated using the RSSI distance model trained by PSO-BPNN.We perform an extensive experiment and the results show that the positioning error caused by the power fluctuation of the Bluetooth system is reduced obviously. The method does not need to spend a lot of time building a fingerprint database, and hence, it has low complexity. The experimental results show that the method has good localization accuracy and stability.The rest of this paper is organized as follows. Section 2 introduces the related works. Section 3 describes the proposed system including the RSSI real-time correction algorithm as well as the PSO-BPNNRSSI distance model. In Section 4, the extensive experiments carried out in an actual indoor environment are described. Finally, Section 5 concludes the paper and provides some future directions.
2. Related Work
2.1. RSSI Error Distribution
The RSSI measured by intelligent terminal contains complex noise, which seriously affects the positioning accuracy. It is difficult for Bluetooth system to transmit signals with fixed power, which results in time-varying characteristics of RSSI. Moreover, the indoor electromagnetic environment is complex, including multipath fading and other noise. We tested the RSSI fluctuation of two Bluetooth beacons produced by different companies, as shown in Figure 1. It can be seen that due to the instability of the Bluetooth system, both of the RSSI values are time-varying and the maximum fluctuation value is about 10 dB. In order to reduce the random fluctuation of the RSSI and improve the positioning accuracy, a sliding filter or an average filter is usually applied. However, in order to reduce power consumption, the frequency setting of Bluetooth is often low. Relying on multiple RSSI values to smooth means an increase in latency. This adds great difficulty to the implementation of a RSSI-based low-latency, high-precision positioning system [28]. The researchers tried to use a Kalman filter or improved Kalman filter to reduce the noise [29,30,31]. As presented in Figure 2, the measurement error in RSSI does not usually have a Gaussian distribution, so even with the adoption of a Kalman filter, it is difficult to achieve good results.
Figure 1
Bluetooth signal strength.
Figure 2
RSSI error distribution.
2.2. RSSI Distance Model
Common propagation path-loss models include the free space propagation model, the logarithmic distance path-loss model, etc. Studies have shown that the channel fading characteristic follows a lognormal distribution. RSSI distance measurement generally uses the logarithmic distance path-loss model [32,33,34]. It is expressed as
where d is the distance between the transmitter and the receiver, and n is a path-loss parameter related to the specific wireless transmission environment. The more obstacles there are, the larger n will be. A is the RSSI with distance from the transmitter. is a Gaussian-distribution random variable with mean 0 and variance .For convenience of calculation, usually takes a value of 1 meter. Since has a mean of 0, the distance-loss model can be obtained with
where is the average measured RSSI when the received node is 1 meter away from the transmit node which is related to the RF circuits of Bluetooth nodes. By gathering the RSSI values for Bluetooth beacons at different distances and using the least squares algorithm to fit the parameters, we can obtain the RSSI distance model.It can be seen from (2) that parameters A and n need to be accurately estimated in order to improve the ranging accuracy. Parameter n is related to the wireless transmission environment and can be obtained by fitting a large number of experimental measurements. A is determined by the Bluetooth transmit power. Ideally, the value of A for one Bluetooth beacon should be fixed. In reality, the Bluetooth transmit power has time-varying characteristics. It is difficult to calculate the relationship between RSSI and the distance accurately by using the logarithmic distance loss model because of the complex indoor environment. Researchers have used the neural network to fit the RSSI distance model. However, since the BP neural network is prone to converging to a local minimum point [35,36], it is difficult to obtain a good indoor RSSI distance model. The use of the particle swarm optimization algorithm (PSO) to optimize the weights and thresholds of the BP neural network can effectively prevent the BP neural network from falling into the local optimal solution and reduce the convergence time [37,38].
3. RSSI Real-Time Correction Algorithm
In order to reduce the positioning error caused by RSSI fluctuation, we monitored the RSSI fluctuation in real-time through the Bluetooth gateway and compensated for the RSSI measured by the blind nodes. Our system model is shown in Figure 3, where , , and are the Bluetooth anchor nodes, M is a Bluetooth gateway, and N is a blind node which is usually a user or mobile terminal.
Figure 3
Diagram of indoor positioning by Bluetooth nodes with received signal strength indication (RSSI) correction.
In the offline phase, the average RSSI is recorded at different distances, and the corresponding average RSSI distance model can be obtained by curve fitting as
where is the average RSSI at a distance of 1 m from . Since M, N, and B are in a relatively small range, we can assume that the transmission environment among them is approximately the same, which means that the loss parameter (n) is the same. In this way, n and are determined.In the online phase, the server records and takes the average time taken to achieve the average signal strength () at regular intervals. Based on ref. (3), we obtainAssume the distance between gateway M and Bluetooth node is . First, M collects the RSSI of the surrounding Bluetooth node () and uploads them to the server through an wired or wireless Internet interface in real-time. The real-time RSSI distance model is
where is the RSSI at a distance of 1 m from .Similarly, for the blind node (N) to be located, the average signal strength () of node and the real-time signal strength () are represented as follows:Using (4) and (5), we obtain
where represents the real-time fluctuation of the Bluetooth system which we call the RSSI correction offset.Combining (6) and (7) givesFurther, the corrected RSSI is obtained as
which is also the real-time path-loss model.Through the above algorithm, we can eliminate the error caused by the fluctuation of Bluetooth transmit power and get a more accurate RSSI distance model. It is crucial for precise indoor positioning.
4. System Model
4.1. Positioning Step
According to the above analysis, the position of the Bluetooth gateway is arbitrary, and it is only required for the anchor node to communicate with at least one Bluetooth gateway. Based on the architecture of the positioning system in Figure 4, we propose the following positioning method:
Figure 4
The positioning schematic diagram.
Deploy anchor nodes and Bluetooth gateways;The Bluetooth gateway measures the real-time signal strength of each anchor node and uploads it to the server;The server records the mean signal strength of each anchor node and calculates ;The blind node measures the signal strength of each anchor node, reads the server information, and corrects the RSSI according to (9);The corrected RSSI is smoothed by the Kalman filter and RSSI to is converted to distance using the PSO-BPNN model (15);The blind node position is estimated using the least squares algorithm.
4.2. PSO-BPNN RSSI Distance Model
It is difficult to accurately map the relationship between RSSI and distance with the logarithmic distance loss model. In this section, the PSO-BPNN Algorithm 1 is used to train the RSSI distance model. The PSO-BPNN is composed of a three-layer structure, including one input node, i hidden nodes, and one output node. The training sample input value is . The training sample output value is . As shown in Figure 5, is defined as the weights from the input layer to the hidden layer, is defined as the threshold value of the hidden layer node, is defined as the weights from the hidden layer to the output layer, is defined as the threshold value of the output layer node, and O is defined as the output of the neural network.
Figure 5
Neural network structure.
The PSO preliminarily optimizes the parameters of BPNN to avoid the BPNN falling into the local optimal solution. In the PSO algorithm, the potential solution of each optimization problem is imagined as a point in a x-dimensional space which is called a particle. The particle moves around in the search space according to simple mathematical formulae regarding the particle’s position and velocity. Each particle’s movement is also influenced by its local best known position and the global best known position, which are found by the fitness function. After many iterations, the optimal positions of the particles and the extremum of the fitness function are calculated. In this paper, the fitness function is shown asThe PSO iteration formula is
where are the particles. u means the inertia weight, and are two random numbers in the range [0, 1]. and are two positive constants which is called learning factor or accelerating factor. is used to adjusted the step length of the particle flying to its own best position. is used to adjusted the step length of the particle flying to the swarm’s best position. is the optimal value searched by the i-th particle. is the optimal value searched by the whole particle swarm.Neural network weights and thresholds can be optimized through multiple iterations. The optimized weights and thresholds are assigned to the BPNN to further train the network model. The hidden layer output is (13)The output layer output is (14)Initialize the BPNN parameters: training samples, hidden layer, learning ratefor each particle
doInitialize the PSO parameters:Initialize the particle’s best known position to its initial position: ←if
thenUpdate the swarm’s best known position:end ifInitialize the particle’s velocity:end forwhile a termination criterion is not met do dofor each particle
dofor each dimension
doUpdate the particle’s velocity:end forUpdate the particle’s position:end forif
<
thenUpdate the particle’s best known position:end ifif
<
thenUpdate the particle’s best known position:end ifend whileUpdate the parameters of BPNN based onTrain the BPNN based on (13) and (14)return PSO-BPNN modelUsing PSO-BPNN, we can get a more accurate RSSI-distance model, which can be expressed as
4.3. Kalman Filter
Besides the power fluctuation, there are some other noises that exist after RSSI correction with (9). The Kalman filter is an effective algorithm for solving the problem. In this subsection, the state equation is expressed as
where is the state model noise with variance Q. Accordingly, the observation equation can be given as
where contains the corrected RSSI, and is the observation noise with variance R. The renewal equation can be further obtained as
where is the predicted state estimation, denotes the predicted error covariance, represents the optimal Kalman gain, is the optimal state estimation, and means the updated estimation covariance. After smoothing the corrected RSSI values with the Kalman filter, we can achieve more accurate distance estimation between the blind node and the anchor node based on (15).
4.4. Least Squares Algorithm
The least squares algorithm is a standard approach in regression analysis that is used to approximate the solutions of overdetermined systems. Compared with the triangular centroid algorithm, the least squares algorithm can estimate the locations of blind nodes more accurately. Suppose there are anchor nodes with coordinates , and blind nodes with coordinates . We can obtainBy subtracting the m-th equation from the first equation in (19), the linear Equation (20) is obtained:Finally, we can get the blind node’s position (X):
5. Experiment
In this paper, the wireless network was composed of four BLE beacons (Bright Beacon), an Android terminal, and one gateway (Bright Beacon). As shown in Figure 6, we carried out the localization experiment in an office of with multiple people working, including cubicles, bookcases, computers, etc.
Figure 6
Experimental environment.
We placed four BLE beacons at the same height with coordinates , , , and , and then placed the Bluetooth gateway at a fixed location. The blind node coordinates were . The transmission interval of the beacon frame of all of the four Bluetooth nodes was set to 500 ms, and 50 times of RSSI were collected continuously. The raw RSSI values collected by the Android terminal and the corrected RSSI by the Bluetooth gateway are shown in Figure 7.
Figure 7
Comparison of the collected RSSI values before and after Kalman filtering.
It can be seen that the original RSSI data has a sharp fluctuation and presents a very obvious time-varying characteristic. Even after Kalman filtering, the data still has a great fluctuation. The RSSI data after corrected by the information from the Bluetooth gateway is more stable by eliminating part effects of the signal fluctuation. After further noise elimination using Kalman filter, we get smoother data. Figure 8 shows that the standard deviation(SD) of RSSI data after corrected by the Bluetooth gateway is greatly reduced, which means a more precise distance can be achieved between the anchor node and the blind node.
Figure 8
The standard deviation of the RSSI before and after correction.
In this paper, three methods were tested to fit the RSSI distance model, including the logarithmic distance loss model, BPNN, and PSO-BPNN. In the test, BPNN and PSO-BPNN adopted a single hidden layer network with five hidden layer nodes. The results of the tests are given in Figure 9. Figure 10 shows the normalized sum of squared errors (SSE) of the RSSI distance model fitted by three methods . The SSE of the logarithmic distance model fitting with the least squares algorithm was 0.29. The SSE of the RSSI distance model trained by the BP neural network was 0.30. The RSSI distance model trained by PSO-BPNN had the lowest error rate—the error rate was only 0.25—and it showed good robustness.
Figure 9
The result of RSSI distance model fitted by the logarithmic distance loss model, back propagation neural network (BPNN), and back propagation neural network optimized by particle swarm optimization (PSO-BPNN).
Figure 10
The normalized sum of squared errors (SSE) of the RSSI distance model fitted by the logarithmic distance loss model, BPNN, and PSO-BPNN.
The results of the indoor positioning experiment are shown in Figure 11. Since the noise caused by the RSSI fluctuation cannot be eliminated, the traditional Kalman filtering method has great positioning error. By employing the Bluetooth gateway to correct RSSI in real-time, and further using PSO-BPNN to train the RSSI distance model, better positioning results were achieved. In 30 consecutive positioning tests, our method showed more stable positioning.
Figure 11
Comparison of the positioning results between the traditional and proposed methods.
We randomly selected eight test points in the office, and their positioning errors are shown in Figure 12. We can see that due to the fluctuation of the Bluetooth system, the positioning results were still poor even when the Kalman Filter was used. The root mean square error (RMSE) was 2.0361 m, the mean absolute error (MAE) was 1.8357 m, and the maximum positioning error was 3.29 m. The Kalman filter and PSO-BPNNRSSI distance model were able to effectively reduce the positioning error— the RMSE was 1.1279 m, the MAE was 0.9704 m, and the maximum positioning error was 2.21 m.
Figure 12
Comparison of the positioning RMSE, MAE ,and maximum error between the traditional and proposed methods.
The method proposed in ref. [27] was able to reduce the error caused by the RSSI fluctuation, but it brings new error due to the approximate nature of the calculation. The RMSE was 0.9583 m, the MAE was 0.7882 m, and the maximum positioning error was 3.23 m. After correcting the RSSI and accurately estimating the RSSI distance model by the proposed method, the positioning accuracy improved obviously. The RMSE was only 0.7343 m, the MAE was 0.7018 m, and the maximum positioning error was only 1.61 m. The results show that the noise caused by the RSSI fluctuation was reduced and our algorithm provided a good positioning result.
6. Conclusions and Future Work
This paper presents an indoor location method for the dynamic correction of RSSI by deploying the Bluetooth gateway. The location of the Bluetooth gateway is not strictly required; it is only required that each anchor node can communicate with at least one Bluetooth gateway. In addition, we used the PSO-BPNN trained RSSI-distance model in the offline stage. Then, we used the proposed algorithm to correct the RSSI in real-time and used the Kalman filter to further smooth the data. After smoothing the RSSI, the distance between the blind node and the BLE node was estimated by the PSO-BPNNRSSI distance model. Finally we used the least squares algorithm to estimate the terminal position. The experimental results show that the algorithm can improve the positioning accuracy and meet the requirements of the indoor positioning system. In this paper, some special positions were not considered, like indoor corners and other complex electromagnetic regions. Moreover, it is difficult to obtain continuous positioning with high precision only by BLE positioning technology. Therefore, the proposed method can be further improved by fusion positioning with multiple sensors which could be investigated in the future, including the positioning in some special cases.
Authors: Nick De Raeve; Matthias de Schepper; Jo Verhaevert; Patrick Van Torre; Hendrik Rogier Journal: Sensors (Basel) Date: 2020-05-11 Impact factor: 3.576