Energy Efficient WSN Routing with Snake Optimizer and Spanning Tree

July 23, 2024
Energy Efficient WSN Routing with Snake Optimizer and Spanning Tree

In recent years, Wireless Sensor Networks (WSNs) have seen widespread adoption across various sectors, significantly boosting the integration of the Internet of Things (IoT). Despite their advantages, WSNs face challenges related to energy efficiency and the lifespan of sensor nodes. Addressing these concerns is crucial for the development of efficient routing protocols. Cluster-based routing has emerged as a promising solution, aiming to conserve energy and extend the network’s operational life. This article introduces an advanced cluster routing protocol employing a multi-strategy fusion snake optimizer (MSSO) and the minimum spanning tree algorithm. Through this innovative approach, we explore efficient methods for selecting cluster heads (CH) and relay nodes (RN), thereby enhancing the network’s energy efficiency and longevity.

1. Supply the Algorithm Parameters

To initiate the process, the algorithm parameters need to be supplied. These parameters include \(N_{all}\) (total number of nodes), \(S_{max}\) (network’s boundary length), \(S_{min}\) (minimum boundary, typically set to 0), T (total number of iterations), \(th_{Q}\) (food quantity threshold), \(th_{T}\) (temperature threshold), \(c_1\), \(c_2\), and \(c_3\) (algorithm-specific constants), K (number of clusters), \(\omega\) (weight for CH selection), and \(\lambda\) (weight for RN selection). Properly configuring these parameters is essential for the algorithm’s success in optimizing the network’s routing protocol.

2. Generate the Population Individuals

Once the parameters are supplied, the next step is to generate the population individuals based on a specified equation. At this stage, \(S_{max}\) represents the network’s boundary length, with \(S_{min}\) set to 0. Each individual’s location data corresponds to selected nodes within the network. Assuming K nodes are designated as cluster heads (CH), let \(S_i=\left[ S_{i,1}(t),S_{i,2}(t),…,S_{i,k}(t)\right]\) represent the i-th snake individual. Each component \(S_{i,k}(t)=(x_{ik}(t),y_{ik}(t))\) signifies the x and y coordinates of the selected sensor node.Position mapping is crucial to align the position information in the snake individual with the actual sensor node coordinates. The position mapped to the closest sensor node becomes the CH, addressing discrepancies caused by the network’s discrete node distribution. Ensuring that the present closest node has not already been assigned as a CH is essential to avoid multiple mappings. If mapped as a CH, the next closest node is selected. This same method applies to selecting the RN.A noteworthy point when selecting CHs is the role of the Fuzzy c-means (FCM) algorithm applied during population initialization. This algorithm clusters the surviving network nodes once, embedding the obtained cluster center coordinates into the population. This accelerates the algorithm’s convergence, replacing a random individual in the population with the cluster center coordinates. After generating the initial population, it is divided into male and female subpopulations, and the algorithm iteration begins with t = 1.

3. Evaluate Fitness of the Population

Fitness evaluation is the next critical step. When choosing CHs, the fitness is assessed according to the objective function specified in the study. Similarly, when selecting RNs, fitness is evaluated based on the respective objective function. The goal is to minimize the objective function’s value, with the best-performing individuals identified as those with the smallest values. The optimal individuals within both the female and male populations are selected, ensuring the best candidates are chosen for CH and RN roles.

4. Update Population Location

Post-fitness evaluation, the population location must be updated. Initially, algorithm parameters are updated according to the provided equations, followed by calculating food quantity and temperature. These factors determine the snake’s operational mode, either foraging or mating. If \(Qth_{Q}\) and the temperature threshold is satisfied, the snake updates its position without mating.Should \(Q>th_{Q}\) and \(Temp\le th_T\), the snake engages in fight mode, updating its position accordingly. Otherwise, it transitions to mating mode, with positions updated per the given equations. Adaptively, the worst individual positions in both male and female populations are updated. Once the population update concludes, optimal individuals are disturbed using adaptive alpha mutation, retaining better solutions pre- and post-disturbance. These position mappings ensure accuracy in reflecting actual network nodes.

5. Check Iteration Termination

Once the parameters are provided, the next step is to generate the population of individuals using a specified equation. Here, \(S_{max}\) indicates the network’s boundary length, while \(S_{min}\) is set to 0. Each individual’s location data corresponds to selected nodes within the network. If K nodes are designated as cluster heads (CH), let \(S_i = \left[ S_{i,1}(t), S_{i,2}(t), …, S_{i,k}(t)\right]\) represent the i-th snake individual. Each component \(S_{i,k}(t) = (x_{ik}(t), y_{ik}(t))\) signifies the x and y coordinates of the chosen sensor node.Position mapping aligns the position information in the snake individual with the actual sensor node coordinates. The position mapped to the nearest sensor node becomes the CH, addressing discrepancies due to the network’s discrete node distribution. It’s critical to ensure that the current closest node hasn’t already been assigned as a CH to avoid duplicate mappings. If it has, the next closest node is chosen. This approach is also applied when selecting the RN (Relay Nodes).A key consideration when selecting CHs is the application of the Fuzzy c-means (FCM) algorithm during population initialization. This algorithm performs clustering on the surviving network nodes once, embedding the identified cluster center coordinates into the population. This step boosts the algorithm’s convergence speed by replacing a randomly chosen individual in the population with the cluster center coordinates. After generating the initial population, it is divided into male and female subpopulations, and the algorithm iteration begins with t = 1.Overall, these methods effectively structure the initialization phase, ensuring accurate mapping and efficient convergence, which are crucial for the system’s overall performance and reliability. This meticulously planned approach not only optimizes resource allocation but also enhances the network’s operational efficiency.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later