Instruction FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 29, N o 3, September 2016, pp. 339 - 355 DOI: 10.2298/FUEE1603339E SWARM INTELLIGENCE BASED RELIABLE AND ENERGY BALANCE ROUTING ALGORITHM FOR WIRELESS SENSOR NETWORK Fatma H. Elfouly 1 , Rabie A. Ramadan 2 , Mohamed I. Mahmoud 3 , Moawad I. Dessouky 4 1 Department of Electronics and Electrical Communications Higher Institute of Engineering, El-Shorouk Academy, El-Shorouk city, Egypt 2 Computer Engineering Department, Cairo University, Egypt 3 Department of Control Engineering and Industrial Electronics, Faculty of Electronic Engineering, Menoufia University Menouf, Egypt 4 Department of Electronics and Electrical Communications, Faculty of Electronic Engineering, Menoufia University Menouf, Egypt Abstract. Energy is an extremely crucial resource for Wireless Sensor Networks (WSNs). Many routing techniques have been proposed for finding the minimum energy routing paths with a view to extend the network lifetime. However, this might lead to unbalanced distribution of energy among sensor nodes resulting in, energy hole problem. Therefore, designing energy-balanced routing technique is a challenge area of research in WSN. Moreover, dynamic and harsh environments pose great challenges in the reliability of WSN. To achieve reliable wireless communication within WSN, it is essential to have reliable routing protocol. Furthermore, due to the limited memory resources of sensor nodes, full utilization of such resources with less buffer overflow remains as a one of main consideration when designing a routing protocol for WSN. Consequently, this paper proposes a routing scheme that uses SWARM intelligence to achieve both minimum energy consumption and balanced energy consumption among sensor nodes for WSN lifetime extension. In addition, data reliability is considered in our model where, the sensed data can reach the sink node in a more reliable way. Finally, buffer space is considered to reduce the packet loss and energy consumption due to the retransmission of the same packets. Through simulation, the performance of proposed algorithm is compared with the previous work such as EBRP, ACO, TADR, SEB, and CLR-Routing. Key words: WSNs; Swarm intelligence; Ant Colony System (ACS); energy balancing; reliability Received November 12, 2015 Corresponding author: Rabie A. Ramadan Computer Engineering Department, Cairo University, Egypt (e-mail: rabie@rabieramadan.org) *An earlier version of this paper was presented at the International Conference on Recent Advances in Computer Systems RACS-2015, Hail University, Saudi Arabia, 2015 [1]. 340 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY 1. INTRODUCTION A Wireless sensor network (WSN) is a wireless network consisting of large number of small size, inexpensive, and battery operated sensor nodes. Such nodes are essential for monitoring physical or environmental conditions such as temperature and humidity, perform simple computation, and communicate via wireless multi-hop transmission technique to report the collected data to sink node [2]. However, the nodes in WSN have severe resource limitations such as energy, bandwidth, and storage resources. Energy is an extremely crucial resource because it not only determines the sensor nodes lifetime, but the network lifetime as well [3]. In WSNs, communication has been recognized as the ajor source of energy consumption and costs significantly more than computation [3][4]. Consequently, most of the existing routing techniques in WSN attempt to find the shortest path to the sink to minimize energy consumption. As a result, highly unbalanced energy consumption which causes energy holes around the sink and significant network lifetime reduction. Therefore, designing energy-balanced routing technique plays a crucial role in WSNs [5][6]. The reliable data transmission is one of the most essential issues in WSNs [7][8][9]. The loss of important information due to unexpected node failure or dynamic nature of wireless communication link [10] prevents the sensor network from achieving its primary purpose which is data transfer. Hence, routing techniques should give priority to reliable transmission. At the same time, it is critical to reduce packet loss in WSNs which will improve the network throughput and energy-efficiency. Due to memory constraints on sensor nodes, buffering a large number of packets is impossible. Thus, such a buffer overflow problem may result in information loss and more energy consumption due to the retransmission of the same packets. Thus, such retransmission limits the network's lifetime and efficiency. Consequently, it is a highly needed to consider buffer space when designing routing protocols in WSNs [11]. In the last two decades, optimization techniques inspired by swarm intelligence have gained much popularity [12]. They mimic the swarms' behaviour of social insects like ants and bees, the behaviour of other animal societies such as birds flocks, or fish schools as well [12]. Swarm intelligent systems are robust, scalable, adaptable, and can efficiently solve complex problems through simple behaviour [13] such as the shortest path finding. Ant Colony System (ACS) is considered one of the most important swarm intelligence techniques that can provide approximate solutions to optimization problems in a reasonable amount of computation time [12]. ACS [14] has been inspired from the food searching behaviour of real ants which can be utilized to find the shortest path in WSNs. Unlike other routing approaches [15], the ant colony optimization meta-heuristic proposed in the literature for WSNs is based only on local information of sensor nodes [16]. The problems of balancing energy consumption among sensor nodes and reliable communication have received significant attention in recent years [17][18][19][20][21][22]. However, our contributions in this paper focus on: 1) reducing energy consumption for WSN lifetime extension, 2) balancing of energy consumption among sensor nodes to maintain and balance of residual energy on sensor nodes as well, 3) enhancing data reliability where the sensed data can reach the sink node in a more reliable way, 4) Taking into consideration buffer space on sensor nodes to reduce dropped packets, which in turn conserves energy, and 5) introducing a Swarm Intelligence as a heuristic algorithm based energy reduction and reliability as well as load balancing and minimizing the probability of buffer overflow. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 341 The rest of this paper is organized as follows: section 2 introduces a brief summary of the related work. Section 3 introduces the problem description. Then, section 4 describes the SWARM based approach. Section 5 provides the simulation results. Finally, Section 6 concludes the paper. 2. RELATED WORK This section focuses only on the most related work to the proposal of this paper. It starts by explaining the work presented in [5][23][24][25][26] which are the more related work to our proposed approach followed by the differences from our proposal. [5] proposed an Energy-Balanced Routing Protocol (EBRP). EBRP algorithm borrows the concept of potential in physics to construct a mixed virtual potential field in terms of depth, energy density, and residual energy. The depth field is used to route packets toward the sink node. The energy density field is essential to balance energy consumption where, the packets are driven through the dense energy area. Finally, the residual energy field protects nodes with relatively low residual energy from dying. [23] Proposed an improved ant colony optimization routing (ACO) for WSN. In this algorithm, an enhanced ant colony is used to optimize the node power consumption and prolongs network lifetime. The ACO improved approach in enhanced an approach based on ACO in which the probability of selecting next hop neighbour has been determined by using two heuristic functions. The first one is related to the quantity of the pheromone which inversely proportional to hop count, and the second depends on residual energy of neighbour nodes. However, the improvement in [23] is done by adding more accuracy to make a choice especially when probabilities are equal where, in such case the node chooses randomly the next hop. As a result, this might make wrong choice and data loss in uncovered area, or packets travel a long path to the sink. Therefore, many nodes lose power due to bad choice, delivery delay, and may leads to network lifetime reduction. The ACO improved approach adding new heuristic information to distinguish the best neighbour and avoiding the use of wrong nodes. The new heuristic information is related to the energy of the neighbour node which having sink in its collection field. Such neighbour node will have more chance to be chosen, because the packets will attain the sink node definitely. However, only energy and pheromone are considered in the probabilistic rule when the sink is not in the neighbour node field. Meanwhile, the analysis of ACO improved algorithm [23], and EBRP [5] show that some issues are not considered which are reflected as drawbacks. Firstly, the network reliability, as discussed above, this might increase the packet loss and packet retransmissions which affects the network efficiency. The second is the queue buffer size in which it has directly impact on network throughput and lifetime. Finally, node load where, the nodes with heavy load and low residual energy should be prevented from being selected as a next hop to achieve energy balance of the whole network and relieve the energy hole problem. Consequently, taking residual energy only into consideration as in [5][23] is not sufficient to achieve balanced energy usage in the network. 342 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY [24] proposed a traffic aware dynamic routing (TADR) algorithm to route the packets around the congestion areas and scatter excessive packets along multiple paths consisting of idle or unloaded nodes. In this algorithm, a hybrid potential field is constructed in terms of depth and the normalized queue length. The depth field creates a backbone to forward packets toward the sink. The queue length field is used to prevent the packet from going to the possible congestion area. However, TADR algorithm doesn't consider two critical issues which considered as a drawback. The first is energy balancing, as described above; this might lead to unbalanced energy consumption in the network which causes energy holes around the sink and significant network lifetime reduction. The second issue is the network reliability which is one of the key issues in WSNs due to the high dynamics, limited resources, and unstable channel conditions. Thus, this might deteriorate the network performance as mentioned above. [25] proposed a simple Cross-Layer Balancing Routing (CLB-Routing) that enhances the WSNs lifetime by balancing the energy consumption in the forwarding task. CLB- Routing protocol is a bottom up approach, where the network layer uses information given by the MAC layer in the choice of the next hop. The proposed algorithm in [25] operates in two phases. The first is initialization, where the sink node broadcasts a route request message containing a cost variable initialized to zero. Each node receiving this message, updates the cost field according to its residual energy and the energy required for communication between that node and the sender of the route request and, then broadcasts it. The second phase is data transmission, where the MAC layer informs the network layer about all the overheard communications of the neighbouring nodes. With this information, a node can know how many times each forwarding node has routed data. According to this information, and to effectively balance sensor nodes energy consumption, a node chooses its next hop among the less-used ones. This choice is not random; it is according to a probability, which counts residual energy, energy of communication, and the number of times that each forwarding node has routed data. However, CLB-Routing had important issues to take into account, but it lacked some others like network reliability and buffer size. This eventually affect the network throughput and lifetime as described above. [26] proposed a Swarm intelligence based energy balance routing scheme (SEB). It utilizes swarm intelligence to maintain and balance residual energy on sensor nodes for WSN lifetime extension. SEB algorithm balances residual energy on sensor nodes evenly according to their weights as much as possible. The node weight is related to the number of its neighbour nodes that may select it to relay their messages. The probability of selecting the next hop neighbour node is calculated according to residual energy, distance to the sink, weight of nodes, and the environment pheromone which is related to path quality. Nevertheless, the previous study of SEB shows that it has some drawbacks since some issues are not considered. The first is the packet buffer capacity of sensor nodes. As described above, this might increase the packet loss and packet retransmission which inevitably affects the network efficiency. Secondly, the dynamic behaviour of the wireless link quality over time and space where, the path quality is determined as a function of hop count. This can easily lead to the use of low-quality links, and result in unreliable routs [27]. Finally, calculating the weight of nodes in such algorithm was based on the assumption that the environment events distributed uniformly. This might be inefficient when the environment events distributed non-uniformly. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 343 The proposed SWARM algorithm in this paper considers the end-to-end reliability of a multi-hop route based on the Packet Reception Rate (PRR) which is one of the most commonly used reliability metrics [28]. In this model, the work analyzes the reliability of the whole path from the next hop node to the sink, and then chooses the relay node with the best PRR which improve the end-to-end reliability of a multi-hop route. Moreover, the proposed algorithm can balance energy consumption among sensor nodes evenly as much as possible through new effective function between nodes' residual energy and weight. As well as, a new weight definition is proposed in this algorithm to achieve balanced energy consumption for both uniform and non-uniform event distribution in the environment. In addition, it can effectively alleviate buffer overflow by integrating the normalized buffer space into routing choice. Consequently, the local information in the proposed SWARM solution refers to each neighbour's residual energy, weight, normalized buffer space, transmission distance, and pheromone. As well as, a new pheromone update operator is designed to integrate energy, path length, and path quality into routing choice. 3. PROBLEM DESCRIPTION Consider a static multi-hop WSN deployed in the sensing field. In this model, we aim to achieve reliable routing algorithm taking into consideration nodes' energy consumption, energy balancing among sensor nodes, and nodes' buffer space. The wireless sensor network can be modelled as a random geometric graph, G(V,L), where V denotes the set of sensor nodes which distributed randomly in the square monitoring field and L represents a set of all communication links (i, j) where, i, j  V. Link (i, j) exists if and only if nodes i,j are within radio range of each other. The events in the environment will be detected by some sensor nodes which are called source nodes. Assuming that the MAC layer provides the link quality estimation service, e.g., the PRR information on each link [29], where each node is aware of the PRR values to its one-hop neighbours. The information regarding the presence of the detected events at each source node should be reported to the sink node. Since WSNs are usually based on a multi-hop transmission, the source nodes send their data to the sink through intermediate sensor nodes which acts as a relay nodes. The chosen path from each source node to the sink should be the best path which satisfies some constraints including 1) low communication cost, 2) its reliability greater than or equal target value, 3) at the same time, sensor nodes on that path should have the maximum value resulting from a new proposed equation between the residual energy and weight compared with their neighbours to balance energy consumption among sensor nodes, and 4) as well, sensor nodes should have a buffer space greater than or equal message size to reduce packet loss and energy consumption due to retransmission of the same packets as a result of buffer overflow. To simplify the description of the problem and its formulation, the notations used to model the problem are given in Table 1. 344 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY Table 1 Our model notations Given parameters Notation Description S The set of all sensor nodes that in sensing or sensing-relaying state. R The set of all sensor nodes that in relaying state accept sink node. PRR The set of packet reception ratio PRR(i,j) associated with link (i, j). wq Constant value less than or equal 1. REj The residual energy of each sensor node j, RSNEBNEBj ii  , se(i,j) The energy required to do single hop transmission from i to j, .),( Lji  Mesi The number of messages at node i, RSi  wj The weight of a neighbor j, RSNEBNEBj ii  , Ewrj The residual energy to weight ratio for each neighbor node j, RSNEBNEBj ii  , ENCj(t) The ratio between residual energy to initial energy for each neighbor node j at time t, }{sin, kRSNEBNEBj ii   }{sin, kRSNEBNEBj ii   pz The packet size. bsj(t) Buffer space in node j at time t, }{sin, kRSNEBNEBj ii   bmj(t) The normalized buffer space of node j at time t, }{sin, kRSNEBNEBj ii   NREj The ratio between REj and se(i,j) for each neighbor node j, RSNEBNEBj ii  , NEBi The set of neighbors of node i, }{sin, kRSNEBi i   4. SWARM BASED APPROACH This section describes the details of the proposed SWARM technique for energy balance and reliable routing in WSNs. The section states the different parts of the proposed scheme including the routing scheme, local heuristic information computation, pheromone computation, and neighbour node selection. The proposed SWARM solution is composed of two phases. In the first phase, it starts with a set of forward ants placed in the source nodes and move through neighbour relay nodes until reach sink node. In this algorithm, for calculating the packet transfer probability to the next hop neighbour, residual energy, weight, normalized buffer space, transmission distance, and pheromone are considered. At each node i, a forward ant k selects the next hop node j, iNEBj  randomly with a probability ( , ) k r p i j which determined as follows:    iNEBl ililililil ijijijijijk r ttttt ttttt jip     )]([)]([)]([)]([)]([ )]([)]([)]([)]([)]([ ),( (1) Where ηij(t) is the pheromone value on the link (i,j) at the time t, ηij(t), ψij(t), εij(t), and δij(t) are the heuristic information of link (i,j) for node j; α, β, γ, λ, and ϕ are the weight factors that control the pheromone value and the heuristic information parameters respectively. When forward ant k reaches sink node, it is transformed into a backward ant and the second phase starts. The backward ant starts from the sink node and moves towards its source node along the same path in opposite direction, depositing an increment of pheromone on that. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 345 4.1. Problem formulation Due to the use of multi-hop routing technique, the information about the detected events at each source node should be transmitted as messages to the sink node through intermediate nodes or relay nodes. In order to achieve energy balanced routing, the node with heavy weight and low residual energy should be prevented from being selected as a next hop. So, the proposed algorithm considers a model in which the sensor node residual energy and weight are used when choosing the relay node through a new proposed function. Now, let’s start with the computation of the weight of a neighbour j at time t by equation (2).          otherwise hchifMes twe jNEBi iji j 0 c (t) )( (2) Because the events detected in the monitored environment distribute non-uniformly, node weight can be defined as the total number of messages at its neighbour nodes which may choose it to relay their messages. Equation (2) means that packets are not allowed to be transmitted backward to the neighbours with higher hop count. This strategy ensures that the packets are forwarded closer toward the sink and prevents forming a loop. In addition, the new function that combines residual energy and weight for each node j at time t is defined by equation (3) as follows: (( ( ) ( )) 1) (exp( ( ))) ( ) ( ) 1 ( ) (exp( ( ))) ( ) ( ) ( ) ( ) 0 ( ) 0 j j j j j j j j j j j j NRE t we t ENC t if NRE t we t Ewr t ENC t if NRE t we t we t NRE t if we t                 (3) Due to the use of multi-hop routing technique, the information about the sensed events at each source node should be transmitted as messages to the sink node through intermediate nodes or relay nodes. Therefore, the relay node needs to hold in a buffer the incoming data packets during the processing time required for the previous ones. The sensor nodes have limited memory, it is impossible to buffer a large number of packets. Consequently, the buffer of the relay node may start overflowing, resulting in loss of important packets and more energy consumption due to the retransmission of the same packets [30]. For efficient use of available buffer, we consider a model in which the probability of buffer overflow is minimized as much as possible by integrating the normalized buffer space into routing choice. The normalized buffer space is defined as the ratio between the buffer space and packet size. It is used to express the number of packets that can be received by every sensor node without it starting buffer overflowing at a certain time. The normalized buffer space of node j at time t can be defined as follows: ( ) ( ) ( ) 0 j j j bs t if bs t pz bm t pz otherwise       (4) 346 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY 4.2. Calculation of local heuristic information In order to maintain higher and balance residual energy on sensor nodes, the proposed relation between residual energy and weight is used as a heuristic information when selecting the next hop neighbour node which denoted by ij(t). ( ) ( ) ( ) i j ij l l NEB Ewr t t Ewr t     (5) According to this rule, the node with the greater value of ij will have a higher residual energy compared to its weight and a much better opportunity to be chosen as a next hop. Since energy conservation is an essential issue in WSN, selecting the nodes with minimum hop count is required to minimize energy consumption and conserve much more energy as possible. Therefore, the hop count from neighbour node j to the sink node is used as heuristic information which is denoted by ij(t). ( ) 1 ( ) ( ) 1 i i j ij i j l NEB hc hc t hc hc        (6) A neighbour node that has a greater value of ij(t) is closer to the sink than the others and will be more likely to be chosen as next hop. In order to avoid or reduce packet loss due to buffer overflow which in turn improve the overall network performance, it is critical to send packets to the sensor node with more buffer space or less traffic load. Therefore, bmj(t) can be used as heuristic information which denoted by ij(t) ( ) ( ) 1 ( ) i j ij l l NEB bm t t bm t      (7) This rule enables decision making according to the buffer apace on the neighbour nodes, meaning that if a node has a greater value of ij(t) then it has a much better opportunity to be chosen as next hop. Due to the dynamic behaviour of the wireless link quality over time and space, it is essential to use the current packet reception ratio of link (i,j), PRRij as heuristic information to improve the network throughput. It is denoted by ij(t) ( ) i ij ij lj l NEB PRR t PRR     (8) Where, the greater value of ij(t) indicates that the link (i,j) more reliable than others. Thus the neighbour node j will have more chance to be chosen as next hop. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 347 4.3. Pheromone calculation In this algorithm, pheromone concentration is affected by the combination between energy, path length, and path quality in a new effective form. This may improve network reliability, reduce energy consumption, and achieve more balanced transmission among the nodes. Let’s begin with the calculation of the path quality, qp, which related to the PRR by equation (9). p p q PRR (9) Where, PRRp, represents the packet reception ratio of the path p. Due to the use of multi-hop routing, the PRRp can be computed by the PRR of each hop on the path p as follow: ( , ) p p ij i j n PRR PRR    (10) Where, np is the set of edges on the path p (hop count). In this model, all nodes have the same fixed transmission range. So, the number of hops in the path p is considered as the path length, Lp as follow: p p L n (11) By estimating the length of each possible path for the same source node, the best path length Lpbest is recorded at the sink. Then, the relative length of path p can be determined as follows: Rlp = Lpbest / Lp = npbest / np (12) The increasing density of pheromone on the path p is defined as follows: ij = (Rlp  PRR w1) w2  (E p min) w3 / n 2 p (13) Where E p min is the minimum residual energy of nodes visited by ant k and the parameters w1, w2, and w3 determine the relative influence of the energy, path length, and path quality. The sink node constructs the value of pheromone update operator, ij and sent it back as a backward ant to its source node along the reverse path. Whenever a node i receives a backward ant k coming from neighbouring node j, it updates its pheromone concentration according to the following rule: ijijij tt   )1()1()( (14) Where,   (0,1) is the evaporation constant that determines the evaporation rate of the pheromone [26]. 348 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY 5. PERFORMANCE EVALUATION In this section, different experiments are conducted to evaluate the performance and validate the effectiveness of our proposal. The section starts by describing the performance metrics followed by simulation environment and finally simulation results. 5.1. Performance metric For a comprehensive performance evaluation, several quantitative metrics considered are defined below. 1. Network Lifetime [5]. It is defined as the time duration from the begging of the network operation until the first node exhausts its battery. 2. Energy Imbalance Factor (EIF) [5]. It is defined to quantify the routing protocol energy balance characteristic which defined formally as the standard variance of the residual energy of all nodes.    n i avgi RERE n EIF 1 2 )( 1 Where n is the total number of sensor nodes, REi is the residual energy on node i, and REavg is the average residual energy of all nodes. 3. Throughput Ratio (TR) [25]. This metric is defined as: nodessourcebysentpacketsofNumber kthebyreceivedpacketsofNumber TR sin  4. Average End-to-End Delay (Seconds) [30]: It is defined as the average time a packet takes to travel from source node to the sink node. This includes propagation, transmission, queuing, and processing delay. The processing delay can be ignored as a result of fast processing speed [31]. 5.2. Simulation environment In this paper, the simulation environment consists of 80 sensor nodes deployed randomly in a field of 1000 m x 1000 m. The sink node, and sensor nodes are stationary after being deployed in the field. Furthermore, the sink node is located at (1000, 500) m. All the later experiments are done for both homogeneous and heterogeneous node energy distributions on a custom Matlab simulator. Data traffic is generated according to a passion process with mean parameter ζ. In addition, we choose a harsh wireless channel model, which includes shadowing and deep fading effects, as well as the noise [32]. In this simulation, the case of Chipcon CC2420 radio transceiver is taken into consideration [1]. The simulation parameters are listed in Table 2. In the later experiments, we use the combination (α = 2, β = 2, γ = 1, λ=1, and ϕ=12), the evaluation result shows this combination is the best for all experiments. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 349 Table 2 Simulation environment parameters Parameters Values Network size 1000×1000 Number of nodes 80 Number of sink nodes 1 Node placement Random uniform Packet size 64 byte Frequency 2400 MHz Transmission power -5dBm Maximum transmission range 223 m Channel model Log-normal shadow Path loss exponent 6 Shadow fading variance 6 Noise power -145dBm Reference distance 3 m 5.3. Simulation results To verify the feasibility and effectiveness of our proposal, its performance is compared in terms of Network Lifetime, Energy Imbalance Factor, and Throughput Ratio, with the proposed protocols in [5][23][24][25][26] for homogenous and heterogeneous networks. We implemented all of the algorithms in [5][23][24][25][26]. 5.3.1. Network lifetime evaluation for homogenous and heterogeneous networks In this experiment, the performance of the proposed SWARM approach is evaluated in terms of network lifetime for both homogenous and heterogeneous networks compared to EBRP [5], ACO proposed in [23], TADR [24], CLR-Routing [25], and SEB [26] under different traffic rate σ. The initial energy on each sensor node is 125mJ for homogenous network while it is between 100 and 125mJ randomly for heterogeneous network. Fig. 1 and Fig. 2 show the variation of network lifetime with respect to different traffic rate σ for homogeneous and heterogeneous networks respectively. From the figures it can be found that as the value of σ increases, the network lifetime decreases. Since the network traffic increases with the increment of σ, the relay load of nodes increases linearly which is the main reason behind decrease of lifetime. However, the figures show clearly that our SWARM algorithm enhances significantly the network lifetime comparing with the others for both homogeneous and heterogeneous network. This means that our SWARM algorithm balances the network energy consumption more effectively than the others. 350 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY Fig. 1 Network lifetime vs. traffic rate σ for homogeneous network Fig. 2 Network lifetime vs. traffic rate σ for heterogeneous network 5.3.2. Network reliability evaluation for homogenous and heterogeneous network In this experiment, the performance of the proposed SWARM approach is evaluated in terms of TR for both homogenous and heterogeneous networks compared to EBRP [5], ACO proposed in [23], TADR [24], CLR-Routing [25], and SEB [26] for homogeneous and heterogeneous network under different traffic rate σ. The initial energy on each sensor node is 125mJ for homogenous network while it is between 100 and 125mJ randomly for heterogeneous network. The TR against different traffic rate σ for both homogeneous and heterogeneous networks is depicted in Fig. 3 and Fig. 4 respectively. Clearly, our SWARM algorithm achieves the highest TR compared to the others. This is because it forwards the data packets toward the sink in a more reliable way and alleviates the possible buffer overflow. Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 351 Fig. 3 Network throughput vs. traffic rate σ for homogeneous network Fig. 4 Network throughput vs. traffic rate σ for heterogeneous network 5.3.3. Energy balancing evaluation for homogenous and heterogeneous networks In this experiment, the performance of the proposed SWARM approach is evaluated in terms of energy balance for both homogenous and heterogeneous networks compared to EBRP [5], ACO proposed in [23], TADR [24], CLR-Routing [25], and SEB [26]. The initial energy on each sensor node is 125mJ for homogenous network while it is between 100 and 125mJ randomly for heterogeneous network. In this set of experiments, it is assumed that the traffic rate σ equal 5. The EIF was calculated during running time to find the network's balance efficiency. Fig. 5 and Fig. 6 present the variation of EIF over simulation time for homogeneous and heterogeneous networks respectively. As shown in the figures, EIF increases with more running time. The augmentation of the EIF is due to the high use of the sink node neighbours comparing to the others, which reduce the average residual energy. However, according to the results in Fig. 5 and Fig. 6, it is obvious that the EIF of our SWARM algorithm is the minimum among those of all the 352 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY others. It means that in our SWARM algorithm, the energy of the entire nodes in the network is close to the average energy in contrast to the others. That's to say, our SWARM algorithm can balance residual energy among sensor nodes efficiently. Fig. 5 The EIF vs. simulation time for homogeneous network Fig. 6 The EIF vs. simulation time for heterogeneous network 5.3.4. Average end-to-end delay evaluation for homogenous and heterogeneous networks In this experiment, the performance of the proposed SWARM approach is evaluated in terms of end-to-end delay for both homogenous and heterogeneous networks compared to EBRP [5], ACO proposed in [23], TADR [24], CLR-Routing [25], and SEB [26] under different traffic rate σ. The initial energy on each sensor node is 125mJ for homogenous network while it is between 100 and 125mJ randomly for heterogeneous network. Fig. 7 and Fig. 8 show the average end-to-end delay under different traffic rate σ for homogeneous and heterogeneous networks respectively. From the results, it is observed that the end-end- Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 353 delay increases, as the traffic rate increases. A higher traffic rate causes more queuing delay, which raises the end-to-end delay. However, it is clear that our SWARM approach giving the lowest end-to-end delay compared with the others. This is because, our SWARM approach forwards the data packets toward the sink in a more reliable way and alleviates the possible buffer overflow, which decreases the packet loss and retransmissions and hence the end-to-end delay. Fig. 7 Average end-to-end delay vs. traffic rate σ for homogeneous network Fig. 8 Average end-to-end delay vs. traffic rate σ for heterogeneous network 6. CONCLUSIONS In this work we presented an efficient routing algorithm that uses SWARM intelligence for WSNs. The proposed approach not only reduces the energy consumption but also balanced it among sensor nodes to extend WSN lifetime. At the same time, the sensed data delivered to the sink with the highest possible reliability and minimum buffer overflow. The performance of proposed method compared with the previous works which are related to 354 F. ELFOULY, R. RAMADAN, M. MAHMOUD, M. DESSOUKY our topic such as EBRP, ACO, TADR, SEB, and CLR-Routing are evaluated and analyzed through simulation. Simulation results showed that our approach is robust; achieve longer lifetime, and giving lower end-to-end delay compared to the previous works for both homogenous and heterogeneous networks. REFERENCES [1] F. Elfouly, R. Ramadan, M. Mahmoud, M. Dessouky, “Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network”, In Proceedings of the International Conference on Recent Advances in Computer Systems RACS-2015, Hail University, Saudi Arabia, November 2015 [2] “MicaZ wireless module.” [Online]. Available http://www.cmt-gmbh.de/MICAz.pdf. [3] H. M. Ammari, “Challenges and Opportunities of Connected k Covered Wireless Sensor Networks-From Sensor Deployment to Data Gathering s,” Springer, 2009 [4] G.J. Pottie and W.J. Kaiser, “ Wireless Integrated Network Sensors,” Communications of ACM, Vol. 43, No. 5, pp. 51-58, 2000. [5] F. Ren, J. Zhang, T. He, C. Lin, and S. K. Das, “EBRP: Energy-Balanced Routing Protocol for Data Gathering in Wireless Sensor Networks,” IEEE Trans. on Parallel and Distributed Systems, Vol. 22, No. 12, December 2011. [6] X. Liu, “A transmission scheme for wireless sensor networks using ant colony optimization with unconventional characteristics,” IEEE Communications Letters, Vol. 18, No. 7, pp. 1214-1217, 2014. [7] G. Campobello, A. Leonardi, and S. Palazzo, “Improving energy saving and reliability in wireless sensor networks using a simple CRT-based packet-forwarding solution,” IEEE/ACM Transactions on Networking, Vol. 20, No. 1, pp. 191–205, 2012. [8] A. Zonouz, L. Xing, V. Vokkarane, and Y. Sun, “Reliability-Oriented Single-Path Routing Protocols in Wireless Sensor Networks,” IEEE Sensors Journal, Vol 14, No. 11, pp 4059-4068, June 2014. [9] J. Niu, L. Cheng, Y. Gu, L. Shu, and S. Das, “R3E: reliable reactive routing enhancement for wireless sensor networks,” IEEE Transactions on Industrial Informatics, Vol. 10, No. 1, pp. 784–794, 2014. [10] A. M. Kamal, C. J. Bleakley, and S. Dobson, “Failure Detection in Wireless Sensor Networks: A Sequence-based Dynamic Approach,” ACM Transaction on Sensor Networks (TOSN), Vol. 10, 2014. [11] F. Viani, P. Rocca, M. Benedetti, G. Oliveri, and A. Massa, “Electromagnetic passive localization and tracking of moving targets in a WSN-infrastructured environment,” Inverse Problems, Vol. 26, No. 074003, pp. 1-15, 2010. [12] Ch. Blum, D. Merkle, “Swarm Intelligence Introduction and Applications,” Natural Computing Series, Springer, Berline, 2008. [13] R. R. McCune and G. R. Madey, “Control of Artifial Swarms with DDDAS,” In Proceedings of the 14th International Conference on Computational Science (ICCS), Elsevier, Vol. 29, pp. 1171-1181, 2014. [14] A. R. Sardar, M. Singh, R. R. Sahoo, K. Majumder, J. K. Sing, and S. K. Sarkar, “An Efficient Ant Colony Based Routing Algorithm for Better Quality of Services in MANET,” ICT and Critical Infrastructure: In Proceedings of the 48th Annual Convention of Computer Society of India-Vol I, Advances in Intelligent Systems and Computing, Springer LNCS, Vol. 248, pp. 233-240, 2014. [15] P. Rocca, M. Benedetti, M. Donelli, D. Franceschini, and A. Massa, “Evolutionary optimization as applied to inverse problems,”, Inverse Problems - 25th Year Special Issue of Inverse Problems, Invited Topical Review, Vol. 25, pp. 1-41, Dec. 2009. [16] M Gunes, U Sorges, I Bouazzi, “ARA-the ant-colony based routing algorithm for manets,” International Workshop on Ad Hoc Networking, pp. 79-85, 2002. [17] D. Zhang, G. Li, and K. Zheng, “An energy-balanced routing method based on forward-aware factor for Wireless Sensor Network”, IEEE Trans. on Industrial Informatics, Vol. PP, No. 99, 2013, pp.1. [18] W. Jianguo, W. Zhongsheng, S. Fei, and S. Guohua, “Research on Routing Algorithm for Wireless Sensor Network Based on Energy Balance”, In Proceedings of the Industrial Control and Electronics Engineering (ICICEE '12), 2012, pp. 295-298. [19] A. M. S. Almshreqi, B. F. A. Rasid, A. Ismail, and P. Varahram, “An improved routing mechanism using bio-inspired for energy balancing in wireless sensor networks”, In Proceedings of the Information Network (ICOIN '12), 2012, pp. 150-153. http://www.cs.ucf.edu/~turgut/COURSES/ClassReviewPapers/p51-pottie.pdf http://www.intechopen.com/books/references/contemporary-issues-in-wireless-communications/evolutionary-algorithms-for-wireless-communications-a-review-of-the-state-of-the-art#B48 http://www.intechopen.com/books/references/contemporary-issues-in-wireless-communications/evolutionary-algorithms-for-wireless-communications-a-review-of-the-state-of-the-art#B48 http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6322374&ranges%3D2012_2013_p_Publication_Year%26queryText%3Denergy+balance+routing+in+wireless+sensor+networks http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6322374&ranges%3D2012_2013_p_Publication_Year%26queryText%3Denergy+balance+routing+in+wireless+sensor+networks http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6164367&ranges%3D2012_2013_p_Publication_Year%26queryText%3Denergy+balance+routing+in+wireless+sensor+networks http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6164367&ranges%3D2012_2013_p_Publication_Year%26queryText%3Denergy+balance+routing+in+wireless+sensor+networks Swarm Intelligence Based Reliable and Energy Balance Routing Algorithm for Wireless Sensor Network 355 [20] K. Yu, M. Gidlund, J. Akerberg, and M. Bjorkman, “Reliable RSS-based Routing Protocol for Industrial Wireless Sensor Networks”," In Proceedings of the 38th Annual Conference of the IEEE Industrial Electronics Society (IECON), Canada, October, 2012. [21] J. Niu, L. Cheng, Y. Gu, L. Shu, S.K. Das, “R3E: Reliable Reactive Routing Enhancement for Wireless Sensor Networks”, IEEE Trans. on Industrial Informatics, Vol.PP, No.99, 2013, pp.1. [22] D. Sahin, S. Bulbul, V.C. Gungor, T. Kocak, “Reliable Routing in Wireless Sensor Networks for Smart Grid Environments”, In Proceedings of the 20th IEEE Conf. on Signal Processing and communications applications (SIU), 2012, pp. 1-4. [23] A. El Ghazi, B. Ahiod, and A. Ouaarab, “Improved Ant Colony Optimization Routing Protocol for Wireless Sensor Networks,” in P. G. Noubir and M. Raynal (Eds.): NETYS 2014, pp. 246-256, Springer, Heidelberg, 2014. [24] F. Ren, S. K. Das, and C. Lin, “Traffic-Aware Dynamic Routing to Alleviate Congestion in Wireless Sensor Networks,” IEEE Transactions on Parallel and Distributed Systems, Vol. 22, No. 9, September 2011. [25] S. Yaessad, L. Bouallouche, and D. Aissani, “A Cross-Layer Routing Protocol for Balancing Energy Consumption in Wireless Sensor Networks“ Wireless Pers. Commun., Springer, 2014. [26] D. Qian, H. Chen, W. Wu, and L. Cheng, “Swarm Intelligence Based Energy Balance Routing For Wireless Sensor Networks”, In Proceedings of the 2nd International Symposium on Intelligent Information Technology Application, vol. 2, pp.811-815, 2008. [27] X. Baoshu, and W. Hui, “A reliability transmission routing metric algorithm for wireless sensor network”, In Proceedings of the IEEE International Conference E-Health Networking, Digital Ecosystems and Technologies (EDT), Vol.1, pp.454 – 457, 2010. [28] S. B. Kootkar, “Reliable sensor networks”, M.S. thesis, Dept. Comp. Eng., TU Delft Univ., Delft, Netherlands, 2008. [29] L. Cheng, J. Nia, J. Cao, S. K. Das, and Y. Gu, “QoS Aware Geographic Opportunistic Routing in Wireless Sensor Networks”, IEEE Trans. On Parallel and Distributed Systems, 2014. [30] G. S. Sharvani, N. K. Cauvery, T. M. Rangaswamy, “Different types of Swarm Intelligence algorithm for routing,” In Proceedings of the IEEE International Conference on Recent Technologies in Communication and Computing (ARTCOM), Kottyam, Kerala, India, pp.604 – 609, 2009. [31] V. K. Verma, S. Singh, and N. P. Pathak, “Analysis of scalability for AODV routing protocol in wireless sensor networks,” Optik—International Journal for Light and Electron Optics, vol. 125, no. 2, pp. 748– 750, 2014. [32] D. Jian, “Cloud Model and Ant Colony Optimization Based QoS Routing Algorithm for Wireless Sensor Networks,” Y. Wu (Ed.): International Conference on WTCS 2009, AISC 116, pp. 179–187, Springer, Heidelberg, 2012. http://link.springer.com/chapter/10.1007/978-3-319-09581-3_17 http://link.springer.com/chapter/10.1007/978-3-319-09581-3_17 http://www.informatik.uni-trier.de/~ley/pers/hd/s/Sharvani:G=_S=.html http://www.informatik.uni-trier.de/~ley/pers/hd/c/Cauvery:N=_K=.html