# FLECH: Fuzzy Logic Based Energy Efficient Clustering Hierarchy for Nonuniform Wireless Sensor Networks

Authors: Baranidharan Balakrishnan; Santhi Balachandran
Journal: Wireless Communications and Mobile Computing
 (2017)

---

## Abstract

Lifetime of Wireless Sensor Network (WSN) is an important issue which affects its implementation in various real time applications. The major factor behind the energy consumption in WSN is its data collection mechanism. The direct data transmission from each sensor node to the Base Station (BS) consumes more energy than other alternatives. Also it is unnecessary, due to redundant data transmission because of geographically closer nodes. Clustering is the best data collection architectural model for WSN since it takes care of in-network processing which handles redundant data within the network. The techniques used for the network having uniform node distribution are not suitable for the networks which have nonuniformly distributed nodes. This paper contributes a novel clustering algorithm: Fuzzy Logic Based Energy Efficient Clustering Hierarchy (FLECH) for nonuniform WSN. The clusters in FLECH are created using proper parameters which increases the lifetime of the WSN. Fuzzy logic in FLECH is wisely used to combine important parameters like residual energy, node centrality, and distance to BS for electing best suitable nodes as CH and increases the network lifetime. FLECH performance is verified in different scenarios and the results are compared with LEACH, CHEF, ECPF, EAUCF, and MOFCA. The simulation results clearly indicate the lifetime increase by FLECH over other algorithms and its energy conservation per round of data collection in the network.


---

## Body

## 1. Introduction

Wireless Sensor Networks (WSN) are made up of hundreds to thousands number of small miniature sensor nodes interconnected with each other. A sensor node is made up of three subsystems such as sensing unit, processing unit, and communication unit [1]. The sensing unit has different types of sensors to measure various atmospheric parameters such as temperature, pressure, light, and sound. Typically, a sensor node is equipped with more than one type of sensor. The processing unit consists of a microcontroller which processes the data generated by the sensing unit. The communication unit is made up of a transceiver chip along with an antenna for enabling data communication among the neighbour sensor nodes or directly with the BS. Apart from the above-mentioned subsystems, a sensor node has a battery unit which is mostly a pair of alkaline batteries for providing power supply to all the above-mentioned subsystems. In terms of energy consumption, communication unit consumes more energy than other units due to transmission, reception, and amplification of data signals [2]. When the battery of a node gets drained, then the node is called as dead.Direct data transmissions from individual sensor nodes in the network lead to higher energy consumption among the nodes, redundant data transmissions to the BS, and reduced network lifetime. To the best of our knowledge, clustering is the best suitable architecture model for solving the above-mentioned problems [3]. The nearby nodes in the Area of Interest (AOI) form a cluster and elect a cluster head (CH) for managing the clustering activities. A CH is having the responsibilities like collecting information from the members, aggregating the received information, and communicating aggregated information to central Base Station (BS). Lots of clustering algorithms are being proposed for WSN which elects CHs through pure probabilistic approach or a weight based approach. Some protocols elect CHs by blending the above two approaches. Both, pure probabilistic and weight based approaches fail in achieving an increased lifetime of the network. The probabilistic approach elects CHs without considering the various lifetime parameters such as energy level, number of neighbour nodes, and intra- and intercluster distance. Due to these reasons, nonsuitable nodes get elected as CHs which affects the lifetime of the WSN. Weight based approach elects CHs by considering the above-mentioned lifetime parameters, but it leads to election of the same nodes as CHs frequently and leads to First Node Die (FND) soon. Since stability of the network is calculated using FND metrics, it should be increased as far as possible. It is found that the algorithms which blend probabilistic approach and weight based approach give better results than following any one approach [4].Fuzzy Approach. Various computational intelligence (CI) techniques [5] like neural network (NN), Particle Swarm Optimization (PSO), Genetic Algorithms, and so forth are widely used in WSN for various issues. Generally fuzzy logic (FL) [6, 7] is used to solve uncertainties in the system. By using FL, a system can be optimized without the need of complete information about it.There are three significant parts in FL as shown in Figure1. It consists of fuzzifier, fuzzy decision block (FDB), and defuzzifier block. FDB is made up of rule base and fuzzy inference system. Fuzzifier block converts the given crisp input value into the appropriate fuzzy linguistic variable. Based on the rule base, FDB block will map the set of input linguistic variables to the output linguistic variables. Finally, defuzzifier block converts the fuzzy output variable into the crisp output using a suitable defuzzification method.Figure 1
Basic block diagram of a fuzzy system.Fuzzy Logic Based Energy Efficient Clustering Hierarchy (FLECH), a new clustering algorithm for nonuniform WSN using the fuzzy approach, is proposed in this paper. FLECH uses residual energy, node centrality, and distance to BS to compute the chance of electing a node as CH. Compared with other fuzzy based clustering algorithms, it blends probabilistic approach and weight based approach in the right manner to elect CHs in the network.The clustering algorithms for WSN are briefly surveyed in Section2. In Section 3, the proposed algorithm FLECH is described in detail; Section 4 explains the experimental setup and Section 5 gives an analysis over the results.


## 2. Related Works

Low Energy Adaptive Clustering Hierarchy (LEACH) [8] is a distributed clustering algorithm for WSN. It has two phases: setup phase and steady state phase. At first, in the setup phase, each node will decide itself to act as CH or not in the current round. Factors such as the number of times a node got elected as CH in the last r rounds and the percentage of desired CHs will influence the decision. Each node selects a value between 0 and 1. If the value is less than T(m) as mentioned in (1), the node elects itself as CH and advertises among its neighbours. In (1), m denotes the sensor node, desired CH percentage on the network is denoted by p, and set of non-CH in the last r rounds is represented by set G:(1)Tm=p1-p×rmod1/p,m∈G0otherwise.Remaining nodes join the nearest CH nodes by sendingJoin_Req message. Each CH node generates separate Time Division Multiple Access (TDMA) schedule for their newly formed clusters. In steady state phase, data generated by member nodes are forwarded to their CHs in the allotted time slots. Each CH aggregates the received data and forwards the aggregated data to the BS. In LEACH, the probabilistic way of electing CHs results in the election of unsuitable nodes as CHs which affects the lifetime of the network.In Hybrid Energy Efficient Distributed (HEED) protocol [9], CHs are elected based on the residual energy of the nodes. Whenever there is a tie between two nodes because of the equal residual energy level, the number of neighbour nodes, that is, node degree or distance with the neighbour nodes, is used for CH election. Due to the consideration of residual energy and node degree for CH election, HEED [9] provides better performance than LEACH. Equation (2) depicts the CH probability of a node in HEED. EResidual represents residual energy, Emax represents the initial maximum energy of a node, and CProb is the random number between 0 and 1 in the following:(2)CHProb=CProb×EResidualEmax⁡.Gupta et al. [10] proposed the implementation of fuzzy logic for electing CHs in WSN. Three input parameters, residual energy, node degree, and node centrality, are used for CH election. Like in other centralized algorithms, all nodes have to communicate their current residual energy frequently to BS which again increases communication cost. Also the proposed work suffers from scalability issue which is not suitable for large scale WSN.Cluster head election using fuzzy logic (CHEF) [11] is a distributed clustering algorithm using fuzzy logic approach for WSN. During the start of a round, CHEF elects tentative CHs using probability approach. The final CHs are elected from tentative CH list using residual energy and local distance of the nodes. The sum of distance from all one-hop neighbours to a node x is the local distance of the node x. Fuzzy if-then rules are used to evaluate the fuzzified input values. The output variable chance is the potentiality of a node to act as CH. Sensor nodes which got higher chance value will be finally elected as CH. The input fuzzy variable local distance is not a suitable variable for all network sizes and because of this, CHEF suffers a lot in network size apart from 200 m × 200 m.Energy aware distributed dynamic clustering protocol using fuzzy logic (ECPF) [12] is another fuzzy approach based algorithm for WSN. ECPF has two phases: setup and steady state phase. CH election and cluster formation will happen in setup phase. TDMA frame generation and data collection happen during the steady state phase. Node degree and node centrality are the two input variables and fuzzy cost is the output variable. Each node in the network will be waiting for a delay time which is inversely proportional to its residual energy. After expiration of delay time, if a node does not receive anytentative_CH message from its nearby nodes, then it broadcasts atentative_CH message containing its id, fuzzy cost, and its status as tentative CH. If there is no other node within its cluster range with lesser fuzzy cost value, it declares itself as the CH and broadcastfinal_CH message within its cluster range.Energy aware unequal clustering using fuzzy approach (EAUCF) [13, 14] is also a distributed clustering algorithm for WSN. Residual energy and distance to BS are considered for CH election in EAUCF. Initially during a round, tentative CHs are chosen by using random number generation. Fuzzy inference system (FIS) in EAUCF is used to obtain competition radius for the tentative CH nodes. Each tentative CH will broadcast its residual energy and check the existence of any other tentative CH node within its competition radius. If two such tentative CHs are present within the competition radius of either one node, the nodes having lesser residual energy will quit from CH competition. In CH election, an important parameter like node degree is not considered which may lead to election of CH with fewer and distant neighbours. This results in higher intracluster communication cost and reduces the lifetime of the WSN.A multiobjective fuzzy clustering algorithm (MOFCA) [15] is a distributed clustering algorithm for WSN. FIS in MOFCA uses residual energy, distance to sink, and node density to compute the competition radius of tentative CH. Like in EAUCF, at the start of a round tentative CHs are elected using randomized approach. Then the competition radius of each tentative CH is computed using its FIS. Finally, all tentative CHs check whether any other tentative CHs exist within its competition radius, if so, it withdraws from the CH competition or else it elects itself as CH. Particularly, MOFCA is designed to be suitable for nonuniform network. It uses 27 different output linguistic variables to compute the competition radius.Though the above presented algorithms prove improvement in increasing lifetime, yet its performance in nonuniform node deployment is poor. The nonuniform node distributions have a dense concentration of nodes in some areas and scarce number of nodes in other parts of AOI. Though both the fuzzy algorithms CHEF and ECPF elect the CH based on a weight value generated through the fuzzy engine, the CH role is found to be not properly rotated among the nodes in nonuniform network. In CHEF, local distance parameter is not a suitable input parameter for electing CHs. When a node is having too many numbers of neighbours, local distance also increases, which reduces its chance of becoming CH. But it is well proved that nodes which are having more neighbours are more suitable to be elected as CH. In ECPF, the tentative CHs are elected using residual energy and final CHs are elected using fuzzy approach. The static parameters such as node degree and node centrality are taken as input for ECPF’s FIS for computing fuzzy cost. Here the major problem is that the same set of nodes are having higher chances of frequently getting elected as CH. This affects the stability period of the network with very earlier First Node Die (FND). In the case of EAUCF, residual energy alone decides the election of final CH from tentative CH. The very important parameter like number of neighbours and the location of CH within a cluster is not considered in EAUCF. The key features in FLECH are as follows:(i)
It is a fuzzy based distributed algorithm designed for nonuniform node distribution in WSN.(ii)
Fuzzy logic is wisely used to elect the CHs nodes by taking into account the factors such asresidual energy,node centrality, anddistance to BS of the nodes.(iii)
The probabilistic approach is blended suitably with weight based approach for electing suitable CHs.


## 3. Proposed Algorithm

FLECH is designed for nonuniform WSN, which ensures proper rotation of CH among all the eligible nodes in the network.


### 3.1. Network Assumptions

(i)
Homogenous network is assumed where all nodes are having equal capabilities in terms of processing power, sensing area, and so forth. (ii)
All nodes are having the same energy level at the time of deployment. (iii)
The nodes are static after deployment in their AOI. (iv)
Received Signal Strength Indicator (RSSI) is used to calculate the distance between nodes. (v)
After deployment, all nodes broadcast a HELLO message which contains its ID within its communication radiusRc. Through this HELLO message only, the number of neighbours and their distance are calculated by each node separately. (vi)
The BS also broadcasts a HELLO message in which its location details are attached. (vii)
Energy depletion alone is the reason behind node death.


### 3.2. Fuzzy System in FLECH

Residual energy,node centrality, anddistance to BS are the input variables in FLECH.(i) Residual Energy. It is an important factor for electing a node as CH since a CH node has to spend more energy than a member node. A CH node collects data from members, aggregates the collected data, and communicates it to BS. So, competent energy level is required for a CH for executing the above-mentioned activities.(ii) Node Centrality (NC). Total number of one-hop adjacent nodes within Rc of a node is called node degree. Node centrality is a factor which determines how a node is located in the middle among its neighbours. Lower NC value gives more chance of electing a node as CH:(3)NC=∑i=1NDdisti2/NDNtk_Dimension.In (3) ND (node degree) corresponds to number of neighbours within the communication radius Rc of a node and Ntk_Dimension value is “M” in M×M field area and disti2 represents distance with the ith neighbor node. That is, in 100 m × 100 m field area, Ntk_Dimension is 100 and 200 m × 200 m field area and Ntk_Dimension is 200.(iii) Distance to BS. The energy consumption for transmitting data increases with the increase in distance between transmitter and receiver nodes. From an energy conservation perspective, the distance between CH and BS should be minimized:(4)Distance  to  BS=diα·Ntk_Dimension,α=dmaxNtk_Dimension.In (4) di is the distance between node i and the BS, dmax is the maximum distance between a node in the network and the BS, and α is the network dimension specific constant.FLECH has one output variableChance.(i) Chance. It is a crisp output value based on which CH capability of a node is determined. The higherchance value represents higher chance of a node in getting elected as a CH.Low, Medium, andHigh are the fuzzy linguistic variables forresidual energy as shown in Figure 2.Close, Reachable, andDistant fornode centrality andNearby,Average, andFar fordistance to BS are shown in Figures 3 and 4, respectively.Low,High, Close, Distant, Nearby, andFar follow trapezoidal membership function, whereasMedium,Reachable, andAverage follow triangular membership function.Figure 2
Fuzzy set for the input variableresidual energy.Figure 3
Fuzzy set for the input variablenode centrality.Figure 4
Fuzzy set for the input variabledistance to BS.The output variablechance has nine output linguistic variables and they arevery low, low, rather low, low medium, medium, high medium, rather high, high,andvery high. In thisvery low andvery high follow trapezoidal membership function. The remaining output linguistic variables follow triangular membership function. Figure 5 shows thechance membership functions.Figure 5
Fuzzy set for the output variablechance.The crisp input values are converted into fuzzy linguistic variable based on the given membership function in FIS. Then the fuzzy if-then rules developed based on Mamdani [16] method are used to map the input variables to appropriate fuzzy output variables. In total, 27 fuzzy if-then rules are presented in Table 1. The crisp output values are obtained using Center of Area (CoA) method.Table 1
FLECH fuzzy if-then rules.
S. number Residual energy Node centrality Distance to BS Chance 1 Low Close Nearby Rather low 2 Low Reachable Nearby Low 3 Low Distant Nearby Very low 4 Low Close Average Rather low 5 Low Reachable Average Low 6 Low Distant Average Very low 7 Low Close Far Rather low 8 Low Reachable Far Low 9 Low Distant Far Very low 10 Medium Close Nearby Rather medium 11 Medium Reachable Nearby Medium 12 Medium Distant Nearby Low medium 13 Medium Close Average Rather medium 14 Medium Reachable Average Medium 15 Medium Distant Average Low medium 16 Medium Close Far Rather medium 17 Medium Reachable Far Medium 18 Medium Distant Far Low medium 19 High Close Near Very high 20 High Reachable Near High 21 High Distant Near Rather high 22 High Close Average Very high 23 High Reachable Average High 24 High Distant Average Rather high 25 High Close Far Very high 26 High Reachable Far High 27 High Distant Far Rather high


### 3.3. Clustering Process

FLECH has two operative phases: (i) cluster formation phase and (ii) data collection phase.


#### 3.3.1. Cluster Formation Phase

At the start of a round, each node has to generate a random value between 0 and 1. The nodes whose generated random value is less than the predetermined threshold valuePthres are elected as a probationary CH node. The probationary CH nodes will compute their chance value using FIS and broadcastProbationary_CH message to all nodes coming under their communication radius Rc. TheProbationary_CH message will contain details such as node id and chance value. If a probationary CH receivesProbationary_CH message with higher chance than its own, it withdraws from CH competition by broadcastingQuit_CH message; otherwise it broadcasts theElected_CH message to all nodes within radius Rc. Non-CH nodes join the nearest CH by sendingJoin_Req message. Finally, the newly elected CH nodes generate the TDMA schedule for their members and broadcast it.


#### 3.3.2. Data Collection Phase

The newly elected CHs will be broadcasting TDMA schedule to its members. Then, member nodes send the data to their respective CH only during the allotted time slots. In other time slots, they are in the sleep state to conserve energy. The CH nodes after collecting data from all its members aggregate into a single data message. The aggregated data will be finally reported to BS from CHs. Figure6 depicts the phases in FLECH. During a frame, a member node will transmit data to CH only once. All the CHs should be in wake-up state all through the time unlike member nodes. All these activities of CH lead to increased energy consumption. In order to achieve balanced energy consumption, CH role is rotated among the nodes. Equation (5) shows the total energy spent during data collection from sensor nodes.(5)TE=Eintra-cluster+Einter-cluster,(6)Eintra-cluster=Emem-CH+Erx+EDA.Figure 6
Phases in FLECH.In (6), Emem-CH is the energy for data transmission from members of the corresponding CH, Erx represents data reception energy, and EDA represents data aggregation energy in CHs nodes. (7)Emem-CH=∑i=1k∑j=1mETxj,CHi.In (7), k represents the number of clusters, m is the number of members within a cluster, and ETx(j,CHi) is the transmission energy cost from node j to its CH in the ith cluster. Equation (8) represents the total data aggregation energy in the network(8)EDA=n·m·Eperdatabit,where n is the number of bits and Eperdatabit represents the aggregation energy for a single data bit in (8). In (9) the intercluster energy consumption is represented.(9)Einter-cluster=∑i=1kETxCHi,BS.Equation (10) represents the energy consumption at a CH node under the condition when CH is merely acting as a gateway node for the members and does not generate any data on its own. N denotes total number of nodes in the network, k is the number of clusters, Eelec is the electronics energy, and d is the distance between transmitter and receiver in the following:(10)ECH=n·Eelec+n·EDANk-1+n·Eelec+n·εmp·d4.Equation (11) represents the energy consumption at a CH node when the CH node is also involved in sensing activities and generates the data. In general, BS is assumed to be located outside the AOI and distance between CH and BS is larger. So the multipath loss εmp is considered for the CH to BS communications:(11)ECH=n·EelecNk-1+n·EDANk+n·Eelec+n·εmp·d4.The energy consumption at a member node is depicted in (12). Since the distance between a member and its CH node is minimum, free space loss εfs is considered for member to CH communications. FLECH algorithm is shown in Algorithm 1.(12)Emember=n·Eelec+n·εfs·d2.Algorithm 1:FLECH.
FLECH Algorithm: Input: A non-clustered WSN Output: Clustered WSN ( 1 ) N = Total number of nodes ( 2 ) Pthres = Threshold value used for electing CH ( 3 ) FCH = Array of final cluster heads ( 4 ) FCM = Array of cluster members ( 5 ) i = sensor node ( 6 ) for all the nodes in the networks ( 7 )   x=rand⁡(0,1) ( 8 )   if (x<Pthres) ( 9 )    i = probationary CH ( 10 )   else ( 11 )    i = member ( 12 ) for all the probationary CH nodes (i)k⋅RE = residual energy of the node. (ii)k⋅NC = Centrality of the node within its Network Dimension (iii)k⋅dist_to_BS = Distance to BS (iv) Chance =FuzzyChance(k⋅RE, k⋅NC, k⋅dist⁡_to_BS) (v)  Sendprobationary_CHto all neighbor probationary CH nodes (vi)y = list of all probationary_CH from neighbor nodes (vii) this = current sensor node if(this⋅chance>chance(y)) advertiseElected_CH else broadcastsQuit_CH end ( 13 ) FCH = set of elected CH nodes ( 14 ) FCM = set of non-CH nodes ( 15 ) for all the cluster members ( 16 ) send Join_Req to closest CH ( 17 ) exit


## 3.1. Network Assumptions

(i)
Homogenous network is assumed where all nodes are having equal capabilities in terms of processing power, sensing area, and so forth. (ii)
All nodes are having the same energy level at the time of deployment. (iii)
The nodes are static after deployment in their AOI. (iv)
Received Signal Strength Indicator (RSSI) is used to calculate the distance between nodes. (v)
After deployment, all nodes broadcast a HELLO message which contains its ID within its communication radiusRc. Through this HELLO message only, the number of neighbours and their distance are calculated by each node separately. (vi)
The BS also broadcasts a HELLO message in which its location details are attached. (vii)
Energy depletion alone is the reason behind node death.


## 3.2. Fuzzy System in FLECH

Residual energy,node centrality, anddistance to BS are the input variables in FLECH.(i) Residual Energy. It is an important factor for electing a node as CH since a CH node has to spend more energy than a member node. A CH node collects data from members, aggregates the collected data, and communicates it to BS. So, competent energy level is required for a CH for executing the above-mentioned activities.(ii) Node Centrality (NC). Total number of one-hop adjacent nodes within Rc of a node is called node degree. Node centrality is a factor which determines how a node is located in the middle among its neighbours. Lower NC value gives more chance of electing a node as CH:(3)NC=∑i=1NDdisti2/NDNtk_Dimension.In (3) ND (node degree) corresponds to number of neighbours within the communication radius Rc of a node and Ntk_Dimension value is “M” in M×M field area and disti2 represents distance with the ith neighbor node. That is, in 100 m × 100 m field area, Ntk_Dimension is 100 and 200 m × 200 m field area and Ntk_Dimension is 200.(iii) Distance to BS. The energy consumption for transmitting data increases with the increase in distance between transmitter and receiver nodes. From an energy conservation perspective, the distance between CH and BS should be minimized:(4)Distance  to  BS=diα·Ntk_Dimension,α=dmaxNtk_Dimension.In (4) di is the distance between node i and the BS, dmax is the maximum distance between a node in the network and the BS, and α is the network dimension specific constant.FLECH has one output variableChance.(i) Chance. It is a crisp output value based on which CH capability of a node is determined. The higherchance value represents higher chance of a node in getting elected as a CH.Low, Medium, andHigh are the fuzzy linguistic variables forresidual energy as shown in Figure 2.Close, Reachable, andDistant fornode centrality andNearby,Average, andFar fordistance to BS are shown in Figures 3 and 4, respectively.Low,High, Close, Distant, Nearby, andFar follow trapezoidal membership function, whereasMedium,Reachable, andAverage follow triangular membership function.Figure 2
Fuzzy set for the input variableresidual energy.Figure 3
Fuzzy set for the input variablenode centrality.Figure 4
Fuzzy set for the input variabledistance to BS.The output variablechance has nine output linguistic variables and they arevery low, low, rather low, low medium, medium, high medium, rather high, high,andvery high. In thisvery low andvery high follow trapezoidal membership function. The remaining output linguistic variables follow triangular membership function. Figure 5 shows thechance membership functions.Figure 5
Fuzzy set for the output variablechance.The crisp input values are converted into fuzzy linguistic variable based on the given membership function in FIS. Then the fuzzy if-then rules developed based on Mamdani [16] method are used to map the input variables to appropriate fuzzy output variables. In total, 27 fuzzy if-then rules are presented in Table 1. The crisp output values are obtained using Center of Area (CoA) method.Table 1
FLECH fuzzy if-then rules.
S. number Residual energy Node centrality Distance to BS Chance 1 Low Close Nearby Rather low 2 Low Reachable Nearby Low 3 Low Distant Nearby Very low 4 Low Close Average Rather low 5 Low Reachable Average Low 6 Low Distant Average Very low 7 Low Close Far Rather low 8 Low Reachable Far Low 9 Low Distant Far Very low 10 Medium Close Nearby Rather medium 11 Medium Reachable Nearby Medium 12 Medium Distant Nearby Low medium 13 Medium Close Average Rather medium 14 Medium Reachable Average Medium 15 Medium Distant Average Low medium 16 Medium Close Far Rather medium 17 Medium Reachable Far Medium 18 Medium Distant Far Low medium 19 High Close Near Very high 20 High Reachable Near High 21 High Distant Near Rather high 22 High Close Average Very high 23 High Reachable Average High 24 High Distant Average Rather high 25 High Close Far Very high 26 High Reachable Far High 27 High Distant Far Rather high


## 3.3. Clustering Process

FLECH has two operative phases: (i) cluster formation phase and (ii) data collection phase.


### 3.3.1. Cluster Formation Phase

At the start of a round, each node has to generate a random value between 0 and 1. The nodes whose generated random value is less than the predetermined threshold valuePthres are elected as a probationary CH node. The probationary CH nodes will compute their chance value using FIS and broadcastProbationary_CH message to all nodes coming under their communication radius Rc. TheProbationary_CH message will contain details such as node id and chance value. If a probationary CH receivesProbationary_CH message with higher chance than its own, it withdraws from CH competition by broadcastingQuit_CH message; otherwise it broadcasts theElected_CH message to all nodes within radius Rc. Non-CH nodes join the nearest CH by sendingJoin_Req message. Finally, the newly elected CH nodes generate the TDMA schedule for their members and broadcast it.


### 3.3.2. Data Collection Phase

The newly elected CHs will be broadcasting TDMA schedule to its members. Then, member nodes send the data to their respective CH only during the allotted time slots. In other time slots, they are in the sleep state to conserve energy. The CH nodes after collecting data from all its members aggregate into a single data message. The aggregated data will be finally reported to BS from CHs. Figure6 depicts the phases in FLECH. During a frame, a member node will transmit data to CH only once. All the CHs should be in wake-up state all through the time unlike member nodes. All these activities of CH lead to increased energy consumption. In order to achieve balanced energy consumption, CH role is rotated among the nodes. Equation (5) shows the total energy spent during data collection from sensor nodes.(5)TE=Eintra-cluster+Einter-cluster,(6)Eintra-cluster=Emem-CH+Erx+EDA.Figure 6
Phases in FLECH.In (6), Emem-CH is the energy for data transmission from members of the corresponding CH, Erx represents data reception energy, and EDA represents data aggregation energy in CHs nodes. (7)Emem-CH=∑i=1k∑j=1mETxj,CHi.In (7), k represents the number of clusters, m is the number of members within a cluster, and ETx(j,CHi) is the transmission energy cost from node j to its CH in the ith cluster. Equation (8) represents the total data aggregation energy in the network(8)EDA=n·m·Eperdatabit,where n is the number of bits and Eperdatabit represents the aggregation energy for a single data bit in (8). In (9) the intercluster energy consumption is represented.(9)Einter-cluster=∑i=1kETxCHi,BS.Equation (10) represents the energy consumption at a CH node under the condition when CH is merely acting as a gateway node for the members and does not generate any data on its own. N denotes total number of nodes in the network, k is the number of clusters, Eelec is the electronics energy, and d is the distance between transmitter and receiver in the following:(10)ECH=n·Eelec+n·EDANk-1+n·Eelec+n·εmp·d4.Equation (11) represents the energy consumption at a CH node when the CH node is also involved in sensing activities and generates the data. In general, BS is assumed to be located outside the AOI and distance between CH and BS is larger. So the multipath loss εmp is considered for the CH to BS communications:(11)ECH=n·EelecNk-1+n·EDANk+n·Eelec+n·εmp·d4.The energy consumption at a member node is depicted in (12). Since the distance between a member and its CH node is minimum, free space loss εfs is considered for member to CH communications. FLECH algorithm is shown in Algorithm 1.(12)Emember=n·Eelec+n·εfs·d2.Algorithm 1:FLECH.
FLECH Algorithm: Input: A non-clustered WSN Output: Clustered WSN ( 1 ) N = Total number of nodes ( 2 ) Pthres = Threshold value used for electing CH ( 3 ) FCH = Array of final cluster heads ( 4 ) FCM = Array of cluster members ( 5 ) i = sensor node ( 6 ) for all the nodes in the networks ( 7 )   x=rand⁡(0,1) ( 8 )   if (x<Pthres) ( 9 )    i = probationary CH ( 10 )   else ( 11 )    i = member ( 12 ) for all the probationary CH nodes (i)k⋅RE = residual energy of the node. (ii)k⋅NC = Centrality of the node within its Network Dimension (iii)k⋅dist_to_BS = Distance to BS (iv) Chance =FuzzyChance(k⋅RE, k⋅NC, k⋅dist⁡_to_BS) (v)  Sendprobationary_CHto all neighbor probationary CH nodes (vi)y = list of all probationary_CH from neighbor nodes (vii) this = current sensor node if(this⋅chance>chance(y)) advertiseElected_CH else broadcastsQuit_CH end ( 13 ) FCH = set of elected CH nodes ( 14 ) FCM = set of non-CH nodes ( 15 ) for all the cluster members ( 16 ) send Join_Req to closest CH ( 17 ) exit


## 3.3.1. Cluster Formation Phase

At the start of a round, each node has to generate a random value between 0 and 1. The nodes whose generated random value is less than the predetermined threshold valuePthres are elected as a probationary CH node. The probationary CH nodes will compute their chance value using FIS and broadcastProbationary_CH message to all nodes coming under their communication radius Rc. TheProbationary_CH message will contain details such as node id and chance value. If a probationary CH receivesProbationary_CH message with higher chance than its own, it withdraws from CH competition by broadcastingQuit_CH message; otherwise it broadcasts theElected_CH message to all nodes within radius Rc. Non-CH nodes join the nearest CH by sendingJoin_Req message. Finally, the newly elected CH nodes generate the TDMA schedule for their members and broadcast it.


## 3.3.2. Data Collection Phase

The newly elected CHs will be broadcasting TDMA schedule to its members. Then, member nodes send the data to their respective CH only during the allotted time slots. In other time slots, they are in the sleep state to conserve energy. The CH nodes after collecting data from all its members aggregate into a single data message. The aggregated data will be finally reported to BS from CHs. Figure6 depicts the phases in FLECH. During a frame, a member node will transmit data to CH only once. All the CHs should be in wake-up state all through the time unlike member nodes. All these activities of CH lead to increased energy consumption. In order to achieve balanced energy consumption, CH role is rotated among the nodes. Equation (5) shows the total energy spent during data collection from sensor nodes.(5)TE=Eintra-cluster+Einter-cluster,(6)Eintra-cluster=Emem-CH+Erx+EDA.Figure 6
Phases in FLECH.In (6), Emem-CH is the energy for data transmission from members of the corresponding CH, Erx represents data reception energy, and EDA represents data aggregation energy in CHs nodes. (7)Emem-CH=∑i=1k∑j=1mETxj,CHi.In (7), k represents the number of clusters, m is the number of members within a cluster, and ETx(j,CHi) is the transmission energy cost from node j to its CH in the ith cluster. Equation (8) represents the total data aggregation energy in the network(8)EDA=n·m·Eperdatabit,where n is the number of bits and Eperdatabit represents the aggregation energy for a single data bit in (8). In (9) the intercluster energy consumption is represented.(9)Einter-cluster=∑i=1kETxCHi,BS.Equation (10) represents the energy consumption at a CH node under the condition when CH is merely acting as a gateway node for the members and does not generate any data on its own. N denotes total number of nodes in the network, k is the number of clusters, Eelec is the electronics energy, and d is the distance between transmitter and receiver in the following:(10)ECH=n·Eelec+n·EDANk-1+n·Eelec+n·εmp·d4.Equation (11) represents the energy consumption at a CH node when the CH node is also involved in sensing activities and generates the data. In general, BS is assumed to be located outside the AOI and distance between CH and BS is larger. So the multipath loss εmp is considered for the CH to BS communications:(11)ECH=n·EelecNk-1+n·EDANk+n·Eelec+n·εmp·d4.The energy consumption at a member node is depicted in (12). Since the distance between a member and its CH node is minimum, free space loss εfs is considered for member to CH communications. FLECH algorithm is shown in Algorithm 1.(12)Emember=n·Eelec+n·εfs·d2.Algorithm 1:FLECH.
FLECH Algorithm: Input: A non-clustered WSN Output: Clustered WSN ( 1 ) N = Total number of nodes ( 2 ) Pthres = Threshold value used for electing CH ( 3 ) FCH = Array of final cluster heads ( 4 ) FCM = Array of cluster members ( 5 ) i = sensor node ( 6 ) for all the nodes in the networks ( 7 )   x=rand⁡(0,1) ( 8 )   if (x<Pthres) ( 9 )    i = probationary CH ( 10 )   else ( 11 )    i = member ( 12 ) for all the probationary CH nodes (i)k⋅RE = residual energy of the node. (ii)k⋅NC = Centrality of the node within its Network Dimension (iii)k⋅dist_to_BS = Distance to BS (iv) Chance =FuzzyChance(k⋅RE, k⋅NC, k⋅dist⁡_to_BS) (v)  Sendprobationary_CHto all neighbor probationary CH nodes (vi)y = list of all probationary_CH from neighbor nodes (vii) this = current sensor node if(this⋅chance>chance(y)) advertiseElected_CH else broadcastsQuit_CH end ( 13 ) FCH = set of elected CH nodes ( 14 ) FCM = set of non-CH nodes ( 15 ) for all the cluster members ( 16 ) send Join_Req to closest CH ( 17 ) exit


## 4. Experimental Setup

The proposed work FLECH is compared with LEACH, CHEF, ECPF, EAUCF, and MOFCA. LEACH is considered since it is the base for all the distributed clustering protocols for WSN. ECPF, CHEF, EAUCF, and MOFCA are used in comparison since these algorithms use fuzzy logic for clustering in WSN. MOFCA is a recent clustering algorithm for nonuniform WSN. Most of the clustering algorithms designed for WSN are found to be suitable for specific network field size. In order to verify the efficiency of FLECH over other clustering algorithms, four different network scenarios are considered. In all of the four network scenarios, two cases are considered: (i) BS is located within AOI, that is, at the centre of AOI, and (ii) BS is located away from AOI. Figures7 and 8 depict the above two cases.Figure 7
Representative network snap shot with BS in the middle of AOI.Figure 8
Representative network snap shot with BS outside AOI.In all the scenarios, performance of the above-mentioned clustering algorithms is verified by using network size of 100, 200, 300, and 400 nodes The network scenarios are given below.Scenario 1.
Nodes are randomly deployed over the area of 100 m × 100 m. The BS is located at the coordinate(50,50).Scenario 2.
Nodes are randomly deployed over the area of 100 m × 100 m. The BS is located at the coordinate(50,175).Scenario 3.
Nodes are randomly deployed over the area of 200 m × 200 m. The BS is located at the coordinate(100,100).Scenario 4.
Nodes are randomly deployed over the area of 200 m × 200 m. The BS is located at the coordinate(100,275).The communication model used in [13] is followed in this experimental setup also:(13)Transmission  energy,ETx=n·Eelec+εfs·d2d≤d0n·Eelec+εmp·d4d>d0,Receiving  energy,ERx=n·Eelec.In (13), n denotes the number of transmission bits, Eelec is the electronics energy or circuit loss, εfs represents power loss in free space propagation model and εmp represents the power loss in multipath propagation model, d represents the distance between transmitter and receiver nodes, and d0 is the threshold distance for determining whether free space or multipath propagation is going to be followed. Table 2 depicts the simulation values for various parameters.Table 2
Simulation values.
Parameters Values E e l e c 50 nJ bit−1 ε f s 10pJ bit−1 ε m p 0.0013 pJ bit−1 d 0 – distance 87 m Initial energy 1 J Data message 4000 bits Control message 200 bits Frames per round 5The control messages are associated with cluster formation activities. The data messages are the data sent by member nodes to CH and from CH to the BS. Data message is of the size of 4000 bits which is much larger than control messages which are only 200 bits. During a frame in the round, the members will be transmitting its data to the CH in its time slot. At the end of each frame, the aggregated data from CH will be communicated to the BS. The data aggregation energy isEDA=5 nJ per bit. And in a frame only one data packet will be transmitted from a member to the CH. The transmission and reception cost will be subtracted in the respective node’s energy level.The desired CH percentage for LEACH is 0.1 in all four scenarios.Popt in CHEF, EAUCF, and MOFCA is set at 0.3. The threshold value Pthres in FLECH is set as 0.1 since it gives better results. Rc of the sensor nodes is set as 25 m like in MICA motes for all the scenarios. Rc is mainly used for finding number of neighbours within that radius and forming the clusters with that as boundary radius. But when a node gets elected as CH, it is capable of sending data to distant points away from Rc by increasing its transmission power. So the direct data transmission from CHs to the BS is possible. In all the simulations, for all the clustering algorithms, the CHs are directly transmitting the aggregated data to the BS. All the results presented are based on 100 simulation runs in our simulator. For each scenario and for each case under that scenario, 10 simulation runs are conducted in different network topology and totally 100 simulations are conducted for all four scenarios.A simulator is developed in MATLAB for comparing the performance of FLECH with other clustering algorithms such as LEACH, CHEF, ECPF, EAUCF, and MOFCA in nonuniform node distribution condition. The nonuniform node deployment is done manually by arranging more number of nodes in certain areas and very less number of nodes in some other areas. The fuzzy inference system (FIS) is built using the toolbox environment in MATLAB for FLECH, MOFCA, EAUCF, ECPF, and CHEF.


## 5. Results and Analysis

The results are analysed with respect to the following two categories.Network Lifetime. Various metrics are there to denote the lifetime of the WSN. But here, First Node Die (FND) and Half Node Die (HND) are used to compare and analyse the network. FND is the number of completed rounds till the death of the first sensor node in the network and HND is equal to death of 50% of sensor nodes. FND has been considered since the stability period depends on it. After 50% of nodes die, the reliability of the network is completely lost. So the lifetime is considered up to HND only.Average Energy Consumption per Round. The average energy consumption during a round in all the clustering algorithms till First Node Die (FND). The FND is taken since it represents the stability period of the network.FLECH is evaluated with LEACH, CHEF, ECPF, EAUCF, and MOFCA by FND and HND in all the four scenarios mentioned.


### 5.1. Network Lifetime

In all the scenarios, ECPF suffers a lot because of pure metric based election of CH which is not suitable for a nonuniform network. In the case of ECPF, the highly suitable nodes are frequently elected as CH which causes premature death of certain nodes. LEACH comes next to ECPF whereas LEACH elects CH through pure probabilistic way. FLECH gives better improved performance than all other algorithms in all the scenarios and this happened because of consideration of various factors like residual energy, node centrality, and distance to BS for electing a CH node. FLECH ensures the proper rotation of CH responsibility among all the nodes through the initial probabilistic way of electing the probationary CH and metric based final CH election. Also, FLECH is designed in such a way it is suitable for various sizes and scale of the network.


#### 5.1.1. Scenario1

Figures9 and 10 depict the network lifetime in Scenario 1 with network size of 100 nodes and 200 nodes, respectively. Comparing with other scenarios, more rounds are achieved in this scenario due to the location of BS at the centre of AOI. FLECH performance is better than all other clustering algorithms because of its appropriate input variables. CHEF achieves increased lifetime than EAUCF, MOFCA, and ECPF. In both EAUCF and MOFCA, the output fuzzy variable is competition radius, where the competition for CH occurs between tentative CHs within that competition radius. But in CHEF and FLECH, the output fuzzy variable is the chance of a tentative CH to become a CH node. Also, it is observed from Figures 9 and 10 that increasing the number of nodes in AOI increases FND considerably. But in the case of LEACH and ECPF, an increase in the number of nodes reduces its FND because of their respective pure probabilistic and weight based approaches.Figure 9
Network lifetime in Scenario1 with 100 nodes.Figure 10
Network lifetime in Scenario1 with 200 nodes.Table3 depicts the simulation results for Scenario 1. In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 107%, CHEF by 1.9%, ECPF by 29.1%, EAUCF by 9.27%, and MOFCA by 8.59%. On considering HND, FLECH is better than LEACH by 11.31%, CHEF by 3.25%, ECPF by 3%, EAUCF by 7.53%, and MOFCA by 9.04%.Table 3
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 335 769 300 743 CHEF 682 829 726 842 ECPF 538 831 479 843 EAUCF 636 796 685 810 MOFCA 640 785 683 784 FLECH 695 856 731 872In a 200-node setup, on considering FND, FLECH is better than LEACH by 143.55%, ECPF by 52.60%, EAUCF by 6.71%, and MOFCA by 8%. On considering HND, FLECH shows improvement compared to LEACH by 17.36%, CHEF by 3.56%, ECPF by 3.44%, EAUCF by 7.65%, and MOFCA by 11.22%.


#### 5.1.2. Scenario2

This scenario corresponds to location of BS outside the AOI in 100 m × 100 m setup. As like in Scenario1, here also two different network sizes of 100 and 200 nodes are considered. Figure 11 shows network lifetime for 100 nodes setup and Figure 12 depicts network lifetime for 200-node setup. FLECH shows increased FND compared to other algorithms in both cases. In case of HND, EAUCF and MOFCA show slight improvement over FLECH. Table 4 depicts the simulation results for Scenario 2.Table 4
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 69 388 80 438 CHEF 106 500 142 652 ECPF 41 441 36 602 EAUCF 105 572 132 686 MOFCA 134 571 126 693 FLECH 156 560 203 666Figure 11
Network lifetime in Scenario2 with 100 nodes.Figure 12
Network lifetime in Scenario2 with 200 nodes.In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 126.08%, CHEF by 47.16%, ECPF by 280.48%, EAUCF by 48.57%, and MOFCA by 16.41%. On considering HND, FLECH is better than LEACH by 44.32%, CHEF by 12%, and ECPF by 26.98%. In HND condition, EAUCF and MOFCA show slightly higher number of rounds than FLECH.In a 200-node setup, on considering FND, FLECH is better than LEACH by 153.75%, CHEF by 42.95%, ECPF by 463.88%, EAUCF by 53.78%, and MOFCA by 61.11%. On considering HND, FLECH shows improvement compared to LEACH by 52.05%, CHEF by 2.14%, and ECPF by 10.63%. Like in 100-node setup, here also EAUCF and MOFCA show higher number of rounds.


#### 5.1.3. Scenario3

In this scenario, bigger deployment area of 200 m × 200 m is taken for simulation. In 200 m × 200 m area, network sizes of 200, 300, and 400 nodes are taken for simulations. In Scenario3, BS is located within the AOI. In order to verify the performance of proposed and existing algorithms in different network sizes, Scenarios 3 and 4 are considered. Figures 13, 14, and 15 depict the network lifetime for 200, 300, and 400 nodes, respectively. In all the network size setups, FLECH shows improved lifetime than other algorithms in FND condition. In HND case, FLECH performance is nearly equal with CHEF, ECPF, EAUCF, and MOFCA. LEACH performance is poor in HND condition compared to all others due to pure probabilistic approach.Figure 13
Network lifetime in Scenario3 with 200 nodes.Figure 14
Network lifetime in Scenario3 with 300 nodes.Figure 15
Network lifetime in Scenario3 with 400 nodes.Table5 depicts the simulation results for Scenario 3. In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 147.66%, CHEF by 9.05%, ECPF by 85.31%, EAUCF by 35.20%, and MOFCA by 46.40%. On considering HND, FLECH is better than LEACH by 63.85%, CHEF by 1.79%, and ECPF by 4.08%. In HND condition, FLECH performance is similar to EAUCF and MOFCA.Table 5
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 107 451 155 581 136 614 CHEF 243 726 326 758 321 790 ECPF 143 710 141 758 113 787 EAUCF 196 738 207 750 280 775 MOFCA 181 731 229 745 300 762 FLECH 265 739 362 761 417 785In a 300-node setup, on considering FND, FLECH is better than LEACH by 133.54%, CHEF by 11.04%, ECPF by 156.73%, EAUCF by 74.87%, and MOFCA by 58.07%. On considering HND, FLECH shows improvement compared to LEACH by 30.98%. CHEF, ECPF, EAUCF, and MOFCA show similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime compared to LEACH by 206.61%, CHEF by 29.90%, ECPF by 269.02%, EAUCF by 48.92%, and MOFCA by 39%. On considering HND, FLECH is better than LEACH by 27.85% and MOFCA by 3.01%. CHEF, ECPF, and EAUCF show similar performance to FLECH.


#### 5.1.4. Scenario4

Like Scenario3, in Scenario 4 also deployment area is the same, that is, 200 m × 200 m, but the BS is located outside the AOI in Scenario 4. Comparing with all other scenarios, in this scenario number of rounds will be very less due to long distance BS from the nodes. FLECH performance is better than others in this scenario also. CHEF shows betterment than other fuzzy clustering algorithms such as MOFCA, EAUCF, and ECPF and comes next to FLECH. Pure weight based CH election affects the network lifetime of ECPF a lot. Figures 16, 17, and 18 depicts the network lifetime of 200-, 300-, and 400-node setup, respectively. Table 6 depicts the simulation results for Scenario 4.Table 6
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 10 161 13 173 17 180 CHEF 19 168 14 185 13 215 ECPF 8 115 8 156 7 197 EAUCF 13 160 13 197 14 218 MOFCA 13 215 16 261 13 281 FLECH 25 217 35 259 24 294Figure 16
Network lifetime in Scenario4 with 200 nodes.Figure 17
Network lifetime in Scenario4 with 300 nodes.Figure 18
Network lifetime in Scenario4 with 400 nodes.In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 150%, CHEF by 31.57%, ECPF by 212.5%, EAUCF by 92.30%, and MOFCA by 92.30%. On considering HND, FLECH is better than LEACH by 34.78%, CHEF by 29.16%, ECPF by 88.69%, and EAUCF by 35.62%. In HND condition, MOFCA performance is similar to FLECH.In a 300-node setup, on considering FND, FLECH is better than LEACH by 169.23%, CHEF by 150%, ECPF by 337.5%, EAUCF by 169.23%, and MOFCA by 118.75%. On considering HND, FLECH shows improvement compared to LEACH by 49.71%, CHEF by 40%, ECPF by 66%, and EAUCF by 31.47%. In HND condition, MOFCA shows similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime than LEACH by 41.17%, CHEF by 84.61%, ECPF by 242.85%, EAUCF by 71.42%, and MOFCA by 84.61%. On considering HND, FLECH is better than LEACH by 63.33%, CHEF by 36.74%, ECPF by 50%, EAUCF by 34.86%, and MOFCA by 4.62%.


### 5.2. Average Energy Consumption per Round

Table7 depicts the average energy consumption per round by all the clustering algorithms in Scenarios 1 and 2. It includes the cluster formation cost and intracluster and intercluster energy cost for all the frames during a round. Comparing with other clustering algorithms LEACH gives the poor performance because of poor clustering. Most of the times in LEACH, the unsuitable nodes are getting elected as CH which leads to higher intracluster and intercluster communication cost. It can be observed from the table that the average energy consumption by FLECH is less than other algorithms in all the cases.Table 7
Average energy consumption per round in Scenarios1 and 2.
Algorithms 100 nodes 200 nodes BS inside AOI BS outside AOI BS inside AOI BS outside AOI LEACH 0.1137 0.26116 0.2180 0.45584 CHEF 0.1103 0.20882 0.2161 0.3225 ECPF 0.1106 0.2439 0.2169 0.35422 EAUCF 0.1151 0.1853 0.2285 0.30576 MOFCA 0.1177 0.18324 0.2331 0.3163 FLECH 0.1098 0.1792 0.2151 0.30292Table8 shows the average energy consumed per round by the clustering algorithms for Scenarios 3 and 4. Also it is observed from Table 8 that when the number of nodes increases, average energy consumption difference between FLECH and other algorithms also increases which proves that FLECH is scalable with network size than others. All the specified values in Tables 7 and 8 are in Joules.Table 8
Average energy consumption per round in Scenarios3 and 4.
Algorithms 200 nodes 300 nodes 400 nodes BS inside AOI BS outside AOI BS inside AOI BS outside AOI BS inside AOI BS outside AOI LEACH 0.2817 1.48146 0.3965 2.06642 0.5123 2.58728 CHEF 0.2698 1.56976 0.3848 1.86332 0.4915 2.14672 ECPF 0.2870 2.05182 0.4040 2.23108 0.5043 2.41602 EAUCF 0.2696 1.52638 0.3882 1.9602 0.5011 2.25538 MOFCA 0.2729 1.3293 0.3911 1.7842 0.5135 2.1075 FLECH 0.2628 1.07176 0.3742 1.31048 0.4846 1.5852


### 5.3. Scalability and Complexity Analysis of FLECH

#### 5.3.1. Scalability Analysis

To verify the scalability of FLECH, simulations are conducted in the larger AOI of 1000 m × 1000 m area with 1000 nodes. In this case also, BS is located within and outside the AOI. In both cases, FLECH is better than other algorithms in HND condition and FND condition is nearly the same for all the algorithms. Table9 depicts FND and HND for 1000-node setup.Table 9 Algorithms BS within AOI BS outside AOI FND HND FND HND LEACH 1 8 1 3 CHEF 1 20 1 4 ECPF 1 7 1 3 EAUCF 1 14 1 4 MOFCA 1 14 1 4 FLECH 1 31 1 5


#### 5.3.2. Complexity Analysis

There aren numbers of nodes in the network, so it takes maximum of n fuzzy computation for getting the chance value of each node. At the worst case, it may take (n-1) numbers of comparison of chance for a node to get elected as CH. So in total, n(n-1) number of computations occurs for CH election. In Big O notation, FLECH complexity is of O(n2-1) which is again equal to O(n2).


## 5.1. Network Lifetime

In all the scenarios, ECPF suffers a lot because of pure metric based election of CH which is not suitable for a nonuniform network. In the case of ECPF, the highly suitable nodes are frequently elected as CH which causes premature death of certain nodes. LEACH comes next to ECPF whereas LEACH elects CH through pure probabilistic way. FLECH gives better improved performance than all other algorithms in all the scenarios and this happened because of consideration of various factors like residual energy, node centrality, and distance to BS for electing a CH node. FLECH ensures the proper rotation of CH responsibility among all the nodes through the initial probabilistic way of electing the probationary CH and metric based final CH election. Also, FLECH is designed in such a way it is suitable for various sizes and scale of the network.


### 5.1.1. Scenario1

Figures9 and 10 depict the network lifetime in Scenario 1 with network size of 100 nodes and 200 nodes, respectively. Comparing with other scenarios, more rounds are achieved in this scenario due to the location of BS at the centre of AOI. FLECH performance is better than all other clustering algorithms because of its appropriate input variables. CHEF achieves increased lifetime than EAUCF, MOFCA, and ECPF. In both EAUCF and MOFCA, the output fuzzy variable is competition radius, where the competition for CH occurs between tentative CHs within that competition radius. But in CHEF and FLECH, the output fuzzy variable is the chance of a tentative CH to become a CH node. Also, it is observed from Figures 9 and 10 that increasing the number of nodes in AOI increases FND considerably. But in the case of LEACH and ECPF, an increase in the number of nodes reduces its FND because of their respective pure probabilistic and weight based approaches.Figure 9
Network lifetime in Scenario1 with 100 nodes.Figure 10
Network lifetime in Scenario1 with 200 nodes.Table3 depicts the simulation results for Scenario 1. In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 107%, CHEF by 1.9%, ECPF by 29.1%, EAUCF by 9.27%, and MOFCA by 8.59%. On considering HND, FLECH is better than LEACH by 11.31%, CHEF by 3.25%, ECPF by 3%, EAUCF by 7.53%, and MOFCA by 9.04%.Table 3
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 335 769 300 743 CHEF 682 829 726 842 ECPF 538 831 479 843 EAUCF 636 796 685 810 MOFCA 640 785 683 784 FLECH 695 856 731 872In a 200-node setup, on considering FND, FLECH is better than LEACH by 143.55%, ECPF by 52.60%, EAUCF by 6.71%, and MOFCA by 8%. On considering HND, FLECH shows improvement compared to LEACH by 17.36%, CHEF by 3.56%, ECPF by 3.44%, EAUCF by 7.65%, and MOFCA by 11.22%.


### 5.1.2. Scenario2

This scenario corresponds to location of BS outside the AOI in 100 m × 100 m setup. As like in Scenario1, here also two different network sizes of 100 and 200 nodes are considered. Figure 11 shows network lifetime for 100 nodes setup and Figure 12 depicts network lifetime for 200-node setup. FLECH shows increased FND compared to other algorithms in both cases. In case of HND, EAUCF and MOFCA show slight improvement over FLECH. Table 4 depicts the simulation results for Scenario 2.Table 4
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 69 388 80 438 CHEF 106 500 142 652 ECPF 41 441 36 602 EAUCF 105 572 132 686 MOFCA 134 571 126 693 FLECH 156 560 203 666Figure 11
Network lifetime in Scenario2 with 100 nodes.Figure 12
Network lifetime in Scenario2 with 200 nodes.In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 126.08%, CHEF by 47.16%, ECPF by 280.48%, EAUCF by 48.57%, and MOFCA by 16.41%. On considering HND, FLECH is better than LEACH by 44.32%, CHEF by 12%, and ECPF by 26.98%. In HND condition, EAUCF and MOFCA show slightly higher number of rounds than FLECH.In a 200-node setup, on considering FND, FLECH is better than LEACH by 153.75%, CHEF by 42.95%, ECPF by 463.88%, EAUCF by 53.78%, and MOFCA by 61.11%. On considering HND, FLECH shows improvement compared to LEACH by 52.05%, CHEF by 2.14%, and ECPF by 10.63%. Like in 100-node setup, here also EAUCF and MOFCA show higher number of rounds.


### 5.1.3. Scenario3

In this scenario, bigger deployment area of 200 m × 200 m is taken for simulation. In 200 m × 200 m area, network sizes of 200, 300, and 400 nodes are taken for simulations. In Scenario3, BS is located within the AOI. In order to verify the performance of proposed and existing algorithms in different network sizes, Scenarios 3 and 4 are considered. Figures 13, 14, and 15 depict the network lifetime for 200, 300, and 400 nodes, respectively. In all the network size setups, FLECH shows improved lifetime than other algorithms in FND condition. In HND case, FLECH performance is nearly equal with CHEF, ECPF, EAUCF, and MOFCA. LEACH performance is poor in HND condition compared to all others due to pure probabilistic approach.Figure 13
Network lifetime in Scenario3 with 200 nodes.Figure 14
Network lifetime in Scenario3 with 300 nodes.Figure 15
Network lifetime in Scenario3 with 400 nodes.Table5 depicts the simulation results for Scenario 3. In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 147.66%, CHEF by 9.05%, ECPF by 85.31%, EAUCF by 35.20%, and MOFCA by 46.40%. On considering HND, FLECH is better than LEACH by 63.85%, CHEF by 1.79%, and ECPF by 4.08%. In HND condition, FLECH performance is similar to EAUCF and MOFCA.Table 5
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 107 451 155 581 136 614 CHEF 243 726 326 758 321 790 ECPF 143 710 141 758 113 787 EAUCF 196 738 207 750 280 775 MOFCA 181 731 229 745 300 762 FLECH 265 739 362 761 417 785In a 300-node setup, on considering FND, FLECH is better than LEACH by 133.54%, CHEF by 11.04%, ECPF by 156.73%, EAUCF by 74.87%, and MOFCA by 58.07%. On considering HND, FLECH shows improvement compared to LEACH by 30.98%. CHEF, ECPF, EAUCF, and MOFCA show similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime compared to LEACH by 206.61%, CHEF by 29.90%, ECPF by 269.02%, EAUCF by 48.92%, and MOFCA by 39%. On considering HND, FLECH is better than LEACH by 27.85% and MOFCA by 3.01%. CHEF, ECPF, and EAUCF show similar performance to FLECH.


### 5.1.4. Scenario4

Like Scenario3, in Scenario 4 also deployment area is the same, that is, 200 m × 200 m, but the BS is located outside the AOI in Scenario 4. Comparing with all other scenarios, in this scenario number of rounds will be very less due to long distance BS from the nodes. FLECH performance is better than others in this scenario also. CHEF shows betterment than other fuzzy clustering algorithms such as MOFCA, EAUCF, and ECPF and comes next to FLECH. Pure weight based CH election affects the network lifetime of ECPF a lot. Figures 16, 17, and 18 depicts the network lifetime of 200-, 300-, and 400-node setup, respectively. Table 6 depicts the simulation results for Scenario 4.Table 6
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 10 161 13 173 17 180 CHEF 19 168 14 185 13 215 ECPF 8 115 8 156 7 197 EAUCF 13 160 13 197 14 218 MOFCA 13 215 16 261 13 281 FLECH 25 217 35 259 24 294Figure 16
Network lifetime in Scenario4 with 200 nodes.Figure 17
Network lifetime in Scenario4 with 300 nodes.Figure 18
Network lifetime in Scenario4 with 400 nodes.In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 150%, CHEF by 31.57%, ECPF by 212.5%, EAUCF by 92.30%, and MOFCA by 92.30%. On considering HND, FLECH is better than LEACH by 34.78%, CHEF by 29.16%, ECPF by 88.69%, and EAUCF by 35.62%. In HND condition, MOFCA performance is similar to FLECH.In a 300-node setup, on considering FND, FLECH is better than LEACH by 169.23%, CHEF by 150%, ECPF by 337.5%, EAUCF by 169.23%, and MOFCA by 118.75%. On considering HND, FLECH shows improvement compared to LEACH by 49.71%, CHEF by 40%, ECPF by 66%, and EAUCF by 31.47%. In HND condition, MOFCA shows similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime than LEACH by 41.17%, CHEF by 84.61%, ECPF by 242.85%, EAUCF by 71.42%, and MOFCA by 84.61%. On considering HND, FLECH is better than LEACH by 63.33%, CHEF by 36.74%, ECPF by 50%, EAUCF by 34.86%, and MOFCA by 4.62%.


## 5.1.1. Scenario1

Figures9 and 10 depict the network lifetime in Scenario 1 with network size of 100 nodes and 200 nodes, respectively. Comparing with other scenarios, more rounds are achieved in this scenario due to the location of BS at the centre of AOI. FLECH performance is better than all other clustering algorithms because of its appropriate input variables. CHEF achieves increased lifetime than EAUCF, MOFCA, and ECPF. In both EAUCF and MOFCA, the output fuzzy variable is competition radius, where the competition for CH occurs between tentative CHs within that competition radius. But in CHEF and FLECH, the output fuzzy variable is the chance of a tentative CH to become a CH node. Also, it is observed from Figures 9 and 10 that increasing the number of nodes in AOI increases FND considerably. But in the case of LEACH and ECPF, an increase in the number of nodes reduces its FND because of their respective pure probabilistic and weight based approaches.Figure 9
Network lifetime in Scenario1 with 100 nodes.Figure 10
Network lifetime in Scenario1 with 200 nodes.Table3 depicts the simulation results for Scenario 1. In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 107%, CHEF by 1.9%, ECPF by 29.1%, EAUCF by 9.27%, and MOFCA by 8.59%. On considering HND, FLECH is better than LEACH by 11.31%, CHEF by 3.25%, ECPF by 3%, EAUCF by 7.53%, and MOFCA by 9.04%.Table 3
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 335 769 300 743 CHEF 682 829 726 842 ECPF 538 831 479 843 EAUCF 636 796 685 810 MOFCA 640 785 683 784 FLECH 695 856 731 872In a 200-node setup, on considering FND, FLECH is better than LEACH by 143.55%, ECPF by 52.60%, EAUCF by 6.71%, and MOFCA by 8%. On considering HND, FLECH shows improvement compared to LEACH by 17.36%, CHEF by 3.56%, ECPF by 3.44%, EAUCF by 7.65%, and MOFCA by 11.22%.


## 5.1.2. Scenario2

This scenario corresponds to location of BS outside the AOI in 100 m × 100 m setup. As like in Scenario1, here also two different network sizes of 100 and 200 nodes are considered. Figure 11 shows network lifetime for 100 nodes setup and Figure 12 depicts network lifetime for 200-node setup. FLECH shows increased FND compared to other algorithms in both cases. In case of HND, EAUCF and MOFCA show slight improvement over FLECH. Table 4 depicts the simulation results for Scenario 2.Table 4
FND and HND for 100 and 200 nodes.
Algorithms 100 nodes 200 nodes FND HND FND HND LEACH 69 388 80 438 CHEF 106 500 142 652 ECPF 41 441 36 602 EAUCF 105 572 132 686 MOFCA 134 571 126 693 FLECH 156 560 203 666Figure 11
Network lifetime in Scenario2 with 100 nodes.Figure 12
Network lifetime in Scenario2 with 200 nodes.In a 100-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 126.08%, CHEF by 47.16%, ECPF by 280.48%, EAUCF by 48.57%, and MOFCA by 16.41%. On considering HND, FLECH is better than LEACH by 44.32%, CHEF by 12%, and ECPF by 26.98%. In HND condition, EAUCF and MOFCA show slightly higher number of rounds than FLECH.In a 200-node setup, on considering FND, FLECH is better than LEACH by 153.75%, CHEF by 42.95%, ECPF by 463.88%, EAUCF by 53.78%, and MOFCA by 61.11%. On considering HND, FLECH shows improvement compared to LEACH by 52.05%, CHEF by 2.14%, and ECPF by 10.63%. Like in 100-node setup, here also EAUCF and MOFCA show higher number of rounds.


## 5.1.3. Scenario3

In this scenario, bigger deployment area of 200 m × 200 m is taken for simulation. In 200 m × 200 m area, network sizes of 200, 300, and 400 nodes are taken for simulations. In Scenario3, BS is located within the AOI. In order to verify the performance of proposed and existing algorithms in different network sizes, Scenarios 3 and 4 are considered. Figures 13, 14, and 15 depict the network lifetime for 200, 300, and 400 nodes, respectively. In all the network size setups, FLECH shows improved lifetime than other algorithms in FND condition. In HND case, FLECH performance is nearly equal with CHEF, ECPF, EAUCF, and MOFCA. LEACH performance is poor in HND condition compared to all others due to pure probabilistic approach.Figure 13
Network lifetime in Scenario3 with 200 nodes.Figure 14
Network lifetime in Scenario3 with 300 nodes.Figure 15
Network lifetime in Scenario3 with 400 nodes.Table5 depicts the simulation results for Scenario 3. In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 147.66%, CHEF by 9.05%, ECPF by 85.31%, EAUCF by 35.20%, and MOFCA by 46.40%. On considering HND, FLECH is better than LEACH by 63.85%, CHEF by 1.79%, and ECPF by 4.08%. In HND condition, FLECH performance is similar to EAUCF and MOFCA.Table 5
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 107 451 155 581 136 614 CHEF 243 726 326 758 321 790 ECPF 143 710 141 758 113 787 EAUCF 196 738 207 750 280 775 MOFCA 181 731 229 745 300 762 FLECH 265 739 362 761 417 785In a 300-node setup, on considering FND, FLECH is better than LEACH by 133.54%, CHEF by 11.04%, ECPF by 156.73%, EAUCF by 74.87%, and MOFCA by 58.07%. On considering HND, FLECH shows improvement compared to LEACH by 30.98%. CHEF, ECPF, EAUCF, and MOFCA show similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime compared to LEACH by 206.61%, CHEF by 29.90%, ECPF by 269.02%, EAUCF by 48.92%, and MOFCA by 39%. On considering HND, FLECH is better than LEACH by 27.85% and MOFCA by 3.01%. CHEF, ECPF, and EAUCF show similar performance to FLECH.


## 5.1.4. Scenario4

Like Scenario3, in Scenario 4 also deployment area is the same, that is, 200 m × 200 m, but the BS is located outside the AOI in Scenario 4. Comparing with all other scenarios, in this scenario number of rounds will be very less due to long distance BS from the nodes. FLECH performance is better than others in this scenario also. CHEF shows betterment than other fuzzy clustering algorithms such as MOFCA, EAUCF, and ECPF and comes next to FLECH. Pure weight based CH election affects the network lifetime of ECPF a lot. Figures 16, 17, and 18 depicts the network lifetime of 200-, 300-, and 400-node setup, respectively. Table 6 depicts the simulation results for Scenario 4.Table 6
FND and HND for 200, 300, and 400 nodes.
Algorithms 200 nodes 300 nodes 400 nodes FND HND FND HND FND HND LEACH 10 161 13 173 17 180 CHEF 19 168 14 185 13 215 ECPF 8 115 8 156 7 197 EAUCF 13 160 13 197 14 218 MOFCA 13 215 16 261 13 281 FLECH 25 217 35 259 24 294Figure 16
Network lifetime in Scenario4 with 200 nodes.Figure 17
Network lifetime in Scenario4 with 300 nodes.Figure 18
Network lifetime in Scenario4 with 400 nodes.In a 200-node setup, considering FND, FLECH increases network lifetime compared to LEACH by 150%, CHEF by 31.57%, ECPF by 212.5%, EAUCF by 92.30%, and MOFCA by 92.30%. On considering HND, FLECH is better than LEACH by 34.78%, CHEF by 29.16%, ECPF by 88.69%, and EAUCF by 35.62%. In HND condition, MOFCA performance is similar to FLECH.In a 300-node setup, on considering FND, FLECH is better than LEACH by 169.23%, CHEF by 150%, ECPF by 337.5%, EAUCF by 169.23%, and MOFCA by 118.75%. On considering HND, FLECH shows improvement compared to LEACH by 49.71%, CHEF by 40%, ECPF by 66%, and EAUCF by 31.47%. In HND condition, MOFCA shows similar performance to FLECH.In a 400-node setup, considering FND, FLECH shows improvement in network lifetime than LEACH by 41.17%, CHEF by 84.61%, ECPF by 242.85%, EAUCF by 71.42%, and MOFCA by 84.61%. On considering HND, FLECH is better than LEACH by 63.33%, CHEF by 36.74%, ECPF by 50%, EAUCF by 34.86%, and MOFCA by 4.62%.


## 5.2. Average Energy Consumption per Round

Table7 depicts the average energy consumption per round by all the clustering algorithms in Scenarios 1 and 2. It includes the cluster formation cost and intracluster and intercluster energy cost for all the frames during a round. Comparing with other clustering algorithms LEACH gives the poor performance because of poor clustering. Most of the times in LEACH, the unsuitable nodes are getting elected as CH which leads to higher intracluster and intercluster communication cost. It can be observed from the table that the average energy consumption by FLECH is less than other algorithms in all the cases.Table 7
Average energy consumption per round in Scenarios1 and 2.
Algorithms 100 nodes 200 nodes BS inside AOI BS outside AOI BS inside AOI BS outside AOI LEACH 0.1137 0.26116 0.2180 0.45584 CHEF 0.1103 0.20882 0.2161 0.3225 ECPF 0.1106 0.2439 0.2169 0.35422 EAUCF 0.1151 0.1853 0.2285 0.30576 MOFCA 0.1177 0.18324 0.2331 0.3163 FLECH 0.1098 0.1792 0.2151 0.30292Table8 shows the average energy consumed per round by the clustering algorithms for Scenarios 3 and 4. Also it is observed from Table 8 that when the number of nodes increases, average energy consumption difference between FLECH and other algorithms also increases which proves that FLECH is scalable with network size than others. All the specified values in Tables 7 and 8 are in Joules.Table 8
Average energy consumption per round in Scenarios3 and 4.
Algorithms 200 nodes 300 nodes 400 nodes BS inside AOI BS outside AOI BS inside AOI BS outside AOI BS inside AOI BS outside AOI LEACH 0.2817 1.48146 0.3965 2.06642 0.5123 2.58728 CHEF 0.2698 1.56976 0.3848 1.86332 0.4915 2.14672 ECPF 0.2870 2.05182 0.4040 2.23108 0.5043 2.41602 EAUCF 0.2696 1.52638 0.3882 1.9602 0.5011 2.25538 MOFCA 0.2729 1.3293 0.3911 1.7842 0.5135 2.1075 FLECH 0.2628 1.07176 0.3742 1.31048 0.4846 1.5852


## 5.3. Scalability and Complexity Analysis of FLECH

### 5.3.1. Scalability Analysis

To verify the scalability of FLECH, simulations are conducted in the larger AOI of 1000 m × 1000 m area with 1000 nodes. In this case also, BS is located within and outside the AOI. In both cases, FLECH is better than other algorithms in HND condition and FND condition is nearly the same for all the algorithms. Table9 depicts FND and HND for 1000-node setup.Table 9 Algorithms BS within AOI BS outside AOI FND HND FND HND LEACH 1 8 1 3 CHEF 1 20 1 4 ECPF 1 7 1 3 EAUCF 1 14 1 4 MOFCA 1 14 1 4 FLECH 1 31 1 5


### 5.3.2. Complexity Analysis

There aren numbers of nodes in the network, so it takes maximum of n fuzzy computation for getting the chance value of each node. At the worst case, it may take (n-1) numbers of comparison of chance for a node to get elected as CH. So in total, n(n-1) number of computations occurs for CH election. In Big O notation, FLECH complexity is of O(n2-1) which is again equal to O(n2).


## 5.3.1. Scalability Analysis

To verify the scalability of FLECH, simulations are conducted in the larger AOI of 1000 m × 1000 m area with 1000 nodes. In this case also, BS is located within and outside the AOI. In both cases, FLECH is better than other algorithms in HND condition and FND condition is nearly the same for all the algorithms. Table9 depicts FND and HND for 1000-node setup.Table 9 Algorithms BS within AOI BS outside AOI FND HND FND HND LEACH 1 8 1 3 CHEF 1 20 1 4 ECPF 1 7 1 3 EAUCF 1 14 1 4 MOFCA 1 14 1 4 FLECH 1 31 1 5


## 5.3.2. Complexity Analysis

There aren numbers of nodes in the network, so it takes maximum of n fuzzy computation for getting the chance value of each node. At the worst case, it may take (n-1) numbers of comparison of chance for a node to get elected as CH. So in total, n(n-1) number of computations occurs for CH election. In Big O notation, FLECH complexity is of O(n2-1) which is again equal to O(n2).


## 6. Conclusion and Future Works

This paper proposed an algorithm FLECH for clustering nonuniform WSN based on fuzzy logic approach. FLECH improves the WSN network lifetime because it takes into account various important parameters that affect the energy consumption by nodes. It is observed that high residual energy alone is not a suitable parameter for electing CHs in nonuniform node deployment. FLECH combines probabilistic and metric based CH election techniques with suitable parameters for CH election in nonuniform WSN. FLECH is simulated along with other clustering algorithms in various scenarios with different network sizes. It is observed from the simulations that when the network size increases FLECH is giving better performance than other algorithms and proves to be scalable. In future, the performance of FLECH may be increased by including more parameters such as coverage redundancy and number of hops between CH and BS.



---

*Source: 1214720-2017-02-20.xml*