Balancing Energy Consumption in Wireless Sensor Networks Using Fuzzy Artificial Bee Colony Routing Protocol

Energy is an extremely critical resource for battery-powered Wireless Sensor Networks (WSNs), thus making energy-efficient protocol design a key challenging problem. Most of the existing routing protocols always forward packets along the minimum energy paths to merely minimize energy consumption, which causes an Uneven Energy Consumption (UEC) problem and eventually results in a network partition. Due to the limited energy resources of sensor nodes, selecting an appropriate routing protocol can be significantly improve overall performance especially energy awareness in WSNs. Therefore, this paper proposes an energy-efficient routing protocol called Fuzzy Artificial Bee Colony Routing Protocol (FABCRP) which is capable of finding the optimal routing path form the source to the destination by favoring some of routing criteria and balancing among them to prolong the network lifetime. To demonstrate the effectiveness of FABCRP in terms of balancing energy consumption and maximization of network lifetime, we compare it with Fuzzy approach, ABC algorithm and Fuzzy_A-star approach using the same criteria in two different topographical areas. Simulation results show that the network lifetime achieved by FABCRP could be increased by nearly 35%, 30%, and 15% more than that obtained by Fuzzy, ABC and Fuzzy_A-star respectively


INTRODUCTION
The Internet of Things (IoT) is a novel paradigm that is rapidly gaining ground in the scenario of modern wireless telecommunications. IoT enables network connectivity between smart devices at all times, everywhere and about everything. In this context, Wireless Sensor Networks (WSNs) play an important role in increasing the ubiquity of networks with smart devices. WSNs enable a wide variety of applications, including environmental monitoring, medical treatment, emergency response, outer space exploration and so forth.
In a sensor network, a large number of sensors are deployed in a large area with each sensor capable of monitoring or collecting data from its surrounding environment and pass the information to the sink for remote user access through various communication technologies [1]. In this type of networks, sensor nodes are generally powered by small and inexpensive batteries in expectation of serving for a long period [2]. Due to limitations in the communication range, sensors communicate with each other (possibly) through multi-hop wireless communication links and forward sensed data on behalf of others so the sink can receive them on time for further processing and analysis. Since, each sensor node acts as a routing element for other nodes for transmitting data. The challenge in designing of a sensor network is that, sensors must be organized into a robust multi-hop wireless network that should be able to function properly for a long period of time. This, in general, is a difficult problem since sensors have limited computing capabilities and very limited power supply. Uneven Energy Consumption (UEC) is an inherent problem in WSNs characterized by the multi-hop routing and many-to-one traffic pattern. This UEC can significantly reduce network lifetime [3] [4].
For routing protocol design in WSNs, the energy balance and energy efficiency should be two different technical goals, since they will lead to routing algorithms with different attributes. An energy-efficient routing protocol tries to extend the network lifetime through minimizing the energy consumption; whereas an energy-balanced routing protocol intends to prolong the network lifetime through uniform energy consumption. The former readily results in the premature network partition that disables the network functioning, through there may be much residual energy left. On the other hand, the latter may not be optimal with respect to energy efficiency, as it can burn energy evenly to keep network connectivity and maintain network functioning as long as possible [2] [4] [5].
To date, much of the work on WSNs has focused on the energy minimization problem, taking into consideration the individual sensor node performance, i.e., finding methods that allow each sensor node to consume the minimum amount of energy subject to a given traffic load for handling [5]. However, there have been limited efforts focused on how traffic is balanced throughout multi-hop WSNs and how it impacts the overall network lifetime [2] [3] [4] [6].
In this paper, the use of multiple paths between each sensor node and the sink node is considered. It is shown that the network lifetime can be improved by efficiently routing (i.e., balancing) the traffic inside the WSN. Assuming the network lifetime as the time for the first node in the WSN to fail, a perfect routing protocol would slowly and uniformly drain energy among nodes, leading to the death of all nodes nearly at the same time. Typically, an ideal routing protocol would avoid the fast drain of sensor nodes with high energy consumption. To achieve this, we propose an energy-efficient routing protocol called Fuzzy Artificial Bee Colony Routing Protocol (FABCRP) to make balancing the energy consumption throughout the network by selecting the optimal routing path by considering some of routing criteria (i.e., remaining energy, minimum hop and traffic load) and balancing among them to prolong the network lifetime significantly.
The rest of this paper is organized as follows. Sec. 2 presents the related work. We outline the problem statement in Sec. 3. The paper describes a brief background of Artificial Bee Colony algorithm and Fuzzy approach in Sec. 4. The routing model for the proposed routing method is presented in Sec. 5. Performance evaluation is proposed in Sec. 6. Finally, conclusion and discussion are presented in Sec. 7.

RELATED WORKS
Energy is an extremely critical resource for battery-powered WSNs, thus making energy-efficient routing protocol designs a key challenging problem [2] [4] [7]. A good routing protocol in WSNs involves finding the optimal transmission path form the sender through relay nodes to the destination in order to prolong the network lifetime. Therefore, in traditional optimal path routing schemes over WSNs, each node selects specific nodes to relay data according to some criteria in order to maximizing network lifetime [3] [5] [6]. Due to this conception, the lifetime problem in WSNs has received significant attention, in the recent past.
The authors in [8] proposed to minimize the hop stretch of a routing path (defined as the ratio of the hop distance of a given path to that of the shortest path) in order to reduce the energy cost of end-to-end transmission. The approaches in [9] and [10] took a different view for prolonging the network-lifetime. They attempted to sustain the availability of the sensors that have less energy by distributing the traffic load to the ones with much residual energy. All of the above-mentioned works focused on improving energy-efficiency using fixed routing paths; nonetheless, due to the lack of path diversity, those nodes traversed by fixed routing paths may drain out their energy quickly. The work in [11] exploited two natural advantages of opportunistic routing, i.e. path diversity and the improvement of transmission reliability, to develop a distributed routing scheme for prolonging the network lifetime of a WSN. The goal is to assist each sensor in determining a suitable set of forwarders as well as their priorities, thus, enabling effort to extend the network lifetime.
Chang et al. in [12] proposed a shortest cost path routing algorithm for maximizing network lifetime based on link costs that reflect both the communication energy consumption rates and the residual energy levels. The authors of [13] presented a uniform balancing energy routing protocol to choose the nodes whose residual energies were greater than a certain threshold as routers for other nodes in every transmission round and distributed the energy load among any sensors to N o v e m b e r . 2 0 1 3 maximize the whole network lifetime. Lu et al. in [14] proposed an Energy-Efficient Multi-path Routing Protocol (EEMRP). It has the capability of searching multiple node-disjoint paths and utilizes a load balancing method to assign the traffic over each selected path. Both the residual energy level of nodes and the number of hops are considered to be incorporated into the link cost function. It uses a fairness index to evaluate the level of load balancing over different multi-paths. Furthermore, since EEMRP only takes care of data transfer delay, the reliability of successful paths sometimes is limited.
In [15], Huang et al. presented a novel energy-aware geographic routing protocol (EAGR) in WSNs that attempts to minimize the energy consumption for end-to-end delivery. EAGR adaptively uses an existing geographic routing protocol to find an anchor list based on the projection distance of nodes for guiding packet forwarding. Each node holding the message utilizes geographic information, the characteristics of energy consumption, and the metric of advanced energy cost to make forwarding decisions and dynamically adjusts its transmission power to just reach the selected node. The authors [16] proposed an efficient data-driven routing protocol called data-driven routing protocol to address the mobility problems in WSNs with mobile sinks. Data-driven routing protocol was presented to reduce the overhand for the routing discovery that cased by sink mobility with keeping a high performance of the packet delivery.
Paradigms of Computational Intelligence (CI) have been successfully used to address various challenges; i.e. energyefficient routing to prolong network lifetime. CI provides adaptive mechanisms that exhibit intelligent behavior in complex and dynamic environments like WSNs. In other words, CI brings about flexibility, autonomous behavior and robustness against topology changes, communication failures and scenario changes [17]. According to CI conception, many routing protocol methods for WSNs are proposed. The authors in [18] presented a new routing protocol based on a high weight Genetic Algorithm (GA). In this method, the sensor nodes are aware of the data traffic rate to monitor the network congestion. In [19], [20] and [21], the authors presented novel algorithms for routing packets in WSNs utilizing fuzzy logic at each node to determine the best nodes from candidate nodes in the forwarding paths to maximize the lifetime of the sensor networks. Keyur et al. in [22] used A-star algorithm to search optimal route from the source to destination in such a way that, there is a pre-defined minimum energy level for sensor nodes so that sensor node doesn't participate in routing if its residual energy level is below this predefined minimum energy level. The authors in [23] [24] exploited the concept of Artificial Bee Colony algorithm (ABC) to proposed novel hierarchical clustering approaches for WSNs to maintain minimum energy depletion in the network. Wang et al. [25] applied the Biogeography-Based Optimization (BBO) algorithm to address the dynamic deployment problem in WSNs including static and mobile sensor nodes based on a binary detection model. In [3], we proposed a novel routing method for WSN to extend network lifetime used a combination of fuzzy approach and an A-star algorithm (Fuzzy_A-star). Fuzzy_A-star approach is used to determine an optimal routing path for source to the sink by favoring the highest remaining energy, minimum of hops and minimum traffic loads.

PROBLEM STATEMENT
In most applications of WSNs, sensor nodes are densely deployed in large areas. Once deployed, nodes can never be recharged or replaced. After depleting their energy, nodes turn to die and stop working. Since networks cannot accomplish assigned missions after nodes die, the lifetime of WSNs is a crucial parameter when evaluating performance of routing protocols [4] [6]. Generally, in many routing algorithms, the best path is chosen for transmission of data from source to destination. Over a period of time, if the same path is chosen for all communications in order to achieve better performance in terms of quick transmission time, then those nodes on this path will get drained fast [2] [6] [7]. The problem with these routing algorithms is that they minimize the total energy consumption in the network at the expense of nonuniform energy drainage in the networks. Such algorithms cause network partition (i.e., split the network into two or more disconnected partitions) because some of nodes in a WSN have drained their energy. This phenomenon deteriorates or even nullifies the usefulness and effectiveness of the whole network [3] [6]. Figure 1 shows the network partition (one part of the network may become disconnected from the destination) due to the death of some sensor nodes.
In many cases, the lifetime of a sensor network is over as soon as the battery power in critical nodes is depleted. The problem then consists of determining the set of routes to be used by each node and the associated some of routing  parameters (i.e., the routing configuration) that maximize the network lifetime. As the maximization of lifetime can be formulated as an optimization problem, the variables of this optimization problem are routing parameters at nodes. When having sensed or being asked to relay a data packet, each node needs to transmit this packet to a sink. However, it cannot send the packet directly to sinks except that it is a sink's neighbor. A node normally needs to choose a neighboring sensor as its next hop. When nodes are chosen as the next hops, they will influence the energy consumption of the network as well as the lifetime.
From the aforementioned literatures of WSNs, in Sec. 2, we note that a number of different criteria have been used to prolong the lifetime of the sensor networks. These criteria are as follows:

1) Remaining Energy (RE):
A routing protocol that uses this metric would then favor routes that have the largest total energy capacity from source to destination. In other words, nodes having greater remaining energy participate more than the nodes with limited power [2] [14] [26]. Figure 2 shows an example of a small sensor network, where a source node wishes to transmit a packet to a destination node. The numbers inside the nodes indicate the remaining energy capacity of corresponding nodes. In this example, a routing protocol could select path A-D-F since it has the largest total capacity (i.e. 12).

2) Minimum Hop (MH):
The basic idea behind this metric is that using the shortest path will result in low end-to-end delays and low resource consumptions, since the smallest number of forwarding nodes will be involved [14] [21] [26]. Under this criterion, a routing protocol could select the path B-E that has the minimum hop (i.e. 3) in Figure 2.

3) Traffic Load (TL):
The high traffic load causes a data queue overflow in the sensor nodes, resulting in loss of important information. In addition, since the battery energy of the sensor nodes is quickly exhausted, the entire lifetime of wireless sensor networks would be shortened [2] [21] [26]. Therefore, the traffic load in the nodes will affect the lifetime of the networks. In Figure 2, the numbers in parentheses below the nodes indicate the traffic load of the corresponding nodes. A routing protocol under this criterion could select the path C-G-E with the lowest total traffic load (i.e. 4).
To investigate the problem of unbalancing energy consumption and maximization of the network lifetime, we therefore propose an energy-efficient routing protocol called FABCRP routing protocol. The proposed routing protocol is used to select the optimal routing path from source to destination by considering the above criteria (remaining energy, minimum hop, and traffic load) and balancing among them to prolong the network lifetime significantly.

Artificial Bee Colony
Artificial Bee Colony (ABC) is a novel optimization algorithm that comes under Swarm Intelligence. ABC algorithm is inspired by social behavior of natural bees. It was introduced by Karaboga in 2005 [27]. In ABC algorithm, the colony of artificial bees is formed of three been groups: employed bees, onlooker bees and scout bees.
Employed bees visit the food source and gather information about food source location and the quality. Employed bees have memory, so they know the places they have visited before and the quality of food there. Employed bees performs the local search and try to exploit the neighboring locations of the food source and search the best places of foods in the surrounding areas of the present value. Onlooker bees are bees that are waiting on the dance area to decide which food source is better. This decision is made on the basis of information provided by employed bees. Onlooker bees perform the global search for discovering the global optimum. Scout bees do a random search for the food. Scout bees discovers the new area which are uncovered by the employed bees, these bees are completely random in nature and their operation of search. Scout bees avoid the search process to get trapped in local minima. The position of a food source represents a possible solution to the optimization problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated solution [28].
In the ABC algorithm, the first half of the colony consists of employed bees and the second half consists of onlooker bees. The first positions of food sources randomly generated where each employed bee is nominated to a food source. Then, each employed bee determines a new neighboring food source of its currently associated food source by (1) and computes the nectar amount of the new food source for each iteration. If the nectar amount of the new food source is higher than the previous one, then employed bee moves to the new food source, otherwise it continues with the old one.
). ( where θi is a random number between [-1…1], vi is a candidate solution, xi is the current solution and xk is a neighbor solution and j∈ {1, 2…D} is randomly chosen index where D is the dimension of the solution vector.  (2) Apply the greedy selection process The employed bees share the information about their food sources with onlooker bees after all of them complete the search process. An onlooker bee evaluates the nectar information taken from all employed bees and chooses a food source with a probability related to its nectar amount by (2), known as roulette wheel selection method which provides better candidates to have a greater chance of being selected.  (2) where fiti is the fitness value of the solution i proportional to the nectar amount of the food source in the position i and SN is the number of food sources equal to the number of employed bees. Once all onlookers have selected their food sources, each of them determines a new neighboring food source of its selected food source and computes its nectar amount. The bee memorizes the new position and forgets the old one whether its nectar is higher than that of the previous one; otherwise it keeps that.
The employed bee becomes a scout when a food source is exhausted by the employed and onlooker bees. Any position cannot be improved further through a predetermined number of cycles which is called limit parameter, the food source is assigned as abandoned and employed bee of that source becomes scout. In that position, a new solution is randomly generated by the scout is given by: where abandoned source is represented by xi, θi is a random number between [-1…1] and j∈ {1, 2… D}. Figure 3 shows the flow chart of ABC algorithm [27,29].

Fuzzy Approach
Fuzzy logic was first introduced in the mid-1960s by Lotfi-Zadeh in [30]. Since then, its applications have rapidly expanded in adaptive control systems and system identification. It has the advantages of easy implementation, robustness, and ability to approximate to any nonlinear mapping [17].
In fuzzy systems, the dynamic behavior of a system is characterized by a set of linguistic fuzzy rules based on the knowledge of a human expert. These rules are the heart of a fuzzy system and may be provided by experts or can be extracted from numerical data. In either case, the rules that we are interested in can be expressed as a collection of IF-THEN statements (IF antecedents THEN consequents). Antecedents and consequents of a fuzzy rule form the fuzzy input space and fuzzy output space respectively are defined by combinations of fuzzy sets. Considering a fuzzy system with p inputs and one output with M rules, then the L th rule has the form [31]: is is and and is : denote the linguistic variables defined by fuzzy sets and L=1…M. Figure 4 shows the typical structure of a fuzzy system. It consists of four components namely; fuzzification, rule base, inference engine and defuzzification [30].
The processes of making crisp inputs are mapped to their fuzzy representation in the process called fuzzification. This involves application of membership functions such as triangular, trapezoidal, Gaussian etc. The inference engine process maps fuzzified inputs to the rule base to produce a fuzzy output. A consequent of the rule and its membership to the output sets are determined here. The defuzzification process converts the output of a fuzzy rule into crisp outputs by one of defuzzification strategies [32].  In this paper, the topology of a WSN is modeled as a directed graph G (N, E), where N is the set of nodes and E is the set of direct links between the nodes. A direct link e= (u, v), e ∈ E exists if the Euclidean distance between node u and v is smaller than r, where r is the radius of the transmission range of nodes. A sink node is responsible for collecting data from all other nodes within its transmission range [7] [9] [10] [33]. The routing schedule is computed by the sink. It calculates optimal routing schedule and broadcasts it. Every node follows this schedule. The process of finding the optimal path, and broadcasting it in the network and sending data from all nodes to the sink by following this routing schedule is repeated in every round. Computation of routing schedule is done dynamically with the consideration of current level of some criteria of each node. Therefore, it may require the nodes to report their criteria periodically to the sink. The sink can then determine the routing schedule based on this updated information. One of the important measures of WSN is the network lifetime. For the proposed model, whenever any sensor node runs out of energy, communication links between various sensor nodes and the sink will break. This is considered as the end of the network lifetime. The lifetime of each sensor node depends on energy consumption, it is important to preserve residual energy of these nodes in such a way that overall network lifetime is extended. The proposed routing method assumes that: i) all sensor nodes are randomly distributed in the area and every sensor node is assumed to know its own position as well as that of its neighbors and the sink; ii) all sensor nodes have the same maximum transmission range and the same amount of initial energy; iii) each node has a certain amount of traffic pending in node's queue. The node's queue includes the application traffic and also the traffic that a node has already committed to forward. The primary goal of this paper is to design an energy-efficient routing protocol call FABCRP. The proposed method is capable to prolong the lifetime of WSNs through limiting energy cost as well as equal distribution of energy consumption. To achieve this, we make use of both ABC algorithm and Fuzzy approach. The new method uses all three routing criteria, mentioned in Sec. 2 (i.e. highest remaining energy, minimum number of hops, and lowest traffic load) to select the optimal next hop to this node. The process consists of two parts:

1) Implementation of ABC algorithm
In FABCRP, the sink prepares the routing schedule and broadcasts it to each node. FABCRP is used to find the optimal routing path from the node to the sink is applied to each node. ABC algorithm considers a tree structure in terms of (S, Fit), where S is the set of candidate nodes in the forwarding path and Fit is a set of the fitness functions that assign a fitness function value fit(s) to each candidate node s∈ S. The tree node is explored base on its fitness function. In the proposed method, we use fuzzy approach to calculate the value of the fitness function of each node s. In FABCRP, the candidate nodes are selected as the next hops (neighbors) of the source where each employed bee in ABC colony is nominated to one of these nodes. Each employed bee represents to a candidate node in the following path. All employed bees compute the fitness functions of their nodes and share this information with onlooker bees in the ABC colony. An onlooker bee than evaluates the information taken from all employed bees and chooses a best node with a highest probability P related to its probability value given by: where P(s) is the probability value for node s, fit(s) is the fitness value of the node s that is calculated by fuzzy approach. N is the number of candidate nodes equal to the bee number in both of employed bees and onlooker bees.

2) Implementation of fuzzy approach
In this Section, we focus on describing the major goal of fuzzy approach in FABCRP. Fuzzy approach is used to calculate the value of the fitness function fit(s) of node s that depends on the remaining energy RE(s), the distance D(s) to the sink and the traffic load TL(s) of the node s. Figure 5  In FABCRP, the fuzzified values are processed by inference engine which consists of a rule base and various methods to inference the rules. All these rules are processed in a parallel manner by a fuzzy inference engine. The defuzzification finds a single crisp output value from the solution fuzzy space. This value represents the fitness function value of node s. Practice defuzzification is done using centre-of-gravity method [32] given by: where Uk is the output of rule base k, and ck is the centre of the output membership function for n rule base number. Figure 7 shows the flow chart of FABCRP that is a combination of ABC algorithm and fuzzy approach to find optimal routing path from source node to the sink.

PERFORMANCE EVALUATION
To demonstrate the effectiveness of FABCRP in terms of balancing energy consumption and maximizing network lifetime, simulation results of the proposed are compared with those of Fuzzy approach, ABC algorithm and Fuzzy_A-star approach [3] for two different topographical areas. All the approaches use the same routing criteria namely; the remaining energy, the minimum hops and the traffic load in selecting the optimal path from the source node to the sink.
The ABC algorithm has shown outperform existing maximum lifetime routing protocols in literatures such as LEACH [34] and Particle Swarm Optimization (POP) [35]. The fuzzy approach is also shown to exhibit better performance over existing maximum lifetime routing algorithms in literatures such as Online Maximum Lifetime heuristic (OML) [19] and Minimum Transmit Energy (MTE) [20].
Experimental results obtained under various network scenarios in [19] [20] [34] [35] indicate that both of ABC algorithm and fuzzy approach give optimal performance in terms of the network lifetime as well as the average energy consumption. In [3], the simulation results demonstrated that Fuzzy_A-star approach makes significant improvement for WSNs in terms of balancing energy consumption and maximizing the network lifetime as compared to A-star algorithm and fuzzy approach.

Simulation Setup
The simulations are carried out in MATLAB. 100 sensor nodes are randomly deployed in a topographical area A of dimension 100 m × 100 m. Another set of 100 sensor nodes are randomly deployed in a topographical area B of  The proposed method uses the first order radio model [34] that has been widely used for measuring energy consumption in wireless communication [36] [37] [38] [39] [40]. According to this model, transmission and receiving costs are characterized by the expressions EnT(k)=Eeleck+Eampk.d 2 and EnR(k)=Eeleck, respectively, where k is the number of bit per packet, d is the distance from the sender node to the receiver node, Eelec and Eamp are per bit energy dissipation in transmitting or receiving circuitry and energy required per bit per meter square for the amplifier to achieve acceptable signal to noise ratio (SNR) respectively. Simulations are done using the values 50 nJ/bit and 100 pJ/bit/m 2 for Eelec and Eamp, respectively. The traffic load, in each node is assumed to be generated randomly between [0...10]. Table 6 presents the systems parameters in details. Maximum traffic node's queue 10

Simulation Results
First we compare the network lifetime for all different approaches. The number of alive nodes as a function of rounds by using the different approaches for both areas A and B are shown in Figures 8(a) and 8(b), respectively. It can be seen that, the proposed method outperforms other approaches and also the number of alive nodes of the proposed method is always higher than that of others. When all packets are sent in the two routing areas, the network lifetime achieved by the proposed method increased by nearly 35%, 30%, and 15% than that obtained by Fuzzy approach, ABC algorithm, and Fuzzy_A-star routing method respectively The different duration of time corresponding to the first dead node computed using all approaches in both areas A and B is listed in Table 7. Clearly, the time for the first node to die in the proposed method is much longer than the times for the first node to die in other approaches in both areas A and B.
From Figure 8 and Table 7, it is clearly that the proposed method outperforms other approaches in terms of balancing energy consumption and maximization of network lifetime. The delay incurred in transmission of data packets is also a key parameter for certain applications. The simulation time comparison among all approaches in areas A and B are shown in Figures 10(a) and 10(b) respectively. Clearly, it can be seen that the proposed method has shortest time delay compared to other approaches in the two areas. Shorter time delay indicates both energy saving and efficient information transmission (especially secure and important ones). In other words, data packets are routed through different node-disjoint paths with multipath routing to avoid network congestion and prolong the network lifetime.

CONCLUSION
Resource limitations have to be taken into account when designing a WSN infrastructure. Energy is one of the most critical resources for WSNs. Most of works in the literatures about WSN routing have emphasized energy savings as an important optimization goal. However, merely saving energy is not enough to effectively prolong the network lifetime. The Uneven Energy Consumption (UEC) often results in network partition and low coverage ratio, which deteriorate the overall performance. To address the UEC problem in WSN, this paper proposed an energy-efficient routing protocol called Fuzzy Artificial Bee Colony Routing Protocol (FABCRP). FABCRP is capable of selecting the optimal routing path form the source to the sink by favoring the highest remaining energy, minimum number of hops and lowest traffic load. The performance of the proposed is evaluated and compared with other three methods under the same criteria in two different topographical areas. Simulation results demonstrated that the effectiveness of FABCRP in terms of balancing energy consumption and maximization network lifetime.