Energy Efficient Routing Protocol for Maximizing the Lifetime in Wsns Using Ant Colony Algorithm and Artificial Immune System

Energy limitations have become fundamental challenge for designing wireless sensor networks. Network lifetime represent the most important and interested metric. Several attempts have been made for efficient utilization of energy in routing techniques. This paper proposes an energy efficient routing technique for maximizing the networks lifetime called swarm intelligence routing. This is achieved by using ant colony algorithm (ACO) and artificial immune system (AIS). AIS is used for solving packet LOOP problem and to control route direction. While ACO algorithm is used for determining optimum route for sending data packets. The proposed routing technique seeks for determining the optimum route from nodes towards base station so that energy exhaustion is balanced and lifetime is maximized. Proposed routing technique is compared with Dijkstra routing method. Results show significant increase in network lifetime of about 1.2567. Keywords—ant colony algorithm; artificial immune system; adaptive routing; 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 helps 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 be chosen for all new communication by taking the benefit of fast transmission at the expense of battery energy exhaustion, sensor nodes of this path would drain its energy quickly and may cause network partition.
In this paper, an improved routing technique is proposed.The main goal of the suggested routing technique is balancing energy exhaustion along with maximizing network lifetime.The suggested routing technique is established by combining ant colony algorithm and artificial immune system so as for finding optimum path from sensor nodes towards sink.
The rest of the paper is organized as follows: related work is stated in section II.The suggested routing method is presented in section III.Simulation settings and configuration is presented in section IV.Section V describe simulation results and discussion.Conclusion is depicted in section VI.

II. RELATED WORK
The primary consideration upon WSNs refer to the design of energy efficient system.WSNs routing protocols have been widely used for minimizing energy exhaustion along with maximizing overall network lifetime.Routing techniques is responsible for determining the optimum route from nodes towards base station.The good routing protocol involves determining the optimum path with the investigating of minimum energy exhaustion.Hence, network lifetime is maximized.Maximizing the lifetime of the network has gained significant interest in recent years.www.ijacsa.thesai.org The work proposed by Aniket et al. [9] presents a bio inspired ACO optimization for optimum route identification.The proposed method is achieved by three steps.First, the base station made aware about network topology.Second, the base station find the optimal path using ant colony optimization.Last, the optimal path is used by sensor nodes to communicate with other neighbor nodes and the base station.Simulation results show an increase in throughput and an increase in network lifetime.
Fatemeh [10] proposed ACO routing technique with colored pheromones with clustering method in order to satisfy QoS metrics.Four types of classes have considered in the proposed method.Each class identified by color pheromone.These types provide some routing metrics.Node energy, bandwidth, energy exhaustion, and end-to-end delay are used as routing metrics for the proposed method.Simulation is carried out in GloMoSim simulator.The proposed method is compared with EAQR and AntSensNet methods.Simulation demonstrates the performance of suggested method is better than other two methods with respect to lifetime, throughput, packet delivery ration, and delay.
The work proposed by Ahmed et al. [11] presented a selfoptimization method for optimize sensor node energy to investigate energy consumption balance by using ant colony optimization to enhance the route with the best path.Several routing metric are used in this method.These metrics are residual energy, hop count, and average energy of route and network.Simulation is carried out in QualNet simulator.The proposed method is compared with EEABR method.Simulation results demonstrate an increase in the lifetime and reduction in energy consumption.
Bharathi et al. [12] proposed a reversed game theory for aggregation nodes selection with ACO routing algorithm.The suggested algorithm first selects a node for aggregation, which is a cluster head, then ant colony algorithm finds a route toward base station through cluster heads.Energy consumption is used as routing metric.Simulation is carried out in MATLAB.The proposed method is compared with LEACH algorithm.Simulation demonstrates an increase in lifetime, low energy consumption, high throughput, low delay, and high packet delivery ratio.
The work proposed by Lianyu et al. [13] presented a routing technique depending on artificial ant colony system.The suggested routing technique is collaborated with the direct diffusion routing.The proposed method consider the network as two categories, main nodes and other nodes.Main nodes are nodes that are located nearest to base station, which exhausts their energy faster.The proposed method try to maintain energy consumption of master nodes.Simulation results demonstrate that the presented method has average energy consumption of master nodes and maximize network lifetime.
Wenjing et al. [14] presented a comprehensive routing method by using ant colony algorithm.The proposed routing method uses four routing metric, remaining energy, square distance, path pheromone strength with nodes reputation.Simulation is carried out in NS2.The proposed method is compared with energy and activity aware (EAR) routing protocol.Simulation results show an increase in lifetime and decrease in packet loss rate.
Wang et al. [15] presented LEACH clustering routing algorithm by using ant colony algorithm for WSNs.The proposed algorithm seeks for finding optimum path between cluster heads and the sink.Remaining energy and cluster head distance to sink are used as routing metrics.The proposed method is compared with LEACH routing protocol.Simulations demonstrate that suggested method has decreased energy exhaustion along with increasing network lifetime for about 30%.
The work proposed by Zhen et al. [16] presented ant colony system routing algorithm by using energy prediction.In the proposed routing protocol, remaining energy is used as the routing metric.When a node wants send data to base station, ant colony systems determine the route with optimum energy consumption, and learning mechanism involve predicting power exhaustion for neighboring nodes after node selects optimum one for route.Comparison with minimum spanning tree algorithm, least energy tree algorithm, and Dijkstra algorithm is presented.Numerical experiments show that the proposed routing algorithm gained lifetime best than the other three routing algorithms along with keeping power consumption in low level.
The work proposed by Yaofeng et al. [17] presented an energy and delay model algorithm depending on ACO algorithm (E&D Ants).The proposed technique try to minimize the delay for transferring a fixed number of data using an energy-constrained manner.Node energy and delay are used as routing metrics for the proposed algorithm.Simulation is carried out in OPNET.The proposed method is compared with AntNET algorithm.Simulation results show increase in lifetime, decrease in energy consumption, high throughput, and low packet loss.
Selcuk et al. [18] proposed an adaptive ACO routing algorithm.They have used the ant colony optimization to get a dynamic and reliable routing protocol.Node energy and number of neighbors nodes are the two metrics that is used in this routing protocol.The proposed routing protocol is implemented on a small sized router chip.The implementation is examined and efficiency demonstrated by simulation results, which are obtained by Proteus program.Results show an increase in network lifetime.

III. THE PROPOSED ROUTING METHOD
The proposed routing technique involve ant colony algorithm and artificial immune system.The objective due to proposed routing protocol is balancing energy exhaustion so as for maximizing network lifetime.Ant colony algorithm is used for finding the optimum path from sensor nodes to sink.Artificial immune system is used to solve packet LOOP problem and to control route direction.
Sensor nodes are responsible for collecting data from its neighbors nodes.In this paper, time driven routing schedule is supposed.So that each node find the optimal rout for sending data packets to the sink in every time cycle.Using this scheduling for routing, the procedure of determining optimum route while sending data packets to the sink for all nodes will www.ijacsa.thesai.orgrepeated 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 give a meaning for time from net turning on till first node exhausts its energy.The lifetime is the most challenging problem in WSN.Several techniques might be used to maximize network lifetime in which one of them is improving the routing protocols.
This paper suggests an improved routing technique for maximizing overall network lifetime.The suggested routing technique is achieved by combining ant colony algorithm and artificial immune system.Two metrics have been used, which are the remaining energy and shortest hop, for selecting optimum next hop node.The proposed routing protocol is responsible for selecting next hop of highest remaining energy and shortest hop to sink.Hence, energy exhaustion can balanced along with maximized network lifetime.
The general structure for suggested routing technique is illustrated in figure 1. Suggested algorithm is working according to the following detail.When any sensor node like to send packet to the sink, the algorithm, firstly, find all its neighbors, and then by applying artificial immune negative selection algorithm, the algorithm classify good neighbor nodes (GNBR) and bad neighbor nodes.The good neighbor nodes will contribute in the final operation of finding the optimal path for sending or forwarding the packet.If there is no at least one good neighbor node, the algorithm response is failure because there is no path to send the packet.The operation of finding the optimal path involves ant colony algorithm with two metrics, which are the node remaining energy and shortest hop to the sink.The ant colony algorithm make a balance between these two metrics so as to find the optimal next node.This operation involve finding the probabilities of good neighbor nodes (GNBR) to be the next node depending on the probability function value of ACO algorithm.Probability function with regard to ACO algorithm has two parameters, which are tao (pheromone concentration) and eta (visibility function that is heuristic function).These two parameters are connected to our routing problem in which the pheromone concentration is considered as the node remaining energy (RE) and the visibility function is considered as the shortest hop (SH).The max-min ant system is considered which involves the pheromone is start with max and end with min for each city visit.The proposed algorithm calculates the probability values for all good neighbor nodes (GNBR).Then it, from the good neighbor nodes (GNBR), select the GNBR node of highest probability value to be the next optimal node and add it to OPEN list and flag it as the current node.The proposed algorithm then check this node if it is inside sink range.If so the algorithm ends and the optimal path is OPEN list.If no, the current node (the latest node added to OPEN list) is then uses the proposed algorithm to find its optimum node to send packet (classifying GNBR nodes, finding their probability values, and selecting node of highest probability value).In other words, the algorithm is repeated for the new node that like forward the packets.The OPEN list is used in the algorithm to temporality store the nodes for the operation of finding the optimal path.OPEN list is used to store the elected nodes for finding the optimal path.The OPEN list is then stores 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 [19].By using special type of defense, the immune system enforce non-self cells for some treatments that lead 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 [20].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.The algorithm artificially has been used in this thesis and the negative selection has been applied.
Forrest [21], 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 route.Artificial immune system provides the ability for detecting danger neighbor nodes.This is done by classifying as good neighbor nodes (GNBR) and bad neighbor nodes (danger nodes).Artificial immune negative selection algorithm is used in the proposed routing method.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.Implementing route direction control will improve the www.ijacsa.thesai.orgrouting 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 the ant colony algorithm, while the bad neighbor (danger neighbors) will discarded from contributing to find the optimal path.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 algorithm is as listed below.
Algorithm 1: Negative Selection Algorithm 1. 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.

Stop when all neighbor nodes for node n has been classified
B. Ant Colony Algorithm ACO algorithm is presented as swarm intelligence procedure along with involving some metaheuristic optimizations.ACO algorithm was first presented in 1992 by Dorigo in his PhD thesis [22].Ant colony algorithms studies is derived from the observation of real ants' behavior.Its first involvement was for seeking for an optimum trajectory inside a diagram depending on ants' behavior for searching paths among their colony and food sources.Naturally, ants wandering at random, when discovering eating go back to their colony along with putting down pheromone lines.Then ants follow these lines instead random wandering.Pheromone is subjected to an evaporation.Subsequently, ants go after good path found among colony and eating.
ACO algorithm conception involves representing the problem being solved with demonstrated ants travelling around graph that mimic the behavior of natural ants.Ant colony algorithms are used as an improved design for novel algorithms for solving optimization and distributed control problems.The ant colony algorithm is outlined below [22].Q is constant and L is the length of the path found by the ant.
This section investigates the application of ACO algorithm in WSNs for determining optimum route from nodes towards base station.ACO algorithm provide the ability for balancing energy exhaustion with the use of shortest distance to the sink.Balancing energy exhaustion leads for maximizing network lifetime.The suggested ACO algorithm not only balance energy exhaustion but also determines the optimal solution of node energy and node distance combination.This structure leads to the efficient optimum solution that ensure energy balance and maximum network lifetime.
For the proposed routing protocol,  is the ants pheromone concentration and is related to node energy, is the visibility function and is related to the node shortest hop to sink SH(n).The visibility function is expressed in equation (6).Each GNBR node is considered as a city for the simulated ants.Ant visit all cities (GNBR nodes) at least one time.A Max-Min ACO arrangement has used for updating pheromone.Maximum and minimum ant system pheromone amounts suppose that all edges are initialized to  max and reinitialized to  max when nearing stagnation.For the proposed routing protocol, the nodes residual energy is considered as  max .(6) where, n is a sensor node.

IV. EXPERIMENTAL 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.www.ijacsa.thesai.org 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 [23].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.For ant colony algorithm, magnitudes of (,,∆) have chosen as (0.5,2,zero), respectively.

V. 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 2 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 energy efficient swarm routing protocol is better than the Dijkstra routing.It shows an increase in network lifetime of about 1.2567 for area A1 and 1.9717 for area A2.Without using artificial immune system route direction control, the packets sent will encounter loops and may not successfully delivered to the sink casing the PDR to decrease to 0.877 for area A1 and 0.881 for area A2.Results show the improvement of the proposed energy efficient routing protocol in comparison with the Dijkstra routing.The proposed method shows the improvements in terms of balancing energy consumption, route direction control, solving packet LOOP, and maximizing overall network lifetime.Depending on the trace of experiments for searching optimal path, the proposed routing protocol changes the optimal path every round depending on the metrics used, remaining energy and shortest hop towards base station.This change in the path used to send data packets from any node to sink proves the balance in energy consumption and as a result maximizes network lifetime.A network partition feature has been activated for the simulation.Network partition is works out when any of the 100 deployed sensor nodes has not find a neighbor nodes to send data packet.This is due to the dyed sensor nodes.Hence, simulation is stopped when network partition is occurred.Table 1 details the overall network lifetime, partition time, and PDR for the two methods and for the two topological areas A1 and A2. Figure 3 illustrates the network average remaining energy in each round for the two topological areas A1 and A2 as a comparison between the proposed energy efficient routing protocol and Dijkstra routing.It is obvious from this figure, that the average remaining energy of the suggested energy efficient routing technique is less than Dijkstra routing, which gives the fact that Dijkstra routing has more nodes subjected to inefficient use by unbalanced energy exhaustion.Less remaining energy due proposed routing reflects the efficient use of nodes that provide energy consumption balance.This figure shows that Dijkstra routing method has some nodes exhaust its energy quickly due to the continuous usage of these nodes.This reflects 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.According to the experiments trace for optimal path finding process, the proposed routing method changes the optimal path for each round depending on the remaining energy (RE) and shortest hop (SH) to sink metrics.So that the route used to send data packets from a sensor node to the sink, take different path in each round to deliver the data packets.In addition, tracing results show that without using the artificial immune route direction control, the packets sent will encounter loops and may not delivered to the sink.The proposed energy efficient routing technique results in energy exhaustion balance, unity PDR along with maximized overall lifetime network.
Figure 4 illustrates the average consumed energy in each round for the two topological areas A1 and A2.From this figure, consumed energy for proposed SI routing is higher than the Dijkstra routing.The key feature of the proposed SI routing protocol is investigating energy consumption balance and avoiding the continuous using of same nodes by using more hop nodes.This reflect the effectiveness of proposed swarm routing protocol for balancing energy exhaustion along with prolonging network lifetime and guarantying unity PDR.
Figure 5 depicts the Packet delivery ratio in each round for the two topological areas A1 and A2.From this figure the proposed SI routing shows unity PDR method along with higher network lifetime in comparison with Dijkstra routing which shows less network lifetime.This result give the power point for the proposed SI routing method which guarantying unity PDR along with higher network lifetime.Also this figure shows the importance of introducing the artificial immune system, in which without using artificial immune system for route direction control and solving packet LOOP problem, the PDR will decrease to 0.877 for area A1 and 0.881 for area A2.
Figure 6 depicts the maximum number of hops in each round for the two topological areas A1 and A2.This figure shows that proposed SI routing is better than Dijkstra routing, which change the path for sending packets continuously depending on the remaining energy and shortest hop metrics instead of using the same path as Dijkstra routing.Changing www.ijacsa.thesai.orgtransmission 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 leads to increase the PDR of the network.This adaptive operation of the proposed SI routing protocol increased network lifetime significantly.
Figure 7 depicts the average simulation time "end-to-end delay" in each round for the two topological areas A1 and A2.From these figure, simulation time for proposed swarm routing is approximately equal or little less than of Dijkstra routing.So that applying the proposed swarm routing will not affect on computation time for finding the optimal path for sending packets from source to destination.

VI. 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 ACO algorithm 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 ant colony algorithm 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 energy efficient routing technique has better performance against the Dijkstra routing.Simulation results show an increase in network lifetime of about 1.2567 for area A1 and 1.9717 for area A2.Simulation results show that without using artificial immune system for route direction control, the PDR is decreased to about 0.877 for area A1 and 0.881 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.
The efficiency of suggested method depicts good contribution in field of maximizing network lifetime using adaptive routing techniques.Simulation results prove the generality of the proposed energy efficient routing technique, so that the proposed routing technique could be used for any design framework.

Algorithm 2 :( 2 ) 2 .For
Ant Colony Optimization Algorithm Procedure ACO MetaHeuristic 1.While (cover all GNBR nodes) a) GenerateSolutions(); ∑ (1) b) DaemonActions(); Select the node of highest probability value from set GNBR nodes and add it to OPEN list.c) PheromoneUpdate(); A Max-Min Ant System is used.End while End procedurewhere, Prob(k) is the probability function, (k) is the ants pheromone concentration, (k) is the visibility function (heuristic function), k is GNBR member node,  and  refer to ACO parameters that utilized for adjusting pheromone strength with heuristic magnitude for specified significance.The values of  and  are restricted, 0, and 1. is the pheromone evaporation ratio and is expressed by the following equations.

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