A Novel Non-Line-of-Sight Indoor Localization Method for Wireless Sensor Networks

. The localization technology is the essential requirement of constructing a smart building and smart city. It is one of the most important technologies for wireless sensor networks (WSNs). However, when WSNs are deployed in harsh indoor environments, obstacles can result in non-line-of-sight (NLOS) propagation. In addition, NLOS propagation can seriously reduce localization accuracy. In this paper, we propose a NLOS localization method based on residual analysis to reduce the in ﬂ uence of NLOS error. The time of arrival (TOA) measurement model is used to estimate the distance. Then, the NLOS measurement is identi ﬁ ed through the residual analysis method. Finally, this paper uses the LOS measurements to establish the localization objective function and proposes the particle swarm optimization with a constriction factor (PSO-C) method to compute the position of an unknown node. Simulation results show that the proposed method not only e ﬀ ectively identi ﬁ es the LOS/NLOS propagation condition but also reduces the in ﬂ uence of NLOS error.


Introduction
The rapid development of microelectromechanical system (MEMS) technology, sensor technology, wireless communication, and low-power embedded technology promotes the progress and development of wireless sensor networks (WSNs).WSNs consist of a large number of inexpensive microsensor nodes deployed in a monitored region.The sensor nodes are connected to each other by selforganization and multihop communications [1].Sensor nodes consist of sensors, digital processing units, a wireless communication module, and a power module.They can collaboratively sense, gather, and process the information of the perceived objects in a monitored region and then send the information to the sink node.WSNs are widely used in traffic management, environmental monitoring, medical care networks, logistics management, and other fields and profoundly influence the social life of people [2].
One of the most important issues for WSNs is localization technology [3].The localization technology is the essential requirement of constructing a smart building and smart city.WSN-based localization methods can be categorized as range-based localization methods and range-free localization methods.In range-based localization methods, different measurement techniques for localization can be classified as time of arrival (TOA), time difference on arrival (TDOA), received signal strength (RSS), and angle of arrival (AOA).The range-free localization methods do not need to measure the distance or angle between the nodes [4].These methods can estimate position based on the network connectivity and the distribution of the history measurements.The range-free localization methods can be divided into multihop estimation-based localization and pattern matching-based localization.
For the TOA-based localization method, the signal velocity is known in advance.It measures the travel time of the signal from the beacon node to the unknown node, and the distance between two nodes is equal to the product of the signal velocity and the travel time.However, this method requires high-precision time synchronization between two nodes.As light synchronization error can significantly affect the ranging error.Therefore, the TOA method requires additional hardware to ensure the time synchronization.The TDOA method requires two different transceivers on a node so that the node can transmit two signals with different velocities at the same time.It estimates the distance by measuring the two signals' arrival time difference between the beacon node and the unknown node.The requirement of time accuracy of the TDOA method is lower than the TOA method, but it still has high requirements for hardware.The RSS method is one of the least expensive ways to locate an unknown node because it does not need additional hardware.The RSS method measures the signal power loss value from a beacon node to an unknown node, and it converts the power loss value to the distance through a signal propagation model.The AOA method measures and calculates the angles between beacon nodes and an unknown node and then estimates the position of the unknown node based on the angle between two nodes.
In this paper, we investigate the TOA-based localization method in an indoor environment.Obstacles can result in NLOS propagation in harsh indoor environments, and the accuracy of localization will drop sharply.We first propose an NLOS identification method based on residual analysis.The propagation condition can be identified by it.Then, the localization objective function is established using the LOS measurements.In addition, the particle swarm optimization with a constriction factor method is proposed to find the optimal solution of the localization function.The optimal solution is the estimated position of the unknown node.The main contributions of this paper are given as follows: (1) The NLOS identification method does not need prior knowledge of the NLOS error.In addition, it can identify the NLOS measurements when the number of LOS measurements is larger than the number of NLOS measurements.
(2) The proposed NLOS correction method can mitigate the effect of the NLOS error.
(3) The proposed method not only uses TOA measurements but also uses other signal features such as TDOA and RSS easily.Therefore, it is not constrained by different physical measurement techniques.
The rest of the paper is organized as follows.Section 2 analyzes the NLOS localization technology for WSNs.Section 3 introduces the proposed NLOS identification methods based on residual analysis and a localization method based on an intelligent optimization algorithm.In Section 4, the simulation results of the proposed algorithm are presented, and the performance of the proposed algorithm is analyzed.The conclusions are presented in Section 5.

Related Work
Compared with traditional positioning systems, WSNbased localization systems can be quickly deployed and can adapt to various harsh environmental conditions.They have the characteristics of low power consumption, low cost, and strong expansibility.In addition, the Global Positioning System (GPS) technique, which is widely used at present, has the characteristics of high energy consumption, high cost, and large volume compared with WSNs [5].Thus, WSN-based localization systems have broad application prospects, and they can be used in environmental monitoring, medical care networks, military applications, target tracking, intelligent traffic management, and other fields.The development of WSN-based localization technology has promoted an industrial revolution that influences the social life of people.
Because the WSN localization technology has remarkable superiority, both researchers and designers are paying more attention to it and devoting more effort to improving the positioning accuracy.In [6], a residual test method is proposed to determine the number of LOS and identify the propagation condition synchronously.This method can identify the NLOS with high accuracy.In [7], the authors proposed a routing algorithm that is widely used in centralized range-based localization schemes.Experimental results show that the algorithm provides distance estimates with low estimation error.However, the algorithm requires a large amount of calculation.A novel localization algorithm based on an approximate convex decomposition (ACDL) is proposed [8].It relies only on network connectivity information.The hop count distance between nodes can provide a good approximation of the Euclidean distance.In [9], the authors design a localization method with outlier detection, and the ranges with large errors can be eliminated explicitly before computing the location.However, the method must define verifiable graphs in which all edges should be verifiable.To obtain a low complexity, the authors proposed a modification of the gradient descent method and an accurate multilateration localization algorithm for wireless sensor networks [10].Only when using the RSSI to estimate the distances between nodes, the proposed algorithm can obtain better convergence properties and a lower computational load in the presence of significant range error.
NLOS propagation is ubiquitous in practical indoor environments.NLOS propagation will contribute a positive additional excessive delay to the measured value.NLOS error is the main source of the localization error.To improve the positioning accuracy in practical conditions, NLOS identification and mitigation methods are widely investigated.A residual weighting algorithm (Rwgh) is proposed in [11].The sum of squared residuals of a least squares estimation is used as the indicator to show the accuracy of the calculated node coordinates.Least squares multipoint location is applied on all possible combinations of the distance measurements.Then, the authors compute the estimated location and used it as a weighted combination of these intermediate estimates.The RANSAC 2 Journal of Sensors algorithm is an iterative method to estimate the position from a set of measurements that contains NLOS error [12].A reasonable result is produced only with a certain probability, so RANSAC is a nondeterministic algorithm in this sense.The probability can be increased as more iterations are allowed.In [13], the authors proposed a distributed multiple-model estimator for simultaneous localization and tracking (SLAT) with NLOS mitigation.The difficulties of exponentially growing terms for centralized multiple-model estimation can be overcome if the fusion is carried out in a distributed manner.An NLOS mitigation technique based on convex SDP optimization is proposed in [14].Especially in severe NLOS environments, the proposed SDP estimator outperforms the other algorithms substantially.In [15], a novel algorithm is presented by the authors to solve NLOS propagation.The algorithm depends only on the features extracted from the received waveform.In addition, there is no need to formulate an explicit statistical model for the features.

System and Range Measurement Model Description
In this section, we first analyze the TOA measurement model in LOS and NLOS propagation conditions, respectively.Then, we propose an NLOS identification method based on residual analysis, according to the characteristics of the NLOS error.Finally, we improve the existing NLOS localization method by using particle swarm optimization with a constriction factor.
3.1.TOA Measurement Model.The TOA method measures the travel time of a signal from the beacon node to the unknown node.The true distance of TOA is modeled as follows: where c is the speed of the signal, d is the distance between the two nodes, and t is the travel time of the signal between the two nodes.
Because the travel time t cannot be completely synchronous in LOS propagation conditions, it consists of measurement error.The time estimation of TOA is as follows [16]: where t is the true travel time of the signal between the two nodes; n it is the measurement error modeled as a zero-mean white Gaussian process with variance σ 2 it .The distance between the ith beacon node and the unknown node in LOS propagation conditions is as follows [17]: where d i is the true distance between the two nodes; n i is the measurement error modeled as a zero-mean white Gaussian process with varianceσ 2 i .In practical conditions, the existence of obstacles will result in NLOS conditions.Such obstacles will admit a positive error component to the estimated distance.Considering the NLOS error, the distance between the ith beacon node and the unknown node in NLOS propagation conditions is modeled as follows [18,19]: where n NLOS is the NLOS error and it is the positive bias error, and n NLOS is uniformly distributed (n NLOS ~U 0, B max ).
Because the causes of NLOS error and measuring error are different, NLOS error is assumed to be independent of the measuring error [20].
Figure 1 shows the cumulative distribution function (CDF) of measurement noise and NLOS error.The measurement noise n i obeys a Gaussian distribution, that is, n i Ñ 0, 0 5 .The NLOS error is a uniform distribution or a Gaussian distribution, that is, n NLOS ~U 0, 4 and n NLOS Ñ 2, 3 .

An NLOS Identification Method Based on Residual
Analysis.NLOS propagation is ubiquitous in practical conditions and has a large influence on measurements.To obtain more accurate measurements, approaches to reduce the influence that NLOS error admits to localization accuracy must be considered.NLOS error has distinct characteristics compared with the measuring error: Considering the characteristics of the NLOS error, NLOS identification methods based on residual analysis can be used to determine and eliminate the NLOS measurements.The basic approach of the residual analysis method can be expressed as follows: Step 1.There are N different beacon nodes in the field.Combine the measurements provided by these beacon nodes.M different combinations of distance measurements can be obtained.
Step 2. Use the maximum likelihood method to compute the estimated location of each combination.The estimated position of the kth combination is Xk .The details of the maximum likelihood method are shown in Appendix.Calculate the residual of each measurement as follows: where di is the distance from the unknown node to the ith beacon node, and X i is the coordinate of the ith beacon node.
Step 3. Accumulate the residuals of each measurement as follows: Res i k 7 We can obtain N cumulative residuals CRes i , i = 1, … , N.
Step 4. Sort the cumulative residuals from large to small; the measurements with the largest residual can be regarded as NLOS measurements.By using the above steps, we can determine the NLOS measurements, and the rest of the measurements can be regarded as measurements in LOS propagation conditions.

PSO with a Constriction Factor-Based Localization
Method.The probability density function of the measurement in an LOS condition can be expressed as follows [21]: where di is the measured distance from a beacon node to an unknown node, d i = x i − x 2 + y i − y 2 is the true distance between the ith beacon node and an unknown node, x i , y i is the coordinate of the ith beacon node, and x, y is the true location of the unknown node.We use the LOS measurements to establish the objective function as follows: x, ŷ = arg max where L is the number of LOS measurements.
To solve the position function directly, not only is a large amount of calculation required but the difficulty of finding an analytical solution is also encountered.Therefore, we use the particle swarm optimization with a constriction factor (PSO-C) method to determine the optimal solution.PSO is based on simulating a simplified model of social interaction.PSO is easy to implement and does not require gradient information, so it is widely used in scientific research and engineering practice.
The basic principle of the algorithm is as follows: assume that a swarm includes M particles.The search space is a D-dimensional vector.The location of the ith particle in the swarm is The experienced best location of a particle is p i = p i1 , p i2 , … , p iD , where 1 ≤ i ≤ m.The experienced best location of all particles in the swarm is p g = p g1 , p g2 , … , p gD .The location and velocity of the particles change according to the equation as follows: K is a constriction factor and is a function of c 1 and c 2 .
where c 1 and c 2 are learning factors, and where c 1 = c 2 = 2 05.ξ and η are two uniform random numbers in [0, 1], that is, ξ , η ∈ U 0, 1 .The velocity of the particles is limited to a maximum range V max .V max determines the search ability of particles in the search space.
The pseudocode of the PSO-C strategy is shown as follows: 4 Journal of Sensors The p g is the estimated position of an unknown node.

Simulation and Experiments Results
In this section, we evaluate the performance of our proposed NLOS localization algorithms.We compare the proposed method with RANSAC [12], ML [22], and Rwgh [11] methods.The N beacon nodes and one unknown node are randomly deployed in a 30 m × 30 m square space.One obstacle is randomly deployed in the field.
The communication range of sensor node is 50 m.The measurement error n i is modeled as a zero-mean white Gaussian process with variance σ 2 i .The NLOS error n NLOS obeys the uniform distribution (n NLOS ~U 0, B max ).The simulation results are obtained through 1000 Monte Carlo runs.The default parameter values in the simulation are shown in Table 1.We consider the average localization error (ALE) as the performance metric.
where M = 1000, x i , y i is the true location of the mobile node, and x i , ŷ i is the estimated location for the ith Monte Carlo run.First, the identification success rate of the proposed method is evaluated.Figure 2 shows the identification success rate versus the number of beacon nodes.In this simulation, the standard variance of the measurement noise in the LOS condition σ i is varied from 0.1 to 0.5, and the number of beacon nodes is varied from 5 to 10.The results show that as the number of beacon nodes increases, the success rate of the proposed method increases.In addition, as the value of σ i increases, the success rate of the proposed method decreases because, as the value of σ i increases, the measurements will be disturbed by measurement noise more seriously.
When the NLOS error obeys the uniform distribution (n NLOS ~U 0, B max ), the identification success rate versus the maximum bias of NLOS error B max is determined as shown in Figure 3.In this simulation, the standard variance 1. Initialize the basic parameters of PSO-C 2. Generate an initial population X = X1, … , XM and its velocities V = V1, … , VM randomly 3. Calculate the fitness values of the population F = f 1, … , f M 4. Set S to be the pbest = p1, … , pM for each particle 5. Set the particle with best fitness to be pg 6.For t = 1 to tmax do 7.For i = 1 to M do 8.Update the velocity of particle Xi using equation (10) 9. Update the location of particle Xi using equation ( 11 The NLOS errors The NLOS errors U 0, B max B max = 7 The results show that when the number of measurements in the NLOS condition is equal, the success rate is less affected by B max .However, as the number of measurements in the NLOS condition increases, the success rate of the proposed method decreases.
In Figure 4 we evaluate the impact of the number of beacon nodes on the localization error.The results show that the localization error decreases as the number of beacon nodes increases.In addition, the ML method has the largest localization error.When the number of beacon nodes is relatively fewer, such as 8, the Rwgh method works best.When the number of beacon nodes is 9, the localization errors of the Rwgh method, the RANSAC method, and the proposed method are approximately the same.However, the localization error of the proposed method declines faster, and this method has the highest localization accuracy when the number of beacon nodes increases.
Figure 5 shows the relation between the localization error and the standard variance of the measurement noise σ i .σ i is varied from 1 to 5. The results show that as the value of σ i     increases, the localization error increases.In addition, the proposed method has the highest localization accuracy compared with the other methods.In comparison with ML, RANSAC, and Rwgh methods, the localization accuracy of the proposed method increases to 29.36%, 33.05%, and 20.37%, respectively.
Figure 6 shows the CDF of the localization error when the NLOS error obeys the uniform distribution n NLOS ~U 0, 6 .We can see that the 80% localization error of the proposed method is less than 7.122 m, and the CDF trends toward one with a localization error of less than 22.7 m.In comparison with the 80% localization error of the Rwgh, ML, and RANSAC methods, 7.2 m, 8.1 m, and 6.1 m are achieved, respectively.7 Journal of Sensors Figure 7 shows the impact of the parameter B max on the localization error.As the value of B max increases, the localization errors of all algorithms are increasing.However, the ML method is seriously affected by B max .The proposed method achieves the lowest localization error.In comparison with ML, RANSAC, and Rwgh methods, the localization accuracy of the proposed method increases to 30.46%, 11.68%, and 5.64%, respectively.
In order to verify the effective of the proposed localization method, we perform the realistic experiment in the indoor environment.As shown in Figure 8, eight beacon nodes and one unknown node are deployed in the room.The beacon node and unknown node are installed up to 1.7 m above the ground.The experimental equipment is chirp spread spectrum (CSS) localization system.
Figure 9 shows the CDF of the localization error in realistic experiment.It can be seen that 80% localization error of the proposed method is less than 1.879 m.The CDF trends toward one with a localization error of less than 2.559 m.The average localization error of the proposed method is 1.0205 m.The average localization errors of RANSAC, Rwgh, and ML are 1.3491 m, 1.2603 m, and 1.5036 m, respectively.

Conclusion
The NLOS problem is one of the most challenging problems for wireless sensor networks.It can seriously reduce localization accuracy.In this paper, the TOA measurement model is first introduced.We then proposed an NLOS identification method based on residual analysis to solve the problem caused by the NLOS error.In addition, the particle swarm optimization with a constriction factor algorithm is proposed to find the optimal solution of the location estimate of an unknown node.Simulation results show that this method can reduce the influence of NLOS error and improve the positioning accuracy, especially when the number of beacon nodes is relatively large.In future work, the proposed method could be extended to the distributed localization method.At the same time, we will modify the residual analysis method and apply it to the mobile localization to improve the effectiveness of particle filter.

Figure 1 :
Figure 1: The CDF for measurement noise and NLOS error.

Figure 2 :
Figure 2: The identification success rate versus the number of beacon nodes.

Figure 3 :
Figure 3: The identification success rate versus B max .

Figure 4 :
Figure 4: The localization error versus the number of beacon nodes.

Figure 6 :
Figure 6: The CDF of localization error.

Figure 7 :
Figure 7: The localization error versus B max .

Figure 8 :
Figure 8: The floor plan for the test bed.

Table 1 :
) 10. Compute the fitness values of the new particle Xi 11.If the fitness value of Xi is better than the fitness values of pbi 12.Then, set Xi to be pi 13.End if 14.If the fitness value of Xi is better than the fitness values of p g 15.Then, set Xi to be p g The default parameter values.