Wireless sensor network coverage optimization method based on evolutionary algorithm
Through improved evolutionary algorithms, optimize the node position of the wireless sensor network and use environmental knowledge to guide the direction of motion, solving the problem of traditional algorithms falling into local optimality and improving coverage efficiency.
Patent Information
- Application Number
- CN202510669513.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-07-25
AI Technical Summary
Traditional evolutionary algorithms are prone to falling into local optimization in wireless sensor network coverage optimization, resulting in inefficient coverage.
Using improved evolutionary algorithms, the diffusion motion speed and collision motion speed formulas guided by environmental knowledge are optimized to optimize the position of wireless sensor nodes, reduce the local optimal probability, and improve coverage efficiency.
The coverage efficiency of wireless sensor network is improved, the probability of falling into local optimality is reduced, and better coverage effect is achieved.
Smart Images

Figure CN120378916A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless sensor networks, and in particular to a method for optimizing the coverage of a wireless sensor network based on an evolutionary algorithm. Background Art
[0002] At present, wireless sensor networks play an important role in industrial production. A wireless sensor network consists of a large number of sensor nodes. These sensor nodes communicate with each other to achieve the monitoring and perception of a specific area. The deployment location of the sensor nodes usually affects the monitoring and perception effect of the wireless sensor network to a great extent. In order to more effectively play the monitoring and perception role of the wireless sensor network, engineers often need to optimize the coverage effect of the wireless sensor network.
[0003] The coverage optimization of wireless sensor networks is a complex optimization problem. To solve the coverage optimization problem of wireless sensor networks, many engineers use evolutionary algorithms to optimize the coverage effect of wireless sensor networks [Wang Minghua, Huang Chang, Wang Yan, et al. Research progress on node redeployment in wireless sensor networks [J]. Application Research of Computers, 2023, 40(04): 978-986]. However, when traditional evolutionary algorithms are applied to the coverage optimization of wireless sensor networks, they are prone to falling into local optima. Summary of the Invention
[0004] The present invention provides a method for optimizing the coverage of a wireless sensor network based on an evolutionary algorithm. To a certain extent, it overcomes the drawback that traditional evolutionary algorithms are prone to falling into local optima when applied to the coverage optimization of wireless sensor networks. The present invention can improve the coverage efficiency of wireless sensor networks.
[0005] The technical solution of the present invention: A method for optimizing the coverage of a wireless sensor network based on an evolutionary algorithm, comprising the following steps:
[0006] Step 1, input the number Dim of wireless sensor nodes in the wireless sensor network, and the sensing radius NR of the wireless sensor nodes;
[0007] Step 2, set the population size PS and the maximum number of iterations Gm;
[0008] Step 3, set the current number of iterations G = 1;
[0009] Step 4, randomly generate a population Pop = {P1, P2,..., P ki ,..., P PS}, where P ki represents the ki-th individual in the population, and P ki = {P ki,1 , P ki,2,..., P ki,dj ,..., P ki,Dim}; Each individual in the population stores the positions of Dim wireless sensor nodes in the wireless sensor network; P ki,dj represents the position of the dj-th wireless sensor node in the ki-th individual in the population; the individual subscript ki = 1, 2,..., PS; the wireless sensor node subscript dj = 1, 2,..., Dim;
[0010] Step 5, initialize the historical diffusion motion distance list SAL = {SA1, SA2,..., SA ki ,..., SA PS}, and the historical collision motion distance list SBL = {SB1, SB2,..., SB ki ,..., SB PS}; where, SA ki = 0.0, SB ki = 0.0; SA ki represents the historical diffusion motion distance of the ki-th individual in the population; SB ki represents the historical collision motion distance of the ki-th individual in the population;
[0011] Step 6, calculate the fitness values of all individuals in the population;
[0012] Step 7, obtain the individual with the largest fitness value in the population, denoted as the optimal individual BP;
[0013] Step 8, if the current iteration number G is less than Gm, go to Step 9, otherwise go to Step 25;
[0014] Step 9, calculate the average diffusion motion distance μAL of the population according to formula (1);
[0015]
[0016] Step 10, calculate the average collision motion distance μBL of the population according to formula (2);
[0017]
[0018] Step 11, calculate the effective diffusion motion distance of each individual in the population according to formula (3);
[0019] AL ki = randn(μAL, 0.1) (3)
[0020] where, AL ki is the effective diffusion motion distance of the ki-th individual in the population, and randn is a normal random number generation function;
[0021] Step 12: Calculate the effective distance of collision movement for each individual in the population according to formula (4);
[0022] BL ki =randn(μBL,0.1) (4)
[0023] where BL ki is the effective distance of collision movement of the ki-th individual in the population;
[0024] Step 13: Calculate the diffusion movement speed of each individual in the population according to formula (5);
[0025]
[0026] where P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and P ki,sj is the position of the sj-th wireless sensor node of the ki-th individual in the population; DL ki,dj,sj is the distance between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; DV ki,dj,sj is the diffusion movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; the subscript sj of the diffused wireless sensor node is sj = 1, 2,..., Dim;
[0027] Step 14: Calculate the total diffusion movement speed of each individual in the population according to formula (6);
[0028]
[0029] where KV ki,dj is the total diffusion movement speed of the dj-th wireless sensor node of the ki-th individual in the population; DTM sj is the count value of the effective diffusion movement; DN is the total number of effective diffusion movements;
[0030] Step 15: Calculate the collision movement speed of each individual in the population according to formula (7);
[0031]
[0032] where P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and Y tj is the position of the tj-th obstacle in the deployment area; CL ki,dj,tjis the distance between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; CV ki,dj,tj is the collision movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; the obstacle subscript tj = 1, 2,..., TN; where TN is the number of obstacles in the deployment area;
[0033] Step 16, calculate the total collision movement speed of each individual in the population according to formula (8);
[0034]
[0035] where LV ki,dj is the total collision movement speed of the dj-th wireless sensor node of the ki-th individual in the population; CTM tj is the count value of effective collision movement; CN is the total number of effective collision movements;
[0036] Step 17, calculate the comprehensive movement speed of each individual in the population according to formula (9);
[0037] PV ki,dj = KV ki,dj + LV ki,dj (9)
[0038] where PV ki,dj is the comprehensive movement speed of the dj-th wireless sensor node of the ki-th individual in the population;
[0039] Step 18, generate the trial individual U ki ;
[0040] U ki,dj = P ki,dj + PV ki,dj (10)
[0041] where the trial individual U ki = {U ki,1 , U ki,2 ,..., U ki,dj ,..., U ki,Dim}, and U ki,dj is the position of the dj-th wireless sensor node in the trial individual U ki ;
[0042] Step 19, calculate the fitness value UFit ki of the trial individual U ki ;
[0043] Step 20, if UFit ki is greater than Fitki , then let P ki = U ki , otherwise keep P ki unchanged; where, Fit ki is the fitness value of the ki-th individual in the population;
[0044] Step 21, if UFit ki is greater than Fit ki , then let SA ki = AL ki , otherwise keep SA ki unchanged;
[0045] Step 22, if UFit ki is greater than Fit ki , then let SB ki = BL ki , otherwise keep SB ki unchanged;
[0046] Step 23, save the individual with the largest fitness value in the population to the optimal individual BP;
[0047] Step 24, set the current iteration number G = G + 1, and go to Step 8;
[0048] Step 25, extract the positions of Dim wireless sensor nodes from the optimal individual BP, and use the obtained positions of Dim wireless sensor nodes to deploy the wireless sensor nodes in the wireless sensor network, that is, to realize the coverage optimization of the wireless sensor network.
[0049] Furthermore, the calculation process of the fitness value is as follows:
[0050] For the individual P ki , first extract the positions of Dim wireless sensor nodes from the individual P ki ; using the obtained positions of Dim wireless sensor nodes and the sensing radius NR of the wireless sensor nodes, calculate the total coverage area SC ki of the Dim wireless sensor nodes in the deployment area, and calculate the coverage rate CP ki of the wireless sensor network according to formula (11); then set the fitness value Fit ki of the individual P ki = CP ki ;
[0051]
[0052] where, SR is the total area of the deployment area.
[0053] The beneficial effects of the present invention are as follows: The present invention utilizes an improved evolutionary algorithm to enhance the coverage efficiency of a wireless sensor network. In the improved evolutionary algorithm, the deployment positions of wireless sensor nodes are represented as individuals of the population in the evolutionary algorithm, and environmental knowledge is extracted according to the states of the individuals in the population in the deployment environment. A diffusion movement speed formula and a collision movement speed formula guided by environmental knowledge are designed, and environmental knowledge is used to guide the movement directions of the individuals in the population, greatly reducing the probability of falling into local optima, thereby enhancing the coverage efficiency of the wireless sensor network. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 FIG. is the coverage effect of a wireless sensor network optimized by applying a traditional evolutionary algorithm.
[0055] Figure 2 FIG. is the coverage effect of a wireless sensor network optimized by applying the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0056] The technical solutions of the present invention will be further specifically described below through embodiments in conjunction with the drawings.
[0057] Embodiment:
[0058] The specific implementation steps of the present invention in this embodiment in conjunction with the drawings are as follows:
[0059] Step 1, input the number of wireless sensor nodes Dim = 120 in the wireless sensor network and the sensing radius NR = 5 of the wireless sensor nodes;
[0060] Step 2, set the population size PS = 10 and the maximum number of iterations Gm = 500;
[0061] Step 3, set the current number of iterations G = 1;
[0062] Step 4, randomly generate a population Pop = {P1, P2,..., P ki ,..., P PS}, where P ki represents the ki-th individual in the population, and P ki = {P ki,1 , P ki,2 ,..., P ki,dj ,..., P ki,Dim}; each individual in the population stores the positions of Dim wireless sensor nodes in the wireless sensor network; P ki,dj represents the position of the dj-th wireless sensor node in the ki-th individual in the population; the individual subscript ki = 1, 2,..., PS; the wireless sensor node subscript dj = 1, 2,..., Dim;
[0063] Step 5, initialize the historical diffusion motion distance list SAL = {SA1, SA2,..., SA ki ,..., SA PS}, and the historical collision motion distance list SBL = {SB1, SB2,..., SB ki ,..., SB PS}; where SA ki = 0.0, SB ki = 0.0; SA ki represents the historical diffusion motion distance of the ki-th individual in the population; SB ki represents the historical collision motion distance of the ki-th individual in the population;
[0064] Step 6, calculate the fitness values of all individuals in the population;
[0065] Step 7, obtain the individual with the maximum fitness value in the population, denoted as the optimal individual BP;
[0066] Step 8, if the current iteration number G is less than Gm, go to Step 9, otherwise go to Step 25;
[0067] Step 9, calculate the average diffusion motion distance μAL of the population according to formula (1);
[0068]
[0069] Step 10, calculate the average collision motion distance μBL of the population according to formula (2);
[0070]
[0071] Step 11, calculate the effective diffusion motion distance of each individual in the population according to formula (3);
[0072] AL ki = randn(μAL, 0.1) (3)
[0073] where AL ki is the effective diffusion motion distance of the ki-th individual in the population, and randn is a normal random number generation function;
[0074] Step 12, calculate the effective collision motion distance of each individual in the population according to formula (4);
[0075] BL ki = randn(μBL, 0.1) (4)
[0076] where BL ki is the effective collision motion distance of the ki-th individual in the population;
[0077] Step 13: Calculate the diffusion movement speed of each individual in the population according to formula (5);
[0078]
[0079] where P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and P ki,sj is the position of the sj-th wireless sensor node of the ki-th individual in the population; DL ki,dj,sj is the distance between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; DV ki,dj,sj is the diffusion movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; the subscript sj of the diffused wireless sensor node is 1, 2,..., Dim;
[0080] Step 14: Calculate the total diffusion movement speed of each individual in the population according to formula (6);
[0081]
[0082] where KV ki,dj is the total diffusion movement speed of the dj-th wireless sensor node of the ki-th individual in the population; DTM sj is the count value of the effective diffusion movement; DN is the total number of effective diffusion movements;
[0083] Step 15: Calculate the collision movement speed of each individual in the population according to formula (7);
[0084]
[0085] where P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and Y tj is the position of the tj-th obstacle in the deployment area; CL ki,dj,tj is the distance between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; CV ki,dj,tj is the collision movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; the subscript tj of the obstacle is 1, 2,..., TN; where TN is the number of obstacles in the deployment area; in one embodiment, TN = 8;
[0086] Step 16: Calculate the total collision movement speed of each individual in the population according to formula (8);
[0087]
[0088] Among them, LV ki,dj is the total collision movement speed of the dj-th wireless sensor node of the ki-th individual in the population; CTM tj is the count value of effective collision movement; CN is the total number of effective collision movements;
[0089] Step 17, calculate the comprehensive movement speed of each individual in the population according to formula (9);
[0090] PV ki,dj = KV ki,dj + LV ki ,dj (9)
[0091] Among them, PV ki,dj is the comprehensive movement speed of the dj-th wireless sensor node of the ki-th individual in the population;
[0092] Step 18, generate the trial individual U ki ;
[0093] U ki,dj = P ki,dj + PV ki,dj (10)
[0094] Among them, the trial individual U ki = {U ki,1 , U ki,2 ,..., U ki,dj ,..., U ki,Dim}, and U ki,dj is the position of the dj-th wireless sensor node in the trial individual U ki ;
[0095] Step 19, calculate the fitness value UFit ki of the trial individual U ki ;
[0096] Step 20, if UFit ki is greater than Fit ki , then let P ki = U ki , otherwise keep P ki unchanged; among them, Fit ki is the fitness value of the ki-th individual in the population;
[0097] Step 21, if UFit ki is greater than Fit ki , then let SA ki = AL ki , otherwise keep SAki remain unchanged;
[0098] Step 22, if UFit ki is greater than Fit ki , then set SB ki = BL ki , otherwise keep SB ki unchanged;
[0099] Step 23, save the individual with the maximum fitness value in the population to the optimal individual BP;
[0100] Step 24, set the current iteration number G = G + 1, and go to Step 8;
[0101] Step 25, extract the positions of Dim wireless sensor nodes from the optimal individual BP, and use the obtained positions of Dim wireless sensor nodes to deploy the wireless sensor nodes in the wireless sensor network, that is, to achieve the coverage optimization of the wireless sensor network. In one embodiment, the coverage effect of the wireless sensor network optimized by the present invention is as Figure 2 shown. It can be seen from Figure 2 that the optimization effect of applying the present invention is better than the coverage effect optimized by the traditional evolutionary algorithm as Figure 1 shown.
[0102] In one embodiment, the calculation process of the fitness value is as follows:
[0103] For individual P ki , first extract the positions of Dim wireless sensor nodes from individual P ki ; use the obtained positions of Dim wireless sensor nodes and the sensing radius NR of the wireless sensor nodes to calculate the total coverage area SC ki of the Dim wireless sensor nodes in the deployment area, and calculate the coverage rate CP ki of the wireless sensor network according to formula (11); then set the fitness value Fit ki of individual P ki = CP ki ;
[0104]
[0105] where SR is the total area of the deployment area. In one embodiment, the total area SR of the deployment area is 10,000 square meters, and the fitness value Fit ki of individual P ki is 0.92.
Claims
1. A wireless sensor network coverage optimization method based on an evolutionary algorithm, characterized in that It includes the following steps: Step 1, input the number Dim of wireless sensor nodes in the wireless sensor network and the sensing radius NR of the wireless sensor nodes; Step 2, set the population size PS and the maximum number of iterations Gm; Step 3, set the current number of iterations G = 1; Step 4, randomly generate a population Pop = {P1, P2,..., P ki ,..., P PS}, where P ki represents the ki-th individual in the population, and P ki = {P ki,1 , P ki,2 ,..., P ki,dj ,..., P ki,Dim}; the position of Dim wireless sensor nodes of the wireless sensor network is stored in each individual in the population; P ki,dj represents the position of the dj-th wireless sensor node in the ki-th individual in the population; the individual subscript ki = 1, 2,..., PS; the wireless sensor node subscript dj = 1, 2,..., Dim; Step 5, initialize the historical diffusion motion distance list SAL = {SA1, SA2,..., SA ki ,..., SA PS}, and the historical collision motion distance list SBL = {SB1, SB2,..., SB ki ,..., SB PS}; where SA ki = 0.0, SB ki = 0.0; SA ki represents the historical diffusion motion distance of the ki-th individual in the population; SB ki represents the historical collision motion distance of the ki-th individual in the population; Step 6, calculate the fitness values of all individuals in the population; Step 7, obtain the individual with the largest fitness value in the population, denoted as the optimal individual BP; Step 8, if the current number of iterations G is less than Gm, go to Step 9, otherwise go to Step 25; Step 9, calculate the average distance μAL of the diffusion movement of the population according to formula (1); Step 10, calculate the average distance μBL of the collision movement of the population according to formula (2); Step 11, calculate the effective distance of the diffusion movement of each individual in the population according to formula (3); AL ki = randn(μAL, 0.1) (3) Among them, AL ki is the effective diffusion distance of the ki-th individual in the population, and randn is the normal random number generation function; Step 12, calculate the effective distance of the collision movement of each individual in the population according to formula (4); BL ki = randn(μBL, 0.1) (4) Among them, BL ki is the effective collision movement distance of the ki-th individual in the population; Step 13, calculate the diffusion movement speed of each individual in the population according to formula (5); Among them, P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and P ki,sj is the position of the sj-th wireless sensor node of the ki-th individual in the population; DL ki,dj,sj is the distance between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; DV ki,dj,sj is the diffusion movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the sj-th wireless sensor node of the ki-th individual in the population; the subscript sj of the diffused wireless sensor node is sj = 1, 2,..., Dim; Step 14, calculate the total diffusion movement speed of each individual in the population according to formula (6); Among them, KV ki,dj is the total diffusion movement speed of the dj-th wireless sensor node of the ki-th individual in the population; DTM sj is the count value of the effective diffusion movement; DN is the total number of effective diffusion movements; Step 15, calculate the collision movement speed of each individual in the population according to formula (7); Among them, P ki,dj is the position of the dj-th wireless sensor node of the ki-th individual in the population, and Y tj is the position of the tj-th obstacle in the deployment area; CL ki,dj,tj is the distance between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; CV ki,dj,tj is the collision movement speed between the dj-th wireless sensor node of the ki-th individual in the population and the tj-th obstacle in the deployment area; the obstacle subscript tj = 1, 2,..., TN; where TN is the number of obstacles in the deployment area; Step 16, calculate the total collision movement speed of each individual in the population according to formula (8); Among them, LV ki,dj is the total collision movement speed of the dj-th wireless sensor node of the ki-th individual in the population; CTM tj is the count value of the effective collision movement; CN is the total number of effective collision movements; Step 17, calculate the comprehensive movement speed of each individual in the population according to formula (9); PV ki,dj = KV ki,dj + LV ki,dj (9) Among them, PV ki,dj is the comprehensive motion speed of the dj-th wireless sensor node of the ki-th individual in the population; Step 18, generating a test individual U according to formula (10) ki ; U ki,dj = P ki,dj + PV ki,dj (10) Among them, the test individual U ki ={U ki,1 , U ki,2 ,..., U ki,dj ,..., U ki,Dim}, and U ki,dj is the position of the dj-th wireless sensor node in the test individual U ki . Step 19, calculate the fitness value UFit of the test individual U ki ; ki ; Step 20, if UFit ki is greater than Fit ki , then let P ki = U ki , otherwise keep P ki unchanged; where Fit ki is the fitness value of the ki-th individual in the population. Step 21, if UFit ki is greater than Fit ki , then set SA ki = AL ki , otherwise keep SA ki unchanged; Step 22, if UFit ki is greater than Fit ki , then set SB ki = BL ki , otherwise keep SB ki unchanged; Step 23, save the individual with the largest fitness value in the population to the optimal individual BP; Step 24, set the current number of iterations G = G + 1, and go to Step 8; Step 25, extract the positions of Dim wireless sensor nodes from the optimal individual BP, and use the obtained positions of Dim wireless sensor nodes to deploy the wireless sensor nodes in the wireless sensor network, that is, to achieve the coverage optimization of the wireless sensor network.
2. The wireless sensor network coverage optimization method based on an evolutionary algorithm according to claim 1, wherein The calculation process of the fitness value is as follows: For individual P ki , first extract the positions of Dim wireless sensor nodes from individual P ki ; using the obtained positions of Dim wireless sensor nodes and the sensing radius NR of the wireless sensor nodes, calculate the total coverage area SC ki of the Dim wireless sensor nodes in the deployment area, and calculate the coverage rate CP ki of the wireless sensor network according to formula (11); then set the fitness value Fit ki of individual P ki = CP ki ; where SR is the total area of the deployment area.