Abstract

The development of various applications of wireless sensor networks has aroused great interest in using these types of networks in various fields. These networks, without infrastructure and self-organization, are easily deployed in most environments and collect information about environmental phenomena for analysis and proper response to accidents and send them to the basic centers. They do. Wireless sensor networks are made up of some sensor nodes that both act as sensors and act as relay nodes concerning to each other. On the other hand, the lack of infrastructure in these networks has limited resources so that the nodes of the battery are fed with limited energy. Due to the location of networks in difficult and impassable areas, it is not possible to recharge or replace the node battery. Therefore, saving energy consumption in this type of network is one of the most important challenges. Since the rate of energy consumption when sensing information and receiving data packets from another node is a fixed value, so sensor nodes have the highest energy consumption when sending data. Therefore, routing methods try to reduce energy consumption based on systematic approaches. One of the most promising solutions to reduce energy consumption in wireless sensor networks is to cluster the nodes and select the threaded node based on the data transfer parameters so that the average energy consumption in the nodes is reduced and the network lifetime is increased. Therefore, in this research, a new optimization approach using multiobjective genetic algorithm and cuckoo algorithm for clustering wireless sensor networks is presented. In this study, in order to select clustered nodes from a multiobjective genetic algorithms based on reducing intracluster distances and reducing energy consumption in cluster member nodes and near-optimal routing based on cuckoo optimization algorithm to transfer information between nodes have been used in the direction of the cavity. The implementation results show that considering the evolutionary capabilities of the multiobjective genetic algorithm and the cuckoo optimization algorithm, the proposed method in terms of energy consumption, efficiency, delivery rate, and packet transmission latency, compared to previous methods, has improved.

1. Introduction

Wireless sensor networks (WSNs) are networks made up of distributed microdevices with various sensing capabilities (called sensors) that are used to monitor the environment and send information to end users are used. WSN technologies were introduced more than 20 years ago and many projects have been proposed and implemented that have embraced this technology. Green computing was introduced in 2008 with the aim of reducing the use of limited resources and maximizing energy efficiency over the life of a system [1]. WSN usually includes a large number of sensors that are equipped with limited power sources but need to work for a long time without charging or replacing batteries. In order to prolong the life of the network and reduce energy consumption in the sensor nodes in the network, clustering techniques have been introduced to achieve efficient communication between sensors [1].

In clustering techniques, sensor nodes are combined in a network to form small separate clusters. Each cluster has a leader known as a cluster head (CH) and the other nodes of a cluster are known as cluster members (CM). The selection of the head node is one of the main challenges that is considered the main problem of this research. Sensor nodes sense information from the environment and transmit it to the corresponding cluster head. Cluster heads, in turn, collect data from all sensor nodes in the cluster and, after aggregating the data and eliminating duplicate data, transfer it to the base station. Therefore, cluster nodes are responsible for organizing the network, collecting data, and transferring data from sensor nodes to the hole and remote base station, and their energy is consumed more than other nodes [2, 3]. Therefore, one of the requirements for selecting a threaded node is that the node with more residual energy be selected as a thread [4].

Data collection based on clustering approaches has several significant advantages over traditional designs. First, collecting data received from different sensor nodes in a cluster reduces the amount of data transmitted to the base station. Because duplicate data are lost due to the analysis of threaded nodes [5, 6]. Second, the sensor nodes in each cluster have the ability to send data directly to the node nodes, but since sending data over long distances requires more energy consumption, direct data transmission is avoided. Instead, transferring data to clustered nodes near sensor nodes in a cluster member consumes far less energy, so the need for energy across the network to transmit data is greatly reduced [7, 8]. Third, the rotation of the nodal nodes helps to ensure balanced energy consumption in the network, so as to prevent the hunger of certain nodes due to lack of energy. However, selecting the right threaded node with optimal capabilities while balancing power consumption and grid efficiency is a well-known NP-Hard problem in WSN [9].

NP-Hard problems cannot be solved by linear and polynomial methods and require the use of artificial intelligence, collective intelligence, or metaheuristic methods to find near-optimal solutions. In this regard, the use of heuristic and metaexploratory methods in the field of sensor node clustering and cluster head node selection in WSN, which seek to simultaneously improve conflicting goals in the network, has become common in recent research [10]. In [11], a genetic algorithm-based fuzzy optimized reclustering scheme to overcome the energy limitations and maximize network lifetime has been proposed. In [12], a routing protocol to maximize network lifetime has been developed, which is a combination of microgenetic algorithm with LEACH protocol. In [13], a clustering method using multiweight chicken swarm-based genetic algorithm for energy efficient clustering has been proposed. In [14], the OptiGACHS protocol has been proposed to improve cluster head (CH) selection by genetic algorithm using the criteria of distance, density, energy, and heterogeneous node’s capability in the fitness function. In [15], an energy-aware routing protocol based on a multiobjective particle swarm optimization algorithm has been presented to improve quality of service (QoS) parameters. In [16], a statistical framework based on machine learning detection and unsupervised learning for effective signal retrieval has been introduced that can effectively approximate the distribution of unknown noise through a normalizing current. In this work, a low-complexity version of the framework is presented using an initial estimate to reduce the search space. In [17], a global heuristic search algorithm inspired by optimal heuristic underlying heuristic search is called the hyperaccelerated tree search (HATS) algorithm, which uses a deep neural network (DNN) to estimate the shortest path in a tree structure and speed up the underlying memory-bounded search algorithm. In [18], ubiquitous intelligent computing is proposed for mobile edge computing network (MEC) systems equipped with unmanned aerial vehicles (UAVs) using reinforcement learning and transfer learning algorithms to reduce latency and optimal energy consumption and the effect of jamming. In [19], in edge-edge computing networks, a system is designed to protect the physical layer through a deep reinforcement learning algorithm to reduce latency and energy consumption that used the Deep Q-Learning algorithm for automatic learning to optimize system performance. In [20], in a mobile edge computing network, federal learning has been used to outdated access points selection in order to reduce latency and energy consumption and increase system efficiency. In [21], a new framework for deep learning based on multioutput federally based IoT learning has been proposed called ME-FEEL, in which the main deep model uses multiple submodels with different depths and the final output has aggregated of the suboutputs. In this method, an output selection algorithm and bandwidth allocation based on a greedy approach is used to maximize the total number of outputs per communication cycle.

Therefore, in this research, a new optimization approach using multiobjective genetic algorithm (MOGA) and cuckoo search algorithm (CSA) for clustering wireless sensor networks is presented. In this study, in order to select clustered nodes from multiobjective genetic algorithm based on reducing intracluster distances and reducing energy consumption in cluster member nodes and near-optimal routing based on cuckoo optimization algorithm to transfer information between nodes, Eclipses have been used in the direction of the cavity. Considering the evolutionary capabilities of the multiobjective genetic algorithm and the cuckoo optimization algorithm, the proposed method is expected to improve in terms of energy consumption, efficiency, delivery rate, and packet transmission latency compared to previous methods.

In the previous methods, the selection of local cluster head nodes in each cluster using single-objective or multiobjective metaheuristic approaches has been presented. After selecting the cluster head nodes in order to transfer information from the sensor node to the sink, the cluster head node is done greedily. However, there may be a deadlock in the path between the cluster heads and due to the greedy approach, it gets stuck in the local optimal trap. Therefore, in the proposed method, in addition to selecting the optimal local cluster head nodes using a multiobjective genetic algorithm based on the quality of service parameters, the path between the sensor nodes to the sink among the cluster head nodes is based on the cuckoo search algorithm and its fitness function that considers the criteria of the network. In the proposed method, in addition to finding local hops, the optimal global path is also found.

The main contribution of the article is summarized as follows: (i)develop a forest environment monitoring scenario to prevent forest fires(ii)using multiobjective genetic algorithm to select optimal cluster head in each cluster wireless sensor network(iii)the trade-off between the quality of service parameters with respect to using the multiobjective fitness function(iv)using cuckoo search algorithm to find the optimal global path among the optimal solutions

In the rest of the paper, in the second section, clustering methods based on swarm intelligence in the wireless sensor network will be examined. In the third section, the proposed method will be described in detail. In the fourth section, the test results and evaluation of the proposed method will be presented. In the fifth section, conclusions and future work will be presented.

2. Clustering Based on Swarm Intelligence

In this subsection, collective intelligence-based routing protocols for wireless sensor networks will be reviewed. The properties of these protocols will be highlighted according to the optimization mechanisms. (i)Genetic Algorithm Based Energy Efficiency Clusters: Genetic Energy Consumption Algorithm (GABEEC) is used to extend network life using cycles. The genetic algorithm evaluates all chromosomes by calculating the fit function. The proportionality function has three parameters, including the distance at which the first node dies, the distance at which the last node dies, and the distance between the clusters. This is an attempt by the algorithm to reduce the lifespan by reducing the communication distance, but because of sending information about the remaining energy to the base station, it strengthens the communication at the head of the clusters. The Genetic Clustering Algorithm (GCA) uses two parameters to achieve a longer lifespan and the total transmission distance in a cluster and the number of network cluster heads [22, 23]. Genetic Algorithm-based Energy Efficient Clustering Hierarchy (GAECH) performs the genetic algorithm twice. Taking into account the available residual energy and the total cost of transmission, it improves the selection of the cluster head [4].(ii)Ant Colony Optimization Protocols (ACO): Ant colony optimization is one of the bioinspiring mechanisms that routine optimization pathways. This protocol is dynamic and reliable and can provide data aggregation and aggregation routing structures. It also prevents network congestion and reduces power consumption and supports multipath data transmission to achieve reliable communication in wireless sensor networks. This protocol intends to maintain the maximum network life during data transmission in an efficient manner [5, 7]. The authors have proposed a cluster head selection algorithm using ant colony optimization to construct load-balanced clusters in the network. This algorithm considers the remaining energy of the node and the distance between nodes as the criterion for selecting the cluster head [9]. Another HACO-based clustering method organizes the energy efficient clustering protocol through local interactions between sensor nodes [10].(iii)Particle Swarm Optimization (PSO): Particle swarm optimization is a subset of collective intelligence based on a population-based stochastic optimization method. The PSO applies the concept of social behaviors to flocks of birds or fish to real-world problems. This approach preserves local as well as global solutions and creates the best fit for a goal [24, 25]. PSO is also used to implement the information dissemination protocol in the article. The selection criteria for the head of the cluster based on the residual energy are the distance inside the cluster and the degree of the node [26]. The combined protocol of Harmony Search Algorithm (HSA) and PSO is also used to optimize clustering. This algorithm selects the hybrid head of the cluster with the proportionality function, which includes the residual energy of the nodes, the degree of the node, and the distance between the nodes. The HSA-PSO metaheuristic algorithm is used to select a constant number of cluster heads. In the case of a certain number of heads, it does not guarantee coverage of the entire network. Heads in HSAPSO use direct communication to transfer their data to the base station, which reduces its energy efficiency [26].(iv)Clustering based on artificial bee colony optimization: ABC optimization is also used to form clusters in a wireless sensor network. Wireless Sensor Network Clustering Using the Artificial Bee Cloning Algorithm (WSNCABC) uses the artificial bee colony to calculate the eclipse fit using parameters such as node residual energy and distance from the base station to nodes. However, this algorithm suffers from the high cost of transferring data directly from the cluster to the base station [2730]. Clustering protocol based on artificial bee colony (ABC-C) has been proposed in another study that improves the fit function. The residual energy, the distance from the node to the base station, and the quality of the bond are considered parameters of the fit function. This algorithm selects the cluster head periodically [31]. The B-Sensor-C algorithm has been developed for event-based sensor networks. When an event occurs, the protocol forms clusters and selects the head. The most important node that confirms this event seems to be the head and others should follow it [32, 33].(v)Energy-Aware Bee Colony Approach (EABCA) improves network performance with the fit function. For data delivery, multichannel communication between the head and the base station is required [34].

Table 1 shows a comparison of clustering methods based on collective intelligence in terms of important parameters in WSN clustering.

Table 1 is reproduced from Nabavi et al. (2021).

3. Preliminaries of the Proposed Method

As mentioned, in this study, in order to overcome the limited energy challenge in wireless sensor networks, we try to use a combination of two metaheuristic optimization algorithms for near-optimal routing. In the rest of this section, we will first introduce how these two algorithms work, and finally, in the next section, we will explain how to combine these two algorithms in order to create a routing method.

3.1. Genetic Algorithm

Genetic algorithm (GA) is one of the metaheuristic optimization algorithms inspired by the law of gene combination and generation. The algorithm starts with the initial population and continues the search to find a group of optimal chromosomes that may be possible solutions to the problem. Each chromosome is a string of genes that represent a specific solution that originates from the original population. The genetic algorithm, based on genetic laws and existing operators, repeatedly selects the most suitable solutions in the form of elite chromosomes and, in the next step, produces new chromosomes derived from selected chromosomes that are close to the optimal solutions. The initial population in the genetic algorithm is randomly selected and the coding of the chromosomes is varied based on different optimization problems. The initial population is evaluated in the first step based on the proportionality function, and to generate a new population, the selection operator takes action. The purpose of the selection operator is to select the optimal chromosomes that have the potential to become near-optimal solutions that these chromosomes use to produce populations in the next generation. The multiobjective proportionality function uses an expert approach in the Pareto space to balance the objectives of the problem and stores the Pareto front chromosomes in the reservoir of dominant solutions [35]. One common method for the operator is to select a roulette wheel in which each chromosome is assigned a portion of the wheel based on its merit and the value of the fit function, so for chromosomes for which the value of the fit function is greater. Naturally, there are more gaps and more chances to choose for the next population. Then, genetic algorithm operators, which include two crossover and mutation operators, combine chromosomes, and in some chromosomes, they change the values of one or more genes to produce values in the new generation of expert chromosomes. Produce a higher fit function. Genetic algorithm operators to diversify new populations are defined as follows [36]: (1)Crossover operator: This operator combines two chromosomes based on a predefined parameter called Crossover probability and changes the values of both chromosomes. In the crossover operator, part of the first chromosome is replaced with part of the second chromosome based on the probability of crossover, and the new population produced accordingly will be a combination of both chromosomes(2)The mutation operator randomly selects one or more genes from a chromosome and changes their values according to another predefined probability. The new chromosomes change slightly based on the crossover operator, which is applied to create diversity in the new population and to create chromosomes with higher proportion function values than the chromosomes of the previous generation

In each iteration of the genetic algorithm, the most appropriate chromosomes as an expert population are passed directly to the next generation of the population. Finally, the genetic algorithm is terminated based on some stop criteria, which may include a certain time to run the algorithm, a certain number of iterations, achieving a certain value of the proportionality function, achieving a certain amount of the objective function. And in other cases, at each step of the genetic algorithm, the chromosomes that pass to this stage are evaluated based on the fitness function to measure the degree of optimality and quality of the solution for each chromosome. The objectives used in the fit function may vary depending on the nature of the problem. In general, there are two main types of problems in the field of problem optimization, which are presented in the form of maximization and minimization problems. For maximization problems, the chromosomes with the highest value of the proportionality function are selected at each stage, and for inverse minimization problems, this equation is used [37].

3.2. Cuckoo Search Algorithm

Cuckoo Search Algorithm is a nature-inspired algorithm based on the reproduction of cuckoo birds. When using cuckoo search algorithms, it is important that potential solutions are associated with cuckoo bird eggs. Cuckoos lay their fertilized eggs in other cuckoos’ nests, hoping that their eggs will be raised by other parents. There are times when cuckoos realize that the eggs in their nests do not belong to them, in which case the foreign eggs either come out of the nests or leave the whole nest. The cuckoo search optimization algorithm is based on the following three rules: (i)Each cuckoo randomly selects a nest and lays an egg(ii)The best nests are passed on to the next generation with their quality eggs(iii)For a certain number of nests, a host cuckoo can detect an external egg with a probability of pa∈ [0,1]. In this case, the host cuckoo can discard the egg or leave the nest and build a new location elsewhere

The last rule can be approximated by substituting the ratio of host nests to new nests (with new random solutions). The quality of fit of a solution can simply be commensurate with the value of the target performance. From an executive point of view, the representation of the initial population is such that each egg in a nest is shown as a solution and each cuckoo can lay only one egg (thus, a solution is shown). It is safe to say that there is no difference between an egg, a nest, or a cuckoo. The goal is to use a new and potentially better solution (cuckoo egg) to replace the worse bad solution in the nest [38].

The cuckoo search algorithm is very effective for general optimization problems because it maintains a balance between local random search and global random search. The balance between local and global random search is controlled by a pa∈ switch parameter [0,1]. Stochastic local and global searches are defined by relationships 1 and 2, respectively [38].

In the above equations, , , and are the current position for the eggs in a random permutation, the factor is related to the positive step size in order to select the next nest, is the position of the eggs in the next step, is the step size, is the internal multiplication of two matrices, is the heavy-side function, is the probability of switching between local and public search, ε is a fixed number with the same distribution, and is the Lévy distribution to define a random search step size used.

3.3. Methodology

In this paper, a combined method based on multiobjective genetic algorithm and cuckoo search has been presented. This method is based on a clustering approach in which the multiobjective genetic algorithm tries to find the optimal CH by evaluating the main network criteria such as the distance between CM in each cluster, the distance from the CH to the sink and the residual energy of CHs. Selecting the optimal CH can optimize energy consumption and other QoS objectives. The sensed data in the network is first transmitted by the CM to the CH and then sent to the sink through multihop routes between the CHs. Given that the multiobjective genetic algorithm tries to optimize local QoS objectives in each cluster, the final route between the CHs may be chosen based on greedy methods, in which it may not be global optimal. In this paper, to overcome this challenge, the cuckoo search algorithm has been used. In fact, the cuckoo search algorithm takes the routes between the CHs as input, and if the route specified between the CHs in the multiobjective genetic algorithm is not global optimal, this route will be discarded and a global optimal route between the CHs will be selected in the network. The global optimal route in the cuckoo search algorithm has been found to reduce the overall energy consumption in the network, increase the data delivery rate, and reduce the end-to-end latency. Figure 1 shows an overview of the proposed method in the form of a flowchart.

According to the flowchart of the proposed method, this method has three general steps which are as follows: (a)wireless sensor network configuration and initial clustering of nodes using partition clustering algorithm(b)selection of optimal local header nodes using the main criteria by the multiobjective genetic algorithm(c)determining the global optimal route with the aim of reducing energy consumption, increasing the data delivery rate, and reducing the end-to-end latency using the cuckoo search algorithm

Details of each of the main steps are provided below.

3.3.1. Network Model

In this section, the details of the proposed network are presented. The proposed wireless sensor network includes N sensor nodes and a fixed sink. Network settings are set according to the standard settings in other articles. Initially random nodes are selected as the CHs. These nodes have been considered cluster centers in the proposed network. The other nodes in the network have connected to close CH based on the partitioning clustering method and initial clusters have formed. The distance between nodes in the network and CHs is measured by the Euclidean distance [23]. Each node has been assigned to the nearest CH and the nodes close to the sink have not been assigned to any cluster and have been connected directly to the sink. After the clusters have formed, each CH notifies the other nodes by a message. Once receiving this message, CMs of the cluster have sent a reply to the CH for confirmation. Thus, information about CMs and CHs has been stored in the routing table.

3.3.2. Cluster Head Selection Using MOGA

After the formation of initial random clusters and random selection of initial CHs, in the second step, the proposed MOGA method is used to find the optimal CHs. The initial population in the MOGA consists of random CHs that are found the optimal solution in exploration stages as local optimal CHs. The initial population and genetic operators are described as follows.

(1) Initial Population. Given that in this paper, the MOGA algorithm is used to find the optimal CHs in each cluster, each of the input chromosomes is considered a solution to this problem. Each gene on each chromosome represents a CH. Hence, the number of genes on each chromosome is equal to the number of clusters. Due to the fact that the number of clusters in the first stage is randomly selected, hence, the number of genes is adjusted according to the initial clusters. Figure 2 shows an overview of the initial population in MOGA.

As can be seen from Figure 2, the initial population in MOGA consists of chromosomes that have genes with random integer numbers. Each number in genes refers to the index of a node selected as the node. The selection of nodes in the initial stage is random and then changed by genetic operators in the exploration stage and will become optimal nodes to be selected as CH.

The following are important steps in MOGA:

Step 1. Initial random population production. The initial population size can be selected randomly depending on the number of clusters. The initial population is considered 100 chromosomes.

Step 2. Nondominant sorting. The values of the fitness function are calculated for the given objectives. For each chromosome to become a nondominant solution, it must not dominate any other chromosome. Each chromosome has ranked by fitness values [39]. After ranking the individuals based on the fitness function, the first half of the individuals are selected as the optimal chromosomes.

Step 3. Genetic operation. At this stage, two parents are randomly selected from the optimal individuals. From these two parents, two new children are born, called the “new generation.” These offspring are produced using crossover and mutation operations.
In this paper, we use one-point crossover, where two parents (chromosomes) exchange part of their genes with each other at the point of intersection. Crossover rate is the probability that several genes from each parent will be selected for crossover operation.
Another method to produce offspring is mutation. Only one chromosome has been selected to mutate on it. In mutation, a bit is randomly placed in the parent. The mutation rate is the probability that several bits in the chromosomes will change.

Step 4. Select. Fitness values for each child generated by crossovers and mutation are calculated. Produced individuals gather after crossover and mutation with the original population. Again, sorting operations are performed on these individuals and their rankings are evaluated. When sorting is done, the number of individuals equal to initial population has been selected and others have been rejected.

(2) Fitness Function. As mentioned, the fitness function parameters in the proposed method include the distance CH from other CMs, the distance from CH to the sink, and the amount of residual energy for CH. Therefore, the fitness function in the proposed method is to optimize these parameters to find the optimal CHs in order to reduce energy consumption, increase the data delivery rate, and reduce the end-to-end latency. For this purpose, a minimization function is used in the proposed method, which selects nodes as CH in each step of data transfer with the lowest average distance within the cluster, the minimum distance to the sink and the least energy consumed (maximum residual energy). Due to the fact that CHs are responsible for transferring packets from CMs to the sink, CHs are evaluated in each round and, if necessary, replaced with nodes that are more optimized. In this case, the cluster is updated and the CMs join the new CH. Finding such nodes causes the energy of some CHs not to run out sooner than other nodes and the energy consumption in the clusters and in the whole network is balanced. In relation 6, the proposed fit function is shown [23].

Subject to where and are the coordinates of nodes and , is the coordinates of the sink, is the mean distances within the cluster , is the residual energy of nodes , is the number of nodes, is number of clusters, is the primary energy of nodes , is the farthest node in each cluster from the sink, and is the cluster diameter. Due to the existing limitations, the residual energy of CH should not be more than its initial energy, the distance from CH to the sink should be less than the distance of the farthest node in the cluster from the sink, the average distances within the cluster should be less than or equal to the diameter of the cluster.

Given that the values of the input parameters to the proportionality function are not in the same range, it is necessary to normalize the data before evaluation. In the proposed method, the MIN-MAX normalization criterion is used [40]. Given the values of the fit function for each chromosome, the chromosome that is uncontrollable will eventually be obtained as the final solution of the MOGA algorithm. Based on this chromosome, CHs are selected and the route between these CHs to send data to the cavity is determined.

3.3.3. Cuckoo Search Algorithm to Find Global Optimal Route

In the previous section, the MOGA algorithm selected the best nodes as CH according to the network parameters. These nodes are the most suitable option in any cluster at any step of data transfer. Sending data from CM to the sink requires sending multihop steps, in which each hop is a CH. How to send data between CHs specifies the route between CM to the sink. Determining which CHs in the route between CM and sink improve objectives of network is an issue that creates a global optimal path. In this paper, the cuckoo search algorithm is used to solve this problem. The cuckoo search algorithm takes the possible routes between the CM and the sink as input. In this algorithm, each path is considered a nest. Due to its metaheuristic nature, this algorithm tries to find the best nest. The best route can optimize the network’s objectives. In other words, data transfer in each step of the optimal route saves the total energy of the network, increases the data delivery rate, and reduces the end-to-end latency in the network. The routes between the CM and the sink are evaluated based on the fitness function in Equation 6 to find the global optimal route.

Subject to

In the above relation, F2 is defined as the fitness function of the cuckoo search algorithm, is the end-to-end latency of CHs, is the prediction of total consumed energy, is the data delivery rate in route , is the latency of one-hop data transfer, and is the energy consumption of one-hop data transfer. The route with the least value of the fitness function F2 is selected as the optimal global route.

4. Implementing the Proposed Method

In this article, a forest monitoring scenario is used to prevent fires. The risk of forest fires is one of the problems that the environment always faced. Recently, in order to prevent forest fires and prevent the destruction of pastures, methods have been proposed for permanent monitoring of the forest using communication equipment. Wireless sensor network based on communication between sensors and aggregation of data from the environment in forest areas is one of the new technologies that has been proposed for monitoring the forest environment. In this type of monitoring program, you can go to the installation of thermal sensors and radiation sensors. In some cases, the use of animals as biological sensors has been suggested, but the problem with these reptiles is their slow nature, which makes them very difficult to track. Forest fires most often occur on the ground and are always spread regularly and usually depend on wind speed. To detect forest fires, thermal sensors can be used that periodically transmit ambient temperature data. Therefore, thermal sensors are used in the proposed network in this paper. These sensors are installed in the forest environment at random distances and periodically transmit the ambient temperature to the hole. Of course, for better network efficiency, by setting a temperature threshold, information can be sent when the forest temperature exceeds the threshold. Since in this article the goal is to find the optimal path using multiobjective genetic algorithm and cuckoo search, we have used this sensing version to improve the service quality parameters in this method.

In order to implement the proposed method, we first configure the wireless sensor network based on the existing standard parameters. The proposed network is implemented in an environment of . In order to implement this scenario, the MATLAB software version 2020 and LEACH toolbox have been used. The proposed network has 100 sensor nodes and one hole. The hole node first gathers information about the locations of sensors in the network and selects several random cluster head nodes based on this information. Cluster nodes are randomly selected and sensor nodes join cluster nodes based on their distance to form clusters. After the first cluster formation and sending the data to the head node, information about the initial energy and distances within the cluster and the distance of the head node to the origin can be calculated.

Of course, some nodes around the hole may not be clustered according to their distance to the nearest node because their distance to the hole is less than their distance to the nearest node. These sensor nodes can communicate directly with the hole to transmit information.

This information is entered into the genetic algorithm as the primary chromosome and the implementation of the second step of the proposed method begins. At this stage of the proposed genetic algorithm, the initial population is evaluated according to the randomly selected thread nodes. In order to initially evaluate the input population to the proposed genetic algorithm, the proportionality function is applied to the initial population. Based on this, the proposed genetic algorithm measures the threaded nodes in terms of residual energy, average intracluster distances, and distance from the hole. The values of the proportionality function are calculated for each of the head nodes in the initial population. In the meantime, some threaded nodes have good proportion function values, but some are weak, so in the next step, based on the fitting and mutation operators of a new population production, we will examine the proportional function values in the new population. The new population in the proposed method, like the original population, will be a combination of cluster head nodes that will replace the previous cluster head nodes, and based on this, the proportional function of this population will be remeasured. Proportion function values are then calculated for the new population. Also, the related clusters of some cluster head nodes that are located on undesirable chromosomes are disintegrated and serious clusters are formed with the clusters on the optimal chromosomes.

As shown in Figure 3, the previous threaded nodes are marked with a black × mark, the previous connections were marked with blue lines; now, the connections with the new cluster head nodes are marked with red lines. New cluster head nodes have been selected as the proposed solution for transferring information from sensor nodes and aggregating data and sending them to the hole node. However, due to the distances of the head nodes from the sink node, if a head node sees another head node in the direct path to the hole, send packets instead of direct transfer to the hole through the multistep transfer process between head nodes. It will be a hole until it reaches the node.

Now, the proposed method enters the third stage, in which the cuckoo search optimization algorithm examines the path quality based on the clues obtained from the genetic algorithm. The cuckoo search algorithm has the ability to find the optimal route in the whole network due to its global search capability. In fact, at this stage, the proposed method of the selected path assignment determines whether it is optimal for transmitting data packets, or there may be a more optimal path, and the genetic algorithm is stuck in a local optimal trap. Table 2 shows the output of the cuckoo search algorithm for the proposed paths by the genetic algorithm.

As shown in Table 2, the optimal routing in the proposed method is based on the cuckoo search algorithm. The cuckoo search algorithm, according to its proportionality function, examines the quality of the proposed paths by the genetic algorithm, and the paths that improve the network goals are returned with the value of their proportionality function. Figure 4 shows the convergence of the cuckoo search algorithm towards the optimal point.

As shown in Table 2, the optimal routing in the proposed method is based on the cuckoo search algorithm. The cuckoo search algorithm, according to its proportionality function, checks the quality of the proposed paths by the genetic algorithm, and the paths that improve the network goals are returned with the value of their proportionality function. The optimal route is selected and after reaching a dead end, it is detected by the cuckoo search algorithm. These paths have been selected as nonoptimal paths and need to reexamine the values of the fit function and update the routing table. Also, in Table 2, it can be seen that the optimal paths have been selected as the shortest route between the sensor node and the sink in the current network conditions and it has been confirmed after reviewing by cuckoo search algorithm that information has been transferred through this route. In this paper, the cuckoo search algorithm is used in order to find the optimal global path of the owl according to the global search property. The optimal global path is determined based on the fit function in this algorithm. Hence, Figure 4 shows the convergence of the cuckoo search algorithm towards the optimal point.

As shown in Figure 4, since the fitness function in the cuckoo search algorithm is decreasing, this algorithm selects the optimal paths with the lowest value of the proportionality function as the globally optimal path. The parameters of the proportion function in the cuckoo search algorithm try to find the optimal path with the least energy loss, the least amount of latency, and the most data delivery rate. Hence, the lower the value of the fitness function, the more efficient the path found. According to Figure 4, it can be seen that the cuckoo search algorithm reduces the value of the target function in each step of data transfer to converge to the optimal point. Therefore, it can be said that using the cuckoo search algorithm to investigate the global optimization of the path whose steps have been selected by the multiobjective genetic algorithm in each cluster can help optimize the service quality parameters in the wireless sensor network. The network simulation continues until the energy of the wireless sensor nodes is terminated by the transmission of information. When the nodes within the network lose their energy, that area of the network that is covered by a particular node is disrupted and the so-called network hole occurs. In such cases, the other nodes are responsible for collecting data from that area of the network hole. This happens until other nodes are unable to collect data from the entire network environment. In this case, the life of the network ends.

4.1. Evaluation of the Proposed Method

The evaluation of the proposed method is done in order to evaluate the quality of the proposed method and to present the improvement created by the proposed method based on the initial problem proposed. To evaluate wireless sensor networks, various criteria have been introduced in the publications, which we will discuss in the proposed method of energy consumption, network life, and data delivery rate. Due to the importance of routing in wireless sensor networks in order to balance the energy consumption between nodes, in order to validate the proposed method to compare it with the previous methods in terms of energy consumption and other criteria. We evaluate. For this purpose, we compare the proposed method with the methods [4143] in terms of the mentioned evaluation criteria. Figure 5 shows a comparison between the proposed method and previous methods in terms of average energy consumption in the network.

As shown in Figure 5, the average energy consumption is calculated for different methods. The lower the average energy consumption diagram, the more balanced the energy consumption at the sensor nodes in the network. This makes the network longer and the network available for a longer period time. In the proposed method, according to the selection of the optimal local cluster nodes in each cluster by the multi-objective genetic algorithm and the selection of the globally optimal path by the cuckoo search algorithm, the service quality parameters are optimized. As can be seen from Figure 5, the proposed method has a lower average energy consumption per 100 nodes than the previous methods. Figure 6 also compares the proposed method with previous methods in terms of the lifespan and death of the first node in the network.

As shown in Figure 6, network lifetime is calculated in different ways. Network lifetime is directly related to the energy consumption of wireless sensor nodes. In fact, the more balanced the power consumption of the sensor nodes in the network, the longer the network lifetime will be. Network lifetime in WSN applications is a very important criterion for evaluating the efficiency of routing methods. Therefore, in the proposed method, by selecting the optimal cluster head nodes and the optimal global path, we have tried to reduce the distance between the hops and reduce energy consumption in sending information. Therefore, the proposed method has been able to improve energy consumption in sensor nodes. Also, in the proposed method, the lifetime of the network is significantly increased. According to Figure 6, the proposed method has a longer lifetime than the previous methods and the first node in the proposed method dies much later than other methods, which shows the balance of energy consumption in the proposed method. Figure 7 also shows a comparison between the proposed method and previous methods in terms of delivery rate.

As shown in Figure 7, the proposed method has a higher delivery rate than the previous methods, which indicates the selection of the optimal route and avoidance of bottlenecks and the loss of the least amount of packets in the proposed method. According to the evaluation criteria in the wireless sensor network, the proposed method can be seen according to the use of multiobjective genetic algorithm in order to find the optimal head node in each step of information transfer and also to find the optimal global path using a cuckoo search algorithm. It has less energy, longer life, and a better delivery rate than other methods.

5. Conclusion and Discussion

Wireless sensor networks are one of the newest media for monitoring and controlling the environment, which is able to collect information from the environment and provide data for network applications without the need for infrastructure and in a self-organizing manner. Therefore, the great popularity of these networks has caused many challenges, one of the most important challenges is the imbalance of energy consumption in the network. Due to the energy limitations of sensor nodes, energy imbalances can overshadow all grid performance metrics. Therefore, in this research, a new optimization approach using multiobjective genetic algorithm and cuckoo algorithm for clustering wireless sensor networks is presented. In this research, in order to select clustered nodes from multiobjective genetic algorithm based on reducing intracluster distances and reducing energy consumption in cluster member nodes and near-optimal routing based on cuckoo optimization algorithm to transfer information between nodes, Eclipses have been used in the direction of the hole.

The problem of channel estimation is directly related to the number of messages and the complexity of the calculations performed to find the optimal path. In this paper, for better network performance and less complex channel estimation, the temperature threshold is determined and when the forest temperature exceeds the threshold, information is sent from the sensors to the hole. In this case, the number of messages sent on the network will increase in a balanced way. Also, the energy consumption of the sensor nodes will be balanced and the energy of one node will not run out sooner than the others. To transfer information, it is necessary to send a routing package by the node to inform the nodes of the cluster about the status of the new node and send a confirmation message by the node. Due to the fact that the notification process of the new head occurs only in the event of a temperature rise and is local, the number of messages due to communication overhead will be low. Also, the computational overhead to find a new clue and the optimal path occurs in each round of data transfer when sensing the critical message, it is expected that the control of the control and computational overhead in the proposed method does not exceed a certain limit.

The results of the proposed method show that considering the evolutionary capabilities of the multiobjective genetic algorithm and the cuckoo optimization algorithm, the proposed method in terms of average energy consumption, delivery rate, and network life, compared to previous methods, has made significant improvements.

In order to provide suggestions for future work in the continuation of this article, we can use NSGA-II or NSGA-III algorithms to find the optimal local head-clusters. In these algorithms, according to the ranking of nondominant solutions, possible cluster head nodes can be sorted. In this ranking, the first node can be selected as the current cluster head node, and if the energy of the current cluster head node has decreased, the second node in the ranking as the most likely candidate for the cluster head node can be considered. In this case, the volume of calculations performed to find the optimal cluster head nodes in each cluster will be significantly reduced. If the second node in the ranking cannot achieve the proper fitness function, other nodes in the network can be evaluated.

Data Availability

The data used to support the findings of this study are derived from the simulation results.

Conflicts of Interest

The authors declare that they have no conflicts of interest.