Distributed Gradient Descent Localization in WSNs

16 downloads 0 Views 741KB Size Report
Aug 25, 2015 - Stationary node versus mobile node localization. 1.4. Gossip and gossip-based averaging or summing. 1.5. Outline of the remaining sections.
1

Distributed Gradient Descent Localization in WSNs: Summing-Up and MATLAB Code

Nuha A. S. Alwan Professor of Electrical Engineering Baghdad University

25 August 2015

Email: [email protected]

2

List of Contents

Preface List of Abbreviations 1. Introduction to Localization in Wireless Sensor Networks 1.1. Introduction 1.2. Positioning measurement techniques 1.3. Classification of localization methods 1.3.1. Anchor-based versus relative localization 1.3.2. Multilateration versus iterative optimization localization 1.3.3. Centralized versus distributed localization 1.3.4. Stationary node versus mobile node localization 1.4. Gossip and gossip-based averaging or summing 1.5. Outline of the remaining sections 2. Anchor-Based Localization in Wireless Sensor Networks with Gradient Descent 2.1. Problem formulation 2.2. Simulation example with MATLAB code 3. Distributed Localization in Wireless Sensor Networks with Gradient Descent 3.1. The distributed summing problem for WSN localization 3.2. The push-sum averaging or summing algorithm 3.3. Distributed GD localization in WSNs 3.4. MATLAB simulation results 3.5. MATLAB code 3.5.1. Distributed GD localization MATLAB code 3.5.2. The push-sum function MATLAB code 4. Recapitulation and Future Trends References

3

Preface

Although the topic of localization in wireless sensor networks (WSN) is well-researched, it continues to develop via new investigations, new ideas and emerging innovations. The present work aims at presenting a summing-up of the topic and an overview of research recently conducted by the author into the specific subject of distributed gradient descent localization in WSNs. The original work [1] is available at link.springer.com. Robustness against link failures is a major issue in this framework. In the present work, MATLAB code written by the author is provided throughout to encourage possible extensions of this research.

4

List of Abbreviations AOA: angle of arrival BB: Barzilai-Borwein GD: gradient descent GPS: global positioning system RF: radio frequency RSS: received signal strength TDOA: time difference of arrival TOA: time of arrival UWB: ultra-wide band WSN: wireless sensor network

5

1. Introduction to Localization in Wireless Sensor Networks

1.1 Introduction Sensors are small low-power and possibly mobile devices with capabilities of onboard processing and wireless communication. They are typically comprised of a radio-frequency circuit, a limited-power digital signal processor, a sensing unit and a battery. A large number of these sensors scattered over a spatial domain form intelligent wireless sensor networks that are used in a wide range of applications such as environmental monitoring (temperature, water, soil), smart factory instrumentation, military surveillance, wildlife monitoring, intelligent transportation, to name but a few. The sensor nodes of the WSN are deployed within an area or volume via helicopters or road vehicles, such that their location information is usually unknown. Estimation of the location of these nodes is of vital importance for meaningful measurement or sensing of data. Although global positioning systems (GPS's) achieve powerful localization, it is costly and impractical to equip each sensor in a WSN with a GPS device. Moreover, in many environments, such as indoors and forested zones, the GPS signal may be weak or even unavailable. This is why there is vast on-going research devoted to efficient localization for WSN's. WSN localization involves the determination of sensor locations using known anchor or reference nodes locations. This is a nonconvex constrained optimization problem with many local minima associated with an objective function or error function depending on distances and sensor positions. The distance measurements are obtained by measuring the time of arrival (TOA), time difference of arrival (TDOA), received signal strength (RSS) or angle of arrival (AOA) of radio-frequency (RF) signals or ultra-wide band (UWB) signals traveling between the target node to be localized and the anchor or reference nodes. In time-based techniques (TOA and TDOA), distances are determined from knowledge of time and speed of light (3x108m/s).

6

1.2 Positioning measurement techniques TOA: If synchronization exists between two nodes, the node receiving the signal determines the TOA of the incoming signal that is timestamped by the sending node. TDOA: If synchronization exists only between anchors, then the TDOA of two signals travelling between the target and two anchors can be estimated and used to determine the location of the target node. RSS: The distance between two nodes can also be obtained by measurement of the received signal strength or the energy of the received signal at one node. AOA: As for AOA, angles are measured of the target node seen by the anchors by means of antenna arrays [2]. 1.3 Classification of localization methods Localization methods can be classified according to several considerations as listed below: 1.3.1 Anchor-based versus relative localization Anchor nodes are either placed at known locations or equipped with GPS devices. The exact coordinates of a non-anchor node can be obtained through pairwise range measurements between an anchor and the non-anchor node [3], given at least three anchor nodes in the proximity of the targeted node in a 2-D space and at least four anchors in a 3-D space. On the other hand, non-anchor nodes can be localized relative to each other with the help of range measurements. The WSN is divided into clusters and local relative maps are built using range measurements of intra-cluster nodes [4]. Then the local

7

maps are combined to obtain the global relative topology of the WSN. 1.3.2 Multilateration versus iterative optimization localization Multilateration uses distance measurements to identify the position of the target as in Figure 1.1. Using three anchors A1, A2, and A3 with known locations and distances d1, d2 and d3 to the target node, the node can be located as the intersection point of three circles by solving simultaneous equations. This is a special case of multilateration called trilateration for localization in a 2-D space. In a 3-D space, the located node is the intersection of four spheres as at least four anchors are needed. The localization process of multilateration is susceptible to inaccuracy due to noisy distance measurements that reduce the intersection point in Figure 1.1 to an overlapped region. Moreover, the method is computationally complex. These are the main reasons for resorting to optimization methods.

A1‫تالبب‬ d1

A2 d2

d3

A3

Figure 1.1: Trilateration.

An objective function or error function is normally required for optimization methods. It is natural to define the error function as the sum of squared range errors of all anchors. TOA distance measurements are most common especially in low-density networks, since they are not as sensitive to inter-device distances as AOA or RSS.

8

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 optimization can be carried out iteratively using gradient descent or Kalman filtering. The Kalman filter is very capable of localization in the presence of noisy distance measurements in a WSN due to its robustness [5]. It is an iterative state estimator capable of handling large erroneous data. However, the computational and memory efficiency of the Kalman filter are of concern when compared with the gradient descent method to be discussed in Section 2.

1.3.3 Centralized versus distributed localization Centralized computing in WSNs uses a fusion center in which all computations are performed based on data received by the fusion center from the nodes. This approach has disadvantages such as uneven energy consumption, complex routing, single point failures and communication bottleneck near the fusion center. Distributed computing algorithms, on the other hand, do not require any fusion center and assume communication between the various nodes in a gossip-based fashion. The most prominent feature of distributed algorithms is the remarkable robustness against link or node failure. The most common gossip-based algorithm is that of computing sums or averages among sensor nodes in a decentralized manner. Many signal processing applications including localization in WSNs have the computation of sums or averages as the basic operation and thus lend themselves readily to distributed computing. The purely decentralized nature of such processing dictates that local sensor estimates consent to the desired solution upon exploitation of the spatial dimension to maximize performance [6]. This is why such algorithms are also called consensus algorithms. 1.3.4 Stationary node versus mobile node localization Localization algorithms for stationary nodes, whether centralized or distributed, are equally well applicable to mobile node localization which is more commonly encountered in

9

practice. However, care must be taken to ensure that the time interval between successive localization iterations, due to the mobile nature of the target node, is sufficient to perform all the necessary processing. This is crucial for real-time processing and successful moving target tracking. 1.4 Gossip and gossip-based averaging or summing Gossip algorithms have been widely dealt with by computer science researchers for information dissemination. Recently, they have proved very efficient for information processing in wireless sensor networks due to the fact that no specialized routing is necessary and for their usefulness in solving consensus problems in which a number of nodes reach a consistent opinion through local information exchanges with neighbors. The problem setup for an averaging gossip algorithm is that each node of n nodes in a network has initially a scalar measurement value, and the objective is that all nodes compute the average of n measurement values through frequent gossiping with neighbors. In standard gossip, the gossiping is pairwise and randomized [7]. This is also asynchronous gossip which is suitable for WSNs where synchronization is challenging. Geographic gossip algorithms use location information to route packets along network paths so that non-neighbor nodes can also gossip [8]. In addition, gossip-based or gossip-style algorithms have also attracted the attention of the research community. An example is the synchronous push-sum averaging or summing gossip-based algorithm [9]. The push-sum algorithm will serve as the backbone of distributed localization in this work. Many other averaging algorithms have been derived and analyzed but they are not the focus of this work. Both synchronous and asynchronous algorithms are iterative and every node holds an estimate of the average or sum. In asynchronous averaging, one or several nodes wake up and send their estimates to one or several neighbors and finally update their estimates depending on received data in the present iteration after which another iteration initiates. As for synchronous averaging, all nodes wake up at each iteration, and broadcast their estimates as well as update them before the next iteration starts. Network

11

synchronization is required which is a demanding requirement. Asynchronous averaging does not need network synchronization thereby providing a great asset for distributed computing.

1.5 Outline of the remaining sections Section 2 formulates the problem of GD localization, whereas Section 3 deals with distributed GD localization. The work in [1] is discussed highlighting issues such as convergence factor considerations, and providing MATLAB code. Section 4 provides a recapitulation and ideas for future work.

2. Anchor-Based Localization in Wireless Sensor Networks with Gradient Descent 2.1 Problem formulation In this work, we deal with localization in three-dimensional space WSN using the gradient descent algorithm. At least four anchors are needed in this case. Let d i , i  1,2,3,4 be the distance between each of the four anchor nodes and the target node ( x, y, z ) to be localized. The TOA distance measurement technique will be assumed. This is the time delay between transmission at a target node and reception at an anchor node, which is equal to the distance d i divided by the speed of light if either RF or UWB signals are used. Accuracy of TOA estimates is usually hampered by additive noise as well as non-line-of-sight (NLOS) arrivals. For simulation purposes, measurement errors are generally modeled by additive Gaussian noise N (  , 2 NLOS ) . The letter N denotes the normal or Gaussian distribution, and the inclusion of a mean models location bias due to NLOS errors [10,11]. For optimization methods such as gradient descent, an objective function or error function definition is often called for. In the localization problem under consideration, we define the objective function as the sum of the squared distance errors of all anchors. This is given in a 3-D space by:

11

N



f ( p )   ( x  xi ) 2  ( y  y i ) 2  ( z  z i ) 2 i 1



1/ 2

 di



2

where d i  c(t i  t o )

(2.1) (2.2)

p  [ x, y, z ]T

is the vector of unknown position coordinates ( x, y, z ) , t i is the receive time of the ith anchor node, t o is the transmit time of the targeted node to be localized, c is the speed of light and N is the number of anchors. The time difference (t i  t o ) is the measured TOA. With the above definitions, iterative gradient descent is expressed by: p k 1  p k   .g k

(2.3)

where pk is the vector of the estimated position coordinates,  is the step size which is also referred to as the convergence factor, and g k is the gradient of the objective function given by:  f f f  g k  f ( x, y , z )   , ,   x y z 

T

(2.4)

To start the iteration procedure, the initial position coordinates are chosen as the mean position of all anchors. The number of iterations until convergence is a tradeoff between the required accuracy and the energy consumption. The latter constitutes a critical consideration in WSNs. The GD algorithm for localization in listed as Algorithm 1 below: Algorithm 1: Gradient descent localization in WSNs [12,1] Input: N and α . 1. Initialization: k = 0 and po [ xo yo zo ]T 2. repeat 3. Bk ,i  ( xk  xi ) 2  ( y k  yi ) 2  ( z k  z i ) 2 2 1

4. f ( p k )   B k ,i  d i 2 N

i 1

5.

f x

  2Bk ,i  d i .Bk ,i ( x k  xi ) N

k

i 1

1

12

6. 7.

f y

f z

  2Bk ,i  d i .Bk ,i ( y k  yi ) N

k

1

i 1

  2Bk ,i  d i .Bk ,i ( z k  z i ) N

k

1

i 1

 f 8. g k    x

k

f y

k

f z

  k 

T

9. pk 1  pk   .g k 10. k=k+1 11. until k= a specified number of iterations. Output: a plot of f ( p k ) vs. k --------------------------------------------------------------------------------

2.2. Simulation example with MATLAB code 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 m3. It is assumed that the target node which is to be localized 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. Localization of a stationary target node First, we 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). Figure 2.1 is a plot of the error function versus the number of iterations for this last case of five anchor nodes.

13

The results of Figure 2.1 are repeated in Figure 2.2 taking into account the presence of NLOS arrivals and a greater noise standard deviation. In Figure 3, σ=0.002 µsec, and µNLOS= 0.003 µsec. We notice reduced localization process accuracy. The localized point is (60.35, 88.97, 59.40). It is also clear from the figure that the solution is biased due to NLOS arrivals.

Figure 2.1. 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.001 µsec.

Figure 2.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, SD of TOA measurement noise =0.002 µsec and µ NLOS=0.003 µsec.

14

MATLAB code for Figure 2.1

clear; cc=3.0000e+8; alpha=0.25; xa=[10 100 10 100 90]; ya=[100 90 70 80 90]; za=[10 10 100 100 150]; p(1,1)=50; p(2,1)=50; p(3,1)=50; i_p=[60 90 60]; for i=1:5 t(i)=(sqrt((i_p(1)-xa(i))^2 +(i_p(2)-ya(i))^2 + (i_p(3)-za(i))^2))/cc; t(i)=t(i)*10^6; end for j=1:100; for i=1:5; nv(i)=0.001*randn(1); end; tt=t+nv; sumdx=0; sumdy=0; sumdz=0; sum=0; for i=1:5; a=p(1,j)-xa(i); b=p(2,j)-ya(i); c=p(3,j)-za(i); d=tt(i)*0.000001; e=a^2+b^2+c^2; f(i)=(e^0.5-cc*d)^2; sum=sum+f(i); fdx(i)=(e^0.5-cc*d)*(e^(-0.5))*2*a; sumdx=sumdx+fdx(i); fdy(i)=(e^0.5-cc*d)*(e^(-0.5))*2*b; sumdy=sumdy+fdy(i); fdz(i)=(e^0.5-cc*d)*(e^(-0.5))*2*c; sumdz=sumdz+fdz(i); end; err(j)=sum; s=[sumdx sumdy sumdz]; p(:,j+1)=p(:,j)-alpha*s'; end; x=1:100; plot(x,err) p(:,100)

15

3. Distributed Localization in Wireless Sensor Networks with Gradient Descent 3.1. The distributed summing problem for WSN localization In [1], the authors propose a distributed GD computation method to achieve robustness against node and link failures. So-called gossipbased distributed algorithms are used to compute sums that are inherent in the GD localization problem. The method is summarized below. To produce a distributed version of the GD localization algorithm to achieve robustness against node and link failures, we notice there are four N-term sums that have to be computed in the algorithm. In each sum, each of the N terms has all its variables resident in one of the N anchor nodes provided that each anchor knows the current tracked or estimated position, and of course the corresponding distance measurement together with its own location. This means that it is possible to compute each of the four sums in a distributed manner by sharing information between the anchor nodes since the problem of distributed summing or averaging is well-established in the literature. Once the distributed computing task is accomplished, each anchor will possess an estimated value of all four sums, and therefore, line 9 in Algorithm 1 can be computed in each anchor. In each iteration step, the latter instruction finds the estimated position of the sensor to be localized. The averaging problem is a useful building block for solving more complex problems in signal processing such as the one at hand. Gossip algorithms [9] are a class of randomized algorithms that solves the averaging problem by computing a sequence of pairwise averages. In each round, one node is chosen randomly, and it chooses one of its neighbors randomly. The result of this one-hop "blind" routing is very high energy consumption and very slow information diffusion throughout the network. More efficient methods were developed by leveraging the fact that sensor nodes typically know their locations and can exploit this knowledge to perform geographic routing [8]. The idea is that instead of exchanging information with one-hop neighbors, geographic routing can be used to gossip with random nodes that are far away in the network. The resulting rapid information diffusion

16

more than compensates for the extra cost of the multi-hop routing procedure [8]. In our case, the communicating nodes are the anchor nodes, and we assume they are within transmission distance of each other. Therefore, a simple gossip-based synchronous averaging protocol described in [9,13] is suitable for our application. It is called the push-sum (PS) distributed gossip algorithm and is listed below. 3.2. The push-sum averaging or summing algorithm The PS algorithm is iterative and not exact. Thus, every anchor node will obtain an estimate of the sum that might differ from what other anchors obtain. It is assumed that each anchor can communicate with any other, possibly far-away, anchor in the network. Nodes are assumed to work synchronously. Throughout this paper, the term "iteration" is used to indicate the time step of the GD algorithm, whereas "round" or "PS round" is used to indicate the time step of the PS algorithm. So at every round t, each node i is given a weight ω(i), initialized to ω(i)=1/N where N is the total number of anchors, and a sum s(i),initialized to s(i)=x(i) where x(i) is one of the elements to be summed that is resident in node i. At round t=0, each node i sends the pair [s(i), ω(i)] to itself, and in each subsequent round t=1,…,T, each node i follows the protocol of Algorithm 2 given below: (Note that T is the total number of rounds). Algorithm 2: The push-sum algorithm {Pushsum( )} [9,13] Input: N and T 1. 2. 3. 4.

Initialization: t = 0, s(i)  x(i) and  (i)  1 / N for i  1, ... , N . repeat Let {sˆ(r ) , ˆ r }be the set of all pairs sent to node i at time round t-1. Set s(i)  r sˆ(r ) and  (i )  r ˆ (r ) .

5. 6. 7. 8. 9.

Choose a target node f (i) uniformly at random. Send the pair [0.5 s(i), 0.5 ω(i)] to target nodes f (i) and (yourself). [s(i) / ω(i)] is the estimate of the sum at round t and node i. t=t+1 until t = T.

Output: At node i and round t :

17

[s(i) / ω(i)] is the sum, and, at all rounds t : N

  (i) 1 and i 1

N

 s(i)  the sum . i 1

The execution of the PS algorithm in which the sum

 x(i) i

is

computed and made resident in each node, is denoted by Pushsum( ). This notation is used later in Algorithm 3. It is shown in [9] that the number of steps T needed such that the relative error in Algorithm 2 is less than ε with probability at least (1δ) is of order: T ( , N ,  )  O(log2 N  log 2

1



 log 2

1



(3.1)

)

T is also referred to as the diffusion speed of the uniform gossip algorithm. 3.3. Distributed GD localization in WSNs The scalar push-sum approach of Algorithm 2 can be extended to a vector push-sum where nodes exchange messages containing vectors which are summed up element-wise [14]. This concept is readily applicable to our method since we need to compute four sums in each iteration as may be deduced upon inspecting Algorithm 1. At the k-th iteration and in the i-th anchor node, there reside f ( p k ) i , f x

, k ,i

f y

and k ,i

f z

which can be considered the four elements of the k ,i

vector Fk ,i . Our method is then summarized by Algorithm 3 below:

Algorithm 3: Distributed GD localization using vector PS [1] 1. Input: N, α and T 2. Initialization: k = 0 and po [ xo yo zo ]T . 3. repeat 4. Bk ,i  ( xk  xi ) 2  ( y k  yi ) 2  ( z k  z i ) 2 2 1

18

5. f ( p k ) i  Bk ,i  d i 2 6. 7. 8.

f x

f y f z

 2Bk ,i  d i .Bk ,i ( x k  xi ) 1

k ,i

 2Bk ,i  d i .Bk ,i ( y k  y i ) 1

k ,i

 2Bk ,i  d i .Bk ,i ( z k  z i ) 1

k ,i T

 f f f  9. Fk ,i   f ( p k ) i  x k ,i y k ,i z k ,i   10. Pushsum( Fk ,i ) for i=1 to N to obtain at each anchor:

 f 11. g k    x

k

f y

T

k

f   and z k 

p k 1  p k   .g k

12. k = k + 1 13. until k = a specified number of iterations Output: A plot f ( p k ) vs. k for any i.

The core idea of Algorithm 3 above is that, for each outer gradient iteration, a series of inner rounds reach consensus on each of the four N- term sums. 3.4. MATLAB simulation results In [1], the gradient descent localization problem in a 3-D space was simulated in MATLAB. Four anchor node locations are chosen at random in a volume of 100x100x100 m3. We assume that the target node which is to be localized has all anchor nodes within its radio range. Simulation results are presented in this section for both centralized and proposed distributed cases. Figure 3.1 shows the four anchor nodes and the node to be localized in a 3D space. The targeted node is (60,90,60). First, error-free TOA measurements are assumed. Applying Algorithm 1 (centralized) with N=4, α=0.25 and p o =(50,50,50), we find after 100 iterations that the error function is 0.748 and the localized point is (60.1,84.1,58.8) which is very close to the targeted node. Before introducing the results of our distributed method, we first elaborate on the implications of Equation 3.1. Treating the order in

19

Equation 3.1 as an exact value, we set the number of rounds of the PS algorithm (Algorithm 2), T, for a number of nodes N, equal to T  log 2 (

N



)

(3.2)

Note that   2 12 is obtained when we set     2 6  0.0157 . This corresponds to a maximum number of T=14 PS rounds according to Equation 3.2 when N=4. This means that expecting a relative error   0.0157with probability higher than 0.9843 in the push-sum algorithm is almost equivalent to non-distributed GD localization. This stems from the fact that the final accuracy in the estimated localization corresponds to the accuracy level ε set in the push-sum algorithm [13]. The results in [1] verify this argument. The merit of distributed algorithms is that they are robust against network failures which are typically link failures. These are due to many reasons such as channel congestions, message collisions, moving nodes or dynamic topology [15]. Link failures can be modeled by the absence of a bidirectional connection between two nodes. Synchronicity between nodes has to be guaranteed. At each time step, some percentage of the links between anchor nodes is randomly removed. The missing links differ every time step, but their number remains fixed for each run of the code. Moreover, ensemble averaging over 100 trials is performed in each run. Figure 3.2 clarifies the robustness of the proposed distributed scheme. Even if we lose in every time step a large percentage of the links (up to 50%), our algorithm still achieves some accuracy as demonstrated by the curves of error function versus number of iterations for several percentages of link failures in Figures 3.2-a and 3.2-b. For N=4, the number of links is 6, so 50% of the links amounts to three missing links. After ensemble averaging, the localized point is then (59.8,82.8,58.4) and the error function is 0.9 when α=0.25 [1]. When compared to the centralized GD localization, we find that one link failure (25% of available links) causes one node to be isolated from the fusion center, so we end up with three anchors only, though randomly chosen in every time step. After ensemble averaging, the localized point is (60.1,82.4,58.6) and the error function is 1.0 when α=0.25 also. This accuracy is almost the same as (even slightly less than) that of the distributed scenario with four anchor nodes and three link failures (50% of available links), a fact which clearly shows the

21

advantage of our proposed distributed method over its centralized counterpart. The only seeming disadvantage of the proposed distributed algorithm is that in each iteration step, we must tolerate a delay of 14 PS rounds (T). In Figure 3.3, the simulations are repeated for the case of noisy TOA measurements. The Gaussian noise is zero-mean assuming LOS arrivals only, and the standard deviation is chosen to be 0.5 ns. This corresponds to a distance error of 15 cm assuming UWB signals are used for sensing. The resulting curves, though noisier, can obviously be interpreted in the same way as the noise-free cases. That is, the proposed distributed algorithm with three link failures (50% of links) performs better than the centralized algorithm with one link failure (25% of links) [1]. Step size considerations: The step size should be chosen carefully; too large a step size would impair the performance advantage of the proposed algorithm, whereas a small step size would increase the error function. It is worth mentioning that there are instances in the literature on GD localization algorithms where only the optimal step size is computed in a distributed manner [16,17] rather than the GD sums in the present work. The optimization of the step size in [16,17] in each iteration depends on the node positions and gradients. The optimization method is called the Barzilai-Borwein or simply BB method [18]. In this method the step size is updated at each iteration using the estimated target position and gradient vectors of the current and past time iterations. The BB method cannot be applied successfully to our distributed GD localization under consideration [1] upon updating α at each iteration and in each anchor. Applying the BB method yields favorable results that are superior to those with fixed step size only in the cases of centralized localization, and distributed localization in the absence of link failures which is an ideal situation not found in practice. The reason is obvious since, in our work, the gradient components are found through gossiping among anchors and become, therefore, greatly affected in case of link failures causing the BB method to

21

result in pronounced sub-optimality in the computation of α at each iteration and in each anchor.

100 80 60 40 20 0 100 100

90

80 60

80

40 70

20 0

Figure 3.1: 3-D WSN under consideration showing the four anchor nodes (asterisks) and target node (small circle) to be localized [1].

600 centrallized:1 link failure distributed: 3 link failures distributed: 2 link failures distributed: 1 link failure distributed and centralized: no link failures

500

error function

400

300

200

100

0

0

10

20

30

40 50 60 number of iterations

70

80

90

100

Figure 3.2-a: Error function vs. number of iterations for different cases of centralized and proposed distributed GD localization in WSN [1].

22

centralized:1 link failure distributed:3 link failures distributed:2 link failures distributed:1 link failure distributed and centralized: no link failures

2

1.8

error function

1.6

1.4

1.2

1

0.8

50

55

60

65 70 75 80 number of iterations

85

90

95

100

Figure 3.2-b: A zoom-in of Figure 3.2-a with magnified y-axis scale to demonstrate the comparative performance of the different centralized and proposed distributed localization schemes. α = 0.25 [1].

1.9

centralized: 1 link failure distributed: 3 link failures distributed: 1 link failure distributed and centralized: no link failures

1.8 1.7

error function

1.6 1.5 1.4 1.3 1.2 1.1 1 0.9 65

70

75

80 85 number of iterations

90

95

100

Figure 3.3: Comparative performance of the different centralized and proposed distributed localization schemes. α = 0.25. TOA measurement noise standard deviation is σ = 0.5 ns [1].

23

3.5. MATLAB code The MATLAB programs for Figures 3.2-a and 3.2-b are listed below.

3.5.1. Distributed GD localization MATLAB code

%Distributed GD localization: calls pushsumcc. clear; vv=100; su=[0 0 0]'; for i=1:vv; b2(i)=0; end; yy=0; for v=1:vv; cc=30000*10000; alpha=0.25; xa=[10 100 10 100]; ya=[100 90 70 80]; za=[10 10 100 100]; for k=1:4; p(1,1,k)=50; p(2,1,k)=50; p(3,1,k)=50; end; i_p=[60 90 60]; for i=1:4 t(i)=(sqrt((i_p(1)-xa(i))^2 +(i_p(2)-ya(i))^2 + (i_p(3)-za(i))^2))/cc; end for j=1:100; for i=1:4; %nv(i)=0.001*randn(1); nv(i)=0; end; tt=t+nv; for i=1:4; a=p(1,j,i)-xa(i); b=p(2,j,i)-ya(i); c=p(3,j,i)-za(i); d=tt(i); e=a^2+b^2+c^2; f(i)=(e^0.5-cc*d)^2; fdx(i)=(e^0.5-cc*d)*(e^(-0.5))*2*a; fdy(i)=(e^0.5-cc*d)*(e^(-0.5))*2*b; fdz(i)=(e^0.5-cc*d)*(e^(-0.5))*2*c; end; [err(:,j)]=pushsumcc(f); [g(:,1)]=pushsumcc(fdx); [g(:,2)]=pushsumcc(fdy); [g(:,3)]=pushsumcc(fdz);

24

for k=1:4; gg=[]; for i=1:3; gg=[gg g(k,i)]; end; ggg(k,:)=gg; end; for i=1:4; p(:,j+1,i)=p(:,j,i)-alpha*ggg(i,:)'; end; end; x=1:100; b2=b2+err(1,:); uu=p(:,100,1); su=su+uu; yy=yy+err(1,100); end; su=su/vv yy=yy/100 b2=b2/vv; plot(x,b2,'*k') hold on;

3.5.2. The push-sum function MATLAB code function[st]=pushsumcc(s) T=14; w=[0.25 0.25 0.25 0.25]; for i=1:4; for j=1:4; ss(i,j)=0; ww(i,j)=0; end; end; for i=1:4; ss(i,i)=s(i); ww(i,i)=w(i); end; for t=1:T; for n=1:4; s(n)=sum(ss(n,:)); w(n)=sum(ww(n,:)); st(n,t)=s(n)/w(n); end; for i=1:4; for j=1:4; ss(i,j)=0; ww(i,j)=0; end; end; % rr represents the number of link failures rr=3; V=[1 2 3 4]; M(:,:)=nchoosek(V,2); pp=[]; mm=1; if rr==0 pp=[]; else for k=1:100; num=ceil(6*rand); l=0;

25 for j=1:mm-1; if pp(j)==num; l=l+1; end; end; if l==0; pp(mm)=num; mm=mm+1; end; if length(pp)==rr; break; end; end; end; for n=1:4; kk=ceil(3*rand(1)); if kk=n; k=kk+1; end; ss(n,n)=0.5*s(n); ww(n,n)=0.5*w(n); ss(k,n)=0.5*s(n); ww(k,n)=0.5*w(n); for ii=1:rr; r=pp(ii); m=M(r,1); mm=M(r,2); if ((k==m & n==mm)|(k==mm & n==m)); ss(k,n)=0; ww(k,n)=0; end; end; end; end; st=st(:,T);

Note: For each different curve of Figures 3.2, the number of link failures must be altered in the function code, and the main code re-run.

4. Recapitulation and Future Trends In [1], the GD localization algorithm in WSNs in a 3D space was combined with PS gossip-based algorithms to implement a distributed GD localization algorithm. The main idea is to compute the necessary sums by inter-anchor gossip. The method compared favorably with centralized version regarding convergence, accuracy and robustness against link failures. It was shown how the loss of one link in centralized processing with four anchors introduced a localization error equivalent to that introduced by our distributed method when the 4-anchor WSN tolerated failure of up to 50% of the links (three links). In the absence of link failures, the error in the proposed distributed method is slightly greater than (almost equal to) that introduced in

26

centralized processing. This is achieved when the number of PS rounds is suitably selected. Noisy TOA measurements somewhat degrade the performance of the proposed distributed algorithm, but, in general, retains its advantages with proper selection of step size and number of rounds of the GD and PS algorithms respectively. This robustness against link failures in the presence of noisy TOA measurements, together with the possibility of dispensing with a central processor that requires high computational power and the avoidance of a communication bottleneck at and near the central processor [19], more than justify the use of distributed techniques such as the proposed distributed GD localization method [1]. MATLAB code is provided throughout to encourage possible extensions of this work. Future trends may include: - The use of variable step size methods in GD updating other than the BB method. This may prove promising as there are several other variable step size methods in the literature that do not involve gradient computations. - Experiments on weighting the effect of certain (distant) anchors in both centralized and distributed scenarios.

References:

[1] N. A. S. Alwan, A. S. Mahmood, "Distributed Gradient Descent Localization in Wireless Sensor Networks", Arab J Sci Eng, vol. 40, issue 3, March 2015, pp. 893-899. Available at link.springer.com. [2] S. Gezici, Z. Tian, G. B. Giannakis, H. Kobayashi, A. F. Molisch, H. Vincent Poor, and Z. Sahinoglu, "Localization via ultrawideband radios", IEEE Signal Processing Magazine, July, 2005, pp. 70-84. [3] J. Wang, R. K. Ghosh, S. K. Das, "A survey on sensor localization", J Control Theory Appl, vol. 8, no. 1, 2010, pp. 2-11. [4] A. Youssef, A. Agrawala, M. Younis, "Accurate anchor-free node localization in wireless sensor networks", In: Performance, Computing and Communications Conference, IPCCC 2005, 24th IEEE International, pp. 465-470, 2005.

27

[5] A. Shareef, Y. Zhu, "Localization using extended Kalman filters in wireless sensor networks", (2009):297. [6] G. Mateos, I. D. Schizas, G. B. Giannakis, "Consensus Based Distributed Least-Mean Square Algorithm Using Wireless Ad Hoc Networks", 45th Annual Allerton conference , Illinois, USA, September 26-28, 2007, pp. 568-574. [7] A. G. Dimakis, S. Kar, J. M. F. Moura, M. G. Rabbat, A. Scaglione, "Gossip Algorithms for Distributed Signal Processing", Proceedings of the IEEE, vol. 98, no. 11, pp. 1847-1864, 2010. [8] A. D. G. Dimakis, A. D. Sarwate, and M. J. Wainwright, "Geographic Gossip: Efficient Averaging for Sensor Networks", IEEE Transactions on Signal Processing, vol. 56, no. 3, March, 2008, pp. 1205-1216. [9] D. Kempe, A. Dobra and J. Gehrki, "Gossip-Based Computation of Aggregate Information", 44th Annual IEEE Symposium on Foundations of Computer Science, October 2003, pp. 482-491. [10] F. Gustafsson and F. Gunnarsson, "Mobile Positioning Using Wireless Networks", IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 41-53, 2005. [11] N. Patwari, J. N. Ash, S Kyperountas, A. O. Hero III, R. L. Moses and N. S. Correal, "Locating the Nodes", IEEE Signal Processing Magazine, vol. 22, no. 4, July 2005, pp. 54-69. [12] D. Qiao and G. K. H. Pang, "Localization in Wireless Sensor Networks with Gradient Descent", IEEE Pacific Rim Conference on Communications, Computers and Signal Processing, pp. 91-96, IEEE, 2011. [13] C. Dumard and E. Riegler, "Distributed Sphere Decoding", International Conference on Telecommunications, IEEE, 2009, pp. 172-177. [14] H. Strakova and W. N. Gansterer, "A Distributed Eigensolver for Loosely Coupled Networks", 21st Euromicro International Conference on Parallel, Distributed and NetworkBased Processing, IEEE, 2013, pp. 51-57. [15] O. Sluciak, H. Strakova, M. Rupp and W. N. Gansterer, "Distributed Gram-Schmidt Orthogonalization Based on Dynamic Consensus", Forty-Sixth Asilomar Conference on Signals, Systems and Computers, IEEE, 2012, pp. 1207-1211. [16] G. C. Calafiore, L. Carlone, and M. Wei, "A Distributed Technique for Localization of Agent Formations from Relative Range Measurements", IEEE Transactions on Systems, Man, and

28

Cybernetics – Part A: Systems and Humans, vol. 42, no. 5, September 2012, pp. 1065-1076. [17] G. C. Caliafiore, L. Carlone, and M. Wei, "A Distributed Gradient Method for Localization of Formations using Relative Range Measurements", Proceedings of the 2010 IEEE International Symposium on Computer-Aided Control System Design (CACSD'10), pp. 1146-1151. [18] J. Barzilai and J.M. Borwein, Two point step size gradient methods, IMA J. Numer. Anal., 8 (1988), 141-148. [19] N. Patwari, J. N. Ash, S. Kyperoutas, A. O. Hero III, R. L. Moses and N. S. Correal, "Locating the Nodes", IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 54-69, 2005.

Suggest Documents