Hierarchical Adaptive Balanced Routing Protocol for Energy Efficiency in Heterogeneous Wireless Sensor Networks

which is crucial for many applications. We study the


Introduction
Wireless sensor networks (WSNs) are composed of many homogeneous or heterogeneous sensor nodes with limited resources. Routing techniques are the most important issue for networks where resources are limited. WSNs technology's growth in the computation capacity requires these sensor nodes to be increasingly equipped to handle more complex functions. Each sensor is mostly limited in their energy level, processing power and sensing ability. Thus, a network of these sensors gives rise to a more robust, reliable and accurate network. Lots of studies on WSNs have been carried out showing that this technology is continuously finding new application in various areas, like remote and hostile regions as seen in the military for battle field surveillance, monitoring the enemy territory, detection of attacks and security etiquette. Other applications of these sensors are in the health sectors where patients can wear small sensors for physiological data and in deployment in disaster prone areas for environmental monitoring. It is noted that, to maintain a reliable information delivery, data aggregation and information fusion that is necessary for efficient and effective communication between these sensor nodes. Only processed and concise information should be delivered to the sinks to reduce communications energy, prolonging the effective network lifetime with optimal data delivery.
An inefficient use of the available energy leads to poor performance and short life cycle of the network. To this end, energy in these sensors is a scarce resource and must be managed in an efficient manner. In this chapter we propose Hierarchical Adaptive Balanced energy efficient Routing Protocol (HABRP) to decrease probability of failure nodes and to prolong the time interval before the death of the first node (stability period) and increasing the lifetime in heterogeneous WSNs, which is crucial for many applications. We study the impact of heterogeneity of nodes, in terms of their energy, in wireless sensor networks that are hierarchically clustered. In these networks some high-energy nodes called NCG nodes (Normal node|Cluster Head| Gateway) are elected "cluster heads" to aggregate the data of their cluster members and transmit it to the chosen "Gateways" that requires the minimum communication energy to reduce the energy consumption of cluster head and decrease probability of failure nodes and properly balance energy dissipation. Simulation result shows an improvement in effective network lifetime and increased robustness of performance in the presence of energy heterogeneity.
The organization of this chapter is as followings: We briefly review related work in section 2. Section 3 describes heterogeneous sensor network. Sensor network models is analysed in section 4. In section 5, we present our HABRP protocol. Simulation results of the proposed protocol are discussed in terms of energy consumption, Length of stable region for different values of heterogeneity, number of alive nodes per round, variation of the Base Station location, sensitivity to degree of heterogeneity in large scale networks, improvement of stability period in section 6. Finally, in section 7, we conclude the chapter.

Related works
The main aim of hierarchical routing is to efficiently maintain the energy consumption of sensor nodes by involving them in multi-hop communication within a particular cluster and by performing data aggregation and fusion in order to decrease the number of transmitted messages to the sink. LEACH (W. Heinzelman et al., 2000) is one of the first hierarchical routing approaches for sensors networks. The idea proposed in LEACH has been an inspiration for many hierarchical routing protocols. We explore recent works in this section.

Low-energy adaptive clustering hierarchy (LEACH)
Low-energy adaptive clustering hierarchy (LEACH) (W. Heinzelman et al., 2000) is one of the most popular hierarchical routing algorithms for sensor networks. The idea is to form clusters of the sensor nodes based on the received signal strength and use local cluster heads as routers to the sink. This will save energy since the transmissions will only be done by such cluster heads rather than all sensor nodes.
All the data processing such as data fusion and aggregation are local to the cluster. Cluster heads change randomly over time in order to balance the energy dissipation of nodes. This decision is made by the node S choosing a random number x between 0 and 1. The node becomes a cluster head for the current round if the number x is less than the following threshold: Where is desired percentage of cluster head nodes in the sensor network, is current round number, and is the set of nodes that have not been cluster heads in the last 1/ rounds. LEACH achieves over a factor of 7 reduction in energy dissipation compared to direct communication and a factor of 4-8 compared to the minimum transmission energy routing protocol (Akkaya & Younis, 2005). The nodes die randomly and dynamic clustering increases lifetime of the system. LEACH is completely distributed and requires no global knowledge of network. However, LEACH uses single-hop routing where each node can transmit directly to the cluster-head and the sink. Therefore, it is not applicable to networks deployed in large regions. Furthermore, the idea of dynamic clustering brings extra overhead, e.g. Head changes, advertisements etc., which may diminish the gain in energy consumption.

Power-Efficient Gathering in Sensor Information Systems (PEGASIS)
This is improved version from LEACH. The main idea of PEGASIS (Lindsey & Raghavendra, 2002) is that nodes are formed into a chain where each node receive from and transmit to closest neighbor only. The distance between sender and receiver is reduced as well as decreasing the amount of transmission energy. To construct a chain, PEGASIS uses a greedy algorithm that starts from the farthest node from the base station. In Fig.2, the algorithm starts with node 0 that connects to node 3. Then, node3 connects to node 1 and node 1 connects to node 2, which is the closest one to the base station . Because nodes already in the chain cannot be revisited, the neighbor distance will increase gradually. When a node dies (out of battery), the chain will be reconstructed by repeating the same procedure to bypass the dead node.
In one round of transmission, a randomized node is appointed to be the leader to transmit data to . If the locates outside the range of this node, multi-hop transmission will be employed. The leader will be changed randomly in every round, so that overall energy dissipation is balanced out. For transmitting a packet in each round, a token is used that passing from the one end of the chain to the other end of the chain. Only node that has a token can transmit a data packet to its intermediate node in the chain. When intermediate node receives data from one neighbor along with a token, it fuses the data packet with its own data and transmits a new data packet to the next node in the chain.  fig.3, C0 will pass its data and token to C1. C1 fuses a data packet with its own data and pass a new data packet to the leader C2. C2 does not transmit a data packet to BS yet, but rather it passes a token to C4. When C2 receives a data from C4 and C3, it fuses and transmits the sensed data to BS.

A Stable Election Protocol (SEP)
A Stable Election Protocol (SEP) (G. Smaragdakis et al, 2004) is improved version of LEACH protocol. Main aim of it was used heterogeneous sensor in wireless sensor networks. This protocol have operation like LEACH but with this difference that, in SEP protocol sensors have two different level of energy. SEP based on weighted election probabilities of each node to become cluster head according to their respective energy. This approach ensures that the cluster head election is randomly selected and distributed based on the fraction of energy of each node assuring a uniform use of the nodes energy.
In SEP, two types of nodes (normal and advanced) are considered. It is based on weighted election probabilities of each node to become cluster head according to the remaining energy in each node. This prolongs the stability period i.e. the time interval before the death of the first node. (Qing et al, 2006) proposed a distributed energy efficient clustering scheme for heterogeneous wireless sensor networks, which is called DEEC. In DEEC, the cluster heads are elected by a probability based on the ratio between residual energy of each node and the average energy of the network. The epochs of being cluster heads for nodes are different according to their initial and residual energy.

Distributed energy efficient clustering algorithm for heterogeneous wireless sensor networks
The authors have assumed that all the nodes of the sensor network are equipped with different amount of energy, which is a source of heterogeneity. DEEC is also based on LEACH protocol, it rotates the cluster head role among all nodes to expend energy uniformity.
Two levels of heterogeneous nodes are considered in the algorithm and after that a general solution for multi-level heterogeneity is obtained. To avoid that each node needs to know the global knowledge of the networks, DEEC estimates the ideal value of network lifetime, which is used to compute the reference energy that each node should expend during a round. Simulation results show that DEEC achieves longer lifetime and more effective messages than LEACH, SEP and LEACH -E. (S. Ben alla et al. 2010) proposed Improved and Balanced LEACH (IB-LEACH), in which some high energy nodes elect themselves to be gateway at any given time with a certain probability. Base station confirms that whether those nodes suit to be gateway. These nodes broadcast their status to the other sensors in the network using advertisement message (ADV). The non -gateway nodes elect themselves to be cluster heads with a certain probability. These cluster head nodes broadcast their status to the other sensors in the network using advertisement message (ADV). The non-cluster head nodes wait the cluster head announcement from other nodes. Each sensor node determines to which cluster it wants to belong by choosing the cluster head that requires the minimum communication energy, and send the join -request (Join-REQ) message to the chosen cluster head, and the cluster head nodes wait for join-request message from other nodes.

Improved and balanced LEACH for heterogeneous wireless sensor networks
Each cluster head collect and aggregate the data of their cluster members and transmit it to the chosen gateways that requires the minimum communication energy to reduce the energy consumption of cluster head and decrease probability of failure nodes. Simulation results show that this protocol performs better than LEACH and SEP in terms of network lifetime. (Du & Lin, 2005) proposed a cluster head relay (CHR) routing protocol for heterogeneous sensor networks. This protocol uses two types of sensors to form a heterogeneous network with a single sink: a large number of low-end sensors, denoted by L-sensors, and a small number of powerful high-end sensors, denoted by H-sensors. Both types of sensors are static and aware of their locations using some location service. Moreover, both L-sensor and H-sensors are uniformly and randomly distributed in the sensor field.

Cluster head relay routing protocol for heterogeneous sensor networks
The CHR protocol partitions the heterogeneous network into clusters, each being composed of L-sensors and led by an H-sensor. Within a cluster, the L-sensors are in charge of sensing the underlying environment and forwarding data packets originated by other L-sensors toward their cluster head in a multi-hop transmission. The H-sensors, on the other hand, are responsible for data fusion within their own clusters and forwarding aggregated data packets originated from other cluster heads toward the sink in a multi-hop transmission using only cluster heads. While L-sensors use short-range data transmission to their neighboring H -sensors within the same cluster, H-sensors perform long-range data communication to other neighboring H-sensors and the sink. Simulation results demonstrate that CHR performs better than directed diffusion and SWR. (LI Han, 2010) proposed an energy efficient cluster head election protocol for heterogeneous wireless sensor networks and using the improved Prim's algorithm to construct an inter cluster routing. He has considered three types of sensor nodes. Some fraction of the sensor nodes are equipped with the additional energy resources than the other nodes. He has assumed that all the sensor nodes are uniformly distributed.

Energy efficient cluster head election protocol for heterogeneous wireless sensor networks
In this protocol, the cluster head node sets up a TDMA schedule and transmits this schedule to the nodes in the cluster. This ensures that there are no collisions among data messages and also allows the radio components of each non-cluster head node to be turned off at all times except during their transmit time, thus minimizing the energy dissipated by the individual sensors.
In order to reduce the energy consumption of the cluster heads which are far away from the base station and balance the energy consumption of the cluster heads which are close to the base station, a multi-hop routing algorithm of cluster head has been presented, which introduces into the restriction factor of remainder energy when selects the interim nodes between cluster heads and base station, and also the minimum spanning tree algorithm has been included. The protocol can not only reduce the consumption of transmit energy of cluster head, but also the consumption of communication energy between non-cluster head and cluster head nodes. Simulation results show that this protocol performs better than LEACH and EECHE in terms of network lifetime.

Heterogeneous wireless sensor networks
This section presents a paradigm of heterogeneous wireless sensor network and discusses the impact of heterogeneous resources (Yarvis ,2005) (V. Katiyar, 2011)

Types of heterogeneous resources
There are three common types of resource heterogeneity in sensor nodes: computational heterogeneity, link heterogeneity and energy heterogeneity.
Computational heterogeneity means that the heterogeneous node has a more powerful microprocessor and more memory than the normal node. With the powerful computational resources, the heterogeneous nodes can provide complex data processing and longer-term storage.
Link heterogeneity means that the heterogeneous node has high bandwidth and longdistance network transceiver than the normal node. Link heterogeneity can provide a more reliable data transmission.
Energy heterogeneity means that the heterogeneous node is line powered or its battery is replaceable.
Among above three types of resource heterogeneity, the most important resource heterogeneity is the energy heterogeneity because both computational heterogeneity and link heterogeneity will consume more energy resource.
If there is no energy heterogeneity, computational heterogeneity and link heterogeneity will bring negative impact to the whole sensor network, i.e ., decreasing the network lifetime.

Impact of heterogeneity on wireless sensor networks
Placing few heterogeneous nodes in the sensor network can bring following benefits: Decreasing latency of data transportation: Computational heterogeneity can decrease the processing latency in immediate nodes and link heterogeneity can decrease the waiting time in the transmitting queue. Fewer hops between sensor nodes and sink node also mean fewer forwarding latency.
Prolonging network lifetime: The average energy consumption for forwarding a packet from the normal nodes to the sink in heterogeneous sensor networks will be much less than the energy consumed in homogeneous sensor networks.
Improving reliability of data transmission: It is well known that sensor network links tend to have low reliability and each hop significantly lowers the end-to-end delivery rate.
With heterogeneous nodes, there will be fewer hops between normal sensor nodes and the sink. So the heterogeneous sensor network can get much higher end-to-end delivery rate than the homogeneous sensor network.

Performance measures
Some performance measures that are used to evaluate the performance of clustering protocols are listed below(R. Sheikhpour et al., 2011).

Network lifetime (stability period):
It is the time interval from the start of operation (of the sensor network) until the death of the first alive node.

Number of cluster heads per round:
Instantaneous measure reflects the number of nodes which would send directly to the base station, information aggregated from their cluster members.

Number of alive nodes per round:
This instantaneous measure reflects the total number of nodes and that of each type that has not yet expended all of their energy.
Throughput: This includes the total rate of data sent over the network, the rate of data sent from cluster heads to the base station as well as the rate of data sent from the nodes to their cluster heads.

Network model
In this chapter we assume a sensor network model with following properties:

•
The sink locates at the centre of sensor nodes and has enough memory and computing capability.

•
The WSNs consist of the heterogeneous sensor nodes. Percentage of sensor nodes are equipped with more energy resources than the rest of the nodes. Let be the fraction of the total number of nodes which are equipped with times more energy than the others.

•
The distance can be measured based on the wireless radio signal power.

•
All sensor nodes are immobile and have a limited energy.

•
All nodes are equipped with power control capabilities to vary their transmitting power.

Radio energy dissipation model
For this project, three routing protocols, namely LEACH and SEP and our protocol Hierarchical Adaptive Balanced energy efficient Routing Protocol (HABRP), We use the same radio model shown in Fig.5 for the radio hardware energy dissipation in order to achieve an acceptable Signal-to-Noise Ratio (SNR) in transmitting a bit message over a distance . In Fig.5 is the number of bits per packet transmission and is distance between the sender and the receiver. Electronics energy consumption is same for transmitting and receiving the data, is given by, elec is the energy dissipated per bit to run the transmitter or the receiver circuit.
Transmission cost to transmit -bit message between any two nodes over distance is given by the following equation: ( , ) is the amplifier energy consumption and it can be further expressed in terms of fs or mp, depending on the transmitter amplifier mode that applied. They are power loss factors for free space (d 2 loss) when d < d0; and multipath fading (d 4 loss) when d ≥ d0, respectively.
To transmit -bit message within d distance, a node expends: By equating the two expressions at d=do, we have: To receive a -bit message, a node expends: Where Eelec is the energy used by the receiver electronics.

Optimal number of cluster
We assume there are nodes distributed uniformly in region. If there are clusters, there are on average / nodes per cluster. Each cluster-head dissipates energy receiving signals from the nodes, beamforming the signals, and transmitting the aggregate signal to the base station. Therefore, the energy dissipated in the cluster-head node during a single frame is: Where k * Eelec * ( − 1) is the energy consumed by the cluster head to receive bits information from − 1 non cluster heads and DA represents the processing of data aggregation cost of a bit per signal. The expression for the energy spends by a non cluster head is given by: Where is the distance from the node to the cluster head. The area occupied by each cluster is approximately ⁄ . In general, this is an arbitrary-shaped region with a node distribution ( , ) .
The expected squared distance from the nodes to the cluster head (assumed to be at the center of mass of the cluster) is given by: If we assume this area is a circle with radius = ( ) ⁄ and ( , ) is constant for and , (9) simplifies to: If the density of nodes is uniform throughout the cluster area, then = (1 ( )) ⁄ ⁄ and = 1 2 (11) Therefore, in this case the expression for the energy spends by a non cluster head is: The energy dissipated in a cluster per round, cluster, is expressed by: Therefore, the total energy dissipated in the network per round, total , is expressed by: We can find the optimum number of clusters by setting the derivative of with respect to to zero (W.Heinzelman et al., 2002): The optimal probability of a node to become a cluster head, , can be computed as follows: = The optimal probability for a node to become a cluster head is very important. The authors (W.Heinzelman et al., 2000) showed that if the clusters are not constructed in an optimal way, the total consumed energy of the sensor network per round is increased exponentially either when the number of clusters that are created is greater or especially when the number of the constructed clusters is less than the optimal number of clusters.

Hierarchical Adaptive Balanced energy efficient Routing Protocol (HABRP)
In this section we describe HABRP which is an extension of the LEACH, which improves the stability period of the clustering hierarchy and decrease probability of failure nodes using the characteristic parameters of heterogeneity.
Routing in HABRP works in rounds and each round is divided into two phases, the Setup phase and the Steady State phase, each sensor knows when each round starts using a synchronized clock. Let us assume the case where a percentage of sensor nodes are equipped with more energy resources(advanced nodes) than the rest of the nodes (normal nodes). We refer to these powerful nodes as nodes (nodes selected as normal nodes or cluster heads or gateways). Let m be the fraction of the total number of nodes N which are equipped with times more energy than the others and the rest (1 − ) * as normal nodes and the initial energy. We assume that all nodes are distributed uniformly over the sensor field. The total number of nodes and total energy in network is expressed by:

HABRP network model
The basic system model of the protocol HABRP is depicted in Fig.6. Each sensor node sends the sensed data to its cluster head. The cluster head aggregates the collected data and transmits the aggregated information to closest gateway that will send data to the base station. The operation of HABRP is divided into rounds. Each round begins with a set-up phase followed by a steady-state phase, as shown in Fig.7.  After the set-up phase is the steady-state phase when data are transmitted from the nodes to the cluster head to agregate data and transmit it to the base station through the gateway that

Set-up Steady-state Frame
Round 0 Round 1 …

Gateway selection algorithm Cluster Head selection algorithm Cluster Formation algorithm
Set-up requires the minimum communication energy. The duration of the steady phase is longer than the duration of the setup phase in order to minimize overhead.

Gateway selection algorithm
Each sensor elects it self to be a gateway at the beginning of each round, round. This decision is based on the suggested percentage of gateways for the network (determined a priori) and the number of rounds the node has been a gateway so far. The desired percentage of gateways is chosen such that the expected number of gateway nodes for each round is . Thus, if there are * nodes (advanced nodes) in the network, the desired percentage of gateways is: Decision to become gateway is made by the node choosing a random number between 0 and 1. The node becomes a gateway for the current round if the number is less than the following threshold: We define as ( gat) the threshold for gateway node , is the currenet round, gat is set of nodes which have not been gateways in 1/ g rounds , E _ is the current energy of the node and E _ is the initial energy of the node.

Cluster head selection algorithm
The main idea is for the sensor nodes to elect themselves with respect to their energy levels autonomously. The goal is to minimize communication cost and maximizing network resources in other to ensure concise information is sent to the sink. Each node transmits data to the closest cluster head and the cluster heads performs data aggregation. Assume an optimal number of clusters in each round. It is expected that as a cluster head, more energy will be expended than being a cluster member. Each node can become cluster head with a probability and every node must become cluster head once every 1/ rounds.
The optimal probability of a node to become a cluster head, , can be computed as follows: is a number of gateway nodes, is the optimum number of clusters that is expressed by: Our approach is to assign a weight to the optimal probability . This weight must be equal to the initial energy of each node divided by the initial energy of the normal node. Let us define as the weighted election probability for normal nodes, and the weighted election probability for the advanced nodes.
Virtually there are * (1 + * ) nodes with energy equal to the initial energy of a normal node. In order to maintain the minimum energy consumption in each round within an epoch, the average number of cluster heads per round per epoch must be constant and equal to . The weighed probabilities for normal and advanced nodes are, respectively: In Equation (1), we replace by the weighted probabilities to obtain the threshold that is used to elect the cluster head in each round.
We define as T(S ) the threshold for normal nodes, and T(S ) the threshold for advanced nodes. Thus, for normal nodes, we have: Where is the current round, G is the set of normal nodes that have not become cluster heads within the last 1/P rounds of the epoch and T(S ) is the threshold applied to normal nodes.
Similarly, for advanced nodes, we have: Where is the current round, G is the set of advanced nodes that have not become cluster heads within the last 1/P rounds of the epoch, and T(S ) is the threshold applied to advanced nodes.

Summary of HABRP
HABRP is a self-organizing, adaptive clustering protocol that uses randomization to distribute the energy load evenly among the sensors in the network. Each sensor elects it self to be a gateway at the beginning of each round with a certain probability.
These gateway nodes broadcast their status to the other sensors in the network using advertisement message (ADV). The non-gateway nodes elect themselves to be cluster-heads with a certain probability.
These cluster-head nodes broadcast their status to the other sensors in the network using advertisement message (ADV). The non-cluster-head nodes wait the cluster-head announcement from other nodes. Each sensor node determines to which cluster it wants to belong by choosing the cluster-head that requires the minimum communication energy, and send the join-request (Join-REQ) message to the chosen cluster head, and the cluster-head nodes wait for join-request message from other nodes.
Once all the nodes are organized into clusters, each cluster-head creates a schedule for the nodes in its cluster. This allows the radio components of each non-cluster-head node to be turned off at all times except for its transmit time, thus minimizing the energy dissipated in the individual sensors. Once the cluster-head has all the data from the nodes in its cluster, the cluster-head node aggregates the data and then transmits the compressed data: • To the chosen gateway that requires the minimum communication energy to reduce the energy consumption of cluster head and decrease probability of failure nodes if : These collected data are transmitted to the base station using cluster head-gateway-base station routing.

•
To the Base station directly if : Where _ _ is total energy dissipated for send data from cluster head to the base station and _ _ is total energy dissipated for send data from cluster head to the Gateway and _ _ is total energy dissipated for send data from Gateway to the base station as shown in Fig.9.

Parameter settings
We use a 100m×100m region of 100 sensor nodes scattered randomly. MATLAB is used to implement the simulation. To make a fair comparison, we introduce advanced energy levels to LEACH and SEP nodes with same settings as in our HABRP protocol, so as to assess the performance of these protocols in the presence of heterogeneity.
Specifically, we have the parameter settings:

Simulation metrics
Performance metrics used in the simulation study are: • Energy consumption analysis • Length of stable region for different values of heterogeneity. Stability period is the period from the start of the network operation and the first dead node. We also refer to this period as "stable region"

Energy consumption analysis
The performance of HABRP is compared with that of the original LEACH and SEP in terms of energy and is shown in Fig.10 and Fig.11.
With the use of gateway nodes for data transmission from cluster heads to the sink, the energy consumption of the network is decreased. This is due to the gain of the energy dissipated by cluster heads to the base station. From the graph it is clear that HABRP can achieve twice the energy savings than LEACH and SEP protocol.

Network lifetime
The number of nodes alive for each round of data transmission is observed for the HABRP protocol to evaluate the lifetime of the network. Fig.12 shows the performance of HABRP compared to LEACH and SEP. It is observed that the HABRP outperforms LEACH and SEP due to balanced energy dissipation of individual node through out the network.

Variation of the Base Station Location
The results presented in the previous section show that HABRP is more energy-efficient than LEACH and SEP routing. Is this just a function of the simulation parameters? What happens if the base station is actually located within the network or very far away from the network? To answer these questions, we ran simulations where we varied the location of the base station from (x= 50, y= 50) to (x =50, y=300).

Percentage of Node death
The number of rounds for 1%, 20%, 50%, 80% of node death is observed for HABRP, LEACH and SEP in Fig.13 and Fig.14. From the results of Fig.13 the stability period of LEACH and SEP protocols is limited to 892 rounds and the HABRP protocol extents up to 1335 rounds in homogeneous WSNs. In heterogeneous WSNs HABRP provides an extended lifetime of approximately twice LEACH protocol. HABRP has longer lifetime than LEACH and SEP.   fig.15 the length of stable region for differnet values of energy heterogeneity is simulated, we observed that if we increase the number of NCG nodes with = 1 , the stability period is extended of approximately twice as LEACH protocol. In heterogeneous WSNs, HABRP has longer stable region than LEACH and SEP for differnet values of energy heterogeneity. Figure 17. Length of stable region for differnet values of energy heterogeneity with 100m x 100m, 100 nodes, 0.5J/node, a=1

Heterogeneity in large-scale networks
We simulated the performance changes in large network with 900 nodes in area 300mx300m. Percentage of total additive energy (a.m)

LEACH SEP HABRP
In Fig.16. the simulation result shows, that the network lifetime decrease in large area network and the period that the first dead node appears is earlier than those of previous cases. The phenomenon is caused by the fact that the cluster heads waste the considerable amount of energy for transmitting their data to the far away base station. In HABRP cluster head would transmit data to base station through gateway to eliminate that the cluster head far away from the base station dissipate their energy much faster than those close to the BS. HABRP outperforms LEACH and SEP for different values of total additive energy a * m. Because in LEACH and SEP, all cluster heads transmits aggregated data to the BS directly.

Improvement of stability period
The comparison results are shown in Table2. show that HABRP is more energy-efficient and the stability period is extended than LEACH in both homogeneous and heterogeneous WSNs.

Result analysis
From our simulations, we observed the followings: • HABRP can achieve twice the energy savings than LEACH and SEP protocol. • HABRP outperforms LEACH and SEP due to balanced energy dissipation of individual node through out the network and extends network lifetime.

•
For all base station locations we simulated, as the base station moves further away from the network, the energy efficient performance of HABRP improves compared to LEACH and SEP.

•
In heterogeneous WSNs, HABRP provides an extended lifetime of approximately twice LEACH protocol and the stability period of the HABRP was prolonged than LEACH and SEP in heterogeneous settings.

•
Energy dissipation is balanced between normal nodes and advanced nodes in the HABRP compared to LEACH and SEP. • Balancing the energy consumption, reducing the phenomenon of rapid death of the cluster head caused by excessive energy consumption, also preventing the situation of instability period caused by one cluster head failure to work, ensure that the network work normally.

•
Using gateway and cluster head, it saves excessive energy consumption for longdistance transmission, increased energy utilization of the entire network.
The simulation results show that HABRP protocol could suitably form clusters and effectively prolonging the survival time of the entire networks .

Conclusion
Energy efficient routing is paramount to extend the stability and lifetime of the wireless sensor networks. Routing in sensor networks is very challenging due to several characteristics that distinguish them from traditional communications and wireless ad-hoc networks since several restrictions, e.g., limited energy supply, computing power, and bandwidth of the wireless links connecting sensor nodes. The major difference between the WSN and the traditional wireless network is that sensors are very sensitive to energy consumption. Introducing clustering into the networks topology has the goal of reducing the number of message that need to be delivered to the sink in large-scale WSNs.
In this chapter, we have proposed an Hierarchical Adaptive Balanced energy efficient Routing Protocol (HABRP) for wireless sensor networks. The energy efficiency and ease of deployment make HABRP a desirable and robust protocol for wireless sensor networks. In order to improve the lifetime and performance of the network, routing in HABRP works in rounds and each round is divided into two phases, the Set-up phase and the Steady State phase. During the set-up phase some high-energy nodes called NCG nodes are elected gateways, other choised cluter heads and the clusters are organized. During the steady-state phase, data are transmitted from the cluster members nodes to the cluster head to agregate data and transmit it to the base station through a chosen gateways that requires the minimum communication energy to reduce the energy consumption of cluster head and decrease probability of failure nodes.
Simulation results shows that the HABRP improves the stable region of the clustering hierarchy and decrease probability of failure nodes and increase the lifetime of the network due to balanced energy dissipation of individual node through out the network and extends network lifetime. Balancing the energy consumption, reducing the phenomenon of rapid death of the cluster head caused by excessive energy consumption, also preventing the situation of instability period caused by one cluster head failure to work, ensure that the network work normally.
Finally, HABRP is scalable and achieves better performance compared to SEP and LEACH in both heterogeneous and homogenous environments.