Proposition and evaluation of a novel routing protocol for wireless sensor networks

Wireless sensor networks are very constrained by a low bandwidth and high latency due to the shared nature of the radio medium. Nevertheless, the real critical issue in these networks is energy. Several routing protocols have been proposed in the literature to maximize the lifetime of wireless sensor networks, however, most of these solutions use a routing through a single path, which can rapidly deplete the energy of some nodes (those are part of the optimal path) more than the other nodes. This usually leads to partitioning in the network and of course to the death of this later. The aim of this paper is to propose a new protocol for multi-path routing in which nodes choose one route among several routes with a probability which will count the residual energy, the energy of the communication and the number of paths including the forwarding node. Our approach allows the sensor nodes of the network wasting their energy in an equitable manner. Thus, our protocol enhances the lifetime of the sensor network. This is proved by simulation on SENSIM. We have implemented our solution and compared it with EAR, results show that our protocol outperforms EAR by enhancing the network lifetime.


INTRODUCTION
A Wireless sensor network (WSN) is composed of a large number of sensor nodes.Each sensor node senses phenomena in the environment in which it is deployed, performs a local processing on the sensed data, and than transmits it to a sink.Nodes in WSNs are deployed in an ad hoc manner (Akyildiz, Su, Sankarasubramaniam and Cayici (2002)).
WSNs are an emerging type of wireless networks which are largely used in different domains.They find applications in intelligent houses, intelligent agriculture, battlefield surveillance, integrated patient monitoring, environment monitoring, chemical/biological detection and other commercial applications.
As sensor nodes are battery-powered and are uneasy, if not impossible to recharge, the primary goal of research in this field is to minimize energy consumption while still ensuring that the network performs the task it was deployed for.This implies optimizing every algorithm, but, especially minimizing the communications as radio transmission is expensive in terms of energy (Akyildiz, Su, Sankarasubramaniam and Cayici (2002)).
Nevertheless, the exact goal differs from one contribution to another.Some works consider that they should minimize the globally consumed energy over time.Many contributions also speak about network lifetime, which requires a precise definition.According to Chen and Zhao (2005), network lifetime is time span from the deployment to the instant when the network is considered nonfunctional.When a network should be considered nonfunctional is, however, applicationspecific.It can be, for example, the instant when the first sensor dies, a percentage of sensors die, the network partitions, or the loss of coverage occurs.
The network lifetime depends strongly on many parameters which can be considered either in Medium Access Control (MAC) layer or in network layer.The network layer has received an important attention in the literature.Most routing protocols proposed in literature are based on finding the optimal multi-hop route considering the residual energy of forwarding nodes than use this route for every communication.This is not the best thing to do, because this causes the punishment of the energy of nodes belonging to this path.In fact, routing protocols must use the minimum of the energy of sensor nodes and than extend the network lifetime.Thus, the ideal would be to save energy of all sensor nodes in an equitable way.
In this paper, we propose a multi-path routing protocol where each sensor node uses multiple paths to route its data to the sink.Our protocol is based on two ideas.The first idea is that proposed in the work of Shah and Rabaey (2002) (Energy Aware Routing, EAR), it consists to save multiple paths with minimal cost and not one path that has minimum cost.In addition, a probability is assigned to each path and selects the path to use for each transmission of data.The second idea, which is our new idea is to add a parameter to calculate the probability of the use of a forwarding node to route data to the sink, it is the number of forwarding tables to which the forwarding node belongs.So, in our new protocol the route for forwarding data is chosen according to a probability which counts in addition to the residual energy and the energy of the communication as in EAR, the number of paths including the forwarding node.This is intended to use nodes forwarding data for meany nodes less then ones that forward for few nodes and so create some kind of fairness in the loss of energy between the sensor nodes, which will result in improving the network lifetime.
The rest of this paper is organized as follows.In section 2, related work in this area is outlined.In section 3, we present the critical study of EAR.In section 4, we describe the design of our solution for improving wireless sensor network lifetime.In section 5, we give simulation scenarios and results for FEAR.The paper concludes in section 6.

RELATED WORK
Traditionally, routing protocols are divided into two large families: the proactive, that anticipate the demand of routing packets and reactif protocols that respond to a request of routing.Between these two families, we find the family of hybrid protocols that possess properties of both proactivity and reactivity (Jiang and Manivannan (2004)).In sensor networks, several routing approaches have been proposed, giving rise to several classifications.These approaches can be distinguished according to (Al-Karaki and Kamal (2004)) and (Akkaya and Younis (2005) To minimize energy consumption and maximize the duration of life of the wireless sensor network, routing protocols have been developed and proposed in the literature.Our study focused on a subset of all these protocols, especially flat-based routing, that we present in what follows: SPIN "Sensor Information Protocol for Negotiation" (Heinzelman, Kulik and Balakrishnan (2002)) is among the early work to pursue a data-centric routing mechanism.It represents an improvement of flooding and gossiping of (Hedetniemi and Liestman (1988)) using negotiation and adaptation to available resources.SPIN uses three types of messages: ADV: when a node has data to send, it notifies its neighbours by using this message with a meta-data.REQ: a node sends this message if it wishes to receive a data, i.e. if it has not the data, in response to ADV message.DATA: this message contains the data with a header containing the metadata.
The protocol Directed Diffusion proposed in (Intanagonwiwat, Govindan and Estrin (2000)) is regarded as a protocol reference in the field of Data centric routing.Directed Diffusion differs from SPIN in terms of the on demand data querying mechanism it has.This protocol consists mainly of two phases.The first phase is to broadcast messages of interest.Indeed, the sink requests service by sending the interest to the whole network.The interest represents a task to be performed by the network and can be designed for one or more nodes.The second phase shows the reaction of a node upon receipt of an interest.First, node checks whether it is affected by this message, then it records the identity of the node sender of the interest in order to construct the gradient of routs leading to the sink.If the node is not intended by the interest, it continues to spread to all neighbours.Once the message arrived at the destination, the route to the sink is then well established and the target node chooses this route to send the information.
Rumor Routing (Braginsky and Estrin (2002)) is a variant of Directed Diffusion, intended primarily for applications where the geographic routing criteria are not applicable.This protocol uses a long-lived packet named agent, which is generated by a node detecting an event.The agent travels the network to inform the distant nodes about local events.So when a node generates a request for an event, it does not flood the whole network as in Directed Diffusion, since, there will be nodes that know the route to the event and respond to the request.There is a flood of events and flood of requests.Schurgers,and Srivastava (2001) proposed a slightly modified version of the directed diffusion, called "Gradient-Based Routing".In this protocol, packets are forwarded on a path with largest gradient, where gradient is the difference between the minimum hops separating the node from the sink and the minimum hops separating its neighbour from the sink.
Another improvement of directed diffusion is proposed by Shah and Rabaey (2002), EAR is a reactive protocol, and initiated by the destination, then it looks like the directed diffusion.This protocol will be detailed further in the next section, since our improvement is based primarily on it.
Another routing protocol called SEER "Simple Energy Efficient Routing protocol" is proposed by Leuschner and Hanke (2007), it uses a flat structure and a simple method for choosing an optimal route to the sink based on the distance between the source and the sink and the residual energy of forwarding nodes.An improvement of SEER protocol is proposed by Ahvar and Fathy (2010), where, authors use learning automata concept to ensure a fair tradeoffs between energy balancing and optimal distance.The protocol, named BEAR, aims to improve SEER in energy balancing and network lifetime.Shah and Rabaey (2002) propose EAR an Energy Aware Routing protocol for wireless sensor networks.They take the view that always using lowest energy paths may not be optimal from the point of view of network lifetime and long-term connectivity.Thus, they have proposed their routing protocol in which the main idea is to use occasionally sub-optimal paths; this ensures that the optimal path is not exhausted, and that the network degrades gracefully in rather than to partitioning.To achieve this objective, several paths between the source and destination are found, and a probability of being chosen for the metric energy is assigned to each path.Whenever there are data to send from the source to the destination, a path is chosen randomly depending on the probabilities.So, no route is used all the time.

CRITICAL STUDY OF THE EAR PROTOCOL
EAR contains three phases: (i) Setup phase or interest propagation: Localized flooding occurs to find all the routes from source to destination and their energy costs.This is when routing (interest) tables are built up, with low cost paths and assigned probability for each one depending on this cost to reach the sink.(ii) Data Communication phase or data propagation: Data is sent from source to destination, using the information from the earlier phase.This is when paths are chosen probabilistically according to the energy costs that were calculated earlier.
(iii) Route maintenance: Localized flooding is performed infrequently from destination to source to keep all the paths alive.

Illustrative example
After the presentation of the functioning of EAR, we present here an example to illustrate a case where EAR can't provide a real fairness between sensor nodes.That concerns nodes that are used as forwarding node by several nodes.EAR don't make any difference between a node that routes data of several nodes and the one that routes only for one node, in the calculation of the probability.In the simple example of the Figure 1, two source nodes S 1 and S 2 send data to the sink (BS).Nodes of this example use the EAR protocol for routing.
In the Setup phase, the destination (BS) broadcasts a route request message with Cost field initialized to '0'.All neighbours of sink (nodes I, C and F) receiving this message calculate the cost of the communication with the sink and add it to the cost sent in the message by the sink (here cost = '0').These nodes forward the route request message to their neighbours after updating the cost field with the value calculated above.
In the same way, each node receiving the route request message calculates cost with the following formula: Where C ji is the cost of the communication between the nodes i and j which is calculated as: Where, e ji is the power required for the communication between nodes i and j, and R j is the residual energy of the node j normalized to its initial energy.The weighting factors α and β can be chosen to find the minimum energy path or the path with nodes having the maximum residual energy or the combination of the above.
Once cost is calculated, nodes add neighbours with routes of low cost in their forwarding tables, and then assign probabilities to each one according to the following formula: In the last step, nodes calculate the average cost of the routes allowing it to reach the BS then broadcast a route request message after updating the cost field with the average calculated: At the end of the setup phase, source nodes receive route request messages.S 1 receives two messages, one contains the cost of reaching the BS through the node A and the other contains the cost of reaching the BS through the node D. The node S 1 calculates the costs Cost S1A and Cost S1D .Assuming Cost S1A = Cost S1D , S 1 adds two forwarding nodes that can route its data to BS through routes (D, E, F, SB) and (A, B, C, SB) in its forwarding table, then it calculates the probability of each route as follows: Node S 2 , also, calculates the costs C S2A and C S2G .
Assuming Cost S2A = Cost S2G , S 2 adds two forwarding nodes (G and A) in its routing table.Once the routing table of S 2 is established, it assign the probability of use of routes using the same formula as above and found P S2A = 1 / 2 and P S2G = 1 / 2. The functioning of EAR through our example as explained previously is summarized in Figure 2.
Note that the probabilities of use of all routes are equals; this is because the costs of these routes are equals.
Assuming that the initial energy of all nodes was the same, we can notice that although the EAR protocol was able to achieve some fairness between the nodes of the network by using multiple routing paths instead of one, but is the common path between the source nodes that is used more than the other two.This can deplete the nodes of this route more than others.This is illustrated by the use of the node A by both source nodes equally with nodes D and G since they have all the same probability, instead of reducing the probability of the node A so that it will be used by both source nodes the same number of times that the other nodes.To reduce the probability of nodes that are in several forwarding tables, we need to have the number of forwarding tables containing this node and consider it in the calculation of the probability.
In the following section we propose a solution for this problem to enhance the performance of EAR.

FEAR DESIGN
In this section, we present our new routing protocol named FEAR for Fair Energy Aware Routing protocol.Our solution aims to improve the lifetime of the wireless sensor networks by ensuring a fair energy wasting of all sensor nodes of the network.
For the design of our routing protocol, we assume that the wireless sensor network has the following realistic properties:

Cost Cost
Cost P • There is no any method to get location information of sensor nodes.• The network application can be query driven, event driven, time driven or the hybridization of the three.
Our new protocol is based on two main ideas.The first idea is that nodes of the network maintain multiple routes with different probabilities use.This idea is that of the EAR protocol.The second idea that comes to improve the first is to count the number of nodes using the same node neighbour for the routing and consider that number in the calculation of the probability of each route.
As EAR, our protocol has three phases: (i) Setup phase: A route request message containing a cost variable initialized to 0 (Cost = 0) is broadcasted by the sink.Each node receiving this message broadcasts it to his neighbours.But before, it calculates the cost of the communication with the neighbour who has send back the message and adds it to the whole cost of the path to the sink.Thus, if a node i sends a route request message to his neighbour j; this last calculates the cost metric C ji using the following formula: Where, e ji is the power required for the communication between the nodes i and j, and R j is the residual energy of the node j normalized to its initial energy.The weighting factors α and β can be chosen to find the minimum energy path or the path with nodes having the maximum residual energy or the combination of the above.
When C ji is calculated, the node j adds it to the cost variable sent by i (cost i ) to have the cost of the whole path to the sink through the node i (cost ji ): Neighbours' nodes with paths having minimal cost are added to the forwarding table, then, an FTM (Forwarding Table Message) message that contains the identifiers of these nodes is broadcasted by the node.Each node receiving FTM messages, counts the number of FTM messages containing its identifier.So, each node i establishes a set of the neighbours j sending an FTM message containing the identifier i as following: Once all FTM messages are received by node i, it calculates the variable N that represents the cardinality of the set NF: Hence, the node i inserts the variable N in an NFTM message (Number Forwarding Table Message) that it sends to its neighbours as response to FTM messages.
To reduce the protocol overhead, nodes finding N equal to 1 don't sent the NFTM message, and the node having a neighbour node in its forwarding table that have not sent the NFTM message notes that it is the only one to use it as relay.
Receiving this last message, a node can calculate probabilities P ji assigned to each node i of the forwarding table.
This probability depends on the path cost (Cost ji ) and the number of nodes that use this path (N i ), using the following formula: Where, FT j is the forwarding table of node j.This probability will take into consideration the cost of the route as in EAR and the number of nodes that use the same node, information given in the NFTM message.
The last step in this phase is the broadcast of the route request message by node j until it reaches source nodes.Nevertheless, the route request message is updated by each node before broadcast it.The value of the Cost field of the message is replaced by the average cost of reaching the destination through the neighbours nodes of the forwarding table which is calculated with the formula: (ii) Data Communication phase: In this phase, source nodes and intermediates ones choose randomly a neighbour to route data using probabilities calculated earlier.(iii) Route maintenance: Localized flooding is performed infrequently from destination to source to keep all the paths alive.

Illustrative example
We present here the same example as for EAR to illustrate the functioning of FEAR and its contribution compared to EAR.Let's see how our protocol will solve the problem invoked in the critical study of EAR and will achieve greater fairness between nodes.On the same example of the section 3.1, using FEAR as shown in Figure 4, in the setup phase, the BS broadcasts the route request message with the field Cost initialized to '0'.BS's neighbours, such as nodes I, C and F, calculate the cost of the communication with the sink and add it to the Cost sent in the message by the sink (here cost = '0'), and then they forward the route request message to their neighbours after updating the Cost field with the value calculated above.
Note here, that there is no sent of the FTM and NFTM messages, it is not necessary in the sense that the nodes are the neighbours of the sink, so we need just to calculate the path cost.
In the same way, each node receiving the route request message calculates Cost using the same formulas as in EAR protocol and adds nodes with the low cost in their forwarding tables.Once forwarding tables established, the node needs to have information about the number of nodes counting each node of its forwarding table as relay to calculate probabilities.So, each node sends an FTM message which contains identifiers of nodes belonging to its forwarding table.At reception of the FTM messages each node calculates a variable N which counts the number of FTM messages containing its identifier; this means that N is the number of neighbours for which the node will route data to the sink.The node inserts the N in an NFTM message and sends it to its neighbours.Receiving NFTM messages, nodes have all information to calculate probabilities, such as Cost and N of each node of its forwarding table.
In the last step, each node forwards the route request message after updating the Cost field with the average cost calculated as in the EAR protocol.
At the end of the setup phase, the route request message arrives to the source nodes, S 1 and S 2 in our example.Following the same steps explained above, both source nodes S 1 and S 2 , having established their routing tables after calculating the Cost of both routes through nodes A and G for S 2 and through nodes A and D for S 1 , they send the FTM message to nodes A, G and D. Node D after receiving the FTM message of S 1 , sees that it will be used as relay node just by S 1 , then it responds with NFTM with N = 1.Similarly, the node G responds to the node S2 with N = 1, since it will be used only by S 2 .But, node A responds with N = 2, since it will be used as a relay by the two nodes S 1 and S 2 .Receiving NFTM messages, nodes S 1 and S 2 calculate assign probabilities to the routes as follows: Likewise, S 2 calculates the following probabilities: P S2G = 2 / 3 and P S2A = 1 / 3. Note that in this example nodes send NFTM although N is equal to 1.This is done just to better explain the functioning of FEAR.Through this example, it is clear that nodes A, D and G will be used probably the same number of times by S 1 and S 2 , since the node A is used by both source nodes, the probability of its use by S 1 or S 2 is reduced so that their sum be equal to the probability of the two other nodes (D and G).
Comparing between EAR and FEAR through this example, we see that FEAR achieves more fairness between sensor nodes of the network that EAR.FEAR reduces the probability use of routes in high demand in the network.If we define the network lifetime as time span from the deployment to the instant when the first node dies.In EAR, node A is used more than D and G, so it will consume its energy quickly and dies, so the network also dies.
If we define the network lifetime as the time span from the deployment to the instant when the network partitions occurs, we can consider another example where there is no route (D, E, F) (Figure 4) where also in EAR the network will die when

Cost Cost
Cost P node A dies, because the source node S 1 will not can join the sink, so the network is partitioned.
This example shows that the number of nodes using a neighbour node as a relay is an important parameter for calculate the route probability, and its use in FEAR can improve and increase the lifetime of sensor networks.This theoretical comparison will be proved by simulation results presented in the following section.

SIMULATION AND ANALYSIS
We evaluate the FEAR performance by simulation using SENSIM simulator (sensor simulator framework for OMNeT++) developed at The Sensor Networking Laboratory at Louisiana State University.We compare the performance of our FEAR protocol with those of EAR under the topology corresponding to the illustrative example of the above section in terms of five metrics: network lifetime, energy variance, energy range, energy mean and the difference between the energy minimum and the energy mean.As the aim of our protocol is to consummate nodes energy in a fair manner to enhance the network lifetime, we are interested, obviously, in the network lifetime and two other metrics that can show that there is no a great difference between the remaining energy of nodes.The energy variance metric calculates how far node's energy are spread out from each other and energy range metric calculates the difference between the maximum and the minimum energy of nodes.We will, also, present the energy mean to just show that reducing this parameter does not mean increasing network lifetime since it does not give any information about the distribution of energy among nodes of the network.

Simulation parameters
The topology, as shown in the illustrative example, is made of 8 sensor nodes (S 1 , S 2 , A, B, C, D, E, F, G, H, I) of which 2 are source nodes (S 1 and S 2 ) and one sink node (BS).
In this simulation scenario, we have use a simple MAC protocol which is defined in the implementation of EAR in the SENSIM, to avoid influencing the performance with a particular MAC algorithm.
Both routing protocols used the same energy metrics for path selection.This was the metric function given in Section 6 with α = 1 and β=1.Other simulation parameters are given in table 1 (the first four parameters are those of MICA2 mote given in http://www.xbow.com):

Energy variance
To measure the energy variance we have fixed the initial energy of nodes to 12825 (with three AA batteries with the capacity of 2850 mAh and 1.5 v we find the Total Batterie Power = 3 * 2850* 1.5), and then we run one simulation both with EAR and FEAR protocols.Results obtained are shown by the graph of Figure 5.The graph presents the variation of the energy variance versus simulation time.
The figure shows clearly that network lifetime is greater with FEAR than with EAR protocol, 21020 seconds in EAR and 23020 seconds in FEAR.We can also note that the energy variance is greater in EAR.That means that in FEAR the energy of all nodes in the network are close to the average energy in contrast to EAR where the energy variance is very large; this demonstrates the large difference between the energy of the nodes and the average energy.These results show that EAR uses some nodes more than others for routing data from source nodes to the sink, thing that is avoided in FEAR.
So, we have reached our goal in the enhancement of EAR.

Energy range
In the same simulation run as explained previously, we have obtained the results presented in the graph of the Figure 6.These results show the variation of the energy range versus simulation time.Obviously, at the beginning of simulation as the nodes have the same amount of energy the diference is 0, with time, nodes are used more than others, then, the diference between the minimum and the maximum energy increases As expected, FEAR reduces the difference between the maximum and the minimum energy of nodes compared to EAR, that means as in previously results that in FEAR nodes are used equitably for routing data, so that there will be not a node which dies leaving other nodes with a large amount of energy.

Network lifetime
In the present paper, we consider the network lifetime as the time till the first node runs out of energy.To measure the network lifetime we run simulation three times with three different initial energy of sensor nodes with both FEAR and EAR protocols, results obtained are presented in the graph of Figure 7.The Figure 7 shows that FEAR enhance significantly the network lifetime comparing with EAR.This is the impact of our solution on the network lifetime.

Energy mean
The Figure 8 shows the variation of energy mean vs. simulation time.These results show that energy mean in EAR is slightly greater than in FEAR.That does not mean that nodes in FEAR consume energy more than in EAR.In EAR, there are nodes with a large amount of energy and others which have exhausted their reserves of energy, so the energy mean is important but the network lifetime is not.This constatation is forced by the graph of Figure 9, which represents the difference between the energy mean and the minimum energy in the network (noted DIF MEAN MIN).In FEAR, this difference is not as important as in EAR although the energy mean is greater in EAR.

CONCLUSION
The lifetime of wireless sensor networks is a critical property which can be considered in the routing protocols designed specifically for them.But, several routing protocols proposed in literature focused on minimizing the consumption of energy of each sensor node so that the mean of energy consumed be reduced and do not balance energy consumption in network so that network lifetime be enhanced.Thus, the purpose of this article was to present a new routing protocol for sensor networks that enhance the EAR protocol for maximizing the network lifetime.The idea behind this protocol is simple, and is to seek a route used by multiple nodes less frequently than a route used by a few nodes.This helps avoid depleting the energy of some nodes more than others and thus maximize the lifetime of the sensor network.We simulated and compared EAR and FEAR and simulation results show that our solution outperforms those of EAR in term of network lifetime.
There are interesting improvements of this protocol that can be considered, such as take into consideration the fact that a node is the only one who joined a number of nodes to the sink in the calculation of N. Another improvement is to define an approach in the MAC layer that will use information of our routing protocol to enhance the network lifetime.
) as follows: depending on the network structure, we find flat-based routing, hierarchical-based routing, and location-based routing, Furthermore, depending on the protocol operation these protocols can be classified into multipath-based, query-based, negotiation-based, QoS-based, or coherent-based routing techniques.Another classification of routing protocols of wireless sensor networks is proposed in (Singh, S. K. Singh, M. P. and Singh, D. K. (2010)), according to this classification, we have seven classes: Location-based Protocols, Data-centric Protocols, Hierarchical Protocols, Mobility-based Protocols, Multipath-based Protocols, Heterogeneity-based Protocols and QoS-based protocols.

Figure 5 :
Figure 5: Energy variance versus simulation time

Figure 6 :
Figure 6: Energy range versus simulation time

Figure 8 :
Figure 8: Energy mean vs. simulation timeNote that the difference in the energy mean between FEAR and EAR is caused by the fact that EAR uses the route (A, B, C) more than the two others to reach the sink, so the six nodes (G, H, I, D, E, F) keep their energy level very large contrast to nodes (A, B, C).Hence, when we calculate the energy mean, it converges to the value of the energy level of the six nodes, and this value will be far of the minimum energy as shown by the graph of Figure9.By against, in FEAR nodes are used equitably so their energy level is close to each other, and the energy mean is close to the minimum energy.

Figure 9 :
Figure 9: DIF MEAN MIN vs. simulation time There is one sink to gather data sensed by sensor nodes.•Nodesand sink are not mobile.•The energy of sensor nodes is not rechargeable.