Abstract

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 influence of NLOS error. The time of arrival (TOA) measurement model is used to estimate the distance. Then, the NLOS measurement is identified 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 effectively identifies the LOS/NLOS propagation condition but also reduces the influence of NLOS error.

1. 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 self-organization 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.

Compared with traditional positioning systems, WSN-based 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 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.

3. 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 is the speed of the signal, is the distance between the two nodes, and is the travel time of the signal between the two nodes.

Because the travel time cannot be completely synchronous in LOS propagation conditions, it consists of measurement error. The time estimation of TOA is as follows [16]: where is the true travel time of the signal between the two nodes; is the measurement error modeled as a zero-mean white Gaussian process with variance . The distance between the th beacon node and the unknown node in LOS propagation conditions is as follows [17]: where is the true distance between the two nodes; is the measurement error modeled as a zero-mean white Gaussian process with variance.

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 th beacon node and the unknown node in NLOS propagation conditions is modeled as follows [18, 19]: where is the NLOS error and it is the positive bias error, and is uniformly distributed (). 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 obeys a Gaussian distribution, that is, . The NLOS error is a uniform distribution or a Gaussian distribution, that is, and .

3.2. 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: (1) NLOS error is always positive. (2) The standard deviation of the distance measurement in NLOS propagation conditions is larger than that in LOS propagation conditions. (3) NLOS error exhibits high randomness.

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 different beacon nodes in the field. Combine the measurements provided by these beacon nodes. 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 th combination is . The details of the maximum likelihood method are shown in Appendix. Calculate the residual of each measurement as follows: where is the distance from the unknown node to the th beacon node, and is the coordinate of the th beacon node.

Step 3. Accumulate the residuals of each measurement as follows:

We can obtain cumulative residuals .

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.

3.3. 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 is the measured distance from a beacon node to an unknown node, is the true distance between the th beacon node and an unknown node, is the coordinate of the th beacon node, and is the true location of the unknown node. We use the LOS measurements to establish the objective function as follows: where 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 particles. The search space is a -dimensional vector. The location of the th particle in the swarm is . The velocity is . The experienced best location of a particle is , where . The experienced best location of all particles in the swarm is . The location and velocity of the particles change according to the equation as follows:

is a constriction factor and is a function of and . where and are learning factors, and where . and are two uniform random numbers in [0, 1], that is, . The velocity of the particles is limited to a maximum range . determines the search ability of particles in the search space.

The pseudocode of the PSO-C strategy is shown as follows:

1. Initialize the basic parameters of PSO-C
2. Generate an initial population and its velocities randomly
3. Calculate the fitness values of the population
4. Set S to be the for each particle
5. Set the particle with best fitness to be pg
6. For 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)
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 pg
15. Then, set Xi to be pg
16. End if
17. End for
18. End for

The is the estimated position of an unknown node.

4. 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 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 is modeled as a zero-mean white Gaussian process with variance . The NLOS error obeys the uniform distribution (). 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 , is the true location of the mobile node, and is the estimated location for the th 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 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 increases, the success rate of the proposed method decreases because, as the value of increases, the measurements will be disturbed by measurement noise more seriously.

When the NLOS error obeys the uniform distribution (), the identification success rate versus the maximum bias of NLOS error is determined as shown in Figure 3. In this simulation, the standard variance of the measurement noise in the LOS condition is 1. The results show that when the number of measurements in the NLOS condition is equal, the success rate is less affected by . 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 . is varied from 1 to 5. The results show that as the value of 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 . 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.

Figure 7 shows the impact of the parameter on the localization error. As the value of increases, the localization errors of all algorithms are increasing. However, the ML method is seriously affected by . 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.

5. 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.

Appendix

In this section, we introduce the maximum likelihood localization method. We assume that the position of the beacon node is denoted as . The position of an unknown node is . is the measurement distance for the th beacon node.

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

We can obtain the estimated position of the unknown node as follows:

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper

Acknowledgments

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