FCERP: A Novel WSNs Fuzzy Clustering and Energy Efficient Routing Protocol

: Wireless sensor networks (WSNs) are set of sensor nodes to monitor and detect transmitted data to the sink. WSNs face significant challenges in terms of node energy availability, which may impact network sustainability. As a result, developing protocols and algorithms that make the best use of limited resources, particularly energy resources, is critical issues for designing WSNs. Routing algorithms, for example, are unique algorithms as they have a direct and effective relationship with lifetime of network and energy. The available routing protocols employ single-hop data transmission to the sink and clustering per round. In this paper, a Fuzzy Clustering and Energy Efficient Routing Protocol (FCERP) that lower the WSNs energy consuming and increase the lifetime of network is proposed. FCERP introduces a new cluster-based fuzzy routing protocol capable of utilizing clustering and multiple hop routing features concurrently using a threshold limit. A novel aspect of this research is that it avoids clustering per round while considering using fixed threshold and adapts multi-hop routing by predicting the best intermediary node for clustering and the sink. Some Fuzzy factors such as residual energy, neighbors amount, and distance to sink considered when deciding which intermediary node to use.


Introduction
The wireless sensor networks (WSNs) are frequently comprised of multiple nodes with limited processing capabilities responsible for sensing environmental data and communication with Base-Station (BS). Advances in electronic circuit design have decreased sensors' size, weight, and cost in recent years while increasing the processing power and producing data precision. As seen in Fig. 1, are WSNs ideally used for monitoring and tracking various applications.
Energy in WSN is mostly consumed during the transmission of data since nodes in the network have limited energy. It is thus necessary to design a structure that spends the least amount of energy while transmitting data to the BS. Using a hierarchical structure in network architecture is one approach to reduce energy usage. A hierarchical structure is organized with many layers for the network nodes, with the nodes in each layer having the same characteristics. One of the techniques for generating the hierarchical structure is clustering. Consequently, network nodes are divided into smaller clusters to ensure that data from the local environment are collected by sensor nodes [1].
WSNs generally have dynamic nature which in selecting most efficient technique for transmitting packets from the node to sink power consumption may reduce with an increase in the network's lifetime.

Figure 1. WSNs application
Flat routing is used in the spin and flooding protocols in which all network nodes play the same role. Nodes communicate with each other by receiving environmental information is accomplished using this technique [2]. Another method of transmitting data to the BS is a more scalable hierarchical routing. Headers are often utilized in hierarchical routing because they possess the most significant energy and are responsible for gathering and aggregating the information collected through the nodes [3]. It is subsequently compiled and transferred to the BS in single or multiple hops for processing and reception by the user, depending on the configuration of the network. Sending data to the sink becomes costlier since the distance between the node and the sink increases. Using hierarchical routing with the proper intermediary node can save energy and extend the header node's lifetime. Using multi-hop transmissions, according to what was stated, improves connectivity, coverage, and network lifetime. Many techniques for selecting the header node have been introduced; however, choosing a header node with a fuzzy system reduces the computational cost. The novelty of the proposed Fuzzy Based Clustering and Energy-Efficient Routing Protocol (FCERP) is to create an energy-efficient routing protocol based on clustering with a fixed threshold that is simple and easy to implement. Multi-hop and selecting the most suitable intermediary node are implemented in the FCERP. Based on the competency criteria of "Distance to BS" and "residual node energy," the intermediary node is chosen from the specified header nodes.
Unlike other commonly used methods, the proposed FCERP clusters are based on the previously selected header node; therefore, clustering is not done in each round. Some clustering algorithms employ a random selection of headers, which minimizes the likelihood to use the best node as a Cluster Head (CH). According to the proposed FCERP, a header node is chosen based on the best values of fuzzy parameters. Thereafter, no further nodes are selected in the subsequent rounds because the current node has been identified. Using this strategy, the number of collisions and the number of control packets that are transferred are minimal.
The remaining part of the paper has literature review of current fuzzy-based clustering techniques for WSNs which is presented in section 2. The section 3 discusses the proposed FCERP system with details. Simulation results and discussion, comparison of proposed FCERP, and the results from the evaluation are presented in section 4. Sections 5 and 6 demonstrate the conclusions and future studies. www.aetic.theiaer.org

Literature Review
Multi-Objective Fuzzy Clustering Algorithm (MOFCA) [4] is a clustering algorithm based on a fuzzy system, and fuzzy parameters of "residual energy," "distance to BS," and "density of each node" are used in this method. To choose the CH, this algorithm employs a competitive energy-based radius. The goal of this algorithm was to solve the "energy hole" and "hot zone" problems. This technique estimates the lifetime of WSNs by using Half Nodes Alive (HNA), First Node Dead (FND), and Total Remaining Energy (TRE). The CHS radius estimation is identified using the remaining energy from the nodes based on its distance to the BS. The density parameters are added as input parameters for the implemented fuzzy logic in addressing the WSN environment using efficient protocols. A comparative analysis has been carried out as part of the experimental evaluation process to compare the MOFCA algorithm with other clustered algorithms such as: Low Energy Adaptive Clustering Hierarchy (LEACH) [5], CH Election using Fuzzy logic (CHEF) [6], Energy-Efficient Unequal Clustering (EEUC) [7] and Energy-Aware Unequal Clustering with Fuzzy (EAUCF) [8].
In scenario 1, the near-uniform distribution of the nodes using MOFCA is added. The BS of Area of Interest (AOI) and transmission form and BS position get impacted based on its position. Scenario 2 shows that the multi-hop routing has a maximum competition radius except for LEACH [5] and CHEF [6] implementation. As shown in Fig. 3, the BS is the center of AOI, and the nodes' formation is near uniform. Scenario1 Scenario2 Figure 3. Near-Uniform Distribution of Nodes [5] As shown in Fig. 4, in scenarios 3 and 4, nodes are formed in a non-uniform distribution manually. However, the BS is out of the AOI in the latter deployment. The nodes in scenario 4 are altered with ±5m in x and y coordinates, enabling network upgrade.  The results for the FND metric show that the MOFCA protocol [4] outperforms the other three algorithms, with MOFCA protocol efficiency reaching 57% more than LEACH [5]. The CHEF [6], EEUC [7], and EAUCF [8] implementation efficiency is 29%, 10%, and 8% lesser than MOFCA. When large-scale networks are deployed, the energy efficiency and the WSNs distribution are more flexible. The performance of the MOFCA algorithm [4] was rationally more preferably when compared with other scenarios during the experiments. One of the benefits of this method is that it employs unequal clustering, which results in balanced energy consumption. The clustering execution in each round is one of the method's drawbacks.
EAUCF [8] is a clustering method based on a fuzzy system that has been proposed to extend network life. To improve the performance of the previous methods, the possible approach for selecting nodes is not fully used in this method, and the periodic rotation of the CH is done using a fuzzy system. This algorithm extends the lifetime of a network in static networks but is ineffective in dynamic networks. The need to estimate the size of the clusters before clustering has complicated the algorithm, which is one of the method's drawbacks. Another disadvantage of this method is that it does not take "node density" into www.aetic.theiaer.org account when choosing a CH node; as a result, a node with a small number of neighbors may be selected as the CH. One of this algorithm's advantages is its stability.
Energy-Efficient Fuzzy-Logic-Based Clustering Technique for Hierarchical Routing Protocols in WSNs (FL-EEC/D) [9] is another algorithm using the fuzzy system to evaluate the CH's satisfaction. It further balances the energy consumption between clusters and improves the hot zone issue. This is addressed by using the Fibonacci sequence-based multi-hop transmission scheme. Usually, the sensors placed in the monitored area are divided into CHs that send data to BS.
The Fuzzy Logic for Multi-hop WSNs (FLCAMN) algorithm [10] selects the appropriate CHs by utilizing the fuzzy logical inference. The FND and Half Nodes Dead (HND) metrics analyze the network life. A comparative analysis based on other algorithms such as Distributed Fuzzy Logic algorithm (DFLC) [11], Energy-Aware Multi-Hop Multi-Path Hierarchical Routing Protocol for WSNs (EAMMH) [12], and LEACH [5]. The FND based on the FLCMN outperformed at the 91st round by taking average residual energy as its input parameter when compared to LEACH [5], EAMMH [12], DFLC [11], and FLCMN [10]. This reflects the effectiveness of utilizing the residual energy of nodes with their neighboring nodes. Additionally, a multi-hop clustering algorithm reduces the consumption of energy. FLCMN uses residual energy from the WSNs of the overall network, ultimately extending its life [9], as displayed in Fig. 5. Among WSNs that have been clustered unequally, the clusters nearer to the BS are relatively smaller when compared to the ones farther. Bagci and Yazici [8], in 2013, proposed EAUCF as a solution to the problem of hot spots in urban areas. Reducing the strain of CHs with a limited amount of energy and nearer to the sink is an important goal of the EAUCF. Due to the obvious inherent uncertainties in calculating the cluster-head radius, fuzzy logic is used to make the determination. Among the well-known clustering algorithms, LEACH [5], CHEF [6], and EEUC [7] are discussed in the literature and are all compared to the proposed algorithm. The results of the experiments reveal that EAUCF [8] performs better than the others in terms of First Node Alive (FNA), HNA, and TRE in all cases. EAUCF [8] was found to be quite effective in any WSN application as a reliable and energy-efficient clustering method by the authors. The fuzzyunequal clustering technique for mobile sensor nodes may be extended in the future if there is considerable demand.
Distributed load balancing Unequal Clustering in WSNs Using Fuzzy Approach (DUCF) [13] is a clustering algorithm based on a fuzzy system. The cluster is formed using criteria such as "residual energy," "degree of each node," and "distance to BS for each node" in this algorithm. DUCF uses Mamdani [14] and Centroid methods [15] for fuzzy inference and defuzzification and employs unequal clustering to achieve balanced energy consumption. Several network scenarios were compared to assess DUCF's [13] performance against well-known algorithms, including LEACH [5], CHEF [6], and EAUCF [8]. The use of unequal clustering and a fuzzy system are advantages of this method. Additionally, research has demonstrated that DUCF outperforms conventional clustering methods when the sink is situated outside the network and can be employed in real-time applications. One of the algorithm's limitations is the clustering operation and the selection of the CH in each round, which consumes more energy. Other variables such as redundancy and centrality may be incorporated to improve the performance of DUCF in the research team's future work.
Akila and Venkatesan [16] proposed a new fuzzy clustering algorithm named Energy-Aware Fuzzy Clustering Algorithm (EAFCA) [16] was proposed for the cluster selection and data collection. To offer www.aetic.theiaer.org energy-efficient CH election for contending nodes utilizing residual energy and the mean distance to neighbors 1-hop and 2-hop handling, the suggested algorithm must be able to perform the following tasks: As the cluster's central hub, the sensor data is gathered from all nodes and sent and sent to the BS. The EAFCA algorithm [16] proposed improving clustering in a WSN using a fuzzy system. Within each cluster, multi-hop transmission is used to transfer information to the CH, and the competitive radius considered for each cluster is two hops. The CH is chosen using the parameters "residual energy," "density of each node," and "centrism rate." According to the authors, a better algorithm might be devised to provide CH selection and data aggregation in a sensor environment with a full or partial population of mobile nodes. Finally, the paper concluded that Spatio-temporal relationships [17] in data generated by sensor nodes could be tuned to optimize the efficiency of this solution by suggesting a sleep/wake-up schedule for these nodes based on the data generated by those nodes. One advantage of this method is that it considers multihop connections within the cluster.
Fuzzy Logic Based Energy Efficient Clustering Hierarchy (FLECH) [18] is a fuzzy system-based hierarchical clustering algorithm. The cluster is chosen using "residual energy," "centrism rate," and "distance to the BS" in this algorithm. A comparison of FLECH [18] performance with LEACH [5], CHEF [6], Energy-Aware Distributed Dynamic Clustering Protocol Using Fuzzy Logic (ECPF) [19], EAUCF [8], and MOFCA [4] is conducted in different scenarios. In the simulation, the FLECH algorithm [18] outperforms other algorithms by increasing lifetime and using less energy during round-trip data collection in the network. One of the benefits of this method is that the CH is chosen using a probabilistic and weighted approach. One of the disadvantages of this method is the possibility of clustering in each round.

Fuzzy System
When it comes to clustering, selecting a CH node is one of the most significant decisions you will make during the process. Choosing the most appropriate node to serve as the CH can greatly cut energy usage while increasing network lifetime. Up to this point, several approaches for selecting the CH node have been proposed, including probabilistic selection, definite selection, evolutionary algorithms, and the application of fuzzy logic in the selection process. When it comes to WSNs, fuzzy systems decrease computational complexity and uncertainty [20].
Fuzzy logic is a multi-value logic in which the correct value of each statement can vary between zero and one. A fuzzy system systematically transforms a knowledge base into a nonlinear mapping that employs fuzzy logic. The fuzzy system's main architecture is as follows: its operation is displayed in Fig. 6.
• Fuzzy maker: This application converts each logical input value into a collection of fuzzy values. • Defuzzer: In this part, each fuzzy result is rendered into a real equivalent value.
• Fuzzy inference engine: This unit processes fuzzy values and performs operations according to rules. Among other factors, this technique comprises the stages of constructing a classifier for input parameters, utilizing fuzzy functions, and generating an output value.

System Model
The following are the assumptions underpinning the proposed FCERP: • The initial energy is similar for all nodes, and the node's composition is homogenous. www.aetic.theiaer.org • In a network, the distribution of nodes is determined randomly.
• All system nodes are considered to have the same time.
• All nodes and BSs are static.
• The distance is obtained using Euclid's algorithm.
• BS receives the header data in multiple hops and special conditions as a single hop.
• Nodes placed at a distance of R from a particular node are referred to as that node's neighbors. The following is the power consumption model for transmitting " "-bit data packets from transmitter to receiver at a distance of "d" from each other: The value of d0 is calculated as follows: For each bit of data transmitted to the received, is the amount of energy consumed by the pivot during the transmission. The energy consumption for outdoor transmission is obtained using the variable while the variable obtains the energy consumption for multi-hop transmission. The energy required by the receiver to receive information is obtained by the symbol, which is calculated using the following formula:

Proposed FCERP
The proposed FCERP consists of two parts: • Clustering.
• Energy-efficient routing using the fuzzy system. It minimizes the clusters in WSN by employing a set threshold, a variety of clustering, and offering a combined mechanism for transferring information to the BS to enhance the operation of WSN. In the rest of this paper, we will go through the proposed FCERP and how it works. The following are the general characteristics of the proposed FCERP: • Fuzzy system-based distribution clustering along with unequal clusters and no clustering in each round to reduce both power consumption and the number of transmitted control messages. • Each cluster has a separate set of fuzzy input parameters to identify an ideal node based on residual energy and where it should be physically positioned in the cluster. www.aetic.theiaer.org • For reducing the frequency of header nodes re-clustering, it is being considered to set a fixed threshold for their maximum power. • A multi-hop technique is used, with the optimum path to transfer messages from each header node to the BS being determined by the algorithm. In comparison to clustering algorithms, one of the most important factors to consider is decreased energy usage inside the sensor network. Boosting the efficiency of the network is possible by reducing the energy consumed. For this reason, since the clustering density increases when neighboring nodes increase, each node's neighbors count is regarded as the second fuzzy parameter in the cluster. When there is a balanced distribution in the cluster's node, the network's energy consumption remains consistent. Consequently, the residual energy and neighbor's amount of each node is regarded to be fuzzy input parameters for the first cluster, which are then processed in rounds 1, 4, 7, and so on until the final cluster is formed and processed. The membership functions of the input parameters are illustrated in Figs. 8 and 9, respectively.  Each node's energy and number of neighbors are given into the first cluster's fuzzy system. Based on the fuzzy rules associated with this cluster, as stated in Table 1 and Fig. 10, a value between 0 and 1 is a chance for each node in this cluster. Furthermore, after computing the probability value, each node broadcasts it throughout the range of its signal, and the receiving node compares it to the values received from their neighbors. The CH is the node that has the highest value in its neighborhood radius, and it broadcasts its status to every other node inside its signal radius to ensure that everyone is aware of its existence. The receiver node communicates with the CH node by sending a membership request message, and if the received signal is strong, the receiver node is selected as a cluster member. When a node gets two or more CH messages, it accepts the member request with the lowest ID number. Given the content of the proposed FCERP's clustering section, the reader may question, "What would be the decision about the main cluster if there were several equal chances?" or "Given that each node decides independently, is it possible that the choices differ in similar cases?" When answering these questions, keep in mind that this possibility probable. If several nodes in an area have the same chance of being candidates for CH, there will be no limitation to this node's combination, in which the candidate node will broadcast the CH message to the neighboring node. This message's recipient responds positively to a candidate node with a lower ID. According to the evaluation, for each node, there are an average of 107 candidate nodes with the same chance, and among them, the node with the smaller assigned ID is chosen as the CH.
Developing routing protocols for WSNs is to save energy. Establishing an optimum routing strategy and using the appropriate number of hops based on the distance between the node and the BS can help improve performance and extend the network's lifetime. This paper employs a multi-hop technique to deliver data to the BS. In the proposed FCERP, this node aggregates the received data by completing the clustering in each round and sending sensory environmental data to the CH. It sends it to the BS in multihop via the CH node. Based on the competency criteria, the CH node is chosen among the selected CHs. The competency metric (M) is a combination of the node's "distance to BS (D)" and "residual energy (E)." The following are the eligibility criteria for selecting the CH node: To pick a head node among the current CHs, the competitive radius (R) must be calculated as follows: = ( ( )) 2 (5) Figure 11. Proposed Multi-Hop FCERP For example, if CH(j) nodes and CH(k) nodes are within the competitive radius (R) to be selected as CH(i), the CH with the highest eligibility metric is chosen as CH(i). To send data to the BS, this algorithm employs two types of routing: single-hop and multi-hop. Suppose no other CH node with a suitable www.aetic.theiaer.org competency metric (M) is found within the competitive radius (R) of the CH node CH(i). In that case, the single-hop approach sends information to the BS. Fig. 11 shows the proposed FCERP as a multi-hop.

Results and Discussion
This technique is compared to the DUCF [13], MOFCA [4], EAUCF [8], EAFCA [16], and FLECH [18] methods in the same situations to determine if the proposed method has more scalability in terms of node count, network size, and BS location. With the help of the MATLAB program, the algorithms were evaluated based on the network lifetime metric, that comprises FND, HND, and LND parameters, as well as the rate of energy consumption per round and the number of dead nodes each round. In our experiment, the work environment dimensions are 100 x 100 m². 300 nodes with an initial energy of 0.5 joules are randomly distributed throughout the environment. The location of BS is outside the work environment using stars topology, with the node to BS 130 distance being increased by 130. Fig. 12 depicts the results of comparing algorithms based on network lifetime. The proposed FCERP outperforms other methods in terms of FND, HND and, LND. It appears that transmitting multi-hop information from each CH to the BS and lowering the number of clustering times decreases the number of control messages delivered while maintaining a balanced energy consumption and reducing the number of dead nodes every round, as illustrated in Fig. 13 and Fig.  14. Furthermore, the performance of the proposed algorithm is more consistent than that of existing algorithms. The reason for choosing DUCF [13], MOFCA [4], EAUCF [8], EAFCA [16], and FLECH [18] algorithms and comparing them with FCERP is that they choose the CH and clustering with unequal cluster dimensions. In other words, we attempted an utterly fair comparison of FCERP with different valid and new algorithms. Some of the most notable characteristics of FCERP are the avoidance of clustering in each round and implementing an innovative routing algorithm. Table 2 compares FCERP and other algorithms. To effectively compare FCERP to other methods, network lifetime parameters were evaluated by considering the number of different nodes and the location of the BS in the center of the work environment, and the results of this study are shown in Table 3. According to the results, FCERP has the best performance in increasing network lifetime compared to other methods. The best network lifetime in different algorithms is 417, while the network lifetime of the proposed FCERP is 687, and it shows a 65% increase in network lifetime.

Conclusion
The purpose of this article focuses on conserving the energy and lengthening the lifetime of WSNs. Additionally, to reduce the number of control messages transmitted. We proposed a clustering-based routing method with a fixed threshold and multi-hop transmission, implemented in the MATLAB simulation. Implementations of the proposed Fuzzy Based Clustering and Energy-Efficient Routing Protocol (FCERP) algorithm were performed to assess scalability regarding the number of nodes, network size, and BS position. The evaluation observed that the proposed FCERP algorithm minimizes the number of control messages transmitted, optimizes the FND, HND, and LND parameters, and reduces the amount of energy consumed. The network's lifetime is prolonged since there is no clustering in each round, considering a fixed threshold, employing alternative clustering approaches, and utilizing multi-hop routing with the appropriate intermediary node, among other factors. Using the maximum power available from the CH node in conjunction with a defined threshold limit increases network performance.

Future Studies
The findings demonstrate that the suggested approach outperforms the traditional methodology in scenarios where the HND and LND parameters are significant. An energy-saving routing protocol based on clustering with various thresholds could be presented in future research to minimize energy usage. www.aetic.theiaer.org