You are on page 1of 77

M.

Tech (ACS), NIT Warangal Page 1



1. INTRODUCTION

Wireless Sensor Networks, with the characteristics of low energy consumption, low cost,
distributed and self organization, have brought a revolution to the information perception.

The wireless sensor network is composed of hundreds of thousands of the sensor nodes
that can sense conditions of surrounding environment such as illumination, humidity, and
temperature. Each sensor node collects data such as illumination, humidity, and
temperature of the area. Each sensor node is deployed and transmits data to base station
(BS). The wireless sensor network can be applied to variable fields. For example, the
wireless sensor network can be used to monitor at the hostile environments for the use of
military applications, to detect forest fires for prevention of disasters, or to study the
phenomenon of the typhoon for a variety of academic purposes. These sensor nodes can
self organize to form a network and can communicate with each other using their wireless
interfaces. Energy efficient self organization and initialization protocols are developed in,
[2]. Each node has transmitted power control and an Omni directional antenna, and
therefore can adjust the area of coverage with its wireless transmission. Typically, sensor
nodes collect audio, seismic, and other types of data and collaborate to perform a high-level
task in a sensor web. For example, a sensor network can be used for detecting the presence
of potential threats in a military conflict. Most of battery energy is consumed by receiving
and transmitting data. If all sensor nodes transmit data directly to the BS, the furthest node
from BS will die early. On the other hand, among sensor nodes transmitting data through
multiple hops, node closest to the BS tends to die early, leaving some network areas
completely unmonitored and causing network partition. In order to maximize the lifetime of
WSN, it is necessary for communication protocols to prolong sensor nodes lifetime by
minimizing transmission energy consumption, sending data via paths that can avoid sensor
nodes with low energy and minimizing the total transmission power.


M. Tech (ACS), NIT Warangal Page 2


Figure 1.1 A typical Wireless Sensor Network.



Figure 1.2: Schematic of a Wireless Sensor Network Architecture



M. Tech (ACS), NIT Warangal Page 3

1.1 Architecture of Wireless Sensor Network:

Figure 1.2 shows a typical schematic of a wireless sensor network (WSN). After the initial
deployment (typically ad hoc), sensor nodes are responsible for self-organizing an
appropriate network infrastructure, often with multi-hop connections between sensor
nodes [30]. The onboard sensors then start collecting acoustic, seismic, infrared or magnetic
information about the environment, using either continuous or event driven working
modes. Location and positioning information can also be obtained through the global
positioning system (GPS) or local positioning algorithms. This information can be gathered
from across the network and appropriately processed to construct a global view of the
monitoring phenomena or objects. The basic philosophy behind WSNs is that, while the
capability of each individual sensor node is limited, the aggregate power of the entire
network is sufficient for the required mission.

In general, the wireless sensor networks are deployed for monitoring at a large area so the
wireless sensor networks need many sensor nodes. If the sensor node consumes completely
energy, it is wasted. We do not consider to recharge and to reuse sensor node. Because of
these reasons, the value of the sensor nodes must be inexpensive to practical use. Deployed
in harsh and complicated environments, the sensor nodes are difficult to recharge or
replace once their energy is drained. Meanwhile the sensor nodes have limited
communication capacity and computing power. So how to optimize the communication
path, improve the energy-efficiency as well as load balance and prolong the network
lifetime has became an important issue of designing routing protocols for WSN.
Hierarchical-based routing protocols [6] are widely used for their high energy-efficiency and
good expandability. The basic idea of them is to select some nodes in charge of a certain
region routing. These selected nodes have greater responsibility relative to other nodes
which leads to the incompletely equal relationship between sensor nodes. LEACH (Low
Energy Adaptive Clustering Hierarchy) [7], PEGASIS (Power-Efficient Gathering in Sensor
Information System) [8] are the typical hierarchical-based routing protocols. As an
enhancement algorithm of LEACH, PEGASIS is a classical chain-based routing protocol. It
saves significant energy compared with the LEACH protocol by improving the cluster
configuration and the delivery method of sensing data.

M. Tech (ACS), NIT Warangal Page 4

1.2 The differences between WSNs and traditional networks

Wireless sensor networks, on the one hand, share the similarity of self-configuration
without manual management with Mobile ad-hoc networks; on the other hand, they are
different from traditional networks in many aspects due to their strict energy constraints
and application specific characteristics.

NO one-size-fits-all solution: A WSN is organized as a collection of sensor nodes which co-
ordinate with each other to fulfil a certain task. The entire network infrastructure depends
directly on the specific application scenario. It is unlikely that a one-size-fits-all solution
exists for all these different applications. The old fixed protocol stack which applied
successfully to traditional networks is no longer suitable for WSNs. Many new
communication algorithms have been developed for different applications. As one example,
WSNs are deployed with very different network densities, from sparse to dense
deployments. Each case requires unique network configuration.

Environment interaction: The traffic loads relayed in WSNs are generated by the sensors
which interact entirely with the environment. By contrast, the traffic loads of tradition
network are mainly driven by human behaviour. Moreover, the environment plays a key
role in determining the size of the network, the deployment scheme, and the network
topology. The size of the network varies with the monitored environment. For indoor
environments, fewer nodes are required
to form a network in a limited space whereas outdoor environments may require more
nodes to cover a larger area.

Resource constraints: Resource constraints include a limited amount of energy, short
communication range, low bandwidth, and limited processing and storage in each node. For
wireless sensor networks, energy is a scare resource. This is unlike wireless ad-hoc networks
which can recharge or replace batteries quite easily. In some cases, the need to prolong the
lifetime of a sensor node has a deep impact on the entire WSN system architecture.


M. Tech (ACS), NIT Warangal Page 5

Reliability and QoS: The WSNs exhibit very different concepts of reliability and quality of
Service from traditional networks. They totally depend on the task assigned. In some
emergency cases, only occasional delivery of packets can be more than enough; in other
cases, very high reliability requirements exist. Packet delivery ratio in WSNs is no longer an
sufficient metric, instead, different applications may take their own requirements into
consideration.

1.3Design challenges:

WSNs distinguish themselves from traditional networks due to their application specific and
energy constraints. Their structure and characteristics depend on their electronic,
mechanical and communication limitations but also on application specific requirements.

One of the major and probably most important challenges in the design of WSNs is their
application specific characteristic. A sensor network is set up to fulfil a specific task and the
data collected from the network may be of different types due to various application
scenarios. Respectively, different types of applications have their own specific requirements.
These requirements are turned into specific design properties of a WSN. In other words, a
WSN's architecture directly depends on the assigned application scenarios. For the
acceptable performance of a given task, the optimal WSN infrastructure should be selected
out of the hundreds of network solutions before the practical deployment.

Equally, an issue that has been frequently emphasized in the research literature is the fact
that energy resources are significantly limited. Recharging or replacing the battery of sensor
nodes may be difficult or impossible. Hence, power efficiency often turns out to be the
major performance metric, directly influencing the network lifetime. Power consumption
according to the functioning of a sensor node can be divided into three domains: sensing,
communication, and data processing. There has been research effort in hardware
improvements to optimize the energy consumed by sensing and data processing. Several
studies of energy efficiency of WSNs have been discussed and several algorithms that lead
to optimal connectivity topologies for power conservation have been proposed [10][18].

M. Tech (ACS), NIT Warangal Page 6

Another issue in the design of WSNs is that performance assessment of a WSN always
happens once deployed. The analysis procedure follows the order that people in this field
first put more and more effort into inventing new protocols and new applications; then the
solutions are built, tested and evaluated either by simulation or test beds; even sometimes
an actual system has to be deployed so that researchers can learn by empirical evidence. A
more scientific analysis procedure is ideally required before a WSN is practically deployed.
Current WSN designers are mainly experts in wireless sensor networking and hardware who
could perceive the communication between each node at the bit level. When a new
protocol is developed, they could construct algorithms even if the required simulation tool
did not exist. As WSNs immerse deeper into people's work, they must begin to include less
specialized users.

1.4 Thesis Contributions
The work reported herein investigates chaining mechanism in PEGASIS using evolutionary
algorithms like Ant Colony optimisation and Genetic algorithms and lifetime enhancement
by chain leader selection criteria and maintenance of priority queue at each node if the next
node fails. Lifetime measurement of WSN using various types of PEGASIS variants for both
Homogenous and heterogeneous has been evaluated.

1.5 Thesis Outline
The thesis has been organised in the fallowing manner. Fallowing this chapter, chapter 2
presents extensive literature survey on routing algorithms for WSN. It mainly discusses
energy efficient hierarchical routing protocols for WSN. Evolutionary algorithms are also
presented in this section. Chain forming mechanism using GREEDY algorithm is presented in
chapter 3. It mainly investigates the lifetime of PEGASIS protocol under various scenarios.
Chapter 4 deals with Ant Colony Optimisation technique applied to PEGASIS protocol and
lifetime Measurement. Chapter 5 deals with Genetic algorithm and its lifetime
measurement. Chapter 6 gives the comparative study of all the algorithms proposed.



M. Tech (ACS), NIT Warangal Page 7

2 LITERATURE SURVEY OF ROUTING PROTOCOLS FOR WSN

2.1 Introduction

Wireless sensor networks have their own unique characteristics which create new
challenges for the design of routing protocols for these networks. First, sensors are very
limited in transmission power, computational capacities, storage capacity and most of all, in
energy. Thus, the operating and networking protocol must be kept much simpler as
compared to other ad hoc networks. Second, due to the large number of application
scenarios for WSN, it is unlikely that there will be a one-thing-fits-all solution for these
potentially very different possibilities. The design of a sensor network routing protocol
changes with application requirements. For example, the challenging problem of low-
latency precision tactical surveillance is different from that required for a periodic weather-
monitoring task. Thirdly, data traffic in WSN has significant redundancy since data is
probably collected by many sensors based on a common phenomenon. Such redundancy
needs to be exploited by the routing protocols to improve energy and bandwidth utilization.
Fourth, in many of the initial application scenarios, most nodes in WSN were generally
stationary after deployment. However, in recent development, sensor nodes are
increasingly allowed to move and change their location to monitor mobile events, which
results in unpredictable and frequent topological changes [10].

Due to such different characteristics, many new protocols have been proposed to solve the
routing problems in WSN. These routing mechanisms have taken into consideration the
inherent features of WSN, along with the application and architecture requirements. To
minimize energy consumption, routing techniques proposed in the literature for WSN
employ some well-known ad hoc routing tactics, as well as, tactics special to WSN, such as
data aggregation and in-network processing, clustering, different node role assignment and
data-centric methods. In the following sections, introduction to current research on routing
protocols has been presented.



M. Tech (ACS), NIT Warangal Page 8

2.2 Routing Challenges and Design Issues in WSNs:

Despite plethora of applications of WSN, these networks have several restrictions, e.g.,
limited energy supply, limited computing power, and limited bandwidth of the wireless links
connecting sensor nodes. One of the main design goals of WSN is to carry out data
communication while trying to prolong the lifetime of the network and prevent connectivity
degradation by employing aggressive energy management techniques. In order to design an
efficient routing protocol, several challenging factors should be addressed meticulously. The
following factors are discussed below:

Node deployment: Node deployment in WSN is application dependent and affects the
performance of the routing protocol. The deployment can be either deterministic or
randomized. In deterministic deployment, the sensors are manually placed and data is
routed through pre-determined paths; but in random node deployment, the sensor nodes
are scattered randomly creating an infrastructure in an ad hoc manner. Hence, random
deployment raises several issues as coverage, optimal clustering etc. which need to be
addressed.

Energy consumption without losing accuracy: sensor nodes can use up their limited supply
of energy performing computations and transmitting information in a wireless environment.
As such, energy conserving forms of communication and computation are essential. Sensor
node lifetime shows a strong dependence on the battery lifetime. In a multi hop WSN, each
node plays a dual role as data sender and data router. The malfunctioning of some sensor
nodes due to power failure can cause significant topological changes and might require
rerouting of packets and reorganization of the network.

Node/Link Heterogeneity: Some applications of sensor networks might require a diverse
mixture of sensor nodes with different types and capabilities to be deployed. Data from
different sensors, can be generated at different rates, network can follow different data
reporting models and can be subjected to different quality of service constraints. Such a
heterogeneous environment makes routing more complex.

M. Tech (ACS), NIT Warangal Page 9


Fault Tolerance: Some sensor nodes may fail or be blocked due to lack of power, physical
damage, or environmental interference. The failure of sensor nodes should not affect the
overall task of the sensor network. If many nodes fail, MAC and routing protocols must
accommodate formation of new links and routes to the data collection base stations. This
may require actively adjusting transmit powers and signalling rates on the existing links to
reduce energy consumption, or rerouting packets through regions of the network where
more energy is available. Therefore, multiple levels of redundancy may be needed in a fault-
tolerant sensor network.

Scalability: The number of sensor nodes deployed in the sensing area may be in the order of
hundreds or thousands, or more. Any routing scheme must be able to work with this huge
number of sensor nodes. In addition, sensor network routing protocols should be scalable
enough to respond to events in the environment. Until an event occurs, most of the sensors
can remain in the sleep state, with data from the few remaining sensors providing a coarse
quality.

Network Dynamics: Most of the network architectures assume that sensor nodes are
stationary. However, mobility of both BSs and sensor nodes is sometimes necessary in
many applications. Routing messages from or to moving nodes is more challenging since
route stability becomes an important issue, besides energy, bandwidth etc. Moreover, the
sensed phenomenon can be either dynamic or static depending on the application, e.g., it is
dynamic in a target detection/tracking application, while it is static in forest monitoring for
early fire prevention. Monitoring static events allows the network to work in a reactive
mode, simply generating traffic when reporting. Dynamic events in most applications
require periodic reporting and consequently generate significant traffic to be routed to the
BS.

Transmission Media: In a multi-hop sensor network, communicating nodes are linked by a
wireless medium. The traditional problems associated with a wireless channel (e.g., fading,
high error rate) may also affect the operation of the sensor network. As the transmission
energy varies directly with the square of distance therefore a multi-hop network is suitable

M. Tech (ACS), NIT Warangal Page 10

for conserving energy. But a multi-hop network raises several issues regarding topology
management and media access control. One approach of MAC design for sensor networks is
to use CSMA-CA based protocols of IEEE 802.15.4 that conserve more energy compared to
contention based protocols like CSMA (e.g. IEEE 802.11). So, Zigbee which is based upon
IEEE 802.15.4 LWPAN technology is introduced to meet the challenges.

Connectivity: The connectivity of WSN depends on the radio coverage. If there exists a
multi-hop connection between any two nodes continuously, the network is connected. The
connectivity is intermittent if WSN is partitioned occasionally, and sporadic if the nodes are
only occasionally in the communication range of other nodes.

Coverage: The coverage of a WSN node means either sensing coverage or communication
coverage. Typically with radio communications, the communication coverage is significantly
larger than sensing coverage. For applications, the sensing coverage defines how to reliably
guarantee that an event can be detected. The coverage of a network is either sparse, if only
parts of the area of interest are covered or dense when the area is almost completely
covered. In case of a redundant coverage, multiple sensor nodes are in the same area.

Data Aggregation: Sensor nodes usually generate significant redundant data. So, to reduce
the number of transmission, similar packets from multiple nodes can be aggregated. Data
aggregation is the combination of data from different sources according to a certain
aggregation function, e.g., duplicate suppression, minima, maxima and average. It is
incorporated in routing protocols to reduce the amount of data coming from various
sources and thus to achieve energy efficiency. But it adds to the complexity and makes the
incorporation of security techniques in the protocol nearly impossible.

Data Reporting Model: Data sensing and reporting in WSNs is dependent on the application
and the time criticality of the data reporting. In wireless sensor networks data reporting can
be continuous, query-driven or event-driven. The data-delivery model affects the design of
network layer, e.g., continuous data reporting generates a huge amount of data therefore,
the routing protocol should be aware of data-aggregation


M. Tech (ACS), NIT Warangal Page 11

Quality of Service: In some applications, data should be delivered within a certain period of
time from the moment it is sensed; otherwise the data will be useless. Therefore bounded
latency for data delivery is another condition for time-constrained applications. However, in
many applications, conservation of energy, which is directly related to network lifetime, is
considered relatively more important than the quality of data sent. As the energy gets
depleted, the network may be required to reduce the quality of the results in order to
reduce the energy dissipation in the nodes and hence lengthen the total network lifetime.
Hence, energy-aware routing protocols are required to capture this requirement.

2.3 Classification of Routing Protocols in WSNs:

In general, routing in WSNs can be divided into flat-based routing, hierarchical-based
routing, and location-based routing depending on the network structure. In flat-based
routing, all nodes are typically assigned equal roles or functionality. In hierarchical-based
routing, however, nodes will play different roles in the network. In location-based routing,
sensor nodes' positions are exploited to route data in the network.

A routing protocol is considered adaptive if certain system parameters can be controlled in
order to adapt to the current network conditions and available energy levels. Furthermore,
these protocols can be classified into multipath-based, query-based, negotiation-based,
QoS-based, or routing techniques depending on the protocol operation. In addition to the
above, routing protocols can be classified into three categories, namely, proactive, reactive,
and hybrid protocols depending on how the source sends a route to the destination. In
proactive protocols, all routes are computed before they are really needed, while in reactive
protocols, routes are computed on demand. Hybrid protocols use a combination of these
two ideas. When sensor nodes are static, it is preferable to have table driven routing
protocols rather than using reactive protocols. A significant amount of energy is used in
route discovery and setup of reactive protocols. Another class of routing protocols is called
the cooperative routing protocols. In cooperative routing, nodes send data to a central node
where data can be aggregated and may be subject to further processing, hence reducing
route cost in terms of energy usage.


M. Tech (ACS), NIT Warangal Page 12


Figure 2.1 Classification of routing protocols


2.4 Previous Work:

In this section a brief review of the related work on the analysis of PEGASIS protocol is
presented. Cosmin Cirstea [10] provides an up to date evaluation of routing protocols as
well as a description of state of the art routing techniques for Wireless Sensor Networks
(WSNs) that enhance network lifetime through efficient energy consumption methods. The
tradeoffs between energy and communication overhead are studied. The advantages and
disadvantages of each routing protocol with the purpose of discovering new research
directions are highlighted.

Stephanie Lindsey et. al. [11], proposed PEGASIS (Power-Efficient Gathering in Sensor
Information Systems) Protocol which is a near optimal chain-based protocol, an
improvement over LEACH. In PEGASIS, each node communicates only with a close neighbour
and takes turns transmitting to the base station, thus reducing the amount of energy spent
per round.

Dali Wei et. al [12], proposes a distributed clustering algorithm that determines suitable
cluster sizes depending on the hop distance to the data sink, while achieving approximate
equalization of node lifetimes and reduced energy consumption levels. A simple energy-

M. Tech (ACS), NIT Warangal Page 13

efficient multi hop data collection protocol to evaluate the effectiveness of Energy Efficient
Clustering. The end to end energy consumption of this protocol is caluculated. EC is suitable
for any data collection protocol that focuses on energy conservation. Performance results
demonstrate that EC extends network lifetime and achieves energy equalization more
effectively than two well known clustering algorithms, HEED and UCR.

Ossama Younis et. al [13], decribed HEED (Hybrid Energy-Efficient Distributed clustering),
that periodically selects cluster heads according to a hybrid of the node residual energy and
a secondary parameter, such as node proximity to its neighbours or node degree. HEED
terminates in O(1) iterations, incurs low message overhead, and achieves fairly uniform
cluster head distribution across the network. With appropriate bounds on node density ,
intra cluster and inter cluster transmission ranges; HEED can asymptotically almost surely
guarantee connectivity of clustered networks.

A three-layered routing protocol for WSN based on LEACH (TL-LEACH) is given by Deng
Zhixiang et. al. [14]. The improved LEACH protocol is simulated and the simulation results
show that TL-LEACH protocol has greatly improved WSN lifetime than LEACH protocol.

Indu Shukla [15], has discussed PEGASIS protocol. PEGASIS protocol forms a chain of sensor
nodes, where each sensor node only communicates with their neighbours. Sensor nodes are
deployed in harsh physical environment. Sensor nodes have very limited computation
capability because they are limited by the battery power. It has been a challenge to
maximize the use of energy of these sensor nodes to extend the network lifetime. The
implementation of PEGASIS protocol is also presented.

Jian Wan et. al [16], presented a review of recent routing protocols in WSNs and classified
them into three categories based on the network structure in WSNs. A description of the
existing routing protocols is presented and discussed their advantages and disadvantages.
Finally, paper is concluded with open research issues and challenges.

Tao Liu et. al [17], proposes a new type of routing protocol for WSN called PECRP (Power-
efficient Clustering Routing Protocol), which is suitable to long-distance and complex data

M. Tech (ACS), NIT Warangal Page 14

transmission (e.g. patient-surveillance or chemical detection in agriculture), and for fixed
sensor nodes of WSN. PECRP combines the advantages of some excellent cluster-based
routing protocols together, such as HEED (Hybrid Energy efficient Distributed Clustering
Approach), PEGASIS (Power Efficient Gathering in Sensor Information Systems) and so on.
PECRP improves the mechanism in electing CHs (cluster heads) of LEACH, and elects more
appropriate nodes to be CHs, which could prolong the lifetime of WSN obviously. In data
transmission, PECRP uses multi-hop transmission that is called circle domino effect based
on distance to BS (Base Station) to balance the energy consumption in nodes. multi-hop
transmission can prolong the lifetime of WSN in narrow sense situation is proved based on
mathematical proofs

Zheng Gengsheng et. al [18], described a two layer hierarchical routing protocol called Chain
Routing Based on Coordinates-oriented Clustering Strategy (CRBCC), which gives a good
compromise between energy consumption and delay. First, CRBCC makes balanced
clustering according to y coordinates where each cluster has approximately equal number of
nodes. Second, CRBCC makes chain routing by simulated annealing algorithm (SA) inside the
cluster and elects chain leader in the order of x coordinates. Third, CRBCC makes chain
routing again by SA method among chain leaders. Simulation results show that CRBCC
performs better than PEGASIS in terms of energy efficiency and network delay.

Hao Wu et. al. [19], proposes a Chain-based Fast Data Aggregation Algorithm Based on
Suppositional Cells (CFDASC) to solve this problem. In this algorithm, Author attributed each
node to one suppositional cell according to the node location information. The nodes which
are in one suppositional cell act as the cluster head of data collection in turn, then the head
gathers and transmits data along the cells chain to the sink node. As a result, it accelerates
the data aggregation process. Simulation shows that COSEN noticeably give a good
compromise between energy efficiency and latency.

Considerable amount of energy may be wasted when nodes which are far away from sink
node act as the head. DERP (Distance-based Energy-efficient Routing Protocol) is proposed by
Hyunduk Kim et. al. [20] to address the problem of making far away as head. DERP is a chain-based
protocol that improves the greedy-algorithm in PEGASIS by taking into account the distance from the

M. Tech (ACS), NIT Warangal Page 15

HEAD to the sink node. The main idea of DERP is to adopt a pre-HEAD (P-HD) to distribute the energy
load evenly among sensor nodes. In addition, to scale DERP to a large network, it can be extended to
a multi hop clustering protocol by selecting a relay node according to the distance between the P-
HD and SINK. Analysis and simulation studies of DERP show that it consumes up to 80% less energy,
and has less of a transmission delay compared to PEGASIS.

M. Tabibzadeh et. al.[21], proposed a hybrid protocol, called collectively Chain-based LEACH
(CBL) that improves the Low-Energy Adaptive Clustering Hierarchy (LEACH) to significantly
reduce energy consumption and increase the lifetime of a sensor network. CBL protocol
uses LEACH and the advantages of Power-Efficient Gathering in Sensor Information Systems
(PEGASIS) and avoids their disadvantages. LEACH technique improves energy efficiency of a
sensor network by selecting a cluster-head, and having it aggregate data from other nodes
in its cluster, and PEGASIS is a near optimal chain-based protocol used for communication
and extra aggregation between cluster-heads that are neighbours and takes turns
transmitting to the sink.

Wenjing Guo et. al. [22], presented a routing protocol for the applications of Wireless
Sensor Network (WSN). It is a protocol based on the PEGASIS protocol but using an
improved ant colony algorithm rather than the greedy algorithm to construct the chain.
Compared with the original PEGASIS, this one, Pegant, can achieve a global optimization. It
forms a chain that makes the path more even-distributed and the total square of
transmission distance much less. Moreover, in the constructing process, the energy factor
has been taken into account, which brings about a balance of energy consumption between
nodes. In each round of transmission, according to the current energy of each node, a
leader is selected to directly communicate with the base station (BS). Simulation results
have shown that the proposed protocol significantly prolongs the network lifetime.

In order to reduce energy consumption, Young-Long Chen et. al. [23] first shows ideal
energy mathematical model of PEGASIS topology, since the distance between nodes is the
same, this energy mathematical model is the longest network lifetime of WSNs. To achieve
this objective, Intra- Grid PEGASIS topology architecture is proposed, which is an
architecture based on PEGASIS topology. In this architecture, the sensor area is divided into

M. Tech (ACS), NIT Warangal Page 16

several network grids, meanwhile, the nodes of each network grid is deployed in random,
then the nodes within the network grid are connected, finally, all the network grids are
connected.

Yongchang Yu et. al. [24], proposed EECB (Energy-Efficient Chain-Based routing protocol)
which is an improvement over PEGASIS. EECB uses distances between nodes and the BS and
remaining energy levels of nodes to decide which node will be the leader that takes charge
of transmitting data to the BS. Also, EECB adopts distance threshold to avoid formation of LL
(Long Link) on the chain.

Feng Sen et. al. [25], propose EEPB (Energy-Efficient PEGASIS-Based protocol). It is a chain-
based protocol which has certain deficiencies including the uncertainty of threshold
adopted when building a chain, the inevitability of long link (LL) when valuing threshold
inappropriately and the non-optimal election of leader node. Aiming at these problems, an
improved energy-efficient PEGASIS-based protocol (IEEPB) is proposed in this paper. IEEPB
adopts new method to build chain, and uses weighting method when selecting the leader
node, by assigning each node a weight so as to represent its appropriate level of being a
leader which considers residual energy of nodes and distance between a node and base
station (BS) as key parameters.

Young-Long et al. [26], discussed the PEGASIS topology architecture with the PBCA (Phase-
Based Coverage Algorithm) to find the redundant nodes which can enter to sleep mode.
Therefore, proposed algorithm can reduce the energy consumption of nodes and extend the
network lifetime. Simulation results show that the performances of this algorithm
outperformance the LEACH topology architecture, the PEGASIS topology architecture, and
the LEACH with PBCA topology architecture in terms of energy consumptions, number of
nodes alive, and sensing areas.


M. Tech (ACS), NIT Warangal Page 17


3. PEGASIS (Power Efficient Gathering in Sensor Information Systems)

Wireless sensor nodes sense data and send it directly to the base station or they perform a
clustering procedure as in LEACH. LEACH is known for cluster formation which contains
cluster members sensing the data and the cluster head which gathers the data collected in a
fused manner (all the data is sent as a single packet) to the base station. This procedure has
gained in conserving a lot of energy that would otherwise be wasted. PEGASIS is an
extension to LEACH; it has better ways of conserving energy which last even more than
using cluster mechanism in LEACH [30].

When the nodes in the network which are at some distance from the base station, the
easiest and the simplest way of transmitting the sensed data to the base station is to
transmit it directly, which may lead to quicker depletion of energy in all the nodes. The
nodes at a large distance away from the base station are depleted quicker than the nodes
which are closer to the base station as they need some extra energy to reach the farthest
base station. Another approach where energy is consumed in low amounts is by forming
cluster heads and cluster members using the sensor nodes in the network. Cluster members
perform the sensing and computing the data (Data Fusion) and the cluster heads transmit
the fused data to the base station. All the nodes in the network take their chance to act as
cluster heads to send the fused data to the base station; again the farthest cluster head
needs some extra energy to send the data to the base station.

The key idea in using PEGASIS is that it uses all the nodes to transmit or receive with its
closest neighbor nodes. This is achieved by the formation of a chain as shown in the Figure
below. All the nodes which collect the data fuse it with the data received by the neighbor
node and transmit it to the next-nearest neighbor. In this way all the nodes receive and fuse
their data, and pass it to the next neighbor in a chain format till they all reach the base
station. Every node in the network takes turns as a leader of the chain and the one
responsible to transmit the whole fused data collected by the chain of nodes to the base
station [31].

M. Tech (ACS), NIT Warangal Page 18


Figure 3.1: Chain formation in PEGASIS
In this way the average amount of energy spent by each node is reduced. Greedy algorithms
are used to see that all nodes are used during the chain formation. PEGASIS assumes that all
the nodes with varying or low energy levels can be compensated in order to calculate the
energy cost of the transmissions with the remaining energy they are left with. It is not
necessary that all the nodes need to know its neighboring nodes, the base station can
determine the path or form the chain for all nodes, or all the nodes can determine their
neighboring nodes by sending a signal. Depending upon the signal strength, the nodes
adjust their signal such that they hear only the nearest neighbors in the network.

From Figure 3.2 below, the operation of PEGASIS is clearly understood. A greedy algorithm
is applied to form a chain among all the best nodes that are at a one-hop distance from each
other and to the base station. If the farthest node is selected, it starts transmitting the data.
For example, if node 4 start the chain formation process and it sends the signal to the nodes

M. Tech (ACS), NIT Warangal Page 19

in the network to find the nearest neighbor, node 3 is the nearest, so it transmits the sensed
data to node 4.


Upon receiving the data from node 4 node 3 starts finding the nearest neighbor by sending
signals and when it finds that node 2 is the nearest, it fuses its own data with the data
received from node 4 and transmits all this data to node 2. Node 2 finds node 1 as the
nearest and transmits the sensed data with the fused data (the whole data is formatted a
single packet). Now node 1 is the nearest node to the base station, so it acts as a leader and
transmits all the data. Only the first node in the chain have nothing to fuse except the data it
has during the chain formation, the remaining nodes all have some data to append with the
received data from other nodes [31].

This approach will distribute the energy load evenly among the sensor nodes in the network
as it uses all the nodes of the network to form the chain and perform simple data
forwarding operations. If any node dies in the chain, a new chain is formed, eliminating the
dead nodes.

M. Tech (ACS), NIT Warangal Page 20

From the simulation reported in [13], it is clear that PEGASIS improves on LEACH by saving
energy at different stages, such as for example cluster-member forming and cluster heads.
Here all the nodes have an equal chance of becoming the leader once and transmit data to
the base station in one round. An energy balance is estimated on the nodes in the network
which conserves lot of energy. The amount of nodes that die during the chain process is
reduced when compared to LEACH for all types of network sizes and topologies. The
network lifetime is increased, as all the nodes actively participate and deplete the equal
amount of energy on the whole [13]. A simulation analysis of PEGASIS is reported in [13],
comparing it with the LEACH protocol using different network topologies. Many
experimental results proved that PEGASIS is supporting longer network lifetime, more
balanced energy dissipation and higher performance.

PEGASIS uses a greedy algorithm to form a chain using the nodes in the network to transmit
Data to the base station; it has no location awareness of the sensor nodes in the network
and looks only for the closest neighbour that it can reach. Discovering a new route is difficult
if a node fails, as it has a fixed path every time before it starts a new route towards the sink
for transmission. Though its approach in conserving energy is better, it lacks in maintaining
focus on quality-of-service factors. For instance, it cannot resist uneven traffic distribution
for all those nodes which are not in the single-hop range; it has to make a multi-hop
structure for adding such nodes

3.1 Greedy Algorithm Chain Formation:
Greedy chain algorithm begins at a farthest node from the sink, which is the only node in
the chain at first. Each terminal node of the chain finds a closest node from the remaining
nodes set which are not in the chain. Then the closest node will join the chain and be the
new terminal node of the chain. The process repeats till all the nodes join the chain. The
greedy chain algorithm in PEGASIS is as follows.
The main advantages of PEGASIS are:
- The transmission distances between nodes are minimized.
- The number of sensor nodes that must send packets to the sink is minimized

M. Tech (ACS), NIT Warangal Page 21












The main drawbacks of PEGASIS are:
- It has excessive delay introduced by the single chain.
- Greedy algorithm using in PEGASIS is a local search, which cannot provide a global
optimal route.
3.2 Data Aggregation in PEGASIS
In cluster-based sensor networks, sensors transmit data to the cluster head where data
aggregation is performed. However, if the cluster head is far away from the sensors, they
might expend excessive energy in communication. Further improvements in energy
efficiency can be obtained if sensors transmit only to close neighbours. The key idea behind
chain based data aggregation is that each sensor transmits only to its closest neighbour. In
PEGASIS, nodes are organized into a linear chain for data aggregation. The nodes can form a
chain by employing a greedy algorithm or the sink can determine the chain in a centralized
manner. Greedy chain formation assumes that all nodes have global knowledge of the
network. The farthest node from the sink initiates chain formation and at each step, the
closest neighbour of a node is selected as its successor in the chain. In each data gathering
Procedure ConstructGreedyChain(N,END)
1. Begin
2. N={all nodes};
3. END = farthest node from SINK;
4. Chain= {END};
5. N=N-{END};
6. if (N!=NULL)
7. {
8. END=FindCloseNode(N,END);
9. Append(chain,END);
10. goto 5.
11. }
12. END


M. Tech (ACS), NIT Warangal Page 22

round, a node receives data from one of its neighbours, fuses the data with its own and
transmits the fused data to its other neighbour along the chain. Eventually the leader node
which is similar to cluster head transmits the aggregated data to the sink. Figure 3.3 shows
the chain based data aggregation procedure in PEGASIS. Nodes take turns in transmitting to
the sink. The greedy chain formation approach used in [33] may result in some nodes having
relatively distant neighbours along the chain. This problem is alleviated by not allowing such
nodes to become leaders.

Figure 3.3 Chain based organization in a sensor network. The ovals indicate sensors and
the arrows indicate the direction of data transmission

The PEGASIS protocol has considerable energy savings compared to LEACH. The distances
that most of the nodes transmit are much less compared to LEACH in which each node
transmits to its cluster head. The leader node receives at most two data packets from its
two neighbours. In contrast, a cluster head in LEACH has to perform data fusion of several
data packets received from its cluster members. The main disadvantage of PEGASIS is the
necessity of global knowledge of all node positions to pick suitable neighbours and minimize
the maximum neighbour distance. In addition, PEGASIS assumes that all sensors are
equipped with identical battery power and results in excessive delay for nodes at the end of
the chain which are farther away from the leader node. In [29], two other protocols viz., a
binary chain based scheme and a three-level chain based scheme have been proposed. In
the binary chain based protocol, each node transmits data to a close neighbour in a given
level of the hierarchy. The nodes that receive data at each level form a chain in the next
higher level of the hierarchy. At the highest level, the leader node transmits the aggregated

M. Tech (ACS), NIT Warangal Page 23

data to the sink. In the three level schemes, the protocol starts with the formation of a
linear chain among all nodes and then it divides them into G groups. Each group has N/G
successive nodes of the chain where N is the total number of nodes. Only one node from
each group participates in the second level of the hierarchy. The G nodes in the second level
are further divided into two groups so that only three levels are maintained in the hierarchy.
3.3 Simulation Parameters
One Hundred Wireless Sensor Nodes are deployed randomly in 100m x 100m area each with
initial energy of 1 or 2 Joule. Packet length of 1000 bits is assumed. The energy consumed in
processing of one bit of data both in transmitting and receiving electronics (E
elec
) is taken as
50nJ/bit. The energy consumed in transmitting amplifier (E
amp
) for transmitting a bit for unit
distance is taken as 100pJ/bit/m
2
. The sink or gateway is assumed at the coordinates
(25,150) so that a minimum distance of at least 50m from any node is present.

The fallowing figure shows the random deployment of WSN nodes in 100m X 100m area.

Figure 3.4 Random deployment of WSN Nodes
0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
100nodes random deployment
length in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s

M. Tech (ACS), NIT Warangal Page 24

Figure 3.5 shows the chain formed in PEGASIS using greedy algorithm described earlier. The
total length of the chain is 903meters.

Figure 3.5 Chain formations in PEGASIS using Greedy algorithm.

0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
100nodes network chain formation using greedy algorithm
lenght in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s
903.834

M. Tech (ACS), NIT Warangal Page 25

3.3.1 WIRELESS SENSOR NETWORK RADIO POWER MODEL
A Wireless Sensor Network will comprise of the fallowing
- A fixed base station (BS) and N wireless sensor nodes
- BS has high-energy

Figure 3.6: WSN forming PEGASIS chain and Base Station


Figure 3.7: Transmitter and Receiver Energy Model diagram
For simulation of different WSN scenarios, we use a radio energy model in [33], in which the
energy dissipation ET (k, d) of transmitting k-bit data between two nodes separated by a
distance of d meters is given as follows:
2
( , ) ( )
Tx Tx elec Tx amp
E k d E E d k

= + (1)

M. Tech (ACS), NIT Warangal Page 26

Where E
elec
denotes electronic energy and E
ta
denotes transmit amplifier parameters
corresponding to the free space model.
The energy cost incurred in the receiver of the destination sensor node is given as follows:
( )
Rx Rx elec
E k K E

= (2)
For simulation a simple model where the radio dissipates Eelec = 50 nJ/bit to run the
transmitter or receiver circuitry and E
amp
= 100 pJ/bit/m
2
for the transmit amplifier to
achieve an acceptable E
b
/N
0
.
We know the energy resources are mainly consumed by radio and CPU components [8]. We
use the above radio power model to compute energy dissipation of radio. However, the
energy dissipation of CPU is more difficult to compute in the simulator, because CPU is
driven by the software running on it.



M. Tech (ACS), NIT Warangal Page 27

3.4 Homogenous PEGASIS with Greedy Chain
In homogenous network all the nodes Wireless Sensor Network are having same energy of
1Joule each.
3.4.1 Max Energy Node as Cluster Head
In this case the node having the maximum energy is selected as the cluster head. For this all
the nodes while transmitting the data to the chain leader, also indicate their current energy
and expected next state energy after the present transmission is also inserted. Thus
increasing the packet length and unnecessary, which directly drains the battery of both
transmitting and receiving nodes. Also chain leader has to transmit this high data length
packet to the base station which consumes a lot of energy. To overcome the disadvantages
of this cluster head selection in original Pegasis a new cluster head selection criteria is
proposed.

Figure 3.8: Life time of Greedy Homogenous Max Energy Node as cluster head.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
100Node Network LifeTime Measurement greedy homo max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 28

3.4.2 Cluster Head selected sequentially
In this case the present chain leader selects the next chain leader by just passing to the
immediate neighbour in the chain. This mechanism greatly eliminates the need for larger
packet size and conserves a lot of energy in both transmission and reception electronics.
The figure 3.7 shows the lifetime of the Wireless sensor network in this scenario.


Figure 3.9: Life time of Greedy Homogenous WSN, cluster head selected sequentially
3.4.3 Comparison of Max Energy and Sequential cluster Head scenarios
From the above figures it can be concluded that the WSN with cluster head selected
sequentially has more lifetime than the one having the max energy node as cluster head.
10% of nodes are dead at around 5000 rounds in former case and around 7000 rounds in
the latter case, an improvement of nearly 40% of the network lifetime. Similarly for 50% of
dead nodes case it is 6700 for former case and it is 8200 for later case. For 100% dead node
case it is 6700 and 9000 round respectively. This can be summarised in a table as fallows.
0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
100Node Network LifeTime Measurement greedy hom seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 29

GREEDY HOMO Max Energy Sequential % improvement
10% 5000 7000 40
50% 6700 8200 23
100% 6700 9000 34

Table 3.1 Lifetime comparison of Max Energy and Sequential for Homogenous WSN

Figure 3.10 Lifetime comparison of Greedy max energy and sequential cluster head
Hence selecting the cluster head sequentially greatly enhances the lifetime of the network,
although few nodes which are far away from base station die sooner than others in this
case.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of greedy hom max and sequence smooth


greedy homo max lifetime
greedy homo sequence lifetime

M. Tech (ACS), NIT Warangal Page 30

3.5 Heterogeneous PEGASIS with Greedy Chain
In heterogeneous network 80% of the nodes in Wireless Sensor Network are having energy
of 1Joule each and the remaining 20% are having 2Joule of Energy.
3.5.1 Max Energy Node as Cluster Head
In this case since 20% of nodes are having more energy, only these nodes will become
cluster head more often in the beginning of the network, soon they deplete their energy in
transmission to the base station.

Figure 3.11 Lifetime of Greedy Heterogeneous Max Energy
Thus from the figure it can be observed that nodes having more energy are alive till the end
of the lifetime of the network.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
100Node Network LifeTime Measurement greedy hetero max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 31

3.5.2 Cluster Head selected sequentially
In this case although some nodes are having higher energy, all nodes become cluster head
equally. So the nodes having high energy tend to stay alive till the end of network lifetime
and also the nodes which are far away from base station die soon. Hence network operation
is not feasible after 50% of nodes die.

Figure 3.12 lifetime of Greedy Heterogeneous Sequential cluster head

3.5.3 Comparison of Hetero Max and Sequential scenarios
It can be observed from the above figures that 10% of node die at around 5800 round for
Max Energy where as it is 7300 round for Sequential cluster head selection. 50 % of nodes
die in Max Energy case at around 6400 and it is 8400 for sequential cluster head selection.
Max energy network Is completely down at 7950 rounds whereas it is 14000 for Sequential.
0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
14000
100Node Network LifeTime Measurement greedy hetero seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 32

GREEDY HETERO Max Energy Sequential % improvement
10% 5800 7300 25.9
50% 6400 8400 31.25
100% 7950 14000 76.1

Table 3.2 Lifetime comparison of Max Energy and Sequential for Heterogeneous WSN

Figure 3.13 Lifetime Comparison of Hetero Max and Sequential
3.6 Conclusion:
Hence it can be concluded that for Ant Colony Optimisation for both Homogenous and
Heterogeneous sequential cluster head selection maximises the lifetime of Wireless Sensor
Network lifetime.
0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
14000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of greedy hetero max and sequence smooth


greedy hetero max lifetime
greedy hetero sequence lifetime

M. Tech (ACS), NIT Warangal Page 33

4. PEGASIS USING ANT COLONY OPTIMISATION
The chain formation using greedy algorithm does not give minimum distance path since it
only takes the node which is nearer to seed node in formation of chain but it will not
consider the total length of the chain formed. To solve this kind of optimization,
evolutionary algorithms like Ant Colony Optimization are used which has good performance
w.r.t to global optimization of NP hard problems.
Ant Colony Optimization (ACO) is a paradigm for designing metaheuristic algorithms for
combinatorial optimization problems. The first algorithm which can be classified within this
framework was presented in 1991 [35] and, since then, many diverse variants of the basic
principle have been reported in the literature. The essential trait of ACO algorithms is the
combination of a priori information about the structure of a promising solution with a
posterior information about the structure of previously obtained good solutions.

ACO [34] is a class of algorithms, whose first member, called Ant System, was initially
proposed by Colorni, Dorigo and Maniezzo [34]. The main underlying idea, loosely inspired
by the behavior of real ants, is that of a parallel search over several constructive
computational threads based on local problem data and on a dynamic memory structure
containing information on the quality of previously obtained result. The collective behavior
emerging from the interaction of the different search threads has proved effective in solving
combinatorial optimization (CO) problems.

A combinatorial optimization problem is a problem defined over a set C = c1, ... , cn of basic
components. A subset S of components represents a solution of the problem; F 2C is the
subset of feasible solutions, thus a solution S is feasible if and only if S F. A cost function z
is defined over the solution domain, z : 2
C
->R, the objective being to find a minimum cost
feasible solution S*, i.e., to find S*: S* F and z(S*) z(S), S F.

Given this, the functioning of an ACO algorithm can be summarized as follows [9]. A set of
computational concurrent and asynchronous agents (a colony of ants) moves through states
of the problem corresponding to partial solutions of the problem to solve. They move by
applying a stochastic local decision policy based on two parameters, called trails and

M. Tech (ACS), NIT Warangal Page 34

attractiveness. By moving, each ant incrementally constructs a solution to the problem.
When an ant completes a solution, or during the construction phase, the ant evaluates the
solution and modifies the trail value on the components used in its solution. This
pheromone information will direct the search of the future ants.

Furthermore, an ACO algorithm includes two more mechanisms: trail evaporation and,
optionally, daemon actions. Trail evaporation decreases all trail values over time, in order to
avoid unlimited accumulation of trails over some component. Daemon actions can be used
to implement centralized actions which cannot be performed by single ants, such as the
invocation of a local optimization procedure, or the update of global information to be used
to decide whether to bias the search process from a non-local perspective .

4.1 The Ant Colony Optimisation Metaheuristic Framework
A framework can be defined as the skeleton upon which various objects are integrated for a
given solution. In other words it is a generic structure which is further specialised for a
particular application. ACO is a generic algorithmic structure responsible for the scheduling
of three processes:
1. Ants generation & activity
2. Pheromone trail evaporation
3. Daemon actions
This section defines these processes as well as other data structures required for the
implementation of an ACO algorithm for a specific optimisation problem. A visual
representation of the organisation of these processes is provided as Fig. 4.1


Figure 4.1: Process organisation of the Ant Colony Optimisation Metaheuristic Framework

M. Tech (ACS), NIT Warangal Page 35

4.1.1 Pheromone mapping
The pheromone mapping is the means by which solution components are able to be ranked
and selected based on past usefulness. The pheromone mapping connects pheromone
values from a pheromone map (usually a matrix structure) to specific solution components.
The assumption usually being that if a prior solution is good then at least some of its parts
(solution components) should also be good and therefore a remixing of these components
with other good components may lead to an optimal or near-optimal solution. A first step in
defining an ACO algorithm is to define the pheromone mapping.

The problem domain will dictate how the pheromone mapping should be defined. In
applying an ACO algorithm to a combinatorial optimisation problem such as the travelling
salesman problem (TSP) it is not of interest which specific components are included, as any
feasible solution will include every city once (and only once), it is the order of these
components which is important in finding an optimal solution. For the TSP the transition
points (edges/arcs) between the specific components can be assigned a specific pheromone
value in order to reflect which order of cities works the best. That is, that if a solution
included an edge connecting city A to city B and the solution is good then this should be
reflected in the pheromone level on this specific edge and the other edges included in the
solution.

4.1.2 Ants Generation and Activity

This process is responsible for the creation of new candidate solutions to the optimisation
problem being addressed by the algorithm. A temporary population of (artificial) ants is
used to construct feasible solutions to the problem being addressed. Each ant is evaluated
upon the completion of a feasible solution and the solution information encoded into a
global pheromone mapping. Each individual ant is discarded after entering their specific
solution information into the pheromone mapping and a new empty ant is created in its
place, until some stopping criterion is met.



M. Tech (ACS), NIT Warangal Page 36

An ant has the following properties :
1. An ant searches for a minimum (or maximum) cost solution to the optimisation
problem being addressed.
2. Each ant has a memory used to store all solution components used to date, so that
the candidate solution can be evaluated at the completion of solution construction;
the memory can be used as a tabu list such as in the case of the TSP so that no
component is reused.
3. An ant can be assigned a starting position, for example an initial city in a TSP.
4. An ant can include any feasible solution component (an example of a feasible
solution component in a TSP would be a city which has not already been included in
the candidate solution) until such time that no feasible components exist or a
termination criterion is met (usually correlating to the completion of a candidate
solution).
5. Ants include solution components according to a combination of a pheromone value
and a heuristic value which are associated with every solution component in the
problem, the choice of which solution component is usually a probabilistic one.
6. When including a new solution component in the growing candidate solution the
pheromone value associated with the transition between these components
(arc/edge in a TSP), or the solution component itself can be altered (online step-by-
step pheromone update).
7. An ant can retrace a candidate solution at the completion of a solution, updating the
pheromone values of all transitions and/or solution components used in the solution
(online delayed pheromone update).
8. Once a candidate solution is created, and after completing online delayed
pheromone update (if required) an ant dies, freeing all allocated resources
4.1.3 Pheromone Trail Evaporation
Like the biological ant colony, the artificial ant colony employs a pheromone evaporation
mechanism. This mechanism serves as a useful way of forgetting older search bias [35]. As
ACO uses positive reinforcement, if pheromone was allowed to accumulate without decay
the system would very quickly converge on a single solution since this solution would
continue to be reinforced.

M. Tech (ACS), NIT Warangal Page 37


4.1.4 Daemon Actions

Daemon actions can be used to perform specialised functions which often require more
knowledge than an individual ant is allowed [35]. For example, a daemon action could
inspect all solutions generated in one search cycle, identify the best solution and increment
the pheromone values of its solution components more than the regular pheromone update
(offline pheromone update). An alternative daemon action could be the application of a
local search procedure.

4.2 ACO Algorithms

4.2.1 Ant System for the Travelling Salesman Problem

In this instance pheromone values correspond to transitions between cities (edges) and are
Uniformly initialised to an amount slightly higher than what is expected to be added in one
iteration of the algorithm as in Eqn. 4.1. After initialisation the AS algorithm runs a
pheromone trail evaporation procedure which is implemented by applying the rule Eqn. 4.5
for every pheromone value. This procedure is followed by ants generation & activity which
is implemented in the following steps:
1. A temporary population of m ants are placed at randomised starting cities.
2. Each ant k applies the random proportional rule Eqn. 4.2 to decide which city to
add to its current tour.
3. Step 2 is repeated until every ant k constructs a complete solution.
4. Every individual solution is evaluated and the edges used in this specific solution
have their pheromone value adjusted according to Eqn. 4.4. This equation allocates a
higher proportion of new pheromone to better solutions in order to reinforce good
decisions and is an implementation of an online delayed pheromone update
strategy.
5. The temporary population of ants is discarded.

M. Tech (ACS), NIT Warangal Page 38


The pheromone trail evaporation and ants generation & activity procedures are continually
repeated until a termination criterion is reached, such as an amount of computation time,
or alternatively by implementing a daemon action to observe the similarity of the solutions
obtained over several iterations of the algorithm to test the convergence of the algorithm.
(4.1)

(4.2)

( )
( ) .
( )
0
ij ij j
k
k
ij ij ij
k allowedk
t E
ifj allowed
p t t
otherwise
o |
o |
t q
t q
e

( (

= ( (

(4.3)

1
ij
ij
d
q = (4.4)
(1 )
ij ij
t t = (4.5)


ij
t : Pheromone value for edge connecting city i & j
M : Number of ants

nn
C : Length of path found using a nearest neighbour heuristic

k
ij
p : Probability of ant k selecting the edge connecting city i & j
o : Magnitude of pheromone influence on probabilistic decision

ij
q : Heuristic value for edge connecting city i & j
| : Magnitude of heuristic influence on probabilistic decision

ij
d : The distance between city i & j
: Pheromone evaporation rate
Q: Amount of pheromone to deposit
L : Path length
ij ij
Q
L
t t = +
0
( , ), /
nn
ij
i j m C t t
=
=

M. Tech (ACS), NIT Warangal Page 39

4.2.2 Ant Colony Systems

Ant Colony Systems [37](initially introduced as Ant Q]) differs from AS in three
areas:
1. Introduction of a local pheromone update.
2. Modification of the global pheromone update.
3. Modification of the random proportional rule to become the pseudo-random
proportional rule.
The local pheromone update is applied by all ants during the solution construction phase.
Every ant continually applies the update rule to the last solution component used as in Equ.
3.4.6. The aim of this pheromone update rule is to attempt to diversify the search process as
much as possible during the solution construction phase. Without it most ants will simply
create the same solution which will lead the search into a stagnation behaviour.

0
(1 )
ij ij
t t t = + (4.6)
The global pheromone update is modified so that only the best-so-far or iteration-best
solution updates the pheromone map at the completion of solution construction. This
means that unless a solution component has been included in the best solution it will not
receive any modification from the global pheromone update.

(1 ) if ( , ) .
otherwise,
ij ij
ij
ij
i j belongstothebesttour t t
t
t
+ A e

(4.7)
The value of
IJ
t A reflects the utility of the solution and is dependent on the problem e.g.
for the TSP as in Sec. 4.1 it can simply be the inverse of the path length of the solution. The
final and perhaps most important difference between ACS and AS is the modification of the
random proportional rule to become the pseudo-random proportional rule. This rule
introduces a new parameter q0. When a uniformly random value q in the range [0, 1] is less
than q0, the largest transition probability value generated by Equ.3.4.2 is used, rather than
using a roulette wheel selection of all generated probabilities.

M. Tech (ACS), NIT Warangal Page 40

4.3 Simulation Parameters
One Hundred Wireless Sensor Nodes are deployed randomly in 100m x 100m area each with
initial energy of 1 or 2 Joule. Packet length of 1000 bits is assumed. The energy consumed in
processing of one bit of data both in transmitting and receiving electronics (E
elec
) is taken as
50nJ/bit. The energy consumed in transmitting amplifier (E
amp
) for transmitting a bit for unit
distance is taken as 100pJ/bit/m
2
. The sink or gateway is assumed at the coordinates
(25,150) so that a minimum distance of at least 50m from any node is present.

The fallowing figure shows the random deployment of WSN nodes in 100m X 100m area


Figure 4.2 Random deployment of WSN Nodes


0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
100nodes random deployment
length in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s

M. Tech (ACS), NIT Warangal Page 41

The fallowing figure shows the chain formed in PEGASIS using Ant Colony optimisation
described earlier. The total length of the best chain is 834m.

Figure 4.3: Chain formations in PEGASIS using Ant Colony Optimisation.

0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
aco chain formation
20 834.0646
length in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s

M. Tech (ACS), NIT Warangal Page 42

The fallowing shows the average length of all the ants vs. the best ant tour length. It can be
easily observed that the chain length falls drastically after very few iterations and becomes
almost constant after initial iterations. This testifies that Ant Colony Optimisation gives very
good performance in NP hard problem optimisation.


Figure 4.4: The average length vs. Best length of each iteration.

0 2 4 6 8 10 12 14 16 18 20
800
850
900
950
1000
1050
1100
1150
1200
iterations
l
e
n
g
t
h

i
n

m
e
t
e
r
s
lenght of the chain


best route length
averaga lenghth

M. Tech (ACS), NIT Warangal Page 43

4.4 Homogenous PEGASIS with Ant Colony Optimisation
In homogenous network all the nodes Wireless Sensor Network are having same energy of
1Joule each.
4.4.1 Max Energy Node as Cluster Head
In this case the node having the maximum energy is selected as the cluster head. For this all
the nodes while transmitting the data to the chain leader, also indicate their current energy
and expected next state energy after the present transmission is also inserted. Thus
increasing the packet length and unnecessary, which directly drains the battery of both
transmitting and receiving nodes. Also chain leader has to transmit this high data length
packet to the base station which consumes a lot of energy. To overcome the disadvantages
of this cluster head selection in original Pegasis a new cluster head selection criteria is
proposed.

Figure 4.5: Lifetime of Max Energy PEGASIS using ACO.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
100Node Network LifeTime Measurement aco homo max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 44

4.4.2 Cluster Head selected sequentially
In this case the present chain leader selects the next chain leader by just passing to the
immediate neighbour in the chain. This mechanism greatly eliminates the need for larger
packet size and conserves a lot of energy in both transmission and reception electronics.
The figure 3.7 shows the lifetime of the Wireless sensor network in this scenario.

Figure4.6: Lifetime of Sequential PEGASIS using ACO.
4.4.3 Comparison of Max Energy and Sequential cluster Head scenarios
From the above figures it can be concluded that the WSN with cluster head selected
sequentially has more lifetime than the one having the max energy node as cluster head.
10% of nodes are dead at around 5300 rounds in former case and around 7000 rounds in
the latter case, an improvement of nearly 32% of the network lifetime. Similarly for 50% of
dead nodes case it is 6800 for former case and it is 8200 for later case. For 100% dead node
case it is 6800 and 9100 round respectively. This can be summarised in a table as fallows.
0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
100Node Network LifeTime Measurement aco hom seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 45

ACO HOMO Max Energy Sequential % improvement
10% 5300 7000 32
50% 6800 8200 20.6
100% 6800 9100 33.8
Table 4.1 Lifetime comparison of Max Energy and Sequential for Homogenous WSN

Figure 4.7 Lifetime comparison of ACO max energy and sequential cluster head
Hence selecting the cluster head sequentially greatly enhances the lifetime of the network,
although few nodes which are far away from base station die sooner than others in this
case.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of ACO hom max and sequence smooth


ACO homo max lifetime
ACO homo sequence lifetime

M. Tech (ACS), NIT Warangal Page 46

4.5 Heterogeneous PEGASIS with Ant Colony Optimisation
In heterogeneous network 80% of the nodes in Wireless Sensor Network are having energy
of 1Joule each and the remaining 20% are having 2Joule of Energy.
4.5.1 Max Energy Node as Cluster Head
In this case since 20% of nodes are having more energy, only these nodes will become
cluster head more often in the beginning of the network, soon they deplete their energy in
transmission to the base station.



Figure 4.8 Lifetime of ACO Heterogeneous Max Energy
Thus from the figure it can be observed that nodes having more energy are alive till the end
of the lifetime of the network.
0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
100Node Network LifeTime Measurement aco hetero max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 47

4.5.2 Cluster Head selected sequentially
In this case although some nodes are having higher energy, all nodes become cluster head
equally. So the nodes having high energy tend to stay alive till the end of network lifetime
and also the nodes which are far away from base station die soon. Hence network operation
is not feasible after 50% of nodes die.

Figure 4.9 Lifetime of ACO Heterogeneous Sequential cluster head

4.5.3 Comparison of Hetero Max and Sequential scenarios
It can be observed from the above figures that 10% of node die at around 5100 round for
Max Energy where as it is 7200 round for Sequential cluster head selection. 50 % of nodes
die in Max Energy case at around 6400 and it is 8400 for sequential cluster head selection.
Max energy network Is completely down at 8000 rounds whereas it is 15400 for Sequential.
0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
14000
16000
100Node Network LifeTime Measurement aco hetero seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 48

ACO HETERO Max Energy Sequential % improvement
10% 5100 7200 41.2
50% 6400 8400 31.25
100% 8000 15400 92.5

Table 4.2 Lifetime comparison of Max Energy and Sequential for Heterogeneous WSN

Figure 4.10 Lifetime Comparison of Hetero Max and Sequential
4.6 Conclusion:
Hence it can be concluded that for Ant Colony Optimisation for both Homogenous and
Heterogeneous sequential cluster head selection maximises the lifetime of Wireless Sensor
Network lifetime.

0 10 20 30 40 50 60 70 80 90 100
0
5000
10000
15000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of greedy hetero max and sequence smooth


ACO hetero max lifetime
ACO hetero sequence lifetime

M. Tech (ACS), NIT Warangal Page 49

5. PEGASIS USING GENETIC ALGORITHM
5.1 Introduction
Genetic algorithms are an optimization technique based on natural evolution. They include
the survival of the fittest idea into a search algorithm which provides a method of searching
which does not need to explore every possible solution in the feasible region to obtain a
good result. Genetic algorithms are based on the natural process of evolution. In nature, the
fittest individuals are most likely to survive and mate; therefore the next generation should
be fitter and healthier because they were bred from healthy parents. This same idea is
applied to a problem by first guessing solutions and then combining the fittest solutions to
create a new generation of solutions which should be better than the previous generation.
We also include a random mutation element to account for the occasional mishap in
nature

The genetic algorithm process consists of the following steps:
Encoding
Evaluation
Crossover
Mutation
Decoding

A suitable encoding is found for the solution to our problem so that each possible solution
has a unique encoding and the encoding is some form of a string. The initial population is
then selected, usually at random though alternative techniques using heuristics have also
been proposed. The fitness of each individual in the population is then computed; that is,
how well the individual fits the problem and whether it is near the optimum compared to
the other individuals in the population. This fitness is used to find the individuals probability
of crossover. If an individual has a high probability (which indicates that it is significantly
closer to the optimum than the rest of its generation) then it is more likely to be chosen to
crossover. Crossover is where the two individuals are recombined to create new individuals
which are copied into the new generation. Next mutation occurs. Some individuals are

M. Tech (ACS), NIT Warangal Page 50

chosen randomly to be mutated and then a mutation point is randomly chosen. The
character in the corresponding position of the string is changed. Once this is done, a new
generation has been formed and the process is repeated until some stopping criteria has
been reached. At this point the individual which is closest to the optimum is decoded and
the process is complete.

Genetic algorithm can be diagrammatically be represented as fallows


Figure5.1 General Scheme of Genetic Algorithm

M. Tech (ACS), NIT Warangal Page 51

The pseudo code for Genetic algorithm is presented in the table below.

Table 5.1: The General Pseudo-code for a Genetic Algorithm

5.2 Basic Explanation
Genetic algorithms range from being very straightforward to being quite difficult to
understand. Before proceeding, a basic explanation is required to understand how genetic
algorithms work. We will use the following problem throughout this section. We want to
maximize the function f = 2x2 + 4x 5 over the integers in the set {0, 1, . . . , 15}. By
calculus or brute force we see that f is maximized when x = 1.

5.2.1 Encoding
The encoding process is often the most difficult aspect of solving a problem using genetic
algorithms. When applying them to a specific problem it is often hard to find an appropriate
representation of the solution that will be easy to use in the crossover process. Remember
Procedure genetic algorithm
Begin
Initilize population with randomly generated candidate solutions;
Evaluate each candidate solution;
While (TERMNINATION CONDITION not satisfied) do
Select parents
Crossover pairs of parents to create a offspring
Mutate the offspring
Evaluate the new candidate
Replace the new candidate generating a new population
End while
End;

M. Tech (ACS), NIT Warangal Page 52

that we need to encode many possible solutions to create a population. The traditional way
to represent a solution is with a string of zeros and ones. However genetic algorithms are
not restricted to this encoding. For now we will use a binary string representation.

Consider the problem defined above. Our possible solutions are obviously just numbers, so
our representation is simply the binary form of each number. For instance, the binary
representations of 12 and 7 are 1100 and 0111 respectively. Note that we added a zero to
the beginning of the string 0111 even though it has no real meaning. We did this so that all
the numbers in the set {0, . . . 15} have the same length. These strings are called
chromosomes and each element (or bit) of the string is called a gene.

We now randomly generate many chromosomes and together they are called the
population.

5.2.2 Evaluation
The evaluation function plays an important role in genetic algorithms. We use the
evaluation function to decide how good a chromosome is. The evaluation function usually
comes straight from the problem. In our case the evaluation function would simply be the
function f = 2x2 + 4x 5, and because we are trying to maximize the function, the larger
the value for f, the better. So, in our case, we would evaluate the function with the two
values 7 and 12.

f (7) = 71
f (12) = 241

Obviously 7 is a better solution than 12, and would therefore have a higher fitness. This
fitness is then used to decide the probability that a particular chromosome would be chosen
to contribute to the next generation. We would normalize the scores that we found and
then create a cumulative probability distribution. This is then used in the crossover process.


M. Tech (ACS), NIT Warangal Page 53

The stopping criteria are used in the evaluation process to determine whether or not the
current generation and the best solution found so far are close to the global optimum.
Various stopping criteria can be used, and usually more than one is employed to account for
different possibilities during the running of the program: the optimal solution is found, the
optimal solution is not found, a local optimum is found, etc. The standard stopping criteria
that is used stops the procedure after a given number of iterations. This is so that if we do
not find a local optimum or a global optimum and do not converge to any one point, the
procedure will still stop at some given time. Another stopping criterion, is to stop after the
best solution has not changed over a specified number of iterations. This will usually
happen when we have found an optimum - either local or global - or a point near the
optimum. Another stopping criteria is when the average fitness of the generation is the
same or close to the fitness of the best solution.

5.2.3 Crossover
Crossover can be a fairly straightforward procedure. In our example, which uses the
simplest case of crossover, we randomly choose two chromosomes to crossover, randomly
pick a crossover point, and then switch all genes after that point. For example, using our
chromosomes
V
1
= 0111
v2 = 1100

we could randomly choose the crossover point after the second gene

V
1
= 01 | 11
V
2
= 11 | 00

Switching the genes after the crossover point would give

V
1
= 0100 = 4

V
2
= 1111 = 15

M. Tech (ACS), NIT Warangal Page 54


We now have two new chromosomes which would be moved into the next population,
called the next generation.

Not every chromosome is used in crossover. The evaluation function gives each
chromosome a score which is used to decide that chromosomes probability of crossover.
The chromosomes are chosen to crossover randomly and the chromosomes with the
highest scores are more likely to be chosen. We use the cumulative distribution created in
the evaluation stage to choose the chromosomes. We generate a random number between
zero and one and then choose which chromosome this corresponds to in our distribution.
We do this again to get a pair, then the crossover is performed and both new chromosomes
are moved into the new generation. This will hopefully mean that the next generation will
be better than the last - because only the best chromosomes from the previous generation
were used to create this generation. Crossover continues until the new generation is full.

It is possible to check each new chromosome to make sure it does not already exist in the
new generation. This means that we will get a variety of possible solutions in each
generation, but also that once we have found the optimal solution in one chromosome, the
other chromosomes will probably not be optimal. That means that the average fitness of the
generation can never be as good as the fitness of the optimal chromosome, which could
make deciding when to stop difficult.

It is also possible to move the best solution from the previous generation directly into the
new generation. This means that the best solution can never get any worse since even if on
average the generation is worse, it will still include the best solution so far.

We can also have two point crossovers. In this case we randomly choose two crossover
points and switch the genes between the two points. In our problem we could pick the
points after the first gene and after the third gene.

V
1
= 0 | 11 | 1

M. Tech (ACS), NIT Warangal Page 55

V
2
= 1 | 10 | 0

to get

V
1
= 0101 = 5
V
2
= 1110 = 14

There are many different crossover routines. We often need to change the crossover
routine to make sure that we do not finish with an illegal chromosome - that is, an infeasible
solution. In this way, crossover is very problem specific.

5.2.4 Mutation

Mutation is used so that we do not get trapped in a local optimum. Due to the randomness
of the process we will occasionally have chromosomes near a local optimum but none near
the global optimum. Therefore the chromosomes near the local optimum will be chosen to
crossover because they will have the better fitness and there will be very little chance of
finding the global optimum. So mutation is a completely random way of getting to possible
solutions that would otherwise not be found.

Mutation is performed after crossover by randomly choosing a chromosome in the new
generation to mutate. We then randomly choose a point to mutate and switch that point.
For instance, in our example we had
V
1
= 0111
If we chose the mutation point to be gene three, v
1
would become

V
1
=0101

We simply changed the 1 in position three to a 0. If there had been a 0 in position three
then we would have changed it to a 1. This is extremely easy in our example but we do not

M. Tech (ACS), NIT Warangal Page 56

always use a string of zeros and ones as our chromosome. Like crossover, mutation is
designed specifically for the problem that it is being used on.

Inversion is a different form of mutation. It is sometimes used in appropriate cases later.
Here inversion operator on our basic example.

The inversion operator consists of randomly choosing two inversion points in the string and
then inverting the bits between the two points. For example

V
2
= 1100

We could choose the two points after gene one and after gene three.
V
2
= 1 | 10 | 0

Now, since there are only two genes between our inversion points, we then switch these
two genes to give
V
2
=1010

If we had a larger chromosome, say
V
3
= 110100101001111
we could choose the inversion points after the third point and after the eleventh point.

V
3
= 110 | 10010100 | 1111

Now, we start at the ends of the cut region and switch the genes at either end moving in.
So we get
V
3
= 110001010011111

Essentially we are just reversing (or inverting) the order of the genes in between the two
chosen points.

M. Tech (ACS), NIT Warangal Page 57

5.3 Simulation Parameters
One Hundred Wireless Sensor Nodes are deployed randomly in 100m x 100m area each with
initial energy of 1 or 2 Joule. Packet length of 1000 bits is assumed. The energy consumed in
processing of one bit of data both in transmitting and receiving electronics (E
elec
) is taken as
50nJ/bit. The energy consumed in transmitting amplifier (E
amp
) for transmitting a bit for unit
distance is taken as 100pJ/bit/m
2
. The sink or gateway is assumed at the coordinates
(25,150) so that a minimum distance of at least 50m from any node is present.

The fallowing figure shows the random deployment of WSN nodes in 100m X 100m area


Figure 5.2 Random deployment of WSN Nodes

The fallowing figure shows the chain formed in PEGASIS using Ant Colony optimisation
described earlier. The total length of the best chain is 3175 meters.
0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
100nodes random deployment
length in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s

M. Tech (ACS), NIT Warangal Page 58


Figure 5.3: Chain formations in PEGASIS Genetic Algorithm.
The fallowing figure shows the average length of all the ants vs. the best ant tour length. It
can be easily observed that the chain length falls drastically after very few iterations and
becomes almost constant after initial iterations.
0 10 20 30 40 50 60 70 80 90 100
0
10
20
30
40
50
60
70
80
90
100
gentic algorithm chain formation
200 3175.5676
length in meters
l
e
n
g
t
h

i
n

m
e
t
e
r
s

M. Tech (ACS), NIT Warangal Page 59


Figure 5.4: Average length vs. Best length of each iteration.
It can be observed from the figure the length of the chain decreases slowly and there is no
guarantee for the convergence to optimum solution.

0 20 40 60 80 100 120 140 160 180 200
2800
3000
3200
3400
3600
3800
4000
4200
4400
4600
4800
iterations
l
e
n
g
t
h

i
n

m
e
t
e
r
s
lenght of the chain


best route length
average lenghh in the iteration

M. Tech (ACS), NIT Warangal Page 60

5.4 Homogenous PEGASIS with Ant Colony Optimisation
In homogenous network all the nodes Wireless Sensor Network are having same energy of 1
Joule each.
5.4.1 Max Energy Node as Cluster Head
In this case the node having the maximum energy is selected as the cluster head. For this all
the nodes while transmitting the data to the chain leader, also indicate their current energy
and expected next state energy after the present transmission is also inserted. Thus
increasing the packet length and unnecessary, which directly drains the battery of both
transmitting and receiving nodes. Also chain leader has to transmit this high data length
packet to the base station which consumes a lot of energy. To overcome the disadvantages
of this cluster head selection in original Pegasis a new cluster head selection criteria is
proposed.

Figure5.5: Lifetime of Max Energy PEGASIS using Genetic Algorithm.

0 10 20 30 40 50 60 70 80 90 100
0
500
1000
1500
2000
2500
3000
3500
4000
100Node Network LifeTime Measurement gen hom max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 61

5.4.2 Cluster Head selected sequentially
In this case the present chain leader selects the next chain leader by just passing to the
immediate neighbour in the chain. This mechanism greatly eliminates the need for larger
packet size and conserves a lot of energy in both transmission and reception electronics.
The figure 3.7 shows the lifetime of the Wireless sensor network in this scenario.

Figure 5.6: Lifetime of Sequential PEGASIS using Genetic Algorithm.
5.4.3 Comparison of Max Energy and Sequential cluster Head scenarios
From the above figures it can be concluded that the WSN with cluster head selected
sequentially has more lifetime than the one having the max energy node as cluster head.
10% of nodes are dead at around 1700 rounds in former case and around 2500 rounds in
the latter case, an improvement of nearly 47% of the network lifetime. Similarly for 50% of
ead nodes case it is 3100 for former case and it is 4300 for later case. For 100% dead
nodecase it is 3850 and 7000 round respectively. This can be summarised in a table as
fallows.
0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
100Node Network LifeTime Measurement gen hom seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 62

GENETIC HOMO Max Energy Sequential % improvement
10% 1700 2500 47
50% 3100 4300 20.6
100% 3850 7000 81.8
Table 5.1 Lifetime comparison of Max Energy and Sequential for Homogenous WSN

Figure 5.7 Lifetime comparison of GENETIC Max Energy and Sequential cluster head
Hence selecting the cluster head sequentially greatly enhances the lifetime of the network,
although few nodes which are far away from base station die sooner than others in this
case.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of GENETIC hom max and sequence smooth


GENETIC homo max lifetime
GENETIC homo sequence lifetime

M. Tech (ACS), NIT Warangal Page 63

5.5 Heterogeneous PEGASIS with Genetic Algorithm
In heterogeneous network 80% of the nodes in Wireless Sensor Network are having energy
of 1Joule each and the remaining 20% are having 2Joule of Energy.
5.5.1 Max Energy Node as Cluster Head
In this case since 20% of nodes are having more energy, only these nodes will become
cluster head more often in the beginning of the network, soon they deplete their energy in
transmission to the base station.



Figure 5.8 Lifetime of GENETIC Heterogeneous Max Energy
Thus from the figure it can be observed that nodes having more energy are alive till the end
of the lifetime of the network.
0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
100Node Network LifeTime Measurement gen hetero max smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 64

5.5.2 Cluster Head selected sequentially
In this case although some nodes are having higher energy, all nodes become cluster head
equally. So the nodes having high energy tend to stay alive till the end of network lifetime
and also the nodes which are far away from base station die soon. Hence network operation
is not feasible after 50% of nodes die.

Figure 5.9 Lifetime of GENETIC Heterogeneous Sequential cluster head
5.5.3 Comparison of Hetero Max and Sequential scenarios
It can be observed from the above figures that 10% of node die at around 2500 round for
Max Energy where as it is 2900 round for Sequential cluster head selection. 50% of nodes
die in Max Energy case at around 5200 and it is 5600 for sequential cluster head selection.
Max energy network is completely down at 7800 rounds whereas it is 10300 for Sequential.
0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
100Node Network LifeTime Measurement GENETIC hetero seq smooth
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s

M. Tech (ACS), NIT Warangal Page 65

Genetic HETERO Max Energy Sequential % improvement
10% 2500 2900 16
50% 5200 5600 7.7
100% 7800 10300 32

Table 6.2 Lifetime comparison of Max Energy and Sequential for Heterogeneous WSN

Figure 5.10 Lifetime Comparison of Hetero Max and Sequential
5.6 Conclusion:
Hence it can be concluded that for Genetic Algorithm for both Homogenous and
Heterogeneous sequential cluster head selection maximises the lifetime of Wireless Sensor
Network lifetime. In Genetic there is not much increase in improvement, since the length of
the chain is very high, so the distance between the node is playing dominant role rather
than the packet data size. But Genetic algorithm is very simple to understand and to
formulate the process.
0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of GENETIC hetero max and sequence smooth


GENETIC hetero max lifetime
GENETIC hetero sequence lifetime

M. Tech (ACS), NIT Warangal Page 66

6. COMAPRATIVE STUDY OF GREEDY, ACO AND GENETIC ALGORITHMS

The chain formed using the Wireless Sensor Node is crucial in deciding the lifetime of the
PEGASIS protocol. The length of the chain formed using Greedy, Ant Colony Optimisation
and Genetic algorithm is compared in the fallowing figure.

Figure 6.1: Chain length comparison of GREEDY, ACO and GENETIC Algorithm.
From the figure it can be seen that the chain formed using Ant Colony Optimisation is less
compared to others.

0 20 40 60 80 100 120 140 160 180 200
500
1000
1500
2000
2500
3000
3500
4000
4500
iteration number
l
e
n
g
t
h

i
n

m
e
t
e
r
s
100comparision of chain length


GREEDY
Ant Colony Optimisation
GENETIC ALGORIYHM

M. Tech (ACS), NIT Warangal Page 67

6.1 Lifetime Comparison of Homogenous WSN

Lifetime comparison of both MAX Energy and Sequential cluster head selection for GREEDY,
ACO and GENETIC Algorithms is done.

6.1.1 Lifetime Comparison of MAX Energy

Figure 6.2 Lifetime Comparison of MAX Energy
From the above figure it can be concluded that the Genetic Algorithm lifetime is less
compared to others mainly because of the chain length is very high compared to other
algorithms. Few nodes in GREEDY algorithm die soon in the beginning itself but for ACO up
to great extent of Network Lifetime hardly any dies.

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of HOMO max lifetime


GREEDY HOMO MAX lifetime
ACO HOMO MAX lifetime
GENETIC HOMO max

M. Tech (ACS), NIT Warangal Page 68

6.1.2 Lifetime Comparison of Sequential Energy


Figure 6.3 Lifetime comparison of Sequential
From the above figure it can be concluded that the Genetic Algorithm lifetime is less
compared to others mainly because of the chain length is very high compared to other
algorithms. Few nodes in GREEDY algorithm die soon in the beginning itself but for ACO up
to great extent of Network Lifetime hardly any node dies.

0 10 20 30 40 50 60 70 80 90 100
0
2000
4000
6000
8000
10000
12000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of HOMO SEQUENTIAL lifetime


GREEDY HOMO SEQUENTIAL lifetime
ACO HOMO SEQUENTIAL lifetime
GENETIC HOMO SEQUENTIAL

M. Tech (ACS), NIT Warangal Page 69

6.2 Lifetime Comparison of Heterogeneous WSN

Lifetime comparison of both MAX Energy and Sequential cluster head selection for GREEDY,
ACO and GENETIC Algorithms is done.

6.2.1 Lifetime Comparison of MAX Energy


Figure 6.4 Lifetime Comparison of MAX Energy
From the above figure it can be concluded that the Genetic Algorithm lifetime is less
compared to others mainly because of the chain length is very high compared to other
algorithms. Few nodes in GREEDY algorithm die soon in the beginning itself but for ACO up
to great extent of Network Lifetime hardly any dies

0 10 20 30 40 50 60 70 80 90 100
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of hetero max lifetime


GREEDY hetero MAX lifetime
ACO hetero MAX lifetime
GENETIC hetero max

M. Tech (ACS), NIT Warangal Page 70

6.2.2 Lifetime Comparison of Sequential Energy


Figure 6.3 Lifetime comparison of Sequential
From the above figure it can be concluded that the Genetic Algorithm lifetime is less
compared to others mainly because of the chain length is very high compared to other
algorithms. Few nodes in GREEDY algorithm die soon in the beginning itself but for ACO up
to great extent of Network Lifetime hardly any dies
6.3 Conclusion
Chain formed by Ant Colony Optimisation is of least length compared to Greedy and Genetic
Algorithm, because of good global optimisation characteristics of the Ant Colony
Optimisation. The rate of convergence of Ant Colony optimisation is also very fast compared
to other algorithms. The chain is optimised to a great extent within little iteration itself.
The WSN Lifetime is high in case of Sequential cluster head selection since the length of the
data packet is less compared to Max Energy cluster head selection criteria.

0 10 20 30 40 50 60 70 80 90 100
0
5000
10000
15000
number of dead nodes in percentage
n
u
m
b
e
r

o
f

r
o
u
n
d
s
100comparision of HETERO Sequentail lifetime


GREEDY HETERO SEQUENTIAL lifetime
ACO HETERO SEQUENTIAL lifetime
GENETIC HETERO SEQUENTIAL

M. Tech (ACS), NIT Warangal Page 71

7. CONCLUSION

7.1 Introduction
The research carried out for this thesis, investigates energy efficient routing algorithms
related to WSNs. A new cluster head selection criteria and maintenance of priority queue at
each node is proposed. This increases the life of WSNs. Ant Colony Optimisation and Genetic
Algorithms are used in making the chain of PEGASIS. Lifetime of WSN under various
scenarios has been investigated. These chapter summaries the work reported in this thesis,
specifying the limitations of the study and provides some suggestions to future work.
Following this introduction, section 7.2 lists the achievements of the research work. Section
7.3 presents some of the future research area that can be extended to this thesis.

7.2 Contribution of Thesis

The first chapter of the thesis introduced to Wireless Sensor Networks, literature survey and
its architecture. It also provides a brief overview of the thesis. The second chapter discussed
routing algorithms in Wireless Sensor Networks. It presented the literature survey of
PEGASIS routing protocol and of Evolutionary algorithms. The chapter 3 described the
PEGASIS protocol and chain formation using GREEDY algorithm. It also gave radio power
model of WSN and various simulation parameters. The chapter 4 described Ant Colony
Optimisation for minimisation of chain length in PEGASIS, thus contributing to the lifetime
of the WSN. The chapter 5 described Genetic Algorithm. The results of studies have been
presented. The chapter 6 presented the comparative study of GREEDY, ACO and Genetic
algorithms. The chain length and Lifetime of PEGSIS using GREEDY, ACO and Genetic
Algorithm has been compared.

The first contribution of the thesis related to use of sequential cluster head for PEGASIS by
eliminating the overhead, enhances the lifetime of the WSNs. Instead of sending the Energy
status of all the nodes to base station, the next cluster head is selected by the present chain
leader, thus contributing to higher lifetime of Wireless Sensor Network by reduced packet

M. Tech (ACS), NIT Warangal Page 72

size. To validate the algorithm Simulations had been carried out using MATLAB. Simulation
results showed better performance of Sequential as compared to MAX energy in terms of
performance metrics like number of alive nodes and total WSN lifetime.

ACO provides better lifetime for nodes compared to other models. It is also seen that ACO is
able to provide high percentage of nodes live for maximum duration. The chain length
formed ACO is least and converges to the optimum in very little iteration. Hence, it suits
most of application of WSNs which require constant monitoring and sending sensed data
packets to a sink at regular intervals of time.

7.3 Future Directions

To conclude the thesis, the following are some suggestions for the future work which can be
done. In this thesis, ACO and Genetic algorithms have been used. Other bio-inspired
algorithms like Stimulated Annealing, Bacterial Forage optimization, artificial Immune
system (significant time and power consuming) can also be compared to ACO and Genetic
algorithm, but the challenge of reducing computational complexity still remains.
Comparable study of computational complexity of different algorithm need to be analysed.

Secondly, security parameter has not been evaluated in this thesis. So, new security based routing
protocols for Wireless Sensor Networks and its validation can be a field of study. Further, the
proposed protocols have to be dumped into WSN nodes and can be tested in a real time
application.



M. Tech (ACS), NIT Warangal Page 73

8. REFERENCES

1. W. Heinzelman, A. Chandrakasan and H. Balakrishnan, Energy-Efficient Communication
Protocol for Wireless Microsensor Networks, International Conference on System
Sciences, vol. 2, Jan. 2000.

2. W. Heinzelman, A. Chandrakasan and H. Balakrishnan, An Application-Specific Protocol
Architecture for Wireless Microsensor Networks, IEEE Trans. Wireless Comm., vol. 1,
pp. 660-670, Oct. 2002.

3. K. Nakano and S. Olariu, Energy-Efficient Initialization Protocols for Single-Hop Radio
Networks with No Collision Detection, IEEE Trans. Parallel and Distributed Systems, vol.
11, no. 8, Aug.2000.

4. K. Nakano and S. Olariu, Randomized Initialization Protocols for Ad Hoc Networks,
IEEE Trans. Parallel and Distributed Systems, vol. 11, no.7, July 2000.

5. Shio Kumar Singh, M P Singh and D K Singh, Applications Classifications, and Selections
of Energy-efficient Routing protocols for Wireless Sensor Networks, vol.1,pp.085-095,
2010.

6. TANG Yong, ZHOU Ming-tian, and ZHANG Xin, Overview of Routing Protocols in
Wireless Sensor Networks, Journal of Software, vol.17, pp.410-421, March 2006.

7. W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan, Energy efficient
communication protocol For wireless micro sensor networks, Proceedings of the
Hawaii Conference on System Sciences, 2000, pp.3005-3014.

8. S. Lindsey, and C. Raghavendra, PEGASIS: Power-efficient gathering in sensor
information systems, IEEE Aerospace Conference Proceedings, pp.1125-1130, 2002.

9. T. S. Rappaport, Wireless communications: Principles and Practice, Prentice Hall, July
1996.

10. S Ghiasi, Srivastava A., X. Yang, and M. Sarrafzadeh, Optimal energy aware clustering in
sensor networks, 2002.

11. C. Zhou and B. Krishnamachari Localized topology generation mechanisms for wireless
sensor networks, Global Telecommunications Conference (GLOBECOM), IEEE, vol. 3,
2003.

12. M. Younis K.Akkaya, "A survey on routing protocols for wireless sensor networks," Ad
Hoc Networks, vol. 3, no. 3, pp. 325-349, 2005.

13. Cosmin Cirstea, Energy Efficient Routing Protocols for Wireless Sensor Networks: A
Survey, IEEE International Symposium on Design and Technology in Electronic
Packaging (SIITME), pp.277-282, Oct 2011.

M. Tech (ACS), NIT Warangal Page 74


14. S. Lindsey and C. Raghavendra, PEGASIS: Power-Efficient Gathering in Sensor
Information Systems, IEEE Aerospace Conference, vol. 3, pp. 1125-1130, Mar. 2002.

15. Dali Wei, Yichao Jin, Serdar Vural, Klaus Moessner, Rahim Tafazolli, An Energy-Efficient
Clustering Solution for Wireless Sensor Networks, IEEE Transactions on Wireless
Communications, pp. 3973-3983, 2011.

16. Ossama Younis, Sonia Fahmy, HEED: A Hybrid, Energy-Efficient, Distributed Clustering
Approach for Ad Hoc Sensor Networks, vol. 3, NO. 4, pp.366-379, Oct. 2004,

17. Deng Zhixiang and Qi Bensheng, Three-layered Routing Protocol for WSN Based on
LEACH Algorithm Wireless Mobile and Sensor Networks, (CCWMSN07), pp.72-75,
2007.

18. Indu Shukla, Power Efficient Gathering in Sensor Information System (PEGASIS
Protocol).

19. Jian Wan, Daomin Yuan, Xianghua Xu, A Review of Routing Protocols in Wireless
Sensor Networks, International Conference on Wireless Communications, Networking
and Mobile Computing (WiCOM), pp. 1-4, 2008.

20. Tao Liu and Feng Li, Power-efficient Clustering Routing Protocol Based on Applications
in Wireless Sensor Network, International Conference on Wireless Communications,
Networking and Mobile Computing (WiCom), pp. 1-6, 2009.

21. Zheng Gengsheng, Liu Xiaohua and Hu Xingming, The Research of Clustering Protocol
Based on Chain Routing In WSNs, International Conference on Computational
Intelligence and Industrial Applications (PACIIA), pp.292-295, 2009.

22. Hao Wu, A Chain-based Fast Data Aggregation Algorithm Based On Suppositional Cells
for Wireless Sensor Networks, International Conference on Power Electronics and
Intelligent Transportation System (PEITS), vol. 1, pp. 106-109, 2009.

23. Hyunduk Kim, Boseon Yu, Wonik Choi, Moonju Park and Jinseok Chae, Distance Based
Pre-Cluster Head Selection Scheme for a Chain-Based Protocol, IEEE International
Conference on Computer and Information Technology (CIT), pp. 110-115, 2009.

24. M. Tabibzadeh, M. Sarram and F. Adibnia, Hybrid Routing Protocol for Prolonged
network Lifetime in Large Scale Wireless Sensor Network, International Conference on
Information and Multimedia Technology, pp.179-183, 2009.

25. Wenjing Guo, Wei Zhang and Gang Lu, PEGASIS Protocol in Wireless Sensor Network
Based on an Improved Ant Colony Algorithm, International Workshop on Education
Technology and Computer Science, pp.64-67, 2010.


M. Tech (ACS), NIT Warangal Page 75

26. Young-Long Chen, Jia-Sheng Lin, Yung-Fa Huang, Fu-Kai Cheung and Jen-Yung Lin,
Energy Efficiency of a Chain- Based Scheme with Intra-Grid in Wireless Sensor
Networks, International Symposium on Computer, Communication, Control and
Automation, vol.2, pp.484-487, 2010.

27. Yong chang Yu and Yichang Song, An Energy-Efficient Chain-Based Routing Protocol in
Wireless Sensor Network, International Conference on Computer Application and
System Modeling (ICCASM), vol.11, pp. 486-489, 2010.

28. Feng sen, Qi Bing and Tang Liangrui An Improved Energy-Efficient PEGASIS-Based
Protocol in Wireless Sensor Networks, International Conference on Fuzzy Systems and
Knowledge Discovery (FSKD), 2011.

29. Young-Long Chen, Neng-Chung Wang, Chin-Ling Chen and Yu-Cheng Lin A Coverage
Algorithm to Improve the Performance of PEGASIS in Wireless Sensor Networks,
International. Conference on Software Engineering, Artificial Intelligence, Networking
and Parallel/Distributed Computing, vol. 4, pp. 2230-2233, 2011.

30. S. Lindsey, C. Raghavendra, and K.M. Sivalingam, Data gathering algorithms in sensor
networks using energy metrics, IEEE Trans. Parallel and Distributed Systems, vol. 13,
no. 9, pp. 924-935, Sept. 2002.

31. S. D. Muruganathan, D. C. F Ma., R. I. Bhasin and A. O. Fapojuwo, A Centralized Energy-
Efficient Routing Protocol for Wireless Sensor Networks, IEEE Communications
Magazine, pp. 8-13, March 2005.

32. S. Madden, R. Szewczyk, M. J. Franklin, and D. Culler, Supporting Aggregate Queries
Over Ad-Hoc ireless Sensor Networks, IEEE Workshop on Mobile Computing and
Systems Applications, 2002.

33. K. Kalpakis, K. Dasgupta, and P. Namjoshi, Maximum Lifetime Data Gathering and
Aggregation in wireless Sensor Networks, IEEE Networks Conference, 2002.

34. Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Hari Balakrishnan, Energy
Efficient Communication Protocol for Wireless Micro sensor Networks, Hawaii
International Conference on System Sciences, Jan. 2000.

35. M. Dorigo and G. Di Caro, Ant colony optimization: A new meta-heuristic.

36. A. Colorni, M. Dorigo, V. Maniezzo, Distributed optimization by ant colonies,
European Conference on Artificial Life, pp. 134-142, 1991.

37. Belghachi Mohamed and Feham mohammed, QoS Based on Ant Colony Routing for
Wireless Sensor Networks, International Journal on Computer Science and
Telecommunications, vol. 3, Jan. 2012.


M. Tech (ACS), NIT Warangal Page 76

38. M M chandane, S G Bhirud and S V Bonde, Distributed Energy Aware Routing Protocol
for Wireless Sensor Networks International Journal of Computer Applications, vol. 34,
Nov. 2011.

39. K Saleem , N Fisal, S Hafizah, S Kamilah and R A Rashid, A Self Optimised Multipath
Routing Protocol for Wireless Sensor Networks, International Journal of Recent Trends
in Engineering, vol. 2, Nov. 2009.



M. Tech (ACS), NIT Warangal Page 77

You might also like