Fuzzy and Gravitational Search Based Routing Protocol for Lifetime Enhancement in Wireless Sensor Networks

In recent times, the demand for real-time multimedia applications is rapidly increased due to the increasing mobile users. Wireless Sensor Network (WSN) often suffers because of the overhead produced during message passing, constant energy and node cost. To provide solution to these issues, in this study, we propose Fuzzy and Gravitational Search Based Routing Protocol for Lifetime Enhancement in WSN. Gravitational Search Algorithm (GSA) is used for searching the paths. As GSA finds the global optimum faster, it has higher convergence rate. An improved routing technique is proposed for lifetime enhancement in WSN. For estimating the node cost using fuzzy logic, the parameters such as link quality and distance from the sink node, residual energy and load are used. Simulation results prove that the proposed protocol performs well compared to the existing protocols.


INTRODUCTION
WSN supports cost effective administration of remote places to observe the customary activities, environmental conditions etc. WSNs are highly vulnerable to attacks due to the close contact with their physical environment and the unattended consumption of sensor nodes in hostile environments.Security implementation in WSNs is a critical task.WSNs have a distributed data acquisition system consist of sensor nodes that are randomly deployed in a large area for gathering important information from the sensor field.As the sensor nodes have limited energy resources, the energy consuming operations such as data collection, transmission and reception must be kept minimum (Chakraborty et al., 2009).WSNs are implemented in real time applications for weather monitoring, security, tactical surveillance, disaster management and intelligent traffic control applications.However, the distributed infrastructure-free operation in remote locations makes the replacing batteries expensive.The lifetime of the network depends on the distribution of power among nodes and the average power consumption (Joshi and Asutkar, 2012).
The applications of WSNs include target tracking and battlefield surveillance in military, health care system and scientific exploration in civilian operations.The main task of WSNs is monitoring some kinds of area and reporting the collected data to Group head (or Base Station (BS)) using wireless channel.Their low cost and rapid deployment make them particularly attractive for many applications such as health monitoring, habitat monitoring, traffic monitoring, object tracking, fire detection building protection, pollution detection, battlefield management (Long et al., 2009).WSNs play a vital role in a multitude of applications ranging from environmental surveillance over medical monitoring to home automation (Lokhande and Thakare, 2013;Rashedi et al., 2009).WSNs are widely used in both military and civil applications to monitor physical or environmental conditions, including magnetism, temperature, sound, motion, vibration, pressure and chemical elements.Military surveillance applications motivate the development of sensor network technology to detect biological and chemical weapons (http:// /www.isi.edu/nsnam/ns)Secure communication among sensor nodes is essential for many of these applications, especially if sensitive information is exchanged in the network.
The lifetime of the networks is measured as the time taken for the first node fails due to power depletion.The mobility of data collection points (sinks) is considered for increasing the lifetime of the network with energy constrained nodes.The design of poweraware lifetime maximization algorithms for sensor networks is a forthcoming area for researchers.The performance of the sensors remains the same throughout the lifetime of the network (Anitha et al., 2013).
Clustering is one of the energy-efficient techniques for extending the lifetime of a sensor network.It is often coupled with data aggregation to extend the network lifetime.LEACH provides significant energy savings and prolonged network lifetime over conventional multi-hop routing schemes (Park et al., 2010).To extend the lifetime of WSNs, it is necessary for each sensor node to reduce the number of transmissions in the network.WSN has worked on limited energy resources; the high effectiveness is an important requirement for longer lifetime of WSN (Long et al., 2009).The complementary techniques such as hetero genus battery allocation have the potential to efficiently extend the WSN lifetime (Mannan, 2012).
WSNs operate on multiple hops based on relaying the data packet, the energy hole reduces the lifetime of WSN.Fraction of total energy consumption for data transmission and reception is small for such systems because events occur rarely.To sense the event, constant energy is required that cannot be controlled (Lokhande and Thakare, 2013).

Objective of the work:
Most of the existing works on lifetime enhancement of WSN did not consider the problems such as overhead of message passing, constant energy, the node cost.A-Star algorithm (Alshawi et al., 2012) consumes huge memory to keep the data of current proceeding nodes.Hence the objective is to design an efficient algorithm which considers energy, load and link quality and distance parameters for node cost in WSN and achieves faster convergence.
To meet these objectives, Fuzzy and Gravitational Search Based Routing Protocol for Lifetime Enhancement in WSN is proposed.Gravitational Search Algorithm (GSA) is used to search the paths.It tends to find the global optimum faster than other algorithms i.e., higher convergence rate.An improved routing technique is performed for lifetime enhancement in WSN.In fuzzy approach for estimating the node cost, the parameters link quality and distance from the sink node are included in addition to the energy and load.et al. (2010) have proposed the section sizes of a multi hop cooperative WSN that maximizes the network lifetime.The simulation results show that a significant lifetime enhancement for the proposed optimal sectoring.Di Caro and Flushing (2012) have defined the relay node locations in order to improve network performance in terms of delivery ratio and end-to-end delay and to provide connectivity in partially disconnected areas.Typical application scenarios include the repair of the network in the face of failures, or the case of networks used in dynamic environments, such as network characteristics need to be dynamically adapted to the changing conditions.They formalize the problem by defining a linear, mixed integer mathematical programming model.They include a number of constraints and penalty components, aimed at closely modeling the specific characteristics of the wireless environment.Model solutions specify both where to place the relays and the optimal data paths to route the data.They compare the solutions provided by this scheme against a state-of-the-art dynamic routing protocol, to assess the quality of the routes and against a relay node placement heuristic, to evaluate the positioning of the relay node.

Rad
Saraswat and Kumar (2012) have proposed dual cluster head technique where the primary and secondary cluster head is chosen based upon the state, including position and energy reserved of neighbor nodes.The primary cluster head collects the data from its member nodes and forwards to the secondary cluster head, which transmits the data directly to the sink.This technique balances the network load to extend the network lifetime effectively.Park et al. (2010) have proposed a new routing protocol based on a lightweight genetic algorithm in which the sensor nodes are aware of the data traffic rate to monitor the network congestion.In addition, the fitness function is designed from both the average and the standard deviation of the traffic rates of sensor nodes.Based on dominant gene sets in a genetic algorithm, it selects suitable data forwarding sensor nodes to avoid heavy traffic congestion.In experiments, this method demonstrates efficient data transmission due to much less queue overflow and supports fair data transmission for all sensor nodes.Long et al. (2009) have proposed a formulation and solution to the cost constrained Lifetime-aware battery allocation problem in sensor networks with arbitrary topologies and heterogeneous power distributions.Based on an energy-cost battery pack model and optimal node-partitioning algorithm, a rapid battery pack selection heuristic is developed and its deviation from optimality is quantified.Experimental results indicate that this technique achieves the network lifetime improvements ranging from 3-11 compared to uniform battery allocation, with no more than 10 batteries pack energy levels.The proposed technique achieves 2-5 orders of magnitude speedup compared to a general-purpose commercial nonlinear program solver, solution quality improves and little approximation error is observed.
Mannan (2012) has proposed Self-Organizing Maps (SOM) based unsupervised Artificial Neural Network learning technique to enhance average battery life.This system allows all active nodes to transmit their sensory data to the Base Station Node (BSN), which has a 2×3 SOM running, on it.Sensor nodes start sending data to the BSN; it keeps on making categories and puts relevant data in appropriate category/classes.
SOM is trained after it has received a number of such transmissions from active nodes.Class definitions are then broadcast to all active nodes by BSN and from then onwards they transmit only the class definitions (that are fairly lesser in size) to BSN and hence significant battery power is conserved.Alshawi et al. (2012) have proposed a new routing method for WSN to extend the network lifetime using a combination of a fuzzy approach and A-Star algorithm and determine an optimal routing path from the source to the destination by favoring the highest remaining battery power, minimum number of hops and minimum traffic loads.They compare their approach with the Astar search algorithm and Fuzzy approach using the same routing criteria in two different topographical areas.Simulation results demonstrate that the network lifetime achieved by this method could be increased by nearly 25% more than that obtained by the A-star algorithm and by nearly 20% more than that obtained by the fuzzy approach.

PROBLEM IDENTIFICATION AND PROPOSED SOLUTION
Problem identification: The existing methods available in the literature review, although able to solve the issues in their own criteria still we find these below limitations: • Overhead of message passing is not handled.
• Constant energy is not handled.
• In estimating the node cost, only energy and load are considered ignoring the link quality.• A-Star Algorithm is a breadth first algorithm; it consumes huge memory to keep the data of current proceeding nodes.During the traversing of all grids which are possible to be placed on the optimized path, a huge size of stack is needed to contain the considering grids.
As a solution to the above problems, this study proposes to develop an improved routing technique for lifetime enhancement in WSN.In this solution, fuzzy approach is used for estimating the node cost using the parameters link quality and distance from the sink node, energy and load.
To provide the solution in a well-defined flow, this study first gives an architectural diagram.Then the work is flowing into the first phase of the application of fuzzy rules.The phase is made rich with a modular diagram, described method and an algorithm.In the second phase, a GSA algorithm is described with the modular diagram, description and algorithm with it.At last an overall diagram is given.

Proposed solution:
As a solution to the above problems, this study proposes to develop an improved routing technique for lifetime enhancement in WSN.Estimation of link quality: The Link Quality (LQ i ) of the node N i is estimated based on the successful transmissions of data packets to the neighbors.It is defined as exponential moving average, where the transmissions in the past are less significant than current transmissions in assessing the link performance for transmissions (Basagni et al., 2012).
Consider the scenario to transmit the data packet (q) from N i to its neighbor node N j : (3) where, δ = Smoothing factor in the range of [0, 1].The higher value of δ is used for variable underwater sensor channels since it reduces the older transmissions quickly.= Success ratio of q th transmissions from i to j.
It is defined as the ratio of the number of correctly received data packets by N j to the number of packets transmitted.H˝ # = Moving average after (q-1) transmissions from N i to N j .

Estimation of load:
The load of the node is estimated in terms of the queue length.It is estimated using the following Eq.( 4) (Basaran et al., 2010): where, P i = Number of packets in N i 's queue P j = Number of packets in N j 's queue δ = Re-transmitting limit of a single packet P di = Packets dropped by N i due to excessive retransmissions.
Thus, each node performs the load balancing among the nodes based on queue length.

Fuzzy logic implementation:
In this solution, fuzzy approach estimates the node cost by using the parameters such as link quality, distance from the sink node, energy and load.
The steps that determine the fuzzy rule based interference are as follows: Fuzzification: This involves obtaining the crisp inputs from the selected input variables and estimating the degree to which the inputs belong to each of the suitable fuzzy set.

Rule evaluation:
The fuzzified inputs are taken and applied to the antecedents of the fuzzy rules.It is then applied to the consequent membership function.

Aggregation of the rule outputs:
This involves merging of the output of all rules.

Defuzzification:
The merged output of the aggregate output fuzzy set is the input to the defuzzification  process and a single crisp number is obtained as the output.
Fuzzification of node cost: In this step, node cost is estimated through fuzzification.Figure 2 shows the application of fuzzy rules in estimating node cost.Figure 3 to 6 shows the membership function for the input variables.The Table 1 shows the fuzzification rules.

Defuzzification of node cost:
The technique by which a crisp values is extracted from a fuzzy set as a representation value is referred to as defuzzification.The centroid of area scheme is taken into consideration for defuzzification during fuzzy decision-making process.The formula (5) describes the defuzzifier method: where, fuzzy_cost is used to specify the degree of decision making, f i is variable for fuzzy all rules and α(f i ) is its membership function.The output of the fuzzy cost function is modified to crisp value as per this defuzzification method.
Hence, the node cost is estimated using fuzzy logic technique.

Algorithm for fuzzy application phase:
Step 1: Get the cost of the nodes as the inputs of the neural network.
Step 2: Put the weight age as link quality.
Step 3: Get the output as chosen node cost.

Gravitational Search Algorithm (GSA):
The optimization algorithm depends on the law of gravity (Rad et al., 2010) where the agents are considered as objects and their performance is measured by their masses (Fig. 7).All these objects attract each other by the gravitational force.This force causes a global movement of all objects towards the objects with heavier masses.Hence, the masses cooperate using a direct form of communication through gravitational force.The heavy masses, which correspond to good solutions, move more slowly than lighter ones.This guarantees the exploitation step of the algorithm.In GSA, each mass (agent) has four specifications: position, inertial mass, active gravitational mass and passive gravitational mass.The position of the mass corresponds to a solution of the problem.Its gravitational and inertial masses are determined using a fitness function.In other words, each mass presents a solution and the algorithm is navigated by properly adjusting the gravitational and inertia masses.By lapse of time, this study except that masses is attracted by the heaviest mass.This mass will present an optimal solution in the search space.The GSA could be considered as an isolated system of masses.It is like a small artificial world of masses obeying the Newtonian laws of gravitation and motion.More precisely, masses obey the following laws: Law of gravity: Each particle attracts other particle.The gravitational force between two particles is directly proportional to the product of their masses and inversely proportional to the distance between them, R.
(Here, R is used instead of R2, because according to the experiment results, R provides better results than R2 in all experimental cases).

Law of motion:
The current velocity of any mass is equal to the sum of the fraction of its previous velocity and the variation in the velocity.Variation in the velocity or acceleration of any mass is equal to the force acted on the system divided by mass of inertia.Now, consider a system with N agents (masses).The position of the i th agent is given by: 1 ( ............. ............. ) where, Xdi presents the position of youth agent in the death dimension.At a specific time 't', the force acting on the mass 'i' from mass 'j' is defined as follows: where, M aj = The active gravitational mass related to agent j M pi = The passive gravitational mass related to the agent i G(t) = Gravitational constant at time t, e is a small constant and R ij (t) = The Euclidian distance between two agents i and j.It is estimated by: ( ) ( ). ( ) To give a stochastic characteristic, we suppose that the total force that acts on agent i in a dimension d be a randomly weighted sum of d th components of the forces exerted from other agents: where, rand j is a random number in the interval [0, 1].Hence, by the law of motion, the acceleration of the agent i at time t and indirection death, Adi ð t Þ , is given as follows: where, M ij is the inertial mass of i th agent.
Furthermore, the next velocity of an agent is considered as a fraction of its current velocity added to its acceleration.Therefore, its position and its velocity could be calculated as follows: ( 1) * , ( 1) ( ) ( 1) x v where, rand i is a uniform random variable in the interval [0, 1].The random number gives a randomized characteristic to the search.The gravitational constant, G, is initialized at the beginning and will be reduced with time to control the search accuracy.In other words, G is a function of the initial value (G 0 ) and time (t): Gravity and inertia masses are simply calculated by the fitness evaluation.Heavier mass is more efficient agent.This means that better agents have higher attractions and walk more slowly.Assuming the equality of the gravitational and inertia mass, the values of masses is calculated using the map of fitness.The gravitational and inertial masses are updated by using the following equations: where, fit i (t) represent the fitness value of the agent i at time t.worst (t) and best (t) are defined as follows (for a minimization problem): It is to be noted that for a maximization problem, Eq. ( 11) and ( 12) are changed to Eq. ( 13) and ( 14), respectively: One way to perform a good compromise between exploration and exploitation is to reduce the number of agents with lapse of time in Eq. ( 13).Hence, only a set of agents with bigger mass apply their force to the other.Care should be taken while using this policy because it may reduce the exploration power and increase the exploitation capability.In order to avoid trapping in a local optimum, the algorithm must use the exploration at the beginning.By lapse of iterations, the exploration must fade out and exploitation must fade in.To improve the performance of GSA by controlling exploration and exploitation, only the K best agents will attract the others.K best is a function of time, with the initial value K 0 at the beginning and decreasing with time.In such a way, at the beginning, all agents apply the force and as time passes, K best is decreased linearly and at the end, there will be just one agent applying force to the others.Therefore, Eq. ( 9) could be modified as: where, K best is the set of first K agents with the best fitness value and biggest mass.
The different steps of the proposed algorithm are given below: Algorithm for GSA phase: Step 1: Search the identification.
Step 2: Initialize the system randomly.
Step 3: Review the fitness of agents.
Step 5: Calculate the total force in different directions.
Step 6: Calculate the acceleration and velocity.
Step 7: Update the position of the agents.
Step 8: Repeat the steps 3 to 8, until the stop criteria are reached.
To see how the proposed algorithm is efficient some remarks are noted: Since each agent could observe the performance of the others, the gravitational force is an informationtransferring tool.Due to the force that acts of an agent from its neighborhood agents, it can see the space around it.A heavy mass has a large effective attraction radius and hence a great intensity of the attraction.Therefore, the agents with higher performance have a greater gravitational mass.As a result, the agents tend to move toward the best agent.The inertia mass is against the motion and makes the mass movement slow.Agents with heavy inertia mass move slowly and hence search the space more locally.So, it can be considered as an adaptive learning rate.
Gravitational constant adjusts the accuracy of the search, so it decreases with time (similar to the temperature in a Simulated Annealing algorithm).GSA is a memory-less algorithm but works efficiently like the algorithms with memory.Results show the good convergence rate of the GSA.Here, we assume that the gravitational and the inertial masses are same.However, for some applications, different values can be used.A bigger inertia mass provides a slower motion of the agents in the search space and hence a more precise search.Conversely, a bigger gravitational mass causes a higher attraction of agents.This permits a faster convergence.

SIMULATION RESULTS
Simulation model and parameters: Network Simulator (NS2) (http:///www.isi.edu/nsnam/ns) is used to simulate the proposed architecture.In the simulation, The simulation settings and parameters are summarized in Table 3 (Sparse Scenario).

Performance metrics:
The proposed Fuzzy and Gravitational Search Based Routing Protocol (FGSRP) is compared with the A-star technique (Alshawi et al., 2012).The performance is evaluated mainly, according to the following metrics:
Figure 8 shows the delay of FGSRP and A-star techniques for different rate scenario.We can conclude that the delay of our proposed FGSRP approach is 36% less than A-star approach.conclude that the delivery ratio of our proposed FGSRP approach is 30% higher than A-star approach.
Figure 10 shows the drop of FGSRP and A-star techniques for different rate scenario.We can conclude that the drop of our proposed FGSRP approach is 11% less than A-star approach.
Figure 11 shows the residual energy of FGSRP and A-star techniques for different rate scenario.We can conclude that the residual energy of our proposed FGSRP approach is 18% higher than A-star approach.
Figure 12 shows the delay of FGSRP and A-star techniques for different rate scenario.We can conclude that the delay of our proposed FGSRP approach is 9% less than A-star approach.
Figure 13 shows the delivery ratio of FGSRP and A-star techniques for different rate scenario.We can conclude that the delivery ratio of our proposed FGSRP approach is 54% higher than A-star approach.
Figure 14 shows the drop of FGSRP and A-star techniques for different rate scenario.We can conclude that the drop of our proposed FGSRP approach is 23% less than A-star approach.
Figure 15 shows the residual energy of FGSRP and A-star techniques for different rate scenario.We can conclude that the residual energy of our proposed FGSRP approach is 34% higher than A-star approach.

CONCLUSION
Considering the problems of Overhead of message passing, constant energy, the node cost this study gives the solution.A-Star Algorithm consumes huge memory to keep the data of current proceeding nodes.This study applies Gravitational Search Algorithm (GSA) for searching the paths.It tends to find the global optimum faster than other algorithms have a higher convergence rate.This study proposes to develop an improved routing technique for lifetime enhancement in WSN.In fuzzy approach for estimating the node cost, the parameters link quality and distance from the sink node are included in addition to the energy and load.To describe the solution in a standard manner this study first gives a suitable introduction described in the first section.Few works that have been done on the fuzzy logic and GSA has been given in literature review that is described in section two.Problem definition and enhancement of the problem is given in section three.An overall conclusion is given section five following by the result of simulation in section four.This mass will present an optimal solution in the search space.Gravitational constant adjusts the accuracy of the search, so it decreases with time; GSA is a memory-less algorithm.However, it works efficiently like the algorithms with memory.It shows the good convergence rate of the GSA.

Fig. 1 :
Fig. 1: The architectural diagram of proposed methodologyFigure1shows the architecture of the proposed methodology.The proposed method starts with the fuzzy logic applications with the inputs of node costs.Estimation of metrics:Estimation of residual energy: The residual energy (E res ) of each sensor node (N i ) is estimated using following formula(Quang and Miyoshi, 2008):E res = E i -(E tx +E rx ) (1)where, E i = Initial energy of the node E tx , E rx = Energy utilized at the time of transmission and reception of data Nodes with greater remaining energy participate in the transmission and reception more the nodes with limited power.Estimation of distance from sink: Each sensor node estimates the Distance to Sink (DS) based on the Received Signal Strength (RSS)(Blumenthal et al., 2007):

•
Packet delivery ratio: It is the ratio between the number of packets received and the number of packets sent.• Packet drop: It refers to the average number of packets dropped during the transmission.• Residual energy: It is the amount of energy remaining in the nodes.• Delay: It is the amount of time taken by the nodes to transmit the data packets.

Table 1 :
Output of fuzzy network applied

Table 2 :
Simulation parameters in dense scenario