A k-nearest neighbors algorithm for enhanced clustering in wireless sensor network protocols - Hilmani, Adil; Sabri, Yassine; Maizate, Abderrahim; Aouad, Siham; Ayoub, Fouad (Institute of Advanced Engineering and Science, 2025)
Wireless sensor networks (WSNs) are small, autonomous, battery-powered nodes capable of sensing, storing, and processing data, while communicating wirelessly with a central base station (BS). Optimizing energy consumption is a major challenge to extend the lifetime of these networks. In this study, we propose an innovative approach combining the k-nearest neighbors (KNN) algorithm with hierarchical and flat routing protocols to improve node selection and clustering in three key protocols: low-energy adaptive clustering hierarchy (LEACH), threshold-sensitive energy efficient sensor network protocol (TEEN), and hybrid energy-efficient distributed clustering (HEED). Concretely, KNN is used to rank nodes based on their spatial and energy proximity, thus optimizing the choice of cluster heads (CHs) and reducing long and costly connections. Simulations show a reduction in the inter-CH distance, a decrease in overall energy consumption, and an extension of the network lifetime compared to conventional versions of the protocols. These improvements not only help increase operational efficiency, but also enhance communications stability and security, providing a robust and sustainable solution for critical WSN applications.