**2. Preliminaries**

In this chapter, we assume that all sensors are equipped with communication modules and the locations of beacon sensors are known. Fig. 1 sketches the connectivity topology of a WSN consisting of beacon sensors and blind sensors. In the network, The beacon sensors are those with known locations. The locations can be obtained either by GPS or by pre-deployment. The blind sensors are those without pre-known positions. A sensor can communicate with other sensors within the signal coverage area. The communication links and sensors therefore form a network with sensors as nodes and communication links as edges.

The signal strength at a given distance from the emitter varies due to propagation conditions, material coverage, antenna configurations and battery conditions [31] and the calculated distance according to the received signal strength often has a large error [8, 18]. Nevertheless, the nominal maximum range, which is measured under ideal conditions in open environments without obstacles along the signal propagation route, without material coverage, with a proper configuration of the antenna and with a full power of the battery, etc.,

**Figure 1.** Schematic of a WSN topology in two dimensional space.

2 Will-be-set-by-IN-TECH

costs for extra hardware. Without introducing extra hardware, received signal strength (RSS) based distance measurement method [17, 30], relying on the estimated distance according to the signal strength received from the neighboring sensor, provides a promising direction for self-localization. Another promising self-localization method is range-free localization, which even does not require the information on the signal strength received from the neighbor but the connectivity information, i.e., a sensor only need to know who is its neighbor. This technology implies that localization can be a by-product of communication since connectivity information can be obtained in communication. For example, if Sensor *A* can communicate with Sensor *B*, then we conclude they are connected. Due to this promising property, range-free localization is becoming more and more popular in both practice and research.

Dynamic models gained great success in realtime signal processing [28], robotics [12, 22], online optimization [29], etc.. In this chapter, we overview our previous work on dynamic model based range-free localization [10, 11, 25]. Particularly, we will examine two dynamic models for the real time localization of WSNs. The models are described by nonlinear ordinary differential equations (ODEs). The state value of the ODEs converges to the expected position estimation of sensors. Both of the two models find feasible solutions to the formulated optimization problem. Particularly, the second model, by exploiting heuristic information, has a tendency to converge to better solutions in the sense of localization error. The real time processing ability of the models allows possible movement of the sensor nodes, which often happens in mobile sensor networks [23]. Besides the real time localization capability, another prominent feature of the proposed models is that both of them are completely distributed, i.e., each sensor in the network only need to exchange information with its neighbor and thus no message passing is needed in the network. This advantage makes the proposed algorithms

The remainder of this paper is organized as follows. In Section 2, some preliminaries on range-free localization of WSNs are presented. In Section 3, we formulate the localization problem from an optimization perspective. Two dynamic models are presented in Section 4 to solve the formulated optimization problems. In Section 5, simulations are performed to

In this chapter, we assume that all sensors are equipped with communication modules and the locations of beacon sensors are known. Fig. 1 sketches the connectivity topology of a WSN consisting of beacon sensors and blind sensors. In the network, The beacon sensors are those with known locations. The locations can be obtained either by GPS or by pre-deployment. The blind sensors are those without pre-known positions. A sensor can communicate with other sensors within the signal coverage area. The communication links and sensors therefore

The signal strength at a given distance from the emitter varies due to propagation conditions, material coverage, antenna configurations and battery conditions [31] and the calculated distance according to the received signal strength often has a large error [8, 18]. Nevertheless, the nominal maximum range, which is measured under ideal conditions in open environments without obstacles along the signal propagation route, without material coverage, with a proper configuration of the antenna and with a full power of the battery, etc.,

In this chapter, we investigate the range-free localization of WSNs.

scalable to large scale networks involving thousands of sensors or more.

demonstrate the effectiveness of our method. Section 6 concludes this paper.

form a network with sensors as nodes and communication links as edges.

**2. Preliminaries**

**Figure 2.** Range-free localization in environments with obstacles.

gives an upper bound on the distance between the emitter and receiver pair. As depicted in Fig. 2. Subfigure (a) depicts the ideal open environment, where the communication radius, denoted by *R* in the figure, equals the nominal maximum range. In this situation, both the point *A* and the point *B* are within the communication range of the sensor located at point *C* and therefore the distance from the sensor to *A* and that to *B* are both less than *R*. In the situation with the presence of obstacles (shown as trees in the subfigure (b)), the signal covered area shrinks and some positions, such as the point *B* in the subfigure (b), even with a distance less than *R* to the sensor, cannot be covered by the signal. Therefore, *d*1, which is the distance from the sensor to point *A*, is less than *R* if the sensor located at *A* can detect the signal.

### **3. Problem formulation**

In this section, we present the mathematical formulation of the problem.

### **3.1. Nonlinear inequality problem formulation**

As discussed in Section 2, the position of beacon sensors are known and the distance between two neighbor sensor (in the sense of communication) is less than *R*, which is the nominal maximum communication range. In equation, we have

$$(\mathbf{x}\_i - \mathbf{x}\_j)^T (\mathbf{x}\_i - \mathbf{x}\_j) \le \mathbb{R}^2 \quad \text{for} \, i \in \mathbb{N}(j) \tag{1a}$$

$$\mathfrak{x}\_{k} = \bar{\mathfrak{x}}\_{k} \quad \text{for } k \in \mathbb{B} \tag{1b}$$

where **B** is the beacon sensor set, *xi*, *xj* represent the position of the *i*th sensor and the *j*th sensor, respectively, *R* is the maximum communication range of sensors, **N**(*j*) denotes the *j*th sensor's neighbor set, which includes all sensors connected to it via communication, **B** is the beacon sensor set, *x*¯*<sup>k</sup>* is the true position of the *k*th beacon sensor.

**Remark 1.** *There is no explicit objective function but inequality and equality constraints in problem (1). The solution to this problem is generally not unique. We are more concerned with finding a feasible solution in real time instead of finding all the feasible solutions. Based on this consideration, we explore finding a feasible solution to problem (1) in real time via a dynamic model.*

### **3.2. Optimization problem formulation**

To find a feasible solution of problem (1) numerically, we first transform the problem into an optimization problem and employ dynamic evolutions to solve it.

The solution of problem (1) is identical to the one of the following normal optimization with an explicit objective function,

$$\text{minimize } \sum\_{i=1}^{n} \sum\_{j \in \mathbb{N}(i)} w\_{lj} \max \{ (\mathbf{x}\_i - \mathbf{x}\_j)^T (\mathbf{x}\_i - \mathbf{x}\_j) - \mathbf{R}^2, 0 \}$$

$$\text{subject to} \quad \mathbf{x}\_k = \mathbf{x}\_k \quad \text{for} \, k \in \mathbb{B} \tag{2}$$

where *n* denotes the number of sensors, *wij >* 0 is the weight of the connection between the *i*th and the *j*th sensor. Note that the problem (2) is a non-smooth optimization problem due to the presence of the function max(·).

### **4. Solving the problem via nonlinear dynamic evolution**

In this section, we present two ODE models, both of which are able to solve the range-free localization problem (2). As the solution to the problem is generally not unique. Property employment of heuristic information may improve the solution performance. Based on the feasible solution obtained by the first ODE model, the second ODE model proposed in this chapter indeed realizes the improvement in performance.

### **4.1. Model I**

The partial sub-gradient relative to *xi* of the objective function switches between <sup>4</sup> <sup>∑</sup>*j*∈**N**(*i*)(*xi* <sup>−</sup> *xj*) and 0 at the critical point (*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>−</sup> *<sup>R</sup>*<sup>2</sup> <sup>=</sup> 0. For smooth arbitration, we use the following dynamic evolution to find a feasible solution of the optimization problem (2),

$$\dot{\mathfrak{x}}\_{i} = -\varepsilon\_{1} \sum\_{j \in \mathbb{N}(i)} w\_{ij} I\_{lj}(\mathfrak{x}\_{i} - \mathfrak{x}\_{j}) \tag{3}$$

where *xi* is the position estimation of the blind sensor labeled *i*, which is initialized randomly, *�*<sup>1</sup> *>* 0 is a scaling factor, *wij* is a positive weight, *Iij* is an indicator function defined as follows:

$$I\_{ij} = \begin{cases} 1 & \text{if } (\mathbf{x}\_i - \mathbf{x}\_j)^T (\mathbf{x}\_i - \mathbf{x}\_j) - \mathbf{R}^2 > 0 \\ 0 & \text{if } (\mathbf{x}\_i - \mathbf{x}\_j)^T (\mathbf{x}\_i - \mathbf{x}\_j) - \mathbf{R}^2 \le 0 \end{cases} \tag{4}$$

In the ODE model, each blind sensor is associated with a dynamic module. The modules interact with their neighbor modules and all the modules together perform the localization task and solve the problem (1). The dynamic evolution of *xi* in the system (3) depends on its neighbor values *xj* for *j* ∈ **N**(*i*). In detail, the neighbor *xj* has an action −*�*<sup>1</sup> *Iij*(*xi* − *xj*) on *xi*. This action term is analogous to a force pointing from *xi* to *xj* and pulling *xi* to *xj* with an amplitude *�*<sup>1</sup> or 0 respectively when �*xi* − *xj*� *> R* or �*xi* − *xj*� ≤ *R*. This negative feedback mechanism guides position estimations of neighbor sensors to aggregate to within the maximum range *R*.

Notably, the ODE model (3) is a distributed one. Communication only happens between neighboring sensors. No routing or cross-hop communication is required for the implementation of the ODE model. The distributed nature of the model thoroughly reduces the communication burden and makes the method scalable to a network with a large number of sensors involved.

About the ODE model I (3), we have the following theorem,

**Theorem 1** ([25])**.** *The ODE model I (3) with �*<sup>1</sup> *>* 0*, wij for all possible i and j, asymptotically converges to a feasible solution x*∗ *<sup>i</sup> (for all i in the blind sensor set) of problem (1).*

The proof of this theorem is based on Lyapunov stability theory. Interested readers are refereed to our previous work [10, 25] for a detailed proof. This theorem reveals that the ultimate output of the ODE model I is a feasible solution to problem (1).

### **4.2. Model II**

4 Will-be-set-by-IN-TECH

where **B** is the beacon sensor set, *xi*, *xj* represent the position of the *i*th sensor and the *j*th sensor, respectively, *R* is the maximum communication range of sensors, **N**(*j*) denotes the *j*th sensor's neighbor set, which includes all sensors connected to it via communication, **B** is the

**Remark 1.** *There is no explicit objective function but inequality and equality constraints in problem (1). The solution to this problem is generally not unique. We are more concerned with finding a feasible solution in real time instead of finding all the feasible solutions. Based on this consideration, we explore*

To find a feasible solution of problem (1) numerically, we first transform the problem into an

The solution of problem (1) is identical to the one of the following normal optimization with

where *n* denotes the number of sensors, *wij >* 0 is the weight of the connection between the *i*th and the *j*th sensor. Note that the problem (2) is a non-smooth optimization problem due to

In this section, we present two ODE models, both of which are able to solve the range-free localization problem (2). As the solution to the problem is generally not unique. Property employment of heuristic information may improve the solution performance. Based on the feasible solution obtained by the first ODE model, the second ODE model proposed in this

The partial sub-gradient relative to *xi* of the objective function switches between <sup>4</sup> <sup>∑</sup>*j*∈**N**(*i*)(*xi* <sup>−</sup> *xj*) and 0 at the critical point (*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>−</sup> *<sup>R</sup>*<sup>2</sup> <sup>=</sup> 0. For smooth arbitration, we use the following dynamic evolution to find a feasible solution of the

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

*<sup>x</sup>*˙*<sup>i</sup>* = −<sup>1</sup> ∑

*wij*max{(*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>−</sup> *<sup>R</sup>*2, 0}

subject to *xk* = *x*¯*<sup>k</sup>* for *k* ∈ **B** (2)

*wijIij*(*xi* − *xj*) (3)

(*xi* <sup>−</sup> *xj*)*T*(*xi* <sup>−</sup> *xj*) <sup>≤</sup> *<sup>R</sup>*<sup>2</sup> for*<sup>i</sup>* <sup>∈</sup> **<sup>N</sup>**(*j*) (1a)

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

maximum communication range. In equation, we have

beacon sensor set, *x*¯*<sup>k</sup>* is the true position of the *k*th beacon sensor.

*finding a feasible solution to problem (1) in real time via a dynamic model.*

optimization problem and employ dynamic evolutions to solve it.

*n* ∑ *i*=1

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

**4. Solving the problem via nonlinear dynamic evolution**

chapter indeed realizes the improvement in performance.

**3.2. Optimization problem formulation**

minimize

an explicit objective function,

the presence of the function max(·).

**4.1. Model I**

optimization problem (2),

Section 4.1 provides an ODE model to find a feasible solution of the problem. The model presented in this part is also a dynamic ODE model. Different from Model I, which is initialized randomly and does not use any heuristic information, Model II is initialized with the ultimate output of Model I with *R* replaced by *R* − *δ* in (4) with *δ* � *R* and takes advantages of heuristic information to result in sensor position estimations with inclination to uniformly distribution. We first define the following optimization problem to incorporate heuristic information,

$$\begin{aligned} \text{minimize} & \qquad \sum\_{i=1}^{n} \sum\_{j \in \mathbb{N}(i)} (\mathbf{x}\_{i} - \mathbf{x}\_{j})^{T} (\mathbf{x}\_{i} - \mathbf{x}\_{j}) \\ & - c\_{0} \sum\_{i=1}^{n} \sum\_{j \in \mathbb{N}(i)} \log \left( R^{2} - (\mathbf{x}\_{i} - \mathbf{x}\_{j})^{T} (\mathbf{x}\_{i} - \mathbf{x}\_{j}) \right) \\ & \qquad \pi \quad \text{for } \mathbf{x}\_{i} \text{ in } \mathbf{n} \end{aligned} \tag{5a}$$

$$
\mathfrak{x}\_k = \mathfrak{x}\_k \quad \text{for} \, k \in \mathbb{B} \tag{5b}
$$

where **B** is the beacon sensor set, *xi* is initialized with the ultimate output of (3) with *R* replaced by *R* − *δ* in (4). *c*<sup>0</sup> *>* 0 is a coefficient. Note that the first term in (5a) contributes to the

#### 6 Will-be-set-by-IN-TECH 294 Wireless Sensor Networks – Technology and Protocols

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 given in (1). This term works to restrict the solution in the feasible set.

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

$$\begin{aligned} \dot{\mathbf{x}}\_{i} &= -\varepsilon\_{2} \sum\_{j \in \mathbb{N}(i)} \left( 1 + \frac{c\_{0}}{R^{2} - (\mathbf{x}\_{i} - \mathbf{x}\_{j})^{T}(\mathbf{x}\_{i} - \mathbf{x}\_{j})} \right) (\mathbf{x}\_{i} - \mathbf{x}\_{j}) \\ \mathbf{x}\_{k} &= \bar{\mathbf{x}}\_{k} \quad \text{for } k \in \mathbb{B} \\ \mathbf{x}\_{i}(0) &= \mathbf{x}\_{i}^{\prime} \end{aligned} \tag{6}$$

where *xi* is the position estimation of the *i*th blind sensor, *x*� *<sup>i</sup>* is the ultimate output of Model I (3) with *R* replaced by *R* − *δ*, i.e., the solution of *xi* obtained by solving (2) with *R* replaced by *R* − *δ* in (4). The expression *xi*(0) = *x*� *<sup>i</sup>* means that *xi* is initialized with *x*� *i* . *�*<sup>2</sup> *>* 0 is a scaling factor and *c*<sup>0</sup> *>* 0 is a positive constant.

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 only happens between neighbor sensors.

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

**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 solution always stays inside the feasible region.*

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

$$\left(\left(\mathbf{x}\_{i} - \mathbf{x}\_{j}\right)^{T}\left(\mathbf{x}\_{i} - \mathbf{x}\_{j}\right) \le \left(\mathbf{R} - \delta\right)^{2} \quad \text{for} \; i \in \mathbb{N}(j) \tag{7a}$$

$$\mathfrak{x}\_{k} = \bar{\mathfrak{x}}\_{k} \quad \text{for } k \in \mathbb{B} \tag{7b}$$

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 of the barrier term *<sup>c</sup>*<sup>0</sup> *<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) with an initialization inside the feasible set will still stay inside this set. We have the following theorem to state this point rigourously,

**Theorem 2** ([11])**.** *The ODE model II (6) with �*<sup>2</sup> *>* 0*, c*<sup>0</sup> *>* 0*, initialized with x*� *i , which is the ultimate output of the ODE model I (3) with R replaced by R* − *δ in (4) with δ* � *R, stays in the open set constructed by (1).*

### **5. Simulations**

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

**Figure 3.** A schematic description of WSNs for highway monitoring.
