[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Next Article in Journal
Three-Dimensional Shape Reconstruction from Digital Freehand Design Sketching Based on Deep Learning Techniques
Next Article in Special Issue
A Study on a Scenario-Based Security Incident Prediction System for Cybersecurity
Previous Article in Journal
Development and Implementation of a Deep Learning Algorithm to Evaluate the Powder Distribution Process During 3D Printing Using the LPBF Method
You seem to have javascript disabled. Please note that many of the page functionalities won't work as expected without javascript enabled.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Extending WSN Lifetime with Enhanced LEACH Protocol in Autonomous Vehicle Using Improved K-Means and Advanced Cluster Configuration Algorithms

by
Cheolhee Yoon
1,
Seongsoo Cho
2,* and
Yeonwoo Lee
3,*
1
Laboratory of Autonomous Vehicle and Block-chain, Korean National Police University, Asan 31539, Republic of Korea
2
School of Computer Science and Engineering, Soongsil University, Seoul 07027, Republic of Korea
3
Department of Artificial Intelligence Engineering, Mokpo National University, Mokpo 58554, Republic of Korea
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2024, 14(24), 11720; https://doi.org/10.3390/app142411720
Submission received: 4 November 2024 / Revised: 3 December 2024 / Accepted: 12 December 2024 / Published: 16 December 2024
Figure 1
<p>The formation for the cluster round in the LEACH protocol and the architecture of LEACH for the WSN.</p> ">
Figure 2
<p>An illustration of the 200 <math display="inline"><semantics> <mrow> <msup> <mrow> <mi mathvariant="normal">m</mi> </mrow> <mrow> <mn>2</mn> </mrow> </msup> </mrow> </semantics></math> network area simulation setup with distributed sensor nodes, the CH, and the BS and the autonomous vehicle with a sensor node for each scenario; the BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2.</p> ">
Figure 3
<p>Clustering results with distributed sensor nodes, CHs, and BS, after initial K-means clustering simulation for each scenario; BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2, respectively.</p> ">
Figure 4
<p>Clustering and alive sensor nodes’ map for a BS located at (100 m, 300 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 262, 569, and 1003, respectively.</p> ">
Figure 5
<p>Clustering and alive sensor nodes’ map for a BS located at (100 m, 100 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 1443, 1621, and 1702, respectively.</p> ">
Figure 6
<p>Simulation result of network lifetime with alive nodes graph for each round with no mobility: (<b>a</b>) Scenario 1 (BS = 100 m, 300 m), (<b>b</b>) Scenario 2 (BS = 100 m, 100 m).</p> ">
Figure 7
<p>The simulation result of the network lifetime with an alive node graph for each round, with a maximum mobility range of up to 10 m/round: (<b>a</b>) Scenario 1 (BS = 100 m, 300 m), (<b>b</b>) Scenario 2 (BS = 100 m, 100 m).</p> ">
Figure 8
<p>Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 1 (BS = 100 m, 300 m) with mobility: (<b>a</b>) no mobility and (<b>b</b>) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.</p> ">
Figure 9
<p>Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 2 (BS = 100 m, 100 m) with mobility: (<b>a</b>) no mobility and (<b>b</b>) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.</p> ">
Versions Notes

Abstract

:
In this paper, we propose an enhanced clustering protocol that integrates an improved K-means with a Mobility-Aware Cluster Head-Election Scored (IK-MACHES) algorithm, designed for extending the lifetime and operational efficiency of Wireless Sensor Network (WSN) with mobility. Variety approaches applying Low Energy Adaptive Clustering Hierarchy (LEACH) often struggle to manage optimal energy distribution due to their static clustering and limited cluster head (CH) selection criteria, primarily focusing on the proximity of residual energy or distance. Thus, this paper proposes an algorithm that takes into account both the residual energy of sensor nodes and the distance between the cluster’s central point to the base station (BS), which ultimately enhances the network’s lifetime. Additionally, our approach incorporates mobility considerations, enhancing the adaptability of the mobility environments, such as autonomous vehicular networks. Our proposed method first constructs the cluster’s configuration and then elects the CH applying an improved K-means clustering algorithm—one of the machine learning methods—integrated with a proposed IK-MACHES mechanism. Three CH scoring strategies in the proposed IK-MACHES protocol evaluate the residual energy of the nodes, their distance to the BS and the cluster central point, and relative node’s mobility. The simulation results demonstrate that the proposed approach improves performance in terms of the first node dead (FND) and 80% alive nodes metrics with mobility, compared to other LEACH protocols such as classical LEACH, LEACH-B, Improved-LEACH, LEACH with K-means, Particle Swarm Optimization (PSO), and LEACH-GK protocol, thereby enhancing network lifetime through optimal CH selection.

1. Introduction

Over the past few years, Wireless Sensor Networks (WSNs) have played significant role in areas such as health monitoring, military operations, environmental monitoring, and autonomous vehicular network and drone-related technologies due to their extensive capability of applications. The WSN consists of a set of multiple sensor nodes that continuously monitor and collect data, transmitting it from their surroundings to a central base station (BS) through other intermediate nodes. A key advantage of WSNs is their capability to function in remote or inaccessible environments, making them essential for applications such as disaster management and safety surveillance.
WSNs face various challenges, such as energy consumption, sensor node deployment, routing algorithms, energy efficiency, cluster-head (CH) selection, and robustness. Sensor nodes in the WSN [1,2] are often deployed in large quantities, particularly in locations that are difficult for humans to access. Consequently, it is crucial to use the limited energy of these sensor nodes efficiently since it is typically impractical to replace or recharge their batteries. Therefore, one of the primary objectives in WSN design is to minimize energy consumption at each node to enhance network energy efficiency. If a wireless sensor node exhausts its energy, it becomes inoperable; moreover, if a certain threshold (e.g., 50% or 80%) of nodes in the network exhaust their energy, the network itself may become nonfunctional. Moreover, WSNs face several challenges, including energy consumption, sensor node deployment and its CH selection, and their routing algorithms. To address these challenges, researchers have developed various routing protocols and proposed optimization techniques to establish the most efficient path between transmitting and receiving nodes. Particularly, to reduce node energy consumption and extend network lifetime, research work in [3,4,5] have focused on addressing these challenging issues.
Among these previously studied protocols, the Low Energy Adaptive Clustering Hierarchy (LEACH) is one of the most widely adopted clustering-based algorithms, which adopts a hierarchical method and aims at enhancing energy efficiency [6]. In [7], a comprehensive survey presents a comparative analysis of various protocols from LEACH, highlighting that LEACH had been used as the prototypical model of a clustering algorithm. LEACH is widely adopted across various applications due to its cluster-based structure, which not only reduces the power consumption but also optimizes energy and data transmission efficiency. LEACH organizes nodes into clusters and employs a probabilistic threshold to elect a CH within each cluster. Although LEACH is somewhat effective, it does not always ensure optimal cluster configurations. Actual clustering in the LEACH algorithm can sometimes result in clusters with too few or too many nodes due to its probabilistic selection of cluster heads, leading to inefficiencies and data transfer failures, such as the first node dead (FND). Additionally, LEACH does not consider the spatial distribution or residual energy levels of nodes when selecting cluster heads, which can further exacerbate energy consumption and reduce network lifetime.
To address the challenging issue of the LEACH algorithm, various LEACH-based protocols have been proposed to address these limitations by improving CH selection criteria, considering factors like residual energy, mobility, energy efficiency, centralized formation, and balanced cluster formation [7]. Among these protocols, energy-aware versions of the LEACH protocol (LEACH-B in [8], I-LEACH in [9]) adjust the CH election probability based on the residual energy of nodes to reduce the likelihood of nodes with low energy becoming CHs. Specifically, the energy-aware LEACH protocol modifies the CH election threshold by factoring in the residual energy so that nodes with lower remaining energy have a reduced probability of being selected as CHs.
Despite these improvements, energy-aware LEACH still fails to guarantee optimal cluster configurations or balanced node density across clusters, limiting its effectiveness in prolonging network lifetime. That is the reason that the problem of nodes with less residual energy being elected as cluster heads has been improved; it takes into account energy terms in the probability threshold and multiplies the remaining amount of energy in the nodes by the cluster head election threshold, the lower the residual energy, and the lower the probability of cluster head election. Therefore, the energy-consideration LEACH protocol still cannot guarantee optimal cluster formation or even node density per cluster.
The distance between CH and the BS significantly impacts the energy consumption issue. Numerous clustering protocols, such as Improved-LEACH [10] and BN-LEACH [11], select CHs based on their proximity to minimize the energy usage. The most recent work on energy issues in WSNs [12], particularly focused on wireless-powered IoT, proposes a deep deterministic policy gradient (DDPG)-based distributed multimode resource allocation algorithm.
Another approach involves using machine learning methods, such as the K-means clustering algorithm [13,14,15,16], for WSN protocols. Unlike LEACH, K-means-based protocols have focused on how to enhance the CH selection process by considering factors such as residual energy and mode location. Thus, K-means-based protocols first form clusters to achieve a more uniform distribution of nodes within each cluster, selecting a node with substantial residual energy or proximity to the cluster’s central point as the CH afterward. Although this method results in more balanced clusters, it has its limitations. For instance, nodes located far from the BS may still become CHs, which accelerates their energy depletion and leads to an early FND. In addition, because K-means involves iterative adjustments to the cluster center, it requires more computation time compared to traditional hierarchical algorithms. Another shortcoming of K-means-based protocols is their failure to account for the energy-intensive transmission distance between CHs and the BS, focusing only on residual energy or proximity to the cluster center. Recent work on advanced clustering methods such as the Grid-K-means-based LEACH protocol suggested improved network stability and lifetime [17].
The mobility-based CH clustering protocol in WSNs are classified into the node’s mobility and network architecture aspect. The LEACH-M (Mobile LEACH) [18] protocol proposed the solution to maintain the communication between the mobile node and mobile CH for avoiding being exile from cluster members. This is an efficient approach for vehicular network utilizing a WSN, costing inevitable increased overhead. In addition, there is an increasing trend of research and application cases on autonomous vehicles with WSNs [18,19,20,21]. In [18], a data acquisition algorithm for unmanned aerial vehicles (UAVs) in acoustic WSNs was proposed using a reinforcement learning method. Meanwhile, [20] examined autonomous vehicles with WSNs for monitoring greenhouse crops, focusing on design and implementation within a classical WSN topology.
In this paper, we aim to address these limitations by proposing an improved clustering protocol that enhances WSN energy efficiency. Our protocol considers the residual energy of each node, the distance to the BS when electing the CH, and the mobility, utilizing an improved K-means combined with a Mobility-Aware Cluster Head-Election Score (IK-MACHES) algorithm for this purpose. This IK-MCHES algorithm assigns a score to each node based on these three factors, enabling a more energy-efficient CH selection and ultimately prolonging network lifetime.

2. Related Research

2.1. LEACH Protocol for WSN

The LEACH protocol [6] was introduced to promote balanced energy utilization and the efficiency of WSNs by dividing the network into multiple clusters. LEACH organizes nodes into clusters and employs a probabilistic threshold to elect a CH within each cluster. LEACH is recognized as the first and most popular hierarchical routing protocol to utilize clustering, typically adopting a Time Division Multiple Access (TDMA)-based MAC protocol. It organizes sensor nodes into clusters, where each cluster is managed by a CH responsible for aggregating data from its members and forwarding it to the sink node. The LEACH protocol operates in cyclical phases, with each cycle comprising two primary phases: the setup phase and a steady-state phase (or the data transmission phase). During the setup phase, CHs are elected, clusters are formed, and a TDMA schedule is established, as illustrated in Figure 1.
The LEACH protocol adopts a TDMA scheme for to its energy efficiency and simplicity, making it better suited than Frequency Division Multiple Access (FDMA) for resource-constrained WSNs. TDMA prevents collisions by assigning unique time slots to each node, reducing idle listening and ensuring predictable, synchronized communication, which aligns well with LEACH’s cyclical operation phases. In contrast, FDMA requires more complex hardware for fine frequency tuning and consumes more energy for frequency stabilization, making it less practical for WSNs. Thus, the TDMA-based LEACH protocol not only conserves energy but also ensures simple, collision-free communication as the optimal choice for LEACH’s clustering-based design.

2.1.1. Setup Phase

In the setup phase, each sensor node independently decides whether to become a CH for the current round by generating a random number between 0 and 1 and comparing it to a predefined threshold. If the number is below the threshold, the node becomes a CH; otherwise, it remains a normal node, allowing for balanced energy distribution across the network. That is, the CH is randomly elected by the probability threshold equation, and the cluster configuration is performed.
The selection of CHs following this manner leads it to distribute energy between all the network nodes. The probability threshold T ( n ) used to elect CHs for a node n in the LEACH protocol is defined to ensure that each node has a fair chance of becoming a CH while balancing energy usage across the network. The threshold function typically can be expressed as Equation (1), and it has a value between 0 and 1.
T n = P 1 P × r mod   1 P i f n G 0 o t h e r w i s e
where P is the desired percentage (probability) of CHs in the network, and this determines the portion of the nodes that should act as CHS in each round, allowing the network to regulate the number of CHs effectively. The variable r is the current round or epoch number, and G is the set of nodes that have not yet been selected as CHs in the last 1/ P rounds. By ensuring that only nodes in G are considered, LEACH avoids repeatedly selecting the same nodes as CHs, balancing the energy consumption over time. The variable r mod 1 / P helps to cycle through the nodes, ensuring each node has a turn at becoming a CH approximately once every 1/ P rounds. It resets every 1/ P rounds, providing fair CH rotation across nodes. When a node n generates a random number between 0 and 1 at the start of each round, it compares this number to T ( n ) . If the random number is less than T ( n ) , the node elects itself as a CH for that round. This approach maintains a balanced and probabilistic selection of CHs, distributing energy consumption evenly across the network nodes over time.
After the CHs are elected by Equation (1), the CHs broadcast advertising messages to notify surrounding nodes of their status. Each sensor node then selects a CH to join based on the signal strength received from nearby CHs, with stronger signals indicating closer CHs. When a node decides on a CH, it sends a request message to the chosen CH, asking to join its cluster. Once clusters are established, each CH provides its members with a TDMA schedule, allowing each node to know its designated time slot for transmitting collected data to the CH.

2.1.2. Steady-State Phase

In the steady-state phases (or data transmission phase), each normal node collects environmental data and sends its collected data to its designated CH during its assigned TDMA slot schedule to conserve energy and reduce interference. This stage is composed of numerous frames, and it is much longer than the setup phase. The CH then aggregates the received data from all member nodes and transmits it to the BS (or sink node) using Code Division Multiple Access (CDMA) to avoid the collision.

2.1.3. Limitation of LEACH Protocol

The LEACH algorithm’s probabilistic selection of CHs often leads to unbalanced clusters, as it does not consider factors like the spatial distribution and residual energy of nodes, resulting in some CHs handling excessive data loads and depleting their energy quickly. Since LEACH does not consider the distance between CHs and the BSs, nodes located farther from the BS may still be chosen as CHs, resulting in higher energy consumption for long-distance data transmission. These inefficiencies collectively shorten the network’s lifetime, limiting LEACH’s effectiveness in sustaining energy-efficient operation over extended periods. Consequently, while LEACH provides a foundation for clustering-based protocols, its limitations have driven research towards improved algorithms that consider node energy levels and spatial factors to achieve more balanced and efficient clustering.
Additionally, LEACH uses a TDMA schedule to minimize interference between nodes and CDMA codes to prevent collisions among CHs. Nodes remain in sleep mode until their designated transmission time, reducing unnecessary transmissions and conserving energy. Despite these advantages, LEACH has significant limitations, including the random selection of CHs, which does not consider nodes’ remaining energy, leading to early energy depletion in some CHs. Additionally, LEACH’s single-hop transmission from CHs to the BS makes it unsuitable for large networks, as it can result in excessive energy consumption for distant CHs.

2.2. Machine Learning-Based K-Means Clustering Protocols for WSN

2.2.1. Residual Energy

In CH selection, residual energy plays a crucial role in extending the network lifespan and enhancing performance, as selecting a CH with higher energy among cluster members optimizes these factors. In Refs. [8,9], improvements of the conventional LEACH protocol have been studied, LEACH-B and I-LEACH, respectively, to achieve near-optimal CH counts by considering the residual energy, neighboring node count, and distance to the base station (BS) during cluster formation. These extend the network lifespan more effectively than the original LEACH protocol, which used only a preset threshold function.
In the LEACH-B protocol [8], nodes are aware of only their own position and the base station (BS) location, not other nodes. If the number of CHs falls below a specified threshold, additional nodes with sufficient energy become CHs, while low-energy CHs are removed, ensuring a consistent number of CHs. LEACH-B improves upon the original LEACH by extending the network lifespan through this uniform CH count. Meanwhile, the I-LEACH protocol further enhances clustering by selecting CHs based on residual energy, node location, and the number of neighbors, considering the optimal cluster count K o p t , which improves network efficiency and longevity.
The I-LEACH algorithm [9], like many clustering protocols, operates in three stages: CH selection, cluster formation, and data transmission. Unlike the original LEACH protocol, which selects CHs based solely on a preset threshold, I-LEACH incorporates additional factors—such as residual energy, the number of neighboring nodes, and the distance to the base station (BS)—to improve the network lifespan. In CH selection, each node generates a random number and is selected as a CH if this number is below the updated threshold.
K o p t =   N 2 π × ϵ f s ϵ m p × M d t o _ B S 2
where K o p t is the optimal cluster number in the network and N is total number of nodes in the network. The variables ϵ f s and ϵ m p are, respectively, a free-space model energy constant and a multipath model constant. M represents the area or field dimension where the sensor nodes are deployed, and d t o _ B S is the average distance of the nodes to the BS. Thus, Equation (2) calculates the optimal number of clusters by balancing area coverage and energy efficiency. It divides the network area evenly and considers energy consumption patterns, accounting for both short- and long-distance transmission costs. By adjusting the number of clusters based on the node density, area size, and distance to the base station, it aims to extend the network lifespan and improve energy efficiency.
The Improved-LEACH protocol is a clustering routing method that selects cluster heads (CHs) based on distance within the network. In this modified version, proposed by the authors in [10], CH selection considers two key parameters: the residual energy of each node and its distance to the base station (BS). In the original LEACH protocol, Equation (1) is used to elect the CH without taking into account the node’s residual energy. Consequently, a node with low residual energy could still be chosen as a CH, which might lead to premature energy exhaust and reduced network lifespan. To address this, research in [10] proposed a modified threshold equation:
T n n e w = T n × E c u r r e n t E m a x
where E m a x represents the maximum (initial) energy of the node and E c u r r e n t is the residual energy of each node. This adjustment in the threshold value (between 0 and 1) means that a value closer to 1 indicates a higher likelihood of CH selection, while a value nearer to 0 reduces the chances. The threshold for residual energy is adjusted by multiplying the Equation (1) value by the node’s residual energy ratio. This adjustment reduces the likelihood of nodes with lower residual energy being selected as cluster heads, thereby increasing the network’s overall lifespan.

2.2.2. K-Means Clustering

K-means is a machine learning algorithm used for solving clustering problems by classifying a dataset into a specified number of clusters ( K clusters). The algorithm begins by (1) initializing k centroids, ideally positioned as far from each other as possible. (2) Each data point is then assigned to the nearest centroid, (3) forming an initial grouping. (4) New centroids are calculated as the centers of mass of these clusters, and data points are reassigned to the nearest new centroids. (5) This process repeats in a loop, adjusting centroid positions until they stabilize and no longer move. The K-means clustering objective function is designed to minimize the sum of squared distances between data points and their respective cluster centroids, as defined in Equation (4).
J X ; C = j = 1 K i = 1 n x   i j c j 2
where K is the number of clusters and x i j is the data point (location of a node) in the j-th cluster. A set of nodes’ locations is defined as X = x 1 ,   x 2 ,   ,   x n . The variable c j is the centroid of the j-th cluster, and x   i j c j 2 is the squared Euclidean distance between a data point) and its cluster centroid. This iterative method continues until the centroids reach a stable position, resulting in the formation of compact clusters (an optimized clustering) where data points are close to their respective centroids.
The integration of K-means clustering with the LEACH protocol has demonstrated significant potential for enhancing energy efficiency in WSNs. The authors in [14] introduced an energy-efficient hybrid clustering algorithm that combines K-means with LEACH. Their approach leverages K-means for initial node classification and subsequently applies LEACH for refining CH selection, resulting in balanced energy distribution across the network. Similarly, in [15], a modified K-means clustering algorithm was proposed, incorporating the distances among CHs, member nodes, and the remaining energy of nodes. This method effectively reduces overall energy consumption and extends the network lifespan, making K-means a pivotal tool in WSN optimization.
Machine learning (ML) provides practical solutions to complex distributed problems in WSNs, particularly those related to energy-efficient routing and clustering. ML algorithms iteratively learn the properties of the environment and adapt their behavior to optimize network performance. Commonly employed ML techniques in WSNs include neural networks, fuzzy logic (FL), evolutionary algorithms, reinforcement learning, and bio-inspired intelligence approaches. Among these, Particle Swarm Optimization (PSO) has been widely studied for WSN clustering, as evidenced in prior research [22,23,24]. PSO is recognized for its ability to optimize cluster head selection and routing paths with relatively low computational cost, making it suitable for resource-constrained devices like sensor nodes [22]. These ML-based approaches have shown superior performance in extending network lifetime and improving energy efficiency.
Despite the strengths of ML methods, K-means clustering remains a preferred approach in WSNs due to its scalability, simplicity, and compatibility with the resource limitations of sensor nodes. Unlike computationally intensive ML techniques, such as neural networks or hierarchical clustering, K-means imposes minimal computational overhead while ensuring rapid convergence. This makes it well suited for large-scale WSNs with dynamic node densities. Additionally, K-means is highly adaptable, allowing for customization with parameters such as residual energy and communication distance to optimize clustering decisions. Its integration with adaptive protocols like LEACH has demonstrated significant improvements in energy balancing and network stability, further solidifying its position as a practical and efficient choice for clustering in WSNs. Thus, while advanced ML methods offer notable advantages, the simplicity and scalability of K-means make it a favored solution in energy-sensitive WSN environments.

3. Proposed Model

3.1. IK-MACHES: Improved K-Means with Mobility-Aware Cluster Head-Election Scored Algorithm

The proposed protocol utilized the K-means clustering algorithm within a WSN to ensure uniform distribution of nodes across clusters, albeit at a slower rate compared to traditional hierarchical clustering methods. A recurring issue with this approach is the repeated election of the same node as the CH based primarily on its proximity to the cluster’s center (CC) or its higher residual energy. This can significantly shorten the network’s lifespan. In order to incorporate mobility into the improved K-means with CH election, especially for scenarios like autonomous vehicles, where node positions are dynamic, this paper adopted a dynamic cluster management and mobility-aware CH election mechanism. We named this algorithm the Improved K-means with Mobility-Aware CH-Election Scored (IK-MACHES) algorithm.
For avoiding being a lost member node, continuous node tracking is managed by dynamic cluster management that tracks node position and recomputes the K-means clustering periodically or when significant movement is detected. Secondly, this IK-MACHES algorithm inputs mobility metrics such as predicted trajectory and speed into the CH election process, ensuring that CHs are not only energy efficient but also stable in terms of movement and connectivity. This enhanced IK-MACHES algorithm with mobility consideration ensures that the WSN adapts to changes in node positions while optimizing energy use and maintaining effective communication paths. By integrating mobility into the scoring system, the algorithm offers a reliable solution for dynamic environments, where node positions frequently change, such as in autonomous vehicular networks. To address these issues, the protocol proposes enhancements to enhance energy efficiency and manage clustering more effectively. Re-clustering is restricted to the initial round of network activation and subsequent rounds, where additional nodes have depleted their energy, thus mitigating the time-consuming matter of frequent cluster reconfigurations.
The proposed IK-MACHES algorithm is based on improved K-means clustering technique, designed to tackle the inherent inefficiencies in CH selection by employing traditional K-means clustering and LEACH protocol. This protocol operates in two primary phases: (1) initialization and (2) cluster-head election, each designed to optimize the distribution and management of nodes within the network.

3.2. Energy Model

The energy consumption in a network was calculated using a first-order radio model, which considers both transmitter and receiver components. Energy usage depends on the transmission distance: the free space model is used for shorter distances and the multipath model for longer ones. The energy for transmitting an l -bit message combines the electronics’ energy ( E e l e c ) and the power amplifier’s energy, which scales with distance and message size. The energy consumption of the transmitter and the receiver for transmitting an l -bit message can be calculated as follows:
E T = l E e l e c + l ϵ f s × d 2 ,        d d t h   l E e l e c + l ϵ m p   d 4 ,        d > d t h
E R = l E e l e c ,       d t h = ϵ f s ϵ m p
where E T is the required energy for transmission and E R is the required energy in the receiver. E e l e c is the required energy per bit in both the transmitter and the receiver. The variable d is the distance between the transmitter and the receiver. The variable d t h is the distance threshold. The variables ϵ f s and ϵ m p are radio amplifier energy coefficients for the free space and multipath fading, respectively.
We assumed that there are nodes N distributed uniformly in an M area. If there are optimum value of k clusters in LEACH protocol, there are on average N / k nodes per cluster (one CH and non-CH nodes). Each CH dissipates energy, receiving signals from the nodes, aggregating the signals, and transmitting the aggregate signal to the BS. Since there are many rounds within the steady phase, the energy consumption by a CH during any given round r within the steady phase can be calculated as sum of E T and E R as well as the required energy for data aggregation E D A with data aggregation ratio.
E C H r = l E e l e c N k 1 + l E D A N k + E T  
where l is the number of bits in each message and represents the energy expended by the CH to transmit aggregated data to the BS. The N / k 1   factor quantifies the number of transmission events the CH undertakes per round. Each node transmission to the CH consumes E T , while l E D A ( N / k ) represents the energy dissipated due to data aggregation performed by the CH [20]. The energy consumption of a normal member node sending data to its CH in round r is
E n o n C H r = E T  
Hence, the residual energy of node i in round r can be computed by
E i r e s r =   E i r e s r 1 E C H ( r ) ,           i C H s E i r e s r 1 E n o n C H ( r ) ,      i C H s
where E i r e s r 1 is the residual energy of node i in round r 1 .

3.3. Proposed Mobile-Aware Cluster Head-Election Scored (MACHES) Algorithm

Using the K-means clustering algorithm in the WSN protocol results in the member nodes in the cluster being as uniform as possible, but it takes longer to cluster than traditional hierarchical algorithms. In addition, CH election has the problem of continuous CH election on the same node, only considering the residual energy of the node or node that is mostly close to the cluster’s center point. This results in shortening the lifetime span of the network, and when electing a cluster head while not considering the distance to the node and base station, the overall energy efficiency of the network can be reduced.
The proposed MACHES algorithm aims to enhance conventional clustering approaches by introducing a sophisticated scoring mechanism that evaluates nodes based on their residual energy, their proximity to the cluster center (CC) and the BS, and their mobility stability. This method ensures that the elected CHs are not only energy rich but also optimally located to minimize overall transmission distances and energy costs.
Initially, clusters are formed only during setup stage or when significant energy depletion occurs, reducing the need for frequent reconfigurations. For a CH election, each node is evaluated based on three key scoring factors: (i) the mobility score of each node ( S M ), the BS score ( S B S ), and CC score ( S C C ). (ii) These scores assess a node’s mobility stability, residual energy relative to its distance from the BS, and the CC, respectively. The mobility score is calculated based on both the node’s displacement compared to its maximum possible displacement and a normalized direction change against the maximum direction change. The mobility score is designed to prioritize nodes that are relatively stable (low displacement and minimal direction change) as cluster heads, as high mobility can lead to instability in cluster formation. Nodes with the highest scores are shortlisted as CH candidates. (iii) The final selection considers the total integrated score to ensure that the elected cluster head minimizes energy consumption across the network, thereby (iv) optimizing the overall network performance.
The protocol operates in two primary phases, (1) initialization and (2) cluster-head election, each designed to optimize the distribution and management of nodes within the network.

3.3.1. Initialization Phase

In the initialization phase of the proposed protocol, the node positions are randomly assigned within a specified area M . Each node is then predefined with a predefined energy level, E i n i t . To carry out efficient data transmission and energy utilization, the protocol undertakes an initial clustering process using the K-means algorithm. This step is crucial, as it determines the optimal number of clusters, K o p t , based on the spatial distribution of the nodes. The clusters are formed around calculated center points, which are adjusted dynamically in response to changes in node availability and energy levels. In the initial phase, the cluster configuration is re-evaluated at the first operational round and any subsequent rounds following the complete depletion of energy by any node. This re-evaluation helps in maintaining optimal clustering structure, thus enhancing the network’s overall performance and longevity. The re-calculation and re-location of the center points continues until a stable cluster configuration is confirmed.

3.3.2. Mobility-Aware Cluster-Head Election Scored (MACHES) Procedure

The selection of a CH within each cluster is determined through a triple scoring mechanism based on the integration of S M (mobility score), S B S (BS score), and S C C (CC score). This scored mechanism guarantees the selection of a CH that not only has high residual energy but is also optimally positioned in relation to both the BS and the cluster’s centroid. This strategic positioning aids in conservative energy usage and extends the network’s operational lifespan.
Nodes transmit data to their designated CHs. The energy expended in these transmissions is computed based on the distance to the CH and predefined transmission energy parameters, adjusting for the distance relative to a preset distance threshold ( d t h ). CHs then aggregate the received data and forward it to the BS, a process that incurs additional energy consumption based on the distance to the BS and the volume of data transmitted. The residual energy level of each node is recalculated to reflect consumption, and the system progresses to the next round unless a termination condition is met.
The protocol restricts reconfiguration to only the initial setup round and subsequent rounds where additional nodes exhaust their energy reserves. This adjustment ensures that cluster reconfigurations are not excessively frequent, which can be a significant time sink. The protocol enhances decision-making during CH elections by considering not just the residual energy of the nodes but also their proximity to the CH and BS. This holistic view prevents suboptimal cluster head selections that could lead to quicker energy depletion, especially in nodes that are distant from the base station.
  • CH-Election Scoring (CHES) Mechanism.
Each node i within a cluster computes three scores: (i) BS score based on its distance to the base station ( S B S ), (ii) CC score based on its distance to the CC’s point ( S C C ), and (iii) mobility score based on node’s normalized displacement and direction change ( S M ), as specified by the following equations:
S i B S = E ( i ) r e s E i n i t d ( i ) t o B S m a x d t o B S
S i C C = E ( i ) r e s E i n i t d ( i ) t o C C m a x d t o C C
where E ( i ) r e s represents the residual energy of node i , E i n i t is the initial energy, d ( i ) t o B S is the distance from node i to the BS, d ( i ) t o C C is the distance from node i to the CC point, and the maximum distances are taken over all nodes to normalize the impact of geographical dispersion. S B S assesses the node’s energy efficiency relative to its distance from the BS, while S C C focuses on the node’s location in relation to the cluster’s centroid. The ratio of residual energy to the initial energy, the first term of Equations (10) and (11), means the relative size (normalization value) of the residual energy. Since this ratio presents a decrease over time and the distance metric inversely relates to score, a node’s score values are normalized between 0 and 1. The closer proximity yields the higher scores. If the scores derived from Equations (10) and (11) are substantial, the corresponding nodes are nominated as CHs. This scoring system ensures that the selected node not only possesses high residual energy but also occupies a strategic location relative to both the BS and the cluster’s centroid. Upon calculating these scores, the node with the highest combined score is designated as the CH.
The mobility score S M for each mode is weighted combination of two key factors, such as displacement and direction change. This score, normalized between 0 and 1, is designed to prioritize nodes that are relatively stable (exhibiting low displacement and minimal direction change) as CHs since high mobility can result in instability during cluster formation. This can be specified as follows:
S i M = α 1 Δ d i d m a x + β 1 Δ θ i   θ m a x
where Δ d i ,   d m a x are, respectively, the displacement of the node i and maximum possible displacement. The variables Δ θ i , θ m a x are, respectively, the change in direction of the node i ’s movement and maximum possible change in direction (typically π   radians). The variables α and β are control weighting factors for determining the probability of being chosen as the candidate CHs. This score helps to select CHs that maintain their positions within the cluster boundary for extended periods.
This mobility score is integrated into other two metrics, distance and residual energy-related ratio in (10) and (11); it can ensure that CH selection accounts for stability as well as network efficiency. The total score of being a CH can be written as follows:
S C H = w 1 S i M + w 2 S i B S + w 3 S i C C .
This comprehensive scoring mechanism allows CHES to prioritize nodes that exhibit a combination of mobility stability, energy efficiency, and proximity to the BS. By electing CHs with these properties, CHES minimizes cluster reconfiguration costs, balances energy consumption across the network, and ensures stable communication, even in dynamic WSN environments.
  • Total Transmission Distance Metric.
If there is a discrepancy between the scores relative to the BS and the CC, the decision is based on a comparative analysis of potential energy consumption. This involves calculating the total transmission distance, which includes both the distances from all nodes within the cluster to the candidate CH and from the CH to the BS, thus ensuring an energy-efficient selection of the CH. The final selection of a CH involves a calculated comparison of total transmission distances d ( i ) t o t a l for node i :
d ( i ) t o t a l = d i t o B S + j = 1 N d i j .
Here, the d i t o B S is the distance between the node i and BS, while the second term aggregates the distances from the node i to all other nodes within the same cluster. Subsequently, a candidate node with the shortest total transmission distance is then elected as the cluster head. This total includes the distance from the node to the base station plus the cumulative distances from all member nodes within the cluster to the candidate, ensuring the elected head minimizes overall network energy consumption. The node with the smallest total transmission distance under this criterion secures the CH position, efficiently balancing energy usage with operational demands.
  • Cluster Head Selection Strategy.
If multiple nodes exhibit identical score values for potential CH candidacy, the selection process is refined to prioritize proximity to the base station for S B S and proximity to the CC for S C C as the CH candidate. Furthermore, if these candidates have equivalent scores, the node with the shortest distance to the base station is chosen to minimize energy consumption, thereby optimizing the network’s operational efficiency. Following the election, the designated CH collects and transmits data to the BS, adhering to protocols similar to those established by LEACH. The detailed procedure of this proposed strategy is shown in algorithm.
  • Proposed Protocol with MACHES algorithm.
When implementing the MACHES algorithm, the initial parameters are configured according to the network deployment scenario as follows: number of nodes ( N ), area size ( M ), BS location, number of rounds, initial energy of sensor nodes ( E i n i t ), energy required for transmitting or receiving the data bit ( E T ,   E R ), message size ( l ), radio amplifier energy coefficient for free space and multipath transmission ( ϵ f s ,   ϵ m p ), threshold distance ( d t h ), and energy required for data aggregation ( E D A ). The detailed steps for the proposed protocol with CHES algorithm are described in Algorithm 1.
Algorithm 1: Proposed protocol with MACHES algorithm
(a) Initialization Phase:
1:   initialize (node positions) randomly within area size M
2:   initialize (node energy) to ( E i n i t ) for each node
4:   perform initial K-means clustering to determine clusters
5:   for each round ( r ) from 1 to n u m   o f   r o u n d s  do
6:    if  r = = 1  or  a d d i t i o n a l   d e a d   n o d e  then
7:       recalculate (optimum no. of clusters, k o p t ) with K-means
8:        specify the initial center point c j of k o p t
9:        calculate each node of d i t o B S and d i t o C H
10:         adjust the cluster center point based on as the computed distance
11:         if  c e n t e r   p o i n t   c h a n g e d  then go to line 9
12:         else cluster configuration confirmation
13:         end if
14:     end if

(b) Mobility-Aware Cluster-Head Election Scored (MACHES) procedure:
15:     for each node i  do
16:        calculate mobility score ( S ( i ) M ) for node i :
17:         ( S ( i ) M ) = α 1 d ( i ) d m a x + β 1 θ ( i ) θ m a x  
18:        calculate score of BS ( S B S ) for node i :
19:         ( S ( i ) B S ) = E ( i ) r e s E i n i t d ( i ) t o B S m a x d t o B S  
20:        calculate score of CC ( S C C ) for node i :
21:         S i C C = E ( i ) r e s E i n i t d ( i ) t o C C m a x d t o C C
22:     end for
23:     for each cluster k  do
24:        calculate total transmission distance for each node i :
25:          d ( i ) t o t a l = d i t o B S + j = 1 N d ( i ) ( j )
26:        select several CHs with shorter d ( i ) t o t a l as CH candidates
27:        calculate total score: S ( i ) C H =   w 1 S ( i ) M + w 2 S ( i ) B S + w 3 S i C C
28:        among CH candidates elect CH j with m a x i m u m   S ( j ) C H
29:        for each node i in cluster k  do
30:         if  i = = j (cluster head) then
31:           aggregate and transmit data from CH j to BS
32:           compute energy consumption E C H for transmission
33:           if  d t o _ B S > d t h  then:
34:             E C H = l E e l e c N k 1 + l E D A N k + l E e l e c + l ϵ m p × d t o B S 4
35:           else:
36:             E C H = l E e l e c N k 1 + l E D A N k + l E e l e c + l ϵ f s d t o B S 2
37:           update the residual energy of node j :
38:               E j r e s r = E j r e s r 1 E C H ( r ) ,     j C H s
39:         else (for non-CH node)
40:           transmit data from node i to cluster head j
41:           compute energy consumption E n o n C H for transmission
42:           if  d t o _ C H > d t h  then:
43:             E n o n C H = l E e l e c + l ϵ m p × d t o C H 4  
44:           otherwise:
45:             E n o n C H = l E e l e c + l ϵ f s d t o C H 2
46:           update the residual energy of node i :
47:             E i r e s r = E i r e s r 1 E n o n C H ( r ) ,    i C H s
48:         end if
49:        end for
50:     end for
51:     update the residual energies E ( i ) r e s for all nodes based on the consumption
52:     proceed to the next round if termination conditions are not met
53:  end for
54: end Procedure

4. Simulation and Results

4.1. Simualion Parameters and Setup

To evaluate the performance of the proposed algorithm, we consider two scenarios with simulation parameters outlined in Table 1. The simulation involves a network area of 200 m 2 network area, where two different BS locations are examined: Scenario 1 places the BS at (100 m, 300 m), while Scenario 2 positions it at (100 m, 100 m). Within this area, 100 sensor nodes are deployed, each node beginning with an initial energy ( E i n i t ) allocation of 0.5   J .
Figure 2 illustrates the simulation setup within a 200 m 2 network area for evaluating the impact of mobility and clustering protocols under varying BS locations. The network comprises distributed sensor nodes (both CH and non-CH nodes), a BS, and an autonomous vehicle equipped with a sensor node. Two scenarios are considered to analyze the influence of the BS location and node mobility on the performance of clustering algorithms. In Scenario 1, the BS is positioned at (100 m, 300 m), creating a distant BS placement that highlights the energy efficiency of clustering protocols under higher communication costs. In Scenario 2, the BS is relocated closer to the nodes at (100 m, 100 m), reducing communication overhead and emphasizing the effects of mobility within the cluster. This setup evaluates the performance of mobility-aware clustering protocols under realistic WSN conditions, assessing their adaptability to node mobility, cluster stability, and energy efficiency while highlighting the impact of mobility on the network lifetime.
The energy parameters set for the simulation include 10   p J per bit per m 2   ( ϵ f s ) for free space transmission and 0.0013 p J per bit per m 4 ( ϵ m p ) for multipath transmission. The hardware of these sensors requires 50   n J of energy per bit for transmission and reception processes ( E T and E R , respectively). Additionally, data aggregation demands an energy expenditure of 5   n J per bit ( E D A ). Communication within the network utilizes a message size ( l ) of 5000 bits per message. The maximum mobility range is assumed to be within 10 m per round in the simulation. In real-world scenarios, mobility is typically expressed as speed in meters per second (m/s), which may vary depending on the specific application. The simulation runs for 2000 rounds, focusing on data communication efficiency and energy consumption. This setup aims to explore the dynamics of energy utilization and communication efficacy under varying base station locations to optimize sensor network performance and extend operational longevity.
The main simulation parameters are selected as in [11] and listed in Table 1. To verify the energy efficiency of the proposed protocol, it was compared with the LEACH protocol, the K-means with LEACH protocol, and simulation with MATLAB for a network simulation and Python for graph visualization.

4.2. Protocols Compared in the Simulation

In this simulation, we evaluate and compare the performance of several clustering protocols for WSNs, including classical LEACH, LEACH-B [8], Improved-LEACH [10], LEACH-K (K-means integrated with LEACH) [15], LEACH-GK (grid-based K-means LEACH) [17], PSO-based clustering [22], and the proposed IK-MACHES algorithm. Table 2 summarizes the key features, strengths, and weaknesses of each protocol based on their clustering mechanisms. Classical LEACH employs a probabilistic CH selection mechanism, while LEACH-B improves energy efficiency by incorporating residual energy into CH selection. Improved-LEACH introduces additional randomness to reduce repeated CH assignments. LEACH-K refines cluster formations by leveraging K-means clustering based on the node distance and residual energy, and LEACH-GK further enhances scalability and clustering accuracy by integrating grid-based K-means for WSNs. PSO-based clustering utilizes an evolutionary optimization approach, balancing residual energy and distance metrics for higher adaptability and efficiency. The proposed IK-MACHES extends K-means clustering by integrating mobility-aware CH scoring based on residual energy, mobility stability, and distance metrics, achieving a better stability and network lifetime in dynamic WSN environments.

4.3. Simulation Results and Discussion

Figure 3 presents the clustering outcomes following an initial K-means clustering simulation, depicting the distribution of sensor nodes, CHs, and the BS for three scenarios. Each scenario is defined to set different BS locations: Scenario 1 positions the BS at (100 m, 300 m) and Scenario 2 at (100 m, 100 m). This visualization shows how the initial clustering phase constructs sensor nodes and identifies CHs relative to the BS location.
Figure 4 and Figure 5 illustrate the status of alive nodes for various simulation rounds under two distinct scenarios. For Scenario 1, with the BS positioned at (100 m, 300 m), nodes remained active until round 262 with 80 nodes and round 569 with 50 nodes, and by round 1003, only 20 nodes were active. Conversely, Scenario 3, with the BS at (100 m, 100 m), showed slightly prolonged node activity, where 80 nodes remained active until round 276, 50 nodes until round 579, and 20 nodes until round 1010. This variation highlights the impact of BS placement on the network lifetime span. Additionally, the CHES algorithm applied in the simulation aimed to balance the energy consumption between clusters, potentially enhancing the operational efficiency and prolonging the lifespan of CHs. The effectiveness of this method can be confirmed by tracking the remaining energy of cluster heads each round, providing a tangible metric for assessing the impact of energy redistribution on the sustainability of cluster energy resources.
Figure 6 illustrates the network lifetime comparison between the number of rounds and the number of alive nodes in a simulation under no-mobility conditions, conducted in over 2000 rounds with 100 deployed sensor nodes and for two scenarios. In Scenario 1 (Figure 6a, BS located at (100 m, 300 m)), the results show that IK-MACHES outperforms other protocols, maintaining a higher number of alive nodes for a longer duration, especially after 1000 rounds. This is due to its effective integration of residual energy, proximity, and clustering stability through its mobility-aware scoring despite the absence of node mobility. PSO-based clustering also exhibits strong performance, leveraging its optimization-based approach to balance energy consumption. LEACH-GK performs better than other K-means-based protocols (LEACH-K and Improved-LEACH), demonstrating its scalability and clustering accuracy. Classical LEACH and LEACH-B, while simple, show the poorest performance due to their lack of optimization, with the majority of nodes depleting energy before 750 rounds. In Scenario 2 (Figure 6b), where the BS is centrally located at (100 m, 100 m), all protocols exhibit improved performance due to reduced communication distances. IK-MACHES still outperforms the other protocols, maintaining stability beyond 1800 rounds. LEACH-GK and PSO-based clustering follow closely, indicating their efficiency in optimizing cluster formation in static environments. Notably, the proximity of the BS reduces the performance gap between IK-MACHES and other protocols, as shorter distances inherently lower energy consumption. LEACH-K and Improved-LEACH maintain moderate performance, while classical LEACH and LEACH-B again exhibit rapid depletion of energy, emphasizing their inefficiency even in favorable conditions.
Figure 7 depicts the network lifetime performance of various clustering under a maximum mobility range of 10 m/round. In Scenario 1 (Figure 7a), IK-MACHES demonstrates the best performance, maintaining a higher number of alive nodes throughout the simulation, particularly beyond 500 rounds. The mobility-aware scoring mechanism of IK-MACHES ensures stable CH selection by accounting for residual energy, mobility stability, and distance, which minimizes cluster reconfiguration costs caused by node movement. PSO-based clustering follows as the second-best performer, leveraging its optimization capabilities to adapt to dynamic node movements. However, the computational overhead and reduced stability in high mobility environments lead to earlier energy depletion compared to IK-MACHES. LEACH-GK performs better than other protocols by integrating grid-based clustering, which localizes mobility effects and improves clustering efficiency. LEACH-K and Improved-LEACH show moderate performance but are less effective in handling mobility due to limited adaptability in their CH selection criteria. Finally, classical LEACH and LEACH-B experience rapid energy depletion, with most nodes dying within the first 600 rounds, highlighting their inability to address mobility challenges effectively. In the centralized BS placement scenario (Figure 7b), all protocols benefit from reduced communication distances, leading to an improved network lifetime compared to Scenario 1. IK-MACHES achieves the longest network lifetime, retaining more alive nodes across all rounds. Its mobility-aware design makes it particularly effective in dynamic environments, ensuring balanced energy consumption and stable clustering. PSO-based clustering and LEACH-GK perform comparably, with both protocols benefiting from their ability to adapt to node movements while optimizing energy usage. However, LEACH-K and Improved-LEACH exhibit limitations in handling mobility, as their CH selection mechanisms do not explicitly account for node stability. Classical LEACH and LEACH-B again show poor performance, with significant energy depletion within the first 400 rounds, emphasizing their unsuitability for high-mobility scenarios.
The proposed improved K-means with CHES protocol significantly extends network lifespan by delaying node failures and maintaining a higher percentage of active nodes longer than conventional LEACH and LEACH with K-means protocols as listed in Table 3. The proposed protocol significantly delays the first node death (FND) to rounds 243, 435, and 621 while drastically extending the network’s operational life, allowing 80% of the nodes to remain functional up to rounds 262, 697, and 1443, respectively. This means a performance enhancement of up to 443.9% in delaying the FND and up to 281.7% in prolonging the survival of 80% of the nodes compared to the conventional LEACH as well as improvements of 261.29% and 143.96%, respectively, over the LEACH with K-means.
Figure 8 compares the residual energy of nodes after 100, 500, and 1000 rounds for seven different clustering protocols under Scenario 1 (BS at 100 m, 300 m). The results are presented for two conditions: (a) no mobility and (b) with mobility (maximum mobility range of 10 m/round). The visualized data highlight how energy sustainability varies across protocols and scenarios. In the no-mobility condition (Figure 8a), IK-MACHES consistently shows the highest residual energy across all rounds, demonstrating its superior energy-balancing capability. PSO and LEACH-GK follow as the next-best-performing protocols, benefiting from their distance-aware and energy-optimized clustering mechanisms. In contrast, classical LEACH and LEACH-B show significantly lower residual energy, with many nodes nearing complete energy depletion by the 500th and 1000th rounds, emphasizing their inefficiency in energy distribution. Under the mobility condition (Figure 8b), the energy gaps between protocols widen further due to the additional challenge of dynamic node movement. IK-MACHES continues to outperform other protocols, with a balanced and higher residual energy distribution across nodes, particularly after 500 and 1000 rounds. PSO and LEACH-GK maintain moderate performance, though their energy consumption patterns are less uniform than IK-MACHES. Meanwhile, protocols like classical LEACH and LEACH-B exhibit poor energy sustainability, with most nodes depleting energy rapidly due to their lack of mobility-aware mechanisms.
Figure 9 presents the residual energy distribution of nodes after 100, 500, and 1000 rounds under Scenario 2, where the BS is centrally located at (100 m, 100 m). Compared to Scenario 1 (Figure 8), the shorter communication distances in Scenario 2 result in significantly improved energy sustainability across all protocols. Under the no-mobility condition (Figure 9a), the proposed IK-MACHES protocol demonstrates the highest residual energy across all rounds, indicating superior energy efficiency and balanced energy distribution. PSO-based clustering and LEACH-GK follow as the next best performers, with moderate energy consumption and reasonable uniformity among nodes. In contrast, LEACH-K and Improved-LEACH show slightly lower energy retention, while classical LEACH and LEACH-B experience significant energy depletion, especially by the 500th and 1000th rounds, highlighting their limited scalability and lack of optimization. Under the mobility condition (Figure 9b), mobility intensifies energy imbalances across all protocols. Nevertheless, IK-MACHES remains the most effective, maintaining a balanced residual energy distribution even after 1000 rounds. PSO-based clustering and LEACH-GK exhibit moderate adaptability, though they struggle with uneven energy consumption caused by dynamic cluster reconfigurations. Classical LEACH and LEACH-B exhibit the poorest performance, with rapid energy depletion in most nodes due to their inability to account for mobility. LEACH-K and Improved-LEACH perform moderately but remain less resilient to mobility-induced challenges.
When compared with Scenario 1 (Figure 8), Scenario 2 demonstrates improved energy retention for all protocols due to reduced communication distances with the centrally located BS. However, IK-MACHES consistently outperforms all other protocols across both scenarios, with its integration of mobility, residual energy, and proximity metrics ensuring a prolonged network lifetime and balanced energy consumption. These results emphasize the significance of incorporating mobility-aware mechanisms for energy-efficient clustering in dynamic WSN environments.

5. Conclusions

This paper introduced the IK-MACHES protocol, an advanced clustering algorithm designed to enhance the lifetime and operational efficiency of WSNs, particularly in autonomous vehicular environments. By integrating an improved K-means clustering algorithm with a MACHES mechanism, the proposed protocol addresses the limitations of LEACH-based approaches. The IK-MACHES algorithm employs a comprehensive CH scoring strategy that incorporates residual energy, distance to the BS and cluster centroid, and relative node mobility. This multi-metric approach ensures optimal CH placement and load distribution, minimizing energy consumption and cluster instability in both static and mobile WSN scenarios. The simulation results demonstrate that IK-MACHES significantly outperforms classical LEACH, LEACH-B, Improved-LEACH, LEACH-K, LEACH-GK, and PSO-based clustering protocols in terms of the FND and 80% alive node metrics. Under both no-mobility and mobility conditions, IK-MACHES achieves superior energy efficiency and network stability, ensuring a prolonged operational lifetime even in scenarios with high node mobility. This is particularly evident in scenarios with centrally located BSs, where the proposed protocol achieves a balanced residual energy distribution among nodes. These findings highlight the critical role of integrating mobility-aware mechanisms with clustering protocols to address the challenges of dynamic WSN environments, such as vehicular networks. The IK-MACHES protocol provides a scalable and energy-efficient solution, paving the way for future advancements in adaptive WSN clustering methodologies.

Author Contributions

Conceptualization, S.C. and Y.L.; methodology, S.C.; software, C.Y.; validation, C.Y., S.C. and Y.L.; formal analysis, S.C.; investigation, C.Y.; resources, S.C.; data curation, Y.L.; writing—original draft preparation, S.C.; writing—review and editing, Y.L.; visualization, C.Y.; supervision, Y.L.; project administration, C.Y.; funding acquisition, C.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research and its APC were funded by the Institute for Information Communications Technology Planning Evaluation (IITP) grant number (MSIT, Korea, No. 2021-0-01352).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data recorded in the current study are available in all tables and figures of the manuscript.

Acknowledgments

This work was supported by the Institute for Information Communications Technology Planning Evaluation (IITP) grant funded by the Ministry of Science and ICT (MSIT, Korea, No.2021-0-01352, Development of technology for validating autonomous driving services in perspective of laws and regulations).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Kaur, M.; Munjal, A. Data aggregation algorithms for wireless sensor network: A review. Ad. Hoc. Netw. 2020, 100, 102083. [Google Scholar] [CrossRef]
  2. Bhushan, B.; Sahoo, G. Routing protocols in wireless sensor networks. In Computational Intelligence in Sensor Networks; Springer: Berlin/Heidelberg, Germany, 2019; pp. 215–248. [Google Scholar]
  3. Kulik, J.; Heinzelman, W.; Balakrishnan, H. Negotiation-based protocols for disseminating information in wireless sensor networks. Wirel. Netw. 2002, 8, 169–185. [Google Scholar] [CrossRef]
  4. Pantazis, N.A.; Nikolidakis, S.A.; Vergados, D.D. Energy-efficient routing protocols in wireless sensor networks: A survey. IEEE Commun. Surv. Tutor. 2012, 15, 551–591. [Google Scholar] [CrossRef]
  5. Liu, X. A survey on clustering routing protocols in wireless sensor networks. Sensors 2012, 12, 11113–11153. [Google Scholar] [CrossRef]
  6. Heinzelman, W.R.; Chandrakasan, A.; Balakrishnan, H. Energy-efficient communication protocol for wireless microsensor networks. In Proceedings of the 33rd Annual Hawaii International Conference on System Sciences, Maui, HI, USA, 7 January 2000; p. 10. [Google Scholar]
  7. Daanoune, I.; Abdennaceur, B.; Ballouk, A. A comprehensive survey on LEACH-based clustering routing protocols in Wireless Sensor Networks. Ad. Hoc. Netw. 2021, 114, 102409. [Google Scholar] [CrossRef]
  8. Tong, M.; Tang, M. LEACH-B: An improved LEACH protocol for wireless sensor network. In Proceedings of the 2010 6th International Conference on Wireless Communications Networking and Mobile Computing (WiCOM), Chengdu, China, 23–25 September 2010; pp. 1–4. [Google Scholar]
  9. Beiranvand, Z.; Patooghy, A.; Fazeli, M. I-LEACH: An efficient routing algorithm to improve performance & to reduce energy consumption in Wireless Sensor Networks. In Proceedings of the 5th Conference on Information and Knowledge Technology, Shiraz, Iran, 28–30 May 2013; pp. 13–18. [Google Scholar]
  10. Krishnakumar, A.; Anuratha, V. Improved leach: A modified leach for wireless sensor network. In Proceedings of the Advances in Computer Applications ICACA, Coimbatore, India, 24 October 2016. [Google Scholar]
  11. Ghasemzadeh, H.; Rezaeian, M.; Touranposhti, F.D.; Ghasemian, M.M. BN-LEACH: An improvement on LEACH protocol using Bayesian networks for energy consumption reduction in wireless sensor networks. In Proceedings of the 7’th International Symposium on Telecommunications (IST’2014), Tehran, Iran, 9–11 September 2014; pp. 1138–1143. [Google Scholar]
  12. Zheng, K.; Luo, R.; Liu, X.; Qiu, J.; Liu, J. Distributed DDPG-Based Resource Allocation for Age of Information Minimization in Mobile Wireless-Powered Internet of Things. IEEE Internet Things J. 2024, 11, 29102–29115. [Google Scholar] [CrossRef]
  13. Randhawa, S.; Jain, S. Performance analysis of LEACH with machine learning algorithms in wireless sensor networks. Int. J. Comput. Appl. 2016, 147, 7–12. [Google Scholar] [CrossRef]
  14. Gaidhani, A.R.; Potgantwar, A.D. A Review of Machine Learning-Based Routing Protocols for Wireless Sensor Network Lifetime. Eng. Proc. 2024, 59, 231. [Google Scholar] [CrossRef]
  15. Mahboub, A.; Arioua, M. Energy-efficient hybrid K-means algorithm for clustered wireless sensor networks. Int. J. Electr. Comput. Eng. 2017, 7, 2054. [Google Scholar] [CrossRef]
  16. Bidaki, M.; Ghaemi, R.; Tabbakh, S.R.K. Towards energy efficient k-MEANS based clustering scheme for wireless sensor networks. Int. J. Grid Distrib. Comput. 2016, 9, 265–276. [Google Scholar] [CrossRef]
  17. Ben Gouissem, B.; Gantassi, R.; Hasnaoui, S. Energy efficient grid based k-means clustering algorithm for large scale wireless sensor networks. Int. J. Commun. Syst. 2022, 35, e5255. [Google Scholar] [CrossRef]
  18. Afifi, H.; Ramaswamy, A.; Karl, H. Reinforcement learning for autonomous vehicle movements in wireless sensor networks. In Proceedings of the ICC 2021-IEEE International Conference on Communications, Montreal, QC, Canada, 14–23 June 2021; pp. 1–6. [Google Scholar]
  19. Kumar, G.S.; Vinu, P.M.; Jacob, K.P. Mobility metric based leach-mobile protocol. In Proceedings of the 2008 16th International Conference on Advanced Computing and Communications, Chennai, India, 14–17 December 2008; pp. 248–253. [Google Scholar]
  20. Rosero-Montalvo, P.D.; Erazo-Chamorro, V.C.; López-Batista, V.F.; Moreno-García, M.N.; Peluffo-Ordóñez, D.H. Environment Monitoring of Rose Crops Greenhouse Based on Autonomous Vehicles with a WSN and Data Analysis. Sensors 2020, 20, 5905. [Google Scholar] [CrossRef] [PubMed]
  21. Abba, A.M.; Sanusi, J.; Oshiga, O.; Mikail, S.A. A Review of Localization Techniques in Wireless Sensor Networks. In Proceedings of the 2023 2nd International Conference on Multidisciplinary Engineering and Applied Science (ICMEAS), Abuja, Nigeria, 1–3 November 2023; pp. 1–5. [Google Scholar]
  22. Nigam, G.K.; Dabas, C. ESO-LEACH: PSO based energy efficient clustering in LEACH. J. King Saud Univ.-Comput. Inf. Sci. 2021, 33, 947–954. [Google Scholar] [CrossRef]
  23. Vimalarani, C.; Subramanian, R.; Sivanandam, S.N. An enhanced PSO-based clustering energy optimization algorithm for wireless sensor network. Sci. World J. 2016, 2016, 8658760. [Google Scholar] [CrossRef] [PubMed]
  24. Yadav, A.; Kumar, S.; Vijendra, S. Network life time analysis of WSNs using particle swarm optimization. Procedia Comput. Sci. 2018, 132, 805–815. [Google Scholar] [CrossRef]
Figure 1. The formation for the cluster round in the LEACH protocol and the architecture of LEACH for the WSN.
Figure 1. The formation for the cluster round in the LEACH protocol and the architecture of LEACH for the WSN.
Applsci 14 11720 g001
Figure 2. An illustration of the 200 m 2 network area simulation setup with distributed sensor nodes, the CH, and the BS and the autonomous vehicle with a sensor node for each scenario; the BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2.
Figure 2. An illustration of the 200 m 2 network area simulation setup with distributed sensor nodes, the CH, and the BS and the autonomous vehicle with a sensor node for each scenario; the BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2.
Applsci 14 11720 g002
Figure 3. Clustering results with distributed sensor nodes, CHs, and BS, after initial K-means clustering simulation for each scenario; BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2, respectively.
Figure 3. Clustering results with distributed sensor nodes, CHs, and BS, after initial K-means clustering simulation for each scenario; BS location at (100 m, 300 m) for Scenario 1 and at (100 m, 100 m) for Scenario 2, respectively.
Applsci 14 11720 g003
Figure 4. Clustering and alive sensor nodes’ map for a BS located at (100 m, 300 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 262, 569, and 1003, respectively.
Figure 4. Clustering and alive sensor nodes’ map for a BS located at (100 m, 300 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 262, 569, and 1003, respectively.
Applsci 14 11720 g004
Figure 5. Clustering and alive sensor nodes’ map for a BS located at (100 m, 100 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 1443, 1621, and 1702, respectively.
Figure 5. Clustering and alive sensor nodes’ map for a BS located at (100 m, 100 m) scenario; showing the decline to 80, 50, and 20 active nodes at rounds 1443, 1621, and 1702, respectively.
Applsci 14 11720 g005
Figure 6. Simulation result of network lifetime with alive nodes graph for each round with no mobility: (a) Scenario 1 (BS = 100 m, 300 m), (b) Scenario 2 (BS = 100 m, 100 m).
Figure 6. Simulation result of network lifetime with alive nodes graph for each round with no mobility: (a) Scenario 1 (BS = 100 m, 300 m), (b) Scenario 2 (BS = 100 m, 100 m).
Applsci 14 11720 g006
Figure 7. The simulation result of the network lifetime with an alive node graph for each round, with a maximum mobility range of up to 10 m/round: (a) Scenario 1 (BS = 100 m, 300 m), (b) Scenario 2 (BS = 100 m, 100 m).
Figure 7. The simulation result of the network lifetime with an alive node graph for each round, with a maximum mobility range of up to 10 m/round: (a) Scenario 1 (BS = 100 m, 300 m), (b) Scenario 2 (BS = 100 m, 100 m).
Applsci 14 11720 g007
Figure 8. Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 1 (BS = 100 m, 300 m) with mobility: (a) no mobility and (b) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.
Figure 8. Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 1 (BS = 100 m, 300 m) with mobility: (a) no mobility and (b) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.
Applsci 14 11720 g008
Figure 9. Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 2 (BS = 100 m, 100 m) with mobility: (a) no mobility and (b) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.
Figure 9. Comparison of residual energy of nodes after 100 rounds, 500 rounds, and 1000 rounds for Scenario 2 (BS = 100 m, 100 m) with mobility: (a) no mobility and (b) maximum mobility range (10 m/round), depicting how energy sustainability varies by scenario.
Applsci 14 11720 g009
Table 1. Simulation parameters for evaluating the proposed algorithm.
Table 1. Simulation parameters for evaluating the proposed algorithm.
Simulation ParameterValues
Network Area, M 200 × 200 m
Position of the BS Scenario 1: (100 m, 300 m)
Scenario 2: (100 m, 100 m)
Number of Sensor Nodes, N 100
Initial Energy of Sensor Node, E i n i t 0.5 J
Number of Rounds2000
Radio Amplifier Energy Coefficient for Free Space Transmission, ϵ f s 10   p J / b i t / m 2
Radio Amplifier Energy Coefficient for Multipath Transmission, ϵ m p 0.0013   p J / b i t / m 4
Receiving Energy per Data Bit, E T 50   n J / b i t
Transmitting Energy per Data Bit, E R 50   n J / b i t
Energy Required for Data Aggregation, E D A 5   n J / b i t
Message Size, l 5000 bits/message
Maximum Mobility Range10 m/round
Table 2. Key features of the clustering protocols for WSNs for performance comparison in this simulation.
Table 2. Key features of the clustering protocols for WSNs for performance comparison in this simulation.
ProtocolClusteringKey MetricsFeature
StrengthWeakness
LEACHRandom CH SelectionNoneSimplicityUneven energy consumption, instability
LEACH-B [8]Residual Energy-Based CH SelectionResidual EnergyImproved energy efficiencyNo mobility, limited scalability
Improved-LEACH [10]Randomness with Residual EnergyResidual EnergyBalanced CH selectionNo optimization for proximity or mobility
LEACH-K [15]K-Means Clustering + Residual EnergyDistance, Residual EnergyBalanced clustering, scalableHigh computational cost in dense networks
LEACH-GK [17]Grid-Based K-Means ClusteringDistance, Residual EnergyScalability, clustering accuracyLimited adaptation to mobility
PSO [22]Particle Swarm OptimizationDistance, Residual EnergyOptimized energy and proximityHigh computational cost, requires tuning
IK-MACHES (Proposed)Improved K-Means + Mobility-Aware CH ScoringDistance, Residual Energy, MobilityStability, energy efficiency, mobility-awareModerate computational complexity
Table 3. A summary of the simulation results: the network lifetime comparison.
Table 3. A summary of the simulation results: the network lifetime comparison.
ProtocolLEACHLEACH-BImproved-LEACHLEACH-KLEACH-GKPSOProposed
Scenario 1: BS at (100 m, 300 m)
No MobilityFND1215230232522826
80% Alive Nodes184182352195612834984
MobilityFND41265192112314
80% Alive Nodes98167186187198202256
Scenario 2: BS at (100 m, 100 m)
No MobilityFND359363578612689712723
80% Alive Nodes75789711781181109812381357
MobilityFND98102121131187209211
80% Alive Nodes297367438449497498496
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yoon, C.; Cho, S.; Lee, Y. Extending WSN Lifetime with Enhanced LEACH Protocol in Autonomous Vehicle Using Improved K-Means and Advanced Cluster Configuration Algorithms. Appl. Sci. 2024, 14, 11720. https://doi.org/10.3390/app142411720

AMA Style

Yoon C, Cho S, Lee Y. Extending WSN Lifetime with Enhanced LEACH Protocol in Autonomous Vehicle Using Improved K-Means and Advanced Cluster Configuration Algorithms. Applied Sciences. 2024; 14(24):11720. https://doi.org/10.3390/app142411720

Chicago/Turabian Style

Yoon, Cheolhee, Seongsoo Cho, and Yeonwoo Lee. 2024. "Extending WSN Lifetime with Enhanced LEACH Protocol in Autonomous Vehicle Using Improved K-Means and Advanced Cluster Configuration Algorithms" Applied Sciences 14, no. 24: 11720. https://doi.org/10.3390/app142411720

APA Style

Yoon, C., Cho, S., & Lee, Y. (2024). Extending WSN Lifetime with Enhanced LEACH Protocol in Autonomous Vehicle Using Improved K-Means and Advanced Cluster Configuration Algorithms. Applied Sciences, 14(24), 11720. https://doi.org/10.3390/app142411720

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop