Description
Highlights
 A refined Sugeno fuzzy inference system (FIS) integrates fuzzy logic in WSN at the heart of a precise routing protocol that includes three membership functions connected to critical inputs including node energy, distances, and cluster centroids.
 The meticulously specific set of 27 rules orchestrates Cluster Head selection. This revolutionizes routing protocol innovation by seamlessly integrating fuzzy logic in WSN in the enhancement of performance, energy efficiency, and lifespan.
 Our model takes into account the wasted energy per bit in both the transmitter and receiver circuits, the distance between the transmitter and receiver, as well as several characteristics related to the amplifiers.
 BFOtuned fuzzy controller that outperforms the ABCtuned parameters, particularly in smaller geographical regions, with regards to enhancing network longevity.
Fusing Fuzzy Logic in WSN
Wireless Sensor Networks are now illuminated with Intelligent Decisionmaking
The fascinating field of wireless sensor networks (WSNs) has recently taken center stage in the academic world, piquing the interest of researchers everywhere. Its reach is farreaching, touching on everything from military strategy to the finer points of search and rescue. Intelligent and sensitive smart home systems have brought the throb of innovation right into our own living quarters. While we appreciate these groundbreaking advancements, we can’t go without mentioning the pivotal role played by fuzzy logic in WSN applications involved in a majority of them. Introduction of fuzzy logic in WSN has revolutionized the way this field works. Figure 1 makes an attempt to illustrate the concept of fuzzy logic in WSN systems in the context of contemporary networking. But to begin from the start:
When put simply, a Wireless Sensor Network is a system of interconnected, wirelessly communicating sensor nodes.
Figure 1: An attempt to abstractly illustrate the applications of fuzzy logic in WSN.
But because of their limited computational resources, sensor nodes are typically needed to adopt specific networking protocols and security protections. Battery replacement is impractical in WSNs because of the huge node counts and possible deployment in hazardous areas. Since typical battery capacity is approximately 6 amphours [5], energysaving practices are required. Further, ensuring the robustness of the WSN against the potential loss of sensor nodes is also of paramount importance. In the usual scenario, traffic flows from several sensor nodes towards a central sink, often referred to as the base station (BS), or broadcast traffic. This often leads to pretty bad congestions.
Extensive research efforts are being dedicated to the development of routing protocols and we too tried contributing to this endeavor. The novelty of our approach is justified when the majority heavylifting, in achieving these objectives, is handled through strategic application of fuzzy logic in WSN systems that were involved. This is achieved by using a precise routing protocol equipped with a refined BFOtuned Sugeno fuzzy inference system (FIS) with three membership functions for inputs like node energy, distances, and cluster centroids. The protocol, governed by 27 specific rules, optimizes routing, Cluster Head selection, and network efficiency. It amplifies WSN performance, energy efficiency, and lifespan by factoring in energy usage, distance, and amplifier traits.
Optimized Sugeno FIS
The intersection of wireless sensor networks (WSNs) and the concept of fuzzy logic is where our innovation truly shines. to elaborate, the underlying foundation of our work rests on the principles of fuzzy logic in WSN. Now, in efficient data transmission in WSNs, routing protocols act as the keystones. The dynamic nature of these protocols necessitates a flexible approach, which is precisely what fuzzy logic in WSN offers. To harness, we incorporated the Sugeno Fuzzy Inference System (FIS) in our model.
An example of a first order Sugeno fuzzy model is illustrated through Figure 2. The Sugeno FIS, at the core of our specialized routing protocol, goes beyond the onesizefitsall approach that generic FIS models might employ. Instead, it’s been meticulously customized to suit the unique demands of WSNs. Unlike offtheshelf solutions, it has been calibrated to embrace the intricacies of the associated WSN operation, presenting a dynamic approach to decisionmaking.
The Sugeno Fuzzy Inference System (FIS) is a fuzzy logic model variant developed by Takagi, Sugeno, and Kang, that employs crisp input conditions with linear output functions to convert fuzzy inputs into precise numerical outputs, making it suitable for systems requiring accurate control.
Figure 2: A firstorder Sugeno fuzzy model
[Image Credit: ResearchGate]
Three key membership functions are at the heart of our strategy, each of which is inextricably linked to key inputs that shape data transmission in WSNs. The Fuzzy Inference System (FIS) bases its judgments on these functions, which are associated with node energy, distances, and cluster centroids.
 Node Energy: Any sensor nodes’ network participation potential is measured by the membership function of node energy, which in turn optimizes energy consumption.
 Distances: Our distance function takes spatial relationships into account, reducing unnecessary energy consumption along the path from node to destination.
 Cluster Centroids: Understanding the distribution of nodes is an important part of the role cluster centroids play in facilitating smart data routing.
A critical aspect of deploying fuzzy logic in WSN is the design of efficient fuzzy rule sets. The Sugeno FIS orchestrates the harmony between these functions using a stringent set of 27 rules. These guidelines serve as the basis for making routing, Cluster Head, and optimization decisions. By skillfully orchestrating its components, the Sugeno FIS is able to take on complexity, adjusting in real time to changing network conditions and ushering in a new era of possibility for WSNs.
Comparison of Tuned Fuzzy Variants in WSN
In our pursuit of enhancing the efficiency and longevity of Wireless Sensor Networks (WSNs), we embarked on a comparative analysis between two tuning methodologies: the Bacterial Foraging Optimization (BFO) and the Artificial Bee Colony (ABC). Both approaches are geared towards optimizing the performance of the Sugeno FIS integrated into our specialized routing protocol. This rigorous analysis allows us to discern the distinct advantages and limitations of each tuning method and sheds light on their implications for network longevity.
Figure 3: A flow analysis of BFO
[Image credit: Freepik Illustrations]
Bacterial Foraging Optimization (BFO) is a bioinspired optimization algorithm that draws its inspiration from the foraging behavior of bacteria to solve complex optimization problems. This algorithm simulates the movement and interaction of bacteria as well as the chemotactic processes that bacteria use to move towards higher concentrations of nutrients.
Figure 4: A flow analysis of ABC
[Image credit: Freepik Illustrations]
Artificial Bee Colony (ABC) is a natureinspired counterpart, belonging to the class of swarm intelligence algorithms, which mimic the foraging behavior of honeybees to solve optimization and search problems. The algorithm simulates the interactions between bees and their hive as they search for optimal food sources.
Upon conducting an indepth evaluation of the performance metrics resulting from our comparative analysis, it becomes evident that the BFOtuned fuzzy controller emerges as the frontrunner, particularly in smaller geographical regions. Here’s a closer look at the advantages this tuning approach brings to the table:
 Precise Customization: The BFO algorithm optimizes Sugeno FIS membership functions to meet WSN needs and make better decisions, improving network performance.
 Effective Resource Allocation: The BFOtuned fuzzy controller finetunes resource usage contributing significantly to energy conservation and, consequently, network longevity.
 Mitigation of Premature Termination: Premature termination of ABCtuned parameters caused suboptimal membership function adjustments. The BFO algorithm’s convergence behavior solves this problem, optimizing the optimization process and improving network performance.
 Adaptation to Environmental Variability: In smaller geographical regions with fluctuating network dynamics, the BFOtuned fuzzy controller can navigate changing conditions to ensure that the controller remains effective even in varying energy levels and communication challenges.
 Enhanced Longevity: BFOtuned fuzzy controller optimally manages energy resources, mitigates unnecessary energy wastage, and enables nodes to operate efficiently for extended periods.
Clustering for Knowledge Aggregation
Wireless sensor networks present a unique challenge in terms of protocol scalability due to their potential for massive node populations. Due to the restrictions of centrally managing sensors from the base station, overcoming this obstacle is critical. Factors that reduce network performance include communication overhead, management latency, and complicated administration. To overcome these constraints, our study introduces the idea of clustering for the targeted placement of sensors within specific regions. Figure 5 presents an abstract illustration of what we attempt to accomplish.
Figure 5: Geographic Clustering Abstraction
[Image credit: Freepik Illustrations]
Strategic Fuzzy Logic in WSN Cluster Organization
The deployment strategy, referred to as “Clump,” involves meticulous planning to position a series of sensors strategically within a specific geographical expanse. This network of sensors is thoughtfully organized into clusters, each overseen by a designated cluster head. The decision of employing either a rigid or flexible approach for cluster maintenance further refines the cluster dynamics. Within each cluster, we enable controlled channel access for contributing nodes, efficient energy management, and support for intercluster operations to encompass critical routing and code separation, vital for preventing interference across clusters.
Decentralization of control functions is a remarkable outcome of clustering. Formerly the purview of the base station alone, control functions have now been delegated to the heads of individual clusters. This decentralized method provides a useful structure for activities like data fusion, neighborhood decision making, energy conservation, and local control. The network gains efficiency, flexibility, and adaptability by letting cluster heads handle their clusters autonomously, all of which are essential for maximizing Wireless Sensor Network (WSN) performance.
To achieve this goal, we take a multihop routing approach similar to that used in ad hoc wireless networks. The concept of clusterbased routing is central to this method because it is a widely accepted paradigm in the field of networking. Clusterbased routing emerges as an effective method for data aggregation and transmission within the network by capitalizing on the inherent proximity and data correlation among closely located nodes.
Enhanced Routing and Optimal Cluster Head Selection
Our research further elevates the efficiency of clusterbased routing through the integration of the Bacterial Foraging Optimization (BFO) method. This optimization technique, inspired by bacterial foraging behavior, enhances the clustering process, enabling us to create a robust clusterbased routing protocol. The utilization of the Sugeno fuzzy inference system, guided by BFO, forms the backbone of this innovative routing protocol. While various clustering methods exist, we opted for the Kmeans algorithm due to its exceptional efficiency and speed, critical for realtime network operations.
A crucial aspect of clusterbased protocols is the selection of Cluster Heads (CHs). This task involves identifying sensor nodes from a pool of candidates that demonstrate reliability and competence in maintaining cluster operations. Subsequently, these selected nodes become Cluster Heads, taking on the responsibility of managing their respective clusters. However, challenges arise in achieving an optimal distribution of Cluster Heads throughout the Wireless Sensor Network (WSN), a constraint we meticulously address in our research.
Problem Dealt
Wireless sensor nodes have a compact form factor and constrained computational capacity, accompanied by a significantly diminished battery capacity. The limitation imposed by limited battery power renders the sensor network susceptible to failure. The primary sources of energy consumption may be attributed to three major purposes: data transmission, signal processing, and hardware use, the majority being attributed to the process of data transmission. Further, a notable obstacle emerges when nodes within the established communication pathway go into sleep mode or cease to function as a result of energyconservation mechanisms or energy depletion falling below a certain threshold. However, in such cases, data packets encounter prolonged delays at the originating node, leading to superfluous energy consumption at that node.
Figure 6: Effects of node retirement through an abstract illustration.
[Image credit: Freepik Illustrations]
From the aforementioned situation, it becomes evident that traditional crisp logic falls short in capturing the richness of realworld data. This forces us to delve deeper into the intricate details of fuzzy logic in WSN applications. Among the contemporary approaches proposed to resolve these issues, M. Shokouhifar et al. [13] need a special mention for their proposal of an optimum clustering approach aimed at mitigating energy usage, utilizing adaptive fuzzy rules that have been calibrated using a heuristic optimization technique called the Artificial Bee Colony (ABC). Nevertheless, this approach has a significant limitation as it often concludes prematurely, resulting in inefficient adjustment of the membership functions inside the fuzzy logic system.
The core objective of our strategy is to address the challenge of energyefficient data transmission inside Wireless Sensor Network (WSN) clustering, which is particularly pressing in light of the limitations of existing methodologies. To accomplish this, we will increase our reliance on fuzzy logic to make allocation decisions. The following are some of the foremost keystones of this new approach:
 Finetuning fuzzy rules that regulate data transmission in WSN clustering, with the pivotal aim of lowering energy usage.
 Distilling the membership functions of the fuzzy logic streams through substitution of ABC with BFO (Bacterial Foraging Optimization) to address the problem of premature termination often encountered in the ABC.
EnergyEfficient WSNs via Fuzzy Controllers
One of the key takeaways from our research is the significant enhancement in network longevity and efficiency with the integration of fuzzy logic in WSN protocols. The aforementioned objectives specifically pertained to this. In the quest of accomplishing those, this model has been developed by the integration of certain novel principles. Figure 7 provides an illustration of the sequence of our work to facilitate comprehension. A selection of these principles may be summarized as:
 An enhanced Sugeno fuzzy inference system (FIS) offered as a routing protocol based on three membership functions, each consisting of 27 sets of rules. This framework uses Kmeans method to create balanced clusters throughout the network, utilizing the principles of fuzzy logic in WSN.
 Dedicated objective functions for Residual energy (RE), Nodal Distance form sink (DNS), and Nodal Distance form centroid (DNC) work around the centroid’s position determined by Kmeans and Cluster Head location based on the fuzzy inference mechanism.
 The Bacterial Foraging Optimization (BFO) technique finetunes the fuzzy rules of an FIS file to extend network’s lifespan, taking into consideration the individual requirements of various applications to demonstrate the windfall of incorporating fuzzy logic in WSN.
Figure 7: The algorithm with associated model specifics.
The objective here, is to address the issue of energy wastage caused by dormant or energydepleted nodes in Wireless Sensor Networks, while contributing to the improvement of the overall efficiency and sustainability of operations in wireless sensor networks. In the proposed model, the Bacterial Foraging Optimization (BFO) algorithm is implemented inside a clusterbased routing protocol that uses the Sugeno fuzzy inference system. In a given population of nodes, clustering may be performed using Kmeans algorithm owing to its notable efficiency and speed. In clusterbased protocols, the selection of Cluster Heads (CHs) selection often involve choosing sensor nodes from a pool of nodes that are deemed dependable for maintaining cluster functionality. Subsequently, clusters are formed by assigning each node to the CH that is closest in proximity. One significant constraint is the generation of an unsuitable distribution of cluster heads (CHs) throughout a wireless sensor network (WSN), but that has been attempted to be resolved through integration of BFO.
Fuzzy Inference in WSN
A Sugeno Fuzzy Inference System (FIS) is implemented in MATLAB. The fuzzy controller comprises three main components. The first component is the fuzzification process, which involves the conversion of realworld environmental variables into fuzzy variables. The second component is the inference model, which incorporates the rule sets or decision variables. Lastly, the third component is the defuzzification process, which reverses the fuzzy variables back into their original environmental variables, identified as:
 Residual energy of node (RE)
 Distance of node from sink of cluster (DNS)
 Distance of node from centroid of cluster (DNC)
The three input signals undergo fuzzification and are further defuzzified to get control signals for comparison. The controller under consideration incorporates linguistic factors, namely LOW, MED, and HIGH, to determine the RE, DNS, and DNC. These linguistic variables are described by memberships. The memberships are mathematical functions that provide the mapping of each point in the input space to a membership value ranging from 0 to 1 for RE, and from 1 to 1 for DNC and DNS. The membership functions associated with the remaining stages have a trapezoidal shape. The membership functions representing the inputs are shown in Figure 8.
Figure 8: The membership function of the input variable RE
Calculation of Residual Energy of each node
During each iteration, the WSN nodes surveil the surrounding environment and transmit the acquired data to the central sink. In the present model, the energy dissipation of a radio is denoted as $E_{\text{elec}} \times l$, which is used for the operation of either the transmitter or the receiving circuitry. The following equations mentioned henceforth is the mathematical formulation for the energy consumption associated with the transmitter and the transmission of a single bit data packet over a certain distance, denoted as $d$.
\[ E_{\text{TD}} (l \times d) = \begin{cases} l \times E_{\text{elec}} + l \times \varepsilon_{\text{fs}} \times d^2, & \text{if } d \leq d_0 \\ l \times E_{\text{elec}} + l \times \varepsilon_{\text{amp}} \times d^4, & \text{if } d > d_0 \end{cases} (1)\]
$E_{\text{RX}} (l) = l \times E_{\text{elec}} (2)$
The wasted energy (per bit) in each transmitter and receiver circuit, denoted as $E_{\text{elec}}$, is influenced by several electrical parameters such as digital coding, modulation, filtering, and signal spreading. The amplifier parameter used for the free space environment is denoted as $\varepsilon_{\text{fs}}$, whereas the value for the multipath environment is denoted as $\varepsilon_{\text{amp}}$. The distance threshold, denoted as $d_0$, is mathematically defined as the square root of the ratio between the $\varepsilon_{\text{fs}}$ and $\varepsilon_{\text{amp}}$_{ }defined as $d_0 = \sqrt{\frac{\varepsilon_{\text{fs}}}{\varepsilon_{\text{amp}}}}$.
Performance evaluation
Firstly, a K−means algorithm is used to produce an initial clustering. Subsequently, a representative centroid, alias a cluster head (CH), is picked inside each cluster. The expression for the standard deviation of intracluster distance may be formulated as:
$STD_{\text{cl}} = \sqrt{\frac{1}{N} \sum_{J=1}^{M} \sum_{i=1}^{N} (x_i a_{ij} – c_j)^2} (3)$
The parameter $a_{\text{ij}}$ is a binary variable that determines whether node $i$ belongs to cluster $j$ or not. The energy level assigned to each node in the network at the beginning is 1 Joule. The energy dissipation per bit ($E_{\text{elec}}$) in the network is measured to be 50 nanojoules (nJ) for each transmitted or received bit. The $E_{\text{fs}}$ (Free Space Path Loss Constant), quantifying for the amount of energy dissipated per bit per unit area in a free space environment, is measured as 100 picojoules (pJ/m²) per bit . The $E_{\text{amp}}$, (Multipath Environment Path Loss Constant), representing the amount of energy dissipated per bit per unit area in a multipath environment, is marked 0.013 picojoules (pJ/m²) per bit. The size of each data packet transported through the network is 4000 bits.
Fuzzy Logic Tuned with BFO
The inherent synergy of fuzzy logic in WSN becomes particularly pronounced in scenarios where precise measurements are challenging to obtain. This collaboration allows for reliable data analysis and decisionmaking even in the face of noise and uncertainty. To realize this, in the provided fuzzy system, each input is associated with three fuzzy memberships: Low, Medium, and High. The total number of fuzzy rules may be calculated by multiplying the number of fuzzy sets in each input variable. In this case, with three fuzzy sets for each of the three input variables, the number of fuzzy rules is determined to be 27.
This study has successfully attained the optimum values of the fuzzy controller membership function by implementing the prescribed stages in the optimization of Bacterial Foraging Optimization (BFO) algorithm according on the input circumstances. In the Bacterial Foraging Optimization (BFO) algorithm, bacteria exhibit a random movement pattern as they look for their food source. This unpredictable movement contributes to the convergence of the BFO algorithm, although over a certain period of time.
Figure 9: BFOtuned fuzzy inference in clusters through an abstract illustration.
Outcome of integrating Fuzzy logic in WSN
The suggested methodology is implemented in MATLAB R 2016a, through modular code approach to represent the WSN, composed of a total of 100 nodes. The network is partitioned into three distinct clusters to provide efficient organization and administration, leveraging the concepts of fuzzy logic in WSN. The range of residual energy (RE) values for a node is defined as [0, 1], suggesting that all RE values will be within this interval. The range of the distance from a node to the sink is determined to be [−1, 0], indicating that values for the distance from the sink will fall within this range. The range of the distance from a node to the centroid of its cluster, also known as the Distance from Cluster Centroid (DNC), is [−1, 0]. This range signifies that DNC values will be confined to this interval.
An Overview of Steps Involved in using Our Model
 To establish a wireless sensor network (WSN) environment, a certain number of nodes, denoted as X, need to be created. Utilize the Kmeans clustering algorithm to partition the dataset into three distinct groups.
 A Fuzzy Inference System (FIS) file is to be created, including three inputs and three membership functions for each input. This FIS file will consist of a collection of 27 rules, which will be used to determine the appropriate output.
 The BFO technique may be used to optimize the input parameters of a Fuzzy Inference System (FIS), to realize the unchartered potential of fuzzy logic in WSN applications.
To ascertain the efficacy of the Bacterial Foraging Optimization (BFO) tuning, a comparative analysis of simulation outcomes with those of Artificial Bee Colony (ABC) tuning is conducted for three distinct geographical areas: 50m × 50m, 100m × 100m, and 200m × 200m, validating the impact of fuzzy logic in WSN. Figures 10–18, along with the corresponding result charts shown in tables 1–3, present a compilation of the results achieved in each of the three scenarios. When applying the same set of rules and testing conditions to both BFO and ABC, BFO clearly outperforms ABC, showcasing the power of finetuned fuzzy logic in WSN. However, the outcomes of BFO and ABC algorithms are comparable when dealing with large geographical regions. However, when operating in a constrained area, BFO beats ABC under the same rule set, WSN environment, and other conditions.
Case1: Geographical area of 50m × 50m.
Figure 10: The cluster consists of nodes located within a geographical region of 50m × 50m.
Figure11: Residual energy plot comparison.
Figure12: Standard deviation of cluster distance
Table 1: Clusterwise comparison for BFO and ABC for case1
Case1:
???×???

Cluster 1  Cluster 2  Cluster 3 
BFO  8.75456456141063  13.6266384294770  26.4814014635824 
ABC  8.00970696477768  11.3888740950478  23.3974753421539 
Case2: Geographical area of 100m × 100m
Figure13: The cluster consists of nodes located within a geographical region of 100m × 100m.
Figure 14: Comparison of residual energy plots of BFO and ABC.
Figure15: Standard deviation of cluster distance
Table 2: Clusterwise comparison for BFO and ABC for case2
Case2:
100m × 100m

Cluster 1  Cluster 2  Cluster 3 
BFO  8.75456456141063  13.6266384294770  26.4814014635824 
ABC  8.00970696477768  11.3888740950478  23.3974753421539 
Case3: Geographical area of 200m × 200m.
Figure 16: The cluster consists of nodes located within a geographical region of 200m × 200m .
Figure 17: Comparison of residual energy plots of BFO and ABC.
Figure 18: Standard deviation of cluster distance
Table 3: Clusterwise comparison for BFO and ABC for case3
Case3:
200m × 200m

Cluster 1  Cluster 2  Cluster 3 
BFO  66.2532605617461  38.5725720516026  135.643533028712 
ABC  88.0227760388700  28.2006211404531  75.2897030161919 
Future Scope:
We attempted to demonstrate how the integration of fuzzy logic in WSN can bring about a paradigm shift in the realm of wireless sensor networks. This model primarily emphasizes the significance of extended network lifespan which is a critical characteristic within the WSN systems. However, ensuring a more robust and protected environment for WSNs necessitates prioritizing security measures against external threats. With the involvement of these intelligent decision making techniques, these types of attacks may be mitigated with the use of endtoend encryption. Additionally, the use of a Guard node is applicable in scenarios when data is being transported from a higher security level to a lower security level of transmission. As the field of fuzzy logic in WSN continues to evolve, we can expect even more breakthroughs that will shape the future of smart technologies and decisionmaking systems.
References
Published Paper similar to this work
The employment of this code in these research publications is beneficial.
 Bhalaji, N. “Cluster Formation using Fuzzy Logic in Wireless Sensor Networks.” IRO Journal on Sustainable Wireless Systems 3, no. 1 (2021): 3139.
 Pawar, Atul, Mihir Mondhe, Pranav Kharche, Shrutik Manwatkar, and Ganesh Dhore. “EnergyEfficient Cluster Formation for Wireless Sensor Networks Using Fuzzy Logic.” In Intelligent Sustainable Systems, pp. 657665. Springer, Singapore, 2022.
 AlHusain, Enaam A., and Ghaida A. AlSuhail. “EFLEACH: An Improved Fuzzy Based Clustering Protocol for Wireless Sensor Network.” (2021).
 Rana, Tanisha, Avik Sett, Kunal Biswas, and Tufan Saha. “FuzzyBased Clustering Toward Improving the Lifespan of Wireless Sensor Networks.” In Proceedings of International Conference on Advanced Computing Applications, pp. 369380. Springer, Singapore, 2022.
 Jayaraman, Ganesh, and V. R. Dhulipala. “FEECS: FuzzyBased EnergyEfficient Cluster Head Selection Algorithm for Lifetime Enhancement of Wireless Sensor Networks.” Arabian Journal for Science and Engineering (2021): 111.
Reviews
There are no reviews yet.