# Clustering for Lifetime Enhancement in Wireless Sensor Networks
## 3 Advanced Clustering Approach
### Clustering Efficiency: Analysis Study
However, in a topology where the BS is located at one of the vertices of the area, with the farthest point being 141.42 m away, the optimal choice is to use clusters with a maximum density of three nodes. In summary, as the cluster density increases, the required distance becomes greater. Figure 6 presents the energy consumption for receiving and aggregating packets, similar to Figure 5, but with different numbers of neighbors. In this scenario, we selected a cluster density of 10 nodes (one cluster head (CH) and nine cluster members (CMs)), as preferred by LEACH, which hypothetically represents the optimal cluster size. Additionally, we examined a cluster with double the density of LEACH's optimal cluster, chosen because most clusters in the area should not exceed this density except in rare cases. Finally, we  
Figure 2.2 Proportion of energy consumption for adding one neighbor and transmitting one packet at varying distances from the base station. tested the entire WSN with a density of 100 nodes as a single cluster to determine the maximum distance that covers this density. Based on this figure, a cluster head (CH) with nine cluster members (CMs) consumes more energy serving its members than it does sending a packet to the base station (BS) until the distance is less than 250 m. If the CH serves nineteen CMs, this distance increases to 358 m. Although it is unrealistic to have all nodes in a WSN within one cluster due to the limited neighbor selection range of 20 m, this scenario is considered for estimation purposes to demonstrate the impact of density. According to the third subplot, for a cluster composed of 100 nodes, the energy consumed in receiving and aggregating packets remains highest as long as the distance is less than 810 m.  
In summary, this section analyzed the efficiency of using the clustering approach to determine whether clustering enhances WSN lifetime, as hypothesized. By comparing the lifetime of a node in a cluster with that of a node sending packets individually, we found that individual sending is preferable when the distance is less than 75 m (see Figure 3). Next, we examined the energy consumed within a cluster, specifically the energy used by the cluster head (CH) in receiving, aggregating, and transmitting the aggregated packet to the base station (BS). For each cluster member (CM), the CH expends energy in receiving and aggregating the packet, with the minimum being the energy used by a CH serving a cluster composed of two nodes. In such a case, the energy consumed in serving a CM is greater than the energy required to transmit a packet to the BS as long as the distance is less than 83 m. This distance is greater than the farthest point in a WSN distributed over an area of 100 m \(\times\) 100 m with a BS located at the center (50, 50). As the cluster density increases, this critical distance also increases. In a scenario where the BS is located at a vertex of the area and the farthest distance is 141.42 m, we found that a cluster with a density of four nodes (one CH and three members) is inefficient, as it requires a distance of at least 149 m to be effective. Furthermore, testing the optimal LEACH cluster (one CH and nine CMs) revealed that it requires a distance greater than 250 m to be more efficient than individual sending. We also considered a scenario with double the density of the LEACH optimal cluster,  
Figure 2.3 Proportion of energy consumption for different cluster densities (10, 20, and 100) and transmitting one packet at varying distances from the base station. representing common cases where a cluster might reach a density of 20 nodes, though this is rare.