A hybrid-strategy-improved butterﬂy optimization algorithm applied to the node coverage problem of wireless sensor networks

: To increase the node coverage of wireless sensor networks (WSN) more eﬀectively, in this paper, we propose a hybrid-strategy-improved butterﬂy optimization algorithm (H-BOA). First, we introduce Kent chaotic map to initialize the population to ensure a more uniform search space. Second, a new inertial weight modiﬁed from the Sigmoid function is introduced to balance the global and local search capacities. Third, we comprehensively use elite-fusion and elite-oriented local mutation strategies to raise the population diversity. Then, we introduce a perturbation based on the standard normal distribution to reduce the possibility of the algorithm falling into premature. Finally, the simulated annealing process is introduced to evaluate the solution’s quality and improve the algorithm’s ability, which is helpful to jump out of the local optimal value. Through numerous experiments of the international benchmark functions, the results show the performance of H-BOA has been signiﬁcantly raised. We apply it to the WSN nodes coverage problem. The results show that H-BOA improves the WSN maximum coverage and it is far more than other optimization algorithms.


Introduction
Wireless sensor networks (WSN) are widely used in the automation, production, transport, healthcare, and agricultural fields [1][2][3]. As one core technology in the area of the Internet, wireless sensor networks are composed of multiple sensors in different ways to complete signal collection, signal transmission, data processing, and other operations [4][5][6]. WSN coverage problem is one of the basic problems in sensor networks [7,8]. Coverage capability is a criterion for evaluating the monitoring capability of WSN to a monitoring area, that is, how to deploy nodes to reach the maximum networks coverage, so as to improve the stability and effectiveness of information transmission.
Much work has been done to improve the maximum coverage of WSN. Yang et al. [9] improve the traditional centroid location algorithm, design a weighting strategy according to the reference anchor node and raise the location accuracy through multiple weights. From the view of repairing coverage gaps, based on graph theory and geometric calculation, Lu et al. [10] propose a Voronoi polygon strategy to repair local gaps for higher coverage. Based on game theory, Hajjej et al. [11] propose a new topology control method using reinforcement learning (RL) to repair coverage holes in a distributed way, so as to repair coverage vulnerabilities more effectively.
In recent years, an increasing number of scholars have consistently tried to apply intelligent algorithms to solve the WSN coverage problem [12] and have obtained specific results [13]. Kannan et al. [14] introduce the simulated annealing (SA) into the positioning research of wireless sensor networks. The algorithm has strong global optimization ability and robustness by jumping out of local optimal solution with a certain probability. However, the simulated annealing relies excessively on the parameters setting, which leads to the plight that better solution and search time cannot have both Kulkarni et al. [15] introduce particle swarm optimization (PSO) to improve node deployment and data fusion tasks. There is still a disadvantage that it is easy to fall into local optimum. Thus, the classical evolutionary computation cannot meet the needs of the problem. ZainEldin et al. [16] propose a novel improved dynamic deployment technique based-on genetic algorithm (IDDT-GA) to solve this problem. Similarly, aiming at how to minimize the number of nodes and maximize the coverage at the same time, Rebai et al. [17] construct an integer programming model and a special genetic algorithm (GA) is proposed for this model. Shivalingegowda et al. [18] introduce a new algorithm called hybrid gravitational search algorithm with social ski-driver (GSA-SSD). It proves that the hybrid algorithm model has certain advantages in the application of wireless sensor networks. Binh et al. [19] optimize several metaheuristic algorithms for WSN coverage in restricted areas with obstacles. Raj Priyadarshini et al. [20] extend the problem to underwater environment and proposed an energy prediction algorithm based on Markov chain Monte Carlo (MCMC) process for underwater acoustic WSN to reduce coverage vulnerabilities. Khalaf et al. [21] introduce a coverage optimization method for WSN based on the bee algorithm (BA) and compare with the genetic algorithm (GA), the results show BA can spend less time and use less resources to achieve higher coverage. Wang et al. [22] propose a Virtual Force Algorithm-Lévy-Embedded Grey Wolf Optimization (VFLGWO) to solve the WSN coverage problem. The results under different nodes and different monitoring area are discussed respectively in this paper. Feng et al. [23] combine K-means algorithm with artificial fish swarm algorithm, so that a WSN clustering method is proposed, which has better performance compared with traditional methods.
Arora et al. [24] propose a node location scheme using a natural heuristic meta-heuristic algorithm called butterfly optimization algorithm (BOA), which is simulated on sensor networks of different scales and compared to the performance of PSO and firefly algorithm (FA). The results show that BOA can obtain more accurate and stable node positioning. However, I think this work is still not perfect, because the butterfly algorithm has the disadvantages of low optimization accuracy and easy to fall into local optimization. Therefore, a series of work has down to improve the butterfly optimization algorithm and make BOA better with hybrid strategies. Arora et al. [24] combine the artificial bee colony algorithm (ABC) with the butterfly optimization algorithm and add the Lévy flights strategy to the butterfly optimization algorithm, so that a BOA/ABC algorithm is proposed. When the search phase of BOA is completed, the ABC algorithm start to explore in the search space. To some extent, it speeds up the convergence speed and widens the search space. The core idea of hybrid strategy still lies in accelerating convergence speed and jumping out of local optimization. Utama et al. [25] propose a new hybrid butterfly optimization algorithm for solving green vehicle routing problem (G-VRP). This algorithm is discretized by LRV method and applied to solve discrete optimization problems. By combining the tabu search (TS) algorithm and local search swap and flip strategies, the algorithm gradually approaches the global optimum by continuously flipping and exchanging nodes. Although it can solve the G-VRP well, it still has high time complexity and needs a lot of computing time than BOA. To overcome the problems faced by classical evolutionary computation. Our contributions lie in two aspects: 1) We make a new attempt to integrate five different improvement strategies with BOA, which help to accelerate the convergence speed and improve the optimization accuracy while ensuring the calculation time. We introduce Kent chaotic map in the initialization stage, improve the local search and mutation strategy of butterflies, construct a new inertia weight factor, and propose a simple simulated annealing process based on Standard normal distribution disturbance and Metropolis criterion, which gives full play to the advantages of meta heuristic algorithm.
2) The time complexity, convergence and asymptotic of the algorithm are analyzed in this paper. Through simulation test, the results show the hybrid strategies perform well.

WSN coverage optimization model
In this paper, we use Boolean perception model to research the problem. There is a set of sensor nodes S = { , i = 1,2,3, ⋯ } in a 2D monitoring area of size L × . Each node takes ( , ) as the center of a circle and takes R as the radius. Suppose the monitoring area which is to be covered is discretized into L × pixels, if the target pixel is within the sensor node coverage radius, it is successfully covered. The position of pixel can be expressed as , , so the distance can be expressed as when the pixel is within the radius of the nodes, is covered successfully. So, we can get the probability which the pixel is covered successfully, as shown in Eq (2.2).
In particular, the target point only needs to be covered by any node in = { , = 1,2,3, ⋯ }, then the information of this pixel can be detected. The joint perception probability of target point is In Eq (2.3), if is out of the range of any node in , then ∏ [1 − ( , )] = 1. So ( , ) = 0, that is, this pixel is out of WSN coverage range. If is in the range of any node in , then ( , ) = 1, ∏ 1 − , = 0, so ( , ) = 1, that is, the pixel is perceived by . We use coverage rate to express the monitoring ability of sensor nodes. The formula of coverage rate is the ratio of sensor nodes coverage monitoring area to the whole area , which can be expressed by Eq (2.4).
We take Eq (2.4) as the objective function. We give a simple example to illustrate the problem vividly, as shown in Figure 1. Assume that the nodes deployment scheme is shown as the figure, the shaded areas represent covered areas and white areas represent uncovered areas. Only one pixel is not covered so the coverage area of sensor nodes = 35. The number of sensor nodes is 8 and the monitoring area

Butterfly optimization algorithm
The butterfly optimization algorithm (BOA) [26] based on the butterfly foraging behavior, was first proposed by Professor Arora et al. in 2018. In nature, butterflies use multiple sensory organs to find food, such as vision, touch, etc. The most important one is the smell. In BOA, each butterfly can emit a certain concentration of fragrance and smell the fragrance nearby. The butterfly moves towards the most fragrant direction. This phase is known as the global search phase. Suppose one butterfly cannot smell the fragrance from other butterflies. It will move randomly. This phase is known as the local search phase. For the above behaviors, we make a range of assumptions as follows: a) All the butterflies can disseminate a particular concentration of fragrance. b) Each butterfly moves only at random or towards the direction of the highest concentration. c) The intensity of the stimulus is only affected by the objective function. d) The butterfly controls the local search and the global search by switching the probability .
The fragrance concentration is closely related to the population's fitness, and related to the following three factors: stimulus intensity , perceived form , and power index . The relationship among them can be expressed as In the population iteration process, for butterflies moving through search space, the first thing to do is to calculate the fitness of all butterflies and then calculate the fragrance that the group produced at that location through Eq (3.2).
where is the location for th butterfly in iteration + 1, is the location for th butterfly in iteration .Here * represents the current best location among all the locations in the current stage. The fragrance of th butterfly is represented by . , a random number in [0, 1]. The local search phase can be expressed as Eq (3.3).
where and are the random butterflies in the solution space from the current population. , is a random number in [0, 1]. Based on the above description, the process of BOA is as follows: Step 1: Set each parameter and initialize the population position.
Step 2: Calculate fitness function and find the best population.
Step 5: Judge whether butterfly exceeds the search boundary and do boundary treatment.
Step 6: Calculate the fitness of the new population in Step 3 or Step 4, and if it is better than the current solution, update the global optimal solution and the global optimal fitness.
Step 7: If the algorithm meets the maximum iteration, jump out of the program, else jump to Step3.

Kent chaotic map initialization mechanism
Like other classical evolutionary computation algorithms, BOA randomly initializes population, which may cause population unequally distribution at the initial stage. It will enormously affect the speed of searching. Chaotic map is one of the methods to solve this problem. In this paper, we choose Kent chaotic map, which can improve the search speed and increase population diversity.
Chaos phenomenon is one of the main manifestations of complex dynamics of non-linear dynamic mapping, which has great randomness, non-periodicity and other characteristics. So, it is widely used by scholars in the fields of information security, communication encryption and control theory [27][28][29].
In the field of evolutionary computation, chaotic mapping is often used to replace random number generator to initialize population [30][31][32].
Logistic chaotic map [33] is a commonly used chaotic map model, which is famous for its simple structure. However, it has a natural disadvantage, that is, it depends too much on the setting of parameters and initial values [34]. Because the chaotic interval is limited and the output chaotic sequence values are not uniformly distributed, the effect is still not ideal when the model is in a full mapping state. Kent chaotic map [35] is designed by which combines the advantages of simple structure and uniform distribution of sequence values.
As shown in Figures 2 and 3, when iterating 200 times, there is still a part of the value aggregation extremes under the Logistic chaotic map model compared with the Kent map. To show the advantages of Kent map more clearly, we iterate 1000 times to get the value distribution of the Logistic map and the Kent map as shown in Figure 4, where the X-axis represents the range of values generated, the Yaxis represents the type of chaotic model, and the Z-axis represents the frequency of sequence values generated by the chaotic model in the relevant range.
It is clear from the graph that the Kent chaotic map has better randomness and chaotic characteristics than Logistic chaotic map. So, it can utilize as much information as possible in the solution space.

A new inertial weight strategy
BOA is similar to other heuristic swarm intelligence algorithms, facing the balance of the capacities between the global and the local search. A host of scholars use the inertial weight strategy, including linearity weight and nonlinearity weight to solve this problem. Both linearity and nonlinearity weight strategies have been widely used in the improvement of intelligent algorithms.
We consider a better balance between linearity and nonlinearity of Sigmoid function [36], mathematical description of Sigmoid function is shown as Eq (4.2).
We design a new inertial weight based on the Sigmoid function. Inspired by the Paper [37], we add a self-adaptive property to make population search more flexible. The new function is shown as follows where ∈ [0, 1], is the current iteration number, M is the maximum iteration number. At the beginning of the iteration, the weight is relatively large. The weight is slowly reduced as the number of iterations increases, which is expected to search in the most extensive possible range. In the middle of the iteration, the weight reduces at a relatively rapid rate to ensure a faster search speed. In the later iteration, the weight slowly decreases so that the local search ability increases, and it gradually approaches the global optimal solution within the solution space. The weight evolution curve depicts as Figure 5.

Elite-fusion and elite-oriented local mutation strategy
In the local search phase of BOA, when a butterfly cannot feel the fragrance of the best butterfly, it can only move towards the butterfly nearby. At this time, the blindness of population limits the search range to some extent, which would lead individuals to fall into the local optimum. In order to enhance the ability of local search, in this paper, we draw on the idea of genetic algorithm (GA) [38] and differential evolution (DE) [39], propose elite-fusion mutation and elite-oriented mutation strategies, which enlarge the population on the one hand and reduce the possibility of algorithm falling into the local optimum at the end of the iteration on the other hand. Equation (4.5), which is modified from Eq (3.3) described as follows:

Disturbance with standard normal distribution and simulated annealing
In the search process, H-BOA relies on the information of elite butterflies, so the direction of elite butterflies, that is, the direction with the strongest fragrance, is very important. Normal distribution disturbance is a way of random disturbance term, which is usually used in optimization problem [40,41]. In nature, normal distribution is one of the objective laws of nature. Introducing positive distribution to disturb the population is in line with the objective law of swarm intelligence algorithm. Therefore, adding a normal distribution disturbance term to the new location individuals generated in the search stage will not destroy the search law and expand the search space to a certain extent.
Simulated annealing (SA) is a heuristic algorithm proposed by Professor Metropolis in 1953. It is based on the principle of solid annealing [42]. The most commonly used is the Metropolis criterion, which says that the algorithm dynamically generates a probability to determine whether to accept an inferior solution at each iteration.so it will help the algorithm jump out of the local optimum effectively. This shows excellent global optimization.
If the complete simulated annealing algorithm is combined with BOA, it will increase the time complexity of the algorithm and reduce the convergence speed of the algorithm. Therefore, we adopt the core idea of Metropolis criterion to help the algorithm jump out of the local optimal solution while ensuring the convergence speed. In this paper, the initial solution of the simulated annealing process is the population after the search stage. We add the population subject to the disturbance of standard normal distribution to replace the process of generating random solutions in the simulated annealing process, as well as combining it with the simulated annealing process. The new solution is explored around the optimal individual through Metropolis criterion, so the population can make full use of the characteristic information reflected by the best butterfly and guide the whole group to evolve towards the optimal solution. At the same time, it has the ability to jump out of the local optimum and great convergence speed. It can constantly modify and refine the evolution direction.
Assume that is the current temperature, is the initial temperature, the maximum number of iterations is , and the current iteration is . We parallel it to the search phase. The flow chart of this stage is shown in Figure 6.

The Pseudocode of H-BOA
Based on the above description, the Pseudocode of H-BOA can be described as follows:

Algorithm complexity analysis
Time complexity of an algorithm is one of the criteria for evaluating the performance of an algorithm. In BOA, assume that the number of populations is , the objective function is f(x), and the dimension is n. According to the analysis of BOA, the time complexity of BOA is O(n + f(n)).
For H-BOA, in the initial population phase, assume the time for initializing each parameter is , the time for initializing the population position using Kent chaotic map is , the time for calculating fitness according to the population position is ( ), and the time to save the current optimal solution is , so the total time complexity in this phase is ( ( + + ( ) + ) = ( + ( )).
When entering the iteration, assume the time for updating new inertia weight is . The time to calculate the individual fragrance concentration is . 1) Global search phase: Assume that the time used to update each dimension of the butterfly position is according to Eq (4.4), the time to calculate the fitness of the new population is ( ), the time to compare the fitness of the latest and old butterfly is . Then the total time complexity of the global search phase is ( ( + + + + ( )) = ( + ( )).
2) Local search phase: The population uses two mutation methods to perform local wandering. The time to generate a random number p c is , the time used to update each dimension of the butterfly is and according to Eqs (4.5) and (4.6), the time to calculate new population fitness is f(n). The time for comparing and replacing the fitness of the old and new population is the same as that of the global search phase, which is . Then the total time complexity of this stage is ( ( + + ( + + ) + ( ))) = ( + ( )).
Standard normal disturbance and simulated annealing stage: Assume that the time to generate a normal distribution of random numbers is , the time used to calculate each dimension of the butterfly after disturbance is , the fitness of the new population is calculated as ( ) and the time complexity of the simulated annealing stage is ( ), then the total time complexity of this stage is ( ( + ) + ( )) + ( ) = ( + ( )).
Record the optimal solution stage: Assume that the comparison time of each butterfly's fitness with the current optimal solution is and the time to replace the new solution in the simulated annealing phase is .so the total time complexity of this stage is ( ( + )) = ( ).
Therefore, the total time complexity of H-BOA is ( + ( )), which does not increase the extra time complexity compared with BOA.
The space complexity is mainly affected by dimensionality and population size, so the space complexity of the two algorithms is ( ).

Asymptotic analysis and convergence analysis of the algorithm
In this section, we analyze the asymptotic and convergence of H-BOA. In addition, the definitions and theorems are provided. Definition 1. The objective function : → is a continuous function on the non-empty feasible region and there is an optimal solution set Ω = { * | * ∈ , ( * ) < } in , δ is an acceptable fitness. Theorem 1. H-BOA has progressive fitness. Assume that the optimal butterfly position found in the th is * , the non-negative random process generated by H-BOA is { |= ( * ) − ( * ), 1 ≤ ≤ }. When ( * ) > ( * ), there is a normal number , which makes ( ) ≤ ( ) − . Then we can say the optimization algorithm has progressive fitness [43].
Proof. According to the analysis in Section 4.4, the new solution generated by normal distribution disturbance and simulated annealing process is not necessarily closer to the global optimal solution, but the previous optimal position will be recorded during optimization, that is, the original better position will not be covered. Therefore, the distance between the new solution and the global optimal solution will not increase after annealing, that is, the direction of population evolution is monotonous.
Because the core purpose of H-BOA is to find the most fragrant butterfly so that ( ( * ) − So, the algorithm has progressive fitness.
In the next step, we will analyze the convergence of H-BOA and the definitions and theorems are provided [44,45]. Definition 2. There is a set of random sequences ( = 1, 2,· · · ) in the probability space, if there is a random variable when any > 0 is satisfied, it makes or the following equation is qualified, namely Then the random sequence { } is said to converge to Random variable ε with probability 1.
According to the relevant knowledge of the infinite series, we can get Finally, it can be seen that ( ( ) converges to * with probability 1 from Definition 2.

Simulation experiment environment
The experimental environment is Windows10, 64-bit operating system, CPU is Intel Core i510400H, main frequency is 3.2 GHz, memory is 8 G, and the algorithm is based on MATLAB2020b.

International benchmark function test
To verify the performance of H-BOA, we select ten international benchmark functions shown in Table 2, where , , , , , are unimodal functions, , , , are multimodal functions. We compared H-BOA with particle swarm optimization (PSO), BOA, a new inertia weight proposed in Section 4.2 improved butterfly optimization algorithm (IBOA) and butterfly optimization algorithm of Cauchy mutation and adaptive weight optimization (CWBOA) [46]. To keep the fairness and objectivity, the initial population size is all uniformly set to 30, the number of iterations is set to 500, and the part of parameters are the same as those in CWBOA. To reduce the randomness, we conducted 30 experiments and took the average and standard. The specific algorithm parameter settings are shown in Table 1. The data of CWBOA is directly derived from the paper [46].

Experimental results and analysis
To measure the convergence and accuracy of H-BOA, Table 3 shows the optimization results of the five algorithms on the test functions. "-" represents the test function is not included in the original paper. Figure 7 shows the iterative convergence curves of the four algorithms where the X-axis represents the number of iterations and the Y-axis represents the fitness. Table 3. Function optimization results.
It can be seen from Table 3 that H-BOA has found the optimal function value 0 except and and the optimization effect reaches 100%. For function , the average accuracy of H-BOA is two orders of magnitude better than BOA, and one order of magnitude better than CWBOA. As for the function , the average accuracy of H-BOA is seven orders of magnitude better than that of BOA, which is the same as the result of CWBOA and the variance is 0. The algorithm has good stability and robustness. In addition, as can be seen from the results that the performance of IBOA is generally better than that of BOA, which shows the new inertia weight strategy is feasible.
As can be seen from Figure 7, when solving different functions, the curve of the H-BOA is smoother, the convergence speed is faster, the optimization accuracy is higher and the curve inflection point appears firstly, which indicating that H-BOA has a stronger ability to overcome the local optimum. Further prove the effectiveness of hybrid strategies.

WSN coverage optimization simulation experiment
The simulation experiment uses MATLAB, and the environment settings are the same with international function test. We choose H-BOA, BOA, the single-strategy improved butterfly optimization algorithm (IBOA) and the sparrow search algorithm (SSA) for comparison. The algorithm parameters are shown as Table 4, where the maximum number of iterations is = 100, and the population size is = 30. To show the effectiveness of H-BOA, in this paper, we tried to do multiple experiments with different numbers of nodes. The experimental parameter settings are shown in Table 5. Figure 8 shows the simulation coverage figure. Figure 9 describes the maximum coverage percent that various algorithm can achieve and Table 6 shows the specific maximum coverage value. Figure 10 shows the evolution curve of the maximum coverage of WSN with the number of population iterations when the number of nodes is 25, as can be seen from the figure that H-BOA has more uniform distribution and less gaps. This fully shows higher convergence and better robustness. In particular, for some wireless sensor node deployment tasks that require significantly higher coverage, the optimization strategy of the HBOA algorithm can achieve more excellent optimization with fewer nodes in less time.
In summary, H-BOA has better performance in WSN node coverage application and can improve energy effectiveness and real-time schedule.

Conclusions
Based on BOA, we propose a hybrid-strategy-improved butterfly optimization algorithm (HBOA). First, H-BOA uses Kent chaotic map to initialize the population to keep a more balanced search space. Next, we introduce a new inertial weight modified from the Sigmoid function to increase the fixability of global search and local search. Then the introduction of elite-fusion and elite-oriented strategy aims to improve population diversity. Finally, we adopt the disturbance based on standard normal distribution to prevent the algorithm from falling into precociousness and use simulated annealing process to ensure the quality of the solution. The above improvement points observably improve the performance of the algorithm. We selected the international test functions for performance testing and compared them with BOA, a single-strategy-improved butterfly optimization algorithm (IBOA) and particle swarm optimization (PSO). The results show that H-BOA is better than other algorithms, together with higher accuracy and robustness. We apply H-BOA in WSN coverage research, which proves that this algorithm can effectively solve this type of problem and broaden the application field. However, the algorithm still has some shortcomings. Our next work is how to optimize the strategy to make the algorithm more expressive and propose more effective hybrid heuristic algorithms for different and more complex problems.