You are on page 1of 5

Genetic Algorithm for Energy Efcient Clusters in

Wireless Sensor Networks


Sajid Hussain, Abdul W. Matin and Obidul Islam
Jodrey School of Computer Science, Acadia University
Wolfville, Nova Scotia, Canada
{Sajid.Hussain, 073720m, 079885i}@acadiau.ca
AbstractWe use a genetic algorithm (GA) to create energy
efcient clusters for routing in wireless sensor networks. The
simulation results show that the proposed intelligent hierarchical
clustering technique is more energy efcient than a few existing
cluster-based routing protocols. Further, the gradual energy
depletion in sensor nodes is also investigated.
I. INTRODUCTION
Recently, Wireless Sensor Networks (WSNs) are becom-
ing an essential part of many application environments that
are used in military and civilians. The key applications of
WSN are habitat monitoring, target tracking, surveillance,
and security management [1] [2]. The application of WSN
consists of small sensor nodes that are low-cost, low-power
and multi-functional. These small sensor nodes communicate
within short distances. Since energy consumption during com-
munication is a major energy depletion factor, the number of
transmissions must be reduced to achieve extended battery life
[3] [4].
Cluster-based approaches are suitable for continuous mon-
itoring applications [5], [6]. For instance, Heinzelman et al.
[6] describe the LEACH protocol, which is a hierarchical self-
organized cluster-based approach for monitoring applications.
The data collection area is randomly divided into several
clusters, where the number of clusters are pre-determined.
Based on time division multiple access (TDMA), the sensor
nodes transmit data to the cluster heads, which aggregate and
transmit the data to the base station. Bandyopadhyay and
Coyle [5] describe a multi-level hierarchical clustering algo-
rithm, where the parameters for minimum energy consumption
are obtained using stochastic geometry.
Hussain and Matin [7], [8] propose a hierarchical cluster-
based routing (HCR) protocol where nodes self-organize into
clusters and each cluster is managed by a set of associates
called head-set. Using round-robin technique, each associate
acts as a cluster head (CH). The sensor nodes transmit data
to their cluster heads, which transmit the aggregated data
to the base station. Moreover, the energy-efcient clusters
are retained for a longer period of time; the energy-efcient
clusters are identied using heuristics-based approach. We
improve the HCR protocol by using a Genetic Algorithm (GA)
to determine the number of clusters, the cluster heads, the
cluster members, and the transmission schedules.
Jin et. al [9] have also used GA for energy optimization
in wireless sensor networks. In their work, GA allowed the
formation of a number of pre-dened independent clusters
which helped in reducing the total minimum communication
distance. Their results showed that the number of cluster-heads
is about 10% of the total number of nodes. The pre-dened
cluster formation also decreased the communication distance
by 80% as compared with the distance of direct transmission.
Ferentionos et. al [10] extended the attempts proposed by
Jin et. al [9] by improving the GA tness function. The
focus of their work is based on the optimization properties
of genetic algorithm. However, we use GA to determine the
energy efcient clusters and then cluster heads choose their
associates for further improvement. Finally, to increase the
overall performance, simple heuristics are used to retain a few
energy efcient clusters for a longer duration than the other
ones.
In this paper, we use a radio model described in [6]. In this
model, for a short range transmission such as within clusters,
the energy consumed by a transmit amplier is proportional
to d
2
, where d is the distance between nodes. However, for
a long range transmission such as from a cluster head to the
base station, the energy consumed is proportional to d
4
. Using
the given radio model, the energy consumed E
T
ij
to transmit
a message of length l bits from a node i to a node j is given
by Equation 1 and Equation 2 for long and short distances,
respectively.
E
T
ij
= lE
e
+l
l
d
4
ij
(1)
E
T
ij
= lE
e
+l
s
d
2
ij
(2)
Moreover, E
R
, the energy consumed in receiving the l-bit
message, is given by:
E
R
= lE
e
+lE
BF
(3)
where E
BF
represents the cost of beam forming approach
to reduce the energy consumption. The constants used in
the radio model are as follows: a) energy consumed by the
amplier to transmit at a shorter distance is
s
= 10 pJ/bit/m
2
,
b) energy consumed by the amplier to transmit at a longer
distance is
l
= 0.0013 pJ/bit/m
4
, c) energy consumed in the
electronics circuit to transmit or receive the signal is E
e
= 50
nJ/bit, and d) energy consumed for beam forming E
BF
= 5
nJ/bit.
The remainder of this paper is organized as follows: Section
II describes the proposed technique of GA-based intelligent
hierarchical clusters. Section III discusses the simulation and
Section IV provides the results and discussion. Finally, Section
V concludes the paper and provides a few directions for the
future work.
II. INTELLIGENT HIERARCHICAL CLUSTERS
The HCR protocol [7], [8] is enhanced by using GA to
create energy-efcient clusters for a given number of transmis-
sions. The GA outcome identies the suitable cluster heads for
the network. The base station assigns member nodes to each
cluster head using the minimum distance strategy. The base
station broadcasts the complete network details to the sensor
nodes. The broadcast message includes: the number of cluster
heads, the members associated with each cluster head, and the
number of transmissions for this conguration. All the sensor
nodes receive these packets transmitted by the base station and
clusters are congured accordingly; this completes the cluster
formation phase. Next comes the data transfer phase, where
nodes transmit messages to their cluster heads for a given
number of transmissions.
The WSN nodes are represented as bits of a chromosome.
The head and member nodes are represented as 1s and 0s
respectively. The tness of a chromosome is determined by
several parameters, such as node density and energy consump-
tion. A population consists of several chromosomes and the
best chromosome is used to generate the next population. For
the initial population, a large number of random cluster heads
are chosen. Based on the survival tness, the population trans-
forms into the future generation. A sensor node is represented
as a bit that can be 0 or 1. A network of m nodes is represented
by a chromosome of m bits. The tness of a chromosome is
designed to minimize the energy consumption and to extend
the network life time. A few tness parameters are described
in this section.
1) Direct Distance (D) to Sink: The direct distance, D, to
sink is the sum of all distances from sensor nodes to the sink.
This distance is dened as follows:
D =
m

i=1
d
is
(4)
where d
is
is a distance from the node i to the sink node s. For
a larger network, this distance should be minimized; otherwise,
the energy of most of the nodes will be wasted. However, for
a smaller network that has a few closely located nodes, direct
transfer to sink may be an acceptable option.
2) Cluster Distance (C): The cluster distance, C is the sum
of the distances from the nodes to the cluster head and the
distance from the head to the sink. For a cluster with k member
nodes, the cluster distance C is dened as follows:
C =
k

i=1
d
ih
+d
hs
(5)
where d
ih
is the distance from node i to the cluster head h
and d
hs
is the distance from the cluster head h to the sink
node s. For a cluster that has more number of nodes and the
nodes are widely spaced, the cluster distance will be higher.
For a reduced energy consumption, C should not be too large.
This metric will assist in producing the smaller and identical
clusters.
3) Cluster Distance - Standard Deviation (SD): For uni-
form spatial distribution of sensor nodes, the variation in the
cluster distances should be small. However, for non-uniform
spatial distribution, the optimum cluster distances must not
be necessarily same. The variation in cluster distances should
be tuned according to the deployment information. If the
deployment is uniform, the variation in cluster distances will
be a strong indicator of optimum clusters; however, for random
deployment, the variation in cluster distances will be a weak
indicator. The cluster distances, SD, is computed as follows:
SD =

1
h
h

i=1
( d
cluster
i
)
2
(6)
where
=

h
i=1
d
cluster
i
h
(7)
4) Transfer Energy (E): Transfer energy, E, represents the
energy consumed to transfer the aggregated message from the
cluster to the sink. For a cluster with k member nodes, cluster
transfer energy is dened as follows:
E =
k

j=1
E
T
jh
+k E
R
+E
T
hs
(8)
The rst part of Equation 8 shows the energy consumed to
transmit messages from k member nodes to the cluster head.
The second part shows the energy consumed by the cluster
head to receive k messages from the member nodes. Finally,
the third part represents the energy needed to transmit from
the cluster head to the sink.
5) Number of Transmissions (T): For each data transfer
stage, the base station assigns the number of transmissions
T. The value of T is adjusted according to the network
conditions and current energy levels. Moreover, larger values
of T indicate that the outcome of GA algorithm will be used
for a longer period of time. The quality of best chromosome
is determined from the history of previous GA solutions.
A. Fitness Function
The chromosome tness, F, which is a function of all the
above tness parameters, is dened as follows:
F =

i
(w
i
, f
i
), f
i
{C, D, E, SD, T} (9)
The initial tness parameters are assigned arbitrary weights,
w
i
. However, later on, after every generation, the best t chro-
mosome is evaluated and the weights for tness parameters are
updated as follows:
w
i
= w
i1
+c
i
f
i
(10)
where f represents the change in the tness parameter value,
f
i
= f
i
f
i1
, and c
i
=
1
1+e
f
i1
.
After every generation, the best t chromosome is evaluated
to assess the improvement in the tness parameters such
as cluster size, percentage headers, energy consumption and
the standard deviation (with respect to distance). Further, the
suitable range of initial weights can be determined during
simulation, as discussed in Section IV.
III. SIMULATION
Fig. 1. An interaction window with the user.
Figure 1 shows a graphical user interface of the simulator.
The simulation parameters can be adjusted dynamically by
using the input text elds of the graphical interface. The
output has two sections: a list of chromosomes (on the left
side) and a graphical display of the network conguration
(on the right side). The list shows the entire population of
the last generation, where the best chromosome is initially
selected. The network conguration of the best chromosome
is shown on the right side. A user can browse through the
entire population to view the graphical representation of all
the chromosomes. The list shows the status of energy, number
of headers, number of unassigned nodes, number of member
nodes, tness value, number of active nodes, cluster distance,
and the sequence of 0s and 1s.
In the network visualization, the clusters are distinguished
by different shapes (with different colors). The cluster heads
are shown as lled shapes and members are shown as hollow
shapes. The sink is shown as a lled circle in the right most
direction. In the simulation, three types of layouts are used:
a) random, 2) grid, and 3) cluster grid.
IV. RESULTS AND DISCUSSIONS
The GA-based protocol is compared with other cluster-
based protocols such as LEACH [6]. The experiments use 200
nodes (N), network area of 100100 m
2
denoted as M, and
base station is 200m away from the network.
Figure 2 illustrates the graphs that assist in determining
the suitable range for initial weights. The graphs show the
number of transmissions obtained with respect to weights of
a particular tness parameter, while the remaining parameters
are disabled. We have simplied the model by assuming that
10 20 30 40 50 60 70 80 90 100
0
2
4
6
8
10
Percentage of Alive Nodes
N
u
m
b
e
r

o
f

C
l
u
s
t
e
r
s
10 20 30 40 50 60 70 80 90 100
0
2
4
6
8
10
Percentage of Alive Nodes
N
u
m
b
e
r

o
f

C
l
u
s
t
e
r
s
a) Random Layout
b) Fixed Layout
Fig. 3. Number of clusters with respect to percentage of alive nodes.
the individual impact would be comparable in the combined
tness function. The suitable range is determined when the
number of transmissions are relatively higher.
Figure 3 shows the graphs of the variation in the number
of clusters in the network life time, for two types of nodes
layouts: grid and random. As expected, the number of clusters
are higher when most of the nodes are alive. On the average,
the number of clusters vary between 4 8% when more than
50% of nodes are alive. However, there are spikes due to the
random nature of GA evolution process.
0 1000 2000 3000 4000 5000 6000 7000 8000
0
25
50
75
100
Number of Transmissions
P
e
r
c
e
n
t
a
g
e

o
f

A
l
i
v
e

N
o
d
e
s
0 1000 2000 3000 4000 5000 6000 7000 8000
0
2
4
6
8
10
12
14
Number of Transmissions
E
n
e
r
g
y
Random Layout
Grid Layout
Random Layout
Grid Layout
a) Nodes decay with increase in trasnmissions
b) Energy Consumed per cluster formation
Fig. 4. Alive nodes with respect to transmissions.
Figure 4 (a) shows the graphs of percentage alive nodes with
respect to the number of transmissions for grid and random
layouts. Moreover, the initial weights were tuned based on
the ranges as shown in Fig. 2. The graphs show that the
performance is independent of the network layout.
Figure 4 (b) shows the graphs of the variation in the energy
consumption per cluster formation during the network life
time, for random and grid layouts. The graphs show the
consumed energy with respect to the number of transmissions.
0 0.2 0.4 0.6 0.8 1
5900
6000
6100
6200
6300
6400
6500
6600
0 0.2 0.4 0.6 0.8 1
3000
3500
4000
4500
5000
5500
6000
6500
0 0.1 0.2 0.3 0.4
3000
3500
4000
4500
5000
5500
6000
0 0.02 0.04 0.06 0.08 0.1
3000
4000
5000
6000
7000
8000
Weights
N
u
m
b
e
r

o
f

T
r
a
n
s
m
i
s
s
i
o
n
s
a) Transfer Distance parameter
b) Energy parameter
c) Headers Percentage parameter d) Standard Deviation parameter
Fig. 2. Number of transmissions with respect to different tness function parameters.
As the number of alive nodes decreases with time, the con-
sumed energy reduces accordingly; there are a fewer nodes
to transmit. Although GA successfully reduces the energy
consumption for most of the times, there are a few cases of
higher energy consumption; this is due to the inherent GA
behavior.
0 1000 2000 3000 4000 5000 6000 7000 8000
20
40
60
80
100
120
140
160
180
200
Number of Transmisssions
P
e
r
c
e
n
t
a
g
e

o
f

A
l
i
v
e

N
o
d
e
s
Our GA
Jin GA
Fig. 5. Comparison between the GA approaches
Figure 5 shows the graphs to compare the performance of
the proposed GA with respect to the GA used in [9]. Although
both graphs show similar performance at the beginning, our
proposed GA can provide more transmissions as compared
to GA in [9]. This improvement is due to additional tness
parameters that include standard deviation of cluster distance,
estimated transfer energy and number of transmissions. These
parameters ensure that the chromosomes (network congura-
tions) that give maximum number of transmissions and re-
duced energy consumption are selected for future generations.
Figure 6 shows the effects of distances on the performance
of HCR and LEACH protocols. Fig. 6 (a) shows the effect
of placing the base station at different distances, for the HCR
protocol. The network size is 100m and the distance from the
base station is varied as 50m, 100m, 200m, and 300m. As
expected, the nodes die more rapidly when the base station
is at further distances. As the distance between base station
and the network decreases, the percentage of alive nodes for
a given number of transmissions increases. Moreover, when
the base station is at 300m, the energy depletion starts at very
early stage. Whereas for nearer base stations, nodes die at later
stage. Furthermore, the performance gain in moving the base
station from 100m to 50m is not signicant. In other words,
a relatively distant base station (say at 100m) can perform
equally well as compared to a very near base station (say at
50m).
Figure 6 (b) shows that HCR performs better than LEACH
for all the distances. Moreover, the impact of base station
distance variation is quite similar for both LEACH and HCR.
Figure 6 (c) shows the effect of network size M when a
base station is at 200m. The network size is varied as 100m,
200m, and 300m. As expected, there are more transmissions
and more nodes are alive for a smaller network.
Figure 6 (d) shows that HCR is more sensitive to the
0 2000 4000 6000 8000
0
25
50
75
100
0 2000 4000 6000 8000
0
25
50
75
100
0 2000 4000 6000
0
25
50
75
100
Transmissions
%

A
l
i
v
e

N
o
d
e
s
0 2000 4000 6000
0
25
50
75
100
50
100
200
300
L50
H50
L200
H200
L300
H300
L100
H100
L200
H200
M=100
M=200
M=300
a) BS Distances with HCR
b) BS Distances with LEACH & HCR
c) Network Size with HCR
d) Network Size with LEACH & HCR
Fig. 6. Distances from base station and the network size.
network size as compared to LEACH. When a network size is
changed from 200m to 100m. There is a minimal difference
in LEACH performance; however, for the same change in
network size, there is a signicant performance gain for HCR.
V. CONCLUSION AND FUTURE WORK
Our proposed intelligent energy-efcient hierarchical clus-
tering protocol performs better than the traditional cluster-
based protocols. The simulation results indicate that using GA-
based hierarchical clusters increase the network life time.
In future we would like to extend the cross layer opti-
mization between query and routing strategies. Moreover, the
work can be extended by including multi-hop communication
between cluster heads. Furthermore, other learning techniques
could be incorporated to determine energy efcient clusters.
REFERENCES
[1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, Wireless
sensor networks: A survey, Computer Networks, vol. 38, no. 4, pp. 393
422, March 2002.
[2] D. Estrin, D. Culler, K. Pister, and G. Sukhatme, Connecting the
physical world with pervasive networks, IEEE Pervasive Computing,
pp. 59 69, January-March 2002.
[3] V. Mhatre, C. Rosenberg, D. Koffman, R. Mazumdar, and N. Shroff, A
minimum cost heterogeneous sensor network with a lifetime constraint,
IEEE Transactions on Mobile Computing (TMC), vol. 4, no. 1, pp. 4
15, 2005.
[4] N. Trigoni, Y. Yao, A. Demers, J. Gehrke, and R. Rajaramany,
Wavescheduling: Energy-efcient data dissemination for sensor net-
works, in Proceedings of the International Workshop on Data Manage-
ment for Sensor Networks (DMSN), in conjunction with the International
Confernece on Very Large Data Bases (VLDB), August 2004.
[5] S. Bandyopadhyay and E. J. Coyle, An energy efcient hierarchical
clustering algorithm for wireless sensor networks. in Proceedings of the
IEEE Conference on Computer Communications (INFOCOM), 2003.
[6] W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan, Energy-
efcient communication protocol for wireless microsensor networks, in
Proceedings of the Hawaii International Conference on System Sciences,
January 2000.
[7] S. Hussain and A. W. Matin, Base station assisted hierarchical cluster-
based routing, in Proceedings of the International Conference on
Wireless and Mobile Communications (ICWMC). IEEE Computer
Society, July 2006.
[8] A. W. Matin and S. Hussain, Intelligent hierarchical cluster-based
routing, in Proceedings of the International Workshop on Mobility and
Scalability in Wireless Sensor Networks (MSWSN) in IEEE International
Conference on Distributed Computing in Sensor Networks (DCOSS),
June 2006, pp. 165172.
[9] S. Jin, M. Zhou, and A. S. Wu, Sensor network optimization using a
genetic algorithm, in Proceedings of the 7th World Multiconference on
Systemics, Cybernetics and Informatics, 2003.
[10] K. P. Ferentinos, T. A. Tsiligiridis, and K. G. Arvanitis, Energy opti-
mization of wirless sensor networks for environmental measurements,
in Proceedings of the International Conference on Computational Intel-
ligence for Measurment Systems and Applicatons (CIMSA), July 2005.

You might also like