Genetic Algorithm-Based Multi-Hop Routing to Improve the Lifetime of Wireless Sensor Networks

Wireless sensor networks are known for their monitoring and tracking application-specific operations. These operations diversely demand improvement in existing strategies and their parameters. One key parameter is energy usage during operations. Energy plays a vital role in each application, as the wireless sensor networks lack battery lifetime and energy resources. So, there is a need for an optimized and efficient routing method with regard to energy consumption in wireless sensor networks. For multi-hop routing, the genetic algorithm serves as a robust algorithm with diverse optimized routing plans to improve the lifespan for large-scale wireless sensor networks. In this paper, the genetic algorithm provides the optimized routes for data operations and improves the lifetime of wireless sensor networks by saving energy. The performance of the genetic algorithm is compared with the TEEN algorithm. Keywords-wireless sensor networks; multi-hop; genetic algorithm; optimization; lifetime durability

INTRODUCTION Wireless Sensor Networks (WSNs) are constructed by many self-organized and multifunctional mobile or non-mobile sensor nodes operating wirelessly in an area [1][2][3][4]. These sensor nodes possess inherited abilities to sense and transmit the gathered data towards the sink or base station. Therefore, the process of the data transmission towards the sink consumes more energy than the other processes such as data collection and data processing [5]. Since the sensor nodes have smallsized batteries, the overall performance of the sensor network depends on their lifetime. Additionally, the WSNs are prone to failure and can be deployed randomly in hard-to-reach areas.
To counter this problem, multi-hop communication plays an essential role in improving network lifetime [6][7][8]. In the multihop communication paradigm, the source node transmits the data through the intermediate sensor nodes. These intermediate sensor nodes relay the data towards the sink as depicted in Figure 1. Multi-hops minimize the energy consumption by consuming a tiny amount of energy to relay the data towards the neighbor and the nearest sensor nodes [9,10], which are hard to find in the WSNs if the optimal routing path is not determined. The optimal path towards the nearest sensor nodes is the key to save the extra consumption of the energy of the node.
The Genetic Algorithm (GA) is used to save energy and determine all the possible paths in the WSNs. The multi-hop communication paradigm with a focus on reduction of energy usage and optimal paths towards the nearest relay nodes is based on the distance among them. So, the distance among the sensor nodes from the source node towards the sink, all relay sensor nodes, and a possible number of multiple hops are determined by the GA in order to select the most optimal path for the data transmission. The results with the utilization of the GA prove that the multi-hop communication paradigm improves the WSNs lifetime [11][12][13][14][15]. Hop-to-hop communication.

II. RELATED WORK
There is abundant research literature in the field of WSNs with regard to routing mechanisms and the improvement of energy utilization. Multipath routing schemes have been proposed to replace the single path routing paradigms. Replacing the single path or direct communication paradigms provides better performance of the network [8][9][10][11]. Multipath routing provides the benefit to transmit the packets by more than two paths, thus the packet loss rate is minimized [11,12]. On the other hand, the multipath technique reduces the chance of malicious attacks and any kind of packet tempering [13]. Multipath routing schemes for WSNs based on the next hop have been proposed in [14][15][16]. The sensor nodes are deployed in a hierarchical form and the algorithms are set to send the message according to the pre-determined loop of the hierarchical form. The authors claimed that this resulted in better network performance and more saved energy. Additionally, the routing schemes involving multiple paths reduced fault tolerance including error detection and error recovery. Authors in [17] presents a solution to the problem of the unbalanced energy expenditure in WSNs for multipath routing. The multiple-path routing scheme has been carried out in 3-D space and regional co-evolution. A protocol was designed to divide the one-hop path of the neighbor sensor node into many subspaces by partitions of the region. Then the source node selects the optimal node and path to transmit the data. The co-evolution algorithm helps to find out the next hop. A multipath cost function model for the statistical estimation of the overall network, namely the total energy of the nodes and the energy used in relaying the data was proposed in [18][19][20]. Multipath routing for the directional diffusion routing protocol from the source to the destination node with a certain probability of selecting one path among all possible paths was proposed in [19,[21][22][23][24]. Authors in [25,27] advocated loadbalancing energy schemes for WSNs and energy harvesting for the overall network. They utilized ACO (Ant Colony Optimization) for multiple path finding and claimed satisfying results. The study used an electromagnetic antenna-based approach for energy harvesting to gain high performance of IoT and WSNs. Numerous studies have been carried out on minimum energy consumption. The efficient usage of energy has been claimed as an important part to maximize the WSNs lifetime through optimization [28][29][30]. The optimization also reduces the complexity of the overall network and provides many possible options for routing the data from source to destination.
III. GENETIC ALGORITHM GAs are meta-heuristic algorithms. The GA mimics the natural selection process [21] and has been used in various computer and AI applications. Due to its robustness, many research scholars adopted GA for solving optimization problems. Optimization finds the possible solutions to the problems and potential methods to tackle complications. As the GA mimics the natural selection process it follows the selection of healthy chromosomes. These chromosomes are selected by the fitness function, and are subjected to crossover and mutation [22][23][24]. The working mechanism of GA in this research is utilized with some modifications. All the operators of GA are used for selecting the best individuals from the population. The population comprises of all sensor nodes and sinks deployed in the area. After the selection of the best population, the GA finds fit individuals by applying the fitness function as shown in Figure 2. Each individual passes on the basis of their energy. Then, other operators, namely crossover and mutation, are applied to select the best chromosome as shown in Figure 3(a)-(b). For this research, the mutation probability is set to 0.8 [2,24]. The process of mutation is depicted in Figure 3(c). After the mutation operator, the best individual and the new fit individual are re-evaluated on the basis of their energy and only the fit individual can be obtained. Fig. 2.
Operator utilization of GA.

IV. PERFORMANCE AND SIMULATION
The experimental setup includes a dual-core Intel processor with a CPU of 3.5GHz and 32GB RAM. Simulations have been carried out using MATLAB R2020b in Windows 10. The sensor nodes are simulated as non-mobile but randomly deployed in a 100×100m 2 area with 4 sinks deployed at the corners. The multi-hop communication paradigm where the source node transmits the data through the relay nodes towards the nearest sink is shown in Figure 4. All possible routing paths towards all sinks are determined by the GA. When a node gathers and transmits the data by the optimal path towards the nearest sink, it follows the already optimized route from multiple possible routes determined by the GA. The multiple hop distance is evaluated and determined by the GA. All sinks broadcast their locations to all sensor nodes and the nodes only transmit the data towards the nearest sink as illustrated in Figure 4. The simulation results comprise 40 and 50 sensor nodes deployed in a static manner along with static sinks [26]. The results of alive nodes, dead nodes, and overall packet transmission are compared with the standard TEEN algorithm's and they fairly outperform it in terms of energy expenditure and WSNs lifetime maximization.

A. Simulation Paramaters
The studied WSN parameters are given in Table I. Each sink is responsible to collect the data from the nodes efficiently through optimized routes. Route optimization and determination are done with the help of GA. The evaluation of the route is done in two manners, namely the direct distance evaluation and the multiple hop distance evaluation. The evaluation of the distance is based upon the energy consumption. It is observed that the nearest nodes have the least energy consumption in comparison with the more remote nodes. During the simulations, the most remote nodes died in a few rounds because of the long routes and direct distances.

B. Simulation Algorithm
The proposed algorithm provides the routing mechanism among all sensor nodes and all sinks. It initially provides all the sensor nodes with a number of trial rounds. These trials are based on the energy levels of every sensor node and the distance among the sensor nodes and respective sinks. Therefore, the distance and their selection of routes strictly depend upon their physical location, where they are deployed, and the nearest sink.
Pseudo code for the optimization.
Input reservation of optimal route do while ߲ ∅ ௦௧ > 0 operation of nodes until battery dies ߚ ெ௦௧ ை௧ ோ௨௧ save the optimal route ߚ ெ௦௧ ை௧ ோ௨௧ copy it for every iteration. end and return with ߚ ெ௦௧ ை௧ ோ௨௧

V. SIMULATION RESULTS
The WSN is constructed with 40 and 50 sensor nodes and 4 sink stations located at the corners of the network area as illustrated in Figures 5-6. The evaluation and simulation results of the randomly and static deployed sensor nodes and sinks show that the route distance is covered by multiple hop routing. That enhances the sensor node's battery lifetime and improves the network's lifetime. In other words, the network lifetime has, extensively, been increased by the use of the optimized multiple hop routes as depicted in Figure 7. Therefore, it has been experimentally proved that the network lifetime can be improved through optimum data transmission. Although there are a number of routes in multiple hop routing mechanism the source sensor node only opts to transmit the data through the optimal one. The localization of 40 sensor and multi-hop relay sensor nodes is shown in Figure 7. Multiple paths are determined by the GA among all the sensor nodes and sinks. The sensor nodes in the nearest sensor node towards the sink receive the data and perform the execution. The source sends the data towards the nearest sink with the help of relay sensor nodes. The optimal distance towards Sink 1 and Sink 2 is 114.647ms and 107.225m respectively. Sink 3 with 134.815m and Sink 4 with 131.194m have optimal routes towards the farthest node.  The result comparison of this research with the standard TEEN algorithm [26] shows that the proposed scheme performs significantly better. The results show that the number of rounds vs. the number of alive nodes of the proposed scheme is bigger than the respective number of the TEEN standard algorithm as shown in Figure 8. The data transmission towards the sinks and the comparison of the results with the standard TEEN algorithm are shown in Figure 9. The packets with the proposed scheme at the rounds 1500, 2000, 2500, 3000, and 3700 have been received successfully at the end of www.etasr.com Rajab: Genetic Algorithm-Based Multi-Hop Routing to Improve the Lifetime of Wireless Sensor Networks the sink. Also, the proposed scheme maximized the WSN's life durability and improved network performance. Additionally, the comparison results show that the standard TEEN algorithm has significantly more dead nodes as the packet transmission increases, while the proposed algorithm performs better and increases network durability [26].
VI. DISCUSSION The proposed scheme improves the lifetime of the WSNs. The GA determines all possible routes for data transmission and optimizes each route for efficient data delivery with minimum energy cost. The GA determines an optimized route for each sensor node. The simulation results are more compromising than the standard TEEN [26] algorithm's. The proposed work performed very well on 500, 1000, 2000, and 3700 rounds and enhanced network lifetime.

VII. CONCLUSIONS AND FUTURE WORK
In this study, a multi-hop routing scheme for wireless sensor networks, based on the energy optimization by GA for network lifetime maximization, has been proposed and examined. The GA provides the optimized routes for data operations and improves the lifetime of WSNs by saving energy. The simulation results demonstrate the robust performance of the GA resulting in improved network lifetime. Also, the proposed algorithm achieves a significant performance gain over the standard TEEN protocol. Networks with a significant number of sensor nodes were simulated as non-mobile WSNs. Comparatively, the GA lost less nodes in 2000, 3000, and 4000 rounds, than the standard TEEN algorithm. In simulation results, the GA performed fairly better than the standard TEEN algorithm. Regarding future work, the current study can be extended to mobile and hybrid optimization schemes.