# Energy-Efficient Routing Using Fuzzy Neural Network in Wireless Sensor Networks

Authors: Rajesh Kumar Varun; Rakesh C. Gangwar; Omprakash Kaiwartya; Geetika Aggarwal
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

In wireless sensor networks, energy is a precious resource that should be utilized wisely to improve its life. Uneven distribution of load over sensor devices is also the reason for the depletion of energy that can cause interruptions in network operations as well. For the next generation’s ubiquitous sensor networks, a single artificial intelligence methodology is not able to resolve the issue of energy and load. Therefore, this paper proposes an energy-efficient routing using a fuzzy neural network (ERFN) to minimize the energy consumption while fairly equalizing energy consumption among sensors thus as to prolong the lifetime of the WSN. The algorithm utilizes fuzzy logic and neural network concepts for the intelligent selection of cluster head (CH) that will precisely consume equal energy of the sensors. In this work, fuzzy rules, sets, and membership functions are developed to make decisions regarding next-hop selection based on the total residual energy, link quality, and forward progress towards the sink. The developed algorithm ERFN proofs its efficiency as compared to the state-of-the-art algorithms concerning the number of alive nodes, percentage of dead nodes, average energy decay, and standard deviation of residual energy.


---

## Body

## 1. Introduction

Wireless sensor network (WSN) is referred to as a collection of smart sensor nodes that collects data and taken appropriate decisions [1–3]. WSN environment is comprised of smart sensor nodes for detecting some unusual (RFID enabled) that collects data from the confined condition and forward it to the base station. WSN is a group of smart sensor nodes that collect data from encompassing conditions and forward it to the base station for future actions [4–6]. It also overloads the data on cloud applications that are downloaded by users for processing. The sensing field is a sensor-enabled environment that is used in almost all the fields for smart monitoring purposes, such as human or animal tracking, medical, military, automobile industries, natural hazard, environmental monitoring, seismic detection, agriculture, navigation, and surveillance environments [7, 8]. The sensor nodes have a limited range of energy that is used to communicate and computation. It is highly difficult to recharge these smart nodes or to provide some alternate power source [9–11]. In WSN, few nodes deplete their energy more quickly than may cause degrading the lifetime of the network. The authors proposed an energy efficiency approach where ANT colony with Huffman coding is used to conserve the energy of WSN [12]. Therefore, this paper will look after energy and load of sensor nodes to improve the lifetime of WSN. A load of sensor nodes must be evenly distributed or scheduled to obtain the defined goal. The proposed approach schedules the load among nodes having higher transmission capabilities and computational power.Routing using route-centric parameters is also a supporting approach used in the past to tackle energy consumption balancing issues. In this approach, the routing is performed into a small network region, and in each region, one sensor is selected as next hop that will forward the data from other sensors of a sink [13, 14]. Parameter-centric routing further applies geocast techniques to reduce delay and improve the packet delivery ratio. The next-hop plays a significant role in scalable routing to load balancing, enhancing network lifetime [15]. The major feature used for designing a parametric centric routing is optimal selection techniques for next hop sensor for forwarding the data to the sink. Advanced sensor networks are becoming complex day by day; therefore, traditional mathematical models for next hop selection are not appropriate. A fuzzy inference system provides applicable solutions to fabricate a model for the selection of next hop, as it processes the detailed part of general human apprehension in absence of any mathematical tools. In 1965, the basic theory of fuzzy is explained by Zadeh [16]. Then, Takagi and Sugeno followed the fuzzy system and proposed a fuzzy logic modeling to evaluate the mess of different pragmatic applications, namely, as control, inference, prediction, and estimation [17]. There are some advantages with fuzzy modeling like as the capacity to translate immanent indecisive of human feature into linguistic variables and apprehension of outcomes in natural rule portrayal way and in simple augmentation rule with the help of the extension of new postulates and usefulness of the system. The fuzzy logic is also affected with some disadvantages of no proper method to explain human practical knowledge into fuzzy logic databases. It only analyses the rule database. It cannot think out of the box, or we can say, generalization in fuzzy is a little difficult. It is high time to obtain a generalized solution, to tune the membership function to alleviate error rates in order to enhance the accomplishment index, a generalized solution is required. The artificial neural network (ANN) model proposed by McCulloch and Pitts trained various variants of the ANN model as adaptive liner neuron, which is known as adaptive linear element algorithm [18]. The ANN is an analytical model for “connectionist” which analyses by logic neurons of the human cerebrum. Such models acquire knowledge from trained data vectors and input-output of the system [19–24]. It depicts the weight function concerning the problem including the error rate of the system to make a more efficient system. To enlarge the learning algorithm with generalization ability of fuzzy environment is the incorporating concept that is followed here [25]. It obtains logical interpretation to rectify the issues. A hybrid system named neuro-fuzzy system is proposed by Jang, Lin, Berenji, and Nauck [26–33].In this context, we propose an energy-efficient routing using soft computing-based hybrid system by combining an adaptive neural network and a fuzzy inference system to find an appropriate next hop sensor from the neighboring sensors. The election of next hop relies upon residual energy of each sensor, node degree, and forward progress towards the sink. In each round, a new next hop is selected which supports equalizing the energy consumption to meliorate the lifetime of the network by altering the path each time. The followings are the main contribution of the paper:(1)
First, a system and energy model is presented to explain the topological configuration of WSN and to analyze the energy required for transmitting and receiving data throughout the network(2)
To optimize the performance of the sensor network, routing centric parameters are derived focusing on expected energy consumption, expected node degree, and expected forward progress towards the sink(3)
Fuzzy-Neural networks have been used which jointly combine three routing centric parameters to efficient next hop selection(4)
A fuzzy neural network-assisted energy-efficient routing framework is developed based on the energy model and routing centric parameters(5)
The proposed routing framework is simulated to comparatively evaluate the performance against state-of-the-art routing providing metrics related to sensing environmentsThe remaining part of the paper is organized as follows: the section presents a review of energy-centric routing with and without heuristics approaches. Section3 presents energy-efficient routing using a fuzzy neural network for WSN. Section 4 explained the simulation results and analysis for the proposed routing. The conclusion is presented in section 5.


## 2. Related Works

### 2.1. Energy Centric Routing without Heuristics

The first hierarchical clustering algorithm is LEACH (low energy adaptive clustering hierarchy) which supports two stages for each clustering round [34]. One deals with cluster head (CH) selection and with cluster formation in a network. Another stage deals with data transmission to CH. When a cluster is formed, all the sensor nodes are assigned with some probability through a probabilistic model to elect CH. A predefined threshold value is defined which plays an important role in electing CH. An arbitrary value between 0-1 is generated for every sensor node which is further compared to the threshold value for electing CH in a particular round. To avoid intercluster interface, each CH floats a message using CSMA. Now the sensor nodes are able to make the decision regarding the data transmission that to which CH they wish to connect. After this, CH piles up data from its member nodes and claims data aggregation technique to lessen data redundancy and forward the filtered data to the intended base station. This is how the LEACH algorithm takes fair decisions for CH selection, and each node gets equal opportunity to become a CH [35]. But the critical concern with the LEACH algorithm is that the energy consumption of the nodes is not considered which is our prime concern. Moreover, LEACH does not look after the asymmetric classification of clusters in networks, and multihop data transmission is also not allowed. Therefore, to overcome the mentioned issues of LEACH, hybrid energy efficiency distribution (HEED) is introduced [36]. This algorithm also supports a probabilistic model for CH selection where the probabilistic is increased twice in between the rotations. But this algorithm (HEED) has its own issues. In HEED, few sensor nodes are exempted for the selection of CH, and few nodes are not even a part of any cluster and are freely available. To focus on the conservation of energy, a power-efficient gathering in sensor information systems (PEGASIS) is launched that uses greedy. In PEGASIS, every node acquires data from its near node and forwards it to another neighbor node, and fused [37]. The fused data is transmitted to the base station from a specified node. After a specified time slot, random nodes are selected for the designated role. Hence, all the nodes participate equally and deplete their energy evenly. The average energy consumption in each rotation is abated.


### 2.2. Energy Centric Routing with Fuzzy-Heuristics

A fuzzy logic system plays a significant role in the selection of CH in sensor-enabled IOT environment. Gupta et al. introduced fuzzy logic approach to select CH nodes based on current energy level, the centrality of node, and density [38]. This approach is different from the traditional LEACH approach, as in this scheme the base station is simply accountable for the election of CH node and base station further processes the data using Mamdani type fuzzy inference system that provides output as a plunge to decide favorable node, applicable for CH. After this stage, all the operations are similar to LEACH. CHEF is proposed as a new CH selection scheme that observes the residual energy and local distance as parameters [39]. The local information about the node is gathered from neighboring nodes. This mechanism is localized within a cluster. The base station does not gather information or select CH. LEACH and CHEF share a common set-up phase. CHEF works in residual energy and local distance. Another protocol came which is an improvised version of traditional LEACH names as LEACH-FL (low energy adaptive clustering hierarchy protocol based on fuzzy logic) [40]. It analyses three parameters as fuzzy variables such as node density, energy level, and distance to base station. The base station collects data and applies Mamdani type fuzzy inference system to make decision for CH. Here, expected residual energy and actual residual energy are used to determine the chance of being a CH. This approach is also similar LEACH. The nodes which have extra residual energy along with expected residual energy have high chance of becoming a CH node. For energy prediction technique with fuzzy logic for homogeneous WSN, LEACH-ERE is introduced by Lee and Cheng [41]. This approach presents a concept considering the distance to the base station, concretion of node leads to bumpy energy utilization over a network. The fuzzy logic-based clustering algorithms for wireless sensor networks are presented in papers [42–46]. In this approach [42, 43], the base station is not static and aggregated data is not transmitted to mobile station. This scheme proposed a super CH (SCH), which forwards data to the base station. This approach also makes use of probabilistic model in each CH selection round. Hence, CH is selected through Mamdani type fuzzy inference system. Three main fuzzy descriptors such as residual energy, mobility, and centrality are used for making a decision on CH selection. The node with the highest value of summation of centrality and battery power will get a chance to be CH. The centrality varies upon mobility if the base station, therefore, fuzzy labels are as additives. The node with a greater probability of becoming a CH will become a super CH. The super CH decreases the transmission value and hence decreases the node dead time, as the number of rounds increases and improves the network survivability. In [43], the improved LEACH has been proposed to enhance the network lifetime and reduce packet loss for mobility-oriented services for WNS. In [44], authors have proposed to enhance clustering hierarchy (ECH) method to improve the energy efficiency using the sleep-wake up duty cycling approach for the sensors which sensed redundant data due to coverage overlapping. In [45], authors have suggested a cluster head selection method using fuzzy logic aiming at energy saving of the sensors to improve the WSN lifetime.Nayak et al. exhibit the importance of IoT in WSN [46]. All the applications of IoT use different energy-efficient model for enabling various services. The WSN-based environment works in two stages, one is to establish cluster-based model for service followed by designing an energy aware model. This scenario is not performance effective for IoT-enabled environment because IoT devices are considered dynamic in nature. Therefore, it is high time to improvise the algorithms and emphasize fuzzy-based technique with an adaptive neural network that can adapt to a dynamic network as well. An analytical hierarchy process with a fuzzy-based energy management system is proposed for industrial equipment management that displays as an exposer of numerous case studies [47]. A fuzzy-based vehicular physical system is also observed that combines fuzzy and Markov chain for optimizing location-oriented channel access delay. To measure the channel density, two parameters such as signal to inference ratio and channel access delay are used [48]. Qitu et al. also proposed an IoV enabled set-up for communication using fuzzy logic. Here, the velocity of the vehicle, vehicle nearly nodes, and height of antenna are taken as parameters for selection of CH. In this approach, an optimal number of CHs is elected to bridge the communication and enhances the overall throughput [49, 50]. A genetic-based virtualization technique is proposed to tackle the torrent delay and reduce the energy utilization [51]. Kaiwartya et al. [52] developed similar approach for agriculture purposes which works on seven metrics to quantify the quantity measurement of sensor nodes. INDRIYA is a testbed experiment that is used to examine the effectiveness of this algorithm.The abovementioned approaches are fuzzy logic-based approaches which show promising results for load balancing and energy conservation but these are not suitable for weight fuzzy descriptor to adapt to the environment. In real-time applications where input-output pair changed with the environment, such approaches are not suitable [53]. Therefore, the purpose of introducing a novel energy-efficient routing using fuzzy neural network in WSN is to address the issue of the leaning rate of membership function, reducing energy consumption, and improving the survivability of the sensor networks. The routing approach has potential newer areas of applications including E-mobility route planning [54] and information sharing in traffic environment [55].


## 2.1. Energy Centric Routing without Heuristics

The first hierarchical clustering algorithm is LEACH (low energy adaptive clustering hierarchy) which supports two stages for each clustering round [34]. One deals with cluster head (CH) selection and with cluster formation in a network. Another stage deals with data transmission to CH. When a cluster is formed, all the sensor nodes are assigned with some probability through a probabilistic model to elect CH. A predefined threshold value is defined which plays an important role in electing CH. An arbitrary value between 0-1 is generated for every sensor node which is further compared to the threshold value for electing CH in a particular round. To avoid intercluster interface, each CH floats a message using CSMA. Now the sensor nodes are able to make the decision regarding the data transmission that to which CH they wish to connect. After this, CH piles up data from its member nodes and claims data aggregation technique to lessen data redundancy and forward the filtered data to the intended base station. This is how the LEACH algorithm takes fair decisions for CH selection, and each node gets equal opportunity to become a CH [35]. But the critical concern with the LEACH algorithm is that the energy consumption of the nodes is not considered which is our prime concern. Moreover, LEACH does not look after the asymmetric classification of clusters in networks, and multihop data transmission is also not allowed. Therefore, to overcome the mentioned issues of LEACH, hybrid energy efficiency distribution (HEED) is introduced [36]. This algorithm also supports a probabilistic model for CH selection where the probabilistic is increased twice in between the rotations. But this algorithm (HEED) has its own issues. In HEED, few sensor nodes are exempted for the selection of CH, and few nodes are not even a part of any cluster and are freely available. To focus on the conservation of energy, a power-efficient gathering in sensor information systems (PEGASIS) is launched that uses greedy. In PEGASIS, every node acquires data from its near node and forwards it to another neighbor node, and fused [37]. The fused data is transmitted to the base station from a specified node. After a specified time slot, random nodes are selected for the designated role. Hence, all the nodes participate equally and deplete their energy evenly. The average energy consumption in each rotation is abated.


## 2.2. Energy Centric Routing with Fuzzy-Heuristics

A fuzzy logic system plays a significant role in the selection of CH in sensor-enabled IOT environment. Gupta et al. introduced fuzzy logic approach to select CH nodes based on current energy level, the centrality of node, and density [38]. This approach is different from the traditional LEACH approach, as in this scheme the base station is simply accountable for the election of CH node and base station further processes the data using Mamdani type fuzzy inference system that provides output as a plunge to decide favorable node, applicable for CH. After this stage, all the operations are similar to LEACH. CHEF is proposed as a new CH selection scheme that observes the residual energy and local distance as parameters [39]. The local information about the node is gathered from neighboring nodes. This mechanism is localized within a cluster. The base station does not gather information or select CH. LEACH and CHEF share a common set-up phase. CHEF works in residual energy and local distance. Another protocol came which is an improvised version of traditional LEACH names as LEACH-FL (low energy adaptive clustering hierarchy protocol based on fuzzy logic) [40]. It analyses three parameters as fuzzy variables such as node density, energy level, and distance to base station. The base station collects data and applies Mamdani type fuzzy inference system to make decision for CH. Here, expected residual energy and actual residual energy are used to determine the chance of being a CH. This approach is also similar LEACH. The nodes which have extra residual energy along with expected residual energy have high chance of becoming a CH node. For energy prediction technique with fuzzy logic for homogeneous WSN, LEACH-ERE is introduced by Lee and Cheng [41]. This approach presents a concept considering the distance to the base station, concretion of node leads to bumpy energy utilization over a network. The fuzzy logic-based clustering algorithms for wireless sensor networks are presented in papers [42–46]. In this approach [42, 43], the base station is not static and aggregated data is not transmitted to mobile station. This scheme proposed a super CH (SCH), which forwards data to the base station. This approach also makes use of probabilistic model in each CH selection round. Hence, CH is selected through Mamdani type fuzzy inference system. Three main fuzzy descriptors such as residual energy, mobility, and centrality are used for making a decision on CH selection. The node with the highest value of summation of centrality and battery power will get a chance to be CH. The centrality varies upon mobility if the base station, therefore, fuzzy labels are as additives. The node with a greater probability of becoming a CH will become a super CH. The super CH decreases the transmission value and hence decreases the node dead time, as the number of rounds increases and improves the network survivability. In [43], the improved LEACH has been proposed to enhance the network lifetime and reduce packet loss for mobility-oriented services for WNS. In [44], authors have proposed to enhance clustering hierarchy (ECH) method to improve the energy efficiency using the sleep-wake up duty cycling approach for the sensors which sensed redundant data due to coverage overlapping. In [45], authors have suggested a cluster head selection method using fuzzy logic aiming at energy saving of the sensors to improve the WSN lifetime.Nayak et al. exhibit the importance of IoT in WSN [46]. All the applications of IoT use different energy-efficient model for enabling various services. The WSN-based environment works in two stages, one is to establish cluster-based model for service followed by designing an energy aware model. This scenario is not performance effective for IoT-enabled environment because IoT devices are considered dynamic in nature. Therefore, it is high time to improvise the algorithms and emphasize fuzzy-based technique with an adaptive neural network that can adapt to a dynamic network as well. An analytical hierarchy process with a fuzzy-based energy management system is proposed for industrial equipment management that displays as an exposer of numerous case studies [47]. A fuzzy-based vehicular physical system is also observed that combines fuzzy and Markov chain for optimizing location-oriented channel access delay. To measure the channel density, two parameters such as signal to inference ratio and channel access delay are used [48]. Qitu et al. also proposed an IoV enabled set-up for communication using fuzzy logic. Here, the velocity of the vehicle, vehicle nearly nodes, and height of antenna are taken as parameters for selection of CH. In this approach, an optimal number of CHs is elected to bridge the communication and enhances the overall throughput [49, 50]. A genetic-based virtualization technique is proposed to tackle the torrent delay and reduce the energy utilization [51]. Kaiwartya et al. [52] developed similar approach for agriculture purposes which works on seven metrics to quantify the quantity measurement of sensor nodes. INDRIYA is a testbed experiment that is used to examine the effectiveness of this algorithm.The abovementioned approaches are fuzzy logic-based approaches which show promising results for load balancing and energy conservation but these are not suitable for weight fuzzy descriptor to adapt to the environment. In real-time applications where input-output pair changed with the environment, such approaches are not suitable [53]. Therefore, the purpose of introducing a novel energy-efficient routing using fuzzy neural network in WSN is to address the issue of the leaning rate of membership function, reducing energy consumption, and improving the survivability of the sensor networks. The routing approach has potential newer areas of applications including E-mobility route planning [54] and information sharing in traffic environment [55].


## 3. Energy-Efficient Routing Using Fuzzy Neural Network (ERFN)

In this section, the detail of the proposed ERFN is presented focusing on routing centric parameters. First, the network and energy model of WSN is discussed. Second, the routing centric parameters: residual energy, node degree, and forward distance towards sink are presented. We have concentrated in-depth on constructing the mathematical model of these routing parameters using a probabilistic modeling approach. Thus, the route forming approach by selecting a next hop at each step using a fuzzy neural network is presented.


### 3.1. Network and Energy Model

We consider that there areN sensors that are placed arbitrarily in network field to monitor the place and its physical features periodically. Each sensor has neighboring sensors, and it transmits data to one of the neighboring sensors. We assume immobile sensors with equal initial energy. The computation capabilities of each sensor are identical. Symmetric radio links are considered between any two neighboring sensors. The sink is located inside the network region. Let the maximum transmission of each sensor is R. Adaptive transmission is considered by using distance between any two neighboring sensors.The first order radio model to analyze the energy consumption of the proposed routing is discussed. Letm is the size of packet in bits. The energy is needed for transmitting a m bits of packet across d unit distance between a sender sensor and one of its neighboring sensor is expressed by
(1)ETXm,d=m∗Eelect+m∗εfsp∗d2ifd<do,m∗Eelect+m∗εmpf∗d4ifd≥do.To receive am bits of packet, the energy requirement is given by
(2)ERXm=m∗Eelect,where ESelect denotes statistics about the energy dissipate for transmitting electrons per bit. Several factors such as acceptable bit-rate, digital coding, and modulation affect the ESelect. The εfsp and εmpf represent the need of energy in the free-space path and multipath environment, respectively. When two neighboring sensors for which energy usage is calculated are separated with the distance less than or equal to lo(lo=Efsp/Emp), the radio model applies (1) otherwise (2) to calculate the energy need for transmitting the data.


### 3.2. Routing Metric Computation

#### 3.2.1. Degree Distribution of Sensor

The essential feature of a sensor in WSN is the degree of connectivity with neighboring sensors. A sensor with zero degrees cannot transmit data in the network. A sensor with higher degree is healthier against link failure, and it hikes the chances of the data transmission in the network. A neighboring sensor with a higher degree will be preferred for next hop selection. Here, we compute the degree distribution of a sensor. LetN number of sensors are placed in the network field. The degree of each sensor is the sum of N−1 independent random variables, which follows a binomial distribution. Let p is the probability of a link being present, and the α is representing a random variable of degree. The degree is distribution is given by
(3)Pα=k=N−1kpk1−pN−k−1.The quantityN−1k is the number of ways of choosing k link, out of the possible N−1 links, and pk1−pN−k−1 is the probability that the kselected links are present and the remaining N−k−1 are not.(1) Expected Degree. Since N is large, replacing N−1 by N does not cause much error. The expected degree of a sensor is given by
(4)Eα≈pN.For very smallp, the probability Pα−k tends to Poisson distribution and expressed as
(5)Pα=k≅N−1pkk!e−N−1p.The probability of at least node having one degree is defined as(6)Pα≥1≅=1−e−N−1p.Now the question is how to compute link probabilityp, for that we uniform sensor deployment over a network field of the area A. The P be influenced by the broadcasting region of each sensor. The region covered by each sensor is given by AB=πR2. Thus, the probability of a link being present is given by
(7)p=AB⋂AA≈πR2A.The expected degree of a sensor can be determined by substitutingp in (4) and is not counting the border sensors.


#### 3.2.2. Forward Progress

The proposed routing selects a next hop sensor from the neighboring sensors which lie in its forward search space. The forward search space is transmission region of a sensor which belongs to the direction of the sink (see Figure1, red shaded region). To minimize the unnecessary transmissions, here, we define a forwarding search space (FSS) as a region that is a half-circle towards sink as depicted in Figure 1. Now we calculate which neighboring sensor node njof a sensor ni lies in its FSS. Let a point nixi,yi represents that the sensor ni is located at a position xi,yi, another point njxj,yj denotes the position of the sensor nj (cf. Figure 1). The sink s is position at xs,ys, represented by a point sxs,ys. Equation of line passing through two point nixj,yj and sxs,ysis given by
(8)a1x+b1y+c1=0a1=yi−ysb1=xs−xic1=yixi−xs+xiys−yi.Figure 1
Forwarding search space.Find the projection of the pointnjxj,yj on the line given in eq. (8) to decide its progress towards sink. The projection of njxj,yj is an intersection point between the line given in eq. (8) and a perpendicular drawn from the point njxj,yj to the line (8). The equation of the perpendicular is given by
(9)a2x+b2y+c2=0a2=xi−xsb2=yi−ysc2=xjxs−xi+yjys−yi.The projectionPxp,yp of the point njxj,yj on the line given in eq. (8) is calculated as
(10)xp,yp=b1c2−b2c1a1b2−a2b1,a2c1−a1c2a1b2−a2b1.A sensornj is belonging to the FFSi of a sensor ni if the following inequality is satisfied.
(11)nj∈FSSiiff,(12)xi−xj2+yi−yj2<r2andxs−xp2+ys−yp2<xs−xi2+ys−yi2,whereris the radius of the circle that represents the transmission range of the sender sensor ni.(1) Forward Progress. It is defined as distance travel a packet from sensor ni to a sensor nj towards sink. It is calculated as the distance between the points nixi,yi and xp,yp. It is given by
(13)Fij=xi−xp2+yi−yp2.(2) Expected Forward Progress. To drive expected forward progress of a packet towards sink, let there are nh number of neighboring sensors are lying in the FSS of a sensor, which has data to send to the sink. Letdi is distances between the sensor and neighboring sensors, and each neighboring sensor is located at the angles θi from the sender to the destination. The forward progress of each neighboring towards destination is Xi where i=1,2⋯nh. To calculate the expected forward, the probability distribution of distance X need to be computed. The neighboring sensor lies anywhere in the range of 0 to r, and 0 to π/2 . Let the probability density function (pdf) fXθx,θ of the distance x and angle θis expressed by
(14)fXθx,θ=2xπr2,where 0≤x≤R, and 0≤θ≤π/2 . The pdf xcan be computed as
(15)fXx=∫0π22xπr2dθ=xr2.To maximize the forward progress for neighboring sensor, a farthest neighboring sensor from the sender sensor is preferred as relay for transmitting the packets. Since allxi are identical independent random variables, each with pdf fXx, the pdf of x is
(16)fXmx=nhFXxnhfXx=nhx2nh−1r2nh,where FXx is the cdf of x. The expected forward progress (EFP) of the Xm is
(17)EFP=EXm=∫0rxfXmxdx=nh2nh+1r.


#### 3.2.3. Residual Energy

The residual energy of each is remaining amount of energy after a transmission occurred. In this work, we prefer a neighboring sensor that acts as next hop which has the highest energy. A sensor with more energy lives longer. Let initial energy ofEi and after receiving and transmission of a packet of size m bits, the residual energy ER of a sensor can be given by
(18)ER=Ei−ETXm,r+ETRm.(1) Expected Energy Consumption. The expected energy consumption EEtotalm,r for transmitting of m bits data from a sensor to its next hop sensor using (11) can be expressed as
(19)EEtotalm,r=ETXm,r+ETRm=2eelect+eefpnh2nh+1r2m.


### 3.3. Single Metric Using Fuzzy Neural Network

Initially, in ERFN, all the routing centric metrics: residual energy, degree of a sensor, and forward progress towards sink are jointly assumed for the purpose of searching the next hop sensor from the FSS. LetNH is considered as a single metric for choosing a next hop from the FSS. The NH is determined by an adaptive neuro-fuzzy inference system (ANFIS). It is much superior than fuzzy logic inference system (FIS), attributable to in contrast to another ANN, ANFIS has higher functionality to follow situational’s changes in the learning practice and updates the weight of membership function of FIS and minimizes error rate in deciding the rules in fuzzy logic. Supervised learning is used in ANFIS for the learning process. The ANFIS employs the learning method of the Takagi-Sugeno fuzzy inference system [50]. The simple structural design of ANFIS with three input parameters residual energy (ER), sensor degree (α), forward progress (Fij), and one output single metric (NH) is shown in Figure 2. Each routing metric has a membership function agreeing to the Takagi-Sugeno fuzzy inference model, which consists of 27 rules. A five-layer architecture of ANFIS that consists of fuzzy layer, T-norm layer, normalized layer, de-fuzzy layer, and aggregated layer is presented in Figure 2. The first fuzzy layer (is called also called membership/antecedent layer) and fourth de-fuzzy layer (is also known as the consequent layer) are dynamic since they are modified agreeing to results achieved and the rest layers are static in nature.Figure 2
ANFIS for NH selection.We define the linguistic variables of the routing centric metrics asresidualenergyER=below,fair,high and is symbolized by {E1,E2,E3}, sensordegreeα=deficient,medium,compact that is represented by α1,α2,α3, forwardprogressFij=adjacent,midway,distant is dented as {F1,F2,F3}, and outputsinglemetricNH=weakest,weaker,weak,medium,strong,stronger,strongest as {H1,H2,H3,H4,H5,H6,H7}. The ANFIS consists of 27 if-then rules related to three linguistic variables of three input variables, and these rules are developed by inspiring from Takagi-Sugeno fuzzy inference system shown in Table 1. These rules can also be expressed asTable 1
Fuzzy rules.
RuleIf thenRuleIf thenERFijαNHERFijαNH1.E1F1α1H115.E2F2α3H42.E1F1α2H216.E2F3α1H13.E1F1α3H317.E2F3α2H24.E1F2α1H118.E2F3α3H25.E1F2α2H119.E3F1α1H56.E1F2α3H220.E3F1α2H67.E1F3α1H221.E3F1α3H78.E1F3α2H122.E3F2α1H49.E1F3α3H123.E3F2α2H510.E2F1α1H324.E3F2α3H611.E2F1α2H425.E3F3α1H512.E2F1α3H526.E3F3α2H713.E2F2α1H327.E3F3α3H714.E2F2α2H3Rule 1 = ifER isE1, Fij is F1, and α is α1, then H1=q1ER+r1Fij+s1α+t1.Rule 2 = ifER isE1, Fij is F1, and α is α2, then H2=q2ER+r2Fij+s2α+t2.Rule 27 = ifER isE3, Fij is F3, and α is α3, then H7=q27ER+r27Fij+s27α+t27.WhereE1, F1, and α1 are the values of the membership function of input parameters ER, Fij, and α in antecedent (If) part, the q1,r1,s1,andt1 denote linear parameters of consequent (then) part of Takagi-Sugeno model. The working process of ANFIS to produce a single metric output NH is defined by layer wise as follows.


#### 3.3.1. Fuzzy Layer

It includes a number of nodes which are shown by square in Figure2 and are dynamic in nature during backward pass. Every node in this layer contains a membership function which takes input as routing metrics and generates output as the degree of membership in the range 0 and 1. The triangular, trapezoidal, Gaussian, and generalized bell membership function can be used by nodes of this layer. This uses Gaussian (Eq. function). The membership function for adaptive node ER can be given by
(20)μEkER=exp−ER−zk2xk2.Similarly, the membership functionsμαkα and μFkFij for adaptive nodes α and Fij can be determined. Where xkand zk are Gaussian membership functions parameters, control the shape, and slop of the functions and k=1,2,3.


#### 3.3.2. T-Norm Layer

This layer consists of a number of nodes, each of them is static in nature, that are shown by circle labeled withπ (cf. Figure 2). At each node of this layer, the incoming signals (membership functions from layer 1) are multiplied to generate the output. The AND operator is used by each node in the T-norm layer to compute the antecedents/output as
(21)Tk=μEkER∗μαkα∗μFkFij,k=1,2,3.


#### 3.3.3. Normalized Layer

This contains the nodes which are nonadaptive in nature, which is also recognized as normalized node, shown by a circle labeled asN (cf. Figure 2). Each node computes the output by taking the ratio of the kth rule generated at T-norm layer to the summation of all rules produced by T-norm layer. The output at this layer can be given as
(22)Tnk=Tk∑kTk,k=1,2,3.


#### 3.3.4. Defuzzy Layer

This layer contains the nodes, which are adaptive in nature and are shown by square with labelR (cf. Figure 2). Each node produces the output as the product of normalized firing strength and out of individual rule. The output is given by
(23)TnkHk=TnkHk=TnkqkER+rkFij+skα+tk.


#### 3.3.5. Aggregated Output Layer

This layer contains a single nonadaptive node. The out at this node is estimated by taking the summation of all the incoming inputs to this layer [53]. The aggregated output is given by
(24)NH=∑kTnkHk=∑kTkHk∑kTk.We present Algorithm1. NH selection algorithm is using neuro-fuzzy to explain the working of ANFIS. The gradient descent and least mean square-assisted hybrid learning algorithm have been used to train the premise and consequent parameters in two passes, namely, forward pass and backward pass. The nodes of fuzzy and defuzzy layers are updated over time. In the forward pass, the fixed premise parameters {ER,Fij,α} are static and passed through fuzzy layer to defuzzy layer in the proposed Algorithm 1. The least mean square method is used to update these fixed premise parameters. After getting the fourth layer’s output which is termed ad consequent parameter, the actual output is analyzed with fourth layer’s output, and the error is noted. The prime aim is to minimize the error recursively. With the backward pass, this error is sent back to fuzzy layer and membership function of fixed premise parameters is updated by employing the gradient descent method simultaneously. One execution round of the hybrid learning process (including both forward pass and backward pass) is called epoch. The algorithm is executed till it converges (the error becomes infinitesimal small) or till the maximum number of epoch (Mepoch).Algorithm 1:NH selection algorithm using neuro-fuzzy (NHSN).
Input:ER,Fij,αand MepochProcess:(1)
for m =1 toMepoch(2)
Input the fixed premise {ER,Fij,α} to fuzzy layer of Takagi- Sugeno inference engine(3)
Fuzzy layer producesμEkER, μαkα and μFkFij for each node according to Eq. (19).(4)
Tune the firing strengthTk of each node using Eq. (21)(5)
Computes the firing strengthTnk of each node using Eq. (22).(6)
Performs defuzzification the consequent parameter of each node using Eq. (23).(7)
Computes the aggregated outputNH using Eq. (24).(8)
Output:NH


#### 3.3.6. Neuro-Fuzzy Routing Approach

The proposed neuro computes the aggregated output routing in which each sensor selects a next hop to forward the data packets. In this routing, packets are sent to sink via different routes. For each packet, a new route might be constructed which reduces energy utilization of all sensors in the WSN. The neuro-fuzzy routing approach contains three phases: neighbor discovery, metric calculation, and next hop selection using NHSN. Each sensor executes the routing algorithm to search next hop till the sink is reached. The routing algorithm is given as Algorithm2.
(i)
Neighbor Discovery. Each sensor ni broadcasts HELLO packets comprising its location information in its vicinity. Each sensors nj, which gets this HELLO packet, answer with “ECHO” packets with its position information. On the reception of these ECHO packets, each sensor constructs its neighbor list. The only sensors which lies in the respective FSS will be added to the list(ii)
Metric Calculation. The sensor ni calculates forward progress for each sensor nj∈FSSi. Each sensor nj∈FSSi sends containing its residual energy and degree information to the sender sensor ni. The sensor ni estimates NHij fusing Algorithm 1 or all the sensors nj∈FSSi(iii)
Next Hop Selection. For the NH selection, the only sensors lie in FSS of the sender sensor contributes in the selection process. The sensor ni appoints a sensor as NH which has the highest NHij value. This NH is used to forward the packet to the next NH until the packet reaches to the sinkAlgorithm 2: Neuro-fuzzy routing (FNA) algorithm.
1. Neighbor discovery:I. Each sensorni∈N advertises HELLO packet to discover all neighbors njII. for each neighbor njof nidoIII. Sensornj obtains its position information xj,yj using any localization techniquesIV.If point xj,yj satisfies Eq. (11) thenV. Addnj to FFSiVI.end ifVII.end for2. Metric calculation:I.for each sensor nj∈FSSidoII. Sensorni computes Fij using Eq. (13)III.ni gets ER,Fij,αIV. Sensorni computes NH for nj using NHSNend for3. Next Hop selection:I. NHnj =argmax(NHij), nj∈FSSiII. Sensorni sends data packet to the NH nj


#### 3.3.7. Time Complexity Analysis of NHSN and FNA Algorithms

NHSN algorithm uses the ANFIS algorithm which combines the fuzzy algorithm and neural network. When Algorithm1 was supplied a number of inputs, to obtain the optimum values of the parameters, it is updating the weights of the parameter continuously. The proposed rules used to modify the weight were dominant in the complexity of the algorithm. The time required to run the ANFIS algorithm depends on the number of inputs (k). The asymptotic time complexity of the algorithm is Ok.In the FNA algorithm, the neighbor discovery phase and the running of time of this phase takeOnm where n is the number of sensors in a route and m is the average number of neighbor sensors. The metric calculation needs the running time Om+k. The next hop selection phase takes the time of Om. Thus The asymptotic time complexity of the Algorithm 2 is Onm+k.


## 3.1. Network and Energy Model

We consider that there areN sensors that are placed arbitrarily in network field to monitor the place and its physical features periodically. Each sensor has neighboring sensors, and it transmits data to one of the neighboring sensors. We assume immobile sensors with equal initial energy. The computation capabilities of each sensor are identical. Symmetric radio links are considered between any two neighboring sensors. The sink is located inside the network region. Let the maximum transmission of each sensor is R. Adaptive transmission is considered by using distance between any two neighboring sensors.The first order radio model to analyze the energy consumption of the proposed routing is discussed. Letm is the size of packet in bits. The energy is needed for transmitting a m bits of packet across d unit distance between a sender sensor and one of its neighboring sensor is expressed by
(1)ETXm,d=m∗Eelect+m∗εfsp∗d2ifd<do,m∗Eelect+m∗εmpf∗d4ifd≥do.To receive am bits of packet, the energy requirement is given by
(2)ERXm=m∗Eelect,where ESelect denotes statistics about the energy dissipate for transmitting electrons per bit. Several factors such as acceptable bit-rate, digital coding, and modulation affect the ESelect. The εfsp and εmpf represent the need of energy in the free-space path and multipath environment, respectively. When two neighboring sensors for which energy usage is calculated are separated with the distance less than or equal to lo(lo=Efsp/Emp), the radio model applies (1) otherwise (2) to calculate the energy need for transmitting the data.


## 3.2. Routing Metric Computation

### 3.2.1. Degree Distribution of Sensor

The essential feature of a sensor in WSN is the degree of connectivity with neighboring sensors. A sensor with zero degrees cannot transmit data in the network. A sensor with higher degree is healthier against link failure, and it hikes the chances of the data transmission in the network. A neighboring sensor with a higher degree will be preferred for next hop selection. Here, we compute the degree distribution of a sensor. LetN number of sensors are placed in the network field. The degree of each sensor is the sum of N−1 independent random variables, which follows a binomial distribution. Let p is the probability of a link being present, and the α is representing a random variable of degree. The degree is distribution is given by
(3)Pα=k=N−1kpk1−pN−k−1.The quantityN−1k is the number of ways of choosing k link, out of the possible N−1 links, and pk1−pN−k−1 is the probability that the kselected links are present and the remaining N−k−1 are not.(1) Expected Degree. Since N is large, replacing N−1 by N does not cause much error. The expected degree of a sensor is given by
(4)Eα≈pN.For very smallp, the probability Pα−k tends to Poisson distribution and expressed as
(5)Pα=k≅N−1pkk!e−N−1p.The probability of at least node having one degree is defined as(6)Pα≥1≅=1−e−N−1p.Now the question is how to compute link probabilityp, for that we uniform sensor deployment over a network field of the area A. The P be influenced by the broadcasting region of each sensor. The region covered by each sensor is given by AB=πR2. Thus, the probability of a link being present is given by
(7)p=AB⋂AA≈πR2A.The expected degree of a sensor can be determined by substitutingp in (4) and is not counting the border sensors.


### 3.2.2. Forward Progress

The proposed routing selects a next hop sensor from the neighboring sensors which lie in its forward search space. The forward search space is transmission region of a sensor which belongs to the direction of the sink (see Figure1, red shaded region). To minimize the unnecessary transmissions, here, we define a forwarding search space (FSS) as a region that is a half-circle towards sink as depicted in Figure 1. Now we calculate which neighboring sensor node njof a sensor ni lies in its FSS. Let a point nixi,yi represents that the sensor ni is located at a position xi,yi, another point njxj,yj denotes the position of the sensor nj (cf. Figure 1). The sink s is position at xs,ys, represented by a point sxs,ys. Equation of line passing through two point nixj,yj and sxs,ysis given by
(8)a1x+b1y+c1=0a1=yi−ysb1=xs−xic1=yixi−xs+xiys−yi.Figure 1
Forwarding search space.Find the projection of the pointnjxj,yj on the line given in eq. (8) to decide its progress towards sink. The projection of njxj,yj is an intersection point between the line given in eq. (8) and a perpendicular drawn from the point njxj,yj to the line (8). The equation of the perpendicular is given by
(9)a2x+b2y+c2=0a2=xi−xsb2=yi−ysc2=xjxs−xi+yjys−yi.The projectionPxp,yp of the point njxj,yj on the line given in eq. (8) is calculated as
(10)xp,yp=b1c2−b2c1a1b2−a2b1,a2c1−a1c2a1b2−a2b1.A sensornj is belonging to the FFSi of a sensor ni if the following inequality is satisfied.
(11)nj∈FSSiiff,(12)xi−xj2+yi−yj2<r2andxs−xp2+ys−yp2<xs−xi2+ys−yi2,whereris the radius of the circle that represents the transmission range of the sender sensor ni.(1) Forward Progress. It is defined as distance travel a packet from sensor ni to a sensor nj towards sink. It is calculated as the distance between the points nixi,yi and xp,yp. It is given by
(13)Fij=xi−xp2+yi−yp2.(2) Expected Forward Progress. To drive expected forward progress of a packet towards sink, let there are nh number of neighboring sensors are lying in the FSS of a sensor, which has data to send to the sink. Letdi is distances between the sensor and neighboring sensors, and each neighboring sensor is located at the angles θi from the sender to the destination. The forward progress of each neighboring towards destination is Xi where i=1,2⋯nh. To calculate the expected forward, the probability distribution of distance X need to be computed. The neighboring sensor lies anywhere in the range of 0 to r, and 0 to π/2 . Let the probability density function (pdf) fXθx,θ of the distance x and angle θis expressed by
(14)fXθx,θ=2xπr2,where 0≤x≤R, and 0≤θ≤π/2 . The pdf xcan be computed as
(15)fXx=∫0π22xπr2dθ=xr2.To maximize the forward progress for neighboring sensor, a farthest neighboring sensor from the sender sensor is preferred as relay for transmitting the packets. Since allxi are identical independent random variables, each with pdf fXx, the pdf of x is
(16)fXmx=nhFXxnhfXx=nhx2nh−1r2nh,where FXx is the cdf of x. The expected forward progress (EFP) of the Xm is
(17)EFP=EXm=∫0rxfXmxdx=nh2nh+1r.


### 3.2.3. Residual Energy

The residual energy of each is remaining amount of energy after a transmission occurred. In this work, we prefer a neighboring sensor that acts as next hop which has the highest energy. A sensor with more energy lives longer. Let initial energy ofEi and after receiving and transmission of a packet of size m bits, the residual energy ER of a sensor can be given by
(18)ER=Ei−ETXm,r+ETRm.(1) Expected Energy Consumption. The expected energy consumption EEtotalm,r for transmitting of m bits data from a sensor to its next hop sensor using (11) can be expressed as
(19)EEtotalm,r=ETXm,r+ETRm=2eelect+eefpnh2nh+1r2m.


## 3.2.1. Degree Distribution of Sensor

The essential feature of a sensor in WSN is the degree of connectivity with neighboring sensors. A sensor with zero degrees cannot transmit data in the network. A sensor with higher degree is healthier against link failure, and it hikes the chances of the data transmission in the network. A neighboring sensor with a higher degree will be preferred for next hop selection. Here, we compute the degree distribution of a sensor. LetN number of sensors are placed in the network field. The degree of each sensor is the sum of N−1 independent random variables, which follows a binomial distribution. Let p is the probability of a link being present, and the α is representing a random variable of degree. The degree is distribution is given by
(3)Pα=k=N−1kpk1−pN−k−1.The quantityN−1k is the number of ways of choosing k link, out of the possible N−1 links, and pk1−pN−k−1 is the probability that the kselected links are present and the remaining N−k−1 are not.(1) Expected Degree. Since N is large, replacing N−1 by N does not cause much error. The expected degree of a sensor is given by
(4)Eα≈pN.For very smallp, the probability Pα−k tends to Poisson distribution and expressed as
(5)Pα=k≅N−1pkk!e−N−1p.The probability of at least node having one degree is defined as(6)Pα≥1≅=1−e−N−1p.Now the question is how to compute link probabilityp, for that we uniform sensor deployment over a network field of the area A. The P be influenced by the broadcasting region of each sensor. The region covered by each sensor is given by AB=πR2. Thus, the probability of a link being present is given by
(7)p=AB⋂AA≈πR2A.The expected degree of a sensor can be determined by substitutingp in (4) and is not counting the border sensors.


## 3.2.2. Forward Progress

The proposed routing selects a next hop sensor from the neighboring sensors which lie in its forward search space. The forward search space is transmission region of a sensor which belongs to the direction of the sink (see Figure1, red shaded region). To minimize the unnecessary transmissions, here, we define a forwarding search space (FSS) as a region that is a half-circle towards sink as depicted in Figure 1. Now we calculate which neighboring sensor node njof a sensor ni lies in its FSS. Let a point nixi,yi represents that the sensor ni is located at a position xi,yi, another point njxj,yj denotes the position of the sensor nj (cf. Figure 1). The sink s is position at xs,ys, represented by a point sxs,ys. Equation of line passing through two point nixj,yj and sxs,ysis given by
(8)a1x+b1y+c1=0a1=yi−ysb1=xs−xic1=yixi−xs+xiys−yi.Figure 1
Forwarding search space.Find the projection of the pointnjxj,yj on the line given in eq. (8) to decide its progress towards sink. The projection of njxj,yj is an intersection point between the line given in eq. (8) and a perpendicular drawn from the point njxj,yj to the line (8). The equation of the perpendicular is given by
(9)a2x+b2y+c2=0a2=xi−xsb2=yi−ysc2=xjxs−xi+yjys−yi.The projectionPxp,yp of the point njxj,yj on the line given in eq. (8) is calculated as
(10)xp,yp=b1c2−b2c1a1b2−a2b1,a2c1−a1c2a1b2−a2b1.A sensornj is belonging to the FFSi of a sensor ni if the following inequality is satisfied.
(11)nj∈FSSiiff,(12)xi−xj2+yi−yj2<r2andxs−xp2+ys−yp2<xs−xi2+ys−yi2,whereris the radius of the circle that represents the transmission range of the sender sensor ni.(1) Forward Progress. It is defined as distance travel a packet from sensor ni to a sensor nj towards sink. It is calculated as the distance between the points nixi,yi and xp,yp. It is given by
(13)Fij=xi−xp2+yi−yp2.(2) Expected Forward Progress. To drive expected forward progress of a packet towards sink, let there are nh number of neighboring sensors are lying in the FSS of a sensor, which has data to send to the sink. Letdi is distances between the sensor and neighboring sensors, and each neighboring sensor is located at the angles θi from the sender to the destination. The forward progress of each neighboring towards destination is Xi where i=1,2⋯nh. To calculate the expected forward, the probability distribution of distance X need to be computed. The neighboring sensor lies anywhere in the range of 0 to r, and 0 to π/2 . Let the probability density function (pdf) fXθx,θ of the distance x and angle θis expressed by
(14)fXθx,θ=2xπr2,where 0≤x≤R, and 0≤θ≤π/2 . The pdf xcan be computed as
(15)fXx=∫0π22xπr2dθ=xr2.To maximize the forward progress for neighboring sensor, a farthest neighboring sensor from the sender sensor is preferred as relay for transmitting the packets. Since allxi are identical independent random variables, each with pdf fXx, the pdf of x is
(16)fXmx=nhFXxnhfXx=nhx2nh−1r2nh,where FXx is the cdf of x. The expected forward progress (EFP) of the Xm is
(17)EFP=EXm=∫0rxfXmxdx=nh2nh+1r.


## 3.2.3. Residual Energy

The residual energy of each is remaining amount of energy after a transmission occurred. In this work, we prefer a neighboring sensor that acts as next hop which has the highest energy. A sensor with more energy lives longer. Let initial energy ofEi and after receiving and transmission of a packet of size m bits, the residual energy ER of a sensor can be given by
(18)ER=Ei−ETXm,r+ETRm.(1) Expected Energy Consumption. The expected energy consumption EEtotalm,r for transmitting of m bits data from a sensor to its next hop sensor using (11) can be expressed as
(19)EEtotalm,r=ETXm,r+ETRm=2eelect+eefpnh2nh+1r2m.


## 3.3. Single Metric Using Fuzzy Neural Network

Initially, in ERFN, all the routing centric metrics: residual energy, degree of a sensor, and forward progress towards sink are jointly assumed for the purpose of searching the next hop sensor from the FSS. LetNH is considered as a single metric for choosing a next hop from the FSS. The NH is determined by an adaptive neuro-fuzzy inference system (ANFIS). It is much superior than fuzzy logic inference system (FIS), attributable to in contrast to another ANN, ANFIS has higher functionality to follow situational’s changes in the learning practice and updates the weight of membership function of FIS and minimizes error rate in deciding the rules in fuzzy logic. Supervised learning is used in ANFIS for the learning process. The ANFIS employs the learning method of the Takagi-Sugeno fuzzy inference system [50]. The simple structural design of ANFIS with three input parameters residual energy (ER), sensor degree (α), forward progress (Fij), and one output single metric (NH) is shown in Figure 2. Each routing metric has a membership function agreeing to the Takagi-Sugeno fuzzy inference model, which consists of 27 rules. A five-layer architecture of ANFIS that consists of fuzzy layer, T-norm layer, normalized layer, de-fuzzy layer, and aggregated layer is presented in Figure 2. The first fuzzy layer (is called also called membership/antecedent layer) and fourth de-fuzzy layer (is also known as the consequent layer) are dynamic since they are modified agreeing to results achieved and the rest layers are static in nature.Figure 2
ANFIS for NH selection.We define the linguistic variables of the routing centric metrics asresidualenergyER=below,fair,high and is symbolized by {E1,E2,E3}, sensordegreeα=deficient,medium,compact that is represented by α1,α2,α3, forwardprogressFij=adjacent,midway,distant is dented as {F1,F2,F3}, and outputsinglemetricNH=weakest,weaker,weak,medium,strong,stronger,strongest as {H1,H2,H3,H4,H5,H6,H7}. The ANFIS consists of 27 if-then rules related to three linguistic variables of three input variables, and these rules are developed by inspiring from Takagi-Sugeno fuzzy inference system shown in Table 1. These rules can also be expressed asTable 1
Fuzzy rules.
RuleIf thenRuleIf thenERFijαNHERFijαNH1.E1F1α1H115.E2F2α3H42.E1F1α2H216.E2F3α1H13.E1F1α3H317.E2F3α2H24.E1F2α1H118.E2F3α3H25.E1F2α2H119.E3F1α1H56.E1F2α3H220.E3F1α2H67.E1F3α1H221.E3F1α3H78.E1F3α2H122.E3F2α1H49.E1F3α3H123.E3F2α2H510.E2F1α1H324.E3F2α3H611.E2F1α2H425.E3F3α1H512.E2F1α3H526.E3F3α2H713.E2F2α1H327.E3F3α3H714.E2F2α2H3Rule 1 = ifER isE1, Fij is F1, and α is α1, then H1=q1ER+r1Fij+s1α+t1.Rule 2 = ifER isE1, Fij is F1, and α is α2, then H2=q2ER+r2Fij+s2α+t2.Rule 27 = ifER isE3, Fij is F3, and α is α3, then H7=q27ER+r27Fij+s27α+t27.WhereE1, F1, and α1 are the values of the membership function of input parameters ER, Fij, and α in antecedent (If) part, the q1,r1,s1,andt1 denote linear parameters of consequent (then) part of Takagi-Sugeno model. The working process of ANFIS to produce a single metric output NH is defined by layer wise as follows.


### 3.3.1. Fuzzy Layer

It includes a number of nodes which are shown by square in Figure2 and are dynamic in nature during backward pass. Every node in this layer contains a membership function which takes input as routing metrics and generates output as the degree of membership in the range 0 and 1. The triangular, trapezoidal, Gaussian, and generalized bell membership function can be used by nodes of this layer. This uses Gaussian (Eq. function). The membership function for adaptive node ER can be given by
(20)μEkER=exp−ER−zk2xk2.Similarly, the membership functionsμαkα and μFkFij for adaptive nodes α and Fij can be determined. Where xkand zk are Gaussian membership functions parameters, control the shape, and slop of the functions and k=1,2,3.


### 3.3.2. T-Norm Layer

This layer consists of a number of nodes, each of them is static in nature, that are shown by circle labeled withπ (cf. Figure 2). At each node of this layer, the incoming signals (membership functions from layer 1) are multiplied to generate the output. The AND operator is used by each node in the T-norm layer to compute the antecedents/output as
(21)Tk=μEkER∗μαkα∗μFkFij,k=1,2,3.


### 3.3.3. Normalized Layer

This contains the nodes which are nonadaptive in nature, which is also recognized as normalized node, shown by a circle labeled asN (cf. Figure 2). Each node computes the output by taking the ratio of the kth rule generated at T-norm layer to the summation of all rules produced by T-norm layer. The output at this layer can be given as
(22)Tnk=Tk∑kTk,k=1,2,3.


### 3.3.4. Defuzzy Layer

This layer contains the nodes, which are adaptive in nature and are shown by square with labelR (cf. Figure 2). Each node produces the output as the product of normalized firing strength and out of individual rule. The output is given by
(23)TnkHk=TnkHk=TnkqkER+rkFij+skα+tk.


### 3.3.5. Aggregated Output Layer

This layer contains a single nonadaptive node. The out at this node is estimated by taking the summation of all the incoming inputs to this layer [53]. The aggregated output is given by
(24)NH=∑kTnkHk=∑kTkHk∑kTk.We present Algorithm1. NH selection algorithm is using neuro-fuzzy to explain the working of ANFIS. The gradient descent and least mean square-assisted hybrid learning algorithm have been used to train the premise and consequent parameters in two passes, namely, forward pass and backward pass. The nodes of fuzzy and defuzzy layers are updated over time. In the forward pass, the fixed premise parameters {ER,Fij,α} are static and passed through fuzzy layer to defuzzy layer in the proposed Algorithm 1. The least mean square method is used to update these fixed premise parameters. After getting the fourth layer’s output which is termed ad consequent parameter, the actual output is analyzed with fourth layer’s output, and the error is noted. The prime aim is to minimize the error recursively. With the backward pass, this error is sent back to fuzzy layer and membership function of fixed premise parameters is updated by employing the gradient descent method simultaneously. One execution round of the hybrid learning process (including both forward pass and backward pass) is called epoch. The algorithm is executed till it converges (the error becomes infinitesimal small) or till the maximum number of epoch (Mepoch).Algorithm 1:NH selection algorithm using neuro-fuzzy (NHSN).
Input:ER,Fij,αand MepochProcess:(1)
for m =1 toMepoch(2)
Input the fixed premise {ER,Fij,α} to fuzzy layer of Takagi- Sugeno inference engine(3)
Fuzzy layer producesμEkER, μαkα and μFkFij for each node according to Eq. (19).(4)
Tune the firing strengthTk of each node using Eq. (21)(5)
Computes the firing strengthTnk of each node using Eq. (22).(6)
Performs defuzzification the consequent parameter of each node using Eq. (23).(7)
Computes the aggregated outputNH using Eq. (24).(8)
Output:NH


### 3.3.6. Neuro-Fuzzy Routing Approach

The proposed neuro computes the aggregated output routing in which each sensor selects a next hop to forward the data packets. In this routing, packets are sent to sink via different routes. For each packet, a new route might be constructed which reduces energy utilization of all sensors in the WSN. The neuro-fuzzy routing approach contains three phases: neighbor discovery, metric calculation, and next hop selection using NHSN. Each sensor executes the routing algorithm to search next hop till the sink is reached. The routing algorithm is given as Algorithm2.
(i)
Neighbor Discovery. Each sensor ni broadcasts HELLO packets comprising its location information in its vicinity. Each sensors nj, which gets this HELLO packet, answer with “ECHO” packets with its position information. On the reception of these ECHO packets, each sensor constructs its neighbor list. The only sensors which lies in the respective FSS will be added to the list(ii)
Metric Calculation. The sensor ni calculates forward progress for each sensor nj∈FSSi. Each sensor nj∈FSSi sends containing its residual energy and degree information to the sender sensor ni. The sensor ni estimates NHij fusing Algorithm 1 or all the sensors nj∈FSSi(iii)
Next Hop Selection. For the NH selection, the only sensors lie in FSS of the sender sensor contributes in the selection process. The sensor ni appoints a sensor as NH which has the highest NHij value. This NH is used to forward the packet to the next NH until the packet reaches to the sinkAlgorithm 2: Neuro-fuzzy routing (FNA) algorithm.
1. Neighbor discovery:I. Each sensorni∈N advertises HELLO packet to discover all neighbors njII. for each neighbor njof nidoIII. Sensornj obtains its position information xj,yj using any localization techniquesIV.If point xj,yj satisfies Eq. (11) thenV. Addnj to FFSiVI.end ifVII.end for2. Metric calculation:I.for each sensor nj∈FSSidoII. Sensorni computes Fij using Eq. (13)III.ni gets ER,Fij,αIV. Sensorni computes NH for nj using NHSNend for3. Next Hop selection:I. NHnj =argmax(NHij), nj∈FSSiII. Sensorni sends data packet to the NH nj


### 3.3.7. Time Complexity Analysis of NHSN and FNA Algorithms

NHSN algorithm uses the ANFIS algorithm which combines the fuzzy algorithm and neural network. When Algorithm1 was supplied a number of inputs, to obtain the optimum values of the parameters, it is updating the weights of the parameter continuously. The proposed rules used to modify the weight were dominant in the complexity of the algorithm. The time required to run the ANFIS algorithm depends on the number of inputs (k). The asymptotic time complexity of the algorithm is Ok.In the FNA algorithm, the neighbor discovery phase and the running of time of this phase takeOnm where n is the number of sensors in a route and m is the average number of neighbor sensors. The metric calculation needs the running time Om+k. The next hop selection phase takes the time of Om. Thus The asymptotic time complexity of the Algorithm 2 is Onm+k.


## 3.3.1. Fuzzy Layer

It includes a number of nodes which are shown by square in Figure2 and are dynamic in nature during backward pass. Every node in this layer contains a membership function which takes input as routing metrics and generates output as the degree of membership in the range 0 and 1. The triangular, trapezoidal, Gaussian, and generalized bell membership function can be used by nodes of this layer. This uses Gaussian (Eq. function). The membership function for adaptive node ER can be given by
(20)μEkER=exp−ER−zk2xk2.Similarly, the membership functionsμαkα and μFkFij for adaptive nodes α and Fij can be determined. Where xkand zk are Gaussian membership functions parameters, control the shape, and slop of the functions and k=1,2,3.


## 3.3.2. T-Norm Layer

This layer consists of a number of nodes, each of them is static in nature, that are shown by circle labeled withπ (cf. Figure 2). At each node of this layer, the incoming signals (membership functions from layer 1) are multiplied to generate the output. The AND operator is used by each node in the T-norm layer to compute the antecedents/output as
(21)Tk=μEkER∗μαkα∗μFkFij,k=1,2,3.


## 3.3.3. Normalized Layer

This contains the nodes which are nonadaptive in nature, which is also recognized as normalized node, shown by a circle labeled asN (cf. Figure 2). Each node computes the output by taking the ratio of the kth rule generated at T-norm layer to the summation of all rules produced by T-norm layer. The output at this layer can be given as
(22)Tnk=Tk∑kTk,k=1,2,3.


## 3.3.4. Defuzzy Layer

This layer contains the nodes, which are adaptive in nature and are shown by square with labelR (cf. Figure 2). Each node produces the output as the product of normalized firing strength and out of individual rule. The output is given by
(23)TnkHk=TnkHk=TnkqkER+rkFij+skα+tk.


## 3.3.5. Aggregated Output Layer

This layer contains a single nonadaptive node. The out at this node is estimated by taking the summation of all the incoming inputs to this layer [53]. The aggregated output is given by
(24)NH=∑kTnkHk=∑kTkHk∑kTk.We present Algorithm1. NH selection algorithm is using neuro-fuzzy to explain the working of ANFIS. The gradient descent and least mean square-assisted hybrid learning algorithm have been used to train the premise and consequent parameters in two passes, namely, forward pass and backward pass. The nodes of fuzzy and defuzzy layers are updated over time. In the forward pass, the fixed premise parameters {ER,Fij,α} are static and passed through fuzzy layer to defuzzy layer in the proposed Algorithm 1. The least mean square method is used to update these fixed premise parameters. After getting the fourth layer’s output which is termed ad consequent parameter, the actual output is analyzed with fourth layer’s output, and the error is noted. The prime aim is to minimize the error recursively. With the backward pass, this error is sent back to fuzzy layer and membership function of fixed premise parameters is updated by employing the gradient descent method simultaneously. One execution round of the hybrid learning process (including both forward pass and backward pass) is called epoch. The algorithm is executed till it converges (the error becomes infinitesimal small) or till the maximum number of epoch (Mepoch).Algorithm 1:NH selection algorithm using neuro-fuzzy (NHSN).
Input:ER,Fij,αand MepochProcess:(1)
for m =1 toMepoch(2)
Input the fixed premise {ER,Fij,α} to fuzzy layer of Takagi- Sugeno inference engine(3)
Fuzzy layer producesμEkER, μαkα and μFkFij for each node according to Eq. (19).(4)
Tune the firing strengthTk of each node using Eq. (21)(5)
Computes the firing strengthTnk of each node using Eq. (22).(6)
Performs defuzzification the consequent parameter of each node using Eq. (23).(7)
Computes the aggregated outputNH using Eq. (24).(8)
Output:NH


## 3.3.6. Neuro-Fuzzy Routing Approach

The proposed neuro computes the aggregated output routing in which each sensor selects a next hop to forward the data packets. In this routing, packets are sent to sink via different routes. For each packet, a new route might be constructed which reduces energy utilization of all sensors in the WSN. The neuro-fuzzy routing approach contains three phases: neighbor discovery, metric calculation, and next hop selection using NHSN. Each sensor executes the routing algorithm to search next hop till the sink is reached. The routing algorithm is given as Algorithm2.
(i)
Neighbor Discovery. Each sensor ni broadcasts HELLO packets comprising its location information in its vicinity. Each sensors nj, which gets this HELLO packet, answer with “ECHO” packets with its position information. On the reception of these ECHO packets, each sensor constructs its neighbor list. The only sensors which lies in the respective FSS will be added to the list(ii)
Metric Calculation. The sensor ni calculates forward progress for each sensor nj∈FSSi. Each sensor nj∈FSSi sends containing its residual energy and degree information to the sender sensor ni. The sensor ni estimates NHij fusing Algorithm 1 or all the sensors nj∈FSSi(iii)
Next Hop Selection. For the NH selection, the only sensors lie in FSS of the sender sensor contributes in the selection process. The sensor ni appoints a sensor as NH which has the highest NHij value. This NH is used to forward the packet to the next NH until the packet reaches to the sinkAlgorithm 2: Neuro-fuzzy routing (FNA) algorithm.
1. Neighbor discovery:I. Each sensorni∈N advertises HELLO packet to discover all neighbors njII. for each neighbor njof nidoIII. Sensornj obtains its position information xj,yj using any localization techniquesIV.If point xj,yj satisfies Eq. (11) thenV. Addnj to FFSiVI.end ifVII.end for2. Metric calculation:I.for each sensor nj∈FSSidoII. Sensorni computes Fij using Eq. (13)III.ni gets ER,Fij,αIV. Sensorni computes NH for nj using NHSNend for3. Next Hop selection:I. NHnj =argmax(NHij), nj∈FSSiII. Sensorni sends data packet to the NH nj


## 3.3.7. Time Complexity Analysis of NHSN and FNA Algorithms

NHSN algorithm uses the ANFIS algorithm which combines the fuzzy algorithm and neural network. When Algorithm1 was supplied a number of inputs, to obtain the optimum values of the parameters, it is updating the weights of the parameter continuously. The proposed rules used to modify the weight were dominant in the complexity of the algorithm. The time required to run the ANFIS algorithm depends on the number of inputs (k). The asymptotic time complexity of the algorithm is Ok.In the FNA algorithm, the neighbor discovery phase and the running of time of this phase takeOnm where n is the number of sensors in a route and m is the average number of neighbor sensors. The metric calculation needs the running time Om+k. The next hop selection phase takes the time of Om. Thus The asymptotic time complexity of the Algorithm 2 is Onm+k.


## 4. Simulation Results and Analysis

In this portion, the proposed ERFN routing for WSN is evaluated by conducting large–scale simulation employing MATLAB fuzzy logic simulator tool neuro-fuzzy designer to trained ANFIS. We customize the fuzzy inference system by adding new membership functions for devised routing centric metrics to predict the next hop. The area of network field is assumed to be300×300m2, and 200 sensors are placed randomly in this field. The sink is placed in the center of the field. The initial energy of each sensor is 2 J. The values of Eelect and εfsp are taken as follows: 10(nJ/bit) and 20 pJ/bit/m2. The length of data packet transmitted and received by each sensor is set as 64 bits. The location of the sink node is (200, 200). The cycle time is 60 microseconds. The packet rate is 200 packets/s. The sensing and transmission ranges of each sensor are assumed to be 10 m and 20 m, respectively. Each simulation result is taken by averaging of 10 runs of each simulation, thus, measuring the performance of the ERFN.The proposed ERFN is compared with similar position-based routing: eBPR [6] and EeBGR [9] to show its effectiveness. A number of performance metrics are deliberated to assess the performance of the developed routing approach.


### 4.1. Network Lifetime

It is defined in many depending on applications WSN including the time until a certain percentage of sensor dies or the time until sensors are not capable to send data to sink. This paper terms the lifetime of the network by means of the time until 50% of sensors die. The simulation process goes on till 90% of nodes are dead.


### 4.2. Average Residual Energy

It is defined as the ratio of the sum of the remaining energy of all alive sensors to the number of alive sensors in the network after each round. LetERi is residual energy of ith sensor. The average residual energy of all the sensors for the next rounds is calculated as
(25)Eav=1N∑iϵNERi.


### 4.3. Average Energy Consumption

It is defined as the ratio of the sum of the amount of energy consumed by all sensors to the number of sensors after each round.


### 4.4. Standard Deviation (SD) of Residual Energy

It is a statistical measure defined as the square root of the variance of residual energy of all the sensors. The SD of residual energy is a square root of the variance of residual energy is given by(26)σER=1N∑iϵNEav−ERi2.


#### 4.4.1. Network Lifetime

Figure3 shows the lifetime in the terms of the number of alive sensors which are involved in the routing process in different rounds. The results are obtained for the proposed ERFN and compared with the state-of-the-art routing approaches: EeBGR and eBPR. At the beginning, all sensors are alive. When the routing algorithms run in rounds, sensors drain their energy, and the number of alive sensors reduces. It is noted that as the number of rounds increases, the number of alive sensors for the proposed ERFN is comparatively more than that of EeBGR and eBPR. In the proposed ERFN, the first sensor dies in about 250 rounds, whereas in EeBGR, first sensor dies at about 200 rounds, and in eBRP, the first sensor dies at about 180 rounds. Further, it is also noted that after 1000 rounds, the number of alive sensors in the proposed ERFN is about 180, whereas the number of alive sensors for EeBGR and eBPR is 150 and 170, respectively. After 2000 rounds, the number of alive sensors EeBGR, eBPR, and ERFN is about 35, 60, and 75, respectively. It is due to the fact that the proposed ERFN selects the next hop using the neuro-fuzzy system, increasing to a much longer lifetime of the network.Figure 3
Number of alive sensors.Figure4 exhibits sensor death percentage for different number of rounds. It is witnessed that the proposed ERFN performs better as compared to EeBGR and eBPR. The sensor death percentage of all the considered routing approaches is gradually increasing up to about 400 rounds. After that, the death percentage for both EeBGR and eBPR is increasing sharply as compared to that of ERFN. For example, at 700 rounds, the death percentages for both EeBGR and eBPR are 20% and 18%, respectively, whereas for ERFN, it is 5%. It is noted that the sensor death rate for ERFN is slower than that of the state-of-the-art approaches. It is due to the fact that the proposed routing uses supervised learning approach minimizes the error rate in selecting the next hop.Figure 4
Sensor death percentage.


#### 4.4.2. Energy Consumption

Figure5 displays the average residual energy of all sensors for the different number of rounds. All sensors have equal that is 2 joule initially energy. As the all considered routing approaches run in rounds, after some rounds, it is seen that the ERFN saves more energy as compared to both EeBGR and eBPR. For example, after 500 rounds, the average residual energy for the ERFN is about 1.8 joule; however, at the same number of rounds, the average residual energy for both EeBGR and eBPR is 1.4 joule and 1.6 joules. It is because of the ERFN changes the routes frequently by using ANFIS where the state-of-the-art approaches do not use any learning algorithms. Thus, the ERFN conserves more energy, increasing the network lifetime.Figure 5
Avg. residual energy over roundsFigure6 displays the average energy consumption for all the sensors for different rounds. The average energy consumption is likely to be constant for ERFN and eBPR up to 250 rounds whereas it is high for EeBGR. But the ERFN consumes less energy as compared to both approaches. For example, after 500 rounds, the ERFN exhausts 0.1 joules energy, and both EeBGR and eBPR exhaust 0.25 and 0.4 energy, respectively. It noted that as the execution rounds increase, the energy consumption for all the routing also increases but this increment is less for the ERFN. It is clear that the proposed routing consumes less energy which is essential for network lifetime enhancement.Figure 6
Avg. energy consumed by nodes over rounds.


#### 4.4.3. Standard Deviation for Residual Energy

When WSN starts operating, each sensor begins exhausting a different amount of energy, and the SD of residual energy changes. Figure7 exhibits the SD for residual energy among all the nodes in WSN. Low SD indicates better energy consumption balancing. Initially, all the routing approaches consume under one mean, indicating good energy consumption balancing among sensors. However, as the rounds increase, the SDs of residual energy for all considered routing approaches change. The SD with the proposed ERFN is lower than that of both EeBGR and eBPR. For example, at 500 rounds, the SD for ERFN is 0.23 whereas both EeBGR and eBPR give 0.30 and 0.38. The SD of eBPR is much closer to the ERFN as compared to EeBGR, and it is because both ERFN and eBPR take the same routing metrics. It is observed that ERFN gives much flatter graph over EeBGR and eBPR, and it is due to the fact that the ERFN uses ANFIS to select next hop which frequently changes path for the data packets in each round. It is clearly noticed the ERFN achieves better energy consumption balancing than the state-of-the-art approaches.Figure 7
SD of residual energy.Figure8 displays SD of residual energy for different numbers of alive sensors. It is observed that in all cases of alive sensors, the SD for the proposed ERFN is less than that of EeBGR and eBPR. For example, 80 numbers of alive sensors, the SD for ERFN is 0.018 whereas for EeBGR and eBPR, the SDs are 0.02 and 0.025, respectively. It indicates that the ERFN obtained a better energy balance compared to EeBGR and eBPR. Further, it is observed that the proposed ERFN achieved the highest energy balance for the alive sensor equals to 80 for all the routing approaches. Thus, the proposed routing outperforms both EeBGR and eBPR in the term of SD of the residual energy.Figure 8
SD versus alive sensors.


## 4.1. Network Lifetime

It is defined in many depending on applications WSN including the time until a certain percentage of sensor dies or the time until sensors are not capable to send data to sink. This paper terms the lifetime of the network by means of the time until 50% of sensors die. The simulation process goes on till 90% of nodes are dead.


## 4.2. Average Residual Energy

It is defined as the ratio of the sum of the remaining energy of all alive sensors to the number of alive sensors in the network after each round. LetERi is residual energy of ith sensor. The average residual energy of all the sensors for the next rounds is calculated as
(25)Eav=1N∑iϵNERi.


## 4.3. Average Energy Consumption

It is defined as the ratio of the sum of the amount of energy consumed by all sensors to the number of sensors after each round.


## 4.4. Standard Deviation (SD) of Residual Energy

It is a statistical measure defined as the square root of the variance of residual energy of all the sensors. The SD of residual energy is a square root of the variance of residual energy is given by(26)σER=1N∑iϵNEav−ERi2.


### 4.4.1. Network Lifetime

Figure3 shows the lifetime in the terms of the number of alive sensors which are involved in the routing process in different rounds. The results are obtained for the proposed ERFN and compared with the state-of-the-art routing approaches: EeBGR and eBPR. At the beginning, all sensors are alive. When the routing algorithms run in rounds, sensors drain their energy, and the number of alive sensors reduces. It is noted that as the number of rounds increases, the number of alive sensors for the proposed ERFN is comparatively more than that of EeBGR and eBPR. In the proposed ERFN, the first sensor dies in about 250 rounds, whereas in EeBGR, first sensor dies at about 200 rounds, and in eBRP, the first sensor dies at about 180 rounds. Further, it is also noted that after 1000 rounds, the number of alive sensors in the proposed ERFN is about 180, whereas the number of alive sensors for EeBGR and eBPR is 150 and 170, respectively. After 2000 rounds, the number of alive sensors EeBGR, eBPR, and ERFN is about 35, 60, and 75, respectively. It is due to the fact that the proposed ERFN selects the next hop using the neuro-fuzzy system, increasing to a much longer lifetime of the network.Figure 3
Number of alive sensors.Figure4 exhibits sensor death percentage for different number of rounds. It is witnessed that the proposed ERFN performs better as compared to EeBGR and eBPR. The sensor death percentage of all the considered routing approaches is gradually increasing up to about 400 rounds. After that, the death percentage for both EeBGR and eBPR is increasing sharply as compared to that of ERFN. For example, at 700 rounds, the death percentages for both EeBGR and eBPR are 20% and 18%, respectively, whereas for ERFN, it is 5%. It is noted that the sensor death rate for ERFN is slower than that of the state-of-the-art approaches. It is due to the fact that the proposed routing uses supervised learning approach minimizes the error rate in selecting the next hop.Figure 4
Sensor death percentage.


### 4.4.2. Energy Consumption

Figure5 displays the average residual energy of all sensors for the different number of rounds. All sensors have equal that is 2 joule initially energy. As the all considered routing approaches run in rounds, after some rounds, it is seen that the ERFN saves more energy as compared to both EeBGR and eBPR. For example, after 500 rounds, the average residual energy for the ERFN is about 1.8 joule; however, at the same number of rounds, the average residual energy for both EeBGR and eBPR is 1.4 joule and 1.6 joules. It is because of the ERFN changes the routes frequently by using ANFIS where the state-of-the-art approaches do not use any learning algorithms. Thus, the ERFN conserves more energy, increasing the network lifetime.Figure 5
Avg. residual energy over roundsFigure6 displays the average energy consumption for all the sensors for different rounds. The average energy consumption is likely to be constant for ERFN and eBPR up to 250 rounds whereas it is high for EeBGR. But the ERFN consumes less energy as compared to both approaches. For example, after 500 rounds, the ERFN exhausts 0.1 joules energy, and both EeBGR and eBPR exhaust 0.25 and 0.4 energy, respectively. It noted that as the execution rounds increase, the energy consumption for all the routing also increases but this increment is less for the ERFN. It is clear that the proposed routing consumes less energy which is essential for network lifetime enhancement.Figure 6
Avg. energy consumed by nodes over rounds.


### 4.4.3. Standard Deviation for Residual Energy

When WSN starts operating, each sensor begins exhausting a different amount of energy, and the SD of residual energy changes. Figure7 exhibits the SD for residual energy among all the nodes in WSN. Low SD indicates better energy consumption balancing. Initially, all the routing approaches consume under one mean, indicating good energy consumption balancing among sensors. However, as the rounds increase, the SDs of residual energy for all considered routing approaches change. The SD with the proposed ERFN is lower than that of both EeBGR and eBPR. For example, at 500 rounds, the SD for ERFN is 0.23 whereas both EeBGR and eBPR give 0.30 and 0.38. The SD of eBPR is much closer to the ERFN as compared to EeBGR, and it is because both ERFN and eBPR take the same routing metrics. It is observed that ERFN gives much flatter graph over EeBGR and eBPR, and it is due to the fact that the ERFN uses ANFIS to select next hop which frequently changes path for the data packets in each round. It is clearly noticed the ERFN achieves better energy consumption balancing than the state-of-the-art approaches.Figure 7
SD of residual energy.Figure8 displays SD of residual energy for different numbers of alive sensors. It is observed that in all cases of alive sensors, the SD for the proposed ERFN is less than that of EeBGR and eBPR. For example, 80 numbers of alive sensors, the SD for ERFN is 0.018 whereas for EeBGR and eBPR, the SDs are 0.02 and 0.025, respectively. It indicates that the ERFN obtained a better energy balance compared to EeBGR and eBPR. Further, it is observed that the proposed ERFN achieved the highest energy balance for the alive sensor equals to 80 for all the routing approaches. Thus, the proposed routing outperforms both EeBGR and eBPR in the term of SD of the residual energy.Figure 8
SD versus alive sensors.


## 4.4.1. Network Lifetime

Figure3 shows the lifetime in the terms of the number of alive sensors which are involved in the routing process in different rounds. The results are obtained for the proposed ERFN and compared with the state-of-the-art routing approaches: EeBGR and eBPR. At the beginning, all sensors are alive. When the routing algorithms run in rounds, sensors drain their energy, and the number of alive sensors reduces. It is noted that as the number of rounds increases, the number of alive sensors for the proposed ERFN is comparatively more than that of EeBGR and eBPR. In the proposed ERFN, the first sensor dies in about 250 rounds, whereas in EeBGR, first sensor dies at about 200 rounds, and in eBRP, the first sensor dies at about 180 rounds. Further, it is also noted that after 1000 rounds, the number of alive sensors in the proposed ERFN is about 180, whereas the number of alive sensors for EeBGR and eBPR is 150 and 170, respectively. After 2000 rounds, the number of alive sensors EeBGR, eBPR, and ERFN is about 35, 60, and 75, respectively. It is due to the fact that the proposed ERFN selects the next hop using the neuro-fuzzy system, increasing to a much longer lifetime of the network.Figure 3
Number of alive sensors.Figure4 exhibits sensor death percentage for different number of rounds. It is witnessed that the proposed ERFN performs better as compared to EeBGR and eBPR. The sensor death percentage of all the considered routing approaches is gradually increasing up to about 400 rounds. After that, the death percentage for both EeBGR and eBPR is increasing sharply as compared to that of ERFN. For example, at 700 rounds, the death percentages for both EeBGR and eBPR are 20% and 18%, respectively, whereas for ERFN, it is 5%. It is noted that the sensor death rate for ERFN is slower than that of the state-of-the-art approaches. It is due to the fact that the proposed routing uses supervised learning approach minimizes the error rate in selecting the next hop.Figure 4
Sensor death percentage.


## 4.4.2. Energy Consumption

Figure5 displays the average residual energy of all sensors for the different number of rounds. All sensors have equal that is 2 joule initially energy. As the all considered routing approaches run in rounds, after some rounds, it is seen that the ERFN saves more energy as compared to both EeBGR and eBPR. For example, after 500 rounds, the average residual energy for the ERFN is about 1.8 joule; however, at the same number of rounds, the average residual energy for both EeBGR and eBPR is 1.4 joule and 1.6 joules. It is because of the ERFN changes the routes frequently by using ANFIS where the state-of-the-art approaches do not use any learning algorithms. Thus, the ERFN conserves more energy, increasing the network lifetime.Figure 5
Avg. residual energy over roundsFigure6 displays the average energy consumption for all the sensors for different rounds. The average energy consumption is likely to be constant for ERFN and eBPR up to 250 rounds whereas it is high for EeBGR. But the ERFN consumes less energy as compared to both approaches. For example, after 500 rounds, the ERFN exhausts 0.1 joules energy, and both EeBGR and eBPR exhaust 0.25 and 0.4 energy, respectively. It noted that as the execution rounds increase, the energy consumption for all the routing also increases but this increment is less for the ERFN. It is clear that the proposed routing consumes less energy which is essential for network lifetime enhancement.Figure 6
Avg. energy consumed by nodes over rounds.


## 4.4.3. Standard Deviation for Residual Energy

When WSN starts operating, each sensor begins exhausting a different amount of energy, and the SD of residual energy changes. Figure7 exhibits the SD for residual energy among all the nodes in WSN. Low SD indicates better energy consumption balancing. Initially, all the routing approaches consume under one mean, indicating good energy consumption balancing among sensors. However, as the rounds increase, the SDs of residual energy for all considered routing approaches change. The SD with the proposed ERFN is lower than that of both EeBGR and eBPR. For example, at 500 rounds, the SD for ERFN is 0.23 whereas both EeBGR and eBPR give 0.30 and 0.38. The SD of eBPR is much closer to the ERFN as compared to EeBGR, and it is because both ERFN and eBPR take the same routing metrics. It is observed that ERFN gives much flatter graph over EeBGR and eBPR, and it is due to the fact that the ERFN uses ANFIS to select next hop which frequently changes path for the data packets in each round. It is clearly noticed the ERFN achieves better energy consumption balancing than the state-of-the-art approaches.Figure 7
SD of residual energy.Figure8 displays SD of residual energy for different numbers of alive sensors. It is observed that in all cases of alive sensors, the SD for the proposed ERFN is less than that of EeBGR and eBPR. For example, 80 numbers of alive sensors, the SD for ERFN is 0.018 whereas for EeBGR and eBPR, the SDs are 0.02 and 0.025, respectively. It indicates that the ERFN obtained a better energy balance compared to EeBGR and eBPR. Further, it is observed that the proposed ERFN achieved the highest energy balance for the alive sensor equals to 80 for all the routing approaches. Thus, the proposed routing outperforms both EeBGR and eBPR in the term of SD of the residual energy.Figure 8
SD versus alive sensors.


## 5. Conclusion and Future Perspective

This paper proposes a new energy-efficient routing using fuzzy neural network in wireless sensor networks. Specially, an adaptive neuro-fuzzy inference system has been employed to combine the three routing-centric metrics: residual energy, forward progress, and sensors degree. The next hop selection algorithm using neuro-fuzzy to assign duty of packet forward to a neighboring sensor as next hop is presented. The neuro-fuzzy routing algorithm is presented to route the packet from source sensor to the sink. Simulation has been conducted using MATLAB fuzzy logic simulator tool neuro-fuzzy designer. The results indicate that ERFN outperforms the EeBGR and eBPR in the terms of lifetime, energy consumption, and SD of residual energy. In the future, the proposed routing will be studied using other machine learning algorithms for newer areas of applications including E-mobility route planning and information sharing in traffic environment. More energy-saving technical ideas will be incorporated such as employing duty cycling approaches in the sensor-oriented wireless communication environment.



---

*Source: 5113591-2021-08-10.xml*