A Localization and Tracking Approach in NLOS Environment Based on Distance and Angle Probability Model

In this paper, an optimization algorithm is presented based on a distance and angle probability model for indoor non-line-of-sight (NLOS) environments. By utilizing the sampling information, a distance and angle probability model is proposed so as to identify the NLOS propagation. Based on the established model, the maximum likelihood estimation (MLE) method is employed to reduce the error of distance in the NLOS propagation. In order to reduce the computational complexity, a modified Monte Carlo method is applied to search the optimal position of the target. Moreover, the extended Kalman filtering (EKF) algorithm is introduced to achieve localization. The simulation and experimental results show the effectiveness of the proposed algorithm in the improvement of localization accuracy.


Introduction
With the rapid development of wireless communication technology in recent years, wireless localization systems have received considerable research interest due to the increasing demand of location-based services (e.g., [1][2][3][4][5]). At present, many localization technologies have been widely used, such as GPS [6], CPS [7], and WLAN [8,9]. It is acknowledged that these localization systems perform well under ideal conditions [10][11][12][13]. However, in real-world situations, due to the complexity of the environment such as the non-line-of-sight (NLOS) condition, the obstruction of the line of sight of the wireless communication between the anchor and the target may decrease the accuracy of the distance measurement, which accordingly leads to a poor localization accuracy [14].
So far, there are various methods to deal with ranging bias in the NLOS propagation. Based on the range measurements, the target localization issue in harsh indoor environments was investigated in [15]. By using the semi-definite programming relaxation technique, a robust estimator was introduced in [16] for the purpose of coping with the NLOS bias. The localization accuracy of range-only sensors with both additive and multiplicative noises was investigated in [17,18]. After that, in [19], the Manhattan distance was introduced to the WKNN algorithm to distinguish the influence of different reference nodes. In [20], the scene analysis approach was employed including two stages, namely, the offline stage and the online stage. In the offline stage, the wireless signals from all the anchors are recorded at each specific location in order to build a fingerprint database. In the online stage, according to the built fingerprint database, the K-nearest neighbor and weighted K-nearest neighbor algorithms were adopted to classify the data obtained from the environment into specific classifications.
On the other hand, most of the existing results with respect to various NLOS identification methods (i.e., distinguish that the environment is in LOS (line-of-sight) or NLOS propagation) are based on range estimates [21][22][23][24][25][26][27]. Note that all these methods require a sufficient number of measurements to reduce the impact of NLOS range estimates, which imposes a great burden on the computational complexity.
Generally, LOS propagation is more likely to occur when the distance between a target and an anchor is short enough. However, in real environments, with the increasing distance between the target and the anchor, the probability of NLOS propagation increases accordingly. In [28], LOS/NLOS probability was assumed to be fixed and known a priori, which ignores the fact that the occurrence probability of LOS and NLOS propagations is dependent on the distance between the target and the anchor. In [14], the distance-related LOS/NLOS probability model was proposed. However, in addition to the distance, the NLOS propagation probability is also affected by the angle between the target and the anchor, which has not been taken into consideration in most of the reported results.
In this paper, the localization problem is considered in a real environment. The main contributions of this paper are summarized as follows: (1) An optimization algorithm based on a distance and angle probability model for an indoor NLOS environment is proposed. Based on the NLOS propagation occurrence probability model, the maximum likelihood estimation (MLE) method is used to estimate the target position in order to suppress the NLOS error. In order to increase the speed of the operation, a simplified Monte Carlo algorithm is used to estimate the state. In addition, the extended Kalman filtering (EKF) algorithm is applied to the localization system to reduce measurement errors.
(2) The parameter acquisition method of the NLOS propagation occurrence probability model is given, which is obtained by sampling in the environment to acquire the probability of occurrence of NLOS status at different distances and angles.
(3) According to the characteristics of the signal, a simulation environment is established, which is similar to the real environment. A practical measurement scheme is used to verify the effectiveness of the proposed algorithm and compared with the existing algorithms.
The remainder of this paper is organized as follows. In Section 2, the system model is introduced. A probability model of the occurrence of NLOS propagation is formulated in Section 3. Based on the established model in Section 3, an MLE method is presented in Section 4. In Section 5, a localization method based on the extended Kalman filter algorithm is put forward. Simulation and experimental results are given in Section 6. Conclusions are drawn in Section 7.

System Model
In this paper, the system model under consideration is in a two-dimensional environment. It is assumed that there are N anchors in the environment, and the position of the i-th anchor is denoted as (x i , y i ), where x i is the value of the anchor on the x-axis and y i is the value on the y-axis. Similarly, the location of the target is represented as (x, y). The measurement distance between the i-th anchor and the target is expressed as: where z i (t) is the measured distance and d ri (t) is the real distance between the i-th anchor and the target at time t. Gau(t) is the Gaussian white noise with zero-mean and variance σ 2 los in the LOS propagation. NLOS(t) stands for the error in NLOS propagation, which can also be described by the Gaussian white noise with mean µ nlos and variance σ 2 nlos . Here, the Gau(t) and NLOS(t) are assumed to be mutually independent in the propagation environment.

Remark 1.
Because of the complicated propagation environment, not all the propagations are LOS propagations. In (1), β i is a random variable taking values with 0 and 1. If the distance is measured in the NLOS propagation, the noise includes Gau(t) and NLOS(t) (i.e., β i = 1). Otherwise, if the distance is measured in the LOS propagation, the noise only includes Gau(t) (i.e., β i = 0).
It should be pointed out that in practical engineering, the distributions of Gau(t) and NLOS(t) can be determined a priori via the measurements and pre-calibration. Consequently, the probability density function of the d i (t) in the LOS and NLOS propagation are, respectively, expressed as Moreover, it is assumed that NLOS propagation occurs with probability p i,nlos . As such, the probability density function of z i (t) can be expressed as: where θ i ∈ (−180, 180] represents the angle between the positive direction of the x-axis and the vector constituted by the i-th anchor and point x, and p i,

NLOS Propagation Occurrence Probability Model
Due to the complexity and uncertainty of the propagation, it is improper to describe the probability of the NLOS propagation as a constant. In order to better reflect reality, it is necessary to extract samples to get the characteristics of the environment. The distance-based probability model was proposed in [14], which described that the probability of the NLOS propagation increased with the distance. However, in the actual environment, the probability of NLOS propagation is related to not only the distance but also the angle. In addition, the probability of NLOS propagation is diverse in different environments. Therefore, a probability model of NLOS propagation needs to be established which gives the probability of NLOS propagation based on the distance and angle information between the measured target and the anchor node. For convenience, it is assumed that the distance and the angle are mutually independent in the NLOS propagation.
Denote by N the number of sampling points. In order to reduce the influence of the noise of the LOS propagation in the measurement, multiple distances are measured and the average value is calculated at each sampling point. The actual distance and the measured distance between the i-th anchor and the j-th sampling point are expressed as d r,i,j and z i,j , respectively. θ r,i,j ∈ (−180, 180] is the angle between the positive direction of the x-axis and the vector which is the anchor to the sampling point. By calculating the difference between the actual distance and the measured distance, we can determine whether NLOS propagation exists or not. As such, an indicative variable is introduced as follows: where g i,j = 1 means that the measured distance is in the NLOS propagation between the i-th anchor and the j-th sampling point, and d threshold is a given constant, which can be set slightly larger than measurement error. The bound of the measurement error η can be given, and we have The probability satisfying (6) can be expressed as In order to reduce the possibility that the measurement noise is determined as the NLOS error, the parameter ζ can be set to 0.99, that is, the probability that the measurement error is determined as the NLOS error is 1%. According to (7) and the properties of the Gaussian noise, we can obtain η ≈ 2.58σ los . Therefore, d threshold can be set to 2.58σ los .
The maximum of the actual distance between the i-th anchor and each sampling point is expressed as d r max,i . Divide the interval (0, d r max,i ] into n di equal subintervals and the i ds -th subinterval , where i ds = 1, 2, · · · , n di . The central point of the i ds -th distance subinterval can be expressed as Subsequently, assign N sampling points to n di distance subintervals and the number of the sampling points in the i ds -th subintervals is n di,i ds ,total . For the i ds -th subinterval, it is assumed that there are n di,i ds ,nlos sampling points in the NLOS propagation. As such, the probability of NLOS propagation in the i ds -th interval can be expressed as The probability acquisition method related to distance is summarized in Algorithm 1.

Algorithm 1
The probability acquisition method related to distance.
n θi and the central point of the i θs -th angle subinterval is described as Then, assign N sampling points to n θi angle subintervals and the number of the sampling points in the i θs -th subinterval is n θi,i θs ,total . Also, for the i θs -th subinterval, it is assumed that there are n θi,i θs ,nlos sampling points in the NLOS propagation. Consequently, the probability of NLOS propagation in the i θs -th interval is calculated as p θi,i θs ,nlos = n θi,i θs ,nlos n θi,i θs ,total .
The probability acquisition method related to angle is summarized in Algorithm 2.

Algorithm 2
The probability acquisition method related to angle.
n θi then n di,i θs ,total ← n θi,i θs ,total + 1; if g i,j = 1 then n θi,i θs ,nlos ← n θi,i θs ,nlos + 1; end if end if end for Calculate (11); end for end for Based on the center points d c,i ds , θ c,i θs and the probabilities p di,i s ,nlos , p θi,i s ,nlos in the NLOS propagation in each distance interval and angle interval, the polynomial curve fitting technique is used. Distance-NLOS probability polynomials and angle-NLOS probability polynomials are calculated as where p di,nlos and p θi,nlos are the probabilities of the NLOS propagation at the distance d ai and the angle θ bi , respectively. am i andān i are the fitted coefficients, which can be achieved by least square polynomial fitting method. It can be expressed as where By taking partial derivatives of (14) with respect to am i and setting them equal to 0, we have Equation (15) can be organized into a matrix form as follows: It can be expressed as Therefore, Equation (17) can be solved as Similarly, the coefficientsān i can be achieved as where The probability of the NLOS propagation between the point (x, y) and the i-th anchor is proposed as: where and k 0 is a positive constant.

Remark 2.
In this paper, a new probability model (21) is put forward which is more reasonable to reflect the practical engineering. It is not difficult to see that when the difference of the distance between the estimated position and the real position is fixed, angle error increases as the distance between the real position and the position of the anchor decreases. Therefore, the smaller the distance is, the smaller the confidence level of the angle-based estimation is. In addition, the exponential form of parameter α i is selected by experiments.

Simplified Calculation of Maximum Likelihood Estimation
According to (4), the probability density function of the distance between each anchor and the target can be obtained. Assuming that the probability density function of the distance between each anchor and the target is independent, one has the following joint likelihood function: The estimate of x by MLE can be obtained as: Normally, finding the analytical solution of (25) is quite time-consuming, which deteriorates the real-time performance of the system to a great extent. For the purpose of overcoming such a difficulty, an improved Monte Carlo method is proposed to solve (25), which could reduce the computational complexity and accordingly improve the real-time performance of the system.
Assume that at the time k − 1, the position and velocity of the target are (x k−1 , y k−1 ) and (v x,k−1 , v y,k−1 ), respectively. The angle between the velocity direction and the positive direction of the x-axis is calculated as where a tan 2(v y,k−1 , v x,k−1 ) is the angle between the vector from origin to (v x,k−1 , v y,k−1 ) and x-axis positive direction vector. For the convenience of discussion, the position of the point is expressed in polar coordinates, and (x k−1 , y k−1 ) is used as the coordinate origin of polar coordinates. Therefore, the points can be obtained from the parameters of d m,i and θ m,i in terms of the following two methods, respectively. (a) The distance satisfies d m,i ∼ N(0, σ 2 ma ) and the angle satisfies θ m,i ∼ U(−π, π); (b) The angle satisfies θ m,i ∼ N(θ v,k−1 , σ 2 mb ) and the distance satisfies d m,i ∼ U(0, d m,max ), where σ 2 ma and σ 2 mb are the variance of distance and angle, respectively, d m,max represents the upper bound of distance.
The point of maximum value solved in (24) is taken as the optimal estimation point.

Localization Based on Extended Kalman Filter Algorithm
The motion model is represented as a discrete-time system and decomposed into state vectors in both directions x and y, which can be expressed as where x(k), v x (k) are the position and velocity of target in the x-axis and y(k), v y (k) are the position and velocity of target in the y-axis of the system at time k. Therefore, the prediction phase of the Kalman filter can be expressed as where , v y (k − 1)] T , X k−1|k−1 is optimal estimate of state vector X at time k − 1, P k−1|k−1 is the posteriori error covariance matrix at time k − 1. Q is the covariance matrix of the process noise which is set to a diagonal matrix.
The prediction distance vector between anchors and the target is derived as where (x k|k−1 , y k|k−1 ) is the position estimation of the target in the prediction phase. Moreover, the Jacobian matrix of (30) is obtained as The filter gain matrix K k is determined by where R represents the covariance matrix of the observation noise which is set to a diagonal matrix. The update phase of the Kalman filter is given as follows: where P k|k is the posteriori error covariance matrix at time k, X k|k represents the posteriori state estimate at time k, and d k represents corrected measuring distance vector from the MLE method at time k with the following form:

Simulation Results
UWB technology is widely used in indoor localization because it is insensitive to channel fading and has high positioning accuracy. Therefore, we simulated UWB communication to verify the effectiveness of the algorithm. In this section, an indoor environment with obstacles is considered, where the test area was a rectangular space of 14 m × 5 m. There were eight anchors assigned around the space, whose locations were respectively known as The obstacle was considered in the space and the location of the obstacle was unknown and fixed. It was assumed that NLOS error occurred when the connecting line of the target to the anchor traverses the obstacle, otherwise there was no NLOS error. The LOS error obeyed ε L ∼ N(0 cm, 2.6 cm) and NLOS error obeyed ε NL ∼ N(22 cm, 3.6 cm). In the simulation, the proposed algorithm was compared with the existing ones; see Table 1.  Figure 1 shows the simulation environment setting and real trajectory. The obstacle was placed in the middle of the environment and anchors were placed around. In the test, the target moved along a black dotted line, which was S-shaped. The velocity of the target was set to 0.3 m/s ∼ 0.5 m/s. In order to test the performance of algorithms in Table 1, the root mean square error (RMSE) was used as the main performance metric. It was defined as RMSE = (∑ T n i=1 ||x r,i −x i || 2 )/T n , where x r,i denotes the true position of the target at time i,x i indicates the estimated position.
Before using the proposed algorithm, it was necessary to estimate the probability of occurrence of the NLOS status at different distances and angles by sampling. Figures 2 and 3 show the relationship between the probability of NLOS status and distance or angle in eight anchors. As can be seen from Figure 2, in general, the larger the distance, the higher the probability of NLOS status. From Figure 3, the relationship between the angle and the probability of NLOS status could be obtained. It was obviously different in different environments. According to Figures 2 and 3, polynomial fitting could be used to obtain the relationship between NLOS status occurrence probability and distance or angle. Alternatively, the relationship could be obtained by constructing a piecewise function.  In order to reduce the operation time, 500 points were randomly selected according to the introduced Monte Carlo method and one point was selected which could maximize Formula (24). Figure 4 illustrates the RMSE of different algorithms with different numbers of anchors. The distribution of noise was the same in each algorithm experiment. As can be seen from Figure 4, as the number of anchors increased, the RMSE of algorithms gradually decreased, except for the LS algorithm. When the number of anchors was 6 or 8, the RMSE of the LS algorithm was increased. The reason may be that NLOS measurement error of the added anchor was large, which led to a large error. Since the weights of LS algorithm were equal, the algorithm could not allocate less weight to the measurement with larger NLOS error. On the contrary, the RWLS algorithm compensated for this deficiency. The algorithm assigned weights to the measurements of each anchor by analyzing the positioning residuals of each anchor. However, the algorithm could not exert its advantages when the number of anchors was small. Therefore, when the number of anchors was four or five, the RMSE was higher than that of the LS method. The RMSE of the EKF algorithm was the highest when the number of anchors was four. As this number increased, the RMSE gradually stabilized, but the value was always higher than some other methods, because it does not suppress NLOS error very well. The SDP method worked well when the number of NLOS status was large or small in all measurements. From the figure, it worked better than the EKF method. The DP-MLE method uses statistical methods to estimate the relationship between the probability of NLOS propagation and the measured distance. However, the proposed method not only considers the relationship between its probability of occurrence and the measured distance, but also considers the relationship with measurement angle. Therefore, the RMSE of the proposed algorithm was smaller than that of the DP-MLE method.   Figure 5 shows the RMSEs of different algorithms using different standard deviations of measurement noise. It can be seen from the figure that the RMSE of the proposed method was the lowest and that of the LS method was the highest in different standard deviations. Since the RWLS algorithm assigns less weight to anchors with large residuals, the RMSE of the method was lower than that of the LS method. The advantage of the EKF method is mainly its ability to suppress the measurement noise; consequently, the RMSE of the method was lower than that of RWLS. The SDP algorithm estimates the average value of NLOS error and constructs the model based on statistical features. As a result, the method was superior to the EKF method. The RMSE of the proposed method and DP-MLE method both increased with increasing standard deviation. This is why the constructed models are probability models based on NLOS status. When the standard deviation of measurement noise increased, the accuracy of NLOS status judgment will be reduced. For example, when the measurement noise is larger than NLOS error, it may be considered as NLOS noise. However, the RMSE of the proposed algorithm was still lower than those of DP-MLE and SDP methods, based on Figure 5.  Figure 6 shows the RMSEs of different algorithms using different means of NLOS error. With the increase of the mean of NLOS error, the RMSEs of LS, EKF, and RWLS algorithms increased obviously and gradually. The main reason is that these methods could not effectively suppress the NLOS error. The SDP method can suppress the NLOS error without identifying NLOS status. Both DP-MLE and the proposed method could estimate the probability of NLOS status. However, the accuracy of the proposed method was higher than that of DP-MLE method. Therefore, the RMSE of this method was lower than that of DP-MLE method.

Experimental Results
In order to better verify the effectiveness of the algorithm, we used the measurement database in [31]. The experimental equipment consisted of 20 anchor nodes and one mobile node, which were UWB devices. Some anchor nodes were placed in the corridor and the other parts were placed in the room. The two-way arrival time estimation method was used in ranging. The mobile node was placed on the mobile robot, which was placed on the orbit. Due to the influence of energy attenuation in propagation, the mobile node could not accept all signals of anchor nodes. Therefore, we selected nine anchor nodes that could successfully communicate with the mobile node for the experiment; see Table 2.  In the experiment, the height of the target was fixed and known, and the height of the mobile node was set to 0.162 m. Since the algorithm was calculated in a two-dimensional environment, the measured data needed to be converted. According to (36), the measured distance was converted into the horizontal distance between the target and the anchor.
where d m is the measured distance and ∆h is the height difference between the mobile node and the anchor node. The parameters of NLOS propagation occurrence probability model need to be obtained by sampling before testing; that is, p los (z i ) and p nlos (z i ). In the data set, about 90% of the data was used for training and about 10% for testing. The distances between each anchor and the remaining 19 anchors were measured. However, the communication between some anchors could not be established. Therefore, the measurements of two anchors that could not establish communication were set as NLOS propagation. Since the positions of all anchors were known, the distance between any two anchors could be calculated. In order to reduce the measurement errors caused by faults or other factors, multiple measurements were used and the average value was calculated as the final measurement value. If the difference between the measured value and the true distance exceeded the threshold, the measurement was considered as the NLOS propagation. The relationship between distance, the angle of each sampling point, and the NLOS status probability is given in Figures 7 and 8.
In the test, we used the data of 20 s of target movement to complete the experiment. The robot trajectory and the position of anchors is given in Figure 9. The mobile robot moved at a constant speed and turned left at about time 8 s. The RMSEs of different numbers of anchors are given in Figure 10.    x-coordinate (m)   As can be seen from Figure 10, the RWLS method had the worst effect when the number of anchors was five. Because the RWLS method could not accurately identify NLOS error when the number of anchors was small, it led to the wrong weight. The performance of the proposed method and the EKF method did not change much as the number of anchors increased, but the performance of the proposed method was better than that of other methods. The reason is that the proposed method could effectively suppress the NLOS errors when the number of anchors was small. When the number of anchors was 6 or 7, the weight of the RWLS method was accurate. Therefore, its effect was better than that of the LS method. However, the performance of these two methods was inferior to the EKF method and the proposed method because the two methods do not consider suppressing measurement errors. When the number of anchors was nine, the DP-MLE, SDP, and proposed method could effectively suppress NLOS error, but the DP-MLE and SDP methods found it difficult to identify NLOS errors when the number of anchors was small. In addition, the SDP algorithm is solved by interior point method, and its operation time was much longer than that of the proposed algorithm. As a result, the real-time performance of the SDP algorithm Was far inferior to that of the proposed algorithm.

Conclusions
In the paper, an optimization algorithm is presented based on a distance and angle probability model for indoor non-line-of-sight (NLOS) environments. According to the relationship between distance, angle, and the occurrence probability of NLOS propagation, the joint likelihood function was established. The simulation and experimental results showed that the NLOS error was compensated effectively in NLOS propagation, and the proposed algorithm was superior to other algorithms when the number of anchors was small. Furthermore, the real-time performance of the proposed algorithm was much higher than that of SDP algorithm and the accuracy of the algorithm was ensured.