Abstract

The main factor affecting the localization accuracy is nonline of sight (NLOS) error which is caused by the complicated indoor environment such as obstacles and walls. To obviously alleviate NLOS effects, a polynomial fitting-based adjusted Kalman filter (PF-AKF) method in a wireless sensor network (WSN) framework is proposed in this paper. The method employs polynomial fitting to accomplish both NLOS identification and distance prediction. Rather than employing standard deviation of all historical data as NLOS detection threshold, the proposed method identifies NLOS via deviation between fitted curve and measurements. Then, it processes the measurements with adjusted Kalman filter (AKF), conducting weighting filter in the case of NLOS condition. Simulations compare the proposed method with Kalman filter (KF), adjusted Kalman filter (AKF), and Kalman-based interacting multiple model (K-IMM) algorithms, and the results demonstrate the superior performance of the proposed method. Moreover, experimental results obtained from a real indoor environment validate the simulation results.

1. Introduction

A wireless sensor network (WSN) is a distributed sensor network which consists of numerous tiny sensor nodes. Numerous research studies have been done on WSN, particularly on localization, since WSN is a significant way to approach the localization problem. It can be used to estimate the position of a mobile target combining distance measurements to multiple nodes of the WSN. In general, nodes in a WSN localization context are mainly classified as beacon nodes (the location is known) and unknown nodes (the location is unknown). The main task of WSN localization is to calculate the coordinates of the unknown node via biased measurements obtained from the beacon nodes. Localization techniques of WSN can be divided into two types: range-based localization algorithms [1] and nonranging (range-free) based localization algorithms [2]. Some classic methods of range-based indoor localization technology are time of arrival (TOA) [3, 4], time difference of arrival (TDOA) [5, 6], angle of arrival (AOA) [7], and received signal strength (RSS) [8, 9]. Some advanced approaches which combine the methods above (data fusion) are also applied practically [1012]. The proposed method in this paper employs TOA in consideration of its low complexity and high accuracy [13].

Distance measurements are prone to be affected by NLOS. If the propagation condition between two types of nodes is line of sight (LOS), some classic localization approaches such as Kalman filtering (KF), which assume estimates are Gaussian, unbiased, and homoscedastic, could achieve high accuracy. However, in indoor environments, the signal between two types of nodes may be reflected or diffracted by obstacles. This type of scenario is classified as “nonline of sight” (NLOS). A portion of the measurements produced in the presence of NLOS are incorrect (due to positive deviation) [1416], which presents a problem when designing localization algorithms. Moreover, NLOS obeys different statistical distributions for different scenes.

Some methods have been applied to improve the applicability of KF, which effectively alleviated fluctuation of RSS caused by NLOS [17, 18]. Apart from this, some methods have appeared to further mitigate the NLOS error. Those methods can be divided into two categories, one needs to conduct NLOS identification, while the other does not.

Recently, algorithms for computing the position of mobile nodes without NLOS identification are studied [1921]. Chen proposed the residual weighting algorithm (RWGH) [19]. The reciprocal of the residuals is employed as the weight to perform weighted summation, and NLOS error is significantly attenuated. Considerable works deal with nonlinear and non-Gaussian problems in localization framework. One of them is the hierarchical voting-based mixed filter (HVMF) which mixes the Square Root Unscented Kalman Filter (SRUKF) and the particle filter (PF) [20]. HVMF can efficiently reduce the effect of NLOS errors no matter the amount of measurement noise. However, since the RWGH algorithm exhaustively combines measured values and HVMF is a combination of several algorithms, they consume a lot of time and energy. Methods based on the interacting multiple model (IMM) achieves good performance too, which are also some typical cases without NLOS identification. A Kalman-based IMM filtering algorithm has been proposed [21]. IMM is employed as a switch between the line of sight (LOS) and non-LOS (NLOS) states with two interactive modes. The LOS/NLOS smoothers, which correspond to two modes, are used simultaneously. Then, results obtained from both smoothers are combined. Compared to HVMF, K-IMM takes less computation time; however, its computational complexity is higher than methods with NLOS identification and switching to a smoother channel.

The methods for NLOS identification to compute the position of mobile nodes have been studied [14, 2226]. It is necessary to determine whether the current measurement is obtained under NLOS conditions. If the identification of the propagation condition is correct, the localization accuracy can be achieved to a high level. A least square Support Vector Machine-based NLOS identification algorithm [14] shows nice performance in mitigating NLOS-affected UWB data. Moreover, the Wylie algorithm [22] is one of the aforementioned NLOS identification methods [2224]. It fits several historical measurements and compares measurement noise with the root mean square residual of the fitted value and measurement. Another method conducts NLOS identification via comparing measurement noise with the residual of prediction and measurement [25]. These two methods above have achieved good positioning accuracy. They tried to correct the NLOS error through two different NLOS identification methods. The Wylie algorithm does not require prior information of NLOS error; however, it is not sensitive enough when LOS/NLOS switching. The method in [25] requires prior NLOS information because it has to obtain the parameters of RSS indication. Therefore, in order to make a compromise between sensitivity and robustness, this paper states a TOA-based fitting NLOS identification via distance prediction.

Some methods employ fitting for NLOS mitigation. The modified Kalman filter algorithm is utilized to reduce NLOS error, and on the basis of it, the least squares method (LSM) is employed to reconstruct the measured value [26]. In the method stated in this paper, a curve is fitted through LSM based on the historical measurements, and this curve is used not only for NLOS identification but also for alleviation of NLOS errors, improving localization accuracy without consuming too much computational time. Moreover, the algorithm in [26] is only used for the stationary localization of WSN nodes, while the proposed method is designed for mobile targets.

In this paper, a method is proposed to deal with NLOS noise in an indoor localization framework. The method achieves a balance between low complexity and high accuracy, without requiring prior information on NLOS errors. Simulation on various node dispositions and noise distributions demonstrates good performance of the method, particularly under large NLOS noise cases. Besides, the proposed method is suitable for 2-dimensional situations, as extension to 3-dimensional situations is rather straightforward.

The rest of the paper is framed as follows. In Section 2, the system model is illustrated. In Section 3, the proposed method is discussed in detail. Simulation analysis and experiment results are shown in Section 4. Section 5 draws conclusions.

2. System Model

As shown in Figure 1, it is assumed that beacon nodes are randomly deployed in the radio propagation environment to detect the signal from the mobile node. The coordinate of the -th beacon node is given as follows, for , and the location of the obstacles is unknown. The mobile node moves randomly in the measuring site, whose coordinate at time is for . This paper considers a 2-dimensional scenario.

The beacon nodes receive the signal sent from the mobile node, and the distance information is converted from it. Synchronization among and is assumed for analytical convenience [27]. The estimation model based on the TOA method in LOS propagation conditions is modeled as follows [28]: where is the real TOA between the and the and is the measurement noise modeled as zero-mean white Gaussian with variance .

The true distance between the -th beacon node and the mobile node at time is written as

The measured distance corresponding to the TOA data between the and the at time in LOS propagation conditions is modeled as [29] where is the propagation velocity of the wireless signal and is the measurement noise modeled as zero-mean white Gaussian with variance .

In NLOS propagation conditions, since the obstacles are located between the and the , the signal arrives at after reflection and diffraction effects. Thus, the distance measurement corresponding to the TOA data between the and the at time in NLOS propagation conditions is modeled as [30, 31] where is the NLOS error which is assumed independent with the measurement noise , and is positive on account of longer path of indirect propagation. The NLOS error is assumed to obey a Gaussian, uniform, or exponential distribution, and its distribution and parameters vary in different indoor radio environments and measurement methods.

The probability density function (PDF) of can be expressed by

PDF of when it obeys the Gaussian distribution is given by

PDF of when it obeys the uniform distribution is given by

PDF of when it obeys the exponential distribution is given by

3. Proposed Method

As shown in Figure 1, the proposed method is performed with beacon nodes. Its input is the distance measurement , and output is the coordinate estimation of mobile node .

3.1. General Concept

From the distance measurement models, a state vector can be obtained according to the which is defined by for , where is the velocity of the according to the . The state space model of the signal under LOS/NLOS environment can be described as where is the sampling period, and is the random process noise due to the acceleration of the that is modeled as zero-mean white Gaussian distribution with diagonal covariance matrix . The error covariance of the system is defined as where is the estimation of the state vector and represents the mathematical expectation of the expression contained within.

The measurement equation of the under LOS/NLOS environment can be described as where is the observation vector according to the , is the observation matrix, is the observation noise from the that is modeled as

As shown in Figure 2, the proposed method consists of four main stages: (1)NLOS Detection through Polynomial Fitting. After obtaining the distance measurement at measurement time , historical measurement data at time to time are selected. Thus, a total of measurement data is used to execute polynomial fitting. Then, a curve is obtained from it. The fitted curve gives the distance prediction value of the mobile node at time . and two values are subtracted to obtain a residual. Then, the residual is employed to identify whether the signal propagation condition between the and the is LOS or NLOS.(2)Adjusted Kalman Filter. Part of the state space model is adjusted with the primary and the quadratic coefficient of the fitted curve. Then, the Kalman filter is performed based on the adjusted state space model and obtains the state estimation . Finally, the distance estimation is obtained from the state estimation .(3)Combination through Weighting Filter. In this stage, if the propagation condition is judged as NLOS in the first stage, the state estimation obtained from the previous stage and the fitted curve are weighted to obtain a weighted state estimation . Finally, the method yields total distance estimation in the case of LOS/NLOS.(4)Location Estimation. With the distance estimation obtained from the previous stage, the coordinate estimate of the is calculated in this stage by the maximum likelihood estimation localization method.

3.2. NLOS Detection through Polynomial Fitting

NLOS detection is implemented by quadratic polynomial fitting which is performed on the last historical measurement data based on the current measurement time. Then, the distance prediction of the mobile node is obtained by the curve fitted from previous polynomial fitting, which is illustrated in Figure 3. A residual is obtained from the prediction value and the distance measurement at the next measurement time. Finally, the residual is used as the threshold to identify whether the signal propagation condition between the beacon node and the is LOS or NLOS.

Step 1. A curve is fitted using the last historical measurement data according to the , and the curve can be described as , where is the nth coefficient of the fitted polynomial, represents the , and is the time step. The unknown coefficients are obtained via least squares method: is the multivariate function of . Since a function has a partial derivative at a point and has an extreme value at that point, , for ; then, can be solved. Thus, we obtain the fitted curve:

Step 2. After obtaining distance measurement at time , measurements are selected to fit a curve . Then, the distance between the and the at time can be predicted by the fitted curve. The one step distance prediction obtained by the at time is where represents the value of the curve when horizontal coordinate is . Then, we calculate the residual by Based on the premise that the standard deviation of the distance measurement samples in NLOS is larger than that in LOS, it can be predicted whether there exists NLOS propagation between the and the at time : The hypothesis holds true, if the propagation condition between the and the is LOS at time . The alternative holds when the condition is NLOS. is a positive integer.
In the simulation, is assumed. When holds true, the probability of in the interval is . According to (3) and (5), is . In this case, it is a small probability event when is outside the interval .

3.3. Adjusted Kalman Filter

In the Kalman filter section, part of the state space model is adjusted as follows.

The linear term coefficient of the expression of the fitted curve can be understood as the velocity of the mobile node ; that is, . Thus, the state vector can be rewritten as

Similarly, the quadratic coefficient of the fitted curve can be assumed as the acceleration of the ; that is, . Thus, the state space model can be rewritten as

Then, the Kalman filter is performed based on this model.

Step 1. Kalman Prediction. The state prediction and the prediction error covariance matrix can be obtained by the Kalman filter based on the rewritten state space model: where is the prediction of the state vector, is the estimation of the state vector at time , is the prediction error covariance matrix, and is the estimation error covariance matrix at time . The Kalman residual is where . The Kalman gain is It is employed to minimize the covariance of the distance prediction error . is the observation error covariance matrix.

Step 2. Kalman Update. The state estimation and the estimation error covariance matrix can be obtained by the following formula: The distance estimate between the beacon node and the can be obtained by the state estimate : where , is the weighted value of the state estimate under NLOS, and the weighting filter method will be introduced in the next section.

3.4. Combination through Weighting Filter

In the NLOS propagation condition, in order to alleviate the NLOS error, a weighted summation can be employed with the fitted curve and the state estimate . is obtained from , which is different from the curve calculated in NLOS detection stage.

First, for further trust on the fitted value when the filtered value badly deviates from the real distance, is defined as the weight, where represents the value of curve when horizontal coordinate is . Then, the weighted sum can be expressed as where . Thus, the distance measurement , according to the beacon node at time , converts into the distance estimate which can be described as

1: fordo
2: obtain distance measurement .
3: Calculate curve and by polynomial fitting using Eq. (14) and Eq. (15).
4: Obtain distance prediction using Eq. (16).
5: NLOS detection by hypothesis test using Eq. (18).
6: Adjusted Kalman Filter using Eq. (19) and Eq. (20).
7: Kalman prediction using Eq. (21) and Eq. (22).
8: Kalman update using Eq. (26) and Eq. (27).
9: if NLOS detected then
10:  calculate weighted state estimation by weighting filter using Eq. (29).
11: end if
12: obtain distance estimation by combination using Eq. (28).
13: calculate coordinate estimation by maximum likelihood localization using Eq. (34).
14: end for
3.5. Location Estimation

In this section, maximum likelihood localization method [32, 33] is briefly introduced. As mentioned above, the coordinates of the beacon nodes are . The coordinate of the mobile node at time is for . The output of the proposed method is . Then, the following equation set is obtained:

The equation set above can be rewritten as follows:

It can be represented by a linear equation , where and are given by

The coordinate matrix of the is calculated as follows

The overall PF-AKF procedure is summarized in the pseudocode in Algorithm 1.

4. Performance Evaluation and Analysis

In this section, extensive simulation experiments are carried out with the help of MATLAB2017a installed on a PC with Intel(R) Core(TM) i5-6300HQ CPU @ 2.30 GHz and 8.00 GB RAM. To prove the efficacy of the proposed PF-AKF algorithm, the simulation results of the proposed method are compared with those of the Kalman filter (KF), adjusted Kalman filter (AKF), and Kalman-based interacting multiple model (K-IMM) [15] techniques. KF is a classic method on which the proposed method is established. K-IMM, whose simulation preset is similar to the proposed method, is an algorithm which can reach high localization accuracy. The beacon nodes are randomly deployed in a square space of , and the propagation condition between the mobile node and the beacon nodes is randomly generated with LOS probability . In the simulation, just one parameter changes in fixed increments every time 1000 Monte Carlo operations are conducted, and the others remain default. Root mean square error (RMSE) is considered a performance indicator, which is given by where , , is the real location of the mobile node at time , and represents the location estimation for -th trial at time . Additionally, error bars are imparted, showing standard deviation, to evaluate the performance in a comprehensive approach.

Figure 4 shows the position of beacon nodes and also shows that the mobile node moves along a fixed single trajectory. In each simulation, the trajectory of the mobile node is fixed and it is assumed that the mobile node has a constant velocity of 1 m/s.

4.1. The NLOS Errors Obey a Gaussian Distribution

The default parameter values in the simulation are shown in Table 1.

Figure 5 shows the effect of changing the number of beacon nodes on the localization accuracy of PF-AKF, K-IMM, KF, and AKF. As the number of beacon nodes increases, the localization accuracy of the four algorithms increases. The localization accuracy of PF-AKF is always better than that of the other three, and AKF always performs better than KF. In the case of , the localization accuracy of PF-AKF is 12.190%, 17.780%, and 22.300% higher than K-IMM, AKF, and KF, respectively.

Figure 6 shows the effect of changing the probability of LOS propagation on the localization accuracy. As increases, RMSE decreases rapidly. The localization accuracy of PF-AKF is higher than K-IMM and KF. When , the localization accuracy of PF-AKF is 11.500%, 18.020%, and 21.18% higher than that of K-IMM, AKF, and KF, respectively.

Figure 7 shows the effect of changing the deviation of measurement noise on the localization accuracy. With the increase of , the localization accuracy of the four algorithms gradually degrades. In the case of small , PF-AKF performs better than the other three algorithms; however, under a large condition specifically greater than 3.5 m, the localization accuracy of K-IMM is higher than PF-AKF. When , the PF-AKF localization accuracy is 9.570%, 15.560%, and 19.960% higher than K-IMM, AKF, and KF, respectively. Meanwhile, when , the PF-AKF localization accuracy is 3.510% lower than K-IMM and 10.770% and 15.42% higher than AKF and KF, respectively. When reaches a certain value, performance of PF-AKF becomes poorer than K-IMM, which results from relatively low accuracy of NLOS detection.

The effect of varying NLOS errors’ mean and standard deviation on the four algorithms is presented in Figures 8 and 9, respectively. As shown in Figure 8, as the mean of NLOS errors increases, the RMSE of the four algorithms increases. The average RMSE of PF-AKF is 2.7335 meters, and those of KF, AKF, and K-IMM algorithms are 3.0411 meters, 3.2599 meters, and 3.4464 meters, respectively. As shown in Figure 9, with the increase of the standard deviation of NLOS error, the localization accuracy of the four algorithms degrades. When , the localization accuracy of PF-AKF improves about 13.480%, 17.180%, and 19.190% in comparison with K-IMM, AKF, and KF algorithms, respectively.

4.2. The NLOS Errors Obey a Uniform Distribution

The default parameter values in the simulation are shown in Table 2.

Figure 10 shows the cumulative distribution function of the localization error. 97.5% of the localization error of PF-AKF, K-IMM, AKF, and KF goes below 1.960 meters, 2.067 meters, 2.758 meters, and 2.871 meters, respectively.

As shown in Figure 11, the localization error of the four algorithms decreases as the number of nodes increases. Among them, PF-AKF has the highest localization accuracy, as the mean value of RMSE of PF-AKF is 7.390%, 9.350%, and 13.770% lower than K-IMM, KF, and AKF, respectively.

As shown in Figure 12, performance of the four algorithms degrades with the increase of . The localization accuracy of PF-AKF is higher than K-IMM and KF algorithms. In the case of , the localization accuracy of PF-AKF is 10.520%, 13.960%, and 14.190% higher than the K-IMM, AKF, and KF algorithms, respectively. Under small condition, RMSE of the three methods is similar except AKF whose RMSE is much larger than the other three. Therefore, PF-AKF plays an advantage when the mean of NLOS error is large.

4.3. The NLOS Errors Obey an Exponential Distribution

The default parameter values in the simulation are shown in Table 3.

Figure 13 shows the cumulative distribution function of the localization error in the case where the NLOS noise obeys the exponential distribution. 90% of localization error of the PF-AKF, AKF, K-IMM, and KF is less than 1.647 m, 1.744 m, 1.879 m, and 2.348 m, respectively.

The variation of the RMSE of the four algorithms when changing is shown in Figure 14. As increases, the RMSE of the four algorithms increases. The localization error of PF-AKF and K-IMM is rather close. Moreover, in most cases, the localization error of both PF-AKF and K-IMM is smaller than the KF algorithm. When is less than 7.04, PF-AKF has the highest localization accuracy. However, when , PF-AKF performs poorer than K-IMM.

4.4. Discussion on Performance

In most cases, the proposed method shows superior performance compared to KF, AKF, and K-IMM. However, there exists some cases such as large standard deviation of measurement noise and small parameter value in exponential distribution where the proposed method performs badly, even inferior to K-IMM. Therefore, in general, the proposed method possesses higher localization accuracy than KF, AKF, and K-IMM, particularly under large NLOS noise cases. This is because PF-AKF’s NLOS identification could better handle large NLOS noise than KF, AKF, and K-IMM. There exists downturn of the proposed method due to low accuracy of polynomial fitting caused by large NLOS noise in the first few measurement times. Therefore, a large standard deviation of measurement noise might be a breakthrough for further study.

4.5. Experimental Results

To further testify the performance of PF-AKF, an experiment is implemented in a real environment. In order to obtain experimental data, a chirp spread spectrum (CSS) positioning system is employed. As shown in Figure 15, 7 beacon nodes are deployed in a room. The beacon node and the mobile node are about 1.1 m above the ground. The distance measurement frequency of CSS nodes is set to 20 Hz. The mobile node moves along a U-shape trajectory at a uniform speed around the obstacle. In order to compare the proposed PF-AKF algorithm with the KF, AKF, and K-IMM algorithms, the same set of measured data is applied to all of them with the help of MATLAB2017a.

In Figure 16, the positioning errors of the PF-AKF, KF, AKF, and K-IMM algorithms at each sample point are compared. The average localization errors of PF-AKF, KF, AKF, and K-IMM algorithms are 0.5240 m, 0.6564 m, 0.6170 m, and 0.6343 m, respectively. The localization accuracy of PF-AKF algorithm is 20.17%, 15.07%, and 17.39% higher than that of KF, AKF, and K-IMM, respectively.

Figure 17 shows the cumulative distribution function of the localization error of the PF-AKF, KF, AKF, and K-IMM algorithms. 90% localization error of the PF-AKF, KF, AKF, and K-IMM algorithms is less than 0.6807 m, 0.8494 m, 0.7701 m, and 0.7641 m, respectively. When the localization error of the PF-AKF, KF, AKF, and K-IMM algorithms reaches 0.9162 m, 1.1390 m, 1.1310 m, and 1.062 m, respectively, the cumulative distribution function is close to 1.

4.6. Computational Time

As shown in Table 4, runtimes of the four algorithms are compared. The four algorithms are programmed under aforementioned configuration. The time duration of a single mobile target’s one (time) step localization is calculated and compared to that of KF, AKF, and K-IMM. The proposed method runs faster than the K-IMM algorithm. Since fitting curves consume some time, the proposed method is relatively more complex than the KF algorithm.

5. Conclusions

In this paper, a polynomial fitting-based adjusted Kalman filter (PF-AKF) method is proposed, which is robust to NLOS errors. The method does not require any prior statistical information of the NLOS noise. First, historical measurement data obtained by the beacon nodes are used to fit the polynomial curve by the least squares method and predict the measured value at the next moment by the curve. Then, the residual is obtained by subtracting the observed value from the predicted value. The residual is then employed to judge whether the propagation condition is LOS or NLOS. Kalman filtering is performed after approximating the primary coefficient and the quadratic coefficient obtained by the polynomial fitting to the velocity and acceleration of the mobile node into the state vector. In the presence of NLOS error, the KF results are weighted with the fitted curves to attenuate the effect of NLOS errors. The simulation results show that the method is robust to the NLOS errors with higher localization accuracy, and the method has better performance when the measurement noise is small. For future work, the computational complexity would be reduced through optimization of the algorithm, and we will also apply the method to TOA/RSS data fusion-based localization with unscented Kalman filter to enhance the performance.

Data Availability

The simulation and experimental data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China under Grant No. 61803077, Natural Science Foundation of Hebei Province under Grant No. F2016501080, and Fundamental Research Funds for the Central Universities under Grant No. N172304024.