# Geometric Buildup Algorithms for Sensor Network Localization

Authors: Zhenzhen Zheng; Xinlong Luo; Zhijun Wu
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

We present a geometric buildup algorithm for solving the sensor network localization problem with either accurate or noisy distance data. The algorithm determines the locations of the sensors, one at a time, by using the distances between the determined sensors and the undetermined ones. Each time, only a small system of distance equations needs to be solved and therefore, in an ideal case when the required distances are available for every sensor to be determined, the computation can be completed inn steps if n sensors are to be determined. An algorithm with two buildup phases is also
implemented to handle not only noisy but also sparse distance data with for example only a few distant anchors. We show our test results and compare them with other approaches.


---

## Body

## 1. Introduction

Ad hoc wireless sensor networks consist of a large number of spatially distributed sensor nodes that communicate with their nearby sensors within a radio range [1, 2]. The sensor data are relevant only if the sensors’ locations are known. The expensive GPS (Global Positioning System) may locate only some of the sensors (called anchors). Most sensors can be located by means of some distance information obtained from the radio signals that the sensors receive [1]. The problem of finding the locations of the sensors given a few anchors and some local distance information among the sensors is called the sensor network localization problem.Sensor network localization has been applied to many application fields, including environmental studies such as monitoring environmental conditions [3, 4], health cares such as patient tracking [5], and military applications such, as battlefield surveillance [6]. For example, [2, 7] mention that Southern California Edisons Nuclear Generating Station in San Onofre, Calif, USA has deployed wireless mesh-networked sensors from Dust Networks Inc. to obtain real-time trend data. These data are used to predict which motors are about to fail, so they could be preemptively rebuilt or replaced during scheduled maintenance periods. Implementation of a sensor localization algorithm could provide a service that eliminates the need to record every sensor’s location and its associated ID number in the network [2].Mathematically, the sensor network localization problem can be described as follows. Assume that there arem anchors whose locations denoted by ak∈ℛ2,k=1,…,m, are known and n-m sensors whose locations denoted by xj∈ℛ2,j=m+1,…,n need to be decided. For a pair of sensors xi and xj, let their Euclidean distance be denoted by di,j. Similarly, let di,k denote the Euclidean distance between an anchor ak and a sensor xi. Let Nx and Na be two sets of node pairs,(1.1)Nx={(i,j):‖xi-xj‖=di,j<rd⁡},Na={(i,k):‖xi-ak‖=di,k<rd⁡},
where ∥·∥ represents the Euclidean norm and rd is a fixed parameter called radio range. The sensor network localization problem can be formulated as a 2D distance geometry problem, to find the vectors xi∈ℛ2 for all i=m+1,…,n such that(1.2)‖xi-xj‖2=di,j2∀(i,j)∈Nx,‖xi-ak‖2=di,k2∀(i,k)∈Na.
In practice, the distance information is available only if the distance of two nodes is within a certain radio range. Therefore, the available distances are usually sparse, that is, only a small subset of all distances among the nodes is available. The distance data contains errors as well due to the accuracy of the measurements, the power of the sensors, and some other environmental factors. A distance geometry problem with sparse and inexact distances has been proved to be difficult to solve in general [8–10].More specifically, if exact distances for all pairs of nodes are available, a distance geometry problem can be solved in polynomial time by using for example a singular value decomposition algorithm inO(n2) [9] or a geometric buildup algorithm in O(n) [11], where n is the number of nodes to be determined and O(·) is the conventional expression for time complexity. If only a sparse set of distances is given, the problem is NP-hard in general [8], even if small distance errors are allowed [10].Much work has been done on the sensor network localization problem. Biswas et al. [1, 12] proposed an SDP (semidefinite programming) approach to the problem. Wang et al. [13] made further SDP relaxations and developed NSDP (node-based SDP) and ESDP (edge-based SDP) algorithms for large-scale applications. Nie [14] presented an SOS (sum of squares) approach by formulating the problem as a minimization problem for a sum of squares. Tseng [15] developed an SOCP (second-order cone programming) relaxation method. Recent works also include Carter et al. [2], the SFSDP (sparse variant of FSDP [1]) approach by Kim et al. [16], Zhu et al. [17], the LPCGD (log-barrier penalty coordinate gradient descent) approach by Pong and Tseng [18], and the SNLSDPclique approach by Krislock and Wolkowicz [19, 20].We investigate the solution of the sensor network localization problem within a geometric buildup framework. A basic geometric buildup algorithm [11] was proposed for the solution of a 3D distance geometry problem with exact distances. The work was later extended to problems with sparse distances [21–23], inexact distances [24], and distance bounds [25]. All these works were applied to protein structure determination problems, which are to determine a set of points given a set of distances between the points. The idea of geometric buildup is to determine the points, one at a time, using the distances between the determined points and the undetermined ones. The algorithm can be applied to distance geometry problems in any finite dimensional Euclidean space including the sensor network localization in 2D.In every buildup step, for determining a point, a small system of distance equations needs to be solved. However, the point may be overdetermined for there may be more equations than the coordinates for the point. On the other hand, the distances may have errors and the equations are most likely to be inconsistent. To overcome this difficulty, a least-squares approximation method has been developed for solving the distance equations [24]. The method employs a low-rank matrix approximation scheme [26], which requires the singular value decomposition for a small distance matrix. Here, our algorithm is different from [24] in the approximation scheme. We implement a low-rank positive semidefinite approximation scheme [27], which requires a spectral decomposition and guarantees a best-possible approximation to the solution of the distance equations in a least-squares sense.The availability of an initial set of determined points can be important for a geometric buildup algorithm to start and succeed. Fortunately, for sensor network localization, there is usually a set of anchor nodes that can be used as an initial set of nodes. However, if there are only a few anchors scattered widely in space, the chance is that there may not be many sensors with (at least three) distances to these anchors and the algorithm may be able to determine only a small set of sensors. For this reason, we have also implemented a two-phase buildup algorithm. In the first phase, we determine as many sensors as possible starting with the initial anchors. In the second phase, from the undermined sensors, if there are any, we find a clique of sensors, that is, a subset of sensors with all distances among them available. We position the sensors in the clique in space (which is possible using their distances) and start from them to determine the remaining sensors. In this way, we can have more sensors determined than a single phase algorithm.This paper is organized as follows. In Section2, we present several possible versions of geometric buildup algorithms for sensor network localization. In Section 3, we present the numerical results for a set of simulated sensor network localization problems with exact and inexact sparse distances. We conclude the paper and make some remarks in Section 4.


## 2. The Geometric Buildup Algorithms

In this section, we present three versions of geometric buildup algorithms for sensor network localization. Three cases of problems are concerned (1) when exact distances are available, (2) when distances have errors, and (3) when there are only a few distant anchors. A geometric buildup algorithm, named as basic, extended, and two-phase geometric buildup algorithms, respectively, is described for each of the three cases.


### 2.1. The Basic Geometric Buildup Algorithm

When a set of exact distances is given, that is, the distances in (1.1) is accurate, a basic geometric buildup algorithm can be applied. The algorithm works as follows. It first takes the anchors as the initial set of determined sensors. Then, for any undetermined sensor j, it tries to find three determined sensors that are not collinear but have distances to sensor j. We call these three determined sensors a basis set of sensors for sensor j. Let xi=(xi,1,xi,2)T(i=1,2,3) be the coordinate vectors of the three determined sensors. Given the distances di,j(i=1,2,3), the coordinate vector xj=(xj,1,xj,2)T of sensor j can be determined by using the following system of equations:(2.1)‖xi‖2-2xiTxj+‖xj‖2=di,j2,i=1,2,3.
Subtracting equation i from equation i+1(i=1,2) results in a linear system of equations(2.2)Axj=b,
where(2.3)A=-2[(x2-x1)T(x3-x2)T],b=[(d2,j2-d1,j2)-(‖x2‖2-‖x1‖2)(d3,j2-d2,j2)-(‖x3‖2-‖x2‖2)].The pointsx1,x2,x3 are not collinear, so the coefficient matrix A is nonsingular and the linear system (2.2) has a unique solution. An outline of the basic geometric buildup algorithm is given in Algorithm 1. Note that if there are at least three anchors in the network and the distances are exact, and if in every step, an undetermined sensor and a basis set of determined sensors associated with it can be found, then the basic geometric buildup algorithm can solve the problem in O(n) computation time, where n is the total number of sensors to be determined.Algorithm 1:The basic geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1: Let the anchors be the initial set of determined sensors.Step 2:Repeat:For each undetermined sensor j:If a basis set of determined sensors is found for sensor j,determine sensorj by solving the linear system (2.2).EndEndIf no sensor can be determined in the loop, stop.If all sensors are determined, stop.


### 2.2. The Extended Geometric Buildup Algorithm

Note that for every undetermined sensor, there may be more than three determined sensors that have distances to it. Therefore, there may be more than three distance equations in (2.1) for the sensor to satisfy. Of course, if the distances are accurate, or in other words, are exact, only three equations need to be solved as done in the basic algorithm, while all other equations are satisfied automatically. However, in practice, the distances may have errors and therefore, the distance equations may not be consistent, and satisfying three of them does not necessarily satisfy all the equations. Besides, (2.1) cannot be reduced to (2.2) any more because there may not be a solution to the equations in (2.1) or, in other words, the equations may never hold and hence cannot add or subtract. The extended geometric buildup algorithm is developed to overcome these difficulties.An extended geometric buildup algorithm works as follows. It again takes the anchors as the initial set of determined sensor. Then, for each undetermined sensor, it finds all the determined sensors that have distances to the undetermined sensor. If there are at least three such determined sensors and if they are not collinear, then the algorithm tries to find the coordinates for the undetermined sensor by solving a system of distance equations corresponding to all these determined sensors. In particular, since the equations may not be consistent, they are solved approximately in a least-squares sense as described in the following.Letxℓ+1=(xℓ+1,1,xℓ+1,2)T be the coordinate vector of the sensor to be determined. Let xi=(xi,1,xi,2)T(i=1,…,ℓ) be the coordinate vectors of the determined sensors to be used for the determination of xℓ+1. Let di,ℓ+1 be the distances from xi to xℓ+1,i=1,…,ℓ. Then the distance equations to be solved are(2.4)‖xi‖2-2xiTxl+1+‖xl+1‖2=di,l+12,i=1,…,l.
The equations can be solved by using for example a standard nonlinear least-squares method, but we implement a method similar to that proposed in [24] and obtain a more direct solution to the equations. Instead of working on the system in (2.4), we expand it to the following system:(2.5)‖xi‖2-2xiTxj+‖xj‖2=di,j2,i,j=1,…,l+1.
Note that di,j,i,j=1,…,ℓ in the added equations may or may not be available in the given distance data, but they can be computed if some of them are not because xi,i=1,…,ℓ are already known. We then consider all xi,i=1,…,ℓ+1 as unknowns and determine them all by solving the system of equations in (2.5). Since the relative positions of these sensors are invariant under any translation and orthogonal transformation, we can set a reference system so that the sensor to be determined is located at the origin or, in other words, xℓ+1=(0,0)T. It follows that ∥xi∥=di,ℓ+1,∥xj∥=dj,ℓ+1 and(2.6)di,l+12-2xiTxj+dj,l+12=di,j2,i,j=1,…,l.
Define a coordinate matrix X and an induced distance matrix D as follows:(2.7)X={xi,k:i=1,…,l,k=1,2},D={(di,l+12-di,j2+dj,l+12)2:i,j=1,…,l}.
It is easy to verify that XXT=D, which has been widely studied in the classical multidimensional scaling or “MDS” [27–29]. If the distances have errors, the system XXT=D may not be consistent. It is natural to consider a least-squares problem(2.8)min⁡X∈Rl×2‖D-XXT‖F,
where ∥·∥F is the matrix Frobenius norm. [24] applied the best rank r matrix approximation coming from the classical Eckart-Young Theorem [26], which involves the singular value decomposition. Here, we apply a best positive semidefinite approximation which involves the spectral decomposition. The solution to the problem in (2.8) can be obtained from the following theorem.Theorem 2.1 (see [19, 27]).
LetM=Σi=1nλiuiuiT be the spectral decomposition of the symmetric matrix M, where λ1≥⋯≥λn. Then M̃=Σi=1rλi+uiuiT, where λi+=max{0,λi}, is the best positive semidefinite approximation to the following problem,
(2.9)min⁡M̃‖M-M̃‖F,subj.torank⁡(M̃)≤r,M̃⪰0.Now suppose that the spectral decomposition ofD is UΛUT, where the diagonal entries of Λ are in a decreasing order. Let V=U(:,1:2) and Σ be the diagonal matrix with Σii=max{0,Λii}, where i=1,2. Then X=VΣ1/2 solves the problem in (2.8), and the coordinates of all the sensors are obtained, with the sensor to be determined located at (0,0)T. To obtain the coordinates of this sensor in the original reference system, it can be transformed along with other ℓ sensors so that the recalculated coordinates of those sensors agree with their old ones as much as possible. The latter can be done by minimizing the so-called RMSD (root-mean-square deviation) of the coordinates (details at the end of this subsection).It seems that the system of equations in (2.4) is simpler and easier to solve than that in (2.5), and the coordinates of xi,i=1,…,ℓ are also recalculated in (2.5). It turns out that solving (2.5) instead of (2.4) is critical for the stability of the buildup algorithm. The solution to the system in (2.4) depends on previously calculated coordinates xi,i=1,…,ℓ and, therefore, may inherit errors from previous calculations. If such errors are continuously passed down to later calculations, the buildup algorithm is most likely to end up with an incorrect set of coordinates for the sensors. In contrast, the solution to the system in (2.5) depends only on the distances among the sensors, most of which are given in the original distance data. The recalculation of the coordinates xi,i=1,…,ℓ also “cutoffs” possible propagations of calculation errors, making the algorithm much more stable [24].As we have mentioned above, the coordinates ofxi,i=1,…,ℓ+1 are determined in an independent reference system. In order to move the coordinates back to their original reference system, we need to make a proper translation and orthogonal transformation for the coordinates. Let X∈ℛℓ×2 and Y∈ℛℓ×2 be the previously calculated and recalculated coordinate matrices of the ℓ determined sensors, respectively. We first calculate the geometric centers of X and Y, (2.10)Xc=1l∑i=1lX(i,:),Yc=1l∑i=1lY(i,:),
and then update X and Y:(2.11)X:=X-Il,1Xc,Y:=Y-Il,1Yc,
where Iℓ,1 is an ℓ×1 vector with all elements 1s. After such a translation, the geometric centers of X and Y coincide at the origin. We then implement an orthogonal transformation on Y so that Y is aligned with X as much as possible. This can be done by choosing an appropriate orthogonal transform Q so that the root-mean-square deviation of X and YQ are minimized, that is,(2.12)min⁡Q:QQT=IRMSD(X,Y)=‖X-YQ‖Fl,
where Q∈ℛ2×2 is an orthogonal matrix. Let C=YTX, and let UΣVT be the singular value decomposition of C. It follows that Qopt=UVT is the optimal matrix of the above problem [30]. The coordinates of the ℓ determined sensors can then be obtained by setting(2.13)X:=YQopt+Il,1Xc,
and the coordinates of the sensor ℓ+1 by(2.14)xl+1T:=((0,0)-Yc)×Qopt+Xc.
An outline of the extended geometric buildup algorithm is given in Algorithm 2.Algorithm 2:The extended geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1: Set the anchors to be the initial set of determined sensors.Step 2:Repeat:For each undetermined sensor:If the sensor has distances to ℓ (ℓ≥3) required determined sensors,determine the positions of allℓ+1 sensors by solving (2.8),and update the coordinates of allℓ+1 sensors by propertranslation and orthogonal transformation.EndEndIf no sensor can be determined in the loop, stop.If all the sensors are determined, stop.


### 2.3. The Two-Phase Geometric Buildup Algorithm

The basic and extended geometric buildup algorithms both start building up from the anchors. If only a few anchors are available and if the distance data is also very sparse, the algorithms may not be able to determine any sensors since they may not be able to find an undetermined sensor that has at least three given distances to the anchors. Even if the algorithms can proceed, they may not be able to determine all the sensors if some undetermined sensors do not have enough required distances to the determined sensors. Here, we present a two-phase geometric buildup algorithm to deal with these situations.In Phase 1, we proceed with the extended geometric buildup algorithm until no sensors can be determined. In Phase 2, we find, in the undetermined sensors, a subset of at least three sensors where the distances between every pair of sensors are given (details are in Algorithm3 “choose an initial set in Phase 2”). More discussions on finding a clique can be found in [31, 32], and so forth. If such a set of sensors, say ℓ+1 sensors, are found, a system of distance equations as in (2.5) can be formed, and the positions of the sensors can be determined by solving these equations in the same way as we described in the previous subsection: we first set xℓ+1=(0,0)T. We then define X and D as in (2.7). Let the spectral decomposition of D be UΛUT, where the diagonal entries of Λ are in a decreasing order. Let V=U(:,1:2) and Σ be the diagonal matrix with Σii=max{0,Λii}, where i=1,2. Then X=VΣ1/2 gives the positions of the rest of the sensors. Once the positions of these sensors are determined, we can use them as an initial set of sensors to start the extended geometric buildup algorithm again. Upon finishing, another set of determined sensors is obtained.Algorithm 3:Choose an initial set in Phase 2.
Input: The set of undetermined sensors (I2) in Phase 1.Output: An initial set of sensors (I1) with distances between each otherknown.Step 1: Choose the first element inI2 to be the first element in I1.Step 2:Repeat:For each element in I2:If it has given distances to all the elements in I1,add it intoI1.EndEndHopefully, the two sets of sensors determined in Phases 1 and 2 have an overlapping subset of at least three sensors, sayk sensors. Let X∈ℛk×2 and Y∈ℛk×2 be the coordinate matrices of these sensors obtained in Phases 1 and 2, respectively. We can then make a proper translation and orthogonal transformation so that the root-mean-square deviation of X and Y are minimized. An outline of the two-phase buildup algorithm is given in Algorithm 4. Note that the parameter TH is a threshold used in the algorithm. If the percentage of the undetermined sensors in Phase 1 is greater than TH, the algorithm enters Phase 2, otherwise it stops, leaving a few sensors undecided. In principle, if there are a few sensors without enough distance constraints (e.g., each with fewer than three distances), they are considered to be undecidable.Algorithm 4:The two-phase geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1:Phase 1:Set the anchors to be the initial set of sensors.Apply the extended geometric buildup algorithm.Step 2:If the percentage of the undetermined sensors is greater than TH.Phase 2:Find and determine an initial set of sensors.Apply the extended geometric buildup algorithm.Step 3: Align the sensors determined in the two phases.


## 2.1. The Basic Geometric Buildup Algorithm

When a set of exact distances is given, that is, the distances in (1.1) is accurate, a basic geometric buildup algorithm can be applied. The algorithm works as follows. It first takes the anchors as the initial set of determined sensors. Then, for any undetermined sensor j, it tries to find three determined sensors that are not collinear but have distances to sensor j. We call these three determined sensors a basis set of sensors for sensor j. Let xi=(xi,1,xi,2)T(i=1,2,3) be the coordinate vectors of the three determined sensors. Given the distances di,j(i=1,2,3), the coordinate vector xj=(xj,1,xj,2)T of sensor j can be determined by using the following system of equations:(2.1)‖xi‖2-2xiTxj+‖xj‖2=di,j2,i=1,2,3.
Subtracting equation i from equation i+1(i=1,2) results in a linear system of equations(2.2)Axj=b,
where(2.3)A=-2[(x2-x1)T(x3-x2)T],b=[(d2,j2-d1,j2)-(‖x2‖2-‖x1‖2)(d3,j2-d2,j2)-(‖x3‖2-‖x2‖2)].The pointsx1,x2,x3 are not collinear, so the coefficient matrix A is nonsingular and the linear system (2.2) has a unique solution. An outline of the basic geometric buildup algorithm is given in Algorithm 1. Note that if there are at least three anchors in the network and the distances are exact, and if in every step, an undetermined sensor and a basis set of determined sensors associated with it can be found, then the basic geometric buildup algorithm can solve the problem in O(n) computation time, where n is the total number of sensors to be determined.Algorithm 1:The basic geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1: Let the anchors be the initial set of determined sensors.Step 2:Repeat:For each undetermined sensor j:If a basis set of determined sensors is found for sensor j,determine sensorj by solving the linear system (2.2).EndEndIf no sensor can be determined in the loop, stop.If all sensors are determined, stop.


## 2.2. The Extended Geometric Buildup Algorithm

Note that for every undetermined sensor, there may be more than three determined sensors that have distances to it. Therefore, there may be more than three distance equations in (2.1) for the sensor to satisfy. Of course, if the distances are accurate, or in other words, are exact, only three equations need to be solved as done in the basic algorithm, while all other equations are satisfied automatically. However, in practice, the distances may have errors and therefore, the distance equations may not be consistent, and satisfying three of them does not necessarily satisfy all the equations. Besides, (2.1) cannot be reduced to (2.2) any more because there may not be a solution to the equations in (2.1) or, in other words, the equations may never hold and hence cannot add or subtract. The extended geometric buildup algorithm is developed to overcome these difficulties.An extended geometric buildup algorithm works as follows. It again takes the anchors as the initial set of determined sensor. Then, for each undetermined sensor, it finds all the determined sensors that have distances to the undetermined sensor. If there are at least three such determined sensors and if they are not collinear, then the algorithm tries to find the coordinates for the undetermined sensor by solving a system of distance equations corresponding to all these determined sensors. In particular, since the equations may not be consistent, they are solved approximately in a least-squares sense as described in the following.Letxℓ+1=(xℓ+1,1,xℓ+1,2)T be the coordinate vector of the sensor to be determined. Let xi=(xi,1,xi,2)T(i=1,…,ℓ) be the coordinate vectors of the determined sensors to be used for the determination of xℓ+1. Let di,ℓ+1 be the distances from xi to xℓ+1,i=1,…,ℓ. Then the distance equations to be solved are(2.4)‖xi‖2-2xiTxl+1+‖xl+1‖2=di,l+12,i=1,…,l.
The equations can be solved by using for example a standard nonlinear least-squares method, but we implement a method similar to that proposed in [24] and obtain a more direct solution to the equations. Instead of working on the system in (2.4), we expand it to the following system:(2.5)‖xi‖2-2xiTxj+‖xj‖2=di,j2,i,j=1,…,l+1.
Note that di,j,i,j=1,…,ℓ in the added equations may or may not be available in the given distance data, but they can be computed if some of them are not because xi,i=1,…,ℓ are already known. We then consider all xi,i=1,…,ℓ+1 as unknowns and determine them all by solving the system of equations in (2.5). Since the relative positions of these sensors are invariant under any translation and orthogonal transformation, we can set a reference system so that the sensor to be determined is located at the origin or, in other words, xℓ+1=(0,0)T. It follows that ∥xi∥=di,ℓ+1,∥xj∥=dj,ℓ+1 and(2.6)di,l+12-2xiTxj+dj,l+12=di,j2,i,j=1,…,l.
Define a coordinate matrix X and an induced distance matrix D as follows:(2.7)X={xi,k:i=1,…,l,k=1,2},D={(di,l+12-di,j2+dj,l+12)2:i,j=1,…,l}.
It is easy to verify that XXT=D, which has been widely studied in the classical multidimensional scaling or “MDS” [27–29]. If the distances have errors, the system XXT=D may not be consistent. It is natural to consider a least-squares problem(2.8)min⁡X∈Rl×2‖D-XXT‖F,
where ∥·∥F is the matrix Frobenius norm. [24] applied the best rank r matrix approximation coming from the classical Eckart-Young Theorem [26], which involves the singular value decomposition. Here, we apply a best positive semidefinite approximation which involves the spectral decomposition. The solution to the problem in (2.8) can be obtained from the following theorem.Theorem 2.1 (see [19, 27]).
LetM=Σi=1nλiuiuiT be the spectral decomposition of the symmetric matrix M, where λ1≥⋯≥λn. Then M̃=Σi=1rλi+uiuiT, where λi+=max{0,λi}, is the best positive semidefinite approximation to the following problem,
(2.9)min⁡M̃‖M-M̃‖F,subj.torank⁡(M̃)≤r,M̃⪰0.Now suppose that the spectral decomposition ofD is UΛUT, where the diagonal entries of Λ are in a decreasing order. Let V=U(:,1:2) and Σ be the diagonal matrix with Σii=max{0,Λii}, where i=1,2. Then X=VΣ1/2 solves the problem in (2.8), and the coordinates of all the sensors are obtained, with the sensor to be determined located at (0,0)T. To obtain the coordinates of this sensor in the original reference system, it can be transformed along with other ℓ sensors so that the recalculated coordinates of those sensors agree with their old ones as much as possible. The latter can be done by minimizing the so-called RMSD (root-mean-square deviation) of the coordinates (details at the end of this subsection).It seems that the system of equations in (2.4) is simpler and easier to solve than that in (2.5), and the coordinates of xi,i=1,…,ℓ are also recalculated in (2.5). It turns out that solving (2.5) instead of (2.4) is critical for the stability of the buildup algorithm. The solution to the system in (2.4) depends on previously calculated coordinates xi,i=1,…,ℓ and, therefore, may inherit errors from previous calculations. If such errors are continuously passed down to later calculations, the buildup algorithm is most likely to end up with an incorrect set of coordinates for the sensors. In contrast, the solution to the system in (2.5) depends only on the distances among the sensors, most of which are given in the original distance data. The recalculation of the coordinates xi,i=1,…,ℓ also “cutoffs” possible propagations of calculation errors, making the algorithm much more stable [24].As we have mentioned above, the coordinates ofxi,i=1,…,ℓ+1 are determined in an independent reference system. In order to move the coordinates back to their original reference system, we need to make a proper translation and orthogonal transformation for the coordinates. Let X∈ℛℓ×2 and Y∈ℛℓ×2 be the previously calculated and recalculated coordinate matrices of the ℓ determined sensors, respectively. We first calculate the geometric centers of X and Y, (2.10)Xc=1l∑i=1lX(i,:),Yc=1l∑i=1lY(i,:),
and then update X and Y:(2.11)X:=X-Il,1Xc,Y:=Y-Il,1Yc,
where Iℓ,1 is an ℓ×1 vector with all elements 1s. After such a translation, the geometric centers of X and Y coincide at the origin. We then implement an orthogonal transformation on Y so that Y is aligned with X as much as possible. This can be done by choosing an appropriate orthogonal transform Q so that the root-mean-square deviation of X and YQ are minimized, that is,(2.12)min⁡Q:QQT=IRMSD(X,Y)=‖X-YQ‖Fl,
where Q∈ℛ2×2 is an orthogonal matrix. Let C=YTX, and let UΣVT be the singular value decomposition of C. It follows that Qopt=UVT is the optimal matrix of the above problem [30]. The coordinates of the ℓ determined sensors can then be obtained by setting(2.13)X:=YQopt+Il,1Xc,
and the coordinates of the sensor ℓ+1 by(2.14)xl+1T:=((0,0)-Yc)×Qopt+Xc.
An outline of the extended geometric buildup algorithm is given in Algorithm 2.Algorithm 2:The extended geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1: Set the anchors to be the initial set of determined sensors.Step 2:Repeat:For each undetermined sensor:If the sensor has distances to ℓ (ℓ≥3) required determined sensors,determine the positions of allℓ+1 sensors by solving (2.8),and update the coordinates of allℓ+1 sensors by propertranslation and orthogonal transformation.EndEndIf no sensor can be determined in the loop, stop.If all the sensors are determined, stop.


## 2.3. The Two-Phase Geometric Buildup Algorithm

The basic and extended geometric buildup algorithms both start building up from the anchors. If only a few anchors are available and if the distance data is also very sparse, the algorithms may not be able to determine any sensors since they may not be able to find an undetermined sensor that has at least three given distances to the anchors. Even if the algorithms can proceed, they may not be able to determine all the sensors if some undetermined sensors do not have enough required distances to the determined sensors. Here, we present a two-phase geometric buildup algorithm to deal with these situations.In Phase 1, we proceed with the extended geometric buildup algorithm until no sensors can be determined. In Phase 2, we find, in the undetermined sensors, a subset of at least three sensors where the distances between every pair of sensors are given (details are in Algorithm3 “choose an initial set in Phase 2”). More discussions on finding a clique can be found in [31, 32], and so forth. If such a set of sensors, say ℓ+1 sensors, are found, a system of distance equations as in (2.5) can be formed, and the positions of the sensors can be determined by solving these equations in the same way as we described in the previous subsection: we first set xℓ+1=(0,0)T. We then define X and D as in (2.7). Let the spectral decomposition of D be UΛUT, where the diagonal entries of Λ are in a decreasing order. Let V=U(:,1:2) and Σ be the diagonal matrix with Σii=max{0,Λii}, where i=1,2. Then X=VΣ1/2 gives the positions of the rest of the sensors. Once the positions of these sensors are determined, we can use them as an initial set of sensors to start the extended geometric buildup algorithm again. Upon finishing, another set of determined sensors is obtained.Algorithm 3:Choose an initial set in Phase 2.
Input: The set of undetermined sensors (I2) in Phase 1.Output: An initial set of sensors (I1) with distances between each otherknown.Step 1: Choose the first element inI2 to be the first element in I1.Step 2:Repeat:For each element in I2:If it has given distances to all the elements in I1,add it intoI1.EndEndHopefully, the two sets of sensors determined in Phases 1 and 2 have an overlapping subset of at least three sensors, sayk sensors. Let X∈ℛk×2 and Y∈ℛk×2 be the coordinate matrices of these sensors obtained in Phases 1 and 2, respectively. We can then make a proper translation and orthogonal transformation so that the root-mean-square deviation of X and Y are minimized. An outline of the two-phase buildup algorithm is given in Algorithm 4. Note that the parameter TH is a threshold used in the algorithm. If the percentage of the undetermined sensors in Phase 1 is greater than TH, the algorithm enters Phase 2, otherwise it stops, leaving a few sensors undecided. In principle, if there are a few sensors without enough distance constraints (e.g., each with fewer than three distances), they are considered to be undecidable.Algorithm 4:The two-phase geometric buildup algorithm.
Input: The positions of the anchors, the distances di,j,(i,j)∈Nx∪Na.Output: The positions of a set of determined sensors.Step 1:Phase 1:Set the anchors to be the initial set of sensors.Apply the extended geometric buildup algorithm.Step 2:If the percentage of the undetermined sensors is greater than TH.Phase 2:Find and determine an initial set of sensors.Apply the extended geometric buildup algorithm.Step 3: Align the sensors determined in the two phases.


## 3. Numerical Results

In this section, we present some numerical results from applying the two-phase geometric buildup algorithm (abbreviated as BU) to a set of test problems for sensor network localization. The test problems were generated in a similar way as used in [1]. We randomly generate n points with a uniform distribution in a square of size 1×1 centered at the origin. Without loss of generality we choose the first m points to be the anchors. We compute the distances d¯i,j between every pair of sensors, but select only those less than the given radio range rd. We also add a multiplicative random noise to every selected distance,(3.1)di,j=d¯i,j(1+nf⋅randn(1)),
where nf is a specified noisy factor, and randn(1) is a standard Gaussian random variable. We set the threshold TH=0.1. The 10% threshold for starting Phase II is indeed arbitrary. It was used for our testing purposes. In real applications, it may be set to a practically acceptable value. That is, if the percentage is lower than that value, the algorithm can terminate.The output includes three parameters and all of our outputs are the average results from five independent test problems. One parameter isT, the average CPU time in seconds over five cases except the time to generate the test problems. The buildup algorithm tries to determine all the points, but may terminate with only a subset of points as determined. In the latter case, we use another parameter NumUndet to report the average number of undetermined sensors. This is reasonable because there could be cases that some points are not determinable uniquely, for example, when a point has only one or two distances. If the undetermined points do have more than two distances, we would suggest using a general optimization algorithm to followup. However, in this paper, we have not included follow-up optimization, for we want to evaluate the performance of the buildup algorithm only. The last parameter is the RMSD value, measuring the average root-mean-square deviation of the calculated and actual locations of the determined sensors:(3.2)RMSD=(1p∑i=1p‖xi-x¯i‖2)1/2,
where p is the number of the determined sensors, xi and x¯i are the true and calculated locations of the determined sensors, respectively. For convenience, we list all the input and output parameters in Table 1. Note that as an input the original coordinates matrix of all sensors (i.e., “PPn×2”) is used only to generate distances we need and evaluate the accuracy of the algorithms in numerical simulations.Table 1
Input and output of the two-phase geometric buildup algorithm.
Input:m:number of anchors.n:number of all the sensors, including anchors.PPn×2: original coordinates matrix of all sensors.rd: radio range.nf:noise factor: di,j=d̅i,j(1+nf·randn(1)).Output:T: average  CPU  time  in seconds over  five cases except the time to generate the test problems.NumUndet:average  number of undetermined sensors.RMSD:average root-mean-square deviation defined in(3.2).All our calculations are done in MATLAB 7.9.0 (R2009b) on a Dell xps M1330 laptop with 2.00 GHz CPU and 3.00 GB memory.


### 3.1. Problems with Exact Distances

Example 3.1.
We have generated a set of sensor networks with 500, 1000, 2000, and 4000 nodes, respectively. We downloaded the code “SFSDP V111” of the SFSDP approach [16] from http://www.is.titech.ac.jp/~kojima/SFSDP/SFSDP.html. In Table 2, the “RMSD” of SFSDP are the average results over five cases without post-refinement of locations of sensors by the MATLAB function “lsqnonlin”. The “T” of SFSDP is the average CPU time consumed by SeDuMi with the same accuracy parameter pars.eps =1.0e-5 as [16]. The numerical results in Table 2 show that for these problems with exact distances, the SFSDP approach performs well when rd is relatively larger, while the BU algorithm can find solutions to the problems with smaller RMSD values in shorter running time with fewer distance data (i.e., smaller rd). Figure 1 shows a graph of 1000 node network determined by the geometric buildup algorithm and all the sensors are accurately positioned.Table 2
Example3.1: problems with exact distances.
ApproachnmrdNumUndetRMSDT (sec.)BU500500.113.7e-160.25SFSDP500500.104.7e-313.1SFSDP500500.302.9e-77.6SNLSDPclique500500.10.41e-140.4BU10001000.104.6e-160.6SFSDP10001000.103.4e-422.7SFSDP10001000.302.2e-716.0SNLSDPclique10001000.104e-150.7BU20001000.101.3e-157.0SFSDP20001000.107.7e-542.3SFSDP20001000.305.2e-734.9SNLSDPclique20001000.101e-141.8BU40001000.0607.5e-169.4SFSDP40001000.0602.1e-3317.8SFSDP40001000.101.9e-4109.2SNLSDPclique40001000.0603e-143.1Figure 1
A network determined by the geometric buildup algorithm.n=1000,m=100,rd=0.1,nf=0. The (blue) diamonds refer to the positions of the anchors; the (green) circles to the original locations of the unknown sensors; the (red) asterisks to their estimated positions from the geometric buildup algorithm.We have also tested some larger-scale problems with exact distances. The results for each problem size are obtained and shown in Table2. Note that in particular, a sensor network of 10000 nodes was solved by the geometric buildup algorithm in less than 1 minute. Recently Krislock and Wolkowicz [19, 20] proposed an SNLSDPclique approach which is very efficient for noiseless problems. We also ran “SNLSDPclique-0.2” downloaded from http://orion.math.uwaterloo.ca/~hwolkowicz/henry/software/EDM.shtml and present the results in Tables 2 and 3. We find that in these cases when the sensor network is relatively small (e.g., n=500,1000), the two algorithms perform very closely and the BU algorithm is a little more accurate than the SNLSDPclique algorithm (note that these results of SNLSDPclique have been very accurate); when the sensor network is relatively big (e.g., n≥2000), the SNLSDPclique algorithm runs faster than the BU algorithm and the BU algorithm is still a little more accurate. We will further demonstrate the performance behaviors of these two algorithms on the noisy problems in Table 7.Table 3
Large-scale problems with exact distances.
ApproachnmrdNumUndetRMSDT (sec.)BU50001000.0601.1e-1518.060002000.0507.3e-1617.970002000.0509.9e-1628.480003000.0407.2e-1632.190003000.0407.2e-1643.7100003000.0408.1e-1651.9SNLSDPclique100003000.0405e-1416.3


### 3.2. Problems with a Few Anchors

Example 3.2.
We have also tested a special network generated by [1, 12]. This network consists of 50 sensors, including 3 anchors. Exact distances are assumed and therefore nf=0. The radio range rd takes values from 0.2 to 0.35. The average performance results for rd=0.3,0.35 are listed in Table 4. We can see that the problems were solved in less than 1 second. Note that for each rd in these tests, in two runs only Phase 1 was executed, while in the other three runs Phase 2 was also invoked. It showed that sometimes Phase 2 was necessary for sparse distance data. However, when we reduced rd to 0.25 or 0.2, the distances became very sparse, and even in Phase 2, only a few sensors could be determined.Table 4
Example3.2.
nmrdnfNumUndetRMSDT (sec.)5030.307.46.0e-160.045030.3503.84.5e-160.05Example 3.3.
Another problem we have tested comes from [14]. We have randomly generated 500 sensors x1*,x2*,…,x500* and the anchors were chosen to be the four points at (±0.45,±0.45). The distance set A was generated as follows. Initially, set A=∅. Then for each i from 1 to 500, compute the set Ii={j:∥xi*-xj*∥2≤0.3,j≥i}; if |Ii|≥10, let Ai be the subset of Ii consisting of the 10 smallest integers; otherwise, let Ai=Ii; then let A=A∪{(i,j):j∈Ai}. The distance set B is chosen such that B={(i,k):∥xi*-ak*∥2≤0.3}, that is, every anchor is connected to all the sensors that are within distance 0.3. The whole distance set is A∪B. Since there are no noises, nf=0.In this problem, the four anchors are far away from each other. If one unknown sensor has distances to at least three of them, the radio range has to be at least the distance from one of them to the origin (≃0.6364), which is not possible. Therefore, the geometric buildup algorithm has to go to Phase 2 to solve the problem. The average performance results are listed in Table 5. We also list the results of the SOS approach [14] and the ESDP approach [13] in Table 5. Since the SOS code is not published online and the published ESDP code implements the steepest descent local search refinement, while the BU algorithm does not implement any postrefinement, we decided to directly cite their original results. From Table 5 we see that on this test problem the BU algorithm outperforms the SOS approach in the accuracy and running time and it outperforms the ESDP approach in the accuracy at least.Table 5
Example3.3.
ApproachnmrdnfNumUndetRMSDTimeaBUb50040.3012.28.0e-161 secSOSc02.9e-685 minESDPd01e-630 secaThis time indicates all the running time including that to generate problems.bBU was implemented on a laptop with 3.00 GB memory and 2.00 GHz CPU.cSOS [14] was implemented on a Linux machine with 0.98 GB RAM and 1.46 GHz CPU. The “RMSD” and “Time” of SOS come from [14].dESDP [13] was implemented on a laptop with 1.99 GB RAM and 1.06 GHz CPU. The  “RMSD” and “Time” of ESDP come from [13].


### 3.3. Problems with Noisy Distances

Example 3.4.
We have also tested a set of problems with a large fraction of anchors but low distance noises (e.g.,m=0.1n and nf≤0.01). These problems are mid- to large-scale, tested by SOCP [15], ESDP [13], and LPCGD [18]. The parameters are set as follows: nf=0,0.001,0.01,rd=0.06 for n=1000,rd=0.035 for n=4000. For each set of parameters, the average results are in Table 6. We see that the numbers of undetermined sensors are relatively small (less than 5% of the total number of sensors). In particular, for the problem with 4000 sensors, there are only a few sensors undetermined. The average RMSD values of the BU algorithm without postrefinement are close to those of ESDP with postrefinement on noisy problems. Figure 2 shows one example of 1000 sensors with nf=0.001 in which the locations of sensors are fairly accurate. Note that in the five cases of 4000 nodes with nf=0.001, although the average RMSD is 3.9e-3, the best RMSD value is 9.1e-5 actually without any postrefinement.Table 6
Example3.4.
nmrdnfNumUndetRMSD  of BUaT (sec.)RMSD  of ESDPa10001000.06038.63.2e-162.22e-310001000.060.00126.24.7e-32.13e-310001000.060.0136.83.3e-22.52e-240004000.03505.63.2e-1641.31e-340004000.0350.00143.9e-340.78e-440004000.0350.013.21.2e-240.83e-2aRMSD of ESDP is obtained by implementing the steepest descent local search refinement for noisy sensor network problems. RMSD of BU is obtained without postrefinement. The RMSD values of ESDP come from [13].Table 7
Examples withnf=0.1.
ApproachnmrdNumUndetRMSDT (sec.)BU10001000.0804.1e-20.53SFSDP10001000.202.6e-244.0SNLSDPclique10001000.202e-21SNLSDPclique10001000.080.25e-10.7BU20001000.053.47.9e-28.9SFSDP20001000.202.6e-2134.6SNLSDPclique20001000.204e-22.7SNLSDPclique20001000.051.82e+11.4BU20002000.0533.6e-26.0BU40001000.03569.99e-275.7SFSDP40001000.101.6e-2269.4SNLSDPclique40001000.102e-15.6SNLSDPclique40001000.03511.49e+23.9BU40002000.0358.84.7e-265.6BU40003000.0355.83.2e-252.4BU40004000.0355.82.6e-243.0Figure 2
Graphical display of a sensor network withn=1000,m=100,rd=0.06,nf=0.001. The (blue) diamonds refer to the positions of the anchors; the (green) circles to the original locations of the unknown sensors; the (red) asterisks to their estimated positions by BU. The discrepancies between the original and the estimated points are indicated by the solid lines. RMSD=5.9e-3.We also compared the running time of the BU algorithm with the ESDP [13], SOCP1(SeDuMi) [15], SOCP2(SCGD) [15], and LPCGD [18] approaches. Based on their published results and our running results, we think on these problems the BU algorithm is most likely to run faster than ESDP, SOCP1(Se DuMi), SOCP2(SCGD), and LPCGD may run faster than BU. Since the running environments are quite different and only the ESDP code with a post-refinement is published online, it is hard to compare these approaches exactly in terms of running time, which makes us not list their running time here. Interested readers can refer to the above papers.We have also tested some problems with larger noises, for example,nf=0.1. The average results are shown in Table 7. As in Example 3.1, the running time of SFSDP is the average CPU time in seconds over five cases consumed by SeDuMi with the accuracy parameter pars.eps =1.0e-5. Kim et al. [16] used three different values of rd for each problem and we chose the rd with the best result. We also ran “SNLSDPclique-0.2” [19, 20] and show the average results over five cases in Table 7. We can see that although the SFSDP approach is a little more accurate than the BU algorithm, BU obtains similar accuracy with SFSDP (i.e., their RMSD values have the same orders) in shorter running time with fewer distance data. The SNLSDPclique approach runs faster than the BU algorithm, but BU needs fewer distance data with large noises than SNLSDPclique to obtain same orders of RMSD values. We also see that the RMSD values of the BU algorithm become larger than those of problems with low noises. This may be due to the fact that the buildup algorithm is an iterative algorithm and large noises affect the accuracy of calculations. However, we see from Table 7 that the errors of the BU algorithm may be improved by increasing the number of anchors.Note that for SFSDP, largerrd values result in smaller RMSDs, but for BU, larger rd values may result in larger RMSD, as shown in Table 8. We can see that for the network of 2000 nodes with nf=0.1, when rd varies from 0.05 to 0.11, RMSD increases from 6.9e-2 to 3.7e+1. For the network of 1000 nodes with nf=0.001, as rd varies from 0.06 to 0.22, RMSD decreases first, then increases. The reason is that for an undetermined sensor, larger rd may result in more neighboring determined sensors and thus a larger-size noisy least-squares problem, the solution to which may involve larger errors.Table 8
Effect of varying radio ranges.
nmrdnfNumUndetRMSD10001000.060.00120.84.2e-310001000.080.0010.61.3e-310001000.120.00102.5e-410001000.150.00108.9e-410001000.180.00106.7e-210001000.20.00101.3e-110001000.220.00101.3e+120001000.050.15.46.9e-220001000.070.107.0e-220001000.080.101.2e-120001000.10.107.3e-120001000.110.103.7e+1


### 3.4. Impact of Noise, the Number of Anchors, and the Radio Range

We now summarize in the following on how the distance noise, the number of anchors, and the radio range affect the performance of the geometric buildup algorithm.First, as shown in Table6, the RMSD value of a network determined by the geometric buildup algorithm increases as nf increases. For example, for a network of 4000 nodes, when the noise factor nf increases from 0.001 to 0.01, the RMSD value increases from around 1e-3 to 1e-2.Second, as shown in Table7, increasing the number of anchors increases the accuracy of localization. It may reduce the time to find the required determined sensors for an undetermined sensor as well. For example, for a network of 4000 nodes, when m increases from 100 to 400, the RMSD value decreases from 9.99e-2 to 2.6e-2 and the running time decreases from 75.7 s to 43.0 s.Third, as further demonstrated in Table8, the impact of the radio range depends on the noise. As mentioned in Example 3.4, for an undetermined sensor, larger rd values may result in more neighboring determined sensors and thus a larger-size noisy least-squares problem whose optimal solution may involve larger errors. For example, if nf is small, increasing rd in an appropriate range can improve the accuracy of localization, while if nf is large, increasing rd may increase the RMSD value.


## 3.1. Problems with Exact Distances

Example 3.1.
We have generated a set of sensor networks with 500, 1000, 2000, and 4000 nodes, respectively. We downloaded the code “SFSDP V111” of the SFSDP approach [16] from http://www.is.titech.ac.jp/~kojima/SFSDP/SFSDP.html. In Table 2, the “RMSD” of SFSDP are the average results over five cases without post-refinement of locations of sensors by the MATLAB function “lsqnonlin”. The “T” of SFSDP is the average CPU time consumed by SeDuMi with the same accuracy parameter pars.eps =1.0e-5 as [16]. The numerical results in Table 2 show that for these problems with exact distances, the SFSDP approach performs well when rd is relatively larger, while the BU algorithm can find solutions to the problems with smaller RMSD values in shorter running time with fewer distance data (i.e., smaller rd). Figure 1 shows a graph of 1000 node network determined by the geometric buildup algorithm and all the sensors are accurately positioned.Table 2
Example3.1: problems with exact distances.
ApproachnmrdNumUndetRMSDT (sec.)BU500500.113.7e-160.25SFSDP500500.104.7e-313.1SFSDP500500.302.9e-77.6SNLSDPclique500500.10.41e-140.4BU10001000.104.6e-160.6SFSDP10001000.103.4e-422.7SFSDP10001000.302.2e-716.0SNLSDPclique10001000.104e-150.7BU20001000.101.3e-157.0SFSDP20001000.107.7e-542.3SFSDP20001000.305.2e-734.9SNLSDPclique20001000.101e-141.8BU40001000.0607.5e-169.4SFSDP40001000.0602.1e-3317.8SFSDP40001000.101.9e-4109.2SNLSDPclique40001000.0603e-143.1Figure 1
A network determined by the geometric buildup algorithm.n=1000,m=100,rd=0.1,nf=0. The (blue) diamonds refer to the positions of the anchors; the (green) circles to the original locations of the unknown sensors; the (red) asterisks to their estimated positions from the geometric buildup algorithm.We have also tested some larger-scale problems with exact distances. The results for each problem size are obtained and shown in Table2. Note that in particular, a sensor network of 10000 nodes was solved by the geometric buildup algorithm in less than 1 minute. Recently Krislock and Wolkowicz [19, 20] proposed an SNLSDPclique approach which is very efficient for noiseless problems. We also ran “SNLSDPclique-0.2” downloaded from http://orion.math.uwaterloo.ca/~hwolkowicz/henry/software/EDM.shtml and present the results in Tables 2 and 3. We find that in these cases when the sensor network is relatively small (e.g., n=500,1000), the two algorithms perform very closely and the BU algorithm is a little more accurate than the SNLSDPclique algorithm (note that these results of SNLSDPclique have been very accurate); when the sensor network is relatively big (e.g., n≥2000), the SNLSDPclique algorithm runs faster than the BU algorithm and the BU algorithm is still a little more accurate. We will further demonstrate the performance behaviors of these two algorithms on the noisy problems in Table 7.Table 3
Large-scale problems with exact distances.
ApproachnmrdNumUndetRMSDT (sec.)BU50001000.0601.1e-1518.060002000.0507.3e-1617.970002000.0509.9e-1628.480003000.0407.2e-1632.190003000.0407.2e-1643.7100003000.0408.1e-1651.9SNLSDPclique100003000.0405e-1416.3


## 3.2. Problems with a Few Anchors

Example 3.2.
We have also tested a special network generated by [1, 12]. This network consists of 50 sensors, including 3 anchors. Exact distances are assumed and therefore nf=0. The radio range rd takes values from 0.2 to 0.35. The average performance results for rd=0.3,0.35 are listed in Table 4. We can see that the problems were solved in less than 1 second. Note that for each rd in these tests, in two runs only Phase 1 was executed, while in the other three runs Phase 2 was also invoked. It showed that sometimes Phase 2 was necessary for sparse distance data. However, when we reduced rd to 0.25 or 0.2, the distances became very sparse, and even in Phase 2, only a few sensors could be determined.Table 4
Example3.2.
nmrdnfNumUndetRMSDT (sec.)5030.307.46.0e-160.045030.3503.84.5e-160.05Example 3.3.
Another problem we have tested comes from [14]. We have randomly generated 500 sensors x1*,x2*,…,x500* and the anchors were chosen to be the four points at (±0.45,±0.45). The distance set A was generated as follows. Initially, set A=∅. Then for each i from 1 to 500, compute the set Ii={j:∥xi*-xj*∥2≤0.3,j≥i}; if |Ii|≥10, let Ai be the subset of Ii consisting of the 10 smallest integers; otherwise, let Ai=Ii; then let A=A∪{(i,j):j∈Ai}. The distance set B is chosen such that B={(i,k):∥xi*-ak*∥2≤0.3}, that is, every anchor is connected to all the sensors that are within distance 0.3. The whole distance set is A∪B. Since there are no noises, nf=0.In this problem, the four anchors are far away from each other. If one unknown sensor has distances to at least three of them, the radio range has to be at least the distance from one of them to the origin (≃0.6364), which is not possible. Therefore, the geometric buildup algorithm has to go to Phase 2 to solve the problem. The average performance results are listed in Table 5. We also list the results of the SOS approach [14] and the ESDP approach [13] in Table 5. Since the SOS code is not published online and the published ESDP code implements the steepest descent local search refinement, while the BU algorithm does not implement any postrefinement, we decided to directly cite their original results. From Table 5 we see that on this test problem the BU algorithm outperforms the SOS approach in the accuracy and running time and it outperforms the ESDP approach in the accuracy at least.Table 5
Example3.3.
ApproachnmrdnfNumUndetRMSDTimeaBUb50040.3012.28.0e-161 secSOSc02.9e-685 minESDPd01e-630 secaThis time indicates all the running time including that to generate problems.bBU was implemented on a laptop with 3.00 GB memory and 2.00 GHz CPU.cSOS [14] was implemented on a Linux machine with 0.98 GB RAM and 1.46 GHz CPU. The “RMSD” and “Time” of SOS come from [14].dESDP [13] was implemented on a laptop with 1.99 GB RAM and 1.06 GHz CPU. The  “RMSD” and “Time” of ESDP come from [13].


## 3.3. Problems with Noisy Distances

Example 3.4.
We have also tested a set of problems with a large fraction of anchors but low distance noises (e.g.,m=0.1n and nf≤0.01). These problems are mid- to large-scale, tested by SOCP [15], ESDP [13], and LPCGD [18]. The parameters are set as follows: nf=0,0.001,0.01,rd=0.06 for n=1000,rd=0.035 for n=4000. For each set of parameters, the average results are in Table 6. We see that the numbers of undetermined sensors are relatively small (less than 5% of the total number of sensors). In particular, for the problem with 4000 sensors, there are only a few sensors undetermined. The average RMSD values of the BU algorithm without postrefinement are close to those of ESDP with postrefinement on noisy problems. Figure 2 shows one example of 1000 sensors with nf=0.001 in which the locations of sensors are fairly accurate. Note that in the five cases of 4000 nodes with nf=0.001, although the average RMSD is 3.9e-3, the best RMSD value is 9.1e-5 actually without any postrefinement.Table 6
Example3.4.
nmrdnfNumUndetRMSD  of BUaT (sec.)RMSD  of ESDPa10001000.06038.63.2e-162.22e-310001000.060.00126.24.7e-32.13e-310001000.060.0136.83.3e-22.52e-240004000.03505.63.2e-1641.31e-340004000.0350.00143.9e-340.78e-440004000.0350.013.21.2e-240.83e-2aRMSD of ESDP is obtained by implementing the steepest descent local search refinement for noisy sensor network problems. RMSD of BU is obtained without postrefinement. The RMSD values of ESDP come from [13].Table 7
Examples withnf=0.1.
ApproachnmrdNumUndetRMSDT (sec.)BU10001000.0804.1e-20.53SFSDP10001000.202.6e-244.0SNLSDPclique10001000.202e-21SNLSDPclique10001000.080.25e-10.7BU20001000.053.47.9e-28.9SFSDP20001000.202.6e-2134.6SNLSDPclique20001000.204e-22.7SNLSDPclique20001000.051.82e+11.4BU20002000.0533.6e-26.0BU40001000.03569.99e-275.7SFSDP40001000.101.6e-2269.4SNLSDPclique40001000.102e-15.6SNLSDPclique40001000.03511.49e+23.9BU40002000.0358.84.7e-265.6BU40003000.0355.83.2e-252.4BU40004000.0355.82.6e-243.0Figure 2
Graphical display of a sensor network withn=1000,m=100,rd=0.06,nf=0.001. The (blue) diamonds refer to the positions of the anchors; the (green) circles to the original locations of the unknown sensors; the (red) asterisks to their estimated positions by BU. The discrepancies between the original and the estimated points are indicated by the solid lines. RMSD=5.9e-3.We also compared the running time of the BU algorithm with the ESDP [13], SOCP1(SeDuMi) [15], SOCP2(SCGD) [15], and LPCGD [18] approaches. Based on their published results and our running results, we think on these problems the BU algorithm is most likely to run faster than ESDP, SOCP1(Se DuMi), SOCP2(SCGD), and LPCGD may run faster than BU. Since the running environments are quite different and only the ESDP code with a post-refinement is published online, it is hard to compare these approaches exactly in terms of running time, which makes us not list their running time here. Interested readers can refer to the above papers.We have also tested some problems with larger noises, for example,nf=0.1. The average results are shown in Table 7. As in Example 3.1, the running time of SFSDP is the average CPU time in seconds over five cases consumed by SeDuMi with the accuracy parameter pars.eps =1.0e-5. Kim et al. [16] used three different values of rd for each problem and we chose the rd with the best result. We also ran “SNLSDPclique-0.2” [19, 20] and show the average results over five cases in Table 7. We can see that although the SFSDP approach is a little more accurate than the BU algorithm, BU obtains similar accuracy with SFSDP (i.e., their RMSD values have the same orders) in shorter running time with fewer distance data. The SNLSDPclique approach runs faster than the BU algorithm, but BU needs fewer distance data with large noises than SNLSDPclique to obtain same orders of RMSD values. We also see that the RMSD values of the BU algorithm become larger than those of problems with low noises. This may be due to the fact that the buildup algorithm is an iterative algorithm and large noises affect the accuracy of calculations. However, we see from Table 7 that the errors of the BU algorithm may be improved by increasing the number of anchors.Note that for SFSDP, largerrd values result in smaller RMSDs, but for BU, larger rd values may result in larger RMSD, as shown in Table 8. We can see that for the network of 2000 nodes with nf=0.1, when rd varies from 0.05 to 0.11, RMSD increases from 6.9e-2 to 3.7e+1. For the network of 1000 nodes with nf=0.001, as rd varies from 0.06 to 0.22, RMSD decreases first, then increases. The reason is that for an undetermined sensor, larger rd may result in more neighboring determined sensors and thus a larger-size noisy least-squares problem, the solution to which may involve larger errors.Table 8
Effect of varying radio ranges.
nmrdnfNumUndetRMSD10001000.060.00120.84.2e-310001000.080.0010.61.3e-310001000.120.00102.5e-410001000.150.00108.9e-410001000.180.00106.7e-210001000.20.00101.3e-110001000.220.00101.3e+120001000.050.15.46.9e-220001000.070.107.0e-220001000.080.101.2e-120001000.10.107.3e-120001000.110.103.7e+1


## 3.4. Impact of Noise, the Number of Anchors, and the Radio Range

We now summarize in the following on how the distance noise, the number of anchors, and the radio range affect the performance of the geometric buildup algorithm.First, as shown in Table6, the RMSD value of a network determined by the geometric buildup algorithm increases as nf increases. For example, for a network of 4000 nodes, when the noise factor nf increases from 0.001 to 0.01, the RMSD value increases from around 1e-3 to 1e-2.Second, as shown in Table7, increasing the number of anchors increases the accuracy of localization. It may reduce the time to find the required determined sensors for an undetermined sensor as well. For example, for a network of 4000 nodes, when m increases from 100 to 400, the RMSD value decreases from 9.99e-2 to 2.6e-2 and the running time decreases from 75.7 s to 43.0 s.Third, as further demonstrated in Table8, the impact of the radio range depends on the noise. As mentioned in Example 3.4, for an undetermined sensor, larger rd values may result in more neighboring determined sensors and thus a larger-size noisy least-squares problem whose optimal solution may involve larger errors. For example, if nf is small, increasing rd in an appropriate range can improve the accuracy of localization, while if nf is large, increasing rd may increase the RMSD value.


## 4. Conclusion

In this paper, we have investigated a geometric buildup approach to the sensor network localization problem. We follow the buildup scheme [24] which was applied to protein structure determination problems. The main difference between our algorithm and [24] is that we employ a low-rank positive semidefinite approximation scheme, which requires a spectral decomposition for a small distance matrix and guarantees a best-possible approximation to the solution of the distance equations in a least-squares sense. We have also implemented a two-phase buildup algorithm to handle problems with a few anchors and sparse distances. In principle, the initial clique in Phase II may find only several points while there are still larger cliques in the graph. We would like to consider some efficient clique searching algorithms in our future efforts.We have tested the geometric buildup algorithm on a set of simulated sensor network localization problems with sparse and exact or inexact distances. The results showed that the algorithm runs fast on the test problems with acceptable accuracy. The algorithm is easy to follow and implement, and if further developed, may particularly be suitable for large-scale applications. The algorithm still needs to be improved to handle problems with large distance noises and problems with extremely sparse distances, which we will work on in our future efforts.



---

*Source: 927031-2011-10-27.xml*