On Gradient Descent Localization in 3-D Wireless Sensor Networks

L ocalization is an essential demand in wireless sensor networks (WSNs). It relies on several types of measurements. This paper focuses on positioning in 3-D space using time-of-arrival-(TOA-) based distance measurements between the target node and a number of anchor nodes. Central localization is assumed and either RF, acoustic or UWB signals are used for distance measurements. This problem is treated by using iterative gradient descent (GD), and an iterative GD-based algorithm for localization of moving sensors in a WSN has been proposed. To localize a node in 3-D space, at least four anchors are needed. In this work, however, five anchors are used to get better accuracy. In GD localization of a moving sensor, the algorithm can get trapped in a local minimum causing the track to deviate from the true path, thereby impairing real-time localization. The proposed algorithm is based on systematically replacing anchor nodes to avoid local minima positions. The idea is to form all possible combinations of five-anchor sets from a set of available anchor nodes (larger than five), and to segment the true path. Iterating through each segment, the sets of anchors that could draw the track to a local minimum are discarded and replaced with possible others to maintain the right track.


INTRODUCTION
Wireless sensor networks are widely deployed to perform various tasks in monitoring and control applications such as traffic monitoring, environmental monitoring of air, water, soil quality or temperature, response to earthquakes and building safety, etc.The nodes are usually small radio-equipped low-power sensors scattered over an area or volume of a few tens of square or cubic meters respectively.There is information sharing between sensors and for this information to be meaningful, the nodes or sensors need to be located.Besides, in some applications, the node positions themselves are the information that has to be conveyed such as in warehousing and manufacturing logistics.Node information is either processed centrally or in a distributed manner.In centralized localization, a central processor collects measurements prior to calculation, whereas in distributed algorithms, the sensors share their information only with neighbors but possibly iteratively.Both methods face the high cost of communication, but, in general, centralized algorithms produce more accurate location information.On the other hand, distributed localization offers more scalability and robustness to link failures.
Node localization relies on measurements of distances between the nodes to be localized and a number of reference or anchor nodes.The distance measurements can be via radio frequency (RF), acoustic or ultra-wideband (UWB) signals.Measurements that indicate distance can be time of arrival (TOA), angle of arrival (AOA), or received signal strength (RSS).TOA measurements seem to be most useful especially in low-density networks, since they are not as sensitive to inter-device distances as AOA or RSS.
Accurate location information is important in almost all real-world applications of wireless sensor networks (WSNs).In particular, localization in a 3-D space is necessary as it yields more accurate results.Trilateration and mutlilateration positioning methods ,Zhang et al., 2011, can be employed in a two-dimensional (2-D) and three-dimensional (3-D) space respectively.These methods use geometric properties to estimate the target location, and suffer from poor performance, decreased accuracy and computational complexity especially in the 3-D case.Iterative optimization methods offer an attractive alternative solution to this problem.The most common iterative optimization method is the gradient descent algorithm, which has been widely dealt with in the literature for the 2-D case, Qiao and Pang, 2011 andGarg et al., 2010.This work addresses localization in a three-dimensional space of stationary and moving wireless sensor network nodes by gradient descent methods.It is assumed that a central processor collects the data from the nodes, and TOA measurements will be assumed throughout.An evaluation analysis of the performance of the localization algorithm considered is performed.In particular, the effect of varying the number of anchor nodes and the effect of measurement noise have been studied.The work also investigates tracking of moving sensors and proposes a method to counteract some associated problems such as falling into local minima.
The rest of the paper will be organized as follows: Section 2 describes the problem of gradient descent localization of sensor nodes in 3-D space and with different scenarios as regards the parameters affecting this problem such as noise types affecting TOA measurements and the number of anchor nodes.Section 3 discusses localization of a moving sensor in 3D space.Section 4 presents results and the corresponding performance evaluation.Finally, Section 5 concludes the paper.is needed.The TOA distance measurement technique is assumed.TOA is the time delay between transmission at the node to be localized and reception at an anchor node.This is equal to the distance i d divided by the speed of light if either RF or UWB signals are used.The backbone of the TOA distance measurement technique is the accuracy of the arrival time estimates.This accuracy is hampered by additive noise and non-line-of-sight (NLOS) arrivals.The measurement errors are modeled as additive zero-mean Gaussian noise.The total additive Gaussian measurement noise will be modeled as To determine the TOA in asynchronous WSNs, two-way TOA measurements are used.In this method, one sensor sends a signal to another which immediately replies.The first sensor will then determine TOA as the delay between its transmission and reception divided by two ,Patwari et al., 2005.

PROBLEM DESCRIPTION
Gradient-descent iterative optimization in three dimensions results in slower convergence when compared to the 2-D case due to tracking along an extra dimension.This is typical of all iterative optimization methods.Owing to the limited exploration of 3-D scenarios in the literature, the present work serves to shed light on practical results relating to the GD WSN localization problem in three dimensions.As with all optimization methods, the gradient descent method hinges on the concept of minimizing an objective function.For the problem of WSN localization, it is natural to define the objective function as the sum of the squared distance errors of all anchor nodes.Thus, the objective function is defined as: where is the vector of unknown position coordinates (x,y,z), i t is the receive time of the ith anchor node, o t is the transmit time of the node to be localized, c is the speed of light (=3x10 8 m/s) and N is the number of anchor nodes.The difference is the TOA that can be measured (with measurement noise) in asynchronous WSNs as explained.
The optimization purpose is to minimize the objective function to produce the optimal solution which is the position estimate of the node to be localized.This problem is solved iteratively using gradient descent as follows: where k p is the vector of the estimated position coordinates,  is the step size, and k g is the gradient of the objective function given by: To start the iteration, the initial position coordinates are required.These may be chosen to be the mean position of all anchor nodes.The number of iterations is a tradeoff between energy consumption, which is critical to WSNs, and the degree of accuracy.
A minimum of four anchor nodes is needed to estimate position in a 3-D space.The estimation accuracy increases as a function of the number of anchor nodes.If the number of anchor nodes is less than four, the estimation problem becomes under-determined (number of simultaneous equations is less than the number of unknowns) and there are an infinite number of solutions that converge iteratively to an erroneous location or position.
The objective function is the sum of the squares of the differences between estimated distances and measured distances.Therefore, distance measurement errors are squared, too.This problem is countered by weighting distance measurements according to their confidence to limit the effect of measurement errors on localization results ,Kwon et al., 2005.So the objective function accommodating different weights is expressed as: Weighting, however, results in sub-optimal solutions if only four anchor nodes are used.Since usually there are only a few anchors in a real WSN, Li et al., 2008 use of five anchor nodes is a good choice to achieve better accuracy without undue deviation from real settings.In this case, weighting according to anchor node confidence gives better results than those obtained with the minimum number of anchor nodes (four) without weighting.
It is worth mentioning that evaluating Eq.(1), i.e. the error objective function ) ( p f versus p where p=[x,y,z] T , results in a 4-D performance surface with a global minimum and several local minima.To avoid local minima, the gradient descent must run several times with different starting points, which is expensive computationally.To better visualize the local minima problem, localization in a 2-D space is envisaged to enable performance surface plotting in a 3-D space.Three anchor nodes [10 ,100 ], [100 ,90 ], and [10 ,70 ] results in Fig. 1 with azimuth= 180° and elevation= 0°.
The presence of a global minimum at p and a neighboring local minimum can be noticed from Fig. 1.The search procedure of the performance function therefore often gets trapped in a local minimum especially when the node to be localized is moving.In the following section, a solution will be presented to solve the local minima problem in a moving sensor localization setting.In this work, the algorithm listed below is presented to localize a moving sensor in a 3-D space with the provision of local minima avoidance.The foreseen success of the proposed method is based on the conception that, as the updated position begins to wander away from the global minimum in the direction of a local minimum, it is highly probable that it would return to the right track if some anchor nodes are replaced due to the consequent change of performance surface shape and hence local minima positions.

LOCALIZATION OF A MOVING SENSOR IN
Algorithm 1: Proposed GD localization of a moving sensor 1. Estimate a suitable measurement sample interval or update rate.2. Cluster available anchor nodes into sets of five nodes each.The number of resulting sets P will be: where N is the total number of anchor nodes.3. Randomly draw M sets from P obeying a uniform distribution.4. Perform M independent gradient descent localization procedures on the moving sensor using these M sets. 5. Iterate the gradient descent algorithm up to the L-th update, and calculate the final ) ( p f for each of the M sets.Discard the sets that produce ) ( p f greater than a certain threshold γ.Find the point p with the minimum ) ( p f .6. Stop the algorithm if the moving sensor tracking halts.7. Complete the M sets by randomly choosing other sets from P, and repeat steps 4 to 6 starting with the final position of p that corresponds to the minimum ) ( p f . The different parameters appearing in Algorithm 1 should be properly chosen.These are M, N, L and the threshold γ.As discussed in the problem description, N should not be unduly large in practical settings.Assuming that five anchors per set are involved in localization, N must not be much greater especially when the WSN area or volume is limited.As for M, it naturally determines the computational overhead; GD localization must run M times in each round of position estimation.To reduce the amount of computation to a minimum, the choice of M must achieve a tradeoff between computational complexity and sufficient diversity of anchor sets in order to cancel unsuitable candidates and retain functional ones.The threshold γ depends on the specific application and how tolerant the latter is to the final value of the error function ) ( p f .In the simulations (Section 4), the moderate value of 7 m 2 is used as a default setting.This means that the estimated squared distance error associated with each anchor is (7/5) m 2 on average, Eq. (1).
As for L, it has been assigned the value 150 iterations in the present simulation settings, which is, however, an ad-hoc value that worked for the particular settings under consideration.To ensure accurate tracking, a check on the error function of all running estimations can be performed after each certain interval (for example 30 iterations) and then the decision is made whether to proceed or replace the diverging sets.A final remark concerns the communication overhead; the proposed algorithm does not add to the communication complexity.With each iteration, and after the sensing has been achieved, only one broadcast (communication) of the distance measurement is enough from each of the N anchors.It is in the fusion center that the various combinations of P are sorted out and their associated computations performed.

SIMULATION RESULTS
The gradient descent localization problem in a 3-D space is simulated on MATLAB.The anchor node locations are chosen at random in a volume of 200x200x200 m 3 .It is assumed that the target node which is to be localized, whether stationary or moving, has all anchor nodes within its radio range.The LOS and NLOS measurement noise is assumed to obey a normal distribution N(µ, σ 2 ).In the subsequent simulations, a noisy TOA measurement is simulated by adding a random component to the exact value of the time measurement.The latter is readily computed for simulation purposes from knowledge of the exact node position to be localized, the anchor positions, and the speed of light c.

A. Localization of a stationary target node
First, consider three anchor nodes to localize a node of position (60,90,60) in the 3-D space assuming that the standard deviation of the zero-mean Gaussian TOA measurement noise, the convergence factor or step size and the number of iterations to be σ=0.001µsec, α=0.25 and j=100 respectively.Simulation results localized the target node as (57.62, 68.16, 52.42) which is clearly erroneous.Using four anchor nodes and the same settings, the localization of the target node improves to (60.28, 84.02, 58.65).Finally, five anchor nodes provide an almost ideal target localization of (60.16, 89.64, 60.09).Fig. 2 is a plot of the error function versus the number of iterations for this last case of five anchor nodes.Retaining this scenario, another node (70,45,60) is localized as (70.03,45.16,59.85).Obviously, any node within the convex hull of the anchor nodes will be almost exactly localized with five anchors.
The results of Fig. 2 are repeated in Fig. 3 taking into account the presence of NLOS arrivals and a greater noise standard deviation.In Fig. 3, σ=0.002µsec, and µ NLOS = 0.003 µsec.A reduction in the localization process accuracy is readily noticed: The point (60,90,60) results in a localization of (60.35, 88.97, 59.40).It is also clear from the figure that the solution is biased due to NLOS arrivals.
The number of iterations in the localization process of a stationary target is a tradeoff between the energy consumption for result refinement and the degree of accuracy achievable through refining.The issue of energy consumption may appear to disfavor the iterative GD method compared to other optimization methods.This is not the case, however, when the target is moving, since updating would then be a must whether iterative or other methods are employed.In such cases, resorting to distributed algorithms would save energy costs even for iterative methods, since the nodes in a distributed algorithm communicate mostly with neighbors (one hop) as compared to centralized algorithms which are the concern of the present work.This is especially manifested when the number of hops to the central processor exceeds the necessary number of iterations.

B. Localization of a moving target node
In the following scenarios, a moving node is tracked and localized.We assume five anchor nodes since this offers the best estimation accuracy.To better illustrate the proposed algorithm and the effect of the various inherent parameter values, it is assumed that the measured distances are noise-free.a.A target node is moving 0.5 m in each of the three x, y, and z axes in each of 200 steps, which gives a true track distance of 100 m.The true track is illustrated by the straight line in Fig. 4. The estimated track begins with an initial point of (50, 50, 50) and converges to the true track for a while but then deviates from it due the local minima associated with this problem.This deviation is shown clearly in Fig. 4. b.The same scenario is repeated except that the track is divided into two segments.The first segment uses the same previous anchor nodes.In the second segment, the anchor nodes have been changed in an attempt to avoid the local minimum and resume tracking the true path.Fig. 5 shows the corrected tracking behavior and the new set of anchor nodes.c.The proposed method of Algorithm 1 is applied with N=7 resulting in P=21, that is, seven anchor nodes are clustered in 21 sets of five anchor nodes each.M is chosen to be equal to 10 and L equal to 150.The threshold is chosen as γ= 7.At the 150 th update, the final ) ( p f is calculated for each of the 10 sets.The sets that produce an error function greater than 7 are discarded, and other sets from the remaining 11 sets are chosen to complete the 10 sets starting with the final position of p that corresponds to the minimum ) ( p f .Iterative computations are continued for another 150 updates and the optimum set is also found by inspecting the localized point that results in the minimum final ) ( p f .The true and estimated tracks are shown in Fig. 6.Simulations show that the optimum set of anchor nodes in the first segment (150 iterations) is different from that of the second segment and no local minimum deviation is noticed.
It is worth noting that in the second segment; the first-segment unsuccessful sets can be replaced in a deterministic manner rather than randomly, since one would by then have an idea of the location of the moving target.This is especially convenient for WSNs with widely scattered sensors, where sets with nodes that are distant from the moving target and that are likely to contribute to poor localization can be discarded.
Future work may consider introducing distance-measurement noise and studying its effect on the performance of the proposed algorithm.In that case, the final ) ( p f may not be enough indication of the validity of any certain set of anchors due to noisy measurements.So averaging ) ( p f of the last 10 iterations of each segment of the estimated path, and for all M running sets, may be considered to obtain a more accurate comparison and a judicious subsequent selection of sets.

CONCLUSION
The problem of sensor localization in a 3-D space by the method of gradient descent has been investigated and solutions are presented to some impediments that are associated with the moving sensor case, namely, the local minima problem.The proposed method considers all possible combinations of a certain chosen number of anchor nodes from a larger set of available anchors.The foreseen success of the proposed method stems from the fact that a deviating estimated path towards a local minimum is almost certain to return to the right track if some anchor nodes are replaced.This is true since anchor node replacement entails a change of the shape of the performance along with different local minima positions.The anchor nodes placement is made uniformly random as the true track of the moving sensor to be localized is unpredictable, and it is performed periodically.The simulation results demonstrate the success of this method.The advantage gained is at the expense of increased computational requirements, and the proposed method also necessitates faster data processing in order to perform accurate moving sensor localization in real time.

REFERENCES:
 letter N denotes the normal or Gaussian distribution,  is the mean, and 2 NLOS  is the variance taking into account NLOS arrivals.The occasional inclusion of a mean accounts for the biased location estimate resulting from NLOS errors ,Gustafsson and Gunnarsson, 2005.and ,Patwari et al., 2005.
A 3-D SPACE With a moving sensor, the gradient descent still functions acceptably to track the target in real time.The measurement sample interval determines the measurement update rate.A bit of care is required in adjusting the sample interval to avoid conflict with moving sensor velocity and motion models which may be completely unknown ,Gustafsson and Gunnarsson, 2005.The moving node must provide multiple measurements to the anchors as it moves across space.It has the opportunity to reduce environment-dependent errors as it averages over space.Many computational aspects of this problem remain to be explored, Patwari et al., 2005.Agarwal et al., treated the problem of avoiding local minima for moving sensor localization by smart use of available anchors and good initialization.Although these works are also based on minimizing cost functions, they are not general gradient descent-based, which is the focus of this paper.Besides, these works require and exploit good initial estimation of the target location.It is therefore challenging to achieve moving sensor localization, and at the same time, dispense with the initial estimation of the moving target location.As a solution to this problem, we may consider the introduction of diversity in the iterative GD estimation problem.

Figure 2 .
Figure 2. Error function versus the number of iterations when GD localization of a stationary target in 3-D space is performed using five anchor nodes.Convergence factor=0.25,standard deviation (SD) of TOA measurement noise =0.001 µsec.

Figure 3 .
Figure 3. Error function versus the number of iterations when GD localization of a stationary target in 3-D space is performed using five anchor nodes.Convergence factor=0.25,SD of TOA measurement noise =0.002 µsec and µ NLOS =0.003 µsec.

Figure 4 .Figure 5 .
Figure 4. Tracking of a moving sensor in 3-D space using iterative GD with initial point [50,50,50] and a fixed set of anchor nodes (shown by the small circles).Convergence factor=0.1.The true path is shown in red.

Figure 6 .
Figure 6.GD tracking of a moving sensor using the proposed algorithm.Initial point is [50,50,50].Convergence factor=0.1.The basic seven anchor nodes are shown as asterisks.The true path is shown in red.

Wang et al., 2010. In
Localization in 3-D space is particularly important in real applications of WSNs, but many of its aspects remain unexplored since the typical scenario for WSN localization is investigated in a 2-D plane,a 3-D space at least four anchor nodes are needed whose locations are known.An estimate of the distance i are considered with Agarwal A., Daume H. III, Phillips J. M., and Venkatasubramanian S., 2012, Sensor Network Localization for Moving Sensors, Proceedings of the 12 th International Conference on Data Mining Workshops, ICDMW 2012, IEEE, pp.202-209.Proceedings of the 16 th International Conference on Knowledge Discovery and Data Mining, ACM SIGKDD 2010, ACM, pp.1149-1158.Localization in Wireless Sensor Networks with Gradient Descent, IEEE Pacific Rim Conference on Communications, Computers and Signal Processing, IEEE, pp.91-96.Wireless Positioning: Fundamentals, Systems and State of the Art Signal Processing Techniques, Cellular Networks-Positioning, Performance Analysis, Reliability, Dr. A. Melikov (Ed.), ISBN: 978-953-307-246-3, InTech.Available from: http://www.intechopen.com/books .