Abstract

The key to the problem of node coverage in wireless sensor networks (WSN) is to deploy a limited number of sensors to achieve maximum coverage. This paper studies the hybrid strategies of multiple evolutionary algorithms, and applies them to the problem of WSN node coverage. We first proposed the hybrid algorithm SFLA-WOA (SWOA) based on Shuffled Frog Leaping Algorithm (SFLA) and Whale Optimization Algorithm (WOA). The SWOA algorithm combines the advantages of SFLA and WOA; that is, it retains the unique evolution model of WOA and also has the excellent co-evolution capability of SFLA. Secondly, using the mutation, crossover and selection operations of the differential evolution (DE) algorithm to further optimize this hybrid algorithm, the SWOA-based SFLA-WOA-DE (SWOAD) algorithm is proposed. In addition, the performance of SWOA and SWOAD has been tested by 30 benchmark functions in the CEC 2017 test set. Experimental results show that the optimization effects of these two algorithms are very outstanding. Finally, the simulation results show that the optimization algorithm proposed in this paper has a good effect on improving the signal coverage of WSN under the actual three-dimensional terrain.

1. Introduction

The Internet of Things makes use of local area networks or the Internet and other means of communication to achieve the interconnection of people, machines and things so as to realize the intelligent management of items and real-time perception of the environment [1]. WSN is one of the core technologies of the Internet of Things. It is also an important product of the integration of the information industry (computing, communications and sensors) in the new era. It has received extensive attention from various countries and organizations, and has formulated relevant strategic policies. For example, the U.S. Science Foundation (NSF) has developed a WSN research program to support research on relevant fundamental theories. The EU’s sixth framework plan also emphasizes the importance of WSN and regards it as one of the hot areas for vigorous development in the future. Compared with traditional networks, WSN is low-cost, easy to deploy, has better fault tolerance and can be placed in any environment. The organizer can quickly build a fully functional WSN under limited time and conditions. Once the WSN has been set up, the maintenance and management work are carried out within the network and does not require much workforce. Therefore, the application field of WSN is very broad, and it can be used in military, modern industry and agriculture, environmental protection and other fields [24].

The rapid development of artificial intelligence also brings a variety of problems, and traditional calculation methods cannot solve them well. Intelligent evolutionary algorithms came into being and developed rapidly. At present, various evolutionary algorithms have been proposed, such as Genetic Algorithm (GA) [57], DE [810], Particle Swarm Optimization (PSO) [1113], Artificial Bee Colony (ABC) [14, 15], Multi-Verse Optimizer (MVO) [16, 17], Ant Lion Optimizer (ALO) [18], Grey wolf optimizer (GWO) [19], Cuckoo Search (CS) [2022], Moth Flame Optimizer (MFO) [23, 24], Sine Cosine Algorithm (SCA) [25, 26], QUasi-Affine TRansformation Evolutionary (QUATRE) [27, 28], pigeon inspired optimization (PIO) [29, 30], Shuffled Frog Leaping Algorithm (SFLA) [3135], Whale Optimization Algorithm (WOA) [3639]. Meta-heuristic algorithms have received more and more attention from researchers due to their outstanding performance in solving optimization problems. They have been widely used in problems in transportation, wireless sensor networks, industrial production, intelligence system and other fields [40, 41]. But according to the No Free Lunch (NFL) theorem, there is no meta-heuristic algorithm that can be widely applied to various problems [42, 43]. In other words, optimization algorithms that achieve good performance on some problems may perform poorly on other problems. Therefore, new algorithms need to be proposed to solve increasingly complex problems. For example, propose a new heuristic algorithm, or improve the existing algorithm [44, 45], or combine two or more different algorithms to solve more complex problems [46, 47].

WSN is a network system composed of sensor nodes with sensing capabilities deployed in the detection area, and communicate through wireless communication. This emerging technology has brought a new way to obtain information and control management. And because WSN itself is very different from traditional networks, it brings a lot of challenges to people. In WSN, signal coverage can be defined as the ratio of the perceptible area to the entire area. The question of how to maximize network coverage for a given number of sensors is an important one. Intelligent evolutionary algorithms are also increasingly used to improve the coverage of WSN signals. For example, an intelligent calculation algorithm for enhancing black holes is proposed and used to solve the node coverage problem of wireless sensor networks under three-dimensional terrain [48]. An artificial bee colony algorithm with dynamic search strategy is proposed to solve the deployment problem of three-dimensional surface sensors and improve the signal coverage [49]. A genetic algorithm-based network coverage and optimization control strategy is proposed to solve the coverage problem of sensor nodes in three-dimensional terrain [50]. Therefore, this article attempts to mix WOA and SFLA to improve the performance of the original algorithm, and to deal with the problem of node coverage in WSN under 3D actual terrain.

The rest of this article is organized as follows. Related work introduced the principles of WOA, SFLA and DE, as well as the problem of WSN node coverage in a 3D actual environment. In Section 3, the process of mixing WOA and SFLA and the steps of using DE to optimize the hybrid algorithm are introduced. In Section 4, the performance of the proposed algorithm is tested, and the performance of the algorithm on 30 test functions is shown and analyzed. Section 5 introduces the application of the algorithm in WSN node coverage under actual terrain. Finally, the conclusion is given in Section 6.

This section briefly introduces the principles of WOA, SFLA and DE and the problem of node coverage in WSN under actual terrain.

2.1. WOA

Mirjalili et al. were inspired by the humpback whale’s spiral bubble net predation strategy and proposed a new heuristic whale optimization algorithm. WOA includes three location update models: encircling mode, bubble-net attacking mode, and searching mode. The WOA flowchart is shown in Figure 1.

2.1.1. Encircling Mode

In order to cooperate in predation, the whales share the location information of their prey, and then the whales approach the whale closest to the prey in the group. Update the current whale according to the whale with the best position, and the update equations are as follows:

Where represents the current iteration number, has different expressions at different stages, is the whale with the best position so far, is the current whale position of the t-th generation, is the current whale position of the -th generation, Operator means to multiply item by item, means to take the absolute value, and are coefficient vectors, The update equations of vectors and are as follows:

is a random vector distributed in [0,1], linearly decreases from 2 to 0 during the iteration process, so , , T is the maximum number of iterations. (1.1.1)Bubble-Net Attacking Mode

According to the spiral Equation (6), the current whale moves in a spiral motion to approach the prey and update its position.

denotes the distance between the current whale and the best positioned whale; is a constant that defines the shape of a logarithmic spiral; and is a uniformly distributed random number within [-1,1].

When whales spirally search for prey, they also shrink their encirclement. In order to simulate this behavior, the encircling prey and spiral search will be performed with the same probability. The location update equation is as follows: where p is a random number in the interval (0, 1).

2.1.2. Random Searching Mode

In order to improve the global search capability of whales, the current whale position is updated according to the randomly selected whales during the exploration phase. When |A| <1, select the model that encircling; when |A| ≥1, select the model of random search. The random search location update equations are as follows:

Among them is a whale randomly selected from the current population.

2.2. SFLA

SFLA is a collaborative optimization algorithm proposed by Eusuff and Lansey et al. The idea of the hybrid leapfrog algorithm: When frogs hunt for food, they adjust their position through information exchange. First, the entire frog population is divided into multiple memeplexes, and each memeplex executes a local search strategy to adjust the position of the worst frog. When the memeplex iterates to the specified number of times, the memeplexes are combined and exchanged for information. The process of local search and the process of global information exchange are carried out cyclically until the end condition is met. The following are the steps of the hybrid leapfrog algorithm:

Step 1: Initialize the population and calculate the fitness value of each frog. Sort the population and record the individual with the best position.

Step 2: The population containing F frogs is now divided into m memeplexes, so that there are n frogs in each memeplex, where n = F/m. If m =3, then the distribution principle is: the first frog is assigned to memeplex1, the second to memeplex2, the third to memeplex3, the fourth to memeplex1, ..., and so on.

Step 3: The local search process of the hybrid leapfrog algorithm is shown in Figure 2. Each memeplex evolves separately according to the following equations and Figure 2. where is the frog with the best position, is the frog with the worst position, rand() is a random number in [0-1], is the adjusted position of the frog with the worst position, and represents the best frog in the m memeplexes.

Step 4: After each memeplex evolves individually, it is reorganized into a population containing F frogs. Sort F frogs according to fitness value and update Pb.

Step 5: If the defined iteration conditions are met, the algorithm is terminated. Otherwise, go back to step 2.

2.3. De

The DE algorithm was proposed by Rainer Storn and Kenneth Price to solve the problem of Chebyshev polynomials. Differential evolution uses the three key operations of mutation, crossover and selection to continuously iterate to find the optimal value. First, the DE algorithm randomly selects several individuals in the population to perform mutation operations. Then crosses between the mutant individuals and the current individuals to obtain intermediates. Finally judges the pros and cons of the intermediates and the current individual, and selects individuals with good fitness values.

The mutation operation is based on all individuals in the population. Randomly select several individuals, one of which is the basis vector, and the other individuals make difference with each other to form a difference vector to construct a mutation operation. There are several combinations of basis vector and difference vector as follows: where , and are unequal integers distributed in [1, Np], Np is the number of individuals in the population, represents the current iteration number, is the newly generated variant individual, is the scale parameter for adjusting the solution size range, ∈(0,1).

The crossover operation is to exchange the values of the mutated individual and the current individual in certain dimensions to form a new individual. The equation for binomial crossover is as follows: where is the cross factor belonging to [0,1], is the function of taking random values, d is the current dimension value, and is the function of obtaining the total dimension of the individual.

The selection operation selects individuals who can enter the next generation population. If the fitness value of the new individual after mutation and crossover is better than the fitness value of the current individual, replace the current individual with the new individual, otherwise, keep the current individual.

2.4. 3D WSN Node Coverage

WSN has broad application prospects, and it has become one of the hot research fields today. The improvement of signal coverage in WSN has always been an important issue. The measurement of the WSN coverage can understand whether there is a blind spot for monitoring and communication, and then the deployment position of the sensor can be adjusted or the number of sensors can be increased to improve the coverage of the sensor signal. The high deployment density of sensor nodes will result in higher network coverage, but it will also cause redundancy of network coverage, resulting in a great waste of resources. In the case of a fixed number of sensors, the proper deployment location of WSN nodes will have a direct impact on network performance. Optimizing the location of wireless sensor nodes can reasonably allocate network resources and better complete environmental perception. At present, the sensor coverage strategy in the two-dimensional plane has achieved more results, applied to the three-dimensional space of the sensor coverage strategy is also gradually attracting the attention of scholars. For example, Adda Boualem et al. proposed a spider web strategy and applied it to area coverage in 3D wireless sensor networks using mobile sensor nodes [51]. Yu Xiang et al. proposed 3D space detection and coverage of wireless sensor network based on spatial correlation [52].

Deploying wireless sensors on an actual three-dimensional terrain rather than a two-dimensional plane requires additional considerations. Because the communication quality between the two sensors largely depends on the actual physical environment. Surrounding obstacles cause signal fading and obstruction. The communication process between sensor and sensor is shown in Figure 3. When the sensor S1 communicates with the sensor S2, the signal sent out is likely to be blocked by the protruding terrain between them, so that S1 and S2 will not be able to communicate, thereby reducing the coverage of the WSN signal. This paper uses Bresenham’s line of sight (LOS) algorithm to detect whether there is terrain obstruction between two sensors to affect their signal transmission [53]. In order to determine whether the communication between the target node S1 and the node S2 within the communication range is blocked, we choose the points between S1 and S2 on the actual terrain to make judgments. If the height of any one of the points is higher than the height of the connection between S1 and S2, the communication between S1 and S2 will be blocked, that is, the S1 node cannot communicate with the S2 node.

So to judge whether two nodes can communicate, first calculate the Euclidean distance between sensor S1 and sensor S2 according to Equation (16).

Then use the LOS algorithm to calculate whether there is an obstruction between the two sensors. Finally, a judgment is made according to Equation (17). If is less than the coverage radius of the sensor, and there is no obstruction between the two sensors, it means that they can communicate, and Communication (s1, s2) is equal to 1. Otherwise, if one of the conditions is not met, it is considered that sensor S1 and sensor S2 cannot communicate, and Communication (s1, s2) is equal to 0.

is the Euclidean distance between two sensors, and is the coverage radius of the sensor signal.

3. Hybrid Strategy of SWOA and SWOAD

This section introduces the mixing process of WOA and SFLA, and the steps to optimize the mixing algorithm with DE.

3.1. Hybrid Strategy of SWOA

The WOA algorithm is a new type of bionic optimization algorithm with strong global optimization performance. However, in the later stage of the algorithm iteration, it still has the disadvantage of being easy to fall into the local optimal value, so the solution accuracy is low. The SFLA algorithm can realize global information exchange through the combination and sorting of memeplexes, so that the algorithm avoids falling into local convergence, but the early search speed is slow. The above shortcomings of the algorithm can be effectively solved by combining the WOA algorithm and the SFLA algorithm. The flow chart of SWOA algorithm is shown as in Figure 4.

SWOA’s pseudo code is in Algorithm 1.

Initialize parameters; M is the number of memeplex; ne is the number of iterations for each memeplex; Iter is the maximum number of iterations.
for1 g =1: Iter do.
 Calculate the fitness value of each whale.
 Sort individuals by fitness value.
 Define memeplex, divide the population into M memeplexes.
for2 each memeplex do.
  for3 n =1:Ne do.
    Update global optimal value.
   for4 each solution do.
    for5 each dimension do.
     Update Memeplex by equation (1) to equation (9).
    End for5.
   End for4.
  End for3.
  Combine M memes into a population.
End for2.
End for1.
3.2. Hybrid Strategy of SWOAD

The SWOAD algorithm integrates the differential evolution algorithm into the SWOA algorithm, so that the whale population has a mechanism of mutation, crossover, and selection, which in turn enables SWOA to have stronger search capabilities. After each iteration of SWOA, the SWOAD algorithm first randomly selects a whale individual as the basis vector, and then combines with the difference between two randomly selected whale individuals to complete the mutation. Whether in the early or late stage of algorithm iteration, this strategy can enhance the ability of whales to jump out of the local optimum. Then the mutant intermediates are crossed with the target whale individuals, thereby increasing the diversity of the whale population; finally, a selection is made. If the fitness value of the newly generated individual is better than the target individual, the newly generated individual will replace the target individual. Otherwise, keep the target individual. SWOAD execution steps are as follows:

Step 1. Calculate the fitness of each individual.

Step 2. Sort the populations by fitness.

Step 3. According to the division rule, the population is decomposed into multiple memeplexes.

Step 4. Each memeplex evolves individually.

Step 4.1. Calculate the fitness value of each individual and Update global optimal value.

Step 4.2. Update the position of each frog by Equation (1) to Equation (10).

Step 4.3. Repeat 4.1–4.2 until the end conditions of the local search are met.

Step 5. Combine memeplexes.

Step 6. Performing variation, crossover and selection operations.

Step 7. Repeat step 1 to 6 until the end conditions are met.

The pseudo code of step 6 is in Algorithm 2.

for1 each solution do.
 Generate variant intermediates Y by Equation (14).
 The current solution is X.
for2 each dimension of Y do.
  Generate new individuals U by Equation (15).
End for2.
if2 fitness(U) < fitness(X).
  X = U.
End if2.
End for1.

4. Results and Analysis of the Experiment

In this section, we use 30 benchmark functions in CEC2017 to test the effectiveness of the proposed hybrid algorithm.

4.1. Parameter Configuration

To verify the results, we compared the hybrid algorithm with the original WOA and SFLA algorithms. Each algorithm performs 100 iterations on each benchmark function, and runs 30 times to average. The test parameters of the algorithm are given in Table 1. Table 2 shows the statistical results of the algorithm, including the mean (Mean) and standard deviation (Std).

From the data in the table, it can be seen that SWOA and SWOAD perform better than the original WOA and SFLA on the 30 test functions. SWOA performs better on functions F14 and F22, and SWOAD performs better on other functions. WOA has stability in function F22, SFLA has better stability in functions F10 and F20, SWOAD has excellent stability in function F1, F4, F6, F11, F12, F15, F16, F17, F18, F19, F25, F28, F29 and F30, and SWOA is more stable in other functions.

In order to further evaluate the performance of the algorithm, we use the convergence curve of the algorithm to evaluate the convergence speed and convergence ability of the optimized algorithm in this paper. The iterative curves of the algorithm on 30 test functions are shown in Figure 58. All algorithms have the same number of iterations on each function. The horizontal axis is the number of iterations of the function, and the vertical axis is the average of the fitness values of each function running 30 times.

4.2. Unimodal Functions

In Figure 5, SWOAD’s convergence ability on function F1 is better than other algorithms. Each algorithm can find the optimal value on the function F2 and F3, but the improved two algorithms converge faster than the original algorithm.

4.3. Simple Multimodal Functions

In Figure 6, the SWOAD algorithm has a faster convergence speed and stronger optimization ability than the WOA, SFLA and SWOA algorithms. The performance of SFLA in function F10 is better than that of WOA.

4.4. Hybrid Functions

In Figure 7, the convergence curves of SWOA and SWOAD on the function F13, F14, F15, F18 and F19 have very little difference. But the convergence performance of SWOAD on functions F11, F16, F17 and F20 are significantly better than SWOA. The performance of SFLA in function F11 is better than that of WOA.

4.5. Composition Functions

In Figure 8, the convergence results of SWOA and SWOAD are almost the same in F22 and F30. Among other functions, SWOAD has the best performance, followed by SWOA, which is better than WOA and SFLA.

5. Application of Hybrid Algorithm in WSN Node Coverage under Real Terrain

The 3-D actual terrain used in this simulation is the Dagong Island in Qingdao. Obtain topographic data of Dagong Island through satellite maps, and collect information about a coordinate point every ten meters in a prescribed area. The sensor nodes are deployed on this 3-D terrain. The terrain of Dagong Island is shown in Figure 9. When the simulation is performed on the actual terrain of Dagong Island, the initial sensor nodes are randomly generated and optimized by hybrid algorithms to find a better position. To randomly generate the position of a sensor node, only the horizontal and vertical coordinates of the sensor node need to be randomly generated, and use the following method to determine the height through the available terrain data: If the randomly generated or optimized sensor node is at the intersection of the horizontal and vertical grid lines, the height value in the corresponding terrain data is the height of the sensor; Otherwise, the height of the grid intersection closest to this position is the height of the sensor node.

Set a matrix CMat, and determine the coordinate points that each sensor can cover by Equation (17), and set the coordinate points that the sensor can cover in CMat to 1. Calculate the coverage rate according to Equation (18). where is a sum function, and are horizontal and vertical coordinate lengths, respectively.

Use the hybrid algorithm in this paper to optimize the position of the sensor, and improve the signal coverage as much as possible on the premise of a fixed number of sensors. The communication radius of the sensor is set to 5 m. Test the algorithm with 30, 40, 50, and 60 nodes, respectively. Run 30 times for each group of nodes and take the average. The results of the experiment are shown in Table 3. As the number of sensor nodes increases, the signal coverage also increases, and the coverage rate is the largest when 60 sensor nodes are deployed, reaching 82.56%. It can also be seen that the hybrid algorithm is far superior to the performance of WOA and SFLA.

6. Conclusion

In this paper, WOA and SFLA are combined to form a new hybrid algorithm. The two algorithms cooperate with each other to form an organic whole. Compared with the performance of the two algorithms alone, the performance of the hybrid algorithm is better. Through mutual fusion, the algorithm can avoid falling into the local optimum in the process of finding the global optimum. And use DE to optimize the hybrid algorithm, which further improves the algorithm’s convergence speed and optimization ability. In the experiments tested using the CEC 2017 benchmark function, the hybrid algorithm outperformed both WOA and SFLA. Finally, the hybrid algorithm is applied to the node coverage problem of wireless sensor network based on actual terrain. The simulation results show that the improved algorithm has achieved good results and increased the signal coverage of the wireless sensor network. There are many metaheuristic algorithms. In this article, we only use two algorithms for mixing. In the future, we may adopt some other algorithms [5456] to get a hybrid approaches with better performance on WSN coverage problem.

Data Availability

(1) CEC 2017. (2) The actual terrain data is obtained from the LocaSpace Viewer software

Conflicts of Interest

The author(s) declare(s) that there is no conflict of interest regarding the publication of this paper.