Energy Efficient Routing Protocol for Maximizing Lifetime in Wireless Sensor Networks using Fuzzy Logic and Immune System

Energy limitations has become fundamental challenge for designing wireless networks systems. One of the important and interested features is network lifetime. Many works have been developed to maximize wireless sensor network lifetime, in which one of the important work is routing. This paper proposes a new adaptive routing technique for prolonging the lifetime in wireless sensor networks by using Fuzzy-Immune System. The artificial immune system is used to solve the packet LOOP problem and to control route direction. While fuzzy logic system is used to determine the optimal path for sending data packets. The proposed routing technique seeks to determine the optimal route path from source to destination so that energy consumption is balanced. The proposed routing technique is compared with classical method. Simulation results demonstrate that the proposed technique shows significant increase in network lifetime of about 0.93. The proposed technique proved that energy consumption is well managed. Keywords—routing; fuzzy logic; artificial immune system; network lifetime; wireless sensor networks


INTRODUCTION
Recent years advances show serious progress in wireless networking.The progress and growth in wireless communication technology have made WSNs attractive for multiple application areas, such as medical and health, security surveillance, habitat monitoring, military reconnaissance, disaster management, industrial automation, etc. [1][2][3][4].The development of small and ubiquitous WSNs computing devices is ultimately required.WSNs are comprised of considerable number of limited capabilities sensor nodes with one or more high capability base stations.Each sensor node is a small embedded system, low-power, low-cost, multi-functional [3] Each sensor node performs several functions: sensing, data processing, and communication.
Sensor nodes perform wireless communications with each other in order for delivering gathered data to base station.The development of ubiquitous, inexpensive, small and low-power computing devices became available through miniaturization technologies [3].Due to this, using multi-hop communication help to reduce transmission distance as well as increasing network lifetime.Every node consists of four parts: a processer, sensor, transceiver, and battery.Nodes involve bounded power source with abilities of sensing, datum processing along with communication.The onboard sensors collect datum about the environment through event driven or continuous working mode.The gathered datum may be temperature, pressure, acoustic, pictures, videos, etc.The gathered datum is then transferred across the network in order to form a global monitoring view for objects [5,6].
Since bounded energy source is involved, energy exhaustion is the most important metric for WSNs.In order for maximizing networks lifetime, energy exhaustion must be well managed [7,8].Balancing energy exhaustion refers to the major problem in characterizing WSNs.Network lifetime might reduce significantly if the energy exhaustion is not balanced, and may lead to network partition quickly.Several techniques can be used for maximizing network lifetime, in which one of the important technique is network layer routing.Generally, in network layer routing algorithm, choosing the best route between nodes and base station represent the main objective of routing algorithms.If same path would be choose for all new communication by taking the benefit of fast transmission at the expense of battery energy exhaustion, sensor nodes of this path will drain its energy quickly and may cause network partition.
In this paper, an adaptive fuzzy-immune routing technique is proposed.The main goal of the proposed routing technique is to make energy consumption balance that prolongs the overall network lifetime.This paper is organized as follows: section II describe the proposed routing technique.Simulation settings are presented in section III.Simulation results and discussion are presented in section IV.Conclusion is presented in section V.

II. THE PROPOSED ROUTING METHOD
The proposed energy efficient routing protocol is performed by combining artificial immune system and fuzzy logic system.The goal of the proposed routing protocol is balancing energy consumption and extending network lifetime.Artificial immune system is used to solve packet LOOP problem and control route direction.Fuzzy system is used to find the optimum path from sensor nodes to sink.
Sensor nodes are responsible for collecting data from its neighbor's nodes.In this paper, time driven routing schedule is supposed.Each node finds the optimal rout for sending data packets to the sink in every time cycle.Using this scheduling www.ijacsa.thesai.orgfor routing, the procedure of determining optimum route while sending data packets to the sink for all nodes will repeated for each round.For the proposed routing protocols: (1) for a specified field random deployment is involved for whole nodes along with knowledge about their positions and their neighbors positions within its range and the position of the sink; (2) initial energy and maximum transmission range are identical for all sensor nodes.Energy management efficiency is the most important WSNs design challenges; it gives a measure about WSN lifetime which perhaps the most serious metric owing to evaluating WSNs.The definition of net lifetime gives a meaning for time from turning on till first node die within net.The lifetime is the most challenging problem in WSN.Also the packet delivery ratio is used to evaluate the proposed routing technique.
In this paper, an adaptive routing protocol is proposed for managing energy consumption and maximizing the overall lifetime of the network.The proposed routing protocol maximize the network lifetime by involving the artificial immune system and fuzzy system.Two metrics have been used in our new routing method are the remaining energy (RE) and the shortest hop (SH) to select the optimal next hop node to the current node.Shortest hop (SH) is the distance from sensor node to the sink.Selecting the next hop of highest remaining energy (RE) and shortest hop (SH) to sink is the responsibility of proposed routing algorithm.Hence, energy consumption is balanced and the lifetime of the network is maximized.
The general structure of the proposed routing protocol is illustrated in figure 1.When a sensor node likes to send or forward data packets, firstly find all of its neighbors.Artificial immune negative selection algorithm is then used to control route direction and solve packet LOOP problem.It classify all neighbor nodes into two categories, good neighbor nodes (GNBR) and bad neighbor nodes (Danger nodes) by using a specified criterion.The good neighbor nodes (GNBR) will contributes in the optimum path finding process.Fuzzy logic system is used to find optimum node from the good neighbor nodes (GNBR) to send or forward it the data packets.Fuzzy logic system make a decision for computing edge cost related to the remaining energy and shortest hop metrics.The favor edge cost is that involves highest remaining energy and shortest hop to sink.Hence, node with highest edge cost value will be selected as next hop node.Depending on this process next hop node is selected and added to OPEN list along with tagging it as current node.If this node is inside sink's range then optimum path is OPEN list.If current node is not inside sink's range, the proposed algorithm is repeated (classifying GNBR nodes, finding their cost function values, and selecting node of highest cost function value) for the current node (the latest node added to OPEN list) to find its next optimum node.The OPEN list is used in the algorithm to store the optimum nodes that finally represent the optimal path.The OPEN list is then store the optimal path when the algorithm ends and the optimal path is found.Hence, the operation of the proposed algorithm is repeated for every node like send or forward data packets.

A. Artificial Immune System
The AIS has deduced from biological immune system of humans that defend the body against the threats.Naturally, the immune system is so complicated system and involve several functions.The master function is to defend against attacker cells.This is achieved by using two techniques, which are innate and acquired techniques.The master function takes the responsibility of classifying human cells into two categories which are self and non-self cells [9].By using special type of defense, the immune system enforce non-self cells for some treatments that led them to disintegration.The immune system has the ability of learning via mutation in order for distinguishing among external antigens, such as bacteria or viruses, and self cells of body.
Immune system framework involves negative selection process.The purpose of this algorithm is providing existence probability of self cells [10].Processing of this algorithm involves some activities.First is ability of detecting strange antigens along with discarding reaction to self cells.By using random processing genetical arrangement, receptors be made during T-cells generation.Second, under sensory processing in thymus, receptors' T-cells that affect self-proteins subject for destroying along with allowing ones that not affect selfproteins for leaving thymus.The forward T-cells spread over the body for subjecting to immunity reactions.This processing can protect bodies from strange antigens.
Forrest [11], in 1994, were firstly introduced the algorithm for detecting datum in computer systems when they handling viruses.This processing is carried out by generating two sets.The first set is self categories that give an indication about normal situation of that system.The second set is detectors that discover S-complement.Hence, datum have to be subjected to detectors set so as for recognizing them as self and non-self.This section investigates the application of artificial immune in WSNs to solve packet LOOP problem and to control the direction of the routes.Artificial immune system provides the ability for detecting danger neighbor nodes.This is done by classifying nodes as good neighbor nodes (GNBR) and bad neighbor nodes (danger nodes).Route direction control is crucial feature in the design of any routing algorithm.If this algorithm is not used, the packet may sent faraway from sink and encounter packet LOOP, which exhaust more energy for the failed packets.Implementing route direction control will improve the routing algorithm, ensure that the packet will not get a path faraway from sink, minimize energy exhaustion, and maximize network lifetime.
Good neighbor nodes (GNBR) will contribute to the optimal path finding, using fuzzy logic system, while the bad neighbor nodes (danger neighbors) will be discarded.The criteria used for classifying the good and bad neighbors nodes depends on the distance to sink metric.The artificial immune negative selection algorithm that used in the proposed routing technique is listed below.

Inputs : S has the criteria to classify good neighbor nodes;
S={S:s∈P| distance to sink D(s)<distance to sink D(n)}; where, n is the node want to send packets, s is a neighbor node, P is the set of all neighbors nodes for node n 2. Output : D is the set of good neighbors nodes (GNBR) 3. Repeat for all neighbors nodes in the set P for node n a. Determine the affinity of each member of P with good neighbors criteria S b.If neighbor node satisfies the criteria S, add it to set of good neighbors D c. Else discard the neighbor node and define it as danger node for node n. 4. Stop when all neighbor nodes for node n has been classified

B. The Fuzzy Logic System
Fuzzy logic was first proposed by Zadeh in 1965 [12].Fuzzy logic is an extension of the classical propositional and predicate logic that rests on the principles of the binary truth functionality.Fuzzy systems implementation was expanded for wide applications like systems identification and control.Fuzzy systems are robust, easy to implement and has the advantage of processing non-linear systems.
For the proposed routing technique, the objective of the fuzzy system is to determine the optimal value of the node edge cost C(n) of node n depending on the remaining energy RE(n) and shortest hop SH(n).The shortest hop (SH) is the distance from sensor node to the sink.Figure 2 depicts the proposed fuzzy system with two inputs remaining energy RE(n) and shortest hop SH(n).The universal of discourse for inputs remaining energy (RE) and shortest hop (SH) and output node cost C, are [0…0.5],[0…120] for area A1; [0…180] for area A2, [0…1], respectively.The design of our fuzzy system uses five membership functions for the two inputs and output as illustrated in figure 3.
For fuzzy system, the inference engine consists of the rule base and processes the fuzzified values.The rule base is a series of IF-THEN rules, which related to fuzzy input variables and fuzzy output variable, and by using linguistic variables, each of which is qualified by fuzzy set.We have used 25 fuzzy rules in our design.Table 1 shows the rules used in the proposed routing technique.Any rule that fire share out in the final fuzzy solution calculation.Using center of area method for defuzzification, the final crisp value is calculated which represent the node edge cost C(n) in per unit.Equation (1) describes the center of area defuzzification method.

𝑁𝑜𝑑𝑒 𝐶𝑜𝑠𝑡 𝐶(𝑛) =
where, R i is the output of rule base i, and c i is the center of the output membership function.This fuzzy design is employed in the proposed routing technique for determining the optimum next hop node with respect to the current node as well as ensuring energy consumption balance.

III. SIMULATION SETTINGS AND CONFIGURATION
Simulation is carried out in MATLAB.Two topological areas are considered in this paper, which are A1 and A2.A 100 nodes are randomly scattered for every two topological areas.The topological areas A1 and A2 have the dimension of 100mx100m for area A1 and 200mx50m for area A2.One base station "Sink" has been used for each topological area.The position of the sink is (90m,90m) for topological area A1, and is (180m,45m) for topological area A2.Every node operates with maximum transmission range equals to 30m.Every node has initial energy equals to 0.5J.A 200 bit packet length is used for simulation.The value of hop count limit (HCL) is equals to 10 and 15 for areas A1 and A2, respectively.Performance evaluation of suggested routing technique is tested for each of the two topological areas A1 and A2.The proposed routing technique utilized with first order radio model proposed by [13].This model is shown in the following equations.
where, E Tx and E Rx are the energy exhaustion for transmitting and receiving respectively.pkt length represents number of bits per packet.d represents distance between two communicating nodes.E elec represents per bit energy exhaustion for broadcasting or receiving for electrical hardware.E amp is the per bit per meter square energy exhaustion.E elec and E amp values that used for simulation are 50nJ/bit and 100pJ/bit/m2, respectively.
Routing protocols can be evaluated by using the packet delivery ratio, which is the ratio of successfully packets received packets by sink.The acceptable PDR value is greater than 0.95.The packet delivery ratio (PDR) is calculated by the following equation.

IV. SIMULATION RESULTS AND DISCUSSION
Simulation is carried out for the two topological areas.Two routing protocols have been considered in the simulation, which are Dijkstra routing, and the proposed routing protocol.Number of alive nodes in each round has used to give the indication about the lifetime of the WSNs.A comparison has been made for the two routing techniques with reference to overall network lifetime beside other metrics.Network lifetime defined as period between network starting work till the first sensor node die or exhaust its energy.
Figure 4 depicts network lifetime for the two topological areas A1 and A2, in terms of number of still alive nodes in each round till network partition.From this figure, it can be seen that the proposed fuzzy-immune technique is better than the Dijkstra method.It shows an increase in network lifetime of about 0.93 for area A1 and 1.375 for area A2.Also this figure shows the importance of introducing the artificial immune system for solving packet LOOP problem and route direction control, in which the packet delivery ratio will decrease to 0.84 for area A1 and 0.86 for area A2 if the immune system is not used.Result figures show the improvement of the proposed routing technique in comparison with a classical routing method.The proposed technique shows the improvements by investigating energy exhaustion balance, route direction control, and unity PDR along with prolonging overall network lifetime.Depending on the trace of our experiments for searching optimal path, the proposed routing protocol change the optimal path every round depending on the metrics used, the remaining energy (RE) and the shortest hop (SH).This change in the path used to send data packets from any node to sink prove the balance in energy consumption and as a result maximizing network lifetime.Network partition feature has been activated for the simulation.Network partition is work out when any of the 100 deployed sensor nodes has not find a neighbor nodes to send data packet.This is due to the died sensor nodes.Hence, simulation is stopped when network partition is occurred.Table 2 details the overall network throughput (lifetime, partition time, and PDR) for the two methods and for the two topological areas A1 and A2.
Figure 5 illustrates the network average remaining energy in each round for the two topological areas A1 and A2, and also a comparison between the proposed fuzzy-immune method and Dijkstra method.It is obvious from this figure that without using artificial immune system route direction control, the PDR of the network will decrease significantly.This figure shows that the Dijkstra routing method has some nodes exhaust its energy quickly due to the continuous usage of these nodes.This reflect the unbalanced energy consumption in the Dijkstra Routing.This is due to the usage of the same path for sending data packets from sensor node to sink.And this justify the high average remaining energy in the network.From this figure, the improvement of the proposed fuzzyimmune method can be seen; the average remaining energy has decreased along with the increase in the lifetime due to the use of more nodes that Dijkstra routing has not do.It is obvious that the improvement of the proposed technique is due to artificial immune route direction control and energy consumption balance.In addition, tracing results show that without using the artificial immune route direction control, the packets sent will encounter loops and may not successfully delivered to the sink.The proposed routing technique results in energy exhaustion balance along with extended overall network lifetime, and unity packet delivery ratio.Figure 6 illustrates average consumed energy for the two topological areas A1 and A2.From this figure, consumed energy for proposed routing is higher than the Dijkstra routing.The key effect of proposed routing protocol is achieving energy consumption balance and avoiding the continuous using of same nodes.This is due to the use of more hop nodes, which lead to maximize total network lifetime as well as PDR.This reflects the effectiveness of proposed routing protocol for balancing energy exhaustion besides maximizing network lifetime.
Figure 7 illustrates the packet delivery ratio (PDR) for the two topological areas A1 and A2.From this figure the proposed routing shows unity PDR along with higher network lifetime in comparison with Dijkstra routing which shows less network lifetime.This result gives the power point for the proposed routing method which guarantying unity PDR along with higher network lifetime.This figure also shows the importance of artificial immune system for controlling route direction by showing very low PDR as 0.84 for area A1 and 0.86 for area A2 for the proposed routing without using the route direction control.That mean not all packets have successfully delivered to the sink and have discarded by hop count limit (HCL) to save network remaining energy.
Figure 8 depicts the maximum number of hops in each round for the two topological areas A1 and A2.This figure shows that proposed routing is better than Dijkstra routing.It changes the path for sending packets continuously depending on the remaining energy and shortest hop metrics by using more hop nodes instead of using the same path as classical routing.Changing transmission path leads to energy consumption balance by using more hops and avoid continuous using for some nodes.Using more hops helps to investigate energy consumption balance, which leads to increase the PDR of the network.This adaptive operation owing to the proposed routing protocol increased network lifetime significantly.Figure 9 depicts average simulation time (end-to-end delay) in each round for the two topological areas A1 and A2.From this figure, simulation time for proposed routing is a little higher than of Dijkstra routing.So that applying the proposed routing has no effect on computation time for finding the optimal path for sending packets from source to destination.In addition, the figure shows high simulation time for the proposed routing without using the artificial immune system for route direction control.This is because there is high number of packets not delivered to the sink and discarded by hop count limit, which consume more computation time.V. CONCLUSION WSNs available with limited source power through their life cycle.Since the battery of the sensor node cannot be replaced or recharged, energy preservation occupies first crucial problem in designing WSN infrastructure.This paper presents an adaptive routing technique for maximizing WSNs lifetime using fuzzy logic system and the AIS.The AIS is used for solving packet LOOP problem and to control route direction, so that the packet will not sent far away from the sink.While fuzzy logic system in the suggested routing algorithm has used for determining optimum routes for sending data packets.
The proposed energy efficient routing protocol ensures that optimum paths from nodes towards base station is determined along with energy balance.Two topological areas have been used for simulation, which are topological areas A1 and A2.Simulations demonstrate that suggested technique has better performance against the Dijkstra routing.Simulation results show an increase in network lifetime of about 0.93 for area A1 and 1.375 for area A2.Simulation results show that without using artificial immune system for route direction control, the packet delivery ratio is decreased to about 0.84 for area A1 and 0.86 for area A2.This prove the importance of introducing artificial immune system for route direction control.Our experiments showed that without the use of the artificial immune route direction control, the goal of the routing protocol would not be satisfied.Simulation results show that the lifetime is maximized and the energy exhaustion is balanced for the proposed routing technique.
The efficiency of suggested method depicts good contribution in field of maximizing network lifetime using adaptive techniques.Simulation results prove the generality of the proposed technique, so that the proposed routing technique could be used for any design framework.

Fig. 1 .
Fig. 1.General structure of the proposed method

TABLE II .
NETWORK LIFETIME, PARTITION TIME, AND PDR