Path planning method for rotary-wing UAV based on hybrid grey wolf-particle swarm algorithm

The hybrid gray wolf-particle swarm algorithm is used to optimize the rotor UAV path planning, which solves the problem in the existing technology that path planning is difficult to fly efficiently and accurately reach the target point in a three-dimensional environment, and achieves more efficient path planning and energy management.

CN115454115BActive Publication Date: 2024-09-06SHANDONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211202414.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2024-09-06
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing path planning algorithms for rotary-wing UAVs are difficult to fly efficiently and accurately reach the target point in a three-dimensional environment, especially in the presence of obstacles. The gray wolf algorithm has a single search method and the particle swarm algorithm easily falls into a local optimum. , unable to effectively reduce path length and energy consumption.

Method used

The hybrid gray wolf-particle swarm algorithm (PSOGWO) is used to optimize the UAV path planning and integrate local and global search capabilities to avoid local optima.

Benefits of technology

It improves the accuracy of UAV path planning and search success rate, reduces path length and energy consumption, and achieves the ability to fly efficiently in a three-dimensional environment and accurately reach the target point.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454115B
    Figure CN115454115B
Patent Text Reader

Abstract

The present invention discloses a rotor UAV path planning method based on a hybrid gray wolf-particle swarm algorithm, which belongs to the field of aviation military operations and civil patrol technology, and specifically includes the following steps: constructing a UAV path obstacle model and performing environmental modeling; designing UAV performance constraints and cost functions; initializing a particle swarm and calculating the fitness of all particles; judging whether the maximum number of iterations has been reached, if so, outputting the search results and terminating the algorithm; otherwise, continuing to search for the best and iterating; continuing the particle swarm algorithm part until the maximum number of iterations has been reached and the entire algorithm is terminated to obtain the planned optimal path. The present invention applies the hybrid gray wolf-particle swarm search algorithm to rotor UAV path planning, which can help the UAV fly efficiently in a three-dimensional environment and accurately reach the target point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of aviation military operations and civilian patrols, and specifically relates to a rotorcraft unmanned aerial vehicle path planning method based on a hybrid grey wolf-particle swarm algorithm. Background Art

[0002] Rotary-wing UAV is an aircraft that can take off and land vertically and uses four or more rotors as the main power equipment. It has small propellers, good hovering, inverted flight, and sideways flight capabilities, simple operation, and is not restricted by the site. It has received extensive attention in the fields of military operations and civil inspections. As the complexity and intensity of flight missions continue to increase, rotary-wing UAVs will encounter various dynamic or static obstacles in the flight area, and their flight is greatly restricted. Therefore, it is crucial to study the autonomous path planning method of rotary-wing UAVs to keep the UAVs flying safely, reduce the range, reduce energy consumption, and improve the survival rate of UAVs. It has important practical application value.

[0003] To ensure that the rotor UAV passes through an area with obstacles safely and quickly, the key is to use an efficient path planning algorithm. Both the Gray Wolf Algorithm and the Particle Swarm Algorithm are widely used in the field of path planning. The Gray Wolf Optimization Algorithm has a single search method. Although it has strong exploration capabilities, its search success rate is low. The Particle Swarm Optimization Algorithm is simple to operate, converges quickly, and can find the global optimal value, but it is easily affected by the individual optimal position and the population optimal position and falls into the local optimal value. Neither of them can make the UAV fly efficiently in a three-dimensional environment and accurately reach the target point. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a rotor UAV path planning method based on a hybrid grey wolf-particle swarm algorithm (PSOGWO), which applies the hybrid grey wolf-particle swarm algorithm (PSOGWO) to the rotor UAV path planning, improves the rotor UAV's autonomous planning capability, obtains the optimal collision-free path, and minimizes the path length, flight time and energy consumption.

[0005] The technical solution of the present invention is as follows:

[0006] A path planning method for a rotary-wing UAV based on a hybrid gray wolf-particle swarm algorithm specifically comprises the following steps:

[0007] Step 1: Construct a drone path obstacle model and perform environmental modeling;

[0008] Step 2: Design the performance constraints and cost functions of the drone; the performance constraints include the maximum power constraint, the drone's own performance constraint, and the obstacle constraint;

[0009] Step 3: Initialize the particle swarm, initialize the number of the population, and initialize the speed and position of each individual in the search space; calculate the fitness of all particles, compare the extreme values ​​of all individuals to obtain the population extreme values ​​of all individuals, and record the optimal position of the particle swarm;

[0010] Step 4: Determine whether the maximum number of iterations has been reached. If so, output the search result and end the algorithm. Otherwise, update the speed and position of the individual through the optimal positions of the individual and the population, determine whether the particle is performing the gray wolf algorithm, and continuously iterate and update the optimal position of the particle after performing the gray wolf algorithm, and determine whether the minimum number of iterations has been reached. If so, replace the current particle position with the average value of the optimal position.

[0011] Step 5: Continue with the particle swarm algorithm until the maximum number of iterations is reached and the entire algorithm ends to obtain the planned optimal path.

[0012] Furthermore, the specific process of step 1 is as follows:

[0013] Step 1.1: Build a drone path obstacle model, using obstacles of different shapes to simulate various real objects in the flight environment, including using cylindrical obstacles to simulate various buildings encountered by drones during flight, and using spheres to simulate boulders and mounds encountered by drones during flight;

[0014] Step 1.2: Based on step 1.1, obstacle models with circular, square and L-shaped top views are selected in the search space to simulate the path environment of the UAV flight.

[0015] Furthermore, the specific process of step 2 is as follows:

[0016] Step 2.1, design the maximum power constraint; assume that the flight path of the aircraft is divided into n segments and the maximum range is L max , then the i-th leg of the voyage is represented by L i ; The cost function f of the length of the i-th path d for:

[0017]

[0018] x i ,y i ,z i Respectively represent the coordinates of the previous path point on the x, y, and z axes, x i+1 ,y i+1 ,z i+1 Respectively represent the coordinates of the next path point on the x, y, and z axes; Indicates the distance between the previous path point and the next path point;

[0019] Since the path generated by the algorithm search cannot meet the needs of UAV flight, the generated path needs to be smoothed and the curvature cost function f is introduced. c :

[0020]

[0021] Among them, y′ i Described as i Relative to x i At the coordinate (x i ,y i ) under the first-order derivative, y″ i Described as i Relative to x i At the coordinate (x i ,y i ) under the second-order derivative, n i Indicates the number of path points on the nth path;

[0022] Energy consumption of drone batteries b for:

[0023] f b =f d +f c (3)

[0024] Step 2.2: Design the UAV's own performance constraint function f o for:

[0025]

[0026] Among them, the pitch angle constraint function f from the current point to the next intermediate point pitch_angle (x i ) satisfies the following formula:

[0027]

[0028]

[0029] Where θ is the pitch angle of the drone, θ max is the maximum pitch angle of the UAV, and M is the constraint value;

[0030] The yaw angle constraint function f from the current point to the next position yaw_angle (x i ) satisfies the following formula:

[0031]

[0032]

[0033] In the formula, Ψi is the yaw angle of the drone, Ψ max is the maximum yaw angle of the drone;

[0034] The constraint function f of the flight altitude opt_height (x i ) is expressed as:

[0035]

[0036] Among them, H is the optimal flight altitude calculated based on environmental analysis and mission requirements, h i is the height of the drone from the ground, M h is the constraint value;

[0037] Step 2.3, design obstacle constraints: The drone will encounter various obstacles during flight. The obstacle constraint function f t It is expressed as:

[0038]

[0039] In the formula, Q represents the number of obstacles, d n,q represents the distance between the path point in the nth path segment and the qth obstacle, r q represents the radius of the qth obstacle;

[0040] Step 2.4: By analyzing the above constraint functions, the cost function of the UAV flight trajectory is obtained as follows:

[0041] f=ω1f b +ω2f o +ω3f t (11)

[0042] In the cost function, ω1, ω2, and ω3 represent the proportion of each part of the constraint function in the cost function, and the sum of the coefficients is 1.

[0043] Furthermore, the specific process of step 3 is as follows:

[0044] Step 3.1: Initialize the particle swarm, initialize the number of swarms, and initialize the speed and position of each individual in the search space, as shown below:

[0045]

[0046]

[0047] In the formula, represents the position parameter of the mth individual in the j-dimensional space at the kth iteration, It represents the velocity parameter of the mth individual in the j-dimensional space at the kth iteration;

[0048] Step 3.2: Use the cost function in step 2.4 to compare the optimal extreme values ​​of all individuals in the current population one by one to obtain the individual f with the optimal extreme value. m , thereby obtaining the global optimal extreme value f g , through the individual extreme value f m Get the current individual optimal position p m , through the population optimal extreme value f g Get the optimal position p of the population g , respectively expressed as follows:

[0049]

[0050] Among them, f m =(f m1 ,f m2 ,f m3 ) T represents the optimal extreme value parameter of the mth individual in the population in the j-dimensional space, p mj Represents the optimal position parameter corresponding to the optimal extreme value of the mth individual in the population in the j-dimensional space;

[0051]

[0052] Among them, f g =(f g1 ,f g2 ,f g3 ) T represents the optimal extreme value of the population in the j-dimensional space, p gj Represents the position parameter of the optimal individual in the population in the j-dimensional space.

[0053] Furthermore, the specific process of step 4 is as follows:

[0054] Step 4.1: Determine whether the maximum number of iterations has been reached. If so, output the search results and end; otherwise, update the speed and position of the individual through the optimal position of the individual and the population, as shown below:

[0055] v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (16)

[0056] In the formula, v m(k+1) is the speed of the k+1th iteration of the mth individual, k is the number of iterations; μ is the inertia weight, c1 and c2 are acceleration factors, ranging from (0,2); r1 and r2 are random numbers between 0 and 1,

[0057] The location is updated to:

[0058] x m (k+1)=x m (k)+v m (k+1) (17)

[0059] In the formula, x m (k+1) is the position of m individuals at the k+1th iteration;

[0060] Step 4.2: Determine whether the random number of the current particle is less than the set probability value 0.5. If not, return to step 3.2. If yes, the particle individual enters the gray wolf algorithm for individual position update optimization; the gray wolves are divided into 4 levels, namely α wolf, β wolf, δ wolf and ω wolf; α wolf, β wolf and δ wolf form a leadership group to lead ω wolf; ω wolf is the lowest level gray wolf in the wolf pack, and they always obey other types of wolves;

[0061] The gray wolf's encirclement process of hunting prey, the small population individual update position is as follows:

[0062] D m =|C m ·X p (k)-X m (k)| (18)

[0063] X m (k+1)=X p (k)-A m ×D m (19)

[0064] Among them, k is the current iteration number, X m (k) represents the position of the mth gray wolf in the search space, X p (k) is the location of the prey, D m is the distance between the mth gray wolf and the leader wolf, and the coefficient vector A m and C m It is expressed as:

[0065] A m =2a×r1-a (20)

[0066] C m =2×r2 (21)

[0067] a=2-2k / k max (twenty two)

[0068] where r1 and r2 are random parameters in [0,1]; a is the convergence factor, whose value decreases linearly from 2 to 0, in order to simulate the process of gray wolves approaching their prey, and k max is the maximum number of iterations;

[0069] Hunting process: By comparing the fitness values ​​of all particles, the best, second-best and second-best particles are selected to form a leadership group. The leadership group includes α, β and δ. The leadership group has the location information of the prey. Each ω wolf updates its position according to the best search agent:

[0070] D α =|C1.X α (k)-X m (k)| (23)

[0071] D β =|C2.X β (k)-X m (k)| (24)

[0072] D δ =|C3.X δ (k)-X m (k)| (25)

[0073] X1=X α (k)-A1.D α (26)

[0074] X2=X β (k)-A2.D β (27)

[0075] X3=X δ (k)-A3.D δ (28)

[0076] X m (k+1)=(X1+X2+X3) / 3 (29)

[0077] Among them, D α , D β , D δ They represent the distances between α wolf, β wolf and δ wolf and other gray wolf individuals, C1, C2, C3, A1, A2 and A3 are all coefficient vectors, X α , X β , X δrepresents the position of the leading group, X1, X2, and X3 represent the positions of the current gray wolf individual inferred by the three leading wolves; the number of iterations of the gray wolf algorithm increases by one after each iteration. When the number of iterations of the gray wolf algorithm is met, the original position of the current particle will be replaced by (X1+X2+X3) / 3, and the particle swarm algorithm part will continue with the replaced position; the number of iterations of the total iterative process increases by one.

[0078] Furthermore, the specific process of step 5 is as follows:

[0079] Step 5.1: The initial state of the particle swarm algorithm is a group of randomly distributed particles. Each of these particles will be initialized with a random speed. After continuous iterations, the optimal solution will gradually emerge. During the iteration process, each particle will update its position according to its inertia, its own historical optimal position and the global optimal position. The formula is as follows:

[0080] v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (30)

[0081] x m (k+1)=x m (k)+v m (k+1) (31)

[0082] Where k is the number of iterations; μ is the inertia weight, the larger its value, the stronger the global optimization ability and the weaker the local optimization ability; c1 and c2 are acceleration factors, which are used to feedback individual information and exchange group information, so that particles can make judgments based on the information obtained from individual and group optimization, adjust their own positions, and move to the optimal position in the range of (0,2); r1 and r2 are random numbers from 0 to 1, which are used to increase the fault tolerance and optimization ability of particles; p m is the historical optimal position corresponding to the mth particle, which is the optimal position of the particle in all iterations; p g is the global optimal position, which is the historical optimal position of the optimal particle obtained by comparing the fitness values ​​of all particles;

[0083] Step 5.2: Based on step 5.1, the optimal value of the particle swarm is continuously updated and recorded, and the position of the UAV is replaced by the optimal position of the current particle swarm in each iterative update. After reaching the maximum number of iterations, the position of the UAV after each iteration is connected with a smooth curve to obtain the optimal path planned by the gray wolf-particle swarm algorithm.

[0084] Beneficial technical effects brought by the present invention:

[0085] Based on the gray wolf algorithm and the particle swarm algorithm, the present invention proposes a hybrid gray wolf-particle swarm search algorithm, which integrates the powerful local search capability of the gray wolf algorithm and the global search capability of the particle swarm algorithm. The three alpha wolves unique to the gray wolf algorithm can help the population escape from the local optimal value. At the same time, the best individuals in the population of the particle swarm algorithm can also help the population find the target position better, improve the search success rate, and thus improve the accuracy of the UAV path planning; the present invention applies the hybrid gray wolf-particle swarm search algorithm to the rotor UAV path planning, which can help the UAV fly efficiently in a three-dimensional environment and accurately reach the target point. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 It is a flow chart of the overall search process of the gray wolf-particle swarm algorithm in the present invention;

[0087] Figure 2 This is a comparison result diagram of the gray wolf optimization algorithm and the gray wolf-particle swarm algorithm in the parameter space in the experiment of the present invention;

[0088] Figure 3 This is a comparison result diagram of the gray wolf optimization algorithm and the gray wolf-particle swarm algorithm in the target space in the experiment of the present invention;

[0089] Figure 4 It is a comparison diagram of the distribution of the paths planned by the gray wolf optimization algorithm and the gray wolf-particle swarm algorithm in the present invention on the x-axis, y-axis and z-axis respectively. DETAILED DESCRIPTION

[0090] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0091] A path planning method for a rotary-wing UAV based on a hybrid gray wolf-particle swarm algorithm specifically comprises the following steps:

[0092] Step 1: Build the obstacle model of the drone path and perform environmental modeling. The specific process is as follows:

[0093] Step 1.1: Construct a drone path obstacle model, which mainly uses obstacles of different shapes to simulate various real objects in the flight environment. For example, cylindrical obstacles are used to simulate various buildings encountered by drones during flight, and spheres are used to simulate boulders and some mounds encountered by drones during flight.

[0094] Step 1.2: Based on step 1.1, a total of 13 obstacle models with circular, square and L-shaped top views are selected in the search space to simulate the path environment of the UAV flight.

[0095] Step 2: Design the drone performance constraints and cost function. The performance constraints include the maximum power constraint, the drone's own performance constraint, and the obstacle constraint. The specific process is as follows:

[0096] Step 2.1, Maximum power constraint: The power carried by the rotorcraft is limited during the flight process, and the flight distance of the aircraft is limited by the battery capacity. The power consumption of the drone is mainly related to the flight path of the drone and the curvature cost of the flight path. Assume that the flight path of the aircraft is divided into n segments, and the maximum range is L max , then the i-th leg of the voyage can be expressed as L i The cost function f of the length of the i-th path is d for:

[0097]

[0098] x i ,y i ,z i Respectively represent the coordinates of the previous path point on the x, y, and z axes, x i+1 ,y i+1 ,z i+1 Respectively represent the coordinates of the next path point on the x, y, and z axes. Indicates the distance between the previous path point and the next path point. Since the path generated by the algorithm search cannot meet the needs of drone flight, the generated path needs to be smoothed and the curvature cost function f is introduced. c :

[0099]

[0100] Among them, y′ i Described as i Relative to x i At the coordinate (x i ,y i ) under the first-order derivative, y″ i Described as i Relative to x i At the coordinate (x i ,y i ) under the second-order derivative, n i Indicates the number of path points on the nth path.

[0101] Energy consumption of drone batteries b for:

[0102] f b =f d +f c (3)

[0103] Among them, f drepresents the cost function of the length of the i-th path, f c represents the curvature cost function.

[0104] Step 2.2: UAV performance constraint function f o for:

[0105]

[0106] The climbing and diving angles of a rotary wing UAV are an important constraint in the path planning process. The maximum pitch angle is the vertical angle limit of the UAV from the current position to the next intermediate point. The pitch angle of the UAV cannot exceed this maximum pitch angle. The pitch angle constraint function from the current point to the next intermediate point is f pitch_angle (x i ) satisfies the following formula:

[0107]

[0108]

[0109] Where θ is the pitch angle of the drone, θ max is the maximum pitch angle of the UAV, and M is the appropriate constraint value.

[0110] In the actual flight process of the rotor UAV, the maximum yaw angle constraint means that when the rotor UAV turns from the current position to the next position, it is limited by its own maneuverability. The yaw angle can only be less than or equal to the maximum yaw angle, and the aircraft can fly to the next position. The yaw angle constraint function from the current point to the next position is f yaw_angle (x i ) satisfies the following formula:

[0111]

[0112]

[0113] In the formula, Ψ i is the yaw angle of the drone, Ψ max is the maximum yaw angle of the UAV, and M is the appropriate constraint value.

[0114] Rotor UAVs are mostly flown in cities and mountainous areas. If the UAV flies too low, it will collide with complex terrain, and if the UAV flies too high, it will consume too much power. Therefore, it is necessary to choose a suitable altitude range. The constraint function f of the flight altitude is opt_height (x i ) can be expressed as:

[0115]

[0116] Among them, H is the optimal flight altitude calculated based on environmental analysis and mission requirements, h i is the height of the drone from the ground, M h is the constraint value.

[0117] Step 2.3, obstacle constraint: The drone will encounter various obstacles during flight. The obstacle constraint function f t It is expressed as:

[0118]

[0119] In the formula, Q represents the number of obstacles, d n,q represents the distance between the path point in the nth path segment and the qth obstacle, r q represents the radius of the qth obstacle.

[0120] Step 2.4: By analyzing the above constraint functions, the cost function of the UAV flight trajectory can be obtained as follows:

[0121] f=ω1f b +ω2f o +ω3f t (11)

[0122] In the cost function, ω1, ω2, and ω3 represent the proportion of the constraint functions of each part in the cost function, and the sum of the coefficients is 1. Reasonable adjustment of the proportional coefficients according to different environments can enable the UAV to obtain a better flight path.

[0123] Step 3: Initialize the particle swarm, that is, initialize the number of the population and the speed and position of each individual in the search space; calculate the fitness of all particles, that is, the cost function, compare the extreme values ​​of all individuals to obtain the population extreme values ​​of all individuals, and record the optimal position of the particle swarm. The specific process is as follows:

[0124] Step 3.1, initialize the particle swarm, that is, initialize the number of populations and initialize the speed and position of each individual in the search space, as shown below:

[0125]

[0126]

[0127] In the formula, represents the position parameter of the mth individual in the j-dimensional space at the kth iteration, Represents the velocity parameter of the mth individual in the j-dimensional space at the kth iteration.

[0128] Step 3.2: Use the cost function in step 2.4 to compare the optimal extreme values ​​of all individuals in the current population one by one to obtain the individual f with the optimal extreme value. m , thereby obtaining the global optimal extreme value f g , through the individual extreme value f m Get the current individual optimal position p m , through the population optimal extreme value f g Get the optimal position p of the population g , respectively expressed as follows:

[0129]

[0130] Among them, f m =(f m1 ,f m2 ,f m3 ) T represents the optimal extreme value parameter of the mth individual in the population in the j-dimensional space, p mj Represents the optimal position parameter corresponding to the optimal extreme value of the mth individual in the population in the j-dimensional space.

[0131]

[0132] Among them, f g =(f g1 ,f g2 ,f g3 ) T represents the optimal extreme value of the population in the j-dimensional space, p gj Represents the position parameter of the optimal individual in the population in the j-dimensional space.

[0133] Step 4: Determine whether the maximum number of iterations has been reached. If so, output the search result and end the algorithm. Otherwise, update the speed and position of the individual through the optimal position of the individual and the population, determine whether the particle is performing the gray wolf algorithm, and continuously iterate and update the optimal position of the particle after performing the gray wolf algorithm, and determine whether the minimum number of iterations has been reached. If so, replace the current particle position with the average value of the optimal position. The specific process is as follows:

[0134] Step 4.1: Determine whether the maximum number of iterations has been reached. If so, output the search results and end; otherwise, update the speed and position of the individual through the optimal position of the individual and the population, as shown below:

[0135] v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (16)

[0136] In the formula, v m (k+1) is the speed of the k+1th iteration of the mth individual, k is the number of iterations; μ is the inertia weight, c1 and c2 are acceleration factors, and the value range is (0,2). r1 and r2 are random numbers between 0 and 1,

[0137] The location is updated to:

[0138] x m (k+1)=x m (k)+v m (k+1) (17)

[0139] In the formula, x m (k+1) is the position of the m individuals at the k+1th iteration.

[0140] Step 4.2, determine whether the random number of the current particle is less than the set probability value prob. In the present invention, the probability value is set to 0.5. If not, return to step 3.2. If yes, the particle individual enters the gray wolf algorithm for individual position update optimization. The gray wolves are divided into 4 levels, namely α wolf, β wolf, δ wolf and ω wolf. α wolf, β wolf and δ wolf constitute the leadership group to lead ω wolf. ω wolf is the lowest level gray wolf in the wolf pack, and they always obey other types of wolves.

[0141] The gray wolf's encirclement process of hunting prey, the small population individual update position is as follows:

[0142] D m =|C m ·X p (k)-X m (k)| (18)

[0143] X m (k+1)=X p (k)-A m ×D m (19)

[0144] Among them, k is the current iteration number, X m (k) represents the position of the mth gray wolf in the search space, X p (k) is the location of the prey, D m is the distance between the mth gray wolf and the leader wolf, and the coefficient vector A m and C m It is expressed as:

[0145] A m =2a×r1-a (20)

[0146] C m =2×r2 (21)

[0147] a=2-2k / k max (twenty two)

[0148] where r1 and r2 are random parameters in [0,1]; a is the convergence factor, whose value decreases linearly from 2 to 0, in order to simulate the process of gray wolves approaching their prey, and k max is the maximum number of iterations.

[0149] Hunting process: By comparing the fitness values ​​of all particles, the best, second-best, and second-best particles are selected to form a leadership group (α, β, and δ). The leadership group has the location information of the prey. Each ω wolf can update its position according to the best search agent:

[0150] D α =|C1.X α (k)-X m (k)| (23)

[0151] D β =|C2.X β (k)-X m (k)| (24)

[0152] D δ =|C3.X δ (k)-X m (k)| (25)

[0153] X1=X α (k)-A1.D α (26)

[0154] X2=X β (k)-A2.D β (27)

[0155] X3=X δ (k)-A3.D δ (28)

[0156] X m (k+1)=(X1+X2+X3) / 3 (29)

[0157] Among them, D α , D β , D δ They represent the distances between α wolf, β wolf and δ wolf and other gray wolf individuals, C1, C2, C3, A1, A2 and A3 are all coefficient vectors, X α , X β , X δrepresents the position of the leading group, and X1, X2, and X3 represent the positions of the current gray wolf individual inferred by the three leading wolves. The number of iterations of the gray wolf algorithm increases by one after each iteration. When the number of iterations of the gray wolf algorithm is met, the original position of the current particle will be replaced by (X1+X2+X3) / 3, and the particle swarm algorithm part will continue with the replaced position. The number of iterations of the total iterative process increases by one.

[0158] Step 5: Continue with the particle swarm algorithm until the maximum number of iterations is reached and the entire algorithm ends to obtain the optimal path. The specific process is as follows:

[0159] Step 5.1: The initial state of the particle swarm algorithm is a group of randomly distributed particles. Each of these particles will be initialized with a random speed. After continuous iteration, the optimal solution will gradually emerge. During the iteration process, each particle will update its position according to its inertia, its own historical optimal position and the global optimal position. The formula is as follows:

[0160] v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (30)

[0161] x m (k+1)=x m (k)+v m (k+1) (31)

[0162] In the formula, k is the number of iterations; μ is the inertia weight. The larger its value, the stronger the global optimization ability and the weaker the local optimization ability; c1 and c2 are acceleration factors, which conduct individual information feedback and group information exchange, so that particles can make judgments based on the information obtained from individual and group optimization, adjust their own positions, and move to the optimal position in the range of (0,2). r1 and r2 are random numbers from 0 to 1, which are used to increase the fault tolerance and optimization ability of particles. m is the historical optimal position of the mth particle, that is, the optimal position of the particle in all iterations; p g is the global optimal position, that is, the historical optimal position of the optimal particle obtained by comparing the fitness values ​​of all particles.

[0163] Step 5.2: Based on step 5.1, the optimal value of the particle swarm is continuously updated and recorded, and each iteration update replaces the position of the drone with the optimal position of the current particle swarm population. After reaching the maximum number of iterations, the position of the drone after each iteration is connected with a smooth curve, so that the optimal path planned by the gray wolf-particle swarm algorithm is obtained. After the gray wolf-particle swarm algorithm reaches the maximum number of iterations, it outputs the final global optimal value, which is compared with the global optimal value obtained by the gray wolf optimization algorithm. It is found that the global optimal value obtained by the gray wolf-particle swarm algorithm is smaller, that is, a better cost function value is obtained.

[0164] In order to apply the gray wolf-particle swarm algorithm to the path planning of rotary-wing UAV, improve the autonomous planning ability of the rotary-wing UAV, obtain the optimal collision-free path, and minimize the path length, flight time and energy consumption, this paper proposes a rotary-wing UAV path planning method based on the gray wolf-particle swarm algorithm. The search process of this algorithm is as follows Figure 1 shown.

[0165] In order to prove the feasibility and superiority of the present invention, the UAV path planning algorithm was simulated and analyzed.

[0166] Based on the obstacle constraint function f in step 2.3 t Expression, under the premise that the sum of all coefficients is 1, change the size of each coefficient and perform multiple groups of simulations. Figure 2 This is the comparison result between the grey wolf-particle swarm algorithm PSOGWO and the grey wolf optimization algorithm GWO in the parameter space. It can be seen that the path planned by the grey wolf-particle swarm algorithm is smoother than the path planned by the grey wolf optimization algorithm. Figure 3 This is the comparison result of the grey wolf-particle swarm algorithm PSOGWO and the grey wolf optimization algorithm GWO in the target space. It can be seen that although the convergence speed of the grey wolf optimization algorithm is faster than that of the grey wolf-particle swarm algorithm, the path planned by the grey wolf-particle swarm algorithm is smoother, the optimal cost function value is smaller, and the optimization effect is continuously improved over a long period of time. Figure 4 The distribution of the paths planned by the gray wolf optimization algorithm GWO and the gray wolf-particle swarm algorithm PSOGWO on the x-axis, y-axis, and z-axis respectively. It can be seen that the path lengths planned by the gray wolf-particle swarm algorithm on the x, y, and z axes are shorter than those planned by the gray wolf optimization algorithm.

[0167] pass Figure 2-Figure 4 It can be seen that as the proportion of threat constraints set in the cost function decreases, the proportion of the drone's own performance constraints and maximum power constraints set increases, the optimal cost values ​​obtained by the convergence of the two algorithms are also increasing. However, when the cost function is the same, the Gray Wolf-Particle Swarm Algorithm has a better convergence effect than the Gray Wolf Optimization Algorithm and obtains a smaller optimal cost value.

[0168] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A rotor UAV path planning method based on a hybrid gray wolf-particle swarm algorithm, characterized in that: The specific steps include: Step 1: Construct a drone path obstacle model and perform environmental modeling; Step 2: Design the performance constraints and cost functions of the drone; the performance constraints include the maximum power constraint, the drone's own performance constraint, and the obstacle constraint; Step 3: Initialize the particle swarm, initialize the number of populations, and initialize the speed and position of each individual in the search space; calculate the fitness of all particles, compare the extreme values ​​of all individuals to obtain the population extreme values ​​of all individuals, and record the optimal position of the particle swarm; the specific process is as follows: Step 3.1: Initialize the particle swarm, initialize the number of swarms, and initialize the speed and position of each individual in the search space, as shown below: In the formula, represents the position parameter of the mth individual in the j-dimensional space at the kth iteration, It represents the velocity parameter of the mth individual in the j-dimensional space at the kth iteration; Step 3.2: Use the cost function in step 2.4 to compare the optimal extreme values ​​of all individuals in the current population one by one to obtain the individual f with the optimal extreme value. m , thereby obtaining the global optimal extreme value f g , through the individual extreme value f m Get the current individual optimal position p m , through the population optimal extreme value f g Get the optimal position p of the population g , respectively expressed as follows: Among them, f m =(f m1 ,f m2 ,f m3 ) T represents the optimal extreme value parameter of the mth individual in the population in the j-dimensional space, p mj Represents the optimal position parameter corresponding to the optimal extreme value of the mth individual in the population in the j-dimensional space; Among them, f g =(f g1 ,f g2 ,f g3 ) T represents the optimal extreme value of the population in the j-dimensional space, p gj Represents the optimal position parameter of the optimal individual in the population in the j-dimensional space; Step 4: Determine whether the maximum number of iterations has been reached. If so, output the search result and end the algorithm. Otherwise, update the speed and position of the individual through the optimal position of the individual and the population, determine whether the particle is performing the gray wolf algorithm, and continuously iterate and update the optimal position of the particle after performing the gray wolf algorithm, and determine whether the minimum number of iterations has been reached. If so, replace the current particle position with the average value of the optimal position. The specific process is as follows: Step 4.1: Determine whether the maximum number of iterations has been reached. If so, output the search results and end; otherwise, update the speed and position of the individual through the optimal position of the individual and the population, as shown below: v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (16) In the formula, v m (k+1) is the speed of the k+1th iteration of the mth individual, k is the number of iterations; μ is the inertia weight, c1 and c2 are acceleration factors, ranging from (0,2); r1 and r2 are random numbers between 0 and 1, The location is updated to: x m (k+1)=x m (k)+v m (k+1) (17) In the formula, x m (k+1) is the position of m individuals at the k+1th iteration; Step 4.2: Determine whether the random number of the current particle is less than the set probability value 0.

5. If not, return to step 3.

2. If yes, the particle individual enters the gray wolf algorithm for individual position update optimization; the gray wolves are divided into 4 levels, namely α wolf, β wolf, δ wolf and ω wolf; α wolf, β wolf and δ wolf form a leadership group to lead ω wolf; ω wolf is the lowest level gray wolf in the wolf pack, and they always obey other types of wolves; The gray wolf's encirclement process of hunting prey, the small population individual update position is as follows: D m =C m ·X p (k)-X m (k) (18) X m (k+1)=X p (k)-A m ×D m (19) Among them, k is the current iteration number, X m (k) represents the position of the mth gray wolf in the search space, X p (k) is the location of the prey, D m is the distance between the mth gray wolf and the leader wolf, and the coefficient vector A m and C m It is expressed as: A m =2a×r1-a (20) C m =2×r2 (21) a=2-2k / k max (22) where r1 and r2 are random parameters in [0,1]; a is the convergence factor, whose value decreases linearly from 2 to 0, in order to simulate the process of gray wolves approaching their prey, and k max is the maximum number of iterations; Hunting process: By comparing the fitness values ​​of all particles, the best, second-best and second-best particles are selected to form a leadership group. The leadership group includes α, β and δ. The leadership group has the location information of the prey. Each ω wolf updates its position according to the best search agent: D α =|C1.X α (k)-X m (k)| (23) D β =|C2.X β (k)-X m (k)| (24) D δ =|C3.X δ (k)-X m (k)| (25) X1=X α (k)-A1.D α (26) X2=X β (k)-A2.D β (27) X3=X δ (k)-A3.D δ (28) X m (k+1)=(X1+X2+X3) / 3 (29) Among them, D α , D β , D δ They represent the distances between α wolf, β wolf and δ wolf and other gray wolf individuals, C1, C2, C3, A1, A2 and A3 are all coefficient vectors, X α , X β , X δ represents the position of the leading group, X1, X2, and X3 represent the positions of the current gray wolf individual inferred by the three leading wolves; the number of iterations of the gray wolf algorithm increases by one after each iteration. When the number of iterations of the gray wolf algorithm is met, the original position of the current particle will be replaced by (X1+X2+X3) / 3, and the particle swarm algorithm part will continue with the replaced position; the number of iterations of the total iterative process increases by one; Step 5: Continue with the particle swarm algorithm until the maximum number of iterations is reached and the entire algorithm ends to obtain the planned optimal path.

2. The rotor UAV path planning method based on the hybrid gray wolf-particle swarm algorithm according to claim 1 is characterized in that: The specific process of step 1 is as follows: Step 1.1: Build a drone path obstacle model, using obstacles of different shapes to simulate various real objects in the flight environment, including using cylindrical obstacles to simulate various buildings encountered by drones during flight, and using spheres to simulate boulders and mounds encountered by drones during flight; Step 1.2: Based on step 1.1, obstacle models with circular, square and L-shaped top views are selected in the search space to simulate the path environment of the UAV flight.

3. The rotor UAV path planning method based on the hybrid gray wolf-particle swarm algorithm according to claim 1 is characterized in that: The specific process of step 2 is as follows: Step 2.1, design the maximum power constraint; assume that the flight path of the aircraft is divided into n segments and the maximum range is L max , then the i-th leg of the voyage is represented by L i ; The cost function f of the length of the i-th path d for: x i ,y i ,z i Respectively represent the coordinates of the previous path point on the x, y, and z axes, x i+1 ,y i+1 ,z i+1 Respectively represent the coordinates of the next path point on the x, y, and z axes; Indicates the distance between the previous path point and the next path point; Since the path generated by the algorithm search cannot meet the needs of UAV flight, the generated path needs to be smoothed and the curvature cost function f is introduced. c : Among them, y i ′ is described as y i Relative to x i At the coordinate (x i ,y i ) under the first-order derivative, y i "Described as y i Relative to x i At the coordinate (x i ,y i ) under the second-order derivative, n i Indicates the number of path points on the nth path; Energy consumption of drone batteries b for: f b =f d +f c (3) Step 2.2: Design the UAV's own performance constraint function f o for: Among them, the pitch angle constraint function f from the current point to the next intermediate point pitch_angle (x i ) satisfies the following formula: Where θ is the pitch angle of the drone, θ max is the maximum pitch angle of the UAV, and M is the constraint value; The yaw angle constraint function f from the current point to the next position yaw_angle (x i ) satisfies the following formula: In the formula, Ψ i is the yaw angle of the drone, Ψ max is the maximum yaw angle of the drone; The constraint function f of the flight altitude opt_height (x i ) is expressed as: Among them, H is the optimal flight altitude calculated based on environmental analysis and mission requirements, h i is the height of the drone from the ground, M h is the constraint value; Step 2.3, design obstacle constraints: The drone will encounter various obstacles during flight. The obstacle constraint function f t It is expressed as: In the formula, Q represents the number of obstacles, d n,q represents the distance between the path point in the nth path segment and the qth obstacle, r q represents the radius of the qth obstacle; Step 2.4: By analyzing the above constraint functions, the cost function of the UAV flight trajectory is obtained as follows: f=ω1f b +ω2f o +ω3f t (11) In the cost function, ω1, ω2, and ω3 represent the proportion of each part of the constraint function in the cost function, and the sum of the coefficients is 1.

4. The rotor UAV path planning method based on the hybrid gray wolf-particle swarm algorithm according to claim 1 is characterized in that: The specific process of step 5 is as follows: Step 5.1: The initial state of the particle swarm algorithm is a group of randomly distributed particles. Each of these particles will be initialized with a random speed. After continuous iterations, the optimal solution will gradually emerge. During the iteration process, each particle will update its position according to its inertia, its own historical optimal position and the global optimal position. The formula is as follows: v m (k+1)=μv m (k)+c1r1(p m (k)-x m (k))+c2r2(p g (k)-x m (k)) (30) x m (k+1)=x m (k)+v m (k+1) (31) Where k is the number of iterations; μ is the inertia weight, the larger its value, the stronger the global optimization ability and the weaker the local optimization ability; c1 and c2 are acceleration factors, which are used to feedback individual information and exchange group information, so that particles can make judgments based on the information obtained from individual and group optimization, adjust their own positions, and move to the optimal position in the range of (0,2); r1 and r2 are random numbers from 0 to 1, which are used to increase the fault tolerance and optimization ability of particles; p m is the historical optimal position corresponding to the mth particle, which is the optimal position of the particle in all iterations; p g is the global optimal position, which is the historical optimal position of the optimal particle obtained by comparing the fitness values ​​of all particles; Step 5.2: Based on step 5.1, the optimal value of the particle swarm is continuously updated and recorded, and the position of the UAV is replaced by the optimal position of the current particle swarm in each iterative update. After reaching the maximum number of iterations, the position of the UAV after each iteration is connected with a smooth curve to obtain the optimal path planned by the gray wolf-particle swarm algorithm.