Comparison of LEACH and PEGASIS Hierarchical Routing Protocols in WSN

— Wireless Sensor Networks is a group of sensor nodes dispatched in a geographical area for a defined objective. These sensor nodes are characterized by limited capacity of communicating, computing and especially of energy. The performance of these WSN is resting on a good routing protocol, hence the need to choose the routing protocol able to satisfy the wsn's objectives, and to satisfy the common challenge to prolong network life time. Several routing concepts have been proposed for the WSN, hierarchical routing is one of the most used concepts. It is divided into 3 types: cluster-based routing, grid-based routing and chain-based protocol. In this paper, we are interested to Study, analyse and compare two popular routing protocols for Wireless sensor networks (WSNs), Low-Energy Adaptive Clustering Hierarchy (LEACH) using clusters-based concept and Power-Efficient Gathering in Sensor Information System (PEGASIS) with chain-based concept. The both protocols are simulated with Matlab simulator, in order to evaluate its performances against the different users and the WSNs objectives defined.


Introduction
Technological progress advances in a very fast way in our daily life. This progress concerns the various areas, such as military, security surveillance, medical and health, habitat monitoring [1][2]. Hence, The WSNs are becoming interesting for these applications.
Wireless Sensor Networks consists of a large number of sensor nodes deployed over a geographical area. The objective is to monitor physical or environmental conditions and to transmit the data collected to the Base station.
These sensors have limited capacities of energy and usually their batteries cannot be recharged or changed [1][2]. The sensor's energy influences the lifetime of a network and the failure of its energy can cause the reorganization of the entire network.
One of the key challenges is to use the sensor's energy intelligently to improve its life. The intelligent use of energy depends mainly on the routing protocol used [13].

Classification of Routing Protocols in WSN
The routing protocols in WSNs can be classified with several criteria. According to network structure, these routing protocols can be classified as Flat, Hierarchical and Location-based protocols.

Location based protocols
These protocols exploit the position information to transmit the signal by using Different techniques to find location of the node. The main idea is to choose the best route for reducing the energy consumption. The distance between neighboring nodes is calculated on the basis of incoming signal strengths.
In this routing, the inactive nodes sleep to save the energy.

Flat-based routing
In Flat-based routing multi-hop techniques is used. All nodes play the same functionalities and collaborate of theme to perform the sensing task are assigned the same roles or functionalities. Flat network architecture presents several advantages, including minimal overhead to maintain the infrastructure between communicating nodes.

Hierarchical protocols topology
In this type; the nodes are grouped into clusters, respecting to specific metrics. The clusters are formed of many ordinary nodes and one leader node named cluster head (CH). This CH is responsible to make the special tasks such as collect data, aggregation data, transmit data to others CHs or to the BS [6]. The hierarchical protocols present a good concept to minimize energy consumption within the network, this through the data aggregation methods used, in order to decrease the load of messages received by the BS [6]. Hence, these protocols are designed to use minimum energy during sensing, processing and transmission. Low Energy Adaptive Clustering Hierarchy (LEACH) LEACH is one of the most popular clustering protocols in WSN. It is a distributed algorithm proposed by W. R. Heinzelman, A. P. Chandrakasan and H. Balakrishnan [3]. Several protocols have relied on LEACH to present their concepts like TEEN, PEGASIS [4]. The nodes in LEACH have autonomous decisions to become CH without any BS control. The concept used allows selecting the CHs periodically and randomly [2]. The main idea is allowing every node to become a CH at least once of N/K a round, where N is the number of nodes in the network and K is the desired number of clusters.
The main objective is to minimize the energy consumed by the nodes, through distribute energy with in a balanced manner between nodes, in order the extend network lifetime. The algorithm is divided into two main phases: Set-up phase: In this phase, the clusters are formed and the CHs are selected. To select CHs, each node determines a random number between 0 and 1. this number is compared with a threshold value T (i).T(i) is defined as follows: Where r is the number of the current period, P is the desired percentage of CHs, and G is the set of nodes that have not been selected as CH during the last 1/P periods.
Two cases are to be envisaged. The nodes can become CH, if the random number is less than T (i) value; otherwise it becomes an ordinary node.
After choosing the CHs, the ordinary nodes join their cluster by choosing their cluster head following the received signal amplitude, in case of equality, the nodes choose the CH randomly.
Transmission phase: Once the CHs are formed their clusters, each cluster head will create a TDMA schedule for its members. Each CH collected data from its nodes, fuses this data and transmit an aggregated packet to the base station.  Table 1.
LEACH advantages / disadvantages Advantages Disadvantages -Reduce the control messages overhead -Low complexity algorithm Local compression to reduce global data communication [1].
-Uniform distribution of Chs is not offered -randomly CH election [2] -Send data using 1-Hop concept Centralized LEACH (LEACH-C): This protocol represents a new version of LEACH, to enhance their limitations. Leach-C integrates a new method of cluster formation. The CHS are elected according to their Location and residual energy. Each node transmits its residual energy and location by using GPS to the BS of each node. According to this information, the BS station selects nodes that become CH and organizes other nodes into clusters by assigning each node to its appropriate CH Then, it determines the nodes to become CHs and the others nodes are signed to the CHs to form different clusters. An average energy is defined to select nodes that can become a CH: • If average energy > node energy: the node is not considered in CHs selection.
• If average energy < = node energy: the node is considered in CHs selection.

Energy-LEACH (E-LEACH): E-LEACH improves LEACH by electing CHs according to their residual energy.
Two-level LEACH (TL-LEACH): TL-LEACH represents an enhanced LEACH version by proposing a new strategy in transmission phase. Each CH gathers data from nodes of its cluster. After that, the data is transmitted to CH responsible to transfer data to BS. This CH is responsible to transmit collected data from all CH to the BS.
Multi Hop LEACH (M-LEACH): Multi Hop LEACH proposes an improvement regarding the transmission of data between CHs and BS. Each CH collects data from its cluster members and transmits the aggregate packet to the nearest CH. The optimal path between the CH and BS using others CHs, is discovered by the protocol. CHs used by the path represent the relay to transmit data over through them.
Vice-Leach protocol (V-LEACH) [5]: V-LEACH introduces a new nodes status called Vice CH. It presents the next node that will be the new CH, when the current CH exhausts its residual energy.
The aim objective of V-LEACH protocol is to avoid the execution of the CH election operation in each round, in order to minimize the energy consumption and prolong network life time.

Pegasis (Power-Efficient Gathering in Sensor Information Systems)
PEGASIS [7] is a routing protocol which a chain-based approach is followed by using greedy algorithm. Each node communicates only with its close neighbor, and the leader is responsible to transmit the data collected to the BS.
PEGASIS allows nodes to have just the connection with their close neighbors, in order to minimize the volume of data transmission in the network by data aggregation [8].
In chain construction phase, the furthest node from the BS represents the first node will be added to the chain, and then its closest neighbors represent the next node to be attached to chain and so on until reaching the last node in the network.
In data transmission phase, each node receives data from its nearest neighbor, fuses it with its data and sends it to its next neighbor in the chain. The operation continues until reach the head of the chain, which responsible to transmit the aggregated data from all nodes to the BS.  Table 3.

Advantages Disadvantages
The energy in the chain is distributed with uniform manner between nodes -Reduction of the charges caused by clustering -Minimizing the number of transmissions and receptions -Long delay in sending and receiving information ---The nodes must have a global knowledge of the network -IL Inadequate for variable network topology

Pegasis Enhancements Protocols
Several protocols have been proposed to improve PEGASIS; and resolve its drawbacks. These key protocols are:

Energy efficient PEGASIS (EEPB)
The EEPB [9] algorithm is an enhancement of PEGASIS; the main idea is to avoid long chain between the nodes proposed in PEGASIS. In the beginning, EEPB computes the distance between each node from the formed chain. After that, a threshold is calculated from the average distance of the formed chain.
In EEPB, there are mainly 3 phases: Node selection: A node source S sends a route request message to have a distance between each node from the node S. It selects the node with the short distance for transmitting its data. The selected neighbours will act source for other nodes which have not joined the chain yet.

Chain construction phase:
The chain is formed, with two parameters, Dthreshold and Daverage. D average is the average distance in the formed chain that is calculated by: Where; the distance of every segment in the formed chain is given by Dp, where (p=1, 2, 3 …h).
And, Dthreshold is the threshold distance that is calculated by, Dthreshold=α Daverage, where α is a user defined constant.
When the node A sends to node B the packet message to join the chain, Daverage and Dthreshold are calculated. A chaining message is sent by the node B to all nodes that haven't yet joined the chain. We found 2 cases: • If the distance is less than Dthreshold, the node will join the chain • If the distance is more than Dthreshold, it cannot join the chain; and it will continue its search operation until found a node that is nearest to node B than itself.

Data transmission phase:
Once the chain is constructed, the transmission of data debuts by the end node of the chain. Each node receives the data from its neighbor, fuses it with its data and transmits the aggregated packet to next node in the chain. This operation continues until the leader is reached. The leader transmits the data received to the BS.

Pegasis-Ant
PEGASIS-ANT [10] makes use of ANT colony algorithm instead of greedy algorithm used in PEGASIS to construct the data chain. The main objective is to make more even-distributed path and reduce the transmission distance.
The functioning of PEGASIS ANT is described in the following steps: Chain building: The chain is constructed by using Ant Colony Optimization algorithm (ACO). Leader Selection in each round, the node with the highest energy among all nodes is responsible to communicate with the BS.
Data transmission: The same concept in PEGASIS is used. Each node receives data from its closest neighbour, fuses it with its own data and sends it to other neighbor in the direction of leader. The operation continues until reach the head of the chain, which responsible to transmit the aggregated data from all nodes to the BS. Table 5.

PEGASIS-ANT advantages / disadvantages
Advantages Disadvantages -ACO minimizes the distance between nodes more than greedy algorithm. -It constitutes the chain that reduces the transmission distance and makes the path more distributed.
-To balance the node's energy consumption offers the extension of network life time -The algorithm requires that the BS must have the position and energy level of all the nodes

Hierarchical PEGASIS H-PEGASIS [11]
The aim objective is to solve the major problem generated by PEGASIS; delay during data transmission phase.
The idea of H-PEGASIS is to integrate two parameters to solve this problem: energy and delay metric. It adopts the parallel transmissions to minimize the long transmission delay in PEGASIS.
To solve the interference and collision problem, H-PEGASIS uses two approaches: the CDMA concept and only separate nodes can transmit data simultaneously at the same time.
H-PEGASIS uses the hierarchical to form the chain by all nodes. At each level a cluster head is chosen, and it responsible to collect the data from the neighboring nodes. In first level, all odd nodes are selected and the even nodes send the facts to its closest odd node; after that; each node transmits its data to closest odd node and so on; until reach the BS.  Table 6.
H-PEGASIS advantages / disadvantages Advantages Disadvantages -Using parallel transmission to reduce the delay significantly.
-It considers the energy delay metric in order to resolve the data gathering problem -It requires the global knowledge for the network: it is not easy to obtain this information in certain situations.

Simulation Results
We simulated the both protocols LEACH and PEGASIS with MATLAB simulator, for comparison and performance analysis.
Simulation parameters taken are shown in the table:

Network topology
The figure below represents the distribution of the nodes in the network surface and the distance to the BS in the both protocols.

Number of alive nodes
The graph shows the number of alive nodes in the network with respect to time.  On the graph above, we represent the time in x-axis, and y-axis represents the number of alive nodes, the result shows that: PEGASIS offers the stability to the network until the 1150 rounds. 50% of nodes in the network die at approximately 3400 rounds and 100% nodes die at 3700 rounds. Thus, PEGASIS's load sharing technique works well.
In LEACH, the network remains stable until 900 rounds. 50% of nodes in the network die at approximately 1559 rounds and 100% nodes die at 2381rounds. PEGASIS achieves better results than LEACH in terms of node and network lifetime. PEGASIS extends the network more than LEACH.

Discussion
In the previous section, different simulations are established in order to evaluate the both protocols LEACH and PEGASIS performance; To Compare their approach used to minimize energy consumption in wireless sensor network: PEGASIS offers more energy efficient for WSN than LEACH, in terms of energy consumption and packet transmission. It extends lifetime of the network than LEACH, due to its energy efficiency performance and the minimization of the distance between nodes.

Conclusion
During this work we have studied the working LEACH and PEGASIS Routing protocols for wireless sensor networks and their enhanced protocols, the both protocols are simulated in and evaluated with Matlab simulator.
We concluded that, PEGASIS performs LEACH in our simulation network parameters and had good results. However, these results may not be satisfactory in other parameters like in larger areas with a high number of nodes. Long delay is generated in sending information due to the long chain constructed. The transmission approach used by PEGASIS, each transmits its data to closest neighbour is sometimes not form the overall optimal path for transmission.
By proposing solution for realization of these assumptions PEGASIS's of combining the both protocols can be improved practically. This will be the subject of a proposed new protocol in our future works.