Disclosure of Invention
According to the defects in the prior art, the invention aims to provide the sensor node arrangement method for forest monitoring, which can ensure high coverage rate, simplify the node deployment process and reduce the energy consumption, thereby improving the overall performance of the wireless sensor network.
In order to achieve the above purpose, the technical scheme adopted by the invention is that the sensor node arrangement method for forest monitoring comprises the following steps:
S1, setting a sensing radius, a communication radius and a monitoring area of a sensor node, and generating random distribution information of the sensor node in the monitoring area, wherein the sensor node is a wireless sensor node;
s2, calculating the coverage condition of each sensor node to the monitoring area based on the Boolean perception model, and further establishing a coverage rate mathematical model of the sensor nodes;
s3, introducing a coverage rate mathematical model and a tangent rewarding item into the arrangement process of the sensor nodes to form an objective function of the optimal arrangement of the wireless sensor network;
S4, introducing a gray wolf optimization algorithm GWO, improving the gray wolf optimization algorithm, taking the objective function in the S3 as a fitness function, and gradually optimizing the positions of sensor nodes by simulating the hunting behavior of the gray wolves, wherein the improvement comprises the steps of replacing a linear convergence factor of GWO with a nonlinear convergence factor, introducing a genetic variation strategy in GWO and a variation mechanism based on the Coxie distribution;
S5, based on random deployment, the position distribution of the sensor nodes is dynamically adjusted according to the deployment strategy generated by the improved GWO by collecting the random distribution information of the sensor nodes so as to improve the coverage rate of the wireless sensor network and optimize the energy consumption of the sensor nodes, the monitoring area is covered to the maximum extent through multiple iterations, and when the iteration termination condition is met, the final position of each sensor node is output, and the final optimized sensor node arrangement scheme is obtained.
The wireless sensor network WSN is a network formed by all sensor nodes. Node-tangent rewards generally refer to incentive measures provided by participants running nodes in a blockchain network. The boolean-aware model is a model that analyzes sensitivity of input variables in logical operations and boolean algebra.
The traditional wolf optimization algorithm (Grey Wolf Optimizer, GWO) is a meta-heuristic algorithm whose inspiration comes from social behavior and hunting strategies of the wolf. The algorithm simulates the hunting process of the wolves, and the wolves adjust the position of the individual through the behavior of the hunting object so as to realize the global optimization target. The gray wolf population is composed of four different grades, alpha, beta, gamma and omega, wherein alpha wolves are responsible for leading the wolf population, beta and gamma wolves assist in alpha wolf decision making, and omega wolves are common individuals. The algorithm continuously updates the position of the individual through the cooperation of the four roles, and gradually approaches to the optimal solution. One significant advantage of the gray wolf optimization algorithm is that it has relatively few parameter settings, making it easier to implement and debug than other complex algorithms. The core parameters only comprise the convergence factor and the constant related to hunting behavior, which greatly simplifies the implementation of the algorithm in different application scenes and reduces the complexity of parameter tuning. Therefore, the gray wolf optimization algorithm has high robustness and usability in practical application. However, this algorithm tends to fall into a locally optimal solution during the local search, resulting in limited global search capabilities, especially when dealing with complex optimization problems. The present invention thus improves upon it.
In the preferred scheme of the invention, in the step S1, the sensor nodes in the wireless sensor network are set to be isomorphic, the sensing radius of the sensor nodes is Rp, the communication radius is Rc, the set of sensor nodes V is denoted as v= { V1,v2,v3,…,vn }, n is the number of sensor nodes, the two-dimensional coordinates of any one of the sensor nodes Vi in V are denoted as (xi,yi), i=1, 2,3, & gt, n, the monitoring nodes are arranged in the monitoring area, the set of monitoring nodes Q is denoted as q= { Q1,q2,q3,…,qm }, m is the number of monitoring nodes, the coordinates of any one of the monitoring nodes Qj in Q are (xj,yj), j=1, 2,3, & m, and the monitoring area is defined as a rectangular area with the size of l×w.
As a preferable scheme of the invention, in the S1, Rc=2Rp is arranged, so that effective communication between sensor nodes can be ensured and stable connection of the whole wireless sensor network can be maintained.
As a preferable scheme of the invention, in the step S2, the method for establishing the coverage rate mathematical model of the sensor node is as follows:
S21, calculating a distance matrix D of the sensor node and the monitoring node, wherein the formula is as follows:
;
Wherein Dij represents the distance between vi and qj, and calculating each Dij to obtain an integral distance matrix D;
S22, calculating a distance matrix A among the sensor nodes, wherein the formula is as follows:
;
Wherein, Aik represents the distance between vi and the sensor node vk, k=1, 2,3,..n and k is not equal to i;
S23, based on a Boolean perception model, a monitoring probability formula of a single sensor node to qj is as follows:
;
where per(vi,qj) represents the probability that vi is able to monitor qj;
s24, the joint perception probability of all the sensor node pairs qj is expressed as:
;
Where Pjoint(V,qj) represents the joint coverage probability of all the sensor node sets V to the monitoring node qj;
S25, dividing a monitoring area into L multiplied by W grids with equal areas, wherein the center of each grid represents one monitoring node, and the coverage rate Cr is expressed as:
;
wherein x and y represent coordinates of the center of the grid, and the coordinates are continuously increased from the origin of the coordinate axes to represent the center points of L multiplied by W grids; I.e. represent the firstAnd the proportion of the wireless sensor network covering the monitoring area is represented by Cr.
As a preferred embodiment of the present invention, in S3, the tangential prize termExpressed as:
;
In the formula,E is an indication function, when the condition in brackets is satisfied, E is equal to 1, otherwise E is equal to 0, (xi,yi) is the two-dimensional coordinate of vk;
objective function of high coverage wireless sensor network optimization arrangementExpressed as:
;
In the formula,Is a weight factor that balances the contribution of the tangent rewards.
As a preferred embodiment of the present invention, in S4, the nonlinear convergence factor is expressed as:
;
wherein MaxIter is the maximum iteration number, and iter is the current iteration number;
Genetic variation strategies include genetic strategies expressed as:
;
where mod represents the remainder; Is a congruence symbol;、、 Respectively representing three wolf individuals with highest fitness in the population, wherein p represents the p-th solution in the population (the wolf individuals are potential solutions), and Xp represents the p-th wolf individuals of the sub-generation;
expression typeThe remainder of p divided by 3 is mathematically represented as1, the remainder and so on;
the variation strategy is to randomly select the dimension dr:
;
wherein d is the size of the population dimension, randint is a function call for generating a random integer, then:
;
In the formula,Representing the p-th wolf individual after mutation in the dimension dr, r being random numbers uniformly distributed in [0,1] for determining whether mutation occurs, QT being mutation rate representing the probability of mutation, N (0, 1) being standard normal distribution for introducing random disturbance, ms being mutation intensity for controlling the intensity of mutation applied to the wolf individual;
the mechanism of variation of the cauchy distribution is that the cauchy distribution function is expressed as:
;
Wherein C represents a cauchy distribution variable for mutation; Is a location parameter indicating a distribution peak; The random number is a uniformly distributed random number between 0 and 1;
after the current global optimal solution is obtained, updating the current global optimal solution by using the cauchy variation, wherein the updating is expressed as follows:
;
In the formula,Representing the new coordinates of the global optimal solution in the q-th dimension; representing the coordinates of the global optimal solution in the q-th dimension; representing the random number extracted from a standard cauchy distribution.
In the preferred scheme of the invention, in the genetic strategy, the genetic strategy is applied to 3 wolf individuals with highest fitness, the excellent characteristics of the genetic strategy are sequentially transferred to 5 wolf individuals of the next generation so as to ensure that the optimal individuals are reserved and the diversity of the population is increased, at the moment, p=1, 2,3,4,5 represents that the genetic strategy acts on 5 wolf individuals in the offspring, in the mutation strategy, the wolf individuals with the fitness rank of 4 to N are subjected to mutation operation, then the fitness ranking is carried out again, the individuals with the last two fitness bits are eliminated, and the offspring individuals are generated, wherein N is the population number.
As a preferred solution of the present invention, in S5, the specific method for obtaining the final optimized sensor node arrangement solution is as follows:
S51, in GWO after modification, the set of sensor nodes is expressed as:
;
Wherein X represents an overall matrix; Representing the position of the Nth wolf individual in the search space in the dimension d; each wolf individual contains the number and position information of all sensor nodes;
S52, the initial position of the I-th wolf individual is XI, i=1, 2,3,..n, N is the population number, each wolf individual represents a potential arrangement, the position of each wolf individual is defined in solution space by the values of a set of candidate variables, XI is given by:
;
In the formula,、R is a random number uniformly distributed in the range of [0,1 ];
S53, dividing the wolf individuals into four grades according to the fitness value, wherein alpha, beta, gamma and omega are sequentially from highest to lowest, alpha, beta and gamma represent the wolf individuals with the top three ranks of fitness, namely three head wolves respectively corresponding to the current best solution, the suboptimal solution and the general solution;
S54, executing a surrounding strategy in GWO, and calculating the distance between the common wolf and the head wolf:
;
;
In the formula,Is a vector representing the distance between the common wolf and the head wolf Y; Is the influence ofCoefficients of (2); A position vector representing the head wolf Y at time t; A position vector representing the common wolf at time t; Is a random vector uniformly distributed in the range [0,1 ];
S55, updating the position of the common wolves according to the distance between the common wolves and the head wolves, wherein the position is expressed as follows:
;
;
wherein, the factor is the nonlinear convergence factor in S4; representing the current position vector of the head wolf Y; The coefficient is used for influencing the update position, and the factor is used for controlling and adjusting the amplitude during calculation; Is subject toUpdated location of the effect; Is a random vector uniformly distributed in the range [0,1 ];
s56, updating a formula of the population position:
;
In the formula,Is the position vector updated in the next time step and represents the average position of the current head wolf;
S57, multi-direction surrounding is carried out, three wolves of alpha, beta and gamma surround a prey from different directions, and the whole solution space is explored through multi-direction searching;
S58, in the iterative search process, dynamically adjusting the enclosure by controlling the size of the factor, and searching an optimal solution, wherein the optimal solution is the sensor node arrangement scheme which covers the monitoring area to the maximum extent.
In the preferred embodiment of the present invention, in the step S58, the factor is gradually narrowed in the iterative process, so as to narrow the search range and gradually tighten the surrounding ring.
In the preferred scheme of the invention, in the step S5, the iteration termination condition is that the iteration number reaches 300 times of the maximum iteration number, or the coverage rate of the wireless sensor network to the monitoring area is higher than a set coverage rate threshold.
The algorithm according to the present invention may be executed by an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the algorithm calculation being implemented by the processor executing software.
The invention has the beneficial effects that:
The invention ensures that the redundancy of coverage areas among the sensor nodes is reduced while ensuring high coverage rate, thereby reducing the energy consumption of sensor data processing and improving the overall performance of the wireless sensor network. The method not only needs to have stronger global searching capability, but also can adapt to dynamic environment, and ensures that the whole coverage of a target area to be monitored is realized under the condition of limited sensor node number, so that the accuracy and the instantaneity of forest environment monitoring are ensured.
The invention combines the gray wolf optimization algorithm and a plurality of improvement strategies thereof, including nonlinear convergence factors, genetic variation strategies and cauchy variation, effectively optimizes the sensor node arrangement of the forest monitoring wireless sensor network, not only makes up the defects of the traditional gray wolf optimization algorithm, but also has excellent performance in the aspects of convergence, global searching capability and robustness. Meanwhile, a new objective function is constructed based on a coverage rate mathematical model and node tangent rewarding items of the forest monitoring wireless sensor network. The objective function not only considers coverage rate, but also tries to optimize the spatial arrangement of the sensor nodes and reduce redundant coverage so as to enable the configuration of the sensor nodes to be more reasonable. The method effectively combines practicality and theoretical optimization, and optimizes the overall performance of the network by adjusting the spatial distribution of the sensors. The coverage rate and the energy consumption of the optimized wireless sensor network are obviously improved, and the node redundancy is obviously reduced.
According to the invention, the position of the sensor node is automatically adjusted by using a variant gray wolf optimization algorithm, the balance of global and local searching is controlled by combining a nonlinear convergence factor, the genetic variation strategy increases the diversity of the population, the cauchy variation further improves the global searching capability, and the risk of falling into a local optimal solution is avoided. The introduction of the tangent rewarding item further reduces node redundancy, optimizes the spatial distribution of the sensor and remarkably improves the overall performance of the network. This combination strategy ensures that the system achieves higher coverage and energy consumption control in complex monitoring scenarios.
The method is not only suitable for forest monitoring, but also has wide application prospect, and can be popularized to the fields of other large-scale environment monitoring, agricultural sensor networks and the like. By improving the optimization algorithm, the coverage efficiency and the energy consumption control of the network are obviously improved, and an effective solution is provided for a complex monitoring scene.
Detailed Description
Embodiments of the invention are further described below with reference to the accompanying drawings:
as shown in fig. 1, a sensor node arrangement method for forest monitoring includes the steps of:
S1, setting a sensing radius, a communication radius and a monitoring area of a sensor node, and generating random distribution information of the sensor node in the monitoring area, wherein the sensor node is a wireless sensor node;
s2, calculating the coverage condition of each sensor node to the monitoring area based on the Boolean perception model, and further establishing a coverage rate mathematical model of the sensor nodes;
s3, introducing a coverage rate mathematical model and a tangent rewarding item into the arrangement process of the sensor nodes to form an objective function of the optimal arrangement of the wireless sensor network;
S4, introducing a gray wolf optimization algorithm GWO, improving the gray wolf optimization algorithm, taking the objective function in the S3 as a fitness function, and gradually optimizing the positions of sensor nodes by simulating the hunting behavior of the gray wolves, wherein the improvement comprises the steps of replacing a linear convergence factor of GWO with a nonlinear convergence factor, introducing a genetic variation strategy in GWO and a variation mechanism based on the Coxie distribution;
S5, based on random deployment, the position distribution of the sensor nodes is dynamically adjusted according to the deployment strategy generated by the improved GWO by collecting the random distribution information of the sensor nodes so as to improve the coverage rate of the wireless sensor network and optimize the energy consumption of the sensor nodes, the monitoring area is covered to the maximum extent through multiple iterations, and when the iteration termination condition is met, the final position of each sensor node is output, and the final optimized sensor node arrangement scheme is obtained.
In the S1, sensor nodes in a wireless sensor network are set to be isomorphic, the sensing radius of the sensor nodes is Rp, the communication radius is Rc, a sensor node set V is expressed as V= { V1,v2,v3,…,vn }, n is the number of the sensor nodes, two-dimensional coordinates of any one of the sensor nodes Vi in the V are expressed as (xi,yi), i=1, 2,3, and n, monitoring nodes are arranged in a monitoring area, a monitoring node set Q is expressed as Q= { Q1,q2,q3,…,qm }, m is the number of the monitoring nodes, coordinates of any one of the monitoring nodes Qj in the Q are (xj,yj), j=1, 2,3, and m, and the monitoring area is defined as a rectangular area with the size of L×W. And Rc=2Rp is arranged, so that effective communication between sensor nodes can be ensured, and stable connection of the whole wireless sensor network is maintained.
In S2, the method for establishing the coverage rate mathematical model of the sensor node comprises the following steps:
S21, calculating a distance matrix D of the sensor node and the monitoring node, wherein the formula is as follows:
;
Wherein Dij represents the distance between vi and qj, and the distance matrix D of the whole can be obtained by calculating each Dij;
S22, calculating a distance matrix A among the sensor nodes, wherein the formula is as follows:
;
Wherein, Aik represents the distance between vi and the sensor node vk, k=1, 2,3,..n and k is not equal to i, and the whole distance matrix A can be obtained by calculating each Aik, wherein the distance matrix A is a key tool for the design and optimization of the wireless sensor network, which is beneficial to enhancing the stability, connectivity and coverage performance of the network;
S23, based on a Boolean perception model, a monitoring probability formula of a single sensor node to qj is as follows:
;
where per(vi,qj) represents the probability that vi is able to monitor qj;
If Dij is less than or equal to the sensing radius Rp, the monitoring node is considered to be covered, and vice versa, this binary coverage model is typically used for wireless sensor networks to simplify the representation of sensing capability and facilitate coverage optimization analysis;
s24, the joint perception probability of all the sensor node pairs qj is expressed as:
;
Wherein Pjoint(V,qj) represents the joint coverage probability of all the sensor node sets V to the monitoring node qj, and the purpose is to calculate the total probability of the monitoring node being covered under the action of a plurality of sensor nodes;
S25, dividing a monitoring area into L multiplied by W grids with equal areas, wherein the center of each grid represents one monitoring node, and the coverage rate Cr is expressed as:
;
wherein x and y represent coordinates of the center of the grid, and the coordinates are continuously increased from the origin of the coordinate axes to represent the center points of L multiplied by W grids; I.e. represent the firstAnd the proportion of the wireless sensor network covering the monitoring area is represented by Cr.
The invention further analyzes the geometrical relationship between the communication range and the sensing range of the sensor node. The aim is to achieve a tangential state by precisely adjusting the distance between the sensor nodes, thereby maximizing the coverage area and reducing overlap, thereby improving overall energy efficiency. To achieve this goal, a novel tangential prize term is introduced that excites the sensor nodes to maintain optimal distance, thereby optimizing network layout and ensuring optimal utilization of energy resources.
In S3, a tangential prize itemExpressed as:
;
In the formula,E is an indication function, when the condition in brackets is satisfied, E is equal to 1, otherwise E is equal to 0, (xi,yi) is the two-dimensional coordinate of vk; quantifying spatial optimization by rewarding the configuration of sensor node tangential alignment, thereby enhancing overall coverage efficiency;
objective function of high coverage wireless sensor network optimization arrangementExpressed as:
;
In the formula,Is a weight factor that balances the contribution of the tangent rewards.
The location update formula in non-linear convergence factor GWO generally depends on the factor of the linear decay, which gradually decreases from a higher value to a lower value as the number of iterations increases. This linear change may result in the algorithm performing a relatively coarse global search in the early stages and a fine local search in the later stages. However, such simple linear damping sometimes results in too fast convergence speed and may prematurely fall into a local optimum. The convergence factor is reasonably designed according to the iteration times. The results indicate that the designed nonlinear factor can help the improved GWO to better balance the ability of global and local searches.
In S4, the nonlinear convergence factor is expressed as:
;
wherein MaxIter is the maximum iteration number, and iter is the current iteration number;
in the initial stage of the iteration,Only when the iter is increased, will it appearBy introducing nonlinear terms, balance is realized between global exploration and local development, and adaptability and flexibility of the algorithm are enhanced. The method can provide strong global searching capability in the initial iteration stage, gradually reduces convergence factors to improve local searching precision, thereby avoiding trapping in local optimal traps and improving overall searching efficiency. Finally, the design not only quickens the convergence speed, but also improves the probability of finding the globally optimal solution.
GWO optimize node position by simulating the hunting behavior of wolves, but are easily limited to initial positions, resulting in sinking into a locally optimal solution. To overcome this limitation, the present invention introduces a mechanism of genetic variation. First, a genetic strategy is applied to the three wolves with highest fitness and its characteristics are sequentially transferred to the other five wolves to ensure that the optimal individuals are preserved and the diversity of the population is increased. Secondly, the random variation is carried out on the positions of the rest individuals in the optimization process, so that the diversity of node distribution is further increased, and the coverage range is further improved. The mutation operation can adjust the position of the node to better cover the key area or the uncovered blind area, thereby improving the coverage effect of the whole network.
Genetic variation strategies include genetic strategies expressed as:
;
where mod represents the remainder; Is a congruence symbol;、、 respectively representing three wolf individuals with highest fitness in the population, wherein p represents the p-th solution in the population, and Xp represents the p-th wolf individual of the sub-generation;
the variation strategy is to randomly select the dimension dr:
;
wherein d is the size of the population dimension, and:
;
In the formula,Representing the p-th wolf individual after mutation in the dimension dr, r being random numbers uniformly distributed in [0,1] for determining whether mutation occurs, QT being mutation rate representing the probability of mutation, N (0, 1) being standard normal distribution for introducing random disturbance, ms being mutation intensity for controlling the intensity of mutation applied to the wolf individual;
Aiming at the problem that the traditional GWO is easy to fall into local optimum, the invention introduces a variation mechanism based on the Cauchy distribution, and enhances the global searching capability of the algorithm by increasing population diversity. The Cauchy distribution is characterized by an apparent peak at the center and a heavier tail at both ends. By utilizing the characteristic, the cauchy variation can introduce significant disturbance in the neighborhood of the solution, so that the search range is greatly enlarged, and the possibility of escaping from local optimum is increased.
The mechanism of variation of the cauchy distribution is that the cauchy distribution function is expressed as:
;
Wherein C represents a cauchy distribution variable for mutation; Is a location parameter indicating a distribution peak; The random number is uniformly distributed between 0 and 1, pi is used in a tangent function, and variability in a mutation process is introduced;
after the current global optimal solution is obtained, updating the current global optimal solution by using the cauchy variation, wherein the updating is expressed as follows:
;
In the formula,Representing the new coordinates of the global optimal solution in the q-th dimension; representing the coordinates of the global optimal solution in the q-th dimension; Representing the random number extracted from a standard cauchy distribution. The method introduces randomness into the optimization process, enhances the ability of the algorithm to widely explore the solution space, and reduces the risk of premature convergence to local optima.
In the genetic strategy, aiming at 3 wolf individuals with highest fitness, applying the genetic strategy, sequentially transmitting the excellent characteristics of the genetic strategy to 5 wolf individuals of the next generation to ensure that the optimal individuals are reserved and the diversity of the population is increased, wherein at the moment, p=1, 2,3,4,5 represents that the genetic strategy acts on 5 wolf individuals in the offspring, in the mutation strategy, the wolf individuals with the fitness rank of 4 to N are subjected to mutation operation, then the fitness rank is carried out again, and the individuals with the last two fitness ranks are eliminated, so that offspring individuals are generated, and N is the population number.
In coverage optimization studies of forest monitoring wireless sensor networks based on an improved wolf optimization algorithm (GVGWO), a key task is to determine how to deploy these sensor nodes with a known number of sensors in order to maximize the coverage of the network. This involves finding the optimal position of the sensor within the target area in order to achieve as complete coverage of the area as possible.
In S5, the specific method for obtaining the final optimized sensor node arrangement scheme is as follows:
S51, in GWO after modification, the set of sensor nodes is expressed as:
;
Wherein X represents an overall matrix; Representing the position of the Nth wolf individual in the search space in the dimension d; each wolf individual contains the number and position information of all sensor nodes;
namely the position of the 1 st wolf individual in the search space under the dimension d; namely, the 1 st dimension of the 1 st wolf individual is the 1 st dimension, and the rest symbols are pushed by the same way;
S52, the initial position of the I-th wolf individual is XI, i=1, 2,3,..n, N is the population number, each wolf individual represents a potential arrangement, the position of each wolf individual is defined in solution space by the values of a set of candidate variables, XI is given by:
;
In the formula,、The formula ensures that the initial position of each wolf individual is randomly distributed in a preset search space, certain fluctuation is introduced through a sine function, the diversity of population is enhanced, and the global searching capability is improved;
S53, dividing the wolf individuals into four grades according to the fitness value, wherein alpha, beta, gamma and omega are sequentially arranged from the highest to the lowest, alpha, beta and gamma represent the wolf individuals with the top three ranks of fitness, namely three head wolves respectively corresponding to the current optimal solution, the suboptimal solution and the general solution, the rest wolf individuals omega are common wolves and represent candidate solutions, and the fitness function is an objective function in S3;
The surrounding strategy of GWO is designed according to hunting behaviors of the wolves, and the wolves approach and capture the hunting objects through cooperation and class behaviors (alpha, beta, gamma and omega), GWO effectively explores and utilizes a solution space by simulating the complex surrounding strategy to gradually approach an optimal solution, and the core of the surrounding strategy is to dynamically adjust the positions of individual wolves so that the whole wolves gradually surround the hunting objects and continuously tighten a surrounding ring;
S54, executing a surrounding strategy in GWO, and calculating the distance between the common wolf and the head wolf:
;
;
In the formula,Is a vector representing the distance between the common wolf and the head wolf Y; Is the influence ofIs typically used to adjust the step size or weight; A position vector representing the head wolf Y at time t; A position vector representing the common wolf at time t; is a random vector uniformly distributed in the range 0,1, introducing randomness and diversity to avoid local optimum, expressionWill beScaling to a larger range further affects the degree and direction of location update;
S55, updating the position of the common wolves according to the distance between the common wolves and the head wolves, wherein the position is expressed as follows:
;
;
wherein, the factor is the nonlinear convergence factor in S4; representing the current position vector of the head wolf Y; The coefficient is used for influencing the update position, and the factor is used for controlling and adjusting the amplitude during calculation; Is subject toUpdated location of the effect; Is a random vector uniformly distributed in the range [0,1], and introduces variability for updating;
s56, updating a formula of the population position:
;
In the formula,The average method promotes the optimization process by guiding the search to the center of the current optimal solution;
s57, multi-direction surrounding is carried out, three wolves of alpha, beta and gamma surround a prey from different directions, and the whole solution space is explored through multi-direction searching;
S58, in the iterative search process, dynamically adjusting the enclosure by controlling the size of the factor, and searching an optimal solution, wherein the optimal solution is the sensor node arrangement scheme which covers the monitoring area to the maximum extent. In the iterative process, the factor is gradually reduced, so that the search range is reduced, and the surrounding ring is gradually tightened.
In the early stage of iteration, a wide search range (global search) is kept through a larger factor, and in the later stage of iteration, the search range (local search) is narrowed through a smaller factor, and the surrounding ring is gradually tightened. By simulating the hunting behavior of the wolves, GWO can effectively adjust the arrangement of the sensor nodes so as to cope with complex geographic conditions and environmental changes, and the performance and stability of the whole wireless sensor network are improved.
And S5, the iteration termination condition is that the iteration times reach 300 times of maximum iteration times, or the coverage rate of the wireless sensor network to the monitoring area is higher than a set coverage rate threshold value. The coverage threshold value may be set as needed, for example, to 95% or more.
The verification process is as follows:
the improved GWO (GVGWO) is compared with the traditional GWO and GWO variants (IGWO) through simulation experiments, and the simulation experiments compare the optimized coverage rate and sensor node distribution, so that the practicability of GVGWO is better embodied. Experiments are carried out on a computer provided with an i5 dual-core CPU, the main frequency is 2.4GHz, the memory is 8GB, the system is Windows11, and experimental simulation software adopts matlab 2018a.
In order to compare the performance of several methods in the coverage optimization of the Forest Monitoring Wireless Sensor Network (FMWSN), unified public parameters are set to ensure fairness and objectivity of the experiment, and the deployment flow is shown in fig. 5. The method comprises initializing network parameters, randomly deploying position information of each sensor (namely sensor nodes), establishing communication and performing deployment optimization by using an algorithm.
The initial population size N of all algorithms is set to 40, the population dimension is set to N (N is the number of sensor nodes, i.e. d=n at this time), the iteration number MaxIter is set to 300, the experiment number is 20, and on this basis, the comparison with other population intelligent algorithms (IGWO, GWO) is performed. Simulation limits for different monitoring areas, node sensor point numbers, sensor node sensing radii and communication radii are shown in table 1, and the coverage area is in m units. Based on the restrictions in table 1, the network coverage after optimization of each method is shown in table 2. When the method is applied to FMWSN, in actual forest sensor network coverage, because the communication distance between sensor nodes is limited due to environmental shielding factors, a limit 1 (namely, the short for limiting the condition 1, the following same) is set in a communication distance range of 8+/-2 (m), a limit 2 and a limit 3 are set in simulation, and a limit 4 is set in a communication distance range of 4+/-1 (m) in simulation. As long as the communication distance in the simulation result is within a defined range, the communication is considered valid. To study the response of the sensor nodes in the event of a fault, a uniform fault rate of 5% was set when the sensor nodes were deployed (i.e., arranged).
Table 1 network parameter settings
Table 2 coverage of each deployment algorithm
Fig. 2 shows simulation results of the GVGWO, IGWO and GWO algorithms under four different constraints, namely coverage visualization comparisons. The result shows that GVGWO algorithm obtains the highest coverage rate under all test conditions, and becomes a preferable scheme for optimizing sensor network deployment. Specifically, in constraint 1, GVGWO achieved coverage up to 99.70% 1.07%, 6.17% and 17.4% higher than IGWO, GWO and random deployment, respectively. After 80 iterations, the coverage of GVGWO was increased to 97.20% over IGWO and GWO by 2.00% and 14.72%, respectively. Under constraint 2, GVGWO still achieved 96.73% coverage, 1.26% and 20.38% higher than IGWO and GWO, respectively, despite the 10 node reduction. In addition, after 140 iterations, GVGWO successfully avoid local optima, exhibit higher convergence accuracy, and verify the effectiveness of the cauchy variation strategy.
Under the condition of the limitation 4, compared with the condition of the limitation 1, the number of the sensor nodes is reduced by 15, and experimental data show that the coverage rate of GVGWO reaches 94.36 percent, which is 2.97 percent and 22.44 percent higher than IGWO and GWO respectively. In addition, after 70 iterations, the coverage rate of GVGWO is up to 90.44%, while the coverage rate of the other two algorithms is far lower than that of the GVGWO algorithm, which shows that the GVGWO algorithm can still maintain higher coverage efficiency and stability under the condition of reducing the sensor nodes and coverage areas.
Fig. 3 and 4 show simulation results of the GVGWO, IGWO and GWO algorithm optimizing sensor node deployment under constraint 1 and constraint 3 ("x" represents sensor node location, circle is sensing area). The results show that under the same conditions, increasing the number of sensor nodes can improve coverage and reduce coverage redundancy, but blind areas still exist. Random deployment under constraint 1 in fig. 3 results in node maldistribution, with greater coverage redundancy and dead zones, while IGWO and GWO improve distribution, but still leave uncovered areas and redundant nodes. In contrast GVGWO optimizes a significantly uniform distribution of nodes, almost completely covering the monitored area, exhibiting the best coverage effect. Simulation shows that GVGWO has great potential in improving FMWSN coverage performance, and has important significance in constructing an efficient forest monitoring system. Meanwhile, the failed node enters a sleep state, so that the number of sensor nodes actually participating in optimization is reduced to 50 in fig. 3 and 30 in fig. 4 (the limitation in table 2 is the actual number of sensor nodes after the failure rate is considered).
By combining the improved gray wolf optimization algorithm with the tangent rewarding term, the simulation research is carried out on the sensor node arrangement in forest monitoring, the experimental result is shown in table 2, and the effectiveness of the method in complex wireless sensor network deployment is verified. Simulation results show that the coverage rate of the network is remarkably improved by the new algorithm, and node redundancy is reduced. Particularly, by introducing the tangent rewarding item, the redundancy of the sensor node is effectively controlled, and good application prospect is shown. The invention provides a brand new thought for realizing high coverage rate sensor node arrangement, and lays a solid foundation for further research in related fields.
In the verification process, a GVGWO algorithm flow chart is shown in fig. 6. The complete algorithm flow is that after parameter initialization, the fitness value is calculated and ordered, three wolves alpha, beta and gamma are recorded according to the ordering, inheritance and variation are carried out according to the corresponding strategies, the fitness value is calculated and ordered again after inheritance and variation, then the nonlinear convergence factor is calculated, the position of the common wolves is updated, the fitness value is calculated, the Coxie variation strategy is applied to return the wolves with the optimal fitness, one iteration is completed, and the iteration is finished when the iteration times reach a preset value (the maximum iteration times). The iteration termination condition may also be set to achieve the desired coverage.
In addition, fig. 2, fig. 3 and fig. 4 show visual analysis of coverage rate and sensor node distribution, and experimental results show that the algorithm provided by the invention is excellent in improving the coverage rate of a forest monitoring network, and the redundant coverage is greatly reduced through a tangent rewarding mechanism, so that the overall performance and stability of the wireless sensor network are obviously improved, and the feasibility and practicability of the algorithm are further proved.
In a simulation experiment, the result display of combining the optimization algorithm provided by the invention with the tangent rewarding item shows that the new algorithm has obvious effect on the treatment of the complicated node arrangement optimization problem. Compared with the traditional random deployment method, the coverage rate of the optimized deployment method is improved by more than 17%, the redundancy of sensor nodes is greatly reduced, and the improved algorithm is obviously improved in the aspects of coverage efficiency, resource utilization and redundancy control. The optimization arrangement provides a more efficient and intelligent solution for forest monitoring, and the simulation research provides important theoretical support and practical reference for further optimization and application of the algorithm.