**5.1. Range-free localization in one dimensional spaces**

In this part, we investigate the range-free localization of sensors in a network deployed in a one dimensional topology.

### *5.1.1. Background*

6 Will-be-set-by-IN-TECH

equal distribution in space. In (5a) the terms involving *xi* write 2 <sup>∑</sup>*j*∈**N**(*i*)(*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*). The minimization of 2 <sup>∑</sup>*j*∈**N**(*i*)(*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) in terms of *xi* tends to adapt *xi* to the center formed by all *xj* for *j* ∈ **N**(*i*). The second term in (5a) is essentially a barrier term and approaches to infinitely large when the solution tends to violate the inequality constraints

(3) with *R* replaced by *R* − *δ*, i.e., the solution of *xi* obtained by solving (2) with *R* replaced by

The ODE model (6) is a distributed one since the update of *xi* in (6) only depends on *xj* for *j* ∈ **N**(*i*), i.e., the position estimations of the neighbor sensors. Therefore, communication

**Remark 2.** *The ODE model (6) is initialized with the ultimate output of the ODE model I (3) with R replaced by R* − *δ in (4) with δ* � *R. The goal is to ensure the ultimate output of Model I strictly locates inside the open set formed by (1), which is necessary for the barrier term in (5) to restrict the*

According to Theorem 1, the ODE model I with *R* replaced by *R* − *δ* ultimately converges to a

with which we conclude that (*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>≤</sup> (*<sup>R</sup>* <sup>−</sup> *<sup>δ</sup>*)<sup>2</sup> *<sup>&</sup>lt; <sup>R</sup>*<sup>2</sup> for *<sup>i</sup>* <sup>∈</sup> **<sup>N</sup>**(*j*). With the effect

with an initialization inside the feasible set will still stay inside this set. We have the following

*ultimate output of the ODE model I (3) with R replaced by R* − *δ in (4) with δ* � *R, stays in the open*

In this section, simulations are used to verify the two ODE models in both the one dimensional

*<sup>R</sup>*<sup>2</sup>−(*xi*−*xj*)*<sup>T</sup>*(*xi*−*xj*)(*xi* <sup>−</sup> *xj*) in the model II (6), the ultimate solution of (6)

*c*0 *<sup>R</sup>*<sup>2</sup> − (*xi* − *xj*)*T*(*xi* − *xj*)

*<sup>i</sup>* means that *xi* is initialized with *x*�

*<sup>i</sup>* (6)

(*xi* − *xj*)

*<sup>i</sup>* is the ultimate output of Model I

. *�*<sup>2</sup> *>* 0 is a scaling

*i*

<sup>2</sup> for*<sup>i</sup>* <sup>∈</sup> **<sup>N</sup>**(*j*) (7a)

*i*

*, which is the*

*xk* = *x*¯*<sup>k</sup>* for *k* ∈ **B** (7b)

given in (1). This term works to restrict the solution in the feasible set.

 1 +

About the initialization of the ODE model, we have the following remark,

(*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>≤</sup> (*<sup>R</sup>* <sup>−</sup> *<sup>δ</sup>*)

**Theorem 2** ([11])**.** *The ODE model II (6) with �*<sup>2</sup> *>* 0*, c*<sup>0</sup> *>* 0*, initialized with x*�

*j*∈**N**(*i*)

We use the following gradient based dynamics to solve (5):

*xk* = *x*¯*<sup>k</sup>* for *k* ∈ **B**

where *xi* is the position estimation of the *i*th blind sensor, *x*�

*<sup>x</sup>*˙*<sup>i</sup>* = −*�*<sup>2</sup> ∑

*xi*(0) = *x*�

*R* − *δ* in (4). The expression *xi*(0) = *x*�

factor and *c*<sup>0</sup> *>* 0 is a positive constant.

only happens between neighbor sensors.

*solution always stays inside the feasible region.*

solution in the following set,

of the barrier term *<sup>c</sup>*<sup>0</sup>

*set constructed by (1).*

**5. Simulations**

theorem to state this point rigourously,

space and the two dimensional space.

There are a bunch of applications which deploys sensors along an one dimensional line. For example, WSNs for highway monitoring [1, 9, 21] are often deployed along the highway direction and thus form a one dimensional deployment topology, as sketched in Fig. 3. Other applications, such as WSNs for bridge health monitoring [32] and WSNs along a tunnel [5] for traffic safety, can also be put into the category of one dimensional localization problem.

### *5.1.2. Simulation setup and simulation results*

We consider a wireless sensor network with one dimensional deployment. There are 4 beacon sensors deployed at 0m, 166.6667m, 333.3333m and 500.0000m, and 16 blind sensors deployed at 26.6011m, 56.1963m, 83.3216, 119.9182m, 147.6692m, 176.9903m, 208.3049m, 238.5405m, 263.6398m, 290.4771m, 320.4868m, 355.1442m, 384.0493m, 407.3632m, 440.0192m and 470.5006m, respectively. The communication range of sensors is 50m.

For the dynamic models, the state values of Model I are randomly initialized. We choose *�*<sup>1</sup> = 105, *�*<sup>2</sup> <sup>=</sup> <sup>20</sup> <sup>×</sup> 105 as the scaling parameters, the coefficient *<sup>c</sup>*<sup>0</sup> <sup>=</sup> 5. The shrinking constant *<sup>δ</sup>* is chosen as 5. Fig. 4 plots the transient behavior of the position estimation by Model I. From this figure, we can clearly see that the estimation converges with time. For Model II, it is initialized with the output of Model I by replacing *R* with *R* − *δ*. As *R* ≈ *R* − *δ* in this simulation, Fig. 4 and Fig. 5, which shows the transient to obtain the initial position estimation for Model II, demonstrate similar behaviors. Fig. 6 shows the transient of the position estimation by Model II. By comparing the final values and the initial values in Fig. 6, it can be found that the values tends to equal distances between neighbors. The position estimation results are shown in Fig. 7. It can be observed that both models result in estimations meeting the nonlinear inequalities (neighbor sensors are within a distance of 50m). However, the result by Model I may break

**Figure 4.** Transient of the position estimation by Model I in the one dimensional localization problem. Triansent to obtain the initial value for Model II

**Figure 5.** Transient to obtain the initial position estimation for Model II in the one dimensional localization problem.

8 Will-be-set-by-IN-TECH

Output of Model I

0 0.5 1 1.5 2

time/s

Triansent to obtain the initial value for Model II

0 1 2

time/s

**Figure 5.** Transient to obtain the initial position estimation for Model II in the one dimensional

**Figure 4.** Transient of the position estimation by Model I in the one dimensional localization problem.

0

0

100

200

300

x/meters

localization problem.

400

500

100

200

300

x/meters

400

500

x 10 −4

x 10−4

**Figure 6.** Transient of the position estimation by Model II in the one dimensional localization problem.

**Figure 7.** Position estimation results in the one dimensional localization problem.

the real order, i.e., as shown in Fig. 7 the sixth sensor from the left actually locates to the left of the eighth one while the estimated position of the sixth sensor by Model I is to the right of the eighth sensor. However, the performance is improved by using Model II and the estimation results follows the real order. For better comparisons of Model I and Model II in the sense

of estimation error, we use the Root-mean-square error *E*1 defined as *E*1 = <sup>∑</sup>*<sup>n</sup> <sup>i</sup>*=<sup>1</sup> ||*x*ˆ*i*−*xi*||<sup>2</sup> *n* (where *x*ˆ*<sup>i</sup>* and *xi* represent the estimated value and the true value of the *i*th sensor's position), and the maximum absolute error *E*2 defined as *E*2 = max*i*=1,2,...,*n*{||*x*ˆ*<sup>i</sup>* − *xi*||} to evaluate the estimation error. Ten independent simulations with random initializations are performed and the estimation errors are calculated for all runs. As shown in Table 1, the error *E*1 is around 40 and the error *E*2 is around 80 for Model I with the simulation setup. In contrast, the estimation errors for Model II are much lower, which are about 10 for *E*1 and 26 for *E*2 in the ten simulation runs. This result demonstrates the advantage of Model II over Model I for position estimation of sensors by introducing heuristic information. Also note that there are only 4 beacon sensors in contrast to 16 blind sensors, meaning that the ratio of beacon sensors to blind sensors is 25%. For such a low beacon vs. blind sensor ratio, the estimation errors *E*1 and *E*2 for both Model I and Model II, especially for Model II, as shown in Table 1, are acceptable for rough estimations of sensor positions in applications.


Estimation Error of Model I Estimation Error of Model II

**Table 1.** Estimation errors for Model I and Model II in different simulation runs of the one dimensional localization problem.

### **5.2. Range-free localization in two dimensional Spaces**

In this part, we investigate the range-free localization of sensors in a network deployed in a two dimensional topology.

### *5.2.1. Background*

Most existing literatures deal with the general localization problem in two dimensional space. The one dimensional sensor localization problem investigated in the last section falls into this category by fixing the value of sensor positions along one dimension. Localization in applications, such as wildlife monitoring [7], WSN aided robot navigation [6, 19] and animal tracking [27], can be abstracted as two dimensional localization problems.

10 Will-be-set-by-IN-TECH

the real order, i.e., as shown in Fig. 7 the sixth sensor from the left actually locates to the left of the eighth one while the estimated position of the sixth sensor by Model I is to the right of the eighth sensor. However, the performance is improved by using Model II and the estimation results follows the real order. For better comparisons of Model I and Model II in the sense

(where *x*ˆ*<sup>i</sup>* and *xi* represent the estimated value and the true value of the *i*th sensor's position), and the maximum absolute error *E*2 defined as *E*2 = max*i*=1,2,...,*n*{||*x*ˆ*<sup>i</sup>* − *xi*||} to evaluate the estimation error. Ten independent simulations with random initializations are performed and the estimation errors are calculated for all runs. As shown in Table 1, the error *E*1 is around 40 and the error *E*2 is around 80 for Model I with the simulation setup. In contrast, the estimation errors for Model II are much lower, which are about 10 for *E*1 and 26 for *E*2 in the ten simulation runs. This result demonstrates the advantage of Model II over Model I for position estimation of sensors by introducing heuristic information. Also note that there are only 4 beacon sensors in contrast to 16 blind sensors, meaning that the ratio of beacon sensors to blind sensors is 25%. For such a low beacon vs. blind sensor ratio, the estimation errors *E*1 and *E*2 for both Model I and Model II, especially for Model II, as shown in Table 1, are

Estimation Error of Model I Estimation Error of Model II

 E1 E2 E1 E2 41.2948 84.0870 9.9419 23.7890 44.5053 84.4876 10.2123 27.2300 43.7765 80.0258 13.2497 26.1105 44.3971 83.3457 11.1692 26.9130 40.9815 83.3549 12.4231 28.3951 40.7992 79.4815 10.8819 25.6199 39.5168 86.9493 11.4397 26.0199 37.4373 65.4550 10.4166 24.0404 42.9898 83.3865 11.4330 26.6570 44.0201 78.4496 13.2752 28.7782

**Table 1.** Estimation errors for Model I and Model II in different simulation runs of the one dimensional

In this part, we investigate the range-free localization of sensors in a network deployed in a

Most existing literatures deal with the general localization problem in two dimensional space. The one dimensional sensor localization problem investigated in the last section falls into this category by fixing the value of sensor positions along one dimension. Localization in applications, such as wildlife monitoring [7], WSN aided robot navigation [6, 19] and animal

<sup>∑</sup>*<sup>n</sup>*

*<sup>i</sup>*=<sup>1</sup> ||*x*ˆ*i*−*xi*||<sup>2</sup> *n*

of estimation error, we use the Root-mean-square error *E*1 defined as *E*1 =

acceptable for rough estimations of sensor positions in applications.

**5.2. Range-free localization in two dimensional Spaces**

tracking [27], can be abstracted as two dimensional localization problems.

localization problem.

*5.2.1. Background*

two dimensional topology.

**Figure 8.** True positions of sensors in a typical simulation run of the two dimensional WSN localization problem.

In the simulation, we consider a 100 <sup>×</sup> <sup>100</sup>*m*<sup>2</sup> square area with 9 beacon sensors uniformly deployed (the beacon sensors are deployed along the perimeter and at the center, with relative coordinates [0, 0]m, [60, 0]m, [120, 0]m, [0, 60], [60, 60], [120, 60], [0, 120], [60, 120], [120, 120] respectively.) and 20 blind sensors randomly deployed (see Fig. 8 for the deployment of sensors in a typical simulation run). The maximum communication range of sensors are chosen as *R* = 50m.

As to the dynamic models, we choose the scaling factors <sup>1</sup> = <sup>2</sup> = 105, the connection weight *wij* equals 5 for connections with a beacon sensor and 1 otherwise for Model I, the relaxation parameter *delta* = 0.5 for Model II and the coefficient *c*<sup>0</sup> = 1 for Model II.

Fig. 9 and Fig. 10 show the time histories of the position estimations by Model I along x-direction and that along y-direction respectively. From the figures we can observe that after a short period of transient, the estimation results converge to constant values. The time histories of the position estimations along x-direction and y-direction estimations by Model II are plotted in Fig. 11 and Fig. 12, respectively. Compared to the transient of Model I, the change of state values in Fig. 11 and Fig. 12 are much milder. The adjustment of values refine the initial estimation with the tendency to even distributions under the communication connectivity constraints. With time elapses, the estimation results by Model II converge. It is worth noting that the ultimate values by Model II shown in Fig 11 and Fig. 12 are not exactly uniformly distributed. This is due to the compromise of the heuristic information driving to even

**Figure 9.** Time history of the position estimation in x-direction by Model I in the two dimensional WSN localization problem.

distribution in space and the inequality constraints imposed by communication connectivity. The final position estimations by Model I and Model II are shown in Fig. 13 and Fig. 14, respectively. It can be observed that the estimated results shown in both figures are within the area covered by the circle centered at the true position with a radius *R* = 50m, which verifies the effectiveness of Model I and Model II in modeling the communication connectivity constraint. On the other hand, it is clear that the estimation results shown in Fig. 14 outperforms the results shown in Fig. 13 thank to introducing heuristic information in Model II. For better comparisons of Model I and Model II for estimating sensor locations in two dimensional scenario, the Root-mean-square error *E*1 defined as *E*1 = <sup>∑</sup>*<sup>n</sup> <sup>i</sup>*=<sup>1</sup> ||*x*ˆ*i*−*xi*||<sup>2</sup> *<sup>n</sup>* and the maximum absolute error *E*2 defined as *E*2 = max*i*=1,2,...,*n*{||*x*ˆ*<sup>i</sup>* − *xi*||}, both of which are the same as the definition in the one dimensional case, are used to evaluate the estimation error. Ten independent simulations with random initializations are performed and the estimation errors are calculated for all runs. As shown in Table 2, the error *E*1 is around 20 and the error *E*2 is around *r*0 for Model I with the simulation setup. In contrast, the estimation errors for Model II are about 10 for *E*1 and 20 for *E*2 in the ten simulation runs, which are much lower than the results obtained by Model I and again verifies the advantage of Model II in position estimation.

### **5.3. Discussions**

In the above two subsections, we considered the range-free localization problem in one dimensional case and two dimensional case respectively. In some applications of WSNs, higher dimensional cases [24] (see Fig. 15 for the sketch of a typical three dimensional one

12 Will-be-set-by-IN-TECH

0 0.5 1 1.5 2

time/s

**Figure 9.** Time history of the position estimation in x-direction by Model I in the two dimensional WSN

distribution in space and the inequality constraints imposed by communication connectivity. The final position estimations by Model I and Model II are shown in Fig. 13 and Fig. 14, respectively. It can be observed that the estimated results shown in both figures are within the area covered by the circle centered at the true position with a radius *R* = 50m, which verifies the effectiveness of Model I and Model II in modeling the communication connectivity constraint. On the other hand, it is clear that the estimation results shown in Fig. 14 outperforms the results shown in Fig. 13 thank to introducing heuristic information in Model II. For better comparisons of Model I and Model II for estimating sensor locations in two

maximum absolute error *E*2 defined as *E*2 = max*i*=1,2,...,*n*{||*x*ˆ*<sup>i</sup>* − *xi*||}, both of which are the same as the definition in the one dimensional case, are used to evaluate the estimation error. Ten independent simulations with random initializations are performed and the estimation errors are calculated for all runs. As shown in Table 2, the error *E*1 is around 20 and the error *E*2 is around *r*0 for Model I with the simulation setup. In contrast, the estimation errors for Model II are about 10 for *E*1 and 20 for *E*2 in the ten simulation runs, which are much lower than the results obtained by Model I and again verifies the advantage of Model II in position

In the above two subsections, we considered the range-free localization problem in one dimensional case and two dimensional case respectively. In some applications of WSNs, higher dimensional cases [24] (see Fig. 15 for the sketch of a typical three dimensional one

dimensional scenario, the Root-mean-square error *E*1 defined as *E*1 =

−20

localization problem.

estimation.

**5.3. Discussions**

0

20

40

60

x/meters

80

100

120

140

x 10−5

<sup>∑</sup>*<sup>n</sup>*

*<sup>i</sup>*=<sup>1</sup> ||*x*ˆ*i*−*xi*||<sup>2</sup>

*<sup>n</sup>* and the

**Figure 10.** Time history of the position estimation in y-direction by Model I in the two dimensional WSN localization problem.


Estimation Error of Model I Estimation Error of Model II

**Table 2.** Estimation errors for Model I and Model II in different simulation runs of the one dimensional localization problem.

**Figure 11.** Time history of the position estimation in x-direction by Model II in the two dimensional WSN localization problem.

**Figure 12.** Time history of the position estimation in y-direction by Model II in the two dimensional WSN localization problem.

14 Will-be-set-by-IN-TECH

0 0.5 1 1.5 2

time/s

0 0.5 1 1.5 2

time/s

**Figure 12.** Time history of the position estimation in y-direction by Model II in the two dimensional

**Figure 11.** Time history of the position estimation in x-direction by Model II in the two dimensional

−20

−20

WSN localization problem.

0

20

40

60

y/meters

80

100

120

140

WSN localization problem.

0

20

40

60

x/meters

80

100

120

140

x 10−5

x 10−5

**Figure 13.** Position estimation results by Model I in the two dimensional WSN localization problem.

**Figure 14.** Position estimation results by Model II in the two dimensional WSN localization problem.

**Figure 15.** A typical WSN in normalized three dimensional space.

after normalization along three axial directions), such as building monitoring [35], underwater acoustic sensor networks[2], may be encountered. For example, the localization problem of sensors for building monitoring is actually defined in a three dimensional space since sensors are deployed in two dimensions on each floor and the whole network constructed by sensors on different floors forms a three dimensional one. Also, sensors in the underwater acoustic sensor networks are often deployed at different depth, with different longitude and latitude and thus form a three dimensional sensor network.

The presented two models in this chapter admit the higher dimensional localization problems as we did not specify the number of dimensions in the problem formulation and the model works for all possible dimensions.

As demonstrated in simulations, Model II outperforms Model I in the sense of estimation error for the cases with the same simulation setup. However, it is notable that Model II requires an extra dynamic model for the initialization, which is at the cost of implementation complexity and longer computation time. Fortunately, the dynamic models can be implemented with either digital or analog devices and thus the computation can be completed in a very short time. For example, the simulation examples for the two dimensional localization problem showed that it takes a time of 10−<sup>5</sup> level for the dynamic models to converge. As to the implementation complexity, more hardware devices, such as summators, multipliers, dividers, integrators, etc, are needed to fabricate the analog circuit of Model II than that of Model I.
