# Improving Performance of Cluster Heads Selection in DEC Protocol Using K-Means Algorithm for WSN
## 7 Conclusions  
A modified heuristic of the DEC protocol, named DEC-KM, proposed in this paper optimises energy consumption by leveraging the K-means algorithm for improved node clustering and cluster head (CH) selection. The algorithm identifies optimal CH locations based on energy levels and node positions, ensuring efficient energy distribution. Simulations demonstrated a 28% reduction in distances between CHs and nodes and 31% less total energy consumption, with significant decreases in most extended link distances by up to 67%. DEC-KM also prolonged network stability and lifetime, outperforming previous protocols in various performance metrics.  
Effective power management in networks with limited energy resources requires a combination of hardware optimisations, efficient algorithms, and network-level strategies. The specific techniques to employ will depend on the characteristics and requirements of the network in question. The proposed DEC-KM algorithm will be a very functional tool that will decrease energy consumption in the network.  
Besides the proposed solution, some general strategies used in various networking protocols can be applied additionally to decrease energy usage by implementing power management techniques such as reducing the power state of network interfaces during periods of inactivity. This can include transitioning devices to low-power sleep modes or turning off components that are not currently needed.  
Following further enhancements to the DEC-KM protocol, this protocol can be used to communicate with devices, enabling them to communicate and share data, thereby improving automation and operational efficiency. The main application could be in the security and surveillance environment to monitor and detect unauthorised access or movement. The DEC-KM could help to identify changes in motion or voice by providing timely alerts to the base station of potential breaches.  
This research has improved the lifetime of the network by minimising the value required to ensure connectivity for all sensors, resulting in lower power consumption, which means a lower cost to build such systems. For future plans, the clustering method should work effectively with the real WSNs, and more factors and parameters can be taken into account to improve the lifetime of the network.  
Conceptualisation, A.J. and L.J.-S.; methodology, A.J. and L.J.-S.; software, A.J.; validation, A.J. and L.J.-S.; formal analysis, [PERSON] and L.J.-S.; investigation, [PERSON] and L.J.-S.; resources, [PERSON]-S.; data curation, A.J.; writing--original draft preparation, A.J.; writing--review and editing, [PERSON]-S.; visualisation, A.J.; supervision, [PERSON]-S.; project administration, [PERSON]-S.; funding acquisition, L.J.-S. All authors have read and agreed to the published version of the manuscript.  
The research work was financed from the statutory funds of the Institute of Applied Computer Science, Lodz University of Technology, Poland, No. 501/2-24-1-3.  
Not applicable.  
The data is not available because it is used for a PhD thesis in progress.  
The authors declare no conflicts of interest.