An Efficient Protocol using Fuzzy Logic and Grids with Two-Dimensional Techniques for Saving Energy in WSN

This work proposes an energy-saving protocol for wireless sensor networks (WSNs) using fuzzy logic and grids with two-dimensional techniques, namely, gravity and energy centers, to address the pressing issue of energy efficiency in WSNs. The optimal cluster head is chosen in two stages of the proposed protocol to prolong the network lifetime and reduce the energy consumption. The proposed protocol evaluated the cluster-head radius according to the residual energy and distance to the base station(BS) parameters of the sensor nodes. The proposed scheme shows better improvements than other related protocols as it extends the lifetime of Two Dimensional Technique Based On Center of Gravity and Energy Center (TDTCGE) protocol by 54¥% and saves more energy. Fuzzy inference engine (Mamdani's rule) is used to elect the chance to be the best node. The results have been derived from matlab simulator which shows that the proposed protocol performs better than the TDTCGE protocol. Simulation results show also that our protocol offers a much better network lifetime and energy efficiency than other existing protocols. Keywords—Fuzzy logic; fuzzy inference engine; first node die; last node die; energy efficiency; lifetime


INTRODUCTION
Wireless sensor networks(WSNs) are generally utilized in diverse fields, which incorporate catastrophe aid projects and programs for agribusiness and social insurance [1].In any case, its most predominant application is for getting data for savvy gadgets that make up inescapable sensor networks that are generally embraced in structures, homes, and transport and modern frameworks.A WSN is made of individual nodes/sensors that respond to physical parameters in its condition.Be that as it may, these nodes here and there rely upon batteries rather on a wired power supply [2].Given the by and large long activity time in WSNs, such reliance represents an issue, especially as far as the energy productivity of correspondence protocols.In any case, such case isn't constantly watched, as different applications may organize the precision of results over is-sues in power supply [3].A WSN comprises of various arbitrarily or consistently circulated nodes in a sensor field.These nodes are utilized to screen physical conditions, for example, weight and weight on objects, since they can communicate with their condition by detecting outer physical parameters.Nodes and cluster heads (CHs) use Fuzzy rationale, which is a less perplexing legitimate framework, based on Fuzzy factors and if-then rules [6].The proposed protocol will be contrasted and the accompanying past protocols: TDTCGE [7] This protocol utilizes two dimensional techniques (Computes the Center of Gravity for every Grid and Computes the energy Center) to choose the ideal node as a Cluster head by which node is the closest to one of these Centers.The TDTCGE protocol takes care of the issue related with separation and how much more distant the cluster head from the Base station.In any case, it doesn't address the issue of sit without moving tuning in.The consequences of this protocol endorsed that this protocol enhanced the existence time and the energy utilization .In CRCWSN [8] this protocol utilizes two unique techniques for choosing cluster head (CH) that has been at first utilized by hereditary calculation and re-clustering strategy.This protocol thinks about separation and energy parameters.Contrasted with a few other proposed protocols, this protocol made a target work that is more enhanced.It has a mix of chromosomes and timing of age rehash has been finished utilizing another strategy.The CRCWSN is productive and have more life time with diminishing age rehashes contrasted with past comparable techniques.Suitable cluster head (CH) race is one such issue, which can lessen the energy utilization dramatically [11].In this paper we will utilize Fuzzy rationale clustering techniques in WSNs utilize Fuzzy rationale measure's for blending diverse clustering parameters to pick ideal cluster head to choose Cluster Heads [10].constrainedenergy is a conspicuous element for wireless sensor networks.Since the radio handset ordinarily expends a greater number of energies than some other equipment part on a sensor node, it is of awesome significance to plan energy advanced steering calculation to draw out network lifetime [12].The rest of this article is composed as take after.In Section 2, we present the Network model of wireless sensor networks.In Section 3, we www.ijacsa.thesai.orgpresent the star presented protocol in detail.In Section 4, we present our reenactment show and investigate the relative assessment after effects of the proposed plot through reproductions.At long last, a few conclusions are given..

II. LITERATURE REVIEW
The proposed protocol is contrasted and the TDTCGE [5] protocol.
•Two-Dimensional Technique in light of Center of Gravity and Energy (TDTCGE) [5] This protocol utilizes two-dimensional strategies.The focuses of gravity and energy for every framework are processed.The ideal node is chosen to be the cluster head (CH) in light of the fact that this node is the closest to one of the focuses.The TDTCGE protocol tends to the separation issue, especially the separation of the CH from the BS.In any case, the issue of sit out of gear listening is ignored.The aftereffects of this protocol demonstrate that both the lifetime and energy utilization are upgraded.
Fuzzy CLUSTERING ALGOROTHMS(FCA) [13] Some of the clustering calculations utilize Fuzzy rationale to deal with vulnerabilities in the WSNs.Fundamentally; FCAs utilize Fuzzy rationale for mixing distinctive clustering parameters to choose cluster-heads.They appoint opportunities to speculative cluster-heads as indicated by the defuzzified yield of Fuzzy if-then guidelines.The provisional cluster-head turns into a cluster-head in the event that it has the best shot in its region.

Energy aware distributed dynamic clustering protocol
Using fuzzy logic (ECPF) [9] is another fuzzy approach based algorithm for WSN.ECPF has two stages: setup and steady state stage.CH race and cluster development will occur.In setup stage.TDMA outline age and information gathering Occur amid the steady state stage.Node degree and node centrality are the two information variables and fuzzy expense is the yield variable.Every node in the system will sit tight for a postpone time which is contrarily relative to its lingering energy.After lapse of defer time, if a node does not get any provisional CH message from its adjacent nodes, at that point it communicates a provisional CH message containing its id, fuzzy cost, and its status as provisional CH. if a node does not receive any tentative CH message from its nearby nodes, then it broadcasts a tentative 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 broadcast final CH message within its cluster range.
This protocol enhances LEACH protocol utilizing Fuzzy Logic (LEACH-FL) [14], which takes battery level, separation and node density into thought.The proposed technique has been demonstrated improving a determination by examination reenactments utilizing Matlab contrasted and LEACH.
Fuzzy Logic Based Energy Efficient Clustering Hierarchy for No uniform Wireless Sensor Networks (FLECH) [15]This Protocol contributes a novel clustering calculation: Fuzzy Logic Based Energy Efficient Clustering Hierarchy (FLECH) for non-uniform WSN.The clusters in FLECH are made utilizing appropriate parameters which builds the lifetime of the WSN.Fuzzy rationale in FLECH is astutely used to join essential parameters like residual vitality, node centrality, and separation to BS for choosing best appropriate nodes as CH and builds the network lifetime.The reproduction results unmistakably show the lifetime increment by FLECH over different calculations and its energy preservation per round of information gathering in the network.

A. Network Model
For this examination, we arbitrarily convey N sensor nodes in an observed zone and accept that the sensor network has the accompanying qualities: 1) The situation of the BS in the sensor network is settled.
2) All nodes are heterogeneous and stationary and have diverse beginning supplies of vitality.
3) All the nodes are arbitrarily conveyed in the objective zone, and each can build up an association with the sink.

B. Energy Consumption:
Drain [4] incorporates a first-arrange radio model that can be used for computing equipment energy dissemination.For relative purposes, this paper utilizes a similar model.In this model, the energy consumptions of radios for sending and accepting information are both communicated as E elect ; the free space and the multi-path blurring channel models with particular intensifying lists ε fs and ε mp are utilized; the energy utilization of information combination is indicated by E DA .The energy spent by a node that transmits a l-bit packet over separation d is figured utilizing the Heinzelman display.This model expresses that for every node to transmit L bits of information a separation d from itself, E t energy is expended: 1) The energy required to get L bits of information squares with 2) The parameters are characterized as takes after: d0: hybrid separation ∈elect: energyimportant for actuating electronic circuits ∈mp, ∈fs: affectability and clamor in the collector, individually.

IV.
LIMITATION OF THE TDTCGE THAT FLG PROPOSED PROTOCOL WILL SOLVE TheFLG-proposed protocol will be compared with the following protocol: as TDTCGE.This protocol uses twodimensional techniques (Computes the Center of Gravity for each Grid and Computes the energy Center) to select the optimal node as a Cluster head by which node is the nearest to one of these Centers.The TDTCGE protocol didn't solve the problem of the radius distance for each node but it minimize the distance only between the cluster head and the Centers which it's not enough.However, it is of great importance to design optimized routing algorithm to minimize the radius competition and prolong the lifetime of the FND (First node die).www.ijacsa.thesai.orgV.
PROPOSED PROTOCOL Fig. 1.Fuzzy logic process The following four steps of fuzzy logic are used in the fuzzy inference system to compute chance values as shown in figure 1.

1) In fuzzification, crisp input data are translated into the fuzzy set value required by the inference engine.
2) In rule evaluation, a set of fuzzy rules is defined to characterize the dynamic behavior of the system.
3) In aggregation, the inference system draws conclusions from the fuzzy rules and sends the output to the defuzzification unit.
4) In defuzzification, fuzzy sets are mapped into a space of crisp sets.
In our study, we used fuzzy logic to elect CHs, which are selected from a nine-grid BS.In each round, the BS transmits its clustering node information to the member nodes in the nine grids.During CH election, the BS determines three fuzzy sets, namely, the distance between nodes, the distance between nodes and the BS, and the residual energy in each node.

Fig. 2. Model of fuzzy system
Given that fuzzy logic is used, the BS elects CHs according to fuzzy rules.The BS, in which all clustering decisions are derived, then broadcasts the results to the entire network.Using the three criteria, the BS obtains highly precise CHs because its strength is greater than that of normal nodes and it has knowledge of the entire network.
Three criteria in fuzzy CH election (distance between nodes, distance between nodes and the BS, and residual energy in each node) as shown in figure 2, 3,4 and 5.
In the calculations of the radius between nodes, the FLGproposed protocol utilizes residual energy, along with the parameter that measures the distance between nodes and BSs and the distance between two nodes.The residual energy of the CH may be reduced by minimizing the service area.This reduction in residual energy then prompts a change in competition radius; otherwise, the   The proposed protocol comprises the setup and steadystate phases.In the setup phase, the network is separated into nine grids/clusters.Each grid/cluster comprises two centers (center of gravity and energy Table 1.Decision-making criteria for optimal CH center), one CH, and several The following formula is used in the case of more than two object masses:  = (_() * _)/  (6)

A. Fuzzy Ranking System
The proposed protocol comprises the setup and steadystate phases.In the setup phase, the network is separated into nine grids/clusters.Each grid/cluster comprises two centers (center of gravity and energy center), one CH, and several nodes with different energy levels.The setup phase comprises two stages for electing nine CHs: (i) initial fuzzy ranking system election and (ii) fuzzy logic with two-dimensional centers.
Using the fuzzy logic system, the BS ranks the nodes, measures the distances between nodes, and identifies the most energetic node.
As shown in figure 7, The BS selects the first nine nodes with the highest amount of remaining energy as CH candidates after using Table1 DecisionMaking.Fig. 7. Shows the nodes with the highest ranks based on the residual energy criteria; for 100 nodes, the ranking system ranges from 25% to 85%.www.ijacsa.thesai.orgThe BS selects the optimal CH according to the three criteria: distance between nodes, the distance between nodes and the BS, and the residual energy in each node (Table 1).
As shown in Figure .8shows the nodes with the highest ranks ranging from 50% to 67% based on their distance to the BS.
In each round, the proposed protocol involves 9 CHs, 100 nodes, and 1 BS.Thus, the distance from a node to the BS = distance from the node to the (candidate CHs) × distance from the candidate CH × BS.BS = (100 × 9 × 1) = 900.
Finally ,as in figure 9, for the first stage, the BS selects the top nine CHs with the highest percentages of 83%, 80%, 80%, 79%, 77%, 76%, 72%, 71%, and 67%.The selection is based on the ranking of residual energy and the distance between nodes and the BS.

B. 3Fuzzy logic with Gravity and Energy Centers for Other Rounds
In the second stage, the nodes are randomly distributed within the grids.Then, CHs are elected by the BS on the basis of the two-dimensional centers.A node is selected as a CH if it has the shortest distance to the BS and the gravity center, which is near the BS.If a node is far from the gravity center but near the energy center, which is near the BS, this node with the highest energy is selected as the CH.A node is selected as a CH according to the following three criteria if its distances to the two centers are the same: (i) distance to the BS, (ii) distance to other nodes, and (iii) residual energy in the fuzzy logic system

C. 3Steady-State Phase
In the steady-state phase, the proposed protocol adopts Time Division Multiple Access TDMA scheduling anddata transmission for each node.Specifically, the proposed protocol gathers data only from the nodes to the BS.The BS identifies the first nine nodes with the highest rank based on their distance to the BS as CH candidates.The setup phase and the steady state phase illustrated in the pseudo code (see figure 10).

A. Performance Metrics
The performance of the FLG proposed protocol can be evaluated with a number of metrics.


Network lifetime: The time interval from the beginning of operation (of a sensor network) until the death of the last alive sensor.


First Dead Node (FDN): Number of rounds after the first sensor died.This parameter is directly related to the stability period parameter.A large FDN implies long stability period of the network.


Last Dead Node (LDN): Number of rounds after all sensor nodes are dead.
As shown in figure 11, The FND occurs in round 2,100, and the LND occurs in round 5,000.This result indicates the prolonged network lifetime using the proposed protocol.The FLG-proposed protocol is implemented using Matlab.In figure14 and Table 3. Illustratethe comparison of lifetime between FLG-Proposed and previous protocols.
The Simulation reveal that the lifetime extended by the FLG-proposed protocol is longer than that of the following protocols: TDTCGE,CRCWSN,LEACH, Low-energy Adaptive Clustering Hierarchy with Sliding Window and Dynamic Number of Nodes (LEACH-SWDN) [18], Clustered Routing Protocol (ERP) [19], Stable Election Protocol (SEP) [16],and Energy-aware Evolutionary Routing Protocol (EAERP ) [17].
As shown in figure 14, an obvious improvement in network lifetime was achieved with the FLG-proposed protocol, the performance of which was superior to that of the TDTCGE, LEACH, CRCWSN, LEACH-SWDN, ERP, SEP, EAERP protocols.
As shown in figure .15, the addition of fuzzy logic to the grids and the two centers yielded nine CHs near the centers, except for the eighth CH, which is far from the two centers by calculating the average of nearest distances nodes to the clusterheads (4+2+0+4+1+1+4+15+2) m / 9 cluster heads = 3.6 m.    shows that the proposed protocol consumes less energy than the TDTCGE protocol does, with its energy savings being 8% more than that of the TDTCGE protocol during round 5,000.

VII. CONCLUSIONS
The addition of fuzzy logic to the grids obviously minimized the distance between nodes and the BS, as well as the distance between the CH to other nodes and the BS.The radius competition between nodes also decreased.The remaining node with the most energy is chosen by the BS as a CH.In this way, the proposed protocol based on fuzzy logic is able to extend network lifetime by nearly 52%.As revealed in the simulation, the proposed protocol also guarantees a balance in network load.

Fig. 3 .
Fig. 3. Fuzzy input variable of distance between nodes

Fig. 5 .
Fig. 5. Fuzzy input variable Residual energy for each node They are added to each grid by calculating the formula for each center.The gravity center represents the average point of the object weight [7].In figures 3,4 and 5 illustrates Fuzzy inputs variables which enter to the interference engine.

Fig. 8 .
Fig. 8. Best CHs identified by the BS for the first stage.

Fig. 9 .
Fig. 9. Rank of nodes based on distance to the BS

Fig. 11 .
Fig. 11.Number of dead nodes in each round

Fig. 12 .
Fig. 12. Number of dead nodes in each round for the TDTCGE protocolAs shown in Figure12, FLG-proposed protocol Compared with the TDTCGE protocol, our proposed protocol improved the FND by 50% and the LND by 2%.

Fig. 13 .
Fig. 13.Network lifetime improvement with the proposed protocolAs shown in figure13, In comparison with the TDTCGE protocol, the fuzzy proposed protocol improved the network lifetime by 52%.

Fig. 15 .
Fig. 15.Distance between centers and CH after adding fuzzy logic

Fig. 16 .
Fig. 16.Distance between centers and CH without fuzzy logic (TDTCGE protocol)As shown in figure.16, in the case without fuzzy logic, only CH numbers 1, 2, and 3 are observed near the centers; CH numbers 4, 5,6,7,8,9 and 8 are observed far from the two centers the percentage of nearest nodes is 33% .By adding Fuzzy logic Ranking system the percentage of the nearest nodes more than TDTCGE by by calculating the average of nearest distances nodes to the clusterheads (5+1+1+18+16+7+10+12+6) m / 9 cluster heads = 8.4 m. these calculations shows that FLGG will minimize distance radius competition 43%.than TDTCGE

Fig. 17
Fig. 17.shows that the proposed protocol consumes less energy than the TDTCGE protocol does, with its energy savings being 8% more than that of the TDTCGE protocol during round 5,000.
Fig. 17.shows that the proposed protocol consumes less energy than the TDTCGE protocol does, with its energy savings being 8% more than that of the TDTCGE protocol during round 5,000.

TABLE I .
MULTIPLE DECISION MAKING CRITERIA FOR FUZZY LOGIC