Three-dimensional wireless sensor arrangement method based on particle swarm optimization algorithm
By combining particle swarm optimization, back learning, and Taguchi theory to optimize the arrangement of sensor nodes, the problem of traditional algorithms easily getting trapped in local optima and ignoring obstacles in three-dimensional space is solved, achieving efficient coverage and enhanced robustness.
Patent Information
- Application Number
- CN202511426782.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional particle swarm optimization algorithms are prone to getting trapped in local optima in three-dimensional space, ignore actual obstacles leading to poor coverage, and have a large computational load, making them difficult to handle complex high-dimensional and dynamic problems.
By combining particle swarm optimization, back learning, Taguchi theory, and Rafflesia algorithm, and through position perturbation, velocity update, and particle deletion optimization strategies, along with obstacle detection methods, the arrangement of sensor nodes is optimized.
It improves the coverage and robustness of sensor networks, reduces computational load, enhances adaptability and coverage in complex environments, avoids local optima, and improves convergence speed.
Smart Images

Figure CN121568124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm, belonging to the field of wireless sensor technology. Background Technology
[0002] Wireless Sensor Networks (WSNs) consist of a large number of deployed sensor nodes (wireless sensor nodes) that collect and transmit data wirelessly. The Internet of Things (IoT) and smart cities are increasingly using WSNs, including in environmental monitoring, military reconnaissance, smart homes, and health monitoring. However, sensor nodes are typically limited by energy and hardware resources, while the deployment of wireless sensor networks often needs to cover large areas. Therefore, how to deploy sensor nodes with limited resources while ensuring the integrity of the coverage area and the accuracy of data collection is a key issue for wireless sensor networks.
[0003] Another challenge in wireless sensor networks is coverage. Practical applications require sensor nodes to cover every important location within a target area. However, the limited number of sensor nodes makes optimizing node deployment, maximizing coverage, and minimizing energy consumption a critical issue. Since wireless sensor nodes are typically battery-powered, and batteries have limited energy, they eventually run out. Therefore, implementing intelligent sleep mechanisms to extend the lifespan of wireless sensors is a key reason for addressing the coverage problem in wireless sensor networks.
[0004] After comprehensively considering coverage and energy consumption, the sensor deployment in three-dimensional space further complicates the coverage problem. In many applications, the target area is not just a single area but a three-dimensional space, such as environmental monitoring and building monitoring. Therefore, sensor node deployment must consider not only planar coverage but also three-dimensional coverage, making the research more complex. Thus, arranging sensor nodes in three-dimensional space to maximize coverage while minimizing energy waste is a current research hotspot in wireless sensor networks.
[0005] The Particle Swarm Optimization (PSO) algorithm is widely used in research and application of wireless sensor network coverage problems. However, inherent limitations of the PSO algorithm exist in practical applications. First, the PSO algorithm is prone to getting trapped in local optima, struggling to find the global optimum for complex, high-dimensional problems, resulting in slow convergence. Furthermore, wireless sensor networks are dynamic, susceptible to node failures and communication interference, making them vulnerable to these issues during operation. While adaptive criteria and collaborative optimization methods exist to address these problems, they are insufficient for complex and dynamic issues. Second, the PSO algorithm suffers from high computational costs in large-scale networks. The computational burden increases with network size, especially during real-time deployments requiring updates. While applicable to wireless sensor networks, these algorithms face significant challenges in handling dynamic environments, complex terrains, and large-scale networks. Summary of the Invention
[0006] The purpose of this invention is to provide a three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm, which can solve the problems of traditional PSO algorithm being prone to getting stuck in local optima and ignoring actual obstacles in the deployment of wireless sensors in complex three-dimensional terrain, resulting in poor coverage. While ensuring high convergence speed, it can improve the coverage of sensor network in real environment.
[0007] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for deploying three-dimensional wireless sensors based on a particle swarm optimization algorithm, comprising: Initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. Each consecutive fixed number of algorithm iterations is defined as an iteration cycle, and three optimization strategies are executed within each iteration cycle: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy: During the iteration cycle, after the last algorithm iteration, delete the particle with the worst fitness value in the particle swarm. Repeat the iteration until the iteration termination condition is met, and output the optimized particle positions as the sensor node arrangement scheme.
[0008] Building upon the first aspect, further, based on the position of the globally optimal particle, the formula for perturbing the position of particles with fitness values below the fitness threshold is as follows: ; in, This indicates the fitness value is lower than the fitness threshold. The position of each particle. This represents the position of the globally optimal particle. express and Euclidean distance, and These are randomly generated angle parameters.
[0009] Building upon the first aspect, the velocity and position update formulas for the particle swarm optimization algorithm are further as follows: ; in, , They represent the first , During the nth iteration The speed of each particle , They represent the first , During the nth iteration The position of each particle. Indicates inertia weight, Indicates the first The historical best position of each particle This indicates the globally best historical position. Represents individual learning factors. Represents social learning factors. and These are independent random numbers.
[0010] In conjunction with the first aspect, further adjustments to the particle positions using a reverse learning strategy include: Calculate the reverse position of the particle; If the opposite position of a particle has better fitness, then replace the current particle's position. The formula for adjusting the particle position in the reverse learning strategy is: ; in, Indicates the first The adjusted positions of the individual particles Indicates the first The position vectors of each particle. , They represent the first The maximum and minimum values of each particle in each dimension.
[0011] In conjunction with the first aspect, further updating the position of the globally optimal particle using the Taguchi strategy includes: Obtain the position of the current global best particle and the average position of the particle swarm; Multiple sets of new candidate particle positions are generated based on orthogonal arrays, where some dimensions are replaced with the position of the current global best particle, and some dimensions are replaced with the average position of the particle swarm. Calculate the fitness value of each group of candidate particle positions. If the fitness value of a certain group of candidate particle positions is better than the fitness value corresponding to the current global best particle position, then use the positions of the group of candidate particle positions to update the position of the current global best particle.
[0012] In conjunction with the first aspect, further details include: Based on the sensor node layout scheme, sensor nodes are deployed on the three-dimensional terrain, and target points are defined; The fitness of sensors is evaluated using obstacle detection-based coverage calculation methods, including: Calculate the horizontal and vertical slopes of the path from the sensor to the target point; Calculate the predicted height of each point on the path based on the horizontal and vertical slopes of the path from the sensor to the target point; Traverse each point on the path; if its height is greater than the predicted height, then determine that point as an obstacle. The coverage rate of the target point is calculated based on the obstacle detection results. The target point is determined to be covered only when there are no obstacles on the path.
[0013] In conjunction with the first aspect, the formula for calculating the horizontal slope of the path from the sensor to the target point is as follows: ; in, This represents the horizontal slope of the path from the sensor to the target point. Indicates the first The position coordinates of each sensor Indicates the position coordinates of the target point; The formula for calculating the elevation slope of the path from the sensor to the target point is: ; in, This represents the elevation slope of the path from the sensor to the target point. Indicates the height of the target point. This indicates the height of the sensor.
[0014] Secondly, the present invention provides a three-dimensional wireless sensor deployment system based on particle swarm optimization algorithm, comprising: The initialization module is used to initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. The iterative optimization module defines each consecutive fixed number of algorithm iterations as an iteration cycle. Within each iteration cycle, three optimization strategies are executed and iterated repeatedly until the iteration termination condition is met. The optimized particle positions are then output as the sensor node arrangement scheme. The three optimization strategies include: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy is to delete the particle with the worst fitness value from the particle swarm after the last algorithm iteration within the iteration cycle.
[0015] Thirdly, the present invention provides a computer device, comprising: Storage medium used to store computer programs; A processor for executing computer programs to implement the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm described in the first aspect.
[0016] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the three-dimensional wireless sensor deployment method based on the particle swarm optimization algorithm described in the first aspect.
[0017] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the three-dimensional wireless sensor deployment method based on the particle swarm optimization algorithm described in the first aspect.
[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention provides a 3D wireless sensor deployment method based on particle swarm optimization (PSO). This method improves upon the parallel optimization strategies of PSO, back-learning, Taguchi theory, and the Rafflesia algorithm to address wireless sensor coverage problems. PSO provides powerful global search capabilities, preventing the search process from getting trapped in local optima within a large search space. Back-learning leverages prior learning experience to optimize the search process, reduce the number of searches, and increase convergence speed. Finally, Taguchi theory optimizes the particles, improving the system's robustness and noise tolerance, resulting in stable and reliable results. The Rafflesia parallel optimization strategy enhances the solution capability and increases the model's solution rate. Furthermore, this invention proposes a simple, effective, and practical obstacle detection method with strong model adaptability and high computational optimization rate, making it more suitable for solving complex optimization problems related to 3D wireless sensor deployment. Attached Figure Description
[0019] Figure 1 This is a flowchart of a three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in an embodiment of the present invention; Figure 2 This is a flowchart of the traditional PSO algorithm provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the Coordinate three-dimensional spatial visualization provided in the embodiment of the present invention; Figure 4 This is an example diagram of an obstacle provided in an embodiment of the present invention; Figure 5 This is a line graph illustrating the iterative effects of the five algorithms provided in this embodiment of the invention; Figure 6 This is a schematic diagram comparing the coverage of different algorithms when using 30 sensors, provided in an embodiment of the present invention. Figure 7 This is a schematic diagram comparing the coverage of different algorithms when using 40 sensors, provided in an embodiment of the present invention. Figure 8 This is a schematic diagram comparing the coverage of different algorithms when using 50 sensors, provided in an embodiment of the present invention. Figure 9 This is a schematic diagram comparing the coverage of different algorithms when there are 60 sensors, as provided in an embodiment of the present invention; Figure 10 This is a schematic diagram comparing the coverage of different algorithms when there are 70 sensors, as provided in an embodiment of the present invention; Figure 11 This is a schematic diagram comparing the coverage of different algorithms when there are 80 sensors, as provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solution of the present invention will be further described in detail below with reference to specific embodiments.
[0021] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Unless otherwise specified, embodiments of the present invention and the technical features thereof can be combined with each other.
[0022] This invention provides a method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm, comprising: Initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. Each consecutive fixed number of algorithm iterations is defined as an iteration cycle, and three optimization strategies are executed within each iteration cycle: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy: During the iteration cycle, after the last algorithm iteration, delete the particle with the worst fitness value in the particle swarm. Repeat the iteration until the iteration termination condition is met, and output the optimized particle positions as the sensor node arrangement scheme.
[0023] The three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this invention can solve the problems of traditional PSO algorithm being prone to getting stuck in local optima and ignoring actual obstacles, resulting in poor coverage in the deployment of wireless sensors in complex three-dimensional terrain. While ensuring high convergence speed, it can improve the coverage of sensor network in real environment.
[0024] Figure 1 This is a flowchart illustrating the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this embodiment. This flowchart only shows the logical sequence of the method in this embodiment; however, it can be implemented in different ways without conflict. Figure 1 Complete the steps shown or described in the order indicated.
[0025] The three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this embodiment can be applied to a terminal and can be executed by a three-dimensional wireless sensor deployment system based on particle swarm optimization algorithm. This system can be implemented by software and / or hardware and can be integrated into the terminal, such as any tablet computer or computer device with communication function.
[0026] In one possible embodiment, the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm specifically includes the following steps: Step 1: Initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. Specifically, particle swarm optimization includes 100 particles, defining a particle swarm as In the three-dimensional sensor arrangement space, particles contain Three dimensions. Randomly initialize the particle swarm and calculate the fitness value of each particle.
[0027] Step 2: Define each consecutive fixed number of algorithm iterations as an iteration cycle, and execute three optimization strategies within each iteration cycle: S1, First Strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. Specifically, each 20 consecutive algorithm iterations are defined as an iteration cycle. Within each cycle, the first 25% of the iterations are performed. In each iteration, based on the position of the globally optimal particle, the positions of particles with fitness values in the latter half of the swarm are perturbed to enhance local search capabilities and improve solution accuracy. For insects with poor fitness, their positions are replaced by newly attracted insects. By perturbing the path between the globally optimal solution and the population mean, their positions are reconstructed, accelerating convergence and improving particle quality.
[0028] In this embodiment, the formula for perturbing the position of particles with fitness values below the fitness threshold based on the position of the globally optimal particle is as follows: ; in, This indicates the fitness value is lower than the fitness threshold. The position of each particle. This represents the position of the globally optimal particle. express and Euclidean distance, and These are randomly generated angle parameters.
[0029] S2, Second Strategy: Within the iteration cycle, execute the remaining number of algorithm iterations. In each iteration, update the particle position using the velocity and position update formula of the particle swarm optimization algorithm, adjust the particle position using the back learning strategy, and update the position of the globally optimal particle using the Taguchi strategy. Specifically, in the second strategy phase, the algorithm performs a global search, simulating the process of Rafflesia seed dispersal. Seeds are carried to different locations and survive in suitable environments. The goal of this phase is to help the algorithm escape local optima and conduct a global exploration by adjusting the random search range.
[0030] In this embodiment, the velocity and position update formulas for the particle swarm optimization algorithm are as follows: ; in, , They represent the first , During the nth iteration The speed of each particle , They represent the first , During the nth iteration The position of each particle. Indicates inertia weight, Indicates the first The historical best position of each particle This indicates the globally best historical position. Represents individual learning factors. Represents social learning factors. and The random numbers are uniformly distributed within the range [0,1], which introduce randomness into the update process, making the search process full of changes and avoiding premature entrapment in local optima.
[0031] The velocity and position update formulas for the particle swarm optimization algorithm can be expressed as: .
[0032] Viewing "iteration" as a discrete "time step" ", and this time step is assumed. (A dimensionless unit), under this setting, and They are no longer dimensionless constants; their dimensions are interpreted as [iteration]. -1 (i.e., 1 time). Thus, and The dimensions then become ([iteration]). -1The formula ·[position] = [position] / [iteration] makes the dimensions of the speed and position update formulas of the particle swarm optimization algorithm consistent.
[0033] If the fitness of a particle is worse than its individual best value, the particle's position is adjusted in reverse based on a back-learning strategy.
[0034] In this embodiment, adjusting the position of particles using a reverse learning strategy specifically includes the following steps: Step ①: Calculate the reverse position of the particle; Step 2: If the reverse position of the particle has better fitness, then replace the current particle's position.
[0035] Specifically, the formula for adjusting the particle position in the reverse learning strategy is: ; in, Indicates the first The adjusted positions of the individual particles Indicates the first The position vectors of each particle. , They represent the first The maximum and minimum values of each particle in each dimension.
[0036] Introducing backpropagation into particle swarm optimization (PSO) is equivalent to adding a correction step. It corrects the guess of the current optimal position of a particle, essentially "guessing" that the most likely position is not the optimal one, and then corrects it in reverse, hoping to escape the current optimal position and explore other areas. This is similar to the "exploration" phase introduced in reinforcement learning, increasing particle diversity and exploration capabilities. Backpropagation calculates fitness by reversing the position, preventing particles from prematurely choosing local optima. Backpropagation allows particles to jump off the current path and move in other directions, increasing algorithmic diversity and exploration capabilities.
[0037] After performing the reverse learning update operation, the Taguchi theory module is executed.
[0038] In this embodiment, updating the position of the globally optimal particle using the Taguchi strategy specifically includes the following steps: Step 1: Obtain the position of the current global best particle and the average position of the particle swarm; Step 2: Generate multiple sets of new candidate particle positions based on the orthogonal array, where some dimensions are replaced with the position of the current global best particle, and some dimensions are replaced with the average position of the particle swarm. Step 3: Calculate the fitness value of each group of candidate particle positions. If the fitness value of a certain group of candidate particle positions is better than the fitness value corresponding to the current global best particle position, then use the position of the current global best particle to update the position of the current candidate particle position.
[0039] Specifically, the position of the current global best particle and the average position of the particle swarm are obtained. Then, 64 different groups of particles are generated using an orthogonal array. A portion of these particles are replaced with the position of the current global best particle, and another portion is replaced with the average position of the particle swarm.
[0040] For each row of the orthogonal array: ; in, This indicates the position of the currently globally optimal particle. Indicates the average position of the particle swarm. This determines the update strategy for each dimension.
[0041] For each group generated particle position Calculate the fitness (i.e., coverage) value of each particle. If a particle's position has a better fitness than the current global optimum, then update the global optimum.
[0042] Taguchi principle assigns different update strategies to each dimension, enabling particle positions to change within a larger search space. In the particle update process, Taguchi method, based on an orthogonal array structure, uses the position of the globally optimal particle and the average position of the particle swarm as different update directions for each particle, guiding the particles to perform a better and more systematic search in the update direction.
[0043] S3, Third Strategy: During the iteration cycle, after the last algorithm iteration, delete the particle with the worst fitness value in the particle swarm. Specifically, in this stage, the Rafflesia Algorithm (ROA) mimics the "feeding" process of the Rafflesia flower "devouring" insects to reduce the population size. After several iterations, it removes the individual with the worst fitness value from the population, thereby improving the optimization quality and running efficiency of the algorithm. In essence, it applies the principle of natural selection to select and remove the individual with the worst fitness value.
[0044] The PSO algorithm is the core of the entire model. It's an optimization algorithm that simulates a swarm of particles to achieve node coverage. The main function of PSO is to update the position and velocity of each particle through their behavior and information interaction, gradually approaching the optimal solution. The traditional PSO algorithm process is as follows: Figure 2As shown, this embodiment combines PSO with the Taguchi method, back-learning, and ROA to give it a more effective optimization mechanism. The relationship between PSO and the Taguchi method is that PSO optimizes the positions within a particle swarm. In each iteration, the PSO algorithm updates the historical best position and the current global best position of each particle based on its fitness value, providing the Taguchi method with the particle's position. The Taguchi method, in turn, updates the particle dimension based on the global best position and the average position of the particle swarm using an orthogonal array, enabling the PSO algorithm to find the global optimal solution in a multi-dimensional space. Therefore, the PSO algorithm has a dynamically updated search space, and the Taguchi method improves the particle update method of the PSO algorithm, allowing it to maintain accurate search performance in more complex search spaces. The combination of PSO (Progressive Search) and reverse learning enhances the algorithm's global search capability. When a particle has poor fitness, reverse learning utilizes the difference between the particle's position and the boundary value to obtain the particle's reverse position, allowing the particle to escape the current optimal solution. The reverse learning method for updating particle positions, along with the PSO algorithm's particle update formula, enables particles to search for both individual and global optima, as well as escape local optima, thus expanding the PSO algorithm's search space. Furthermore, the combination of PSO and ROA (Regressive Analysis) involves periodically sorting particle fitness during the search process and using a specific strategy to update particle positions. This gives PSO a dynamically updated search strategy at different stages, allowing it to simultaneously possess the advantages of both local and global search throughout the optimization process, ensuring both stability and efficiency in the optimization process.
[0045] Step 3: Repeat step 2 until the iteration termination condition is met, and output the optimized particle positions as the sensor node arrangement scheme. Step 4: Based on the sensor node layout plan, deploy the sensor nodes on the three-dimensional terrain and evaluate the sensor fitness using the obstacle detection-based coverage calculation method.
[0046] In this embodiment, evaluating the sensor's fitness using an obstacle detection-based coverage calculation method specifically includes the following steps: Step ①: Define the target point; Step 2: Calculate the horizontal and vertical slopes of the path from the sensor to the target point; In this embodiment, the formula for calculating the horizontal slope of the path from the sensor to the target point is: ; in, This represents the horizontal slope of the path from the sensor to the target point. Indicates the first The position coordinates of each sensor This indicates the location coordinates of the target point.
[0047] The formula for calculating the elevation slope of the path from the sensor to the target point is: ; in, This represents the elevation slope of the path from the sensor to the target point. Indicates the height of the target point. This indicates the height of the sensor.
[0048] Step 3: Calculate the predicted height of each point on the path based on the horizontal and vertical slopes of the path from the sensor to the target point; Step 4: Traverse each point on the path. If its height is greater than the predicted height, then determine that point as an obstacle. Step 5: Calculate the coverage rate of the target point based on the obstacle detection results. The target point is determined to be covered only when there are no obstacles on the path.
[0049] Specifically, the coverage rate of the sensor is calculated based on whether the target point is covered, which is the sensor's fitness.
[0050] The effectiveness of the three-dimensional sensor arrangement method based on particle swarm optimization algorithm provided in the embodiments of the present invention has not been verified. Experiments were conducted in three-dimensional space to verify the three-dimensional sensor arrangement method based on particle swarm optimization algorithm provided in the embodiments of the present invention.
[0051] Firstly, regarding the deployment in three-dimensional space, a reasonable node distribution is crucial for achieving maximum coverage and improving network performance in wireless sensor network deployment. Therefore, this experiment employs a three-dimensional deployment scheme, generating node positions under given boundary conditions. Specifically, the `peaks` function generates a node coordinate matrix with a boundary size of `boundary×boundary`, providing a preliminary spatial layout for the sensor node distribution. This method effectively adjusts the spatial distribution of nodes according to the set boundary values, and the reproducibility and consistency of each experiment are ensured by saving and loading the `Coordinate.mat` file. This approach provides a reasonable and stable initial deployment scheme for subsequent node coverage optimization algorithms. Based on this three-dimensional spatial map, sensors can be deployed normally to maximize coverage. The visualization of this three-dimensional map is shown below. Figure 3 As shown.
[0052] Secondly, in this experiment, Euclidean distance is used to calculate the distance between the sensor and the target node, determining whether the sensor node and the target node are connected. Euclidean distance is one of the most common and easiest distance measurement methods, using a "straight line segment" to calculate the distance between two points. Euclidean distance is used in node deployment, routing, and coverage in WSN networks. To gain a more comprehensive understanding and use of Euclidean distance, the following section introduces Euclidean distance and its extensions.
[0053] Euclidean distance is and Distance between two points. Let the Euclidean distance between two points be: .
[0054] Coverage is calculated by determining how many points are covered within the coverage area of each sensor. Each point represents a spatial unit. The process iterates through each point in the area, calculating whether it falls within the coverage area of a particular sensor. Assume the coverage radius of each sensor is... If a point is within the coverage radius of any sensor, then that point is covered. However, traditional coverage calculation methods have problems, such as... Figure 4 As shown, a is the sensor and b is the target point. The Euclidean distance between a and b is less than the coverage radius of a. At this time, it can be seen that although the Euclidean distance between b and a is less than the coverage radius of the sensor, there are peaks between a and b. This will cause a to be unable to cover b properly. If the traditional method of calculating coverage is used, the practicality of the model will be reduced.
[0055] In determining the coverage area, in addition to calculating distance, height difference should also be considered. This is achieved through slope calculation. For the path between the sensor and a target point, the presence of obstacles is determined by calculating the path's height slope. If any point on the path from the sensor to the target point has a height higher than the predicted height of the path, that point is considered an obstacle. Iterate through each point on the path from the sensor to the target point. For each point on the path, calculate its position and height between the sensor and the target point.
[0056] For each path point, the position slope and height slope are calculated to determine whether the point is within the sensor's coverage area. If the point's height is lower than the sensor's predicted height but not equal to the sensor's height, the point is considered an obstacle.
[0057] To best demonstrate the advantages and disadvantages of each model, as well as the performance of this model, this experiment designed a targeted strategy.
[0058] Five different PSO algorithms were used in the experiment: the Parallel PSO algorithm (PPSO) provided in this embodiment, the Taguchi model PSO algorithm (TPSO), the Reverse Learning PSO algorithm (RLPSO), the Classical PSO algorithm (PSO), and the Compact PSO algorithm (CPSO), to solve the 3D coverage problem. For fairness, the number of sensor nodes was set from 30 to 80 to simulate deployment scenarios of different sizes. The node communication range was set to 5m, reflecting the communication range of sensor nodes deployed in real-world scenarios. A 5m communication range ensures a large network coverage while avoiding excessive computational overhead. The maximum number of iterations was 500. Experimental experience showed that a maximum of 500 iterations ensures sufficient computation and convergence time for the algorithm to converge to the optimum without consuming excessive computation time. The population size was 30. The number of particles is a commonly chosen value to ensure reasonable search space coverage and computational complexity; 30 is a constant value that guarantees search space coverage while controlling computational complexity.
[0059] Regarding the initial values of the PSO algorithm, this experiment sets them according to the following method: The initial positions and velocities of particles in the PSO algorithm are randomly generated. The initial positions of particles are uniformly distributed in the search space to ensure coverage of all possible search space ranges. The initial velocities of particles are randomly generated and ensured to be within [-Vmax, Vmax], where Vmax is the velocity threshold, ensuring that particles maintain a certain velocity during the search. The distribution of initial positions and velocities is kept as uniform as possible to prevent particles from converging prematurely to local minima, ensuring that more feasible solutions are explored in the search space and increasing the probability of finding the global optimum. The initial value settings also consider the size of the search space and the actual needs of node deployment to prevent excessively large or small initial particle velocities from affecting the search process. Reasonable initial value settings ensure good convergence and global search capability throughout the PSO algorithm's search process, improving the algorithm's performance. To obtain reliable and fair results, each algorithm was simulated 30 times, and the mean and standard deviation were used to verify the reliability of the algorithm, as shown in Table 1. These settings ensure that each algorithm is compared fairly under the same conditions and provides a relatively reliable result.
[0060] Table 1: Model Parameters .
[0061] The following parameters were selected as representative: maximum number of iterations 500, population size 30, node communication radius R of 5m, and number of sensors 30. The mixture accuracy curves for each model are shown below. Figure 5 As shown, by Figure 5As can be seen, with the increase of the number of iterations, the coverage of the PPSO algorithm provided in this embodiment of the invention continuously improves. The training rate exceeds 0.5 after 200 rounds and finally stabilizes at over 0.52. The verification accuracy increases from 0.386 at the beginning to 0.523 at the last iteration, which is a significant improvement compared to the traditional PSO algorithm (0.502), CPSO algorithm (0.458), TPSO algorithm (0.516), and RLPSO algorithm (0.518).
[0062] Based on the experimental results, a comprehensive analysis of the performance of the PPSO algorithm on the wireless sensor coverage problem will be conducted. All the experimental results will eventually be compiled into a sensor node table to increase network coverage. The time complexity of each algorithm and the advantages and disadvantages of each algorithm are clearly shown in Table 2.
[0063] Table 2: Performance Comparison Results .
[0064] Regarding the final coverage rate, the PPSO algorithm provided in this embodiment of the invention has the highest average coverage rate for all sensor numbers. Since the PPSO algorithm combines the advantages of Taguchi theory, reverse learning, Rafflesia algorithm, and traditional PSO algorithm, its final result is the best among them. The traditional PSO algorithm is simple in method and is prone to getting trapped in local optima, so its performance is poor. The CPSO algorithm is a method that gains operating efficiency by sacrificing accuracy, so its operating performance is the worst.
[0065] Comparison of coverage rates for different algorithms with 30, 40, 50, 60, 70, and 80 sensors, for example Figures 6 to 11 As shown, the PPSO algorithm consistently maintains the highest coverage rate with an increasing number of sensors, especially with a significant increase in particle count. Compared to the traditional PSO algorithm, the PPSO algorithm offers wider coverage and avoids early convergence, making it more practically applicable and achieving better deployment results. Although the CPSO algorithm is faster than the PPSO algorithm, it sacrifices accuracy, resulting in lower coverage and poorer network quality compared to the parallel PSO algorithm.
[0066] Table 3 shows the coverage rate for communication radii of [5m, 30m]. Coverage gradually increases with the communication radius, reaching 100% in later stages. Table 3 shows that when the communication radius is 15m, the PSO and CPSO algorithms have not yet achieved full coverage, while the PPSO and TPSO algorithms have, further validating the superiority of the PPSO algorithm. Taking a robot as an example: a reward mechanism is loaded into the robot system's decision-making module. The robot uses electromechanical components such as cameras, infrared ranging sensors, ultrasonic sensors, and lasers to obtain the position coordinates, orientation angles, speeds, surrounding obstacle position coordinates, robot team affiliation, and individual robot numbers of both friendly and enemy robots. The collected data serves as input to the decision-making module. The robot evaluates its behavior using the reward mechanism and algorithm in the reinforcement learning controller, selecting the optimal behavior as the execution action. Simultaneously, the impact of the decision on friendly robots and potential interference from enemy robots must be considered, continuously optimizing reinforcement learning to achieve autonomous motion decisions. The control system controls the robot hardware to execute corresponding actions based on the decisions made by the decision-making layer.
[0067] Table 3: Simulation Analysis Results of Radius Increment Mode .
[0068] The PPSO algorithm provided in this invention is an improved optimization model for wireless sensor coverage problems based on the PSO model, back-learning, Taguchi theory, and the ROA algorithm parallel optimization model. The PSO algorithm provides powerful global search capabilities, preventing the search process from getting trapped in local optima within a large search space. The ROA algorithm's local and global search capabilities enhance the solution space exploration ability. The addition of back-learning allows for the utilization of previous learning experience to optimize the search process, reduce the number of searches, and improve convergence speed. Finally, Taguchi theory is used to optimize particles, improving the system's robustness and noise tolerance, resulting in stable and reliable results. The addition of the parallel model enhances the solution capability and increases the model's solution rate, enabling the acquisition of higher optimization solutions in a shorter time when solving large-scale and high-dimensional problems. Based on the methods described above, the model is applicable to optimization problems in various complex situations. It has strong adaptability and high computational optimization rate. Furthermore, it proposes a simple, effective, and practical obstacle detection method, which effectively solves the theoretical and application problems related to the deployment of wireless sensor nodes in 3D space. This provides new ideas and solutions for solving the problem of wireless sensor node deployment, promotes the application and deployment of wireless sensor networks, and helps in the design and development of subsequent intelligent systems.
[0069] This invention provides a three-dimensional wireless sensor deployment system based on particle swarm optimization algorithm, comprising: The initialization module is used to initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. The iterative optimization module defines each consecutive fixed number of algorithm iterations as an iteration cycle. Within each iteration cycle, three optimization strategies are executed and iterated repeatedly until the iteration termination condition is met. The optimized particle positions are then output as the sensor node arrangement scheme. The three optimization strategies include: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy is to delete the particle with the worst fitness value from the particle swarm after the last algorithm iteration within the iteration cycle.
[0070] The three-dimensional wireless sensor deployment system based on particle swarm optimization algorithm provided in this embodiment of the invention can execute the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0071] This invention provides a computer device, comprising: Storage medium used to store computer programs; A processor is used to execute computer programs to implement the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in the embodiments of the present invention.
[0072] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this invention.
[0073] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm provided in this invention.
[0074] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.
[0076] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0077] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0078] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm, characterized in that, include: Initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. Each consecutive fixed number of algorithm iterations is defined as an iteration cycle, and three optimization strategies are executed within each iteration cycle: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy: During the iteration cycle, after the last algorithm iteration, delete the particle with the worst fitness value in the particle swarm. Repeat the iteration until the iteration termination condition is met, and output the optimized particle positions as the sensor node arrangement scheme.
2. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 1, characterized in that, Based on the position of the globally optimal particle, the formula for perturbing the position of particles with fitness values below the fitness threshold is as follows: ; in, This indicates the fitness value is lower than the fitness threshold. The position of each particle. This represents the position of the globally optimal particle. express and Euclidean distance, and These are randomly generated angle parameters.
3. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 1, characterized in that, The velocity and position update formulas for the particle swarm optimization algorithm are: ; in, , They represent the first , During the nth iteration The speed of each particle , They represent the first , During the nth iteration The position of each particle. Indicates inertia weight, Indicates the first The historical best position of each particle This indicates the globally best historical position. Represents individual learning factors. Represents social learning factors. and These are independent random numbers.
4. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 1, characterized in that, Adjusting the position of particles using a reverse learning strategy includes: Calculate the reverse position of the particle; If the opposite position of a particle has better fitness, then replace the current particle's position. The formula for adjusting the particle position in the reverse learning strategy is: ; in, Indicates the first The adjusted positions of the individual particles Indicates the first The position vectors of each particle. , They represent the first The maximum and minimum values of each particle in each dimension.
5. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 1, characterized in that, Updating the position of the globally optimal particle using the Taguchi strategy includes: Obtain the position of the current global best particle and the average position of the particle swarm; Multiple sets of new candidate particle positions are generated based on orthogonal arrays, where some dimensions are replaced with the position of the current global best particle, and some dimensions are replaced with the average position of the particle swarm. Calculate the fitness value of each group of candidate particle positions. If the fitness value of a certain group of candidate particle positions is better than the fitness value corresponding to the current global best particle position, then use the positions of the group of candidate particle positions to update the position of the current global best particle.
6. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 1, characterized in that, Also includes: Based on the sensor node layout scheme, sensor nodes are deployed on the three-dimensional terrain, and target points are defined; The fitness of sensors is evaluated using obstacle detection-based coverage calculation methods, including: Calculate the horizontal and vertical slopes of the path from the sensor to the target point; Calculate the predicted height of each point on the path based on the horizontal and vertical slopes of the path from the sensor to the target point; Traverse each point on the path; if its height is greater than the predicted height, then determine that point as an obstacle. The coverage rate of the target point is calculated based on the obstacle detection results. The target point is determined to be covered only when there are no obstacles on the path.
7. The method for deploying three-dimensional wireless sensors based on particle swarm optimization algorithm according to claim 6, characterized in that, The formula for calculating the horizontal slope of the path from the sensor to the target point is: ; in, This represents the horizontal slope of the path from the sensor to the target point. Indicates the first The position coordinates of each sensor Indicates the position coordinates of the target point; The formula for calculating the elevation slope of the path from the sensor to the target point is: ; in, This represents the elevation slope of the path from the sensor to the target point. Indicates the height of the target point. This indicates the height of the sensor.
8. A three-dimensional wireless sensor deployment system based on particle swarm optimization algorithm, characterized in that, include: The initialization module is used to initialize the particle swarm. The position of each particle represents the position of a sensor node in three-dimensional space. The position and velocity of each particle are randomly generated within a predefined search space. The iterative optimization module defines each consecutive fixed number of algorithm iterations as an iteration cycle. Within each iteration cycle, three optimization strategies are executed and iterated repeatedly until the iteration termination condition is met. The optimized particle positions are then output as the sensor node arrangement scheme. The three optimization strategies include: First strategy: Within the iteration cycle, execute the algorithm iteratively a preset number of times. In each iteration, based on the position of the globally optimal particle, perturb the position of particles whose fitness value is lower than the fitness threshold. The second strategy is to execute the remaining number of algorithm iterations within the iteration cycle. In each iteration, the particle position is updated using the velocity and position update formula of the particle swarm optimization algorithm, the particle position is adjusted using the back learning strategy, and the position of the globally optimal particle is updated using the Taguchi strategy. The third strategy is to delete the particle with the worst fitness value from the particle swarm after the last algorithm iteration within the iteration cycle.
9. A computer device, characterized in that, include: Storage medium used to store computer programs; A processor for executing a computer program to implement the three-dimensional wireless sensor deployment method based on particle swarm optimization algorithm as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the three-dimensional wireless sensor deployment method based on the particle swarm optimization algorithm as described in any one of claims 1 to 7.