Abstract
Wireless sensor networks (WSNs) struggle with energy efficiency because of limited node power. This paper presents an approach that uses evolutionary algorithms to choose the Cluster Head (CH) and optimize routing in wireless sensor networks (WSNs) using grid-based topologies. The proposed method repeatedly develops solutions based on criteria for node density, distance, and energy level by using the evolutionary capabilities of the genetic algorithm. A fitness function that considers latency, coverage, and energy efficiency is used to evaluate the solutions. The process selects CHs dynamically and uses GA-guided optimization to construct paths. Simulation results indicate improved network performance and energy efficiency over existing protocols. Evolutionary algorithm integration enables flexibility and optimization for energy-efficient CH selection and routing in WSNs with a grid-based design.
Keywords
Introduction
Wireless sensor networks (WSNs) have become indispensable across various industries such as healthcare, industrial automation, and environmental monitoring [12]. However, a critical challenge in WSNs lies in the limited energy resources of sensor nodes. Efficient energy utilization is paramount for extending network lifetime and ensuring long-term operation [4]. Routing optimization serves as a key strategy for enhancing energy efficiency in WSNs. Two widely adopted routing methods, LEACH (Low-Energy Adaptive Clustering Hierarchy) and LEACH-C (Centralized LEACH), have garnered popularity [11]. Despite their prevalence, these protocols suffer from drawbacks including uneven energy consumption, suboptimal route selection, and premature sensor node failure. To address these limitations, this study proposes an Energy-Efficient Genetic Algorithm for Cluster Head Selection and Routing (EE-GA-CRSR) in WSNs. The primary objective is to devise efficient pathways within and between grid-based cells, while also optimizing the selection of Cluster Head Nodes (CHNs). Leveraging the evolutionary principles of genetic algorithms, the proposed method dynamically selects CHNs and constructs pathways to maximize data transmission efficiency while minimizing energy consumption.
The driving force behind this study is the pressing need for improved energy conservation and route optimization in WSNs. By strategically selecting CHNs and optimizing routing patterns, it is feasible to achieve a balance between energy usage, network longevity, and overall performance. The research problem primarily revolves around the absence of an effective and adaptable method for CHN selection and routing in WSNs. Common issues with existing protocols, such as uneven energy distribution, ineffective path construction, and underutilization of network resources, underscore the necessity for a novel strategy to enhance WSN routing and energy efficiency..
This study pioneers a Genetic Algorithm-Based Strategy for Wireless Sensor Network (WSN) Cluster Head Node (CHN) Routing Optimization. It introduces a comprehensive fitness function, considering energy efficiency, coverage, and latency, to evaluate CHNs and routing pathways. Novelty lies in dynamically selecting CHNs based on factors like residual energy and network density for adaptive optimization. Effective routes are established within cells and between CHNs to minimize energy consumption and enhance data transmission efficiency. Through rigorous simulations, the proposed strategy’s efficacy is assessed against existing protocols, showcasing its potential to significantly improve WSN performance and longevity. This holistic approach, integrating genetic algorithms, diverse evaluation metrics, adaptive CHN selection, and optimized routing, represents a pioneering advancement in WSN routing optimization, promising to address the challenges of energy efficiency and routing effectiveness in a comprehensive manner.
By attaining these goals, this research seeks to greatly boost energy efficiency and routing optimisation in WSNs, resulting in increased data delivery, longer network lifetime, and better overall network performance. The manuscript proceeds to delve deeper into the background and related work surrounding energy-efficient routing in Wireless Sensor Networks (WSNs). This section provides essential context by examining the energy constraints inherent in WSNs and reviewing existing routing protocols, such as LEACH and LEACH-C, along with their associated limitations. Furthermore, it explores relevant studies and research efforts aimed at addressing the challenges of energy optimization in WSNs. By building upon this foundation, the paper sets the stage for introducing the proposed Energy-Efficient Genetic Algorithm for Cluster Head Selection and Routing (EE-GA-CRSR) as a novel approach to mitigating these constraints and enhancing network performance.
Background and related work
Wireless sensor networks (WSNs) are made up of a lot of small, low-power sensor nodes that are placed all around a certain region. These nodes work together to monitor and gather environmental data. WSNs are distinct in that they have self-organizing capabilities, wireless communication, and limited energy resources. The design generally consists of a sink node, sensor nodes, and a data transmission network infrastructure. To increase energy economy and extend network lifetime, cluster-based routing methods have found widespread adoption in WSNs. These protocols make use of the idea of cluster heads (CHs), which serve as a bridge between sensor nodes and sink nodes. Data from the member nodes is collected and sent by CHs to the sink, which lowers energy use and communication overhead.
In the literature, a number of existing cluster head selection and routing techniques have been suggested. A well-known approach called LEACH (Low-Energy Adaptive Clustering Hierarchy) uses random CH rotation to divide the energy load across sensor nodes. By adding a centralized method for CH selection based on the overall energy level of sensor nodes, LEACH-C [13] (Centralized LEACH) enhances LEACH. Although these approaches have had encouraging outcomes, they still have certain drawbacks [8].
In the study conducted by Wang et al., [19] a novel energy-aware grid-based clustering power efficient data aggregation protocol (GB-PEDAP) is proposed for wireless sensor networks (WSNs). This protocol follows a two-layer architecture, utilizing direct transmission for cluster data and a tree structure transmission for cluster head data. Through simulations, GB-PEDAP demonstrates the capability to evenly distribute energy consumption among sensors, preventing premature sensor depletion and effectively extending the overall WSNs’ lifetime.
Ben Gouissem et al., [5] address the limitations of traditional hierarchical-based routing, which involves cutting the network into clusters to increase its lifespan. The authors propose a novel grid-based k-means clustering protocol named GBK, which combines grid-based routing with the k-means algorithm. GBK generates cluster heads per cell grid and includes an enhancement called GBK-R to further promote network stability. These algorithms contribute to improved network topology control and the distribution of nodes, resulting in better cluster head distribution and localization.
Logambigai et al., [9] have introduced the Energy-Efficient Grid-based Routing algorithm for Wireless Sensor Networks, which is designed to conserve energy in sensor nodes and enhance the overall network lifespan. The algorithm employs grid-based clustering and fuzzy rules to discover the most efficient routes, effectively reducing the number of hops and significantly improving network performance compared to existing grid and cluster-based routing protocols
The uneven energy consumption of the sensor nodes is one of the main drawbacks of conventional cluster-based protocols. Some nodes may soon exhaust their energy due to random or centralized selection, which can cause network partitioning and early network collapse. The distance between sensor nodes and the sink may also not be completely taken into account by present protocols, which leads to less-than-ideal routing methods and more energy usage. Researchers have investigated the use of genetic algorithms (GAs) in cluster head selection and routing optimization to overcome these issues. GAs are evolutionary algorithms that simulate genetic and natural selection to discover the best answers. Through the use of GAs, CHs may be chosen based on a variety of criteria, including residual energy, distance to the sink, and communication load, leading to a more even distribution of energy and effective routing routes. Grid-based topologies [17,18] have also become more popular in WSNs. By dividing the sensing area into logical grid cells, grid-based networks make sure that the sensor nodes are distributed evenly. By placing CHs in the best possible locations and creating effective pathways between them and the sink, this strategy aids in lowering energy use. In the context of wireless sensor networks, genetic algorithms [2] and grid-based topologies have been used in several research. For instance, researchers have suggested Cluster Head Selection (CHS) methods based on Genetic methods [22] (GA) that optimize CH selection in accordance with energy levels and distance from the sink. Grid-based topologies have been used in other works to increase network coverage, save energy use, and boost overall network performance. Even though these current methods have showed promise in terms of increasing energy efficiency and route optimization, a more complete framework including the benefits of evolutionary algorithms and grid-based topologies is still required to get beyond the drawbacks of present protocols. By suggesting an Energy-Efficient Genetic Algorithm for Cluster Head Selection and Routing (EE-GA-CRSR) in wireless sensor networks, this study seeks to close this gap.
System model for wireless sensor networks with grid-based topology and genetic algorithm-based CH selection and routing optimization
Wireless Sensor Networks (WSNs) have garnered significant attention because of their many applications in domains such as agriculture, healthcare, surveillance, and environmental monitoring. Nonetheless, concerns about network scalability, energy economy, and efficient data transfer remain paramount. To address these problems, we provide a novel system model that combines a genetic algorithm-based approach for routing optimization and cluster head (CH) selection in WSNs with a grid-based topology. The proposed system model aims to balance the number of sensor nodes in each cluster, optimize data transmission channels, and enhance latency, coverage, and energy economy. The process flow diagram for the suggested routing and optimization method, EE-GA-CRSR, is shown in Fig. 1.

Process flow diagram for the proposed EE-GA-CRSR.
Set-up Period: All sensor nodes send HELLO signals to the sink device during this time, providing their energy levels (
Cluster Head and Super Cluster Head Selection: A Cluster Head Node (
Path Establishment phase: Building multi-hop data transmission paths throughout the network is the main goal of the path establishment phase.
Construction of the Minimum Spanning Tree (MST) in each Cell the Kruskal technique [1] is used to build a Minimum Spanning Tree (MST) [3,7,21] within each grid cell in order to enhance intra-cell communication. Based on the separation between nodes (
The total weight of the MST within a grid cell
Data Transmission Period: Information is gathered and transmitted from sensor nodes to the washbasin during this time [6,14,16,20].
Data Gathering and Aggregation: Each cell’s sensor nodes gather data, which is then sent to the corresponding CHNs [10,15].
Data Transmission Along Routes: The CHNs effectively transport the aggregated data packets to the Super-CHN and ultimately to the sink for additional processing along the specified routes.
The fitness function
The parameters
The selection of these weight factors
Experimental Setup. Utilizing the supplied data and specified parameter values, a comprehensive simulation was conducted using MATLAB 2021 to assess the performance of the proposed system model. The simulation focused on evaluating the wireless sensor network (WSN) employing a grid-based architecture and leveraging genetic algorithm-based cluster head (CH) selection and routing optimization. The simulation procedure entailed several key steps. Firstly, a 2D grid representing the network region was initialized, with dimensions determined by the specified parameters, including the number of rows and columns. Subsequently, a random deployment of sensor nodes within the network region was carried out, with each node assigned random initial energy levels (
Weight factors for the fitness function: alpha, beta, and gamma
Path Establishment and Data Transmission: Implement the path establishment phase to construct the Minimum Spanning Tree (MST) within each grid cell using the Kruskal algorithm. Establish the chain structure between CHNs for inter-cell communication towards the sink. Simulate data collection, aggregation, and transmission from sensor nodes to CHNs, and eventually to the sink.
Evaluate Performance Metrics: Measure the energy consumption in the network to calculate energy efficiency. Calculate the percentage of the network area covered by sensor nodes to evaluate network coverage. Record the average time taken for data to reach the sink from sensor nodes to assess latency.
Repeat the Simulation: Repeat the entire simulation process multiple times to account for random variations in sensor node deployment and initial energy levels.
Data Analysis: Collect and aggregate the results obtained from multiple simulation runs. Calculate the mean and standard deviation of the performance metrics (energy efficiency, network coverage, and latency) for the WSN. The pseudo code for the proposed grid based model is in Algorithm 1.

The pseudo code for the proposed grid based model
In this study, we used MATLAB simulations to investigate and assess the functionality of a multi-grid Internet of Things (IoT) network design. The main objective was to evaluate the efficiency, connectivity, and data aggregation capabilities of this topology in comparison to alternative grid-based techniques.
Matlab simulation parameters for the proposed EE-GA-CRSR
Matlab simulation parameters for the proposed EE-GA-CRSR
We established the settings for the multi-grid IoT network given in the Table 1 before we started the simulations. The total number of nodes deployed in each grid (numNodesPerGrid), the number of rows (
The simulation produced a thorough visualization of the network architecture that showed how the nodes and CHs were distributed geographically across several grids. Dashed lines were used to show the connections between nodes and their corresponding CHs, whereas solid black lines were used to show the CHs’ chain-like link to the sink node.
We carried out comparable simulations for different grid configurations, such as standard square grids and hexagonal grids, to compare the multi-grid topology with other grid-based techniques. To guarantee a fair comparison, we employed the same criteria for both the CH selection and node distribution. The analysis for the comparison involves looking at a number of important parameters, such as the average distance between a node’s CHs and the sink node, the average distance between CHs and CHs, and the overall network throughput. We also evaluated each topology’s resilience to node failures and its capacity to scale when more grids or nodes were added.
Comparing the multi-grid IoT architecture to conventional square and hexagonal grid-based topologies, our findings suggested that it offered promising outcomes. Due to its effective CH-to-sink node communication, the multi-grid method showed increased data aggregation capabilities. Additionally, it demonstrated improved connection between nodes and CHs, reducing communication overhead and boosting total network speed. The multi-grid topology also shown greater robustness against node failures. It was a more dependable alternative for important IoT applications since the spread of nodes over several grids made it easier to isolate faults and avoid the interruption of the entire network.

EE-GA-CRSR topology based routing optimization.
The graph produced by the MATLAB code given and displayed in Fig. 2 represents a simulated IoT network topology made up of several grids. A multi-grid network is made up of a number of nodes that are organized and connected according to each grid’s set of nodes. The visualization offers insightful information about the physical configuration of nodes, the function of Cluster Heads (CHs), and the data aggregation pipelines going to the central sink node. The topology displays a total of 20 distinct grids that together create a 5 × 5 grid arrangement. A red rectangle that indicates the grid’s spatial bounds surrounds each grid. To operate the nodes efficiently and maximize data aggregation towards the sink node, the network is organized into grids. Each grid has 20 randomly placed nodes, which are shown on the plot as blue circles. Within each of their individual grid limits, these nodes are scattered at random. Nodes are distributed at random to simulate real-world situations when IoT devices are set up randomly. One node is identified as the Cluster Head (CH) among the nodes in each grid. Within their own grids, CHs are essential for managing communication and data aggregation. The CHs are shown as bigger green circles on the graph, and a black dashed line links each node to its associated CH to show the communication linkages set up inside each grid. A sink node is further shown as a magenta circle outside the grid area. The sink node operates as the hub for data gathering and as the final resting place for all CHs’ aggregated data. A chain-like line, shown as a set of solid black lines, links the CHs to the sink node. This connection resembles a chain and enables effective data aggregation and forwarding to the sink node. The network structure is clearly visualized in the picture, which also emphasizes the nodes’ spatial distribution, the function of CHs, and the data flow to the sink node. It shows the potential for effective data handling and collecting in a multi-grid IoT network, which is useful in a variety of IoT applications.
Figure 3 displays nodes on the x-axis up to 200 and energy levels on the y-axis to represent the energy usage of a grid-based IoT network. It offers a thorough analysis of how much energy is used by all nodes, emphasizing trends and variances. With the help of this vital data, network administrators may increase productivity, spot energy-intensive locations, and put specific energy-saving measures in place. Stakeholders may improve the overall sustainability and efficiency of the IoT network and ensure a more environmentally and economically responsible operation by analyzing the graph and making informed decisions.

Energy consumption analysis of EE-GA-CRSR based IoT network.

Average energy consumption analysis of EE-GA-CRSR based IoT network.
Figure 4 graph illustrates the typical energy usage for five different clustering methods in a wireless sensor network (WSN): LEACH, Grid-KM, EACD, EEGBF, and EE-GA-CRSR Proposed. Each method’s energy consumption is depicted relative to the number of network nodes installed. These graphs highlight differences in energy use corresponding to real-world variances and how the models handle data packets. Network designers and researchers can utilize this comparison to optimize energy use and improve the overall performance of the WSN. The proposed EE-GA-CRSR model outperforms competing methods and induces the least amount of latency to reach the target node. Table 2 provides a comparison of the average energy consumption for each technique in the WSN and their percentage improvement compared to LEACH. Lower values indicate better energy efficiency, with EE-GA-CRSR exhibiting an average energy consumption of 7.1 ms, resulting in a 29% improvement compared to LEACH. EEGBF and EACD show average energy consumption of 8.4 ms and 9.4 ms, respectively, resulting in improvements of 16% and 6% compared to LEACH. However, GRIDKM exhibits a higher average energy consumption of 11.6 ms, resulting in a −16% degradation compared to LEACH. Table 2 shows Comparison of average energy consumption for various techniques in Wireless Sensor Networks (WSN) and their percentage improvement compared to LEACH. Lower values indicate better energy efficiency, with positive percentages representing improvement over LEACH and negative percentages indicating worse performance.
Energy consumption improvement compared to LEACH

Latency of individual nodes of EE-GA-CRSR based IoT network.
This Fig. 5 illustrates the connection between a network’s node count and latency. The y-axis shows the relevant levels of delay, while the x-axis indicates the variable number of nodes. The graph clearly depicts how latency is influenced when the number of nodes rises or falls, offering useful information for enhancing network performance, spotting possible bottlenecks, and guaranteeing effective data transmission and response times in the network.

Latency analysis of EE-GA-CRSR based IoT network.
Figure 6 illustrates the performance comparison of five approaches employed in Wireless Sensor Networks (WSNs) in terms of latency. The y-axis represents delay measured in milliseconds (ms), while the x-axis indicates the number of nodes deployed in the network. The delay values for each technique are as follows: EE-GA-CRSR (20 ms), EEGBF (28 ms), EACD (45 ms), and GRIDKM (50 ms). Additionally, the percentage improvement in delay compared to LEACH is provided: EE-GA-CRSR (66.67%), EEGBF (53.33%), EACD (25%), and GRIDKM (16.67%). This comparison enables academics and network managers to discern patterns and trends in the latency behavior of various cluster-based strategies. The suggested Grid GA algorithm exhibits potential benefits over currently used methods, highlighting its importance as an advancement for WSNs. Stakeholders can utilize this comparison to select an appropriate clustering technique to reduce latency and improve the overall performance of their WSN deployment.
Percentage improvement in delay compared to LEACH
Table 3 shows the comparison of delay for various techniques in Wireless Sensor Networks (WSN) and their percentage improvement compared to LEACH. Higher values indicate better performance, with positive percentages representing improvement over LEACH.
In summary, this study introduces an innovative system model for cluster head (CH) selection and routing optimization in Wireless Sensor Networks (WSNs) utilizing a grid-based architecture. Extensive MATLAB simulations demonstrate the efficacy of the proposed approach, showcasing significant improvements over existing models. Specifically, the latency of the proposed model surpasses that of the fundamental reference model LEACH by 29%, while achieving a remarkable 66.67% enhancement in energy efficiency compared to LEACH. The grid-based design ensures an even distribution of sensor nodes, thereby enhancing CH selection and routing effectiveness. By integrating an evolutionary algorithm, intelligent CH selection and route creation are facilitated, considering factors such as energy levels, node density, and sink distance. The results indicate superior performance in terms of energy efficiency, coverage, and latency, surpassing current methods. The adjusted fitness function, tailored using weight factors (α, β, and γ), offers a well-rounded solution adaptable to diverse WSN applications. Through optimized data transmission pathways, employing Minimum Spanning Trees (MSTs) within grid cells and across CHNs, redundant communication is minimized, leading to enhanced network performance. This research represents a significant advancement in addressing key WSN challenges and holds promise for various domains including surveillance, healthcare, and agriculture. Its effective CH selection, route optimization, and energy conservation features facilitate WSN deployment and operation in real-world scenarios, encouraging further exploration and innovation in the field for more robust and efficient solutions across different disciplines.
Conflict of interest
The authors have no conflict of interest to report.
