2. Related Works
At present, scholars at home and abroad have conducted a lot of research on the coverage optimization problem of wireless sensor networks in planar areas, and they have made some progress. The main research methods are divided into two types: one is coverage optimization based on geometric methods [
4,
5,
6] and the other is coverage optimization based on intelligent algorithms. Mahboubi et al. [
7] proposed a node deployment algorithm based on Voronoi diagrams, where the virtual forces exerted by the vertices and boundaries of polygons are used to find the new locations of nodes, and the simulation results prove that the algorithm can improve the coverage rate. Liu et al. [
8] optimized node deployment by an improved virtual force algorithm, which considered the interaction forces between nodes based on the traditional virtual force algorithm, and the interaction forces between nodes could drive the sensor nodes to cover the whole monitoring area, but it was still difficult to achieve a high coverage rate in the end. Wang et al. [
9] combined the improved virtual force algorithm with the improved gray wolf algorithm, which can effectively make the nodes more evenly distributed and reduce the average travel distance of the nodes, but the complexity of this algorithm is high and requires a long running time.
In recent years, with the development and wide application of intelligent algorithms, researchers have found that the problems of WSN coverage optimization can be effectively solved by intelligent algorithms, such as particle swarm algorithm, whale algorithm, firefly algorithm, and gray wolf algorithm [
10,
11]. Intelligent algorithms have the advantages of simple computation and strong search capability. Mahnaz et al. [
12] proposed an improved whale optimization algorithm for WSN coverage optimization to solve the complex coverage problems by developing the approaches of exploration, spiral attack, and bubble net attack. Experimental results show that the algorithm can extend the life cycle of the network, but it is easy for the algorithm to fall into local optimum. Kavita et al. [
13] proposed a node deployment method based on the gray wolf algorithm, which maximizes coverage while ensuring network connectivity by improving the fitness function and the population location update method, but the algorithm does not take into account the cost caused by node movement. Chao et al. [
14] proposed a node deployment method based on the improved artificial swarm algorithm and the teaching strategy. The simulation results show that the algorithm achieves a better balance between global search and local search, but the complexity of the algorithm is high. Aparajita et al. [
15] combined the firefly algorithm with the Voronoi diagram and K-means algorithm and calculated the optimal sensing radius by Voronoi cell structure, and then found the optimal deployment location of nodes by the firefly algorithm. The simulation results showed that the algorithm could improve the coverage and lifetime of wireless sensor networks. Wang et al. [
16] proposed an adaptive, discrete-space-oriented wolfpack optimization algorithm for movable wireless sensor networks. First, an adaptive expansion strategy based on a minimum overlapping full-coverage model was designed to achieve the minimum overlap and gap-free coverage of the monitoring area. Secondly, the target-node probability matrix and adaptive step size are improved. The simulation results show that the algorithm has better convergence speed and global optimization capability. Zhu et al. [
17] proposed a coverage optimization method based on an improved weed algorithm. The different stages of the weed algorithm are improved to enhance the search capability of the algorithm as well as the convergence speed of the algorithm. Teng et al. [
18] proposed a novel hybrid firework-virtual force algorithm based on the µ-Lawwhich, which improves the search ability and accuracy of the algorithm through the idea of μ-law in non-uniform quantization and introduces the virtual force algorithm to accelerate the evolution of the fireworks population and improve the efficiency of the algorithm, but the algorithm does not optimize the moving distance of nodes in the process of network coverage optimization.
Yin et al. [
19] proposed a WSN coverage optimization method based on the Yin-Yang pigeon-inspired optimization algorithm, which improved coverage ratio and convergence. However, the algorithm is not efficient and cannot be applied in complex environments. Wu et al. [
20] proposed a multi-objective optimization algorithm for WSNs based on improved particle swarm optimization, which aims at solving the problems of coverage hole and redundancy. Simulation results indicate that this algorithm can improve coverage ratio and reduce the moving distance of nodes. However, the effect of the algorithm is unstable. He et al. [
21] proposed a WSN coverage optimization model based on an improved marine predator algorithm (IMPA). The simulation results demonstrate that the IMPA has a better coverage rate than other metaheuristic algorithms. However, the algorithm does not pay attention to the energy consumption of nodes. Huang et al. [
22] proposed a node coverage optimization strategy with an improved COOT bird algorithm (COOTCLCO). Simulation results show that COOTCLCO has a faster convergence speed and better search accuracy, but the algorithm only considers the coverage rate of the networks.
Wang et al. [
23] used an improved sparrow search algorithm to improve the node coverage of wireless sensor networks, and the improved algorithm had some improvement in search accuracy and convergence speed, but it ignored the impact of the location distribution of the sparrow population in the initial stage on the performance of the algorithm. Duan et al. [
24] proposed an improved sparrow search algorithm to optimize the coverage of wireless sensor networks, introduced the initialized population based on the good point set in response to the uncertainty generated by the standard sparrow search algorithm using random initialized population, and also proposed evaluation metrics for coverage issues. The results show that combining the good point set to initialize the initial position of the population can effectively improve the convergence speed and accuracy of the algorithm, but the study does not fully consider the impact of the moving distance of mobile nodes on the cost of network coverage optimization in the optimization process. Wu et al. [
25] proposed a multi-objective coverage optimization method based on the improved sparrow search algorithm, which not only improves the network coverage by improving the sparrow search algorithm but also prevents some nodes from moving for too long, and the results show that the algorithm can balance the network coverage and node movement cost to a certain extent, but the method of controlling the moving distance of sensor nodes by this algorithm is still inadequate and fails to reduce the movement distance of all nodes as a whole.
Recent research on the coverage optimization of wireless sensor networks has yielded some results, but there are still some problems. Firstly, most studies only consider how to improve the coverage of the network, ignoring the fact that there is a large amount of energy consumption during the movement of the nodes. Secondly, in recent years, only a small number of researchers have conducted coverage optimization studies for networks where hybrid nodes are deployed. Static nodes cannot move to other places after being deployed, but they are less expensive than the mobile nodes. Although the sparrow search algorithm has successfully solved some problems in the field of WSNs, it is still difficult to effectively solve the multi-objective optimization problem. In order to effectively balance the coverage rate of networks and the moving distance of sensor nodes in the coverage optimization, a multi-strategy improved sparrow search algorithm for WSN coverage optimization is proposed.
3. WSN Node Coverage Model
In this paper, we set up a WSN in which all sensor nodes have the same structure and properties, and each sensor node has a defined sensing radius
and communication radius
. To ensure the connectivity of the network, the communication radius of a node is usually set to be two times the node’s sensing radius. Assume that the set of wireless sensor nodes is
, and the coordinates of any sensor node
in the set of nodes can be expressed as
. The set of monitoring points is
, the coordinates of any monitoring point
in the monitoring area can be expressed as
. The Euclidean distance between a sensor node and a monitoring node in the monitoring area is:
The node-sensing model in this paper is a Boolean sensing model [
26], then the probability that the target point
to be monitored by the sensor node
is set as follows:
The joint sensing probability of all sensor nodes to the monitoring points
in the monitoring area is:
where
is all sensor nodes in the monitoring area. Assuming that the monitoring area is a rectangle and
denotes the size of the monitoring area. The rectangular monitoring area is divided into
identical grids of equal size, and the monitoring point m is located at the center of the grid. According to the above equation, the joint sensing probability of monitoring points can be calculated, and the coverage area is obtained after accumulation. The calculation formula of coverage is as follows:
Suppose the initial position of node
i in the region is
,the target location is
, then the sum of the moving distances of all nodes in
S is as follows:
According to the above analysis, the objective function is g(x). The calculation formula of g(x) can be expressed as follows:
where
and
are the weighting factors, and
.
4. Standard Sparrow Search Algorithm
In the sparrow search algorithm (SSA) [
27,
28], the population is divided into two main parts: the explorer and the follower. Among them, the explorer is responsible for finding food and guiding the whole population to the foraging area, while the follower acquires food according to the position of the explorer. The explorer’s position is updated in the following way:
where
t indicates current iteration,
is a constant with the largest number of iterations.
is a random number,
is a random number which obeys normal distribution.
represents a matrix of 1
n for which each element is 1.
and
represent the alarm value and safety threshold, respectively. When
, which means that no predator is found around the current foraging environment, the explorer can enter the wide search mode. If
, it means that some sparrows have discovered the predator and issued an alarm—all the sparrow needs to quickly move to the safety position.
The updated equation for the followers is as follows:
where
and
are the current global best and worst positions.
A represents a matrix of 1
n for which each element is randomly assigned 1 or −1, and
. When
, it suggests that the
ith sparrow with worse fitness values is most likely to be starving.
During the foraging process of the sparrow population, 10% to 20% of the sparrows will act as defenders, and when danger approaches, all sparrows will abandon their current food and move to a new location, and the defenders will be updated as follows:
where
is the current global optimal location.
is a random number that obeys the standard normal distribution.
is a random number.
is the fitness value of the present sparrow,
,
represent the current best and worst fitness values,
is the smallest constant to avoid the denominator being 0.
5. Multi-Strategy Improved Sparrow Search Algorithm
The initial sparrow search algorithm solves problems by searching and updating explorers, followers, and defenders. It has high search accuracy, fast convergence, and good stability compared with intelligent algorithms such as particle swarm algorithm and ant colony algorithm. However, its application in multi-objective optimization problems is not yet mature. In the later stage of the algorithm, there is the problem of the gradual reduction of diversity. Therefore, this paper proposes a multi-strategy improved sparrow search algorithm for WSN coverage optimization. Firstly, the uncovered areas are searched by the Delaunay triangulation strategy and screened as the initial population of the sparrow search algorithm; secondly, the idea of non-dominated sorting is introduced to improve the quality of the explorer population, which helps to alleviate the problem that it is difficult to balance multiple objectives with the algorithm; and finally, a two-sample learning strategy is used to optimize the updated formula for the followers, which avoids the problem that it is easy to fall into local optimum in the later stage of the algorithm.
5.1. Initial Population Optimization
In bionic intelligence algorithms such as SSA, particle swarm optimization (PSO), and ant colony optimization (ACO), in order to search for the solutions to the problem in the early stages of the algorithm, they usually use random initialization to determine the initial population. Currently, researchers mainly determine the initial population by using chaotic mappings and other random methods, which shows that the initial population is important to the overall performance of the algorithm. It can affect the global search effect as well as the convergence speed of the algorithm. In this paper, we introduce the Delaunay triangulation strategy [
11] to locate the approximate locations of coverage vulnerabilities. These locations are then filtered and used as the initial population for the coverage optimization algorithm in this paper.
After dividing the static nodes in the monitoring area by Delaunay triangulation strategy, the triangle network is shown in
Figure 1a. The new triangular network is shown in
Figure 1b after adding the boundary points of the monitoring area to the triangular network. In the network constituted by all static nodes, the uncovered area is mainly located inside the triangle, and the relationship between the Delaunay triangle and uncovered area is divided into three kinds. When
, there are no uncovered areas inside the triangle. When
, there exists an uncovered region inside the triangle, located entirely inside the triangle, only when the triangle is an acute triangle. When
, if this triangle is an acute or right triangle, there must be an uncovered area inside the triangle; if this triangle is an obtuse triangle and the vertical distance from point
C to side
AB is greater than the sensing radius of the sensor node, then there is also an uncovered area inside the triangle [
11]. Where the
d(A,B) represents the distance between point
A and point
B, and the R represents the sensing radius of a sensor node.
The approximate location of coverage vulnerabilities in the network can be quickly located based on the relationship between Delaunay triangles and uncovered areas. Considering the significant difference in the size of coverage vulnerabilities existing in the network, the location of the initial population needs to be further filtered. The sensing radius of sensor nodes is fixed and the same, and the size of the coverage hole inside the triangle is related to the position of the three vertices of the triangle. The relationship is analyzed as follows:
The area of the coverage vulnerability is related to the area of the triangle, the area of the sector and the overlapping areas between the sectors, respectively. The schematic is shown in
Figure 2. Since the sum of the interior angles of a triangle is 180 degrees, the sum of the areas of the sectors inside any triangle is the same. The area of the triangle can be calculated from the coordinate positions of the three nodes. The area of the overlapping areas in the sector is related to the distance between the nodes and the sensing radius of the nodes. Define the variable
Cl to measure the size of the coverage hole inside each triangle with the following formula:
where
is the area of the triangle,
is the area of the sector in the triangle,
is the area of the overlapping area in the triangle.
is calculated as follows:
where
represents the distance between two sensor nodes,
R is the sensing radius of the nodes.
The triangles can be sorted according to the value of Cl, and the top N positions of the centroids of triangles are selected as the initial population. N is the population size of the IM-DTSSA algorithm.
5.2. Explorer Population Optimization
In the standard SSA algorithm, explorers usually consist of higher energy population individuals, which are responsible for searching food-rich areas in the whole population, providing search guidance for followers, and playing a crucial role in the search effectiveness of the whole population. Therefore, both the quality and the number of explorer populations have a significant impact on the overall performance of the algorithm. The better the quality and larger the number of explorer populations, the better the global search ability of the algorithm, but it will slow down the convergence speed, and only a good balance between the quality and number of explorers in the SSA algorithm can make the performance of the algorithm better [
29].
The energy level of an individual depends on the fitness value of the individual, and how to evaluate the fitness value in the process of multi-objective optimization is an urgent problem to be solved. In this paper, we introduce the idea of non-dominated sorting [
30] to sort the sparrow populations, and secondly further sort them by calculating the entropy of crowding distance of individuals in the same non-dominated rank. In NSGA, a solution x is said to dominate y when its value is better than another solution y for all fitness functions. All sparrows are divided into different non-dominated fronts using the non-dominated rank, and the schematic diagram is shown in
Figure 3. It can be easily seen that the number of solutions that dominate
A or
B is 0, so solution
A and solution
B are divided into the first non-dominated front. It is obvious that both solution
A and solution
B are able to dominate solution
C, so solution
C is divided into the second non-dominated front.
Define , is the coverage rate of the network when the nodes are deployed according to the scheme of solution X. Define , is the average moving distance of the mobile nodes when the nodes are deployed according to the scheme of solution X.
Set the population as P and calculate the two parameters n(p) and S(p) for each individual p. Where n(p) is the number of individuals in the population that dominate p and S(p) is the set of individuals in the population that are dominated by p. The fast non-dominated sorting process is as follows:
- (1)
Find all individuals of the population with n(p) = 0 and deposit them in the set F(1);
- (2)
For the current individual i in F(1), the set S(i) consists of the individuals dominated by i. Iterate through all individuals k in the set S(i), performing n(k) = n(k) − 1. If n(k) = 0, deposit individual k in the set F(2).
- (3)
All individuals in F(1) form the first layer of non-dominated surfaces. With F(2) as the current set, the above operation is repeated until all the individuals are deposited in the corresponding set.
The calculation of the crowding distance entropy CD(
i) of each solution is used in the NSGA algorithm to measure the equilibrium and diffusion of solutions. It can help analyze the denseness of solutions on the same non-dominated fronts. However, this paper also hopes that the solution that can balance the coverage rate and the moving distance of sensor nodes obtains a higher ranking. The improved formula for calculating the crowding distance entropy is shown in Equation (12).
where
h is the number of individuals in this non-dominated front.
J is an individual in the same non-dominated fronts with the point
i.
After determining the non-dominated rank of each solution, the crowding distance entropy of each solution is calculated. The solutions are ranked according to their non-dominated rank and crowding distance entropy in the following way: for two individuals with different non-dominated ranks, the one with a lower non-dominated rank is preferred over the one with a higher non-dominated rank; for individuals with the same dominance rank, the one with larger crowding distance entropy is preferred over the one with smaller crowding distance entropy.
The explorers are set to be the top PD individuals sorted by the non-dominated sorting algorithm, and the rest of the individuals become the followers. In the standard SSA algorithm, the number of explorers is generally set to a constant value between 10% and 20% of the total population size, which cannot maximize the role of explorers in the whole population. At the beginning of the algorithm, the global search is more demanding, and more explorers are needed to explore the global better position to improve the global search capability. In the middle and late stages of the algorithm operation, a small number of explorers can both ensure a certain global exploration capability and enhance the local optimization seeking capability. Therefore, the ratio of the number of explorers to the total population size is set as the dynamic weighting factor in this paper, , and . Where T is the maximum number of iterations, and t is the current number of iterations. With the above equation, it can be realized that at the beginning of the algorithm, the number of explorers is 20% of the entire population, and it gradually decreases to 10% as the algorithm is iterated.
5.3. Two-Sample Learning Strategy
In standard SSA, the follower determines its own update method based on the global highest and the global lowest fitness values. The purpose of this update method is to find a random position near the current optimal position. In the other case, if the follower is closer to the global worst position, it is necessary to move to another position. This single way of learning of the current global best or worst position can improve the search speed of the algorithm to some extent, but it also means some important position information is lost and increases the likelihood of the algorithm falling into a local optimum [
31].
To enable the followers to better learn the location information of the optimized explorer population, this paper improves the position update formula of the followers in the standard SSA algorithm by using a two-sample learning strategy. As shown in
Figure 4, whether the follower
i learns from the globally optimal individual n, or from the globally suboptimal individual m, it leads to a reduction in diversity.
In order to enable the follower
i to better search the target location, the current global optimal location and the global suboptimal location are used as guides. When the fitness value of follower
i is low, it needs to leave the worse position. Additionally, to avoid searching other worse positions again, the global worst position and the global second worst position can be considered in the location update. After improving the update method of the followers by two-sample learning strategy, the followers can make full use of the information of the explorers’ position. The update formula of the positions of the followers can be described as follows:
where
is the optimal position in the current sparrow population.
is the next best position in the current sparrow population.
is the worst position in the current sparrow population.
is the second worst position in the current sparrow population.
are the step control parameter, and
.
5.4. Procedure for the IM-DTSSA Algorithm
The procedure of IM-DYSSA algorithm is shown in
Figure 5, and the steps of the IM-DTSSA algorithm are described as follows:
Step 1: Initialize the parameters of the IM-DTSSA algorithm: population size N, the number of sensor nodes n, proportion of explorers PD, maximum number of iterations Itermax, Safety value ST, and r1, r2, r3, r4.
Step 2: Determine the size of monitoring area, and the nodes are randomly deployed in the monitoring area.
Step 3: Build the triangular network and calculate the value of Cl according to Equation (9). Choose the top N individuals as the initial population of the algorithm.
Step 4: Sort the individuals by the non-dominated sorting algorithm and calculate the crowding distance entropy according to Equation (11). Choose the top PD individuals as the explorer population. Update the explorer location according to Equation (6).
Step 5: Update the position of the followers according to Equation (12).
Step 6: If some sparrows feel the danger, the position of the individuals is updated according to Equation (8).
Step 7: Determine whether the algorithm reaches the maximum number of iterations; if so, output the global solution and record the optimal coverage rate and the moving distance of sensor nodes. Otherwise, skip to step 4 for the next iteration.
5.5. IM-DTSSA Time Complexity Analysis
In this section, we analyze the time complexity of our proposed IM-DTSSA algorithm. Suppose the maximum number of iterations of the algorithm is T, the population size is N, the number of nodes in the network is n. Firstly, Delaunay triangulation is performed on the static nodes, and the value of Cl for sorting is calculated. Then, the top N individuals are used as the initial population of the algorithm. Secondly, the population is sorted by a non-dominated ranking algorithm and the crowding distance entropy is calculated. Finally, the followers’ position according to the two-sample learning strategy is updated. Therefore, we analyze the time complexity of the three steps:
- (1)
The time complexity of Delaunay triangulation is O(nlogn), the time complexity of calculating the value of Cl is O(nlogn), and the time complexity of population initialization is O(N).
- (2)
The time complexity of computing the non-dominated rank is O(2N2), and the time complexity of calculating the crowding distance entropy is O(NlogN).
- (3)
The location update of the sparrow population has a time complexity of O(N).
Therefore, after introducing the above three improvement strategies, the time complexity of the IN-DTSSA algorithm is O(TN2). Although the IM-DTSSA algorithm adds a certain amount of computation, the coverage rate and moving distance of nodes of this algorithm are better than other algorithms.
7. Conclusions
Aiming at the problems that it is hard to balance the coverage rate of networks and the moving distance of mobile nodes, a multi-strategy improved sparrow search algorithm for WSN coverage optimization (IM-DTSSA) is proposed. Firstly, in the initial stage of the algorithm, the Delaunay triangulation strategy is used to find the location of the uncovered area in the networks, which is filtered and then used as the initial population of the sparrow search algorithm. This approach can quickly move the population to the vicinity of the target area and can reduce the time of the global search of the population in the early stage of the algorithm. Secondly, explorer populations have a significant impact on the performance of SSA algorithm. Therefore, the IM-DTSSA algorithm introduces the idea of non-dominated sorting to optimize the explorer population, thus enhancing the global search capability of the algorithm. Finally, to avoid the problem that the algorithm tends to fall into local optimum, the IM-DTSSA algorithm uses a two-sample learning strategy to improve the follower position update method.
The feasibility and superiority of the IM-DTSSA algorithm for the WSN coverage optimization are demonstrated by comparing the IM-DTSSA algorithm with other three algorithms. The stability of the algorithm is demonstrated by setting different numbers of mobile nodes to observe the changes in the coverage rate of networks. Comparing the average moving distance with the other three algorithms reveals that the IM-DTSSA algorithm is able to reduce the moving distance of mobile nodes while ensuring the coverage rate of WSNs. Our research is aimed at the network environment with a mixture of static and mobile nodes. Firstly, in the initial stage of the IM-DTSSA algorithm, the Delaunay triangulation strategy is used to find the location of the uncovered area in the networks, which is composed of static nodes. Then, the optimal node deployment solution of mobile nodes is found by the next steps. Therefore, the algorithm proposed in this research has a superior performance in dealing with the coverage optimization problem in a network environment composed of hybrid nodes.