Adaptive Fuzzy-Based Energy and Delay-Aware Routing Protocol for a Heterogeneous Sensor Network

In a heterogeneous sensor actor network, packet loss may occur due to bad link quality, overflow of buffer, and low energy levels. Retransmission of the lost packets leads to more energy consumption and delay. Ensuring data reliability and minimum delay requirement while improving energy efficiency are challenging issues in a resource-constrained heterogeneous sensor actor network. In this paper, a fuzzy-based delay and energy-aware intelligent routing mechanism has been proposed to select efficient routes. In the proposed mechanism, routing decisions are taken using a fuzzy logic system by considering network resources, such as residual energy, quality of link, available buffer size, and distance (proximity). In a network, a node with higher residual energy, higher free available buffer, good link quality, and close distance (proximity) gets opportunity to become a next hop node in a routing path. Furthermore, network performance has been analyzed with various network states. Simulation has been carried out using Network Simulator 3 by considering performance metrics, such as delay, number of retransmissions, energy consumption, lifetime, and network stability of the network.


Introduction
Wireless sensor and actor network (WSAN) is a group of sensors and actors where a sensor node collects data by sensing operation and actors perform appropriate actions by processing the received data [1][2][3][4].Sensor nodes have limited resources, such as battery, processing capability, transmission power, and limited wireless communication capabilities.However, actor nodes are resource rich nodes [1,2].In a wireless sensor and actor network, efficient decision-making for routing and execution of tasks are major challenges.Timely data delivery at an actor node is a major issue in a WSAN for applications like activating water sprinkler and alarm in fire accident, battlefield surveillance, biological and chemical attack detection, home automation, and environmental monitoring [1][2][3][4][5][6][7].
Energy efficiency and reliability in data collection are major issues in WSANs.In WSANs, a data collection protocol may satisfy the major application requirements, such as high data reliability and less delay along with energy efficiency.ese requirements can be achieved by designing an energy efficient intelligent routing protocol.e sensor nodes may be deployed randomly in a dynamic environment [8].
is results in dropping of packets due to dynamic changes in quality of wireless links.e major reasons for dropping of packets may be bad wireless link quality and unavailability of free buffer at intermediate nodes and residual energy at nodes.To ensure data reliability, the dropped packets need to be retransmitted, and this leads to more delay and energy consumption.erefore, an energy efficient routing protocol may solve the above issues by taking efficient routing decisions while considering energy of a node, link quality, and available buffer.
e key observation that motivates this work is the improper selection of a next hop node in a routing path. is leads to dropping of packets.at means, selection of a node which has high available buffer, good wireless link quality, more residual energy, and close distance (proximity) as next hop node reduces the packet dropping rate.However, reduction in the packet dropping rate increases the data reliability and energy efficiency and reduces the delivery delay [9,10].In this work, a fuzzy-based intelligent delay and energy-aware routing mechanism has been proposed to improve the lifetime of the network.A Fuzzy Logic System (FLS) generates a best output value by combining input variables and fuzzy rule set [11][12][13].Residual energy, available buffer, and quality of link and distance (proximity) are the primary considerable parameters to reduce the packet dropping rate at a node.FLS takes these parameters as input and produces the best output value (or a routing metric value called chance of becoming the next node).Furthermore, Dijkstra's algorithm has been adopted to find the routes where the determined routing metric value is considered as cost.e major contributions of this work are as follows: (1) Design of an intelligent delay and energy-aware routing protocol using the fuzzy logic for a heterogeneous sensor actor network.(2) A routing metric (i.e., a routing parameter) has been computed by considering the residual energy, link quality, available buffer, and distance (proximity).( 3) Simulation has been performed to show the performance of the proposed protocol in terms of delay, number of retransmissions, energy consumption, lifetime, half of the nodes die, last node dies, and network stability of the network.
e rest of the work is organized as follows.In Section 2, related work, motivation, and problem formulation have been discussed.Network model has been introduced in Section 3.1.Energy consumption model is presented in Section 3.2.Fuzzy-based energy-aware routing mechanism has been proposed in Section 3.3.In Section 3.4, the procedure of the fuzzy logic system is presented.Furthermore, simulation results have been discussed in Section 4. Finally, Section 5 concludes the work.

Related Work and Motivation
In this section, the existing lifetime-based study for WSNs and fuzzy logic systems are discussed.Various methods for computing routing metrics in WSNs have been discussed.Bhardwaj et al. [14] have derived upper bounds on lifetime in a wireless sensor network by considering an energy model.Rout et al. [15] have estimated the energy consumptions for tree-based rechargeable sensor networks.Lee and Lee [16] have derived the upper bound on the network lifetime for a cluster-based sensor network.In [17], upper bounds on the network lifetime have been estimated by considering the duty cycle and network coding.
Neamatollahi et al. [18] have proposed a fuzzy-based hyper round policy mechanism to mitigate the reclustering overhead problem in a WSN.In [19], a cluster head selection policy based on the fuzzy logic and particle swarm optimization has been proposed for a WSN to improve the lifetime.Collatta et al. [11] have proposed a fuzzy logic-based mechanism to compute the sleeping time of sensor nodes in an industrial wireless sensor network to improve the energy efficiency.A fuzzy logic-based clustering approach has been proposed by Lee and Cheng [12], where a cluster head is selected based on a node's residual energy and the expected residual energy.In [20], a fuzzy-based unequal clustering mechanism has been designed for addressing the hotspot problem in a WSN by proper selection of cluster head and unequal cluster formation.However, in our work, we have proposed a delay and energy-aware routing protocol for a heterogeneous sensor actor network using the fuzzy logic system under variable network states.
Pantazis et al. [21] have presented a survey on energy efficient routing protocols in a wireless sensor network.In [22], cost of a path has been computed in terms of number of link layer transmissions by considering the link quality and relative ordering of the links for a wireless mesh network.A network coding-based probabilistic routing protocol has been proposed for a cluster-based WSN by Rout et al. [23].Zhang et al. [24] have proposed an energy balanced routing protocol where the next node is selected based on the link weight and the forward energy density.In [25], an opportunistic routing protocol has been proposed for a duty cycled WSN where residual energy is considered with a forwarder selection algorithm.Lai et al. [9] have proposed a link-delayaware energy efficient routing metric for a WSN to balance the energy consumptions among sensor nodes.Sun et al. [26] have proposed an ant colony optimization-based routing algorithm by considering the node's communication transmission distance, the transmission direction, and the residual energy.However, in our work, an energy-aware routing metric (i.e., a routing parameter) has been proposed to take the efficient routing decisions by considering the residual energy, the quality of the link, the available free buffer, and the distance.

Motivation and Problem Formulation.
Design of an energy-efficient routing protocol for a heterogeneous sensor network where the environment changes dynamically poses several challenges, such as data reliability, stringent delay, and energy efficiency [9,10].Packet loss is one of the major factors that results in the abovementioned network.Retransmission of the lost packet may achieve data reliability, but it increases the delay and energy consumption [10].In a heterogeneous sensor actor network, packet loss (at a node) may occur due to bad link quality, overflow of the buffer, or energy levels of the node.Packet loss may be reduced by designing an efficient routing metric (or a routing parameter) which is computed based on the link quality, available buffer, and energy level.In the PRD (predicted remaining deliveries) routing mechanism [9], a routing metric is computed using the residual energy, link quality, delay, and distance.However, in a large-scale sensor network, more number of packets are dropped by the nodes which are near to the actor node due to the buffer overflow.In the PRD routing metric [9], the number of expected transmissions and link bandwidth are considered to obtain the delay (the time spent in transmitting the packet) which is a constant for the network where bandwidth is assumed as 2 Journal of Computer Networks and Communications the same for all the links.End-to-end delay increases with the number of dropped packets.More number of packets dropped due to the poor link quality and buffer overflow.erefore, available buffer is an important parameter that needs to be considered in the computation of a routing metric.PRD routing metric does not address the available buffer as a parameter.In this work, a Fuzzy-based Energy-Aware Routing Mechanism (FEARM) has been proposed to improve the performance of a heterogeneous sensor network by considering the residual energy, link quality, available buffer, and distance (proximity).Furthermore, Dijkstra's algorithm is adopted to find the efficient routes using a computed routing metric (or a parameter).

Fuzzy-Based Energy-Aware Routing Mechanism for a Heterogeneous Sensor Actor Network
In this section, the network model is introduced.An energy consumption model has been presented.Furthermore, a routing metric has been computed using the proposed fuzzybased routing mechanism and Dijkstra's algorithm has been adopted to find the routes in the proposed mechanism.

Network Model.
A heterogeneous sensor actor network is represented as a graph G(V∪A, E) as shown in Figure 1, where is a set of n number of sensor nodes, E is a set of links, and A is a local actor node (for the large-scale network).Heterogeneity characteristics, such as battery capacity, quality of link, and buffer capacity, are considered in this work.A node (v i ) has different levels of residual energy (E i ), buffer capacity (B i ), associated with link quality (from node j to node i is L ji ), and distance (from node j to node i is D ji ).Sensor nodes generate data (by sensing operation) and transfer the data to a local actor node (A) through an efficient routing path.A node (v i ) finds the efficient routing path by determining the fuzzy output value (p j ) (where v j is one of the possible next hop nodes) for the next hop node.e fuzzy output value (indicates the value of routing parameter or chance of becoming the next node) is a function of residual energy (E j ), available buffer (B j ), quality of link (L ij ), and distance (D ij ).e notations used in this paper are described in Table 1.

Energy Consumption Model.
is section presents the same energy consumption model as in [5,14,27].Energy consumption parameters for sensing, receiving, and transmitting data (over a distance d) are E s , E r , and E t , respectively.According to the path loss model, signal strength is reduced by 1/d  n , where  n is the path loss exponent.e energy consumption is given as follows: where α 3 (joules/bit) is the energy consumption for sensing operation, α 12 (joules/bit) is the energy consumed by the receiver electronics, α 11 (joules/bit) is the energy/bit consumed by the transmitter electronics, and α 2 (joules/bit/meter 2 for  n � 2) is energy dissipated in the transmit op-amp [14].In this work, energy consumptions are computed for an event centric application [27,28].Let l is the size of data generated by a sensor per event and β is the average rate of the event that occurs per unit time [16].erefore, the energy consumption for sensing operation till time t will be ltβα 3 .A node's energy consumption for sensing operation and transmitting sensed data in time t is ltβ(E s + E t ).

Fuzzy-Based Energy-Aware Routing Mechanism (FEARM).
In this section, the proposed fuzzy-based delayand energy-aware routing mechanism (FEARM) has been presented.Every node finds the fuzzy output values for neighbor nodes.Furthermore, Dijkstra's algorithm [22,29] has been adopted to find the efficient routes in the proposed mechanism.
In Algorithm 1, every node finds the fuzzy output values to its neighbor nodes based on residual energy, link quality,

Fuzzy Logic
System.e fuzzy logic system (Figure 2) has four modules, namely, fuzzifier, fuzzy rules set, fuzzy inference system, and defuzzifier.In the fuzzifier module, membership values (μ(E), μ(B), μ(D), and μ(L)) and membership levels (linguistic levels) for given crisp input parameters (E, B, D, and L) have been determined using the membership functions.Fuzzy rules set is a set of if-then rules which are generated using the Mamdani fuzzy inference model [30] (Table 2).A fuzzy rule can be represented as follows: if x is A 1 AND y is A 2 , then z is B 1 , where A 1 , A 2 , and B 1 are the linguistic variables of fuzzy sets x, y, and z, respectively.Fuzzy inference system infers the fuzzy output by applying the fuzzy rule set to the membership functions.Finally, defuzzifier transforms the fuzzy output value to a crisp value.In this work, the Center of Area (COA) method has been used in the defuzzification process [12,18,20].
In this work, the input variables for the fuzzy logic system are residual energy (E), available buffer (B), quality of link (L), and distance (D).e fuzzy sets that describe the residual energy and available buffer are shown in Figures 3(a) and 3(b), respectively.e linguistic variables for these input variables are low, medium, and high.e fuzzy set that describes the quality of the link input variable is shown in Figure 3(c).e linguistic variables for this input variable are poor, average, and good.
e fuzzy set that describes the distance input variable is shown in Figure 3(d).
e linguistic variables for this input variable are close, adequate, and far.
e only fuzzy output variable is the chance of becoming the next node and is depicted in Figure 4. Five linguistic variables low, weak, medium, strong, and very strong are considered for the fuzzy output variable.e fuzzy set input and output variables and their corresponding linguistic variables are shown in Table 3.In this work, triangular membership functions are used for all linguistic variables of input and output variables (for simplicity).
Fuzzy rules can be generated using experimental data or heuristic data.However, in this work, fuzzy rules are generated using the heuristic fuzzy rule generation method which follows the following principle: a node with high residual energy, high available buffer, good quality of link, and close distance has the highest chance of becoming the next node in a routing path.Moreover, based on the four fuzzy input variables and one output variable, 81 fuzzy ifthen mapping rules are presented in Table 2.
e fuzzy output variable is derived by predefined fuzzy rules and membership functions.is derived fuzzy output variable has been transformed to a single crisp value (which indicates the Chance of becoming the next node in the routing path) using the center of area (COA) method in the defuzzification process.
e working process of the fuzzy logic system has been presented in Algorithm 2. In Algorithm 2, a list l〈value, membershiplevel〉 is initialized to zero (line 1).Associate membership values and linguistic levels are determined for every given fuzzy input variable using membership functions (Figure 3) (line 2).Further, Determined Rule set (DR) is constructed.(DR) is a set of all possible combinations of determined linguistic levels (line 3).For each rule in DR, the associate output linguistic variable will be found using predefined fuzzy rule set (refer 2).An entry will be added to the list l which has maximum membership value (line 4 to line 10).Finally, defuzzifier transforms the list l to a single output value (line 11).

Performance Evaluation
In this section, the proposed Fuzzy-based Energy-Aware Routing Mechanism (FEARM) has been compared with a PRD (predicted remaining deliveries) routing mechanism [9] and a retransmission based approach (as compared in [31]) in terms of average end-to-end delay, total number of retransmissions, lifetime, total energy consumption, data collection rounds at which half of the nodes die, data collection rounds at which all nodes die, and network stability.

Simulation Environments.
Simulation results are presented by considering the different combinations of the fuzzy input variables (i.e., FEARM with four parameters (residual energy, available buffer, link quality, and distance), FEARM with three parameters (residual energy, available buffer, and link quality), FEARM with residual energy and link quality, and FEARM with residual energy and available buffer).e simulation is performed using the Network Simulator 3 [32].
e simulation parameters are shown in Table 4 [14,27].In the simulation, heterogeneity is considered in the network as follows: all nodes have different energy capacity (20 KJ to 25 KJ) and buffer capacity (2 K to 2.5 K bytes), and all links are assigned with link qualities between 0 and 1 (follows uniform distribution).e size of generated data per event is considered as 960 bits (Table 4).To achieve high data reliability, hop-by-hop (the link layer) retransmissions are performed till a packet reaches to the next hop node.In a data collection round, every node generates one packet and transmits to the local actor.In this simulation, lifetime of the network is defined as the number of data collections rounds completed till the first node dies [33,34].

Simulation Results and Discussion. Figures 5(a) and 5(b)
show the comparison of average end-to-end delay of a packet and number of retransmissions among fuzzy-based delay-and energy-aware routing mechanisms (FEARM with four parameters, FEARM with three parameters, FEARM with residual energy and link quality, and FEARM with residual energy and available buffer), PRD routing mechanism [9], and a retransmission-based approach [31].In the proposed mechanism, routing decision has been taken using the proposed fuzzy logic system to reduce the packet drops.Reduction of packet dropping rate incurs reduction in the packet retransmission rate.Reduction of packet retransmission rate further reduces not only the energy consumption but also delivery delay of a packet.It has been observed from Figure 5(a) that the fuzzy-based energy-aware routing mechanism (FEARM), FEARM with three parameters (residual energy, available buffer, and link quality), FEARM with residual energy and link quality, and FEARM with residual energy and available buffer reduces the average delay up to 58.78%, 53.54%, 41.96%, and 23.58%, respectively, in comparison to the retransmission-based approach.PRD routing mechanism [9] is not considered as the available buffer as a parameter in the computation of the routing metric.In a large-scale sensor network, the nodes near to the actor node will be overburdened and drops the packets due the overflow of the buffer.
ese dropped packets need to be retransmitted, and this leads to the increase in delay and number of retransmissions.It can be seen from Figure 5(a) that the proposed fuzzy-based routing mechanism (with four parameters) reduces the average delay Input: G(V, E), S, n, residual energy (E), available buffer (B), distance (D), link quality (L) Output: energy-aware routing paths (1) )//refer Algorithm 4 (14) end for (15) end while ALGORITHM 1: Fuzzy-based energy-aware routing mechanism.
(3) DR � {A rule set with all possible combinations of determined linguistic levels (from line − 2} (4) for each rule in DR do (5) if μ(E), μ(B), μ(D), μ(L) fit the membership levels of this rule (6) Add an entry to the list l with (7) value � maximum (μ(E), μ(B), μ(D), μ(L)) (8) membershiplevel � output membership level of this rule (9) end if (10) end for (11)  Table 2: Fuzzy decision making rules.Figure 5: Comparison of (a) average end-to-end delay (in seconds), (b) total number of retransmissions, and (c) total energy consumption (in Joules) in the network using the proposed approaches, PRD routing metric [9] and an existing retransmission-based approach (as compared in [31]).network stability (in data collection rounds) in the network using the proposed approaches, PRD routing metric [9] and an existing retransmission based approach (as compared in [31]).

Journal of Computer Networks and Communications
of nodes die), respectively.e lifetime of the network is improved with the proposed mechanism as compared to the retransmission-based approach.Half of the nodes die round is a data collection round at which half of the sensor nodes die in the network [12,35].It can be observed from Figure 6(a) that as the number of nodes increases, the lifetime of the network reduces.e (average) half of the nodes die round (in data collection rounds) is increased up to 18.38% (Figure 6(b)) (i.e., lifetime is increased) with the proposed mechanism in comparison to the retransmissionbased approach.From Figures 6(a) and 6(b), it can be observed that a significant lifetime improvement has been achieved with the proposed mechanism in comparison to the PRD routing metric.
Figure 6(c) shows the stability of the network in terms of number of data collection rounds.Network stability is defined as the difference (in rounds) between first node dies round and half of the nodes die round [36].Figure 6(c) shows that the proposed mechanism improves the (average) stability of the network up to 17.72% in comparison to the existing approach [31].
e fuzzy-based energy-aware routing mechanism (FEARM) with three parameters (residual energy, available buffer, and link quality), FEARM with residual energy and link quality, and FEARM with residual energy and available buffer improves the network stability up to 14%, 9.42%, and 3.59%, respectively, in comparison to the existing approach [31].
e proposed mechanism improves the network stability in comparison to the PRD routing metric (Figure 6(c)).Figure 7 illustrates the data collection round at which the last node dies.In the PRD mechanism and retransmission-based approach, the last node dies much before in comparison to the proposed mechanism (Figure 7).erefore, residual energy, available buffer, link quality, and distance (proximity) are the important parameters for choosing the next hop node in a routing path.

Conclusions
In this paper, a delay-and energy-aware fuzzy-based routing protocol is proposed to take an efficient routing decision in a heterogeneous sensor network.A node's residual energy, link quality, free buffer, and distance (proximity) are considered as the fuzzy input variables.e network performance has been measured with different combinations of fuzzy input variables.e proposed routing protocol reduces the packet dropping rate, and this leads to reduction in delay and energy consumption.Simulation results show that there is a reduction in (average) delay up to 58.78% with the proposed fuzzy-based mechanism.Network (average) energy consumption is reduced up to 61.82% with the proposed mechanism.Furthermore, it has been shown that lifetime of the network in case of fuzzy with four parameters is better than fuzzy with three and two parameters.It has been observed that the network stability is improved up to 17.72% in comparison to the retransmission-based data forwarding approach.As a future research, authors would like to investigate performance of the proposed mechanism in a duty cycle-based sensor actor network.Comparison of the data collection round at which the last node dies using the proposed approaches, PRD routing metric [9] and an existing retransmission-based approach (as compared in [31]).
10 Journal of Computer Networks and Communications

Figure 5 (
Figure 5(c) shows the comparison of consumption of the network among the proposed mechanisms (with different parameters) and retransmission-based approach.Energy consumption of the network increases as the

Figure 6 :
Figure 6: Comparison of (a) lifetime of the network (in data collection rounds), (b) half of the nodes die (in data collection rounds),and (c) network stability (in data collection rounds) in the network using the proposed approaches, PRD routing metric[9] and an existing retransmission based approach (as compared in[31]).

Figure 7 :
Figure7: Comparison of the data collection round at which the last node dies using the proposed approaches, PRD routing metric[9] and an existing retransmission-based approach (as compared in[31]).

Table 1 :
Figure 1: e illustration of the energy-aware routing path in the wireless sensor and actor network.Summary of notations.availablebuffer, and distance (lines 1 to 5).Algorithm 2 determines the fuzzy output value (chance of becoming the next node), and it is explained in the next section.In Algorithm 1, lines 6 to 15 compute the efficient paths based on the fuzzy output value.In Algorithm 3, cost of the path from the starting node to a node u is d[u], and it is initialized to zero (for the starting node, cost is one).In Algorithm 4, if node u precedes node v, then the cost to node v is d[v]⟵d[u] * p v , where d[u] is cost of the path to u and p v is the fuzzy output value (chance of becoming the next node) of node v. e detailed explanation of Algorithm 2 is given in Section 3.4.

Table 3 :
Fuzzy input/output variables and their linguistic variables.