Quality-of-Service Routing Protocol for Wireless Sensor Networks

In this paper, we develop new algorithms to find the optimal, energy preserving, paths from Source Node (SN) to the Base Station (BS) in Wireless Sensor Networks (WSNs). Optimality is defined in a constrained sense, in which the minimal energy route is sought (to maximize the lifespan of WSNs) under reliability constraint, meaning that each packet must reach the BS with a given probability. Energy efficiency is going to be achieved by selecting nodes for multi-hop packet forwarding under information, which yields the most evenly distributed energy state over the network after the packet has reached the BS. The new algorithm gave good results with any BS positioning in sensor networks. The simulation results will demonstrate that our algorithm is more efficient than the other routing protocols proposed before. There are many efficient protocols which increase the lifetime of sensor network such as LEACH, PEGASIS, PEDAP and PEDAP-PA, but they failed to provide energy ba-lancing under reliability constraints. In this paper, we pro-pose a new algorithm under name HQRA (High Quality of service Routing Algorithm), which is able to find near-optimal


Introduction
The recent technological developments of WSNs enable many applications in system monitoring and surveillance.However, WSNs equipped with non-rechargeable sensors pose significant technical challenges [3].One of the major technical limitations is how to save energy while maximizing information throughput, in terms of sending packets to the BS with a given success rate and low energy to maximize the lifespan.As far as energy awareness is concerned, there are some well-known traditional routing protocols as Directed Diffusion [4], LEACH, PEGASIS and PEDAP.Although these algorithms increase the lifetime of network, but none of them focused on reliable packet forwarding, in terms of not giving any guarantee about the packet reaching the BS.Thus, in this paper, we propose a new algorithm under name HQRA (High Quality of service Routing Algorithm), which is able to find minimum energy paths in WSNs by minimizing the energy but guaranteeing a given level of reliability, as well.First we briefly describe some current routing protocols for the sake of comparing them with the proposed HQRA.One of the well spread WSNs protocols is LEACH (Low-Energy Adaptive Clustering Hierarchy) [5], which a clustering-based protocol that randomly chooses some sensor nodes as cluster heads, and other sensor nodes forward packets to the nearest cluster head.In this way, LEACH will reduce the number of those sensor nodes which communicate directly to the BS, and thus reduces the energy consumption.Another protocol called PEGASIS was proposed by [6].In this case, each sensor node has information about all sensor nodes so it can send and receive data from neighboring nodes [7].Huseyin Ozgur Tan, Ibrahim Korpeo et al. [8] described data routing algorithm named as PEDAP.In PEDAP, all the sensor nodes are connected into a minimum spanning tree.The base station can "see" any sensor nodes in the network.After some rounds, the BS removes dead sensor nodes and recomputed the routing information for the network.Thus, compared to LEACH and PEGASIS, PEDAP algorithm will reduce the energy consumption by minimizing the transmission distance and extend the lifetime of WSNs.Besides the relatively high efficiency, these algorithms still have many drawbacks.For example, LEACH randomly choose cluster heads, which is very good if the cluster heads are close to the BS, but the energy consumption will increase if they are far from the BS [9].While PEDAP focused on using Prim's minimum spanning tree algorithm [10] and it failed to achieve high bandwidth utilization [11].Many authors selected the shortest path algorithms for routing [4,12] in order to decrease the cost from the source node to the destination but no reliability criteria have been met.Thus, our concern is to develop an algorithm to find optimal paths with the maximum probability of successful packet reception at the BS and to prolong the longevity of the network at the same time.The results of the paper are given in the following structure: The model of HQRA algorithm is explained in Section 2. The Novel reliable routing algorithm to maximize the lifespan is described in Section 3. A detail performance analysis of HQRA is described in Section 4. Finally, we provide conclusions and outline the future works in Section 5.

The Model
A possible topology of wireless sensor network is depicted by (Figure 1).We assume that a single-source node transfers data to the BS through some sensor nodes, which are placed randomly with 2D uniform distribution.We assume network has the following properties [1,17,18]: • There is only one BS with a fixed location.
• The energy of BS can be recharged by being connected to an energy supply network and the BS is able to communicate in a single-hop with every sensor node in the WSN (even the furthest ones) by radio.
• The number of sensor nodes is N and they are also stationary in location; • Some nodes may do not have enough power to reach the BS directly, hence multi-hop packet transmission is in use, where packet forwarding is determined by a routing and an addressing mechanism • If necessary, the nodes can organize themselves into a hierarchy

Abstract
In this paper, we develop new algorithms to find the optimal, energy preserving, paths from Source Node (SN) to the Base Station (BS) in Wireless Sensor Networks (WSNs).Optimality is defined in a constrained sense, in which the minimal energy route is sought (to maximize the lifespan of WSNs) under reliability constraint, meaning that each packet must reach the BS with a given probability.Energy efficiency is going to be achieved by selecting nodes for multi-hop packet forwarding under information, which yields the most evenly distributed energy state over the network after the packet has reached the BS.The new algorithm gave good results with any BS positioning in sensor networks.The simulation results will demonstrate that our algorithm is more efficient than the other routing protocols proposed before.There are many efficient protocols which increase the lifetime of sensor network such as LEACH, PEGASIS, PEDAP and PEDAP-PA, but they failed to provide energy ba-lancing under reliability constraints.In this paper, we propose a new algorithm under name HQRA (High Quality of service Routing Algorithm), which is able to find near-optimal paths in WSNs by minimizing the energy but guaranteeing a given level of reliability, as well.where a node at a given level of the hierarchy receive packets from nodes at a lower level of the hierarchy.
• The direction of communication is Node -to -BS (the data acquired by the sensor nodes must be collected by the BS).
• Let us assume that there is a Wireless Sensor Network (WSN) perceived as a 2D graph G(V,E) with V represents the set of wireless sensor nodes and E set of edges in the network [2].
• The probability of successful packet between node i and node j is determined by the Rayleigh fading model, given as: where ( ) n m θ − is the sensitivity threshold.

W
z σ denotes the noise power.
d i,j (m) is distance between node i and neighbor node j.
g i (W)is a transmission power on sensor node i, and this transmission power can adaptively be changed.
If the energy in sensor nodes is g={g 1 ,….g |V| } the energy distributions in the network will be calculated by: 1 1,.. ; .,

Novel reliable Routing Algorithm to Maximize the Lifespan
In this section we first characterize the network energy state and then introduce a new routing algorithm

Characterization of the energy state of the network
The energy state of the network is characterized by introducing an entropy-like quantity defined as follows: And the corresponding entropy is It is clear that the larger g the more evenly the energy state is distributed over the sensors.If the lifespan of WSN is defined as the time till the first node goes flat, then more uniform energy state will maximize the lifespan.As a result, when choosing new paths we want to increase H(g) in order to obtain a more evenly distributed energy state [13][14][15].

New routing algorithms
In order to develop a routing algorithm which is energy efficient and reliable at the same token, let us firstly recall that the reliability of a path (defined as the probability of reaching the BS over the path) is given as Where M is the number of sensor nodes in the optimal path ( ) opt ℜ .
Theorem 1: Assuming that WSN perceived as a 2D graph of G (V, E) with a given transmission vector g then maximum reliability can be achieved by performing the Bellman-Ford algorithm with the link measure Proof: When searching for the most reliable path one can write .
With the Rayleigh fading model was proposed in Equation (3) we have: (7) Note that this optimization function is additive, as a result, the optimum can be reached by performing the Bellman-Ford algorithm (BF) Q.E.D. It is clear that with the maximum of transmission energy (g i ) we will get the most reliable path.However, the energy in each sensor node is limited, thus our objective is to choose a path which provides a pre-defined reliability parameter ( ) − .On the other hand, we would like to achieve this pre-defined reliability with smallest possible transmission energies needed from the nodes participating in the packet transfer from the source node to BS, in order to maximize the lifespan of the network.This casts routing as a constrained optimization problem by searching for a path when the sum of transmission energies are minimal but the given reliability parameter can be achieved.In order to solve this problem, we propose the following algorithm: Procedure: 1. Let each node select the smallest transmission energy ∆ 1 .
2. Calculate the most reliable path by running the BF algorithm with link measure The optimality of the procedure above lies in the fact that in the first step we use minimum transmission energies and then in the later iteration of the algorithm we balance the remaining battery power on the nodes by always selecting transmission energies which makes the remaining energies uniform.Therefore, the "energy-entropy", introduced by ( 5) and reflecting upon the energy balancing, will increase in each step of the algorithm.In this way, the lifetime of the network can be maximized.Furthermore, by repeating the steps until the given reliability parameter has been reached, we also solve the constrained optimization. .Thus, we needed to increase the transmission energy and found the optimal path given in Figure 3 until fulfill the condition, resulting the path ( ) BS and we will get the new distribution of energy in network were described by (Figures 3 and 4).One must note that in this case HQRA algorithm is working with the smallest transmission energy in the sensor node and this energy saving mode will increase the lifespan (Figure 3).Increase the transmission energy when the reliability of optimal path has not yet been reached (Figure 4).

Complexity analysis
Since the Bellman-Ford algorithm needs O N 3 ( ) steps and the maximum number of times when it iteratively has to run is the maximum number of energy levels ∆ L , thus the overall complexity in terms of the number of steps the algorithm requires for execution is ( )

Numerical Results
In this section we investigate the lifespan of WSN by using the proposed routing algorithm.This investigation involves both the dynamics of energy consumption and the longevity of WSN according to different criteria.To get a deeper insight about the performance we compare the results with the PEDAP algorithm.

Performance analysis and numerical results for HQRA algorithm
The simulation parameters used in the experiments are indicated by Table 1.The aim is to evaluate the lifespan of WSNs containing N=30 sensor nodes placed subject to random localization.The fading   .Each time there is a randomly selected source node to transmit packet to the BS.The distance from SN to the BS may be too far so the SN cannot transfer directly to the BS, but it will transmit data from SN to the BS in a multi-hop manner, through M sensor nodes (1<M<N).
A sensor node is considered to be dead if its energy is smaller than the smallest transmission energy.In this case the threshold of energy we set n=100(µJ).The lifetime is defined as the time from the network starting information transmission to the first sensor node died (Figure 5 and Table 1).The graphs in (Figures 5 and 6) depicted the optimal paths by PEDAP and HQRA algorithm.The results of these algorithms can be seen very clearly in Table 2.With the same source node and the smallest transmission energy, HQRA algorithm gives higher values of the probability of successful packet transfers than PEDAP (Figure 7) describes the residual energy in each sensor node in the case of running the PEDAP and HQRA algorithms.One can see that HQRA algorithm achieves the same level of energy in each sensor node.It implies that all sensor nodes died at approximately the same time and there were no more residual energy in the network when this network stopped working.This also means that HQRA algorithm used most of energy in each sensor node in order to maximize the lifetime of the network and after the death of the network there is no remaining latent energy.In Figure 7, the number of working rounds in "hot spot" (sensor node 1) is depicted.One can see that PEDAP provides an approximate 1.74 times smaller working rounds than HQRA.The results indicated that sensor node 1 lost its energy at a higher rate and died much faster than    others.One of the most important methods to prolong the lifetime of the network is balancing the energy consumption in each sensor node [16].As seen, by the PEDAP algorithm, after 681 rounds of working, the energy in sensor node 1 ran out of energy while the levels of energy in other sensor nodes (node 2, node 3…) were still very high.Entropy maximization method overcomes this limitation, HQRA algorithm has better energy balancing in each sensor node.In the Figure 8, we can see the comparison of energy balancing among sensor nodes.All the sensor node in HQRA algorithm used up almost all their energies in order to prolong the lifespan, while in PEDAP algorithm, there were just one or two sensor nodes which ran out of energy before the WSNs went dead.In Figure 9, the number of rounds until the first node is shown in the case of PEDAP vs. HQRA under the same reliability condition.
One more time we can see that HQRA algorithm got the maximum lifespan of the network in all the cases.In this case, we measured reliability as the ratio of the number of successful packets received at the BS vs. the total number of packets sent from source nodes.In Figure 10, we increased the number of sensor nodes (N=30, 50, 75, 100) in the same network area (100 m × 100 m) and measured the network reliability of all algorithms which is also increased.Along all the paths the probability of successful packet transfers were calculated by the Equation 3.And the optimal paths were selected on the basis of their probability are higher than ( ) It is clear that the network reliabilities achieved by the HQRA algorithm is higher than the ones achieved by PEDAP, in all cases (Figure 10).To test the effectiveness of the HQRA algorithm, we run the simulation when increasing the reliability threshold 1 0.6 0.99 ε − = → and then checked the change of lifespan of networks.Naturally, we found that the higher the reliability threshold, the higher the energy consumption will become that reduces the lifetime of networks.The results are shown in Figure 11 in details.However, the HQRA algorithm proves to be superior in terms of having the longest lifetime.

Conclusions
In this paper we proposed a new High Quality of Service Routing Algorithm for WSNs, which finds the minimum energy path from the source node to the BS and achieves a predefined level of reliability.The proposed method can run in polynomial complexity with respect to the number of nodes, by recursively using the Bellman-Ford algorithm.The new algorithm proved to be far more energy efficient, and thus improving the lifetime of WSNs, than other algorithms.Our numerical results also demonstrated that in the case of other algorithms, when the first sensor node dies the network structure does not remain stable and the network energy consumption increases dramatically.As a result, the network quickly ceased to operate any longer because all the nodes became dysfunctional and run out of energy.The new algorithm can solve this problem by balancing the energy consumption on each sensor node.

 1 ,
The energy state of the nodes are denoted by G i , i=1,….|V| The normalized energies are

Figure 1 :
Figure 1: Multihop communication between sensor nodes and the BS in WSNs.

.. 6 .
If it holds the procedure has been finished as a reliable path has been found with minimum transmission energies.4. If not then select G min : min i=1,..,V G i and select the transmission energies as gi:= G i -G min (in this way each node has the same remaining energy) and perform the BF algorithm with If it holds the procedure has been finished as a reliable path has been found with uniform remaining energies.If not go back to Step 1.
The steps of this algorithm has been demonstrated by the following figure.Here the node energies G i , i=1,….,|V| are indicated near the nodes and the reliability parameter (1 -) ε have been chosen as 0.92 (Figure2)Choose the smallest transmission energy by HQRA.By performing the BF algorithm with the measure

Figure 2 :
Figure 2: Choose the smallest transmission energy by HQRA.

Figure 3 :
Figure 3: Increase the transmission energy when the reliability of optimal path has not yet been reached.

Figure 4 :Page
Figure 4:The new energy distribution when the reliability of the path has been reached.

Figure 5 :
Figure 5: The optimal path obtained by PEDAP algorithm.

Figure 6 :
Figure 6: The optimal path obtained by HQRA algorithm with the source node is sensor node 1.

Figure 7 :
Figure 7: The energy consumption in each sensor node by PEDAP and HQRA algorithm.

Figure 10 :
Figure 10: The Network reliability with different of network size.

Figure 11 :
Figure 11: The Network reliability when changing the threshold reliability of networks.

Figure 8 :
Figure 8: Comparing the energy consumption in all sensor nodes separately.

Table 1 :
The simulation parameters.

Table 2 :
The Results of PEDAP and HQRA Alogorithm.