# Clustering for Lifetime Enhancement in Wireless Sensor Networks
###### Abstract  
Wireless sensor networks face challenges such as energy consumption, scalability, security vulnerabilities, and communication range limitations, impacting their overall performance and reliability. To resolve these problems, energy-efficient protocols and adaptive sleep modes are implemented in wireless sensor networks (WSNs). Actually, LEACH clustering is widely regarded as one of the primary strategies to extend the lifetime of WSNs. However, clustering does not always guarantee optimal performance. In this paper, we demonstrate that clustering effectiveness is contingent on specific conditions related to several key parameters, including cluster density and the distance of nodes from the base station. Our research presents a mathematically validated analysis, supported by simulation results, that illustrates how clustering can enhance WSN performance, particularly in terms of network lifetime, throughput, and the timing of the first, middle, and last node deaths. Our findings indicate that LEACH is inefficient when nodes are within 80 m of the base station. Furthermore, clusters' densities are related directly to the distance to the base station. Specifically, for distances less than 80 m, nodes should send their data individually; for distances between 83 and 123 m, a cluster density of two is most effective; and for distances between 123 and 149 m, the optimal density increases to three nodes.  
WSN; energy consumption; scalability; lifetime; clustering; Leach protocol Article  
28 February 20258 April 202 In 2023, a new study developed three main CH criteria: residual energy, node centrality, and number of neighbors merged utilizing fuzzy optimization [8]. To ensure the selection of the short paths to transport packets, they used reinforcement learning combined with a genetic algorithm-based routing protocol. Later, reference [9] introduced the TEECH fuzzy-based protocol, which suggests that an ideal CH is one with a high level of remaining energy, a maximum number of neighbor nodes, and very close to its BS. In the reference [10], a new strategy of sink mobility was introduced, based on SMEOR routing in energy harvesting. Using residual energy to select a suitable CH is undiscussable. This is because the level of energy defines in one way or another the lifetime of a node. However, the load charge also defines the amount of energy used in each operation that consumes energy. For WSNs, as modeled in LEACH [11], which is a one-hop cluster-based protocol, the fundamental operations are resumed in the sending, receiving, and aggregating packets. Furthermore, LEACH limits this architecture in a WSN composed of 100 nodes distributed in an area of 100 m \(\times\) 100 m, with a BS located in the center. To LEACH, an optimal cluster is one with 10 nodes that uses a random manner to select CHs.  
Clustering is now the foundation of the majority of solutions developed to address routing and lifespan issues in WSNs. However, these methods are not always optimal, as their effectiveness depends on the network's design and topology, particularly in cluster-based structures. It is not always true that clustering is the most effective strategy for increasing the lifespan of WSNs.  
In this paper, we aim to evaluate the correctness of the hypothesis that \"clustering is a better approach to prolong WSNs\" lifetimes\". Based on a mathematical study and proven by simulation results, our findings demonstrate that this hypothesis is not entirely correct. Furthermore, we prove that cluster density is related directly to nodes and their distance to the BS.