Unmanned aerial vehicle cluster formation planning method fusing particle swarm and adaptive genetic algorithm
Through the method of fusing particle swarm and adaptive genetic algorithm, combined with formation position deviation, energy consumption management and obstacle avoidance safety, the problems of low efficiency and local optimal solutions in the formation planning of drone clusters are solved, and efficient formation is achieved Planning and energy consumption management ensure that drone clusters complete tasks in a stable, safe and low-energy manner in complex environments.
Patent Information
- Application Number
- CN202411256175.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-13
AI Technical Summary
The existing drone cluster formation planning method is difficult to achieve ideal results in complex environments, especially difficult to balance between global search and local search, it is easy to fall into local optimal solutions and has a slow convergence speed, resulting in more efficient in complex tasks. Low.
Using the method of fusion particle swarm and adaptive genetic algorithm, the optimal solution for drone clusters is solved by setting a comprehensive objective function, combining formation position deviation, energy consumption management and obstacle avoidance safety. Formation plan ensures stable formation, safe obstacle avoidance and achieves minimum energy consumption.
It significantly improves the formation planning efficiency and execution effect of the UAV cluster in complex mission environments, can find the global optimal solution in a shorter time, reduces the possibility that the algorithm will fall into the local optimal solution, and improves the multi-objective optimization problem. The solution quality and convergence speed ensure that the drone cluster flexibly avoids obstacles and reaches the end point with the lowest energy consumption while maintaining the formation stability.
Smart Images

Figure CN119126827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) swarm formation, and in particular to a UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm. Background Art
[0002] Drones have the advantages of rapid deployment, low cost, remote operation and high-precision operation, and are playing an increasingly important role in various mission scenarios. However, as the complexity of the mission increases, the operating capacity and coverage of a single drone are gradually insufficient. Drone swarms achieve complex tasks that are difficult for a single drone to complete through the collaborative operation of multiple drones. Drone swarm technology has shown great application potential and development prospects in the fields of military, disaster relief, environmental monitoring, logistics distribution, agricultural plant protection, etc.
[0003] UAV swarm formation planning is a key component in UAV swarm applications. Through the coordinated flight and intelligent decision-making of multiple UAVs, efficient execution of complex tasks can be achieved. The core of formation planning is to ensure that the UAVs in the swarm can coordinate in a complex environment and arrive at the destination safely while maintaining the stability of the formation and flight efficiency. Among the traditional UAV swarm formation planning methods, intelligent optimization methods include particle swarm optimization, genetic algorithm, simulated annealing algorithm, ant colony algorithm and differential evolution algorithm. However, these algorithms generally have some shortcomings, such as it is difficult to achieve a balance between global search and local search, it is easy to fall into the local optimal solution and the convergence speed is slow, and the efficiency is low when dealing with complex problems. These limitations make it difficult for them to achieve ideal results when dealing with UAV swarm formation planning tasks in complex environments. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a UAV cluster formation planning method integrating particle swarm and adaptive genetic algorithm in view of the above-mentioned deficiencies in the prior art, so as to effectively solve a series of problems in solving the optimal formation planning scheme of UAV cluster by optimization algorithm.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a UAV cluster formation planning method integrating particle swarm and adaptive genetic algorithm, comprising the following steps:
[0006] Step 1: Determine the number of drones in the cluster and the relevant dynamic properties of individual drones, and clarify the attribute information of obstacles in the scene;
[0007] Step 1.1: Set the position of each drone in the sub-cluster at time t to p i (t), i = 1, 2, 3; the speed of the i-th UAV at time t is expressed as v i (t);
[0008] Step 1.2: Set the acceleration of the drone in space to a i (t), controlled by the input s i (t) determines the relationship a i (t) = f(s i (t)); control input s i (t) includes the thrust T of the drone i (t), pitch angle θ i (t), rolling angle φ i (t) and yaw angle ψ i (t); T i (t) determines the vertical acceleration of the drone, θ i (t) and φ i (t) determines the direction and magnitude of the UAV's horizontal acceleration; ψ i (t) directly affects the flight direction of the UAV; these control inputs are collectively represented as s i (t) = [T i (t),θ i (t),φ i (t),ψ i (t)] T According to these control inputs, the acceleration a of the UAV in space is obtained. i (t) is:
[0009]
[0010] Among them, m i is the weight of the i-th drone, g is the acceleration;
[0011] Step 1.3: Assume that there are M static obstacles O in the scene j , j = 1, ..., M, each obstacle is considered as a fixed radius r j , center position o j =[x j ,y j ,z j ] T sphere;
[0012] Step 2: Set the number of drones in the total drone cluster to 3N, where N is a positive integer. Every three drones form a subcluster. The drone subcluster formation planning problem is considered as a typical multi-objective optimization problem, with formation maintenance, obstacle avoidance safety, and energy efficiency as multiple optimization objectives.
[0013] Step 2.1: Set the UAV sub-cluster formation to ensure that the entire formation flies according to the predetermined formation;
[0014] The formation of the drone sub-cluster is set to an equilateral triangle structure, and the leader drone and followers are determined. The followers follow the actions of the leader drone. The sum of the cluster position deviations at all times during the entire mission is determined based on the distance between drones and the predefined relative distance. By minimizing the sum of the cluster position deviations, the drones are ensured to maintain a stable formation structure during the entire mission.
[0015] In order to quantitatively measure the position deviation of the drone cluster during the entire flight process, it is necessary to calculate the actual distance between the drones at each moment and the predefined relative distance d inter The sum of the squares of the differences; by accumulating the deviation values at each moment, the cumulative deviation function F1 of the drone sub-cluster during the entire flight process is obtained;
[0016] Step 2.2: Quantify the energy consumption of the drone cluster during the entire flight process and define the cumulative energy consumption;
[0017] The energy consumption related to flight speed and acceleration of the UAV cluster during the entire flight process is weighted summed to obtain the cumulative energy consumption function F2 of the UAV sub-cluster during the entire flight process.
[0018] Step 2.3: Quantify the safety between drones and obstacles to ensure that each drone maintains a safe distance from obstacles in the environment;
[0019] Calculate the actual distance between each drone and each obstacle at each moment||p i (t)-o j ||, and compare the calculated actual distance with the predefined safety distance d safe When the actual distance between the drone and the obstacle is less than the predefined safety distance, max(0,d safe -(||p i (t)-o j ||-r j )) produces a positive value, indicating that there is a risk of collision between the drone and the obstacle; if the actual distance between the drone and the obstacle is greater than or equal to the safe distance, max(0,d safe -(||p i (t)-o j ||-r j )) value is zero, indicating that the drone is within the safe range. Ensure that the drone always flies within the safe range; by accumulating the distance difference between each drone and each obstacle at each moment, the cumulative collision function F3 is obtained; by minimizing F3, ensure that the drone always maintains a safe distance from obstacles to avoid potential collision risks;
[0020] Step 2.4: In the process of UAV swarm formation planning, the three key factors of formation position deviation, energy consumption management and obstacle avoidance safety are comprehensively considered, and a comprehensive objective function F is designed to coordinate the relationship between these factors with a unified optimization goal; the comprehensive objective function F is defined as:
[0021] F=w1F1+w2F2+w3F3
[0022] The objective function F combines three sub-objective functions, the formation position deviation function F1, the cumulative energy consumption function F2, and the cumulative collision function F3; the relative importance of each sub-objective function in the comprehensive objective function is determined by the weight coefficients w1, w2 and w3, which are set according to the task requirements and environmental conditions to adjust the balance between formation position, energy consumption management and obstacle avoidance safety;
[0023] Step 3: Particle swarm optimization and adaptive genetic algorithm are used to solve the optimal solution of the comprehensive objective function F; this optimal solution is the optimal formation plan that enables the drone sub-cluster to maintain a stable formation and safely avoid obstacles while achieving the minimum energy consumption. The optimal formation plan will include the coordinate position of each drone at different times;
[0024] Step 3.1: Set the total number of initial particles of particle swarm optimization and adaptive genetic algorithm to ksum. When the number of iterations τ reaches the maximum number of iterations τ max When , the particle swarm optimization and adaptive genetic algorithm terminate the optimization process and output the optimal solution;
[0025] Step 3.2: In the particle swarm optimization and adaptive genetic algorithm, each particle k represents a possible UAV sub-cluster formation scheme, and each particle defines a gene sequence z k , the sequence contains the coordinate set of the leader drone and the follower drone at all times; randomly initialize the gene sequence and gene adjustment amount of each particle in the search space, and initialize the optimal position and global optimal position of each particle;
[0026] In each iteration, the comprehensive objective function value F(z k ) is used to evaluate the quality of the formation scheme represented by each particle k; the value of this objective function reflects the performance of the formation scheme in maintaining formation stability, saving energy consumption and avoiding obstacles;
[0027] Initially, the gene sequence z of each particle is randomly initialized in the search space k (0) and gene adjustment u k (0);Gene sequence z k (0) defines the path plan of the particle at the beginning of the iteration process, and the gene adjustment amount u k(0) determines the moving direction and amplitude of the particle in subsequent iterations; by changing the moving direction and amplitude of the particle, the gene adjustment guides the particle to gradually move toward the optimal path solution;
[0028] Initialize the optimal position z of each particle best,k is the initial position of the particle z k (0), in all z k (0) Select the optimal objective function value as the initial global optimal position z best ;
[0029] Step 3.3: Use the particle swarm optimization algorithm to update the particles and start iterating to find the optimal solution. The particle swarm optimization algorithm simulates the cooperation and competition behavior of individuals in the group and continuously adjusts the position of the particles to gradually approach the optimal solution of the comprehensive objective function. In each iteration, the update of particle k includes the update of the gene sequence and the gene adjustment amount.
[0030] At the beginning of each iteration, the particle swarm optimization algorithm will first iteratively update the gene adjustment value u of each particle. k (τ) and gene sequence z k (τ), these updates make the particle swarm as a whole move closer to the global optimal solution;
[0031] Step 3.4: Adopt an adaptive genetic algorithm to further process and optimize the gene sequence of the updated particles to avoid falling into the local optimal solution and ensure the diversity of the search;
[0032] Step 3.4.1: First, select the particle with the best current fitness, that is, the particle whose gene sequence is at the global best position, and then perform a crossover operation on the remaining particles to generate a new generation of particles;
[0033] Step 3.4.1.1: In the crossover operation, an adaptive crossover rate is introduced to determine the proportion of particles that will undergo the crossover operation;
[0034] The adaptive crossover rate is dynamically adjusted according to the changes in the overall fitness of the particle swarm;
[0035] The formula for the change of the adaptive crossover rate CR(τ+1) is:
[0036]
[0037] Among them, CR min and CR max are the minimum and maximum crossover rates, σ F (τ+1) is the standard deviation of the fitness of the particle swarm in the τ+1th generation, σ F (0) is the standard deviation of the fitness of the particle swarm in the initial generation, It is the ratio of the standard deviation of fitness of the τ+1 generation to the standard deviation of fitness of the initial generation;
[0038] Use the adaptive crossover rate CR(τ+1) to calculate the number of particles N involved in the crossover operation cross (τ+1) is:
[0039] N cross (τ+1)=CR(τ+1)×ksum
[0040] Step 3.4.1.2: Perform multi-point crossover operation on individual particles, i.e., exchange at multiple gene positions;
[0041] After the individual pairs that need to be crossovered have been selected, the crossover is performed at T+1 crossover points (c0, c1, ..., c T ) exchanges the gene sequences of the two particles, c0 corresponds to the position state of the drone sub-cluster at time t = 0, c T The position state of the drone sub-cluster corresponding to time t = T;
[0042] Step 3.4.2: After the crossover operation, introduce mutation operations on some of the newly generated particles to further increase the diversity of solutions and exploration capabilities;
[0043] The proportion of particles to be mutated is selected through adaptive mutation rate, particles are selected from the particle group, the overall gene sequence is mutated, and disturbance is added to each position coordinate in the gene sequence;
[0044] The adaptive mutation rate MU(τ+1) refers to the proportion of particles selected for mutation operation in this iteration;
[0045] The mutation rate calculation formula is:
[0046]
[0047] Among them, MU max and MU min are the minimum and maximum mutation rates, and β is the adjustment factor for adjusting the sensitivity of the adaptive mutation rate;
[0048] The number of particles N that undergo mutation operations muta (τ+1) is:
[0049] N muta (τ+1)=MU(τ+1)×ksum
[0050] Select N from the particle swarm muta (τ+1) particles, perform overall mutation operation on their gene sequence, and then add tiny perturbations to each position coordinate in the gene sequence;
[0051] Step 3.5: Repeat steps 3.3-3.4 to perform the next iteration. In the next iteration, the gene sequence of each particle k will be used as the initial gene sequence of the next generation. Repeat the iteration process until the total number of iterations τ is reached. max , the optimal particle gene sequence z best (τ max ), represents the optimal flight plan of the UAV sub-cluster at all times.
[0052] The beneficial effect of adopting the above technical solution is that: the drone cluster formation planning method provided by the present invention, which integrates particle swarm and adaptive genetic algorithm, significantly improves the formation planning efficiency and execution effect of drone clusters in complex mission environments compared with the prior art. By combining the global search capability of the particle swarm optimization algorithm with the local search advantage of the adaptive genetic algorithm, it is possible to find the global optimal solution in a shorter time, while reducing the possibility of the algorithm falling into the local optimal solution, significantly improving the solution quality and convergence speed under multi-objective optimization problems. This ensures that the drone cluster can flexibly avoid obstacles while maintaining a stable formation and reach the destination with the lowest energy consumption. The method of the present invention has important application prospects and market value. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A flowchart of a method for planning a swarm of unmanned aerial vehicles (UAVs) by integrating a particle swarm and an adaptive genetic algorithm is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0055] In this embodiment, a UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm is provided. Figure 1 As shown, the specific steps include:
[0056] Step 1: Determine the number of drones in the cluster and the relevant dynamic properties of individual drones, and clarify the attribute information of obstacles in the scene; through these scene information and basic settings of role attributes, the necessary dynamic model and environmental parameter support can be provided for the subsequent formation planning of the drone cluster.
[0057] Step 1.1: Set up each UAV in the swarm i The position at time t is p i (t) = [x i (t),y i (t),z i (t)] T, i=1,2,I. The speed of the i-th UAV at time t is expressed as in, are the velocity components in the x, y, and z directions respectively.
[0058] Step 1.2: Set the acceleration of the drone in space to a i (t), controlled by the input s i (t) determines the relationship a i (t) = f(s i (t)). Control input s i (t) includes the thrust T of the drone i (t), pitch angle θ i (t), rolling angle φ i (t) and yaw angle ψ i (t). T i (t) determines the vertical acceleration of the drone, θ i (t) and φ i (t) determines the direction and magnitude of the UAV’s horizontal acceleration. i (t) directly affects the flight direction of the UAV. These control inputs are uniformly represented as s i (t) = [T i (t),θ i (t),φ i (t),ψ i (t)] T Based on these control inputs, the acceleration a of the drone in space can be obtained. i (t) is:
[0059]
[0060] Among them, m i is the weight of the i-th drone, and g is the acceleration.
[0061] Step 1.3: Assume that there are M static obstacles O in the scene j , j = 1, ..., M, in order to simplify the model calculation and improve the versatility of the algorithm, these obstacles are simulated as spheres; each obstacle is regarded as a sphere with a fixed radius r j , center position o j =[x j ,y j ,z j ] T This modeling method enables the use of simple geometric relationships to quickly calculate whether the drone has entered the influence range of the obstacle when subsequently calculating the distance between the drone and the obstacle.
[0062] Step 2: Set the number of drones in the total drone cluster to 3N, where N is a positive integer. Every three drones form a subcluster. The drone subcluster formation planning problem is regarded as a typical multi-objective optimization problem, with formation maintenance, obstacle avoidance safety, and energy efficiency as multiple optimization objectives.
[0063] In practical applications, drone swarms not only need to maintain a stable formation structure, but also need to avoid obstacles in complex environments and minimize energy consumption. These goals often constrain each other and are difficult to achieve through a single optimization goal. Therefore, by taking formation maintenance, obstacle avoidance safety, and energy efficiency as multiple optimization goals, this problem can be described and solved more comprehensively. The optimization algorithm can seek a balance between these goals, ensuring that the drone swarm can maintain a precise formation and flexibly avoid obstacles during the mission execution, while achieving optimal energy utilization, thereby improving the overall mission success rate and efficiency.
[0064] Step 2.1: Set the drone sub-cluster formation to ensure that the entire formation flies according to the predetermined formation;
[0065] The formation of the drone sub-cluster is set to an equilateral triangle structure, and the leader drone and followers are determined. The followers follow the actions of the leader drone. The sum of the cluster position deviations at all times during the entire mission is determined based on the distance between drones and the predefined relative distance. By minimizing the sum of the cluster position deviations, the drones are ensured to maintain a stable formation structure during the entire mission.
[0066] In the planning of drone swarm formation, maintaining the stability of the formation is one of the primary goals. During the flight, the three drones in the sub-cluster need to always maintain an equilateral triangle formation structure to ensure the coordination and integrity of the formation. To achieve this goal, the front drone is designated as the leader drone, and the two drones at the back closely follow the leader drone's movements as followers. The core of formation control lies in the constraint of relative distance. By defining the expected position of each drone in the swarm, the entire formation is ensured to fly according to the predetermined formation.
[0067] Assume that each pair of UAV i and UAVs n The predefined relative distance between inter For a stable equilateral triangle formation structure, the distance between any two drones in the cluster at any time ||p i (t)-p n (t)|| should be equal to d inter The drones need to constantly adjust their positions to maintain a stable relative distance and ensure that the formation does not shift or deform.
[0068] In order to quantitatively measure the position deviation of the drone cluster during the entire flight process, it is necessary to calculate the actual distance between the drones at each moment and the predefined relative distance d inter By accumulating the deviation values at each moment, the cumulative deviation function F1 during the entire flight process is obtained, as shown in the following formula:
[0069]
[0070] Among them, F1 represents the sum of the cluster position deviations at all times during the entire mission. By minimizing this cumulative deviation function, it is possible to ensure that the UAVs maintain a stable formation structure during the entire mission, so that the formation remains consistent and meets the execution requirements of the mission.
[0071] Step 2.2: Quantify the energy consumption of the drone cluster during the entire flight process and define the cumulative energy consumption;
[0072] In the formation control of drone swarms, in addition to maintaining the stability of the formation, energy consumption management is also a crucial consideration. During the mission execution, factors such as frequent position adjustments, high-speed flight, and obstacle avoidance will cause the energy consumption of drones to increase significantly.
[0073] The energy consumption of the drone cluster during the entire flight process is quantitatively analyzed, and the cumulative energy consumption function F2 is defined as shown in the following formula:
[0074]
[0075] Among them, α and β are the coefficients of controlling energy consumption weight, which respectively reflect the different effects of UAV flight speed and acceleration on energy consumption, ∥v i (t)∥ 2 Indicates the energy consumption related to flight speed. As the flight speed of the drone increases, the energy consumption will also increase accordingly. Higher speeds require more energy to overcome the influence of air resistance and other external factors, so energy consumption is proportional to the square of the speed. By controlling the flight speed, energy consumption can be effectively managed and the flight time of the drone can be extended. ∥a i (t)∥ 2 Represents the energy consumption related to acceleration. Larger acceleration means that the drone needs to quickly change its flight speed or direction. This drastic speed change will also increase energy consumption. By minimizing this cumulative energy consumption function, the energy waste caused by frequent acceleration, deceleration or high-speed flight can be reduced while ensuring the success of the mission.
[0076] Step 2.3: Quantify the safety between drones and obstacles to ensure that each drone maintains a safe distance from obstacles in the environment;
[0077] During the flight of a UAV swarm, ensuring that each UAV maintains a safe distance from obstacles in the environment is one of the keys to mission success. i With obstacles O j The distance between the centers of i (t)-o j ∥ is:
[0078]
[0079] This formula is based on the Euclidean distance principle and accurately reflects the spatial distance between the drone and the obstacle.
[0080] In order to further quantify the safety between drones and obstacles, the cumulative collision function F3 of the drone cluster is defined to evaluate the safety distance deviation between drones and all obstacles during the entire flight process. This function ensures that the drones always fly within a safe range by analyzing the distance between each drone and each obstacle at each moment. The cumulative collision function F3 is defined as shown in the following formula:
[0081]
[0082] Among them, d safe Indicates the predefined safe distance between the drone and the obstacle. To ensure that the drone is within the safe distance during the entire flight, when the actual distance between the drone and the obstacle is less than the predefined safe distance, max(0,d safe -(||pi(t)-oj||-rj) produces a positive value, indicating that there is a risk of collision between the drone and the obstacle. If the actual distance between the drone and the obstacle is greater than or equal to the safe distance, max(0,d safe -(||p i (t)-o j ||-r j )) is zero, indicating that the drone is within the safe range.
[0083] During the entire flight mission, the cumulative collision function F3 provides a global safety assessment indicator by accumulating the distance difference between each drone and each obstacle at each moment. By minimizing F3, it can ensure that the drone always maintains a safe distance from obstacles and avoids potential collision risks.
[0084] Step 2.4: In the process of UAV swarm formation planning, the three key factors of formation position deviation, energy consumption management and obstacle avoidance safety are comprehensively considered, and a comprehensive objective function F is designed to coordinate the relationship between these factors with a unified optimization goal. The comprehensive objective function F is defined as:
[0085] F=w1F1+w2F2+w3F3
[0086] The objective function F combines three sub-objective functions, the formation position deviation function F1, the cumulative energy consumption function F2, and the cumulative collision function F3. The relative importance of each sub-objective function in the comprehensive objective function is determined by the weight coefficients w1, w2, and w3, which are set according to the mission requirements and environmental conditions to adjust the balance between formation position, energy consumption management, and obstacle avoidance safety.
[0087] Step 3: Particle Swarm Optimization and Adaptive Genetic Algorithm (PSOAGA) is used to solve the optimal solution of the comprehensive objective function F. This optimal solution is the optimal formation plan that allows the cluster to maintain a stable formation and safely avoid obstacles while achieving the minimum energy consumption. The optimal formation plan will include the coordinate position of each drone at different times.
[0088] Step 3.1: Set the maximum number of iterations τ to max When , PSOAGA will terminate the optimization process and output the optimal solution; the total number of initial particles of PSOAGA is ksum.
[0089] Step 3.2: In PSOAGA, each particle k represents a possible UAV swarm formation scheme, and each particle defines a gene sequence, which contains the coordinate set of the leader UAV and the follower UAV at all times; randomly initialize the gene sequence and gene adjustment of each particle in the search space, and initialize the optimal position and global optimal position of each particle;
[0090] In PSOAGA, each particle k represents a possible UAV swarm formation plan. To represent this plan, a gene sequence z is defined for each particle. k , the sequence contains the Captain UAV leader and two follow-up UAVs follower1 、UAV follower2 The coordinate set at all times (t=0,1,...,T). Through these coordinate sets, particles describe the positions of drones at different times, thus completely defining a formation scheme.
[0091] The gene sequence z of particle k in the τth iteration k (τ) is:
[0092]
[0093] Among them, Captain UAV leaderThe gene sequence in particle k is represented as UAV leader =[p leader,k (0),…,p leader,k (t),…,p leader,k (T)],p leader,k (t) is its coordinate at time t. Follow UAV 1UAV follower1 The gene sequence in particle k is represented as UAV follower 1=[p follower1,k (0),…,p follower1,k (t),…,p follower1,k (T)],p follower1,k (t) is its coordinate at time t. Follow UAV 2UAV follower 2 The gene sequence in particle k is represented by UAV follower2 =[p follower 2,k (0),…,p follower 2,k (t),…,p follower 2,k (T)],p follower 2,k (t) is its coordinate at time t.
[0094] In each iteration, in order to evaluate the quality of the formation scheme represented by each particle k, the comprehensive objective function value F(z k ). This objective function value reflects the performance of the formation scheme in maintaining formation stability, saving energy and avoiding obstacles.
[0095] Initially, the gene sequence z of each particle is randomly initialized in the search space k (0) and gene adjustment u k (0). Gene sequence z k (0) defines the path plan of the particle at the beginning of the iteration process, and the gene adjustment amount u k (0) determines the moving direction and amplitude of the particle in subsequent iterations. By changing the moving direction and amplitude of the particle, the gene adjustment can guide the particle to gradually move toward the optimal path solution. k (τ) is expressed as:
[0096]
[0097] Among them, Captain UAV leader The gene adjustment amount in particle k is expressed as [u leader,k (0),…,u leader,k (t),…,u leader,k (T)],u leader,k(t) is the gene adjustment amount at time t. Follow UAV 1UAV follower The gene adjustment amount of 1 is expressed as [u follower 1,k (0),…,u follower 1,k (t),…,u follower 1,k (T)],u follower 1,k (t) is the gene adjustment amount at time t. Follow UAV 2UAV follower The gene adjustment amount of 2 is expressed as [v follower 2,k (0),…,π follower 2,k (t),…,c follower 2,k (T)],π follower2,k (t) is the gene adjustment amount at time t.
[0098] Initialize the optimal position z of each particle best,k is the initial position of the particle z k (0), in all z k (0) Select the optimal objective function value as the initial global optimal position z best .
[0099] Step 3.3: Start iterating to find the optimal solution, and use the particle swarm optimization (PSO) algorithm to update the particles. PSO simulates the cooperation and competition behavior of individuals in the group and continuously adjusts the position of the particles to gradually approach the optimal solution of the comprehensive objective function. In each iteration, the update of particle k includes the update of the gene sequence and the gene adjustment amount.
[0100] At the beginning of each generation, the PSO part will first iteratively update the gene adjustment u of each particle. k (τ) and gene sequence z k (τ), these updates make the particle swarm as a whole move closer to the global optimal solution.
[0101] For each particle k, its gene adjustment amount u k The iteration of (τ) is u k The update formula of (τ+1) is as follows:
[0102] u k (τ+1)=w·u k (τ)+c1·r1·(z best,k -z k (τ))+c2·r2·(z best -z k(τ)
[0103] Where w is the inertia weight, which controls the inertia of the particle speed and maintains the particle's direction of motion. c1 is the cognitive coefficient that controls the particle's dependence on its own historical best position, and c2 is the social coefficient that controls the particle's dependence on the global best position. r1 and r2 are random numbers that ensure search diversity and are in the range of [0,1]. best,k is particle z k The best position that it has ever found in history, z best,k -z k (τ) represents the difference between the particle’s current position and its optimal position, pushing the particle back to the optimal position it has ever found. best is the global optimal position.
[0104] After updating the gene adjustment, the gene sequence z of the particle k (τ) iteration is z k The update formula of (τ+1) is as follows:
[0105] z k (τ+1)=z k (τ)+u k (τ+1)
[0106] In the current iteration, all particles k complete the gene sequence z through PSO k (τ+1) and gene adjustment u k (τ+1) is updated. Through the global search and local exploration capabilities of PSO, the particle swarm is able to gradually approach the optimal solution in the search space.
[0107] Step 3.4: Adopt adaptive genetic algorithm to update the gene sequence z of the particle k (τ+1) is further processed and optimized to avoid falling into the local optimal solution and ensure the diversity of the search;
[0108] In this iteration, in order to further improve the quality of the solution, avoid falling into the local optimal solution and ensure the diversity of the search, AGA is used to k (τ+1) for further processing and optimization. Before AGA starts, the algorithm will select the particle with the best current fitness, that is, the particle with the gene sequence z best (τ+1) particles. To ensure that the optimal solution in the current generation will not be destroyed in the crossover or mutation operation, this optimal individual will be directly retained to the next generation. This ensures that the optimal solution is protected in subsequent crossover and mutation operations, thereby maintaining its superiority in the solution space and enabling the algorithm to explore more solution spaces while maintaining the existing optimal solution.
[0109] Step 3.4.1: First select the particle with the best current fitness, that is, the gene sequence is z best (τ+1) particles, and then perform a crossover operation on the remaining particles to generate a new generation of particles; the crossover operation will give priority to particles whose gene sequence differences are greater than the threshold θ, which can increase the diversity of new solutions and explore the solution space more effectively. Each particle can be regarded as a point in the solution space. Two individuals that are far apart mean that their gene sequences are quite different. This "distance" can be measured by the Euclidean distance between genotypes. For two particles k1 and k2 in the τ+1 generation, their gene sequences z k The Euclidean distance (k1, k2) of (τ+1) is expressed as:
[0110]
[0111] Step 3.4.1.1: In the crossover operation, the adaptive crossover rate CR(τ+1) is introduced to determine what proportion of particles will perform the crossover operation. The adaptive crossover rate dynamically adjusts the crossover rate according to the change in the overall fitness of the particle swarm. The overall fitness change of the particle swarm is determined by the ratio of the fitness standard deviation to the fitness standard deviation of the initial generation; when the overall fitness of the particle swarm changes slowly, the crossover rate is increased according to the formula to enhance the exploration ability of new solutions; conversely, when the overall fitness of the particle swarm changes rapidly, the crossover rate is reduced according to the formula to maintain the stability of the current optimal solution.
[0112] The formula for the change of the adaptive crossover rate CR(τ+1) is:
[0113]
[0114] Among them, CR min and CR max are the minimum and maximum crossover rates, σ F (τ+1) is the standard deviation of the fitness of the particle swarm in the τ+1th generation, σ F (0) is the standard deviation of the fitness of the particle swarm in the initial generation, It is the ratio of the fitness standard deviation of the τ+1 generation to the fitness standard deviation of the initial generation. When the population diversity decreases, that is, σ F (τ+1) decreases, then CR(τ+1) will increase to enhance the diversity of search. On the contrary, when the fitness standard deviation σ of the population F (τ+1) is large, indicating that the fitness values of the population are quite different. At this time, CR(τ+1) will decrease to maintain the stability of the current optimal solution. The adjustment factor α is used to control the response speed of the adaptive crossover rate to fitness changes. A higher value of α makes the crossover rate more sensitive to fitness changes, while a lower value of α makes the adjustment of the adaptive crossover rate more stable.
[0115] Use the adaptive crossover rate CR(τ+1) to calculate the number of particles N involved in the crossover operation cross (τ+1) is:
[0116] n cross (τ+1)=CR(τ+1)×ksum
[0117] Step 3.4.1.2: Perform multi-point crossover operation on individual particles, that is, exchange at multiple gene positions. After selecting the individual pairs that need to be crossover, select T+1 crossover points (c0, c1, ..., c T ) exchanges the gene sequences of the two particles, c0 corresponds to the position state of the cluster at time t = 0, c T Corresponding to the position status of the cluster at time t=T.
[0118] For two particles k1 and k2, their original gene sequences are and If a crossover operation is performed at two intersection points (c0, c1), two new τ+1 generation particle individuals are generated. and The gene sequence is:
[0119]
[0120] in, and are the genes of the exchange intersections c0 and c1, i.e. the coordinates of the drone cluster at t=0 and t=1. The gene sequence of the new particle at the intersections c0 and c1 comes from particle k2, and the rest remains unchanged. The gene sequence of the intersection c0 and c1 comes from particle k1, and the rest remains unchanged. Through this crossover operation, the new particle combines the information from the original particle to explore possible better solutions. This process not only helps to generate new particles with potential advantages, but also increases the diversity of the particle population, thereby improving search efficiency.
[0121] Step 3.4.2: After the crossover operation, introduce mutation operations to some newly generated particles to further increase the diversity of solutions and exploration capabilities. The mutation operation can help particles escape from the local optimal solution by making small random adjustments to the gene sequence of the particles, thereby avoiding premature convergence and enhancing the global search capability of the algorithm.
[0122] The proportion of particles to be mutated is selected through adaptive mutation rate, particles are selected from the particle group, the overall gene sequence is mutated, and a small disturbance is added to each position coordinate in the gene sequence;
[0123] The adaptive mutation rate MU (τ+1) refers to the proportion of particles selected for mutation operation in this iteration. The adaptive mutation rate MU (τ+1) is adaptively adjusted according to the state of the algorithm. When the diversity of the population decreases or the algorithm converges slowly, the mutation rate is increased to improve the diversity and exploration ability of the solution; when the algorithm converges quickly or the diversity is high, the mutation rate is reduced to maintain the stability of the solution. The mutation rate calculation formula is:
[0124]
[0125] Among them, MU max and MU min is the minimum and maximum mutation rate, and β is the adjustment factor for adjusting the sensitivity of the adaptive mutation rate. The number of particles N that perform mutation operations muta (τ+1) is:
[0126] N muta (τ+1)=MU(τ+1)×ksum
[0127] Select N from the particle swarm muta (τ+1) particles, perform a global mutation operation on their gene sequences, and then add a small disturbance Δp (in the range of [-∈,∈], ∈ is a positive number that determines the amplitude of the disturbance) to each position coordinate in the gene sequence. The gene sequence of particle k after the mutation operation is z k ″(τ+1):
[0128]
[0129] By adding tiny perturbations to these positions, the genetic sequence of each particle changes, introducing randomness that pushes the swarm of particles to explore more widely in the search space.
[0130] As the mutation operation is completed, the gene sequence z of each particle k k Update to z″ k (τ+1) marks the end of an iteration. The algorithm will automatically enter the next round of iteration.
[0131] Step 3.5: Repeat steps 3.3 to 3.4 to perform the next iteration. In the next iteration, the gene sequence z″ of each particle k k (τ+1) will be used as the initial gene sequence z for the next generation k (τ). In this way, the solution can be further improved in each generation based on the optimization results of the previous generation, so that the particle swarm gradually approaches the global optimal solution. The iterative process is repeated until the total number of iterations τ is reached. max , output the gene sequence z of the optimal particle obtained by the algorithm best(τ max ), represents the optimal flight plan of the drone swarm at all times.
[0132] The gene sequence of the optimal particle is specifically expressed as:
[0133]
[0134] This sequence includes the three-dimensional coordinates of the leader drone and the two follower drones at each point in time, fully describing the flight path and formation plan of the drone cluster.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm. Features: The following steps are involved: Step 1: Determine the number of drones in the cluster and the relevant dynamic properties of individual drones, and clarify the attribute information of obstacles in the scene; Step 2: Set the number of drones in the total drone cluster to 3N, where N is a positive integer. Every three drones form a subcluster. The drone subcluster formation planning problem is regarded as a typical multi-objective optimization problem. Formation maintenance, obstacle avoidance safety and energy efficiency are taken as multiple optimization objectives. Considering the three key factors of formation position deviation, energy management and obstacle avoidance safety, a comprehensive objective function F is designed to coordinate the relationship between these factors by unifying the optimization objectives. Step 3: Use particle swarm optimization and adaptive genetic algorithm to solve the optimal solution of the comprehensive objective function F; this optimal solution is the optimal formation plan that enables the drone sub-cluster to maintain a stable formation and safely avoid obstacles while achieving the minimum energy consumption. The optimal formation plan will include the coordinate position of each drone at different times.
2. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 1, Features: The specific method of step 1 is: Step 1.1: Set the position of each drone in the sub-cluster at time t to p i (t), i = 1, 2, 3; the speed of the i-th UAV at time t is expressed as v i (t); Step 1.2: Set the acceleration of the drone in space to a i (t), controlled by the input s i (t) determines the relationship a i (t) = f(s i (t)); control input s i (t) includes the thrust T of the drone i (t), pitch angle θ i (t), rolling angle φ i (t) and yaw angle ψ i (t); T i (t) determines the vertical acceleration of the drone, θ i (t) and φ i (t) determines the direction and magnitude of the UAV's horizontal acceleration; ψ i (t) directly affects the flight direction of the UAV; these control inputs are collectively represented as s i (t) = [T i (t),θ i (t),φ i (t),ψ i (t)] T According to these control inputs, the acceleration a of the UAV in space is obtained. i (t) is: Among them, m i is the weight of the i-th drone, g is the acceleration; Step 1.3: Assume that there are M static obstacles O in the scene j , j = 1, ..., M, each obstacle is considered as a fixed radius r j , center position o j =[x j ,y j ,z j ] T sphere.
3. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 2, Features: The specific method of step 2 is: Step 2.1: Set the formation of the drone sub-cluster, quantitatively measure the position deviation of the drone cluster during the entire flight process, and ensure that the drones maintain a stable formation structure during the entire mission by minimizing the sum of the cluster position deviations, and ensure that the entire formation flies according to the predetermined formation; Step 2.2: Quantify the energy consumption of the drone cluster during the entire flight process and define the cumulative energy consumption; Step 2.3: Quantify the safety between drones and obstacles to ensure that each drone maintains a safe distance from obstacles in the environment; Step 2.4: In the process of UAV swarm formation planning, the three key factors of formation position deviation, energy consumption management and obstacle avoidance safety are comprehensively considered, and a comprehensive objective function F is designed to coordinate the relationship between these factors with a unified optimization goal.
4. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 3, Features: The step 2.1 sets the formation of the drone sub-cluster to an equilateral triangle structure, determines the leader drone and the followers, and the followers follow the actions of the leader drone; determines the sum of the cluster position deviations at all times during the entire mission according to the distance between the drones and the predefined relative distance, and ensures that the drones maintain a stable formation structure during the entire mission by minimizing the sum of the cluster position deviations; In order to quantitatively measure the position deviation of the drone cluster during the entire flight process, it is necessary to calculate the actual distance between the drones at each moment and the predefined relative distance d inter The sum of the squares of the differences; by accumulating the deviation values at each moment, the cumulative deviation function F of the drone sub-cluster during the entire flight process is obtained 1 .
5. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 4, Features: The step 2.2 performs a weighted summation of the energy consumption related to the flight speed and the energy consumption related to the acceleration of the drone cluster during the entire flight process to obtain the cumulative energy consumption function F of the drone sub-cluster during the entire flight process. 2 .
6. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 5, Features: The step 2.3 calculates the actual distance between each drone and each obstacle at each moment ||p i (t)-o j ||, and compare the calculated actual distance with the predefined safety distance d safe When the actual distance between the drone and the obstacle is less than the predefined safety distance, max(0,d safe -(||p i (t)-o j ||-r j )) produces a positive value, indicating that there is a risk of collision between the drone and the obstacle; if the actual distance between the drone and the obstacle is greater than or equal to the safe distance, max(0,d safe The value of -||pi(t)-oj||-rj is zero, indicating that the drone is within the safe range. Ensure that the drone always flies within the safe range; by accumulating the distance difference between each drone and each obstacle at each moment, the cumulative collision function F is obtained. 3 ; By minimizing F 3 , ensuring that the drone always maintains a safe distance from obstacles to avoid potential collision risks.
7. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 6, Features: The comprehensive objective function F described in step 2.4 is defined as: F=w 1 F 1 +w 2 F 2 +w 3 F 3 The objective function F combines three sub-objective functions, the formation position deviation function F 1 , cumulative energy consumption function F 2 , and the cumulative collision function F 3 ; The relative importance of each sub-objective function in the comprehensive objective function is determined by the weight coefficient w 1 、w 2 and w 3 The setting of these weight coefficients is based on mission requirements and environmental conditions, and is used to adjust the balance between formation position, energy management, and obstacle avoidance safety.
8. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 7, Features: The specific method of step 3 is: Step 3.1: Set the total number of initial particles of particle swarm optimization and adaptive genetic algorithm to ksum. When the number of iterations τ reaches the maximum number of iterations τ max When , the particle swarm optimization and adaptive genetic algorithm terminate the optimization process and output the optimal solution; Step 3.2: In the particle swarm optimization and adaptive genetic algorithm, each particle k represents a possible UAV sub-cluster formation scheme, and each particle defines a gene sequence z k , the sequence contains the coordinate set of the leader drone and the follower drone at all times; randomly initialize the gene sequence and gene adjustment amount of each particle in the search space, and initialize the optimal position and global optimal position of each particle; Step 3.3: Use the particle swarm optimization algorithm to update the particles and start iterating to find the optimal solution. The particle swarm optimization algorithm simulates the cooperation and competition behavior of individuals in the group and continuously adjusts the position of the particles to gradually approach the optimal solution of the comprehensive objective function. In each iteration, the update of particle k includes the update of gene sequence and gene adjustment amount; At the beginning of each iteration, the particle swarm optimization algorithm will first iteratively update the gene adjustment value u of each particle. k (τ) and gene sequence z k (τ), these updates make the particle swarm as a whole move closer to the global optimal solution; Step 3.4: Adopt an adaptive genetic algorithm to perform crossover and mutation on the gene sequence of the updated particles to avoid falling into the local optimal solution and ensure the diversity of the search; Step 3.5: Repeat steps 3.3-3.4 to perform the next iteration. In the next iteration, the gene sequence of each particle k will be used as the initial gene sequence of the next generation. Repeat the iteration process until the total number of iterations τ is reached. max , the optimal particle gene sequence z best (τ max ), represents the optimal flight plan of the UAV sub-cluster at all times.
9. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 8, Features: The specific method of step 3.2 is: In each iteration, the comprehensive objective function value F(z k ) to evaluate the pros and cons of the formation scheme represented by each particle k; This objective function value reflects the performance of the formation scheme in maintaining formation stability, saving energy and avoiding obstacles; Initially, the gene sequence z of each particle is randomly initialized in the search space k (0) and gene adjustment u k (0);Gene sequence z k (0) defines the path plan of the particle at the beginning of the iteration process, and the gene adjustment amount u k (0) determines the moving direction and amplitude of the particle in subsequent iterations; by changing the moving direction and amplitude of the particle, the gene adjustment guides the particle to gradually move toward the optimal path solution; Initialize the optimal position z of each particle best,k is the initial position of the particle z k (0), in all z k (0) Select the optimal objective function value as the initial global optimal position z best .
10. The UAV swarm formation planning method integrating particle swarm and adaptive genetic algorithm according to claim 9, Features: The specific method of step 3.4 is: Step 3.4.1: First, select the particle with the best current fitness, that is, the particle whose gene sequence is at the global best position, and then perform a crossover operation on the remaining particles to generate a new generation of particles; Step 3.4.1.1: In the crossover operation, an adaptive crossover rate is introduced to determine the proportion of particles that will undergo the crossover operation; The adaptive crossover rate is dynamically adjusted according to the changes in the overall fitness of the particle swarm; The formula for the change of the adaptive crossover rate CR(τ+1) is: Among them, CR min and CR max are the minimum and maximum crossover rates, σ F (τ+1) is the standard deviation of the fitness of the particle swarm in the τ+1th generation, σ F (0) is the standard deviation of the fitness of the particle swarm in the initial generation, It is the ratio of the standard deviation of fitness of the τ+1 generation to the standard deviation of fitness of the initial generation; Use the adaptive crossover rate CR(τ+1) to calculate the number of particles N involved in the crossover operation cross (τ+1) is: N cross (τ+1)=CR(τ+1)×ksum Step 3.4.1.2: Perform multi-point crossover operation on individual particles, i.e., exchange at multiple gene positions; After selecting the individual pairs that need to be crossover, select the T+1 crossover point (c 0 ,c 1 ,…,c T ) exchanges the gene sequences of the two particles, c 0 The position state of the drone sub-cluster corresponding to time t = 0, c T The position state of the drone sub-cluster corresponding to time t = T; Step 3.4.2: After the crossover operation, introduce mutation operations on some of the newly generated particles to further increase the diversity of solutions and exploration capabilities; The proportion of particles to be mutated is selected through adaptive mutation rate, particles are selected from the particle group, the overall gene sequence is mutated, and disturbance is added to each position coordinate in the gene sequence; The adaptive mutation rate MU(τ+1) refers to the proportion of particles selected for mutation operation in this iteration; The mutation rate calculation formula is: Among them, MU max and MU min are the minimum and maximum mutation rates, and β is the adjustment factor for adjusting the sensitivity of the adaptive mutation rate; The number of particles N that undergo mutation operations muta (τ+1) is: N muta (τ+1)=MU(τ+1)×ksum Select N from the particle swarm muta (τ+1) particles, perform overall mutation operation on their gene sequence, and then add tiny disturbances to each position coordinate in the gene sequence.
