CHAPTER 1 Introduction
1.3 Thesis Organization
The remaining parts of this paper are organized as follows. Some related works are introduced in Chapter 2. The proposed three approaches with some examples given to illustrate them are stated respectively in Chapters 3, 4 and 5. Experimental results for demonstrating the performance of the proposed algorithms are described in Chapter 6. Conclusions and future works are given in Chapter 7.
CHAPTER 2
Review of Related Works
In this section, some related works are reviewed. They include the Weighted Clustering Algorithm (WCA) proposed for mobile ad hoc networks [3][4], the fitness function of lifetime evaluation [23], the PSO approach [6][7] and using the PSO to allocate multiple base stations [14]. They are modified and applied in the proposed algorithms below.
2.1 Review of the Weighted Clustering Algorithm
Along with the advances of internet and communication technology, mobile ad hoc networks (MANETs) have attracted extensive research efforts in recent years. In the past, Chatterjee et al. proposed the weighted clustering algorithm (WCA) for identifying cluster heads in mobile ad-hoc networks [3][4]. A mobile ad hoc network can be modeled as composing of nodes and links, which is usually represented by a graph , where V represents the set of nodes and E represents the set of links. They assume the transmission radius for all nodes are the same. The following
) , ( EV G=
v v
v v
v w w D w M w T
W = 1Δ + 2 + 3 + 4 ,
where v is the serial number (ID) of a mobile node, △v is the degree difference of node v, Dv is the sum of the distances between v and its neighbors, Mv is the mobility speed of node v, Tv is the cumulative time in which node v acted as a cluster head, and wi is the weighted coefficient for the i-th factor. The degree of a node v is the number of nodes within its transmission radius, not including itself. The degree difference is thus the difference between the degree of a node v and a predefined ideal node number M in a cluster. Wv is used to determine the goodness of a node as a cluster head. The lower the Wv value is, the better v acts as a cluster head. The details of the weighted clustering algorithm are described below:
The Weighted Clustering Algorithm:
Input: A set of sensor nodes, each with the same transmission radius Rv, its individual cumulative time Tv and mobility speed Mv, the predefined ideal node number M in a cluster, and the four coefficients w1 to w4.
Output: A set of cluster heads with its neighbors.
Step 1: Find the neighbors N(v) of each node v, where a neighbor is a node with its distance with v within the transmission radius Rv. That is:
≤
=
Calculate the degree dv of node v as the number of the neighbors of v.
Step 2: Compute the degree difference △v as dv−M for every node v.
Step 3: Compute the sum Dv of the distances between node v with all its neighbors. That is:
Step 4: Compute the mobility speed of every node v by the following formula:
( ) ( )
Step 5: Find the cumulative time Tv in which node v has acted as a cluster head. A larger Tv value with node v implies that it has spent more resources (such as energy).
Step 6: Calculate the combined weight Wv =w1Δv +w2Dv+w3Mv +w4Tv for every
node v.
Step 7: Choose the node with a minimum Wv as the cluster head.
Step 8: Eliminate the chosen cluster head and its neighbors from the set of original sensor nodes.
Step 9: Repeat Steps 1 to 8 for the remaining nodes until each node is assigned to a cluster.
After Step 9, all the mobile nodes can be grouped into several clusters, and each cluster has its cluster head. Sensor networks in general have more constraints (such as the energy) than traditional networks. In this paper, we will modify the weighted clustering algorithm such that it can be used in sensor networks with their specific constraints considered [12].
2.2 Review of the Lifetime Evaluation
A fundamental problem in wireless sensor networks is to maximize the system lifetime under some given constraints. Pan et al. proposed two algorithms to find the optimal locations of base stations in two-tiered wireless sensor networks [20]. The first algorithm was used to find the optimal locations of base stations for homogenous ANs, and the second one was used for heterogeneous ANs. Homogenous ANs had the same data transmission rate and heterogeneous ANs might have different data transmission rates. In their paper, only the energy in ANs was considered. If a single SN ran out of energy, its corresponding AN might still have the capability to collect enough information. However, if an AN ran out of energy, the information in its coverage range would be completely lost, which was dangerous to the whole system.
Let d be the Euclidean distance from an AN to a BS, and r be the data
transmission rate. Pan et al. adopted the following formula to calculate the energy consumption per unit time:
) (
) ,
(r d r dn
p = α1 +α2 ,
where α1 is a distance-independent parameter and α2 is a distance-dependent parameter. The energy consumption is thus related to the Euclidean distance and the data transmission rate.
Pan et al. first assumed each AN had the same α1, α2 and initial energy. For homogenous ANs, they showed that the center of the minimal circle covering all the ANs was the optimal BS location (with the maximum lifetime). They then tried to find the optimal BS location for heterogeneous ANs, which had different transmission rates. When the transmission rates (ri) in the ANs were different, the optimal BS location could not be determined by the center of the minimal circle. They thus introduced the concept of stacked planes to solve this problem. They neglected the α1
term and assumed the initial energy was the same for all ANs. The lifetime time li for the i-th AN (ANi) could thus be derived as follows:
in i i
i e r d
l = (0) α2 ,
where ei(0) was the initial energy of ANi, ri was the data transmission rate of ANi and di was the Euclidean distance from ANi to the BS.
2.3 Review of the PSO Approach
The PSO concept originated from the behavior of bird flocking [7]. Suppose there is a group of birds searching for food in an area. Also assume each bird has the instinct of remembering its own location with the most food in its experience. Besides, all the birds can exchange their best experiences to each other and thus learn the location with the most food found so far in the search space. Each bird thus knows both the best location in its experience and the best one from the flock of birds, and will tend to move according to the two locations. The PSO approach thus simulates the mentioned behaviors of bird flocking to find solutions of optimization problems.
When the PSO technique is used to solve a problem, each possible solution in the search space is called a particle, which is similar to a bird mentioned above. All the particles are evaluated by a fitness function, with the values representing the goodness degrees of the solutions. The solution with the best fitness value for a particle can be regarded as the local optimal solution found so far and is stored as the pBest solution for the particle. The best one among all the pBest solutions is regarded as the global optimal solution found so far for the whole set of particles, and is called the gBest solution. In addition, each particle moves with a velocity, which will dynamically change according to pBest and gBest. After finding the two best values, a particle
updates its velocity by the following equation:
) (
() id id
1 1
old id new
id w V c Rand pBest x
V = × + × × − +c2×Rand2()×(gBestd −xid), where the terms are explained below.
1. : the velocity of the i-th particle in the d-th dimension in the next
generation;
Vidnew
2. id : the velocity of the i-th particle in the d-th dimension in the current generation;
Vold
3. pBestid: the current pBest value of the i-th particle in the d-th dimension;
4. gbestd: the current gBest value of the whole set of particles in the d-th dimension;
5. xid: the current position of the i-th particle in the d-th dimension;
6. w: the inertial weight, generally set at 1 [29];
7. c1: the acceleration constant for a particle to move to its pBest, generally set at 2 [7];
8. c2: the acceleration constant for a particle to move to the gBest, generally set at 2 [7];
9. Rand1(), Rand2(): two random numbers between 0 to 1.
After the new velocity is found, the new position for a particle can then be
obtained by the following formula:
new id id
id x V
x = + .
All the particles thus continuously move in the search space, tending to better solutions, until the termination criteria are met. After a lot of generations, an approximate optimal solution is expected to be found. The PSO algorithm is stated below.
The PSO algorithm:
Step 1: Define a fitness function for the problem to be solved.
Step 2: Initialize the fitness values of all pBests and the gBest to zero.
Step 3: Randomly generate a group of n particles, each representing a feasible solution to the problem.
Step 4: Randomly generate an initial velocity for each particle.
Step 5: Calculate the fitness value of each particle according to the fitness function.
Step 6: Replace pBesti with the current i-th particle if the fitness value fitnessi of the i-th particle is better than the fitness value of pBesti.
Step 7: Replace gBest with the best pBest among all the particles if the fitness value of the best pBest is better than the fitness of the gBest.
Step 8: Update the velocity of the i-th particle as:
) (
old ()
new w V c Rand pBest x
Vid = × id + 1× 1 × id − id +c2×Rand2()×(gBestd −xid). Step 9: Update the position of the i-th particle as:
new id old id new
id x V
x = + .
Step 10: Repeat Steps 5 to 9 until the termination conditions are satisfied.
Some common termination conditions used in PSO are generation numbers, computational time limit and solution convergence.
2.4 Review of the PSO Algorithm for Finding Multiple Base Stations
PSO has recently been widely used for solving complex problems. Many researches based on PSO have also been proposed. For example, Hong and Shiu proposed a PSO algorithm for finding the best locations of multiple base stations in a static sensor network, in which the location of each sensor node is fixed and will not be changed [14]. Their approach is stated as follows.
The PSO algorithm for finding the best BS location:
Input: A set of N ANs, each ANj with its location (xj, yj), data transmission rate rj,
initial energy ej(0), parameters αj1 andαj2.
Output: K BS locations that will cause a nearly maximal lifetime in the whole system.
Step 1: Initialize the fitness values of all pBests and the gBest to zero.
Step 2: Randomly generate a group of n particles, each particle representing a possible solution of K base-station locations. Locations may be two-dimensional or three-dimensional, depending on the problems to be solved.
Step 3: Randomly generate an initial velocity for each particle.
Step 4: Calculate the lifetime li(k)j of the j-th AN communicating with the k-th base station in the i-th particle by the following formula:
), (
) 0
( 1 2 ( )
)
( n
j k i j j j j j k
i e r d
l = α +α
where ej(0)is the initial energy, rj is the data transmission rate, αj1 is a distance-independent parameter, αj2 is a distance-dependent parameter of the j-th AN, and is the n-order Euclidean distance from the k-th base
station of the i-th particle to the j-th AN.
nk j
di( )
Step 5: Calculate the maximal lifetime lij of the j-th AN for the i-th particle by the following formula:
} {
( )1 i k j K
ij
Max
kl
l =
=Step 6: Calculate the lifetime of the whole sensor system for the i-th particle as its
fitness value (fitnessi) by the following formula:
Step 7: Set pBesti as the current i-th particle if the value of fitness(i) is larger than the current fitness value of pBesti.
Step 8: Set gBest as the best pBest among all the particles. That is, let: dimension for the i-th particle, is the current velocity of the k-th base
station at the d-th dimension for the i-th particle, w is the inertial weight, c
new the acceleration constant for particles moving to pBest, c2 is the acceleration constant for particles moving to gBest, xi(k)d is the current position of the k-th base station at the d-th dimension for the i-th particle, pBesti(k)d is the value of the k-th base station of pBesti at the d-th dimension, and gBestkd is the value of the k-th base station of gBest at the d-th dimension, Rand1() and Rand2() are
two random numbers among 0 to 1.
Step 10: Update the position of the i-th particle as:
new d k i old
d k i new
d k
i x V
x ( )
) ( )
( = + ,
where and are respectively the new position and the current position of the k-th base station at the d-th dimension for the i-th particle.
new d k
xi() xiold(k)d
Step 11: Repeat Steps 4 to 10 until the termination conditions are satisfied.
In Step 11, the termination conditions may be predefined execution time, a fixed number of generations or when the particles have converged to a certain threshold.
The above PSO approach is used to search for locations of base stations works well when the number of base stations is small, and may converge slowly when the number of base stations is large. Besides, it is designed to find base stations, but not application nodes. In this paper, we will combine the improved weighted clustering algorithm and the PSO approach to determine the application nodes and to find the locations of base stations at the same time.
CHAPTER 3
The Improved Weighted Clustering Algorithm
3.1 The Idea
The WCA algorithm was designed to select cluster heads dynamically in mobile ad hoc networks. As mentioned above, sensor networks in general have more constraints than traditional networks. It is thus not so appropriate to directly apply the WCA algorithm to the sensor networks since it does not take the power energy, the transmission rate, among others into consideration. In this section, we will modify the weighted clustering algorithm such that it can be used in sensor networks with the specific constraints in sensor networks being considered. Especially, we add one more factor about the characteristic of a sensor node into the evaluation formula, such that the nodes chosen as cluster heads may have a better behavior in heterogeneous sensor networks than those without the additional factor. The cluster heads can then act as application nodes in the sensor networks. After a fixed interval of time, the proposed algorithm is then re-run again to find new applications nodes for the purpose of
3.2 The Algorithm
The details of the improved WCA algorithm for heterogeneous sensor networks are stated below.
The improved WCA (IWCA) for heterogeneous sensor networks:
Input: A set of sensor nodes, each with the same transmission radius Rv, its individual cumulative time Tv, mobility speed Mv, transmission rate rv, the initial energy Ev, the constant of amplification c the predefined ideal node number M in a cluster, and the five coefficients w1 to w5.
Output: A set of application nodes with its neighbors.
Step 1: Find the neighbors N(v) of each node v, where a neighbor is a node with its distance with v within the transmission radius Rv. That is:
} ) ' , ( distance
|' { )
(v v v v Rv
N = ≤ .
Calculate the degree dv of node v the number of the elements in N(v).
Step 2: Compute the degree difference △v as |dv – M| for every node v.
Step 3: Compute the sum Dv of the distances between node v with all its neighbors. That is:
∈
∑
Step 4: Compute the mobility speed of every node v by the following formula:
( ) ( )
Step 5: Find the cumulative time Tv in which node v has acted as a cluster head. A larger Tv value with node v implies that it has spent more resources (such as energy).
Step 6: Compute the characteristic Cv of every node v as follows:
v v v
E r C = c* ,
where rv is the transmission rate, Ev is the initial energy and c is a constant for amplification.
Step 7: Calculate the combined weight Wv =w1Δv +w2Dv +w3Mv +w4Tv +w5Cv for every node v.
Step 8: Choose the node with a minimum Wv as the cluster head (application node).
Step 9: Eliminate the chosen cluster head and its neighbors from the set of original sensor nodes.
Step 10: Repeat 1 to 9 for the remaining nodes until each node is assigned to a cluster.
Note that in Step 6, the factor for the characteristic of a node is added to evaluate
the goodness of a node as a cluster head. As an alternative to evaluate the goodness of a node, the factor of the cumulative time can be removed and the initial energy in the characteristic factor of a node can be changed as the remaining energy. This is because the remaining energy of a node partially depends on its cumulative time as a cluster head.
3.3 An Example
A simple example in a two-dimensional space is given to explain how the IWCA can be used to find the application nodes in dynamic wireless sensor networks.
Assume in this example there are totally twelve mobile sensor nodes activated with their initial factors shown in Table 3-1, where “SN” represents the serial number of a sensor node, “Location” represents the coordinate position of an SN, “Radius”
represents the transmission radius, “Mobility” represents the mobility speed, “Time”
represents the cumulative time, “Rate” represents the transmission rate, and “Energy”
represents the initial power energy.
Table 3-1: The initial factors of SNs in this example
SN Location Radius Mobility Time Rate Energy
1 (3,3) 5 2 1 5 7500
2 (4,7) 5 2 2 6 7200
3 (4,12) 5 1 4 6 6600
4 (7,15) 5 1 6 4 8400
5 (11,15) 5 2 0 5 10000
6 (15,20) 5 3 2 4 7600
7 (7,4) 5 4 1 4 9600
8 (11,6) 5 1 1 5 9000
9 (15,4) 5 1 7 5 8500
10 (17,8) 5 0 5 6 9600
11 (18,17) 5 2 2 4 9600
12 (15,15) 5 1 0 5 8000
Besides, some required parameters have to be set for the improved weighted clustering algorithm (IWCA) to work. In this example, the threshold number M is set at 3, which means an application node can ideally handle 3 sensor nodes. The five coefficient values are set as follows: w1=0.5, w2=0.1, w3=0.05, w4=0.05 and w5=0.3 where the summation of the weights is equal to 1. For this example, the proposed algorithm proceeds as follows. Only the first SN is demonstrated to show the execution process.
Step 1: The neighbors of every sensor node v are searched and its degree dv is obtained. The results are shown in Figure 3-1, where the neighbors of SN1 are SN2 and SN7. The degree d1 is thus 2.
19 20
Figure 3-1: The neighbors of each SN in this example
Step 2: The degree difference of every node v is computed by the formula M
dv
v = −
Δ . Assume in this example, M=3. The degree difference of SN1 is
derived as follows: Δ1 = d1−M = 2−3 =1.
Step 3: The sum of the distances Dv between an SN and all its neighbors is calculated.
For SN1, D1=
(
3−4) (
2 + 3−7)
2 +(
3−7) (
2 + 3−4)
2 ≅8.25.Step 4: The mobility speed Mv of every sensor node v is calculated. For example, assume in the past 2 time blocks, SN 1 has moved from the position (1, 1) to
(1, 3) and then to (3, 3). Its mobility speed is calculated as follows:
( ) ( )
1 1 3 1( ) (
3 1 3 3)
22
1 2 2 2 2
1= ⎜⎝⎛ − + − + − + − ⎟⎠⎞=
M .
Step 5: The cumulative time Tv for a node v to act as an application node is obtained.
Assume the cumulative time obtained so far is shown in the column Tv of Table 3-1.
Step 6: The characteristic Cv of every node v is derived. Assume in this example, the constant of amplification c is set at 1000. The characteristic factor for SN1 is calculated as follows:
67
Step 7: The combined weight of each sensor node v is calculated by the formula:
v
After Step 7, all the factor values for the sensor nodes are listed in Table 3-2.
Step 8: The node with a minimum is chosen as the cluster head. It can be observed from Table 3-2 that W
Wv
12 has a minimum combined weight (1.5).
SN12 is thus chosen as an application node. The results are shown as Figure 3-2.
Table 3-2: The factor values of the sensor nodes in this example
Figure 3-2: The first chosen application node with its neighbors
Step 9: The chosen cluster head and its neighbors are thus eliminated from the set of original sensor nodes. The results after SN12 and its neighbors are deleted are shown in Figure 3-3.
19 20
Figure 3-3: The remaining sensor nodes after the first iteration
Step 10: Steps 1 to 9 are repeated for processing the remaining nodes until each node is assigned to a cluster. The final clusters are shown in Figure 3-4. There are totally 4 clusters formed in this example
19 20
Figure 3-4: The final clusters by IWCA
For a comparison, the WCA algorithm is also run for the same example. The
For a comparison, the WCA algorithm is also run for the same example. The