TY - JOUR AU1 - Nalbant, Kemal Gökhan AU2 - Alsuhibany, Suliman A. AU3 - Alshehri, Asma Hassan AU4 - Hatira, Maha AU5 - Choi, Bong Jun AB - 1 Introduction Fifth Generation (5G) technology represents a significant advancement over all prior mobile generation networks and is a cornerstone of the digital transformation. Three new services, including Extreme Mobile Broadband (eMBB), are available to end users using 5G. In addition to many other features, it provides increased bandwidth, ultraHD streaming movies, virtual reality and augmented reality (AR/VR) media, high-speed internet access, and minimal latency. Massive machine type communication, or eMTC, offers broadband and long-range machine-type communication at a very low cost and with minimal power usage. For Internet of Things applications, eMTC offers mobile carriers a high data rate service, low battery consumption, and wider coverage with fewer complicated devices. With its exceptionally fast speed, high throughput, low latency, improved reliability and scalability, and energy-efficient mobile communication technology, 5G offers a limitless internet connection at your leisure, anytime, anywhere [1,2]. Software-defined network (SDN) is a strategy to enable programmatically efficient network design and to facilitate network administration, hence improving network performance and monitoring [3]. It opens up a world of new creative applications, from traffic engineering to data centre virtualization, fine-grained access control, and more, by separating the data and control planes [4]. It is a strong option for 5G networks as well because it has a demonstrated benefit in several commercial networks [5,6]. A wireless sensor network (WSN) typically uses a base station and multiple sensor nodes. Due to its low deployment cost and great benefits, WSN has gained rapid development and wide popularity [1–3]. However, WSN suffers from limited network resources, inflexible network management, and partial efficiency of routing algorithms [4–6]. To solve the above problems, SDN based Wireless Sensor Networks (SDWSN) [7–10] apply software-defined technology to WSNs by separating data and control planes. The SDWSN improves network flexibility through centralized management and programmability, supports high-speed heterogeneous connectivity, flexible and efficient detection, dynamic and reliable routing, and improves WSN utilization [11–13]. Network energy efficiency is still a major obstacle to WSN deployment in SDN [14–17]. Since the original routing method is no longer fully suitable for WSNs, it is important to develop a routing strategy that considers the characteristics of SDWSNs [18–20]. Various routing algorithms such as Low Energy Adaptive Clustering Hierarchy (LEACH) [21], Distributed Energy-Efficient Clustering (DEEC) for heterogeneous WSNs [22], Stable Election Protocol (SEP) [23], and other clustering routing algorithms are deployed in SDWSN. The SDWSN exhibits strong scalability and robustness because its cluster routing algorithm divides sensor nodes into multiple clusters. Each cluster has a cluster head that collects information from its members and sends it to the base station. LEACH randomly selects cluster heads to balance network load. However, polling the cluster heads frequently consumes power [24]. When choosing cluster heads, DEEC considers the remaining energy of the nodes, prolonging the network lifecycle and increasing the data transmission delay. The clustering step of the clustering routing method, an approach to solving difficult optimization problems by modeling the behavior of groups, has recently been improved by applying some clever optimization algorithms. The Artificial Bee Colony Algorithm (ABC) [25], the Firefly Algorithm (FA) [26], and the Genetic Algorithm (GA) [24] are examples of intelligent optimization algorithms. The GA local search performance is poor despite its fast convergence time. The FA has fewer parameters than GA. Global search and convergence speed are better for the ABC method. Methods that are easy to integrate with clustered routing algorithms include the FA and ABC algorithms. Intelligent optimization techniques suffer from poor solution accuracy, convergence to locally optimal solutions, and limited search space. The main contributions of this paper are as follows. Establish the network model and energy consumption model of SDWSN. A hybrid optimization algorithm (optimized algorithm based on the firefly algorithm, gravity search algorithm, and biogeography optimization, FGB) was designed. To improve the capability of a worldwide search for the best solution, a location update approach based on population diversity is first presented and is based on FA. Then, based on the hybrid gravitational search algorithm (GSA) and biogeographic-based optimization (BBO), the ability of local search to find the optimal solution is optimized. The algorithm improves the performance of optimization procedures that find approximate global solutions. A distributed high-efficiency entropy energy-saving clustering routing algorithm for SDWSN is designed (DHEEC). This algorithm considers energy entropy when selecting cluster heads, which is more suitable for energy updates in SDWSN. At the same time, FGB is used for cluster head selection to speed up the rotation of cluster heads. Through experimental simulation and analysis, compare FGB with other algorithms to verify its performance on standard functions. Comparing DHEEC with other algorithms, it prolongs the network lifetime and improves energy utilization. The remaining of this this paper is organized as follows. In Section 2, the literature review is discussed in detail. In Section 3, the proposed system model is described and the analytical formulations are discussed. In Section 4, the hybrid optimization algorithms are explained. In Section 5, the high entropy energy saving clustering routing algorithm is described. In Section 6, the simulation experimentations and comparative performance evaluation is discussed. Finally, Section 7 concludes the paper. 2 Related work This section mainly focuses on two aspects of the network clustering routing algorithm and the intelligent optimization algorithm. A three-stage heterogeneous network model for WSN is proposed in [27]. The model uses a threshold function and weighted election probabilities to select cluster heads and capture network heterogeneity. Based on the evolutionary approach for LEACH protocol optimization (LEACH-O) [28], both WSN lifetime and energy efficiency are improved. The Enhanced Adaptive Distributed Energy Saving Cluster (EADEEC) algorithm [29] based on DEEC improves cluster stability, node survival time, and data transmission. The authors in [30] uses particle swarm optimization (PSO) to estimate the relative positions of cluster heads and base stations, developed mobile paths for base stations based on the ABC traversal path approach, and reduced sensor node consumption power. The clustering phase of the clustering routing method uses a population optimization algorithm. In [31], an energy-efficient heterogeneous WSN routing technique based on Improved Firefly Clustering (IFCEER) was developed. However, it has poor solution accuracy and slow convergence are also problems. The WSN routing method based on FA for optimizing fuzzy C-means (FFACM) is a good reference to prevent the algorithm from tuning to local optima [32]. This is due to incorrect initial placement of the clustering centers. The authors in [33] considered the Bayesian PSO algorithm that is based on the Bayesian principle probability strength function for parameter tuning. However, especially complex multi-minimal problems face local optima. The Hybrid Firefly and Particle Swarm Optimization Algorithm (HFPSO) [34] checks the current global best fit value and decides to start the search process. In [35], a hybrid firefly algorithm with particle swarm optimization (HFAPSO) is proposed. This algorithm uses the HFPSO for optimal cluster head selection on LEACH-C and improves the FA’s global search ability. Reference [36] applied FA to a mixed-state logic model with an energy parameter to detect distributed denial-of-service (DDoS) attacks. Reference [37] used FA and BBO for feature selection in software product lines. In [38], the Gray-Wolf optimization (GWO) algorithm was combined with PSO to significantly reduce the computational time required to implement the algorithm. The LEACH-G protocol was proposed in [39], where the calculation of the ideal cluster head size is based on area and number of nodes. The enhanced LEACH protocol should theoretically outperform the original LEACH in terms of network robustness and power consumption. The R-LEACH is a clustering strategy designed based on the remaining energy of nodes and the maximum number of cluster heads [40]. The probability threshold is redefined by the ideal number of cluster heads to improve the network speed and reduce the average power consumption. To achieve network load balancing, reference [41] provides a power-aware routing algorithm that creates timeouts according to the remaining power of a node and controls how often a node is elected as cluster leader. Each node determines its own attribute value based on the distance from the base station and the amount of energy left over, and based on this, it competes with neighboring nodes to obtain the best cluster head selection. Reference [42] suggested a distributed energy-saving clustering routing method. In [43], the authors found that if each cluster region remains fixed after establishment, the cluster head election is performed in each cluster region based on the residual energy factor, and if the cluster reaches the head energy, proposed an improved low-energy fixed clustering algorithm. If the threshold is below, a node from the cluster her members is randomly selected for the next voting round. This algorithm is efficient and prolongs network life. Reference [44] proposes a modified DEEC (MDEEC) algorithm that extends the network lifecycle but increases the amount of data received by the base stations. Additionally, a low-power communication mechanism was established within the cluster to allow nodes with residual power above a threshold to compete as cluster head candidates. Reference [45] proposed an improved protocol called LEACH-LOMUC, which selects candidate cluster heads based on remaining energy, size of cluster heads and distance between clusters, cluster head and base station transmission line, which effectively saving network energy. This protocol overcomes the shortcomings of the LEACH algorithm, which does not take into account the residual energy, the distribution of the cluster head, and the direct communication between the cluster head and the base station. Reference [46] proposed a distributed clustering routing protocol based on dynamic partition load balancing to solve the “hot zone” problem caused by uneven load on the nodes. Distributed clustering routing protocol determines different cluster radius based on the distance between the cluster head and base station, thus prolonging the life of the network. Reference [47] suggested that a highly efficient relay and relay node selection scheme designed for farmland environments to solve the problem of high power consumption caused by direct communication between the cluster head node is located far away from the base station and the receiver node. The node’s residual energy, the density of the network architecture, and the distance are carefully considered when choosing a cluster leader. The forwarding methods in different communication models are described one by one, starting with the distance between the candidate forward node and the sink node during the relay node selection process. The energy efficiency of the network is increased when energy balance is achieved. By setting the fit function to remaining energy and the distance from the base station, references [48,49] improved the weights of the first three wolves in the original GWO based on price suitable treatment. They also designed an improved algorithm based on the Physical Interest-Based Advanced GWO (FIGWO), which allows for optimal election of cluster leaders. Reference [50] has improved the particle swarm optimization algorithm based on adaptive learning factors, determined the adaptive function based on the node energy factor and the position equilibrium factor, and proposed two transmission methods. The throughput (single-hop and multi-hop) is optimized according to the distance between the cluster head and base station, while balancing the energy consumption of the nodes. Reference [51] proposed a heterogeneous clustering technique based on ant colony optimization to solve the problem of heterogeneity. This algorithm used the concept of pheromone update primacy to optimize the path quality and significantly improve the network quality. The optimal cluster head is selected by evaluating the relationship between the random number and the attribute and the weight parameters are optimized based on the GA and the simulated incubation algorithm. Reference [52] proposed a low-power routing protocol, where the node attribute is defined around the distance between the node and the base station and the remaining power factor. Reference [53] proposed a hybrid heterogeneous clustering routing protocol based on fuzzy logic theory and ant colony optimization. Based on the ant colony optimization method, the heterogeneous cluster regions are created, allowing efficient transmission of monitoring data from the cluster head to the base station, thereby effectively reducing the power consumption of the network. For the purpose of balancing the energy consumption of the network, showing the relationship between the cluster head ratio and the network size, and designing the suitable function for the particles of the swarm optimization algorithm on the energy remaining and node density, the improved filtering based on the PSO algorithm is proposed in [54], which greatly prolongs the life of the network. Using a GWO and a unique fit function, reference [55] proposed a new clustering protocol to predict the actual power consumption of multiple clustering schemes, giving allows reuse of a particular clustering method. A two-way communication network is established between the peripheral cluster leader and the receiving node to prevent premature death of nodes far from the base station. This network effectively balances the power consumption between the cluster head and the relay node, while reducing the overall network cost. Reference [56] proposed a centralized clustering technique (LEACH-C), which would improve the existing LEACH protocol. The base station selects the best cluster head in the cluster head election step using a simulated annealing process. To solve the problem of random selection of cluster leaders using the LEACH protocol, the LEACH-C takes into account the node’s position and remaining energy when selecting the cluster leader. However, due to one-hop communication between the cluster heads and base stations, the energy consumption of cluster heads far from the base station will increase, eventually leading to their premature collapse and network lifetime. Reference [57] proposed a centralized cluster routing protocol in which the base station groups the nodes for each round of cluster leader election using averaging technique and the GWO selects the best cluster leader for each cluster. By improving the cluster structure, it effectively increases the lifetime of the network. However, because this protocol does not take into account the routing between clusters, the cluster head located far from the base station will die prematurely due to high power consumption, reducing the lifetime of the network. References [58] proposed a centralized clustering routing system based on K-Means. The base stations use K-Means clustering to create the network clusters during network startup. The nodes disperse the cluster heads and remaining energy in each cluster. The K-Means clustering technique is sensitive to the starting point and simple to converge to the local optimal point, which has an impact on the clustering effect. However, it prolongs the life of the network to some extent. Furthermore, the protocol does not take routing between clusters into account, and the single-hop technique increases the energy consumption of the cluster head when it is far from the base station. This places constraints on the system. The ABC-SD protocol, which uses the artificial swarm method to solve the clustering and routing problems, has been presented in [59]. By taking into account the remaining energy of the nodes and neighboring data, this protocol creates an efficient matching function that is used to evaluate the results of the artificial swarm method. The clustering problem can be solved depending on the quality of the solution. The protocol builds routing between clusters based on the loss function after considering the energy efficiency and the number of hops in the routing hop between the clusters. The ABC-SD effectively extends the network lifetime and increases the network throughput by implementing centralized clustering and distributed route mix generation techniques. However, the load balancing between cluster heads, which affects network performance, is not taken into account by this protocol. A technical improvement based on the clustering routing protocol of the PSO algorithm has been proposed in [60]. A new matching function is designed by considering the redundant energy and the geographical location of the node in the grouping step to select the group leader who is near the base station and has a high level of excess energy. This fitness function is then used to evaluate the quality of the solution generated by the swarm algorithm. Each cluster head is paired with a relay node in the routing step between the clusters to balance the network energy consumption. The network lifetime is effectively extended by this protocol. However, there is no guarantee that the selected forward and cluster leaders are the current optimal option due to some features of the swarm optimization process itself. Reference [61] suggested a software-defined network routing method based on fuzzy logic. It was used as the basis for implementing the Fuzzy Topology Discovery Protocol (FTDP). It prolongs the life of the network and reduces the packet loss rate. To increase the lifetime of the network and reduce the latency, reference [62] developed an intelligent routing method based on the ABC algorithm that maps potential routing links as food sources and takes into account energy and delay variables. The Fuzzy Ant Colony Optimization Routing (FACOR) was developed by [63] by incorporating the ant colony algorithm into the routing protocol, evaluating the link viability by using fuzzy calculations based on energy, distance and connectivity, then choose the optimal link. A metaheuristic search routing protocol based on GA and mutation operator is presented in [64]. To develop effective routing and load balancing strategies, reference [65] introduced the load balancing and routing strategies using the Glowworm swarm optimization approach (LBR-GSO). Using the properties of a dynamic network, reference [66] suggested an improved ant colony algorithm (IACO), which can be used to generate sensor and rule node propagation functions. The network is clustered heterogeneously in [67], and the smaller the distance from the sink node, the smaller the cluster size. This reduces communication power loss in the cluster and provides the cluster main node with more power to transfer data between clusters, balancing the network power consumption and successfully avoiding the main problem. Reference [68] proposed a WSN hierarchical routing technique based on fuzzy cluster C-means and swarm intelligence (FCM-SI). The optimal cluster leader is selected using an artificial swarm algorithm, and then establishes a multi-hop path to the base station using the ant colony method. Although the power consumption and load balancing of the network are taken into account, the effect of the random starting cluster center of the fuzzy C-means algorithm is not taken into account. This can easily lead to locally optimal clustering, which will affect the entire network. An energy-aware multi-hop routing (EAMR) method is proposed in [69]. During the setup phase, a permanent cluster is created by selecting the initial cluster leader, selecting the first relay nodes, and determining the cluster membership of the remaining sensor nodes. The data is passed through the relay node during this phase, thus balancing the load on the cluster. However, the power consumption of the fixed burst far away from the base station is significantly higher than that of the fixed burst near the base station as the amount of data transmission increases. The clusters cannot evenly distribute network load. Reference [70] proposed effective and reliable routing algorithm based on dempster-shafer proof theory (DS-EERA) in which the attribute index is established as proof, using weighted method and the number of entropy to determine the weight of the index. Then, apply the merge rule of the theoretical DS proving to the underlying probability distribution function of each merged index value and the next hop chosen to propagate the data. Using the fuzzy C-means algorithm for clustering and the particle swarm optimization algorithm to optimize the initial center of the cluster, reference [71] proposed a clustering routing algorithm that ignores the fuzzy C-means and sensitivity to the center of the original cluster. Table 1 summarizes the performance of various state-of-the-algorithms and the proposed method in terms of important metrics. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. Performance comparison of algorithms. https://doi.org/10.1371/journal.pone.0301078.t001 2.1 Problem statement In summary, the improved algorithm based on the traditional clustering routing protocol usually selects the cluster heads based on variables such as residual energy and distance, but it has the disadvantage of alternately selecting the clusters based on the probability and determine the number of key clusters spontaneously. The impact of cluster head position on node power consumption is often overlooked, despite the fact that some researchers try to delay the cluster head rotation as much as possible by setting a threshold. Aiming at the above problems, in order to improve the efficiency of the optimization process for identifying an approximative global solution, a hybrid optimization algorithm that combines the global optimization powers of FA with the local optimization capabilities of BBOGSA is created. A distributed high-efficiency entropy energy-saving clustering routing system is created to speed up the rotation of the cluster heads. In order to show how well the hybrid optimization approach performs, it is compared to similar algorithms in terms of convergence accuracy, running time, and stability through experimental simulation and analysis. It is compared to competing techniques to show how the distributed high-efficiency entropy energy-saving clustering routing algorithm may lengthen network life and reduce data transmission energy usage. 2.1 Problem statement In summary, the improved algorithm based on the traditional clustering routing protocol usually selects the cluster heads based on variables such as residual energy and distance, but it has the disadvantage of alternately selecting the clusters based on the probability and determine the number of key clusters spontaneously. The impact of cluster head position on node power consumption is often overlooked, despite the fact that some researchers try to delay the cluster head rotation as much as possible by setting a threshold. Aiming at the above problems, in order to improve the efficiency of the optimization process for identifying an approximative global solution, a hybrid optimization algorithm that combines the global optimization powers of FA with the local optimization capabilities of BBOGSA is created. A distributed high-efficiency entropy energy-saving clustering routing system is created to speed up the rotation of the cluster heads. In order to show how well the hybrid optimization approach performs, it is compared to similar algorithms in terms of convergence accuracy, running time, and stability through experimental simulation and analysis. It is compared to competing techniques to show how the distributed high-efficiency entropy energy-saving clustering routing algorithm may lengthen network life and reduce data transmission energy usage. 3 System model 3.1 Network model In the architecture of SDWSN, the base station is located at the control layer, including the controller module that calculates the route of the entire network. The sensor nodes are located in the data layer and realize the function of forwarding data according to the flow table [72–74]. According to the SDWSN architecture, the SDWSN model is shown in Fig 1, and the control layer has the following functions: to obtain information such as network topology, the remaining energy of sensor nodes, and location. Calculate the cluster head rotation table according to the energy, the optimal path to meet the demand, and load the DHEEC and cluster head rotation table into flow table information. The cluster head located in the data layer only completes receiving, merging, and forwarding data [75,76]. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Proposed network model of SDWSN. https://doi.org/10.1371/journal.pone.0301078.g001 The network model is based on the following assumptions: The base station is situated in the middle of the M × M area, and the sensor nodes si (i = 1,2, …, N) are dispersed at random [77–79]; Data communication between the cluster head and base station using the OpenFlow protocol [80–82]; Node software and hardware configurations are the same, each has a unique ID, and the location is fixed; The links of the network are symmetrical; The base station’s data transmission and calculation speeds are faster than those of the sensor nodes. 3.2 Energy consumption model The radio network energy consumption model is shown in Fig 2. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. Energy consumption model. https://doi.org/10.1371/journal.pone.0301078.g002 According to the energy consumption model, the energy EnTx of transmitting a l bit packet is: (1) Among them, Enelec is the unit energy consumption, εfs and εmp are the power amplification loss, dis is the distance [83,84], and disbreak is the threshold distance. The energy EnRx required to receive a l bit data packet is: (2) Therefore, the total energy consumed in one iteration is: (3) Among them, k is the number of clusters [85,86], disHB is the average distance between the cluster head and the base station, and disMH is the average distance between the cluster member node and the cluster head node: (4) 3.1 Network model In the architecture of SDWSN, the base station is located at the control layer, including the controller module that calculates the route of the entire network. The sensor nodes are located in the data layer and realize the function of forwarding data according to the flow table [72–74]. According to the SDWSN architecture, the SDWSN model is shown in Fig 1, and the control layer has the following functions: to obtain information such as network topology, the remaining energy of sensor nodes, and location. Calculate the cluster head rotation table according to the energy, the optimal path to meet the demand, and load the DHEEC and cluster head rotation table into flow table information. The cluster head located in the data layer only completes receiving, merging, and forwarding data [75,76]. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. Proposed network model of SDWSN. https://doi.org/10.1371/journal.pone.0301078.g001 The network model is based on the following assumptions: The base station is situated in the middle of the M × M area, and the sensor nodes si (i = 1,2, …, N) are dispersed at random [77–79]; Data communication between the cluster head and base station using the OpenFlow protocol [80–82]; Node software and hardware configurations are the same, each has a unique ID, and the location is fixed; The links of the network are symmetrical; The base station’s data transmission and calculation speeds are faster than those of the sensor nodes. 3.2 Energy consumption model The radio network energy consumption model is shown in Fig 2. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. Energy consumption model. https://doi.org/10.1371/journal.pone.0301078.g002 According to the energy consumption model, the energy EnTx of transmitting a l bit packet is: (1) Among them, Enelec is the unit energy consumption, εfs and εmp are the power amplification loss, dis is the distance [83,84], and disbreak is the threshold distance. The energy EnRx required to receive a l bit data packet is: (2) Therefore, the total energy consumed in one iteration is: (3) Among them, k is the number of clusters [85,86], disHB is the average distance between the cluster head and the base station, and disMH is the average distance between the cluster member node and the cluster head node: (4) 4 Hybrid optimization algorithm 4.1 Improved firefly algorithm FA is an algorithm inspired by the flickering behavior of fireflies, which iterate their positions according to the brightness to find the optimal solution. The following rules are used: Fireflies attract one-way according to the brightness; The attraction of fireflies is proportional to the brightness; Fireflies with low brightness are attracted to fireflies with high brightness; The firefly with the highest brightness moves randomly. Definition 1: The relative fluorescence brightness I of fireflies i and j is: (5) Among them, I0 is the maximum fluorescence brightness of fireflies, β is the light intensity absorption coefficient [87,88], rij is the Euclidean distance, and the calculation formula is: (6) Among them, ci and cj represent the spatial positions of fireflies i and j, and ciw and cjw are the w-th dimension coordinates of fireflies i and j. Definition 2: Mutual attraction γ between fireflies. γ corresponds to the relative fluorescence brightness between fireflies: (7) Among them, γ0 is the maximum attractiveness. However, the convergence speed of FA is slow, and the global search lacks randomness, which may lead to convergence to a locally optimal solution [89,90]. The average distance between firefly individuals and ideal firefly individuals is used in this study to quantify population diversity and to suggest a location update technique based on population diversity. Definition 3: Diversity index βn. Reflects the diversity of the n-th generation population: (8) where s stands for population size, and denote the population’s mean center. Further adjust the position update strategy of fireflies, as shown in formula (9): (9) Among them, represents the spatial position of firefly i; α ∈ [0,1] represents the step factor; random parameter rand ∈ [0, 1]. represents the position of the brightest firefly individual in the current iteration n rounds [91–93]; ρ is a weight that changes according to βn and the number of iterations, and its calculation formula is: (10) Among them, β0 is the initial population diversity index, k is the current iteration number, σ is a linear decreasing function, and its calculation formula is: (11) Among them, maxiterate is the maximum number of iterations. According to formula (11), the initial value of σ is 1, and when k = 1 in the first iteration, the value of ρ obtained by formula (10) is negative. Move in random directions away from the optimal solution, thus enabling a wider search [94]. Fireflies will do local random searches near the ideal solution to provide a more accurate local search as the number of iterations rises and the diversity index falls. In order to prevent the algorithm from converging to the local optimal solution, such a dynamic adjustment mechanism can balance the issues of global optimization in the early stages of the algorithm and local optimization in the later stages. The fixed step size may make it difficult to reliably converge to the optimal point as the number of iterations rises since most fireflies would do local optimal searches in the vicinity of the optimal point. As a result, the step size factor is dynamically modified in the manner shown below: (12) where α is a constant value in FA. α0 represents the initial step size factor. The specific steps of firefly algorithm are shown in Algorithm 1, and its steps are described as follows. Algorithm 1. Improved firefly algorithm. Input: population size N, initial step factor α, initial population diversity index β0, maximum number of iterations maxiterate Output: optimal solution Cbest  1: Determine objective function f(x)  2: Create initial population C0  3: Generate light intensity  4: while k < maxiterate do  5: Determine attraction γ  6: for i ∈ [1, N] do  7: for j ∈ [1, N] do  8: Determine σ, β  9: if Ij > Ii then  10: Move firefly i towards j  11:  12: end if  13: Change attraction  14: Search again and modify light intensity  15: end for  16: end for  17: Determine the best solution Cbest  18: end while Algorithm 1 is explained below stepwise. Step 1: Initialize parameters, population size N, initial step factor α, initial population diversity index β0, maximum iteration number maxiterate, etc. Step 2: Construct the initial population C0, and calculate the brightness [95], sort according to the brightness, calculate the fitness I and the current global optimal solution Cbest according to the maximum fluorescence brightness I0. Step 3: Update the distance between fireflies according to formula (9), update the attraction between fireflies according to formula (7), and update the global optimal solution Cbest at the same time. Step 4: Add 1 to the number of iterations, and update the step factor according to formula (12). Step 5: If the number of iterations reaches maxiterate, the algorithm stops and outputs the current global optimal solution Cbest, otherwise, execute steps 2 to 4 in a loop. 4.2 Gravity search and biogeography hybrid algorithm BBO regards the solutions in the population as habitats, assigns a habitat suitability index (HSI) to each habitat to reflect the overall suitability, and updates the optimal solution through the population migration operation. Habitats are similar to firefly individual locations in FA [96], and the general rules used by BBO are as follows: Brightness is proportional to the HSI value of the habitat; Individuals in habitats with high HSI values migrate to habitats with low HSI values; Habitats with low HSI values attract individuals from habitats with high HSI values; Habitats face random variation among individuals. Definition 4: Habitat H. Habitat provides a solution within the search space of a numerical optimization problem. Definition 5: Habitat Suitability Index HSI. Reflect the overall suitability of the habitat. Definition 6: Suitability index variable (SIV). The HSI is influenced by additional coefficients, such as rainfall, vegetation diversity, and temperature. Definition 7: Emigration index μ. Controlling habitat migration, the probability of a species leaving a habitat is proportional to the number of species in the habitat. Definition 8: Immigrant index λ. Controlling for habitat migration, the migration index is maximized when the habitat is free of species. The BBO starts from a random population with population size N and dimension D, and each individual Hij is generated according to formula (13). (13) Among them, i = {1, 2, …, N}, j = {1, 2, … D}, aj and bj are the upper and lower bounds of the jth dimension of the solution vector respectively. To calculate HSI, sort population individuals Hk in order from good to bad, and calculate emigration index μk and immigrant index λk according to formula (14). (14) Among them, Sk denotes the number of individuals in the current population, Smax represents the number of individuals in the largest population, E represents the maximum immigrant emigration rate, and I represents the maximum immigrant immigrant rate. The larger μk is, the smaller λk is, and the higher the HSI is. The smaller μk is, the larger λk is, and the lower the HSI. In each iteration, the better solution is propagated to the worse solution. The poorer solution has a high probability of learning from the better solution. Overall, as the number of iterations increases, all solutions approach the optimal solution. Habitats with higher and lower HSIs are prone to mutation, while solutions in the middle are left untouched. The rate of variation is: (15) Among them, M is the maximum mutation rate, Pi is the species probability, and Pmax is the maximum species probability, where Pmax = N. Variation is caused by unexpected events that lead to changes in the number of species and HSI in the habitat, and the variation rate of species depends on the probability of species. When the number of species is large or small, the species probability is low and the variation rate is high; when the number of species is moderate, the species probability is high and the variation rate is low. The purpose of the mutation is to increase the diversity of the population so that the habitats with low HSI values are improved, the habitats with high HSI values are improved, and the habitats with high HSI values may change to low HSI values. The mutation is conducive to expanding the search space and jumping out of local optimum. The gravitational force F between objects and the acceleration a of the individual are respectively: (16) Among them, M1 and M2 are the mass of the object, G is the gravitational constant, R is the Euclidean distance, and M is the mass. According to GSA, the gravitational force fij between population individuals i and j and the acceleration ai of individuals are respectively: (17) Among them, Maj and Mpi represent the active gravitational mass of population individual i and the passive gravitational mass of population individual j respectively, and Mii is the inertial mass of population individual i. The inertial mass of population individuals is related to fitness. The larger the inertial mass, the greater the probability of producing an optimal solution. The mass Mi(t) of the population at time t is calculated as follows: (18) Among them, fiti(t) is the fitness value, best(t) is the optimal solution, worst(t) is the worst solution, and the calculation formula is: The solution set of the BBO algorithm is: (19) BBO avoids falling into the local optimal solution and premature algorithm through migration and mutation operations, and improves the overall stability of the population; that is, it improves the value of HSI. According to HSI, the fitness function is created as follows: (20) Update formula (18) to get: (21) Update the speed and position of the individual according to formula (17): (22) (23) The pseudocode of BBOGSA is shown in Algorithm 2, and its steps are described as follows. Algorithm 2. BBOGSA algorithm. Input: population size N, dimension D, maximum immigrant emigration rate E, maximum immigrant immigrant rate I, maximum mutation rate M, maximum number of iterations rmax Output: Optimal solution Gbest  1: Determine objective function f(x) = Cbest  2: Generate initial population C0  3: while k < rmax do  4: Determine HIS  5: for i ∈ [1, N] do  6: for j ∈ [1, N] do  7: Calculate μk, λk, M  8: if Mj > Mi  9: Move ith habitat toward jth  10:  11: end if  12: Change HIS  13: Search and modify again gravitational  14: end for  15: end for  16: Determine the optimal solution Gbest by sorting HIS  17: end while The steps of the Algorithm 2 are explained below. Step 1: Set parameters such as the initial population size N, dimension D, maximum immigrant emigration rate E, maximum immigrant immigration rate I, maximum mutation rate M, and maximum number of iterations rmax. Step 2: Construct the initial population C0, calculate the suitability index HSI, sort and update the current global optimal solution Gbest. Step 3: Calculate the migration index μk and the immigration index λk of the habitat according to the formula (14), and perform the migration operation, and perform the mutation operation according to the formula (15). Step 4: Calculate the inertial mass of each population according to formula (21), and update the individual position according to formula (23). Step 5: If the number of iterations reaches rmax, the algorithm stops and outputs Gbest, otherwise, execute steps 2 to 4 in a loop. 4.3 Hybrid optimization algorithm design FA tends to converge to the local optimal solution in the final iteration, which makes it unable to perform a proper local search. The local search ability of BBOGSA makes up for the defect of FA. Therefore, FGB is designed to combine the global search ability of FA and the local search ability of BBOGSA to improve the performance of the optimization process for finding approximate global solutions. FGB has two phases. In the first stage, the improved FA performs preliminary optimization to search the design search space by performing a limited number of iterations, and the optimal solution found in this stage is Cbest. In the second stage, a more refined search of Cbest is performed using BBOGSA algorithm for a limited number of iterations. The initial population constructed by the improved FA is randomly distributed in the whole space, while in BBOGSA, Cbest is directly transformed into the optimal initial population. The FGB process is shown in Fig 3. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. Flowchart of FGB mechanism. https://doi.org/10.1371/journal.pone.0301078.g003 The pseudocode of FGB is shown in Algorithm 3. Algorithm 3. FGB algorithm. Input: L, N, α, β0, maxiterate, D, E, I, rmax Output: Optimal solution Gbest  1: Determine objective function f(x)  2: Create initial population C0  3: Generate light intensity  4: while k < maxiterate do  5: Determine γ  6: for i ∈ [1, N] do  7: for j ∈ [1, N] do  8: Determine β, σ  9: if Ij > Ii then  10: Move ith firefly towards jth  11:  12: end if  13: Change γ  14: Determine light intensity again and modify it  15: end for  16: end for  17: Determine the optimal solution Cbest  18: end while  19: Determine objective function f(x) = Cbest  20: Create initial population C0  21: while k < rmax do  22: Determine HIS  23: for i ∈ [1, L] do  24: for j ∈ [1, L] do  25: Determine μk, λk, M  26: if Mj > Mi  27: Move ith habitat towards jth  28: Calculate  29: end if  30: Change the variable HIS  31: Modify gravitational by searching again  32: end for  33: end for  34: Determine the optimal solution Gbest by sorting HIS  35: end while 4.1 Improved firefly algorithm FA is an algorithm inspired by the flickering behavior of fireflies, which iterate their positions according to the brightness to find the optimal solution. The following rules are used: Fireflies attract one-way according to the brightness; The attraction of fireflies is proportional to the brightness; Fireflies with low brightness are attracted to fireflies with high brightness; The firefly with the highest brightness moves randomly. Definition 1: The relative fluorescence brightness I of fireflies i and j is: (5) Among them, I0 is the maximum fluorescence brightness of fireflies, β is the light intensity absorption coefficient [87,88], rij is the Euclidean distance, and the calculation formula is: (6) Among them, ci and cj represent the spatial positions of fireflies i and j, and ciw and cjw are the w-th dimension coordinates of fireflies i and j. Definition 2: Mutual attraction γ between fireflies. γ corresponds to the relative fluorescence brightness between fireflies: (7) Among them, γ0 is the maximum attractiveness. However, the convergence speed of FA is slow, and the global search lacks randomness, which may lead to convergence to a locally optimal solution [89,90]. The average distance between firefly individuals and ideal firefly individuals is used in this study to quantify population diversity and to suggest a location update technique based on population diversity. Definition 3: Diversity index βn. Reflects the diversity of the n-th generation population: (8) where s stands for population size, and denote the population’s mean center. Further adjust the position update strategy of fireflies, as shown in formula (9): (9) Among them, represents the spatial position of firefly i; α ∈ [0,1] represents the step factor; random parameter rand ∈ [0, 1]. represents the position of the brightest firefly individual in the current iteration n rounds [91–93]; ρ is a weight that changes according to βn and the number of iterations, and its calculation formula is: (10) Among them, β0 is the initial population diversity index, k is the current iteration number, σ is a linear decreasing function, and its calculation formula is: (11) Among them, maxiterate is the maximum number of iterations. According to formula (11), the initial value of σ is 1, and when k = 1 in the first iteration, the value of ρ obtained by formula (10) is negative. Move in random directions away from the optimal solution, thus enabling a wider search [94]. Fireflies will do local random searches near the ideal solution to provide a more accurate local search as the number of iterations rises and the diversity index falls. In order to prevent the algorithm from converging to the local optimal solution, such a dynamic adjustment mechanism can balance the issues of global optimization in the early stages of the algorithm and local optimization in the later stages. The fixed step size may make it difficult to reliably converge to the optimal point as the number of iterations rises since most fireflies would do local optimal searches in the vicinity of the optimal point. As a result, the step size factor is dynamically modified in the manner shown below: (12) where α is a constant value in FA. α0 represents the initial step size factor. The specific steps of firefly algorithm are shown in Algorithm 1, and its steps are described as follows. Algorithm 1. Improved firefly algorithm. Input: population size N, initial step factor α, initial population diversity index β0, maximum number of iterations maxiterate Output: optimal solution Cbest  1: Determine objective function f(x)  2: Create initial population C0  3: Generate light intensity  4: while k < maxiterate do  5: Determine attraction γ  6: for i ∈ [1, N] do  7: for j ∈ [1, N] do  8: Determine σ, β  9: if Ij > Ii then  10: Move firefly i towards j  11:  12: end if  13: Change attraction  14: Search again and modify light intensity  15: end for  16: end for  17: Determine the best solution Cbest  18: end while Algorithm 1 is explained below stepwise. Step 1: Initialize parameters, population size N, initial step factor α, initial population diversity index β0, maximum iteration number maxiterate, etc. Step 2: Construct the initial population C0, and calculate the brightness [95], sort according to the brightness, calculate the fitness I and the current global optimal solution Cbest according to the maximum fluorescence brightness I0. Step 3: Update the distance between fireflies according to formula (9), update the attraction between fireflies according to formula (7), and update the global optimal solution Cbest at the same time. Step 4: Add 1 to the number of iterations, and update the step factor according to formula (12). Step 5: If the number of iterations reaches maxiterate, the algorithm stops and outputs the current global optimal solution Cbest, otherwise, execute steps 2 to 4 in a loop. 4.2 Gravity search and biogeography hybrid algorithm BBO regards the solutions in the population as habitats, assigns a habitat suitability index (HSI) to each habitat to reflect the overall suitability, and updates the optimal solution through the population migration operation. Habitats are similar to firefly individual locations in FA [96], and the general rules used by BBO are as follows: Brightness is proportional to the HSI value of the habitat; Individuals in habitats with high HSI values migrate to habitats with low HSI values; Habitats with low HSI values attract individuals from habitats with high HSI values; Habitats face random variation among individuals. Definition 4: Habitat H. Habitat provides a solution within the search space of a numerical optimization problem. Definition 5: Habitat Suitability Index HSI. Reflect the overall suitability of the habitat. Definition 6: Suitability index variable (SIV). The HSI is influenced by additional coefficients, such as rainfall, vegetation diversity, and temperature. Definition 7: Emigration index μ. Controlling habitat migration, the probability of a species leaving a habitat is proportional to the number of species in the habitat. Definition 8: Immigrant index λ. Controlling for habitat migration, the migration index is maximized when the habitat is free of species. The BBO starts from a random population with population size N and dimension D, and each individual Hij is generated according to formula (13). (13) Among them, i = {1, 2, …, N}, j = {1, 2, … D}, aj and bj are the upper and lower bounds of the jth dimension of the solution vector respectively. To calculate HSI, sort population individuals Hk in order from good to bad, and calculate emigration index μk and immigrant index λk according to formula (14). (14) Among them, Sk denotes the number of individuals in the current population, Smax represents the number of individuals in the largest population, E represents the maximum immigrant emigration rate, and I represents the maximum immigrant immigrant rate. The larger μk is, the smaller λk is, and the higher the HSI is. The smaller μk is, the larger λk is, and the lower the HSI. In each iteration, the better solution is propagated to the worse solution. The poorer solution has a high probability of learning from the better solution. Overall, as the number of iterations increases, all solutions approach the optimal solution. Habitats with higher and lower HSIs are prone to mutation, while solutions in the middle are left untouched. The rate of variation is: (15) Among them, M is the maximum mutation rate, Pi is the species probability, and Pmax is the maximum species probability, where Pmax = N. Variation is caused by unexpected events that lead to changes in the number of species and HSI in the habitat, and the variation rate of species depends on the probability of species. When the number of species is large or small, the species probability is low and the variation rate is high; when the number of species is moderate, the species probability is high and the variation rate is low. The purpose of the mutation is to increase the diversity of the population so that the habitats with low HSI values are improved, the habitats with high HSI values are improved, and the habitats with high HSI values may change to low HSI values. The mutation is conducive to expanding the search space and jumping out of local optimum. The gravitational force F between objects and the acceleration a of the individual are respectively: (16) Among them, M1 and M2 are the mass of the object, G is the gravitational constant, R is the Euclidean distance, and M is the mass. According to GSA, the gravitational force fij between population individuals i and j and the acceleration ai of individuals are respectively: (17) Among them, Maj and Mpi represent the active gravitational mass of population individual i and the passive gravitational mass of population individual j respectively, and Mii is the inertial mass of population individual i. The inertial mass of population individuals is related to fitness. The larger the inertial mass, the greater the probability of producing an optimal solution. The mass Mi(t) of the population at time t is calculated as follows: (18) Among them, fiti(t) is the fitness value, best(t) is the optimal solution, worst(t) is the worst solution, and the calculation formula is: The solution set of the BBO algorithm is: (19) BBO avoids falling into the local optimal solution and premature algorithm through migration and mutation operations, and improves the overall stability of the population; that is, it improves the value of HSI. According to HSI, the fitness function is created as follows: (20) Update formula (18) to get: (21) Update the speed and position of the individual according to formula (17): (22) (23) The pseudocode of BBOGSA is shown in Algorithm 2, and its steps are described as follows. Algorithm 2. BBOGSA algorithm. Input: population size N, dimension D, maximum immigrant emigration rate E, maximum immigrant immigrant rate I, maximum mutation rate M, maximum number of iterations rmax Output: Optimal solution Gbest  1: Determine objective function f(x) = Cbest  2: Generate initial population C0  3: while k < rmax do  4: Determine HIS  5: for i ∈ [1, N] do  6: for j ∈ [1, N] do  7: Calculate μk, λk, M  8: if Mj > Mi  9: Move ith habitat toward jth  10:  11: end if  12: Change HIS  13: Search and modify again gravitational  14: end for  15: end for  16: Determine the optimal solution Gbest by sorting HIS  17: end while The steps of the Algorithm 2 are explained below. Step 1: Set parameters such as the initial population size N, dimension D, maximum immigrant emigration rate E, maximum immigrant immigration rate I, maximum mutation rate M, and maximum number of iterations rmax. Step 2: Construct the initial population C0, calculate the suitability index HSI, sort and update the current global optimal solution Gbest. Step 3: Calculate the migration index μk and the immigration index λk of the habitat according to the formula (14), and perform the migration operation, and perform the mutation operation according to the formula (15). Step 4: Calculate the inertial mass of each population according to formula (21), and update the individual position according to formula (23). Step 5: If the number of iterations reaches rmax, the algorithm stops and outputs Gbest, otherwise, execute steps 2 to 4 in a loop. 4.3 Hybrid optimization algorithm design FA tends to converge to the local optimal solution in the final iteration, which makes it unable to perform a proper local search. The local search ability of BBOGSA makes up for the defect of FA. Therefore, FGB is designed to combine the global search ability of FA and the local search ability of BBOGSA to improve the performance of the optimization process for finding approximate global solutions. FGB has two phases. In the first stage, the improved FA performs preliminary optimization to search the design search space by performing a limited number of iterations, and the optimal solution found in this stage is Cbest. In the second stage, a more refined search of Cbest is performed using BBOGSA algorithm for a limited number of iterations. The initial population constructed by the improved FA is randomly distributed in the whole space, while in BBOGSA, Cbest is directly transformed into the optimal initial population. The FGB process is shown in Fig 3. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. Flowchart of FGB mechanism. https://doi.org/10.1371/journal.pone.0301078.g003 The pseudocode of FGB is shown in Algorithm 3. Algorithm 3. FGB algorithm. Input: L, N, α, β0, maxiterate, D, E, I, rmax Output: Optimal solution Gbest  1: Determine objective function f(x)  2: Create initial population C0  3: Generate light intensity  4: while k < maxiterate do  5: Determine γ  6: for i ∈ [1, N] do  7: for j ∈ [1, N] do  8: Determine β, σ  9: if Ij > Ii then  10: Move ith firefly towards jth  11:  12: end if  13: Change γ  14: Determine light intensity again and modify it  15: end for  16: end for  17: Determine the optimal solution Cbest  18: end while  19: Determine objective function f(x) = Cbest  20: Create initial population C0  21: while k < rmax do  22: Determine HIS  23: for i ∈ [1, L] do  24: for j ∈ [1, L] do  25: Determine μk, λk, M  26: if Mj > Mi  27: Move ith habitat towards jth  28: Calculate  29: end if  30: Change the variable HIS  31: Modify gravitational by searching again  32: end for  33: end for  34: Determine the optimal solution Gbest by sorting HIS  35: end while 5 High entropy energy saving clustering routing algorithm The running time sequence of DHEEC is shown in Fig 4, with rounds as the execution cycle, including the start-up state and steady state. Before the first round of iteration, the base station sends flow table information and forwards it to all sensor nodes, while at the same time indicating the start. In the initial stage of a startup, SDWSN has two important functions: (1) selecting the cluster head; (2) establishing a cluster. In (1), the temporary cluster head is selected based on the threshold calculation formula, and the node information is sent to the base station through the cluster head. Then, based on the FGB, the temporary cluster head is exchanged with the members of the cluster, so that the node with the highest energy becomes the cluster head. The cluster head sends a message to the adjacent nodes; the common node selects the cluster head to join the cluster and becomes a member node in the cluster; and the cluster is formally established. The SDWSN enters the stable stage and transmits data according to inter-cluster routing. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. Running time sequence of DHEEC. https://doi.org/10.1371/journal.pone.0301078.g004 In DHEEC, entropy is used to describe the probability of a node predicting to become a cluster head, the information uncertainty of the node’s initial energy and residual energy, the smaller the entropy, the greater the residual energy of the node. Each sensor node automatically completes its own entropy selection by obtaining the initial energy and remaining energy levels. 5.1 Threshold formula Based on the assumption of the system model, the initial energy of the sensor node is randomly distributed in the interval [En0, (1 + amax)En0], so the sensor node si(i = 1, 2,…, N) has (1 + ai)En0 initial energy, where ai ∈ [0, amax]. The initial total energy Entotal of the network is shown in formula (24): (24) Definition 14: The relative energy entropy H(Eni) of the node is: (25) Among them, Eni(r) is the remaining energy of the sensor node si in k rounds, and represents the average energy of the r round network: (26) The relative energy entropy consists of three parts: the predictable number of cluster heads, the remaining energy, and the average energy, and oscillates around in the direction of the two relative energies so that a single node can automatically manage its entropy. In each round of selecting a temporary cluster head, each node evaluates the probability of becoming a cluster head and extracts a random number between 0 and 1 as the conditional probability. If it is less than the conditional probability, the node will choose itself as a temporary cluster head. The formula for cluster head selection threshold is: (27) Among them, C represents the node group that has not become the cluster head, and participates in the selection of the r-th round of cluster head according to the threshold T(n). In the last round of algorithm iteration, if si does not become the cluster head, then si ∈ C. In this way, the conditional operation based on the relative energy entropy of node energy and initial energy is more suitable for energy update in SDWSN. 5.2 Cluster head election using FGB FGB is used to identify the relative energy entropy in (23), using the following rules: Fireflies attract one-way according to brightness, that is, node energy; The attraction of fireflies is proportional to the node energy; Fireflies with low energy are attracted to fireflies with high energy; The firefly with the highest energy moves randomly. In DHEEC, fireflies with low entropy, high attractiveness, and good location will attract a large number of fireflies and the attractiveness of fireflies can be predicted by the objective function, namely relative energy entropy. If the attractive forces are balanced, the fireflies will move arbitrarily. In the algorithm, FGB is used for cluster head selection and is divided into two stages. In the first stage, the improved FA performs preliminary optimization, and the optimal solution found in this stage is Cbest; In the second stage, a more refined search of Cbest was performed using BBOGSA to find the optimal solution of is Gbest. The optimal solution is the node with the largest energy in the current iteration times. 5.3 Inter-cluster routing Sensor nodes send node location information, remaining energy information, and topology information to the base station. The node data transmission mode is shown in Table 2, where d is the distance between the node and the base station and ‘dis’ is the distance threshold, that is, the distance from the node to the cluster head. The base station calculates the network route and controls the sensor nodes. This approach reduces energy consumption and computational overhead. The flow chart of the DHEEC algorithm is shown in Fig 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Flowchart of the proposed DHEEC algorithm. https://doi.org/10.1371/journal.pone.0301078.g005 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Node data transmission method. https://doi.org/10.1371/journal.pone.0301078.t002 5.1 Threshold formula Based on the assumption of the system model, the initial energy of the sensor node is randomly distributed in the interval [En0, (1 + amax)En0], so the sensor node si(i = 1, 2,…, N) has (1 + ai)En0 initial energy, where ai ∈ [0, amax]. The initial total energy Entotal of the network is shown in formula (24): (24) Definition 14: The relative energy entropy H(Eni) of the node is: (25) Among them, Eni(r) is the remaining energy of the sensor node si in k rounds, and represents the average energy of the r round network: (26) The relative energy entropy consists of three parts: the predictable number of cluster heads, the remaining energy, and the average energy, and oscillates around in the direction of the two relative energies so that a single node can automatically manage its entropy. In each round of selecting a temporary cluster head, each node evaluates the probability of becoming a cluster head and extracts a random number between 0 and 1 as the conditional probability. If it is less than the conditional probability, the node will choose itself as a temporary cluster head. The formula for cluster head selection threshold is: (27) Among them, C represents the node group that has not become the cluster head, and participates in the selection of the r-th round of cluster head according to the threshold T(n). In the last round of algorithm iteration, if si does not become the cluster head, then si ∈ C. In this way, the conditional operation based on the relative energy entropy of node energy and initial energy is more suitable for energy update in SDWSN. 5.2 Cluster head election using FGB FGB is used to identify the relative energy entropy in (23), using the following rules: Fireflies attract one-way according to brightness, that is, node energy; The attraction of fireflies is proportional to the node energy; Fireflies with low energy are attracted to fireflies with high energy; The firefly with the highest energy moves randomly. In DHEEC, fireflies with low entropy, high attractiveness, and good location will attract a large number of fireflies and the attractiveness of fireflies can be predicted by the objective function, namely relative energy entropy. If the attractive forces are balanced, the fireflies will move arbitrarily. In the algorithm, FGB is used for cluster head selection and is divided into two stages. In the first stage, the improved FA performs preliminary optimization, and the optimal solution found in this stage is Cbest; In the second stage, a more refined search of Cbest was performed using BBOGSA to find the optimal solution of is Gbest. The optimal solution is the node with the largest energy in the current iteration times. 5.3 Inter-cluster routing Sensor nodes send node location information, remaining energy information, and topology information to the base station. The node data transmission mode is shown in Table 2, where d is the distance between the node and the base station and ‘dis’ is the distance threshold, that is, the distance from the node to the cluster head. The base station calculates the network route and controls the sensor nodes. This approach reduces energy consumption and computational overhead. The flow chart of the DHEEC algorithm is shown in Fig 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. Flowchart of the proposed DHEEC algorithm. https://doi.org/10.1371/journal.pone.0301078.g005 Download: PPT PowerPoint slide PNG larger image TIFF original image Table 2. Node data transmission method. https://doi.org/10.1371/journal.pone.0301078.t002 6 Simulation results The software used in this section is MATLAB 2018a. First, verify the convergence performance of FGB by comparing the performance of PSOGWO [22], HFPSO [17] and FGB on different test functions; Secondly, by comparing the network lifetime and data transmission volume of IFCEER [15], DEEC-FA [20] and DHEEC, the network performance of DHEEC is verified. PSO is a swarm-based meta-heuristic optimization technique that moves particles in a designated exploration area in an attempt to find the optimum solution to a given issue. Conversely, Grey Wolf Optimization (GWO) is a meta-heuristic optimization approach that draws inspiration from wolves. This article aims to enhance the GWO’s advancement by hybridizing it with a PSO approach. A metaheuristic optimization approach called Hybrid Firefly and Particle Swarm Optimization (HFPSO) combines the best aspects of particle swarm and firefly optimization. By examining the prior global best fitness values, HFPSO attempts to accurately establish when the local search process began. 6.1 Standard function test experiment The standard functions used for testing are shown in Table 3, and f1 is a unimodal function to examine the convergence speed and precision of the optimization algorithm. f2, f3, and f14 are multimodal functions, and examine the global search ability of the optimization algorithm. f5 is a discontinuous step function to examine the effectiveness of the optimization algorithm. The problem dimension is 30, and their optimal values are all 0. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Standard functions to test. https://doi.org/10.1371/journal.pone.0301078.t003 6.1.1 Parameter settings. Some parameters of the test standard function experiment are set as follows: N = 30, α = 0.2, β0 = 1, D = 3, E = 1, I = 1. The fitness changes of FGB under different maximum mutation rates and population diversity indices are shown in Fig 6. Fig 6(a) shows the fitness change of FGB when the maximum number of iterations is 20 rounds and the maximum mutation rate M is 0.05, 0.1, 0.2, 0.5 and 1 respectively. The mutation rate increases the diversity of individuals in the population, and a moderate mutation rate promotes the algorithm to quickly converge to the optimal value. Here, the maximum mutation rate is 0.1. Fig 6(b) shows the fitness changes of FGB when the population diversity index β is 0.1, 0.2 and 0.5 respectively. When the population diversity is moderate, the species probability is higher and the algorithm is more stable. At this time, the population diversity index is taken as 0.2. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Changes in the fitness of FGB under different maximum mutation rates and population diversity indices. (a) Variation with M; (b) Variation with β. https://doi.org/10.1371/journal.pone.0301078.g006 6.1.2 Results. The results of the three algorithms under the five standard functions are compared in Table 4. It can be seen from the results that FGB is slightly worse than PSOGWO on f1, but the convergence speed is faster than PSOGWO. The performance of FGB on f2 shows that its search solution range is large. FGB performs well on f3, f4 and f5, which shows its practicability, convergence speed and search ability are stronger than the other two algorithms. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Comparison of results of algorithms under five standard functions. https://doi.org/10.1371/journal.pone.0301078.t004 6.2 Network simulation experiment 6.2.1 Simulation parameter settings. Some parameters of the network simulation experiment are shown in Table 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Network simulation parameters. https://doi.org/10.1371/journal.pone.0301078.t005 6.2.2 Network life cycle. The energy of network nodes decreases as the number of iterations of the algorithm increases, and is exhausted after a certain number of iterations, resulting in the death of the node. The number of dead nodes in the network represents the life cycle of the network. The comparison of the network node life cycle of IFCEER, DEEC-FA and DHEEC is shown in Fig 7, which shows the impact of the three algorithms of IFCEER, DEEC-FA and DHEEC on the network life cycle. Fig 7(a) shows the changes in the number of dead nodes in the three algorithms of IFCEER, DEEC-FA and DHEEC when the maximum number of iterations is 5000 rounds. It can be seen that the number of death rounds of all nodes of the three algorithms of IFCEER, DEEC-FA and DHEEC is 2000, 3754 and 3568 respectively. The first node of the network dies, and the information collected by the base station is no longer comprehensive. With the operation of the algorithm, the number of dead nodes increases, and a small number of nodes that survive in the later stage have low remaining energy and lose communication capabilities. Therefore, in order to measure the life cycle of the network more comprehensively, Fig 7(b) compares the number of rounds of the first node death (first node died, FND), 10% node died rounds (10% node died, TND) and all nodes died rounds (last node died, LND). It can be seen that IFCEER only allows high-energy nodes to participate in the election of cluster heads, resulting in very close FND and LND. The FND of DEEC-FA is much smaller than the other two algorithms, and the network performance drops seriously in the early stage of the algorithm. Considering the balance of the overall energy consumption of the network, and defining TND as the network life cycle, the TND of DHEEC is about 41.05% higher than IFCEER, and about 13.89% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Comparison of network node life cycle of algorithms. (a) Number of node deaths. (b) Node death time. https://doi.org/10.1371/journal.pone.0301078.g007 6.2.3 Network data transfer volume. During the operation of the algorithm, the surviving member nodes transmit the collected data to the cluster head, and then the cluster head transmits it to the base station. After the transmission of all nodes is completed, the base station counts the number of data packets received in this round. Therefore, the total number of data packets received by the base station is used to evaluate the energy utilization rate. The more data packets received by the base station, the more balanced the energy distribution will be. The total number of data packets received by the base station is shown in Fig 8, which shows the change of the total number of data packets received by the base station after 5,000 iterations of the three algorithms of IFCEER, DEEC-FA and DHEEC. It can be concluded that the energy utilization rate of DHEEC is about 31.58% higher than that of IFCEER and about 31.06% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. The total number of packets received by the base station. https://doi.org/10.1371/journal.pone.0301078.g008 Fig 9 compared the average remaining energy of nodes of the algorithms. As can be seen that the average remaining energy of the proposed algorithm is higher than the existing algorithms which makes it superior and has longer lifetime. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Comparison of average remaining energy of nodes of the algorithms. https://doi.org/10.1371/journal.pone.0301078.g009 6.3 Statistical evaluation Fig 10 compares the control overhead of algorithms under different topology size. As can be seen from the results, the control overhead of the algorithms increases with increasing topology size. However, the overhead of the proposed method is lower than existing algorithms which validates its effectiveness. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. Control overhead comparison of algorithms under different topology size. https://doi.org/10.1371/journal.pone.0301078.g010 Fig 11 compares the end-to-end delay of the algorithms under increasing number of nodes. It can be seen from Fig 11, the delay increases with increasing number of nodes. However, the proposed method has lower delay than existing algorithms, which further validates its superior performance. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. End-to-end delay comparison of algorithms under different number of nodes. https://doi.org/10.1371/journal.pone.0301078.g011 6.4 Scalability and performance in larger networks Fig 12 evaluates the energy consumption of the network with dimension of 250 m×250 m and the number of nodes is 300. As can be seen from Fig 12, the energy consumption of the algorithms increases with increasing number of nodes. However, the proposed method consumes less energy as compared with existing algorithms which makes is energy-efficient. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Scalability evaluation under large network. https://doi.org/10.1371/journal.pone.0301078.g012 6.5 Energy efficiency analysis under different network scenario Fig 13 evaluates the energy efficiency of the algorithms under different network scenario. As can be seen from Fig 13, the energy efficiency of each component reduces with increasing data rate. However, its within the required range of operation. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 13. Energy efficiency analysis of each component. https://doi.org/10.1371/journal.pone.0301078.g013 6.6 Impact on running time and computational resources Fig 14 compares the running time of network of algorithms under increasing number of iterations. As can be seen from Fig 14, the network lifetime of the algorithms decreases with increasing number of iterations. However, the running time of the proposed algorithm is longer than existing methods which makes is reliable and require less computational resources. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 14. Network running time comparison of algorithms. https://doi.org/10.1371/journal.pone.0301078.g014 6.7 Robustness to network dynamics Fig 15 compares the robustness of the algorithms when the mobile nodes move at different speed. As can be seen from Fig 15a, when the number of nodes increases, the communication delay increases. The communication delay of the proposed algorithm is lower than existing methods. From Fig 15b, the mobile node speed is 5.5 m/s and as the number of nodes increases, the communication delay at this speed is larger than at speed of 1.8 m/s. In both scenarios, the proposed method has lower communication delay which proved its effectiveness. This proves that, the proposed method is robust to dynamic network environment and with varying data traffic. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 15. Communication delay evaluation at different node mobility. (a) 1.8 m/s. (b) 5.5 m/s. https://doi.org/10.1371/journal.pone.0301078.g015 6.8 Convergence of algorithm Fig 16 illustrates the convergence of the proposed FGB algorithm under increasing number of iterations. As can be seen from Fig 16, the algorithm converges to local minimum that indicates its effectiveness. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 16. Convergence of algorithm. https://doi.org/10.1371/journal.pone.0301078.g016 6.9 Complexity analysis Fig 17 compares the computational complexity in terms of computing time of the proposed and existing algorithms with increasing number of iterations. As can be seen from Fig 17, the complexity of the proposed algorithm is lower than existing algorithms which makes is computationally efficient and easy to implement. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 17. Computational complexity evaluation. https://doi.org/10.1371/journal.pone.0301078.g017 6.1 Standard function test experiment The standard functions used for testing are shown in Table 3, and f1 is a unimodal function to examine the convergence speed and precision of the optimization algorithm. f2, f3, and f14 are multimodal functions, and examine the global search ability of the optimization algorithm. f5 is a discontinuous step function to examine the effectiveness of the optimization algorithm. The problem dimension is 30, and their optimal values are all 0. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 3. Standard functions to test. https://doi.org/10.1371/journal.pone.0301078.t003 6.1.1 Parameter settings. Some parameters of the test standard function experiment are set as follows: N = 30, α = 0.2, β0 = 1, D = 3, E = 1, I = 1. The fitness changes of FGB under different maximum mutation rates and population diversity indices are shown in Fig 6. Fig 6(a) shows the fitness change of FGB when the maximum number of iterations is 20 rounds and the maximum mutation rate M is 0.05, 0.1, 0.2, 0.5 and 1 respectively. The mutation rate increases the diversity of individuals in the population, and a moderate mutation rate promotes the algorithm to quickly converge to the optimal value. Here, the maximum mutation rate is 0.1. Fig 6(b) shows the fitness changes of FGB when the population diversity index β is 0.1, 0.2 and 0.5 respectively. When the population diversity is moderate, the species probability is higher and the algorithm is more stable. At this time, the population diversity index is taken as 0.2. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Changes in the fitness of FGB under different maximum mutation rates and population diversity indices. (a) Variation with M; (b) Variation with β. https://doi.org/10.1371/journal.pone.0301078.g006 6.1.2 Results. The results of the three algorithms under the five standard functions are compared in Table 4. It can be seen from the results that FGB is slightly worse than PSOGWO on f1, but the convergence speed is faster than PSOGWO. The performance of FGB on f2 shows that its search solution range is large. FGB performs well on f3, f4 and f5, which shows its practicability, convergence speed and search ability are stronger than the other two algorithms. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Comparison of results of algorithms under five standard functions. https://doi.org/10.1371/journal.pone.0301078.t004 6.1.1 Parameter settings. Some parameters of the test standard function experiment are set as follows: N = 30, α = 0.2, β0 = 1, D = 3, E = 1, I = 1. The fitness changes of FGB under different maximum mutation rates and population diversity indices are shown in Fig 6. Fig 6(a) shows the fitness change of FGB when the maximum number of iterations is 20 rounds and the maximum mutation rate M is 0.05, 0.1, 0.2, 0.5 and 1 respectively. The mutation rate increases the diversity of individuals in the population, and a moderate mutation rate promotes the algorithm to quickly converge to the optimal value. Here, the maximum mutation rate is 0.1. Fig 6(b) shows the fitness changes of FGB when the population diversity index β is 0.1, 0.2 and 0.5 respectively. When the population diversity is moderate, the species probability is higher and the algorithm is more stable. At this time, the population diversity index is taken as 0.2. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. Changes in the fitness of FGB under different maximum mutation rates and population diversity indices. (a) Variation with M; (b) Variation with β. https://doi.org/10.1371/journal.pone.0301078.g006 6.1.2 Results. The results of the three algorithms under the five standard functions are compared in Table 4. It can be seen from the results that FGB is slightly worse than PSOGWO on f1, but the convergence speed is faster than PSOGWO. The performance of FGB on f2 shows that its search solution range is large. FGB performs well on f3, f4 and f5, which shows its practicability, convergence speed and search ability are stronger than the other two algorithms. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 4. Comparison of results of algorithms under five standard functions. https://doi.org/10.1371/journal.pone.0301078.t004 6.2 Network simulation experiment 6.2.1 Simulation parameter settings. Some parameters of the network simulation experiment are shown in Table 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Network simulation parameters. https://doi.org/10.1371/journal.pone.0301078.t005 6.2.2 Network life cycle. The energy of network nodes decreases as the number of iterations of the algorithm increases, and is exhausted after a certain number of iterations, resulting in the death of the node. The number of dead nodes in the network represents the life cycle of the network. The comparison of the network node life cycle of IFCEER, DEEC-FA and DHEEC is shown in Fig 7, which shows the impact of the three algorithms of IFCEER, DEEC-FA and DHEEC on the network life cycle. Fig 7(a) shows the changes in the number of dead nodes in the three algorithms of IFCEER, DEEC-FA and DHEEC when the maximum number of iterations is 5000 rounds. It can be seen that the number of death rounds of all nodes of the three algorithms of IFCEER, DEEC-FA and DHEEC is 2000, 3754 and 3568 respectively. The first node of the network dies, and the information collected by the base station is no longer comprehensive. With the operation of the algorithm, the number of dead nodes increases, and a small number of nodes that survive in the later stage have low remaining energy and lose communication capabilities. Therefore, in order to measure the life cycle of the network more comprehensively, Fig 7(b) compares the number of rounds of the first node death (first node died, FND), 10% node died rounds (10% node died, TND) and all nodes died rounds (last node died, LND). It can be seen that IFCEER only allows high-energy nodes to participate in the election of cluster heads, resulting in very close FND and LND. The FND of DEEC-FA is much smaller than the other two algorithms, and the network performance drops seriously in the early stage of the algorithm. Considering the balance of the overall energy consumption of the network, and defining TND as the network life cycle, the TND of DHEEC is about 41.05% higher than IFCEER, and about 13.89% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Comparison of network node life cycle of algorithms. (a) Number of node deaths. (b) Node death time. https://doi.org/10.1371/journal.pone.0301078.g007 6.2.3 Network data transfer volume. During the operation of the algorithm, the surviving member nodes transmit the collected data to the cluster head, and then the cluster head transmits it to the base station. After the transmission of all nodes is completed, the base station counts the number of data packets received in this round. Therefore, the total number of data packets received by the base station is used to evaluate the energy utilization rate. The more data packets received by the base station, the more balanced the energy distribution will be. The total number of data packets received by the base station is shown in Fig 8, which shows the change of the total number of data packets received by the base station after 5,000 iterations of the three algorithms of IFCEER, DEEC-FA and DHEEC. It can be concluded that the energy utilization rate of DHEEC is about 31.58% higher than that of IFCEER and about 31.06% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. The total number of packets received by the base station. https://doi.org/10.1371/journal.pone.0301078.g008 Fig 9 compared the average remaining energy of nodes of the algorithms. As can be seen that the average remaining energy of the proposed algorithm is higher than the existing algorithms which makes it superior and has longer lifetime. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Comparison of average remaining energy of nodes of the algorithms. https://doi.org/10.1371/journal.pone.0301078.g009 6.2.1 Simulation parameter settings. Some parameters of the network simulation experiment are shown in Table 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 5. Network simulation parameters. https://doi.org/10.1371/journal.pone.0301078.t005 6.2.2 Network life cycle. The energy of network nodes decreases as the number of iterations of the algorithm increases, and is exhausted after a certain number of iterations, resulting in the death of the node. The number of dead nodes in the network represents the life cycle of the network. The comparison of the network node life cycle of IFCEER, DEEC-FA and DHEEC is shown in Fig 7, which shows the impact of the three algorithms of IFCEER, DEEC-FA and DHEEC on the network life cycle. Fig 7(a) shows the changes in the number of dead nodes in the three algorithms of IFCEER, DEEC-FA and DHEEC when the maximum number of iterations is 5000 rounds. It can be seen that the number of death rounds of all nodes of the three algorithms of IFCEER, DEEC-FA and DHEEC is 2000, 3754 and 3568 respectively. The first node of the network dies, and the information collected by the base station is no longer comprehensive. With the operation of the algorithm, the number of dead nodes increases, and a small number of nodes that survive in the later stage have low remaining energy and lose communication capabilities. Therefore, in order to measure the life cycle of the network more comprehensively, Fig 7(b) compares the number of rounds of the first node death (first node died, FND), 10% node died rounds (10% node died, TND) and all nodes died rounds (last node died, LND). It can be seen that IFCEER only allows high-energy nodes to participate in the election of cluster heads, resulting in very close FND and LND. The FND of DEEC-FA is much smaller than the other two algorithms, and the network performance drops seriously in the early stage of the algorithm. Considering the balance of the overall energy consumption of the network, and defining TND as the network life cycle, the TND of DHEEC is about 41.05% higher than IFCEER, and about 13.89% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. Comparison of network node life cycle of algorithms. (a) Number of node deaths. (b) Node death time. https://doi.org/10.1371/journal.pone.0301078.g007 6.2.3 Network data transfer volume. During the operation of the algorithm, the surviving member nodes transmit the collected data to the cluster head, and then the cluster head transmits it to the base station. After the transmission of all nodes is completed, the base station counts the number of data packets received in this round. Therefore, the total number of data packets received by the base station is used to evaluate the energy utilization rate. The more data packets received by the base station, the more balanced the energy distribution will be. The total number of data packets received by the base station is shown in Fig 8, which shows the change of the total number of data packets received by the base station after 5,000 iterations of the three algorithms of IFCEER, DEEC-FA and DHEEC. It can be concluded that the energy utilization rate of DHEEC is about 31.58% higher than that of IFCEER and about 31.06% higher than that of DEEC-FA. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. The total number of packets received by the base station. https://doi.org/10.1371/journal.pone.0301078.g008 Fig 9 compared the average remaining energy of nodes of the algorithms. As can be seen that the average remaining energy of the proposed algorithm is higher than the existing algorithms which makes it superior and has longer lifetime. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. Comparison of average remaining energy of nodes of the algorithms. https://doi.org/10.1371/journal.pone.0301078.g009 6.3 Statistical evaluation Fig 10 compares the control overhead of algorithms under different topology size. As can be seen from the results, the control overhead of the algorithms increases with increasing topology size. However, the overhead of the proposed method is lower than existing algorithms which validates its effectiveness. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. Control overhead comparison of algorithms under different topology size. https://doi.org/10.1371/journal.pone.0301078.g010 Fig 11 compares the end-to-end delay of the algorithms under increasing number of nodes. It can be seen from Fig 11, the delay increases with increasing number of nodes. However, the proposed method has lower delay than existing algorithms, which further validates its superior performance. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. End-to-end delay comparison of algorithms under different number of nodes. https://doi.org/10.1371/journal.pone.0301078.g011 6.4 Scalability and performance in larger networks Fig 12 evaluates the energy consumption of the network with dimension of 250 m×250 m and the number of nodes is 300. As can be seen from Fig 12, the energy consumption of the algorithms increases with increasing number of nodes. However, the proposed method consumes less energy as compared with existing algorithms which makes is energy-efficient. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Scalability evaluation under large network. https://doi.org/10.1371/journal.pone.0301078.g012 6.5 Energy efficiency analysis under different network scenario Fig 13 evaluates the energy efficiency of the algorithms under different network scenario. As can be seen from Fig 13, the energy efficiency of each component reduces with increasing data rate. However, its within the required range of operation. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 13. Energy efficiency analysis of each component. https://doi.org/10.1371/journal.pone.0301078.g013 6.6 Impact on running time and computational resources Fig 14 compares the running time of network of algorithms under increasing number of iterations. As can be seen from Fig 14, the network lifetime of the algorithms decreases with increasing number of iterations. However, the running time of the proposed algorithm is longer than existing methods which makes is reliable and require less computational resources. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 14. Network running time comparison of algorithms. https://doi.org/10.1371/journal.pone.0301078.g014 6.7 Robustness to network dynamics Fig 15 compares the robustness of the algorithms when the mobile nodes move at different speed. As can be seen from Fig 15a, when the number of nodes increases, the communication delay increases. The communication delay of the proposed algorithm is lower than existing methods. From Fig 15b, the mobile node speed is 5.5 m/s and as the number of nodes increases, the communication delay at this speed is larger than at speed of 1.8 m/s. In both scenarios, the proposed method has lower communication delay which proved its effectiveness. This proves that, the proposed method is robust to dynamic network environment and with varying data traffic. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 15. Communication delay evaluation at different node mobility. (a) 1.8 m/s. (b) 5.5 m/s. https://doi.org/10.1371/journal.pone.0301078.g015 6.8 Convergence of algorithm Fig 16 illustrates the convergence of the proposed FGB algorithm under increasing number of iterations. As can be seen from Fig 16, the algorithm converges to local minimum that indicates its effectiveness. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 16. Convergence of algorithm. https://doi.org/10.1371/journal.pone.0301078.g016 6.9 Complexity analysis Fig 17 compares the computational complexity in terms of computing time of the proposed and existing algorithms with increasing number of iterations. As can be seen from Fig 17, the complexity of the proposed algorithm is lower than existing algorithms which makes is computationally efficient and easy to implement. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 17. Computational complexity evaluation. https://doi.org/10.1371/journal.pone.0301078.g017 7 Conclusion and future work The clustering routing technique for SDWSN is examined in this work. A hybrid optimization algorithm that combines the global optimization capabilities of FA with the local optimization capabilities of BBOGSA is developed with the goal of enhancing the performance of the optimization process for locating an approximate global solution. To hasten the rotation of cluster heads, a distributed high-efficiency entropy energy-saving clustering routing method is developed. The hybrid optimization method is compared with comparable algorithms in terms of convergence accuracy, running time, and stability through experimental simulation and analysis to demonstrate its optimization performance. To demonstrate how the distributed high-efficiency entropy energy-saving clustering routing algorithm may increase network longevity and decrease data transmission energy consumption, it is compared with comparable methods. The limitations of the proposed study are as follows that will be considered as next research. To increase the security of SDWSN, the following phase of development will look at creating a DDoS assault detection and defense system. It will employ an architecture that carries out multi-level DDoS mitigation in the data forwarding layer, first-level DDoS detection in the edge layer, second-level DDoS detection in the control layer, and clustering in the device layer. This approach will be more scalable, energy-efficient and improved. TI - An intelligent algorithm for energy efficiency optimization in software-defined wireless sensor networks for 5G communications JF - PLoS ONE DO - 10.1371/journal.pone.0301078 DA - 2024-06-20 UR - https://www.deepdyve.com/lp/public-library-of-science-plos-journal/an-intelligent-algorithm-for-energy-efficiency-optimization-in-7X5oQQ38ID SP - e0301078 VL - 19 IS - 6 DP - DeepDyve ER -