Abstract
As the key technology for Internet of things, wireless sensor networks have received more attentions in recent years. Mobile localization is one of the significant topics in wireless sensor networks. In wireless sensor network, non-line-of-sight propagation is a common phenomenon leading to the growing non-line-of-sight error. It is a fatal impact for the localization accuracy of the mobile target. In this article, a novel method based on the nearest neighbor variable estimation is proposed to mitigate the non-line-of-sight error. First, the linear regression model of the extended Kalman filter is used to obtain the residual of the distance measurement value. After that, the residual analysis is used to complete the identification of the measurement value state. Then, by analyzing the statistical characteristics of the non-line-of-sight residual, the nearest neighbor variable estimation is proposed to estimate the probability density function of residual. Finally, the improved M-estimation is proposed to locate the mobile robot. Experiment results prove that the accuracy and robustness of the proposed algorithm are better than other methods in the mixed line-of-sight/non-line-of-sight environment. The proposed algorithm effectively inhibits the non-line-of-sight error.
Keywords
Introduction
With the continuous development of sensor technology, wireless communication technology, and network technology, Internet of things (IoT) plays a vital role in many application1–3 such as building intelligence, 4 fire rescue, and environmental monitoring. As one of the critical supporting technologies of the IoTs, wireless sensor network (WSN) has attracted the attention of researchers in recent years. The location information is one of the most important technologies for the application of WSNs. The data without location information are meaningless. 5 The accuracy of location affects the performance of the whole network. Therefore, the localization of the node is one of the key technologies of WSN. According to the fact whether the distance and angle information are needed for localization calculation, the localization of the WSNs can be divided into a range-based localization algorithm 6 and a range-free localization algorithm. 7 According to the different measurement method, the localization of the WSNs can be divided into received signal strength indicator (RSSI), 8 time difference of arrival (TDOA), 9 angle of arrival (AOA), 10 and time of arrival (TOA).11,12 The range-based localization algorithm can achieve high localization accuracy with a lot of calculation and communication energy consumption. Therefore, it is not suitable for low-cost and low-power applications. The range-free localization algorithm uses the connectivity of the network to calculate the location of the node, which is not affected by the ranging error.
At present, the research on WSN localization technology assumes that the nodes are usually deployed in an ideal environment. The propagation signal between the mobile node and the anchor node is usually line-of-sight (LOS). However, the environment is usually complicated in practical applications and there are many obstacles. The propagation signal is easy to reflect and diffract. The communication between nodes is usually non-line-of-sight (NLOS) which leads to a large localization error. 13 The sophisticated environment will reduce the localization accuracy rapidly. Therefore, the research of NLOS error has great significance to the mobile target localization in WSNs.
Different environment needs different requirement of the localization accuracy in for WSNs.14,15 More precise localization accuracy is demanded in some specific applications to complete the effective data collection. Researchers usually regarded that the indoor localization of WSN is in an ideal environment, 16 which mainly reflected in (1) the parameters of the measurement error are fixed. The impact of the measurement error caused by the dynamic environment is not considered. The inaccurate parameter estimation will significantly affect the localization performance. 17 (2) It is usually assumed that the propagation state is LOS or the state is known. The frequent switching of the node propagation state is not considered. In the dynamic indoor environment, the signal propagation state is usually changing in real time. The fixed propagation state will reduce the localization accuracy. 18 However, the indoor environment is more complex and dynamic due to the influence of people or obstacles. The model and parameters of the measurement error will change with time. Motivated that the NLOS propagation of signal decreases the accuracy of localization, we proposed a novel NLOS localization algorithm based on the improved M-estimation and extended Kalman filter (EKF) for the mobile target localization in complex indoor environment. The proposed algorithm effectively reduces the NLOS error and improves the localization accuracy. The main contribution of this article is listed as follows:
We utilize a data processing method of high-frequency ranging, which can effectively distinguish the LOS measurement values and NLOS measurement values.
The proposed algorithm adaptively adjusts the parameters to reduce the adverse effect which is caused by the larger residual value in the localization results.
We propose a nearest variable neighbor estimation algorithm which can be used in different noise environments without the NLOS error model.
The rest of the article is organized as follows: In section “Related work,” we introduce the background and related work. In section “The architecture of the proposed algorithm,” the architecture of the proposed algorithm is described. Section “Proposed method” represents the proposed algorithm in detail. In section “Simulation results,” we describe the simulation results and performance analysis. The conclusion is given in section “Conclusion.”
Related work
The localization of the mobile target has gradually attracted the attention of researchers in a practical application such as fire rescue and health surveillance. Acoustic energy attenuation model and infrared detection are usually used for mobile target localization. Nowak 19 proposed the distributed density estimation and clustering expectation maximization algorithm, but this method is only suitable for the multiple Gaussian models. Sheng and Hu 20 suggested the maximum likelihood (ML) estimation method for multiple sources and accomplished the centralized target localization. For multi-target tracking in WSN, Sheng and Hu 21 proposed the distributed particle filter, which solved the problem of excessive network energy consumption in target tracking and localization. Godsill and Vermaak 22 proposed a variable rate particle filter, which improved tracking results using a new system model. Clark et al. 23 introduced the moving Rayleigh hybrid filtering, which has an excellent tracking effect for the moving target.
Parametric methods and non-parametric methods are two main methods to solve the NLOS errors. The measurement environment of the parametric methods is known as prior knowledge to correct the NLOS error. Mazuelas et al. 24 propose to use the prior knowledge that the NLOS error distribution and the parameters are known. They calculate the measured value with the NLOS error to achieve the correction of the NLOS measurement value. Chen 25 proposed to use interactive multi-model to filter the mixed LOS/NLOS measurement value, and then the classical location algorithm can be used to locate the target. However, the algorithm is limitless for the NLOS parameters are needed as prior information. The proposed method does not require prior information and it is independent of the measurement values. The superiority of the non-parametric method is that it does not require the prior information of the estimation model and NLOS measurements. A Bayesian approximation adaptive Kalman filter 26 is developed in LOS/NLOS environments, where the prior knowledge of NLOS is unknown. They estimate the mean and the measurement noise to mitigate the influence of NLOS error. Liao and Chen 27 proposed a mixed Kalman filter and H-infinity filter (HF) algorithm to reduce the NLOS error.
Many researchers proposed the NLOS localization methods in recent years. Yang et al. 28 proposed a new NLOS recognition algorithm based on the feature selection strategy which can select the optimal subset of input features automatically and improve the accuracy of classification. Then, they used a high precision and low complexity localization algorithm based on the input vector machine. The input vector machine algorithm is sparse and has few import vectors. Tomic and Beko 29 proposed a localization algorithm based on the bisection, which does not need the statistics of NLOS measurements and the prior knowledge of LOS measurements. Cheng et al. 30 classify the NLOS measurements into two categories by Fuccy-C-Means to tackle complicated NLOS errors. And they use the mixed filter algorithms which did not need the prior information. The mixed filter can mitigate NLOS error effectively. Cui et al. 31 suggested using a Gaussian mixture model (GMM), interacting multiple models, and EKF to locate the mobile node in the NLOS environment. They cope with the changing transmission channels with three conditions. The GMM-based algorithm could obtain an accurate estimation. In the literature,32,33 the mixed filter is proposed to mitigate the NLOS error.
The architecture of the proposed algorithm
The methods for improving the localization accuracy of the network mainly fall into two categories: the NLOS identification 34 algorithm and the NLOS mitigating algorithm.35,36 The NLOS identification algorithm mainly identifies whether the distance measurement value obtained is LOS or NLOS. If the LOS measurements are more than three, the NLOS measurements will be discarded and some classical localization algorithms will be used for localization calculation. The NLOS mitigating algorithms usually mitigate the NLOS distance value and use the NLOS distance measurement value to calculate the location. The NLOS mitigating algorithm has a strong inhibition effect on NLOS error and gets a better localization effect. In this article, we identify the NLOS measurements of the mobile target using the residual analysis. Then, we mitigate the NLOS error using the improved M-estimation algorithm based on nearest neighbor variables for localization. The proposed algorithm is described as follows:
Processing the measurement value. We assume that the anchor node could obtain multiple measurement values and the ranging frequency is higher than the localization frequency. Therefore, we average the measurement values.
Generating the residuals. We obtain the average distance measurement value of each anchor node. And then the residuals are generated by extend Kalman filter.
Selecting a reliable measurement value. The residual generated in step 2 is processed by the improved extend Kalman filter algorithm. It is considered that it is more reliable to generate the average measurement value with a small residual. The most reliable distance measurement values are regarded as LOS measurements.
Calculating the location. We use the distance vector generated in step 3 as the current distance measurement vector. Then, we utilize an improved M-estimation algorithm based on nearest neighbor variables to complete the current location calculation. Finally, we obtain a state estimation vector
Proposed method
System model
We calculate the location of the mobile robot by N anchor nodes in the monitoring area in the WSN. The location coordinates of anchor nodes are expressed as
At time k, the distance between the mobile robot and the nth anchor node is
In LOS environment, the measured distance between the nth anchor node and the mobile robot can be modeled as
where
In NLOS environment, the measured distance between the nth anchor node and the mobile robot can be modeled as
where
Improved extend Kalman filter
We obtain the optimal measured value of the measured value and historical data using the linear minimum variance when we track the trajectory of the mobile robot. 37 However, most of the models are nonlinear in practical application. Therefore, we usually use the Kalman filter algorithm to linearize the model. In this article, we use the EKF 38 algorithm to locate the mobile robot. The nonlinear model is approximately linearized using the Taylor series expansion. Then, the particle filter algorithm is used to solve the localization problem.
The mobile robot moves at a variable speed in the monitoring area which deploys N anchor nodes. The mobile robot is measured by N anchor nodes for localization.
According to the characteristics of high-frequency base station localization, each anchor node can obtain j measurement value in each location process. 39 The average distance vector between the mobile robot and the anchor node at time k is
where j is the number of ranging measurements that the anchor node can complete in one positioning process.
The state equation of the system is
where
where
The measurement equation of the system is
where observation noise includes N residuals which are caused by measurement noise error and NLOS error at time k
where
We selected
where
Then, we linearize the measurement equation
The equations of time update is
The equations of measurement update is
where
In order to obtain the distance residual, we linearize the models as follows
The residual vector
The state vector
The posterior covariance of the state vector
Improved nearest neighbor variable estimation localization algorithm
A linear model can be obtained from equation (3)
where
where
where
The ML algorithm is equivalent to the least squares estimation algorithm in a LOS environment. However, the estimation algorithm based on this evaluation function is usually sensitive to NLOS errors. The ML estimation algorithm has superior localization performance in the LOS environment. However, this algorithm is sensitive to NLOS error. It is difficult to obtain satisfactory localization results using the ML algorithm in the mixed LOS/NLOS environment.
The M-estimation
43
algorithm can mitigate the adverse effect of the NLOS error in localization. The
where
We propose an improved M-estimation algorithm based on nearest neighbor variables to overcome these limitations. In this algorithm, the robust density estimation is used to approximate the density function
The penalty function
The algorithm flow is shown as follows:
Step 1. Initialization: We set the iteration
Step 2. Calculate the residual:
Step 3. Estimate density function and evaluation function:
Step 4. Update the result:
Step 5. Check the convergence: If the
The ML estimation algorithm is only used to generate the initial solution of the state vector in step 1 and the noise residual in step 2. The residual is used in step 3 to estimate the evaluation function. In step 4, Newton–Raphson is used to calculate the iteration, and n represents the number of iterations. If the result obtained in step 5 is convergence, the algorithm stops the operation.
The residual generated by the NLOS values is easy to generate a heavy tailed for the probability density function
where
where Z is the quartile spacing and N is the sample size.
Simulation results
In this section, we evaluate the performance of the improved M-estimation based on the nearest neighbor variables and extend Kalman filter (IMNNV-EKF) algorithm through simulation. Figure 1 shows that 10 anchor nodes and obstacles are randomly deployed in the 150 × 150 m2 area. The mobile robot moves at a variable speed in the monitor area. HF algorithm and EKF algorithm are compared with the IMNNV-EKF algorithm. The simulation results of the proposed algorithm are verified through MATLAB R2010a. The default parameter values in the simulation are shown in Table 1.

The simulation diagram of the deployment environment.
The default parameter values.
NLOS: non-line-of-sight.
The performance of the algorithms is evaluated by the root mean square error (RMSE) and cumulative distribution function (CDF)
where
Figure 2 shows that the RMSE of the three algorithms. The localization errors of the EKF algorithm and the HF algorithm are relatively large, which indicates that the EKF algorithm and the HF algorithm are sensitive to NLOS error. Although the localization accuracy of the EKF algorithm has been improved, the overall localization accuracy is still weak. Compared with the HF algorithm and the EKF algorithm, the proposed algorithm has higher localization accuracy. It can be seen that the proposed algorithm has excellent stability among the three positioning algorithms.

The comparison of RMSE for three algorithms.
The CDF of the localization errors for the three algorithms is shown in Figure 3. When the CDF of the proposed algorithm is close to 1, the corresponding localization error is 4 m. In comparison, the HF algorithm and the EKF algorithm are 7.3 and 7.2 m, respectively. The localization error of the proposed algorithm is 50% within 3 m, while the HF algorithm and EKF algorithm are 50% within 5 and 4.8 m, respectively. It can be seen that the proposed algorithm has the highest localization accuracy in the three localization algorithms. The proposed algorithm has a strong inhibition effect on NLOS error in mobile target localization.

The CDF of the localization error.
We analyze the localization performance of each algorithm when the NLOS error obeys Gaussian distribution, exponential distribution, and uniform distribution, respectively. 44
NLOS error obeys Gaussian distribution
When NLOS error obeys the Gaussian distribution, the relationship between the mean of NLOS error and RMSE for three algorithms is shown in Figure 4. With the increase in NLOS error, the localization errors of the EKF algorithm and HF algorithm are increasing. When the mean value of NLOS error is small, the measured value of NLOS produces a small residual value which is not easy to be discarded. The localization error of the proposed algorithm is larger caused by the residual. So, the localization error of the proposed algorithm increases with the increase in the mean value of error. When the mean value of NLOS error increases to a certain extent, the measurement value of NLOS has a large residual. Therefore, the NLOS error is easier to be identified and discarded and the localization error of the proposed algorithm gradually decreases. The localization accuracy of the proposed algorithm is the highest in the three algorithms.

The mean of NLOS error versus the RMSE.
Figure 5 shows the relationship between the measurement noise standard deviation and RMSE. It can be seen that the localization errors of the three algorithms increase with the increase in the standard deviation of measurement noise. The HF algorithm has a significant localization error and its localization performance is greatly affected by NLOS error. The HF algorithm is sensitive to the Gaussian NLOS error. The localization accuracy of the EKF algorithm and the proposed algorithm tends to be stable. The proposed algorithm always has the highest localization accuracy. With the increase in the standard deviation of NLOS error, the localization accuracy of EKF algorithm is closed to the proposed algorithm, but the localization accuracy of the proposed algorithm is always higher than that the EKF algorithm.

The standard deviation of NLOS error versus the RMSE.
NLOS error obeys exponential distribution
The localization accuracy of the three algorithms decreases with the increase in the mean of NLOS error in Figure 6. The HF algorithm is sensitive to exponential distribution and has the worst localization performance. The RMSE of the proposed algorithm is much lower than the EKF algorithm and HF algorithm, which shows the strong robustness of the proposed algorithm. Compared with the EKF algorithm and HF algorithm, the proposed algorithm has the highest localization accuracy (Figure 6).

The mean of NLOS error versus the RMSE
Figure 7 shows the relationship between NLOS error standard deviation and RMSE. It can be seen that with the increase in the standard deviation of the measurement noise, the localization error of each algorithm also increases. The localization effect of the three algorithms is relatively stable and less affected by the standard deviation of measurement noise. The localization accuracy of the proposed algorithm is always better than the other two algorithms. It has a strong inhibition effect on the NLOS error of the Exponential distribution.

The standard deviation of measurement noise versus RMSE when the NLOS error obeys exponential distribution.
NLOS error obeys uniform distribution
When the NLOS error obeys uniform distribution, we analyze the performance of each algorithm. Figure 8 shows the relationship between the maximum deviation coefficient U-max and the RMSE for three algorithms. It can be seen when the U-max = 7, the localization accuracy of the proposed algorithm is 33% and 45% higher than that of the EKF algorithm and HF algorithm, respectively. It can be seen that with the increase in U-max, the localization accuracy of the EKF algorithm and HF algorithm decreases obviously. The localization error of the proposed algorithm increases with the increase in the U-max in the early stage. But with the increase in U-max, the localization error of the proposed algorithm changes to be steady. The localization accuracy of the proposed algorithm is better than other algorithms all the time.

The U-max versus RMSE.
Figure 9 shows the relationship between the standard deviation of measurement noise and the RMSE. When the standard deviation of measurement noise is small, the localization accuracy of the EKF algorithm and HF algorithm is similar. The proposed algorithm is obviously higher than the other two algorithms. With the increase in the standard deviation of measurement noise, the localization accuracy of HF algorithm decreases obviously, the localization accuracy of the EKF algorithm changes more smoothly. The localization accuracy of the proposed algorithm decreases and gradually approaches to the localization accuracy of the EKF algorithm. But the proposed algorithm always has the highest localization accuracy.

The standard deviation of measurement noise versus RMSE when the NLOS error obeys uniform distribution.
Conclusion
In this article, a mobile robot localization algorithm is proposed. The linear regression model of the EKF algorithm is used to generate the residual of the measurement value. Then, the residual selection mechanism is used to filter the residual value. By analyzing the statistical characteristics of the NLOS residual, an estimation algorithm based on the nearest neighbor variable estimation is proposed to estimate the probability density function of residual. Finally a mobile node location algorithm based on improved M-estimation is proposed. Comparing with the HF algorithm and EKF algorithm, the IMNNV-EKF algorithm outperforms other algorithms in localization accuracy and stability. Simulation results show that the IMNNV-EKF algorithm mitigates the NLOS error effectively when the NLOS error obeys three distributions. For future work, we will take into account the model of multiple signals in NLOS environment. We will build the system model based on the mixed RSS/TOA/TDOA which is similar as the actual environment to reduce the error in the transmission from RSS/TOA/TDOA. More actual experiment in different environment is considered to verify the proposed algorithm.
Footnotes
Handling Editor: Lyudmila Mihaylova
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Natural Science Foundation of China under Grant Nos 6171101, 11704263, 61803077, 61973063, 61901098, and 61971118; National Key Robot Project under Grant No. 2017YFB 1301103; and Natural Science Foundation of Liao Ning Province under Grant No. 2019-ZD-0677.
