Unmanned aerial vehicle three-dimensional path planning method based on improved snake optimization algorithm
By combining improved snake optimization and chaotic optimization algorithms, the problems of poor optimization ability and slow convergence speed in UAV 3D path planning are solved, achieving more efficient path planning and obstacle avoidance capabilities, and improving the flight performance of UAVs in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2026-04-07
AI Technical Summary
Existing UAV 3D path planning algorithms have poor optimization capabilities in complex spaces, low efficiency in obstacle avoidance path planning, and UAVs cannot approach the target point from a specific direction. Furthermore, traditional ant colony algorithms have slow convergence speed and are prone to getting trapped in local optima.
An improved snake optimization algorithm is adopted, which combines the maximum safe range of UAV control variables and state variables, sets corresponding parameters, formulates a cost function and performs path optimization, divides the exploration and development phases, and introduces a chaotic optimization algorithm to accelerate convergence.
It narrows the search range, reduces the amount of computation, improves the efficiency and accuracy of path planning, enhances the path planning capability of UAVs in complex environments, reduces randomness, and improves convergence speed.
Smart Images

Figure CN116501089B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of path planning, in particular to a three-dimensional path planning method for unmanned aerial vehicles based on an improved snake optimization algorithm. BACKGROUND
[0002] Path planning for unmanned aerial vehicles refers to planning an optimal or satisfactory flight path for an unmanned aerial vehicle from an initial point to a target point in a flight area, under the premise of considering factors such as flight threats, flight areas, and physical condition limitations of the unmanned aerial vehicle. Path planning for unmanned aerial vehicles is mainly applied in aerial photography, surveying and mapping, and surface surveying.
[0003] For complex space planning, existing solutions have poor path search algorithm optimization ability, low unmanned aerial vehicle obstacle avoidance path planning efficiency, and the problem that unmanned aerial vehicles cannot approach the target point from a specific direction. Moreover, most three-dimensional path planning for unmanned aerial vehicles uses traditional ant colony algorithms, which have the disadvantages of slow convergence speed and being prone to local optimum in unmanned aerial vehicle path planning.
[0004] Therefore, for the problem of three-dimensional path planning for unmanned aerial vehicles in complex flight environments, an unmanned aerial vehicle path planning algorithm based on an improved snake optimization algorithm is proposed. SUMMARY
[0005] The present application provides a three-dimensional path planning method for unmanned aerial vehicles based on an improved snake optimization algorithm to solve the above problems in the prior art, such as poor path search algorithm optimization ability, low unmanned aerial vehicle obstacle avoidance path planning efficiency, and the problem that unmanned aerial vehicles cannot approach the target point from a specific direction. Moreover, most three-dimensional path planning for unmanned aerial vehicles uses traditional ant colony algorithms, which have the disadvantages of slow convergence speed and being prone to local optimum in unmanned aerial vehicle path planning.
[0006] To achieve the above purpose, the present application provides the following technical scheme:
[0007] The three-dimensional path planning method for unmanned aerial vehicles based on the improved snake optimization algorithm comprises:
[0008] S101: based on the maximum safety range of the unmanned aerial vehicle control variable and the state variable, setting the corresponding parameters of the unmanned aerial vehicle;
[0009] S102: formulating a cost function based on the constraints of the three-dimensional path of the unmanned aerial vehicle, converting the path planning problem into a path optimization problem, and obtaining the path fitness based on the path optimization problem;
[0010] S103: based on the improved snake optimization algorithm, selecting the path fitness based on the corresponding parameters of the unmanned aerial vehicle, and obtaining the optimal path.
[0011] Step S101 includes:
[0012] S1011: Based on the UAV's own motion constraints, the control variables and state variables are limited to the maximum safe range of UAV flight.
[0013] S1012: Based on control variables and state variables, set the corresponding parameters of the UAV. The corresponding parameters of the UAV include the UAV's own performance parameters and the path generation simulation scene parameters.
[0014] S1013: Based on the obstacles in the UAV flight mission space, set the obstacle zone, collision zone and danger zone.
[0015] Step S102 includes:
[0016] S1021: Based on the constraint costs of the UAV during flight, formulate the total cost function, where the constraint costs include path length cost, path safety cost, path flight altitude cost, and turning angle (or climb angle) cost.
[0017] S1022: Based on the flight path of the UAV, a simulation scene is generated. The path coordinates are used as variables. The cost values of the four constraints are calculated according to the corresponding formulas.
[0018] S1023: Based on the total cost function, perform weighted calculations on the constraint cost values to obtain the path fitness.
[0019] Step S103 includes:
[0020] S1031: Based on the importance of the UAV's mission and the constraints of its flight, the improved snake optimization algorithm is divided into an exploration phase and a development phase;
[0021] S1032: If the current UAV flight phase is the exploration phase, then arbitrarily select the path corresponding to the path fitness, and update the path nodes in real time according to the currently selected path;
[0022] S1033: If the current UAV flight phase is the development phase, select the optimal path corresponding to the path fitness, reach the destination of the UAV mission based on the optimal path, and update the path nodes in real time according to the optimal route.
[0023] Step S1012 includes:
[0024] The area inside all obstacles in the flight mission space is designated as the obstacle zone, the area within a distance D from the obstacle zone is designated as the collision zone, and the area within a distance S from the collision zone is designated as the danger zone. Here, D represents the diameter of the UAV, and S represents the distance between the danger zone and the collision zone.
[0025] If the set of hazards for all obstacles is P, the hazard area is cylindrical or spherical, the hazard center is O, and the radius is R, then the obstacle area, collision area, and hazard area are separated based on the hazard area.
[0026] Step S1022 includes:
[0027] In the cost formulas corresponding to the four constraints, the path length cost F1 is composed of the sum of the distances between any two adjacent nodes from the starting point to the ending point; the path safety cost F2 is related to the collision penalty factor, the value of which is determined by the magnitude of K (represented as the distance from the path to the danger center O); the flight altitude cost F3 is calculated by adding the altitude penalty factors of all path nodes, and the closer the UAV is to the minimum or maximum flight altitude, the greater the altitude penalty factor becomes; the turning angle (or climb angle) related cost F4 is related to the turning angle and climb angle between two consecutive paths.
[0028] Step S1023 includes:
[0029] Based on the path node set X i The relevant optimality, safety, and smoothness constraints are used to weight the constraint cost values, and the formula for calculating the total cost function is as follows:
[0030]
[0031] Among them, b k The values represent weighting coefficients, with F1, F2, F3, and F4 representing the constraint cost values related to path length cost, path safety cost, flight altitude cost, and turning angle (or climb angle), respectively.
[0032] Step S1033 includes:
[0033] When the drone flight phase is in the development phase, based on the snake optimization algorithm, new path nodes are randomly generated in the alternation phase and the worst path node is replaced.
[0034] The worst path node is replaced by a new path node, and the range of randomly generated new path nodes is limited. The search range of path nodes is narrowed based on the range of the new path nodes.
[0035] The calculation is mainly based on the snake optimization algorithm, and the optimal path in the path is searched using the chaotic optimization algorithm to guide the search towards the optimal path.
[0036] The chaotic optimization algorithm includes: extracting the optimal solution of the path node, obtaining variables by assigning values to the optimal solution, generating random numbers based on the variables, reassigning values to the fixed point, mapping the reassigned optimal solution to the optimization variable interval, performing chaotic search on the optimal solution to generate a new solution; determining whether the new solution exceeds the set boundary, if the result is that it exceeds the boundary, performing boundary replacement, and then re-determining whether the new solution exceeds the set boundary, if the result is within the boundary range, determining whether the new solution is better; if the result is not better, regenerating random numbers and chaotic variables, reassigning the regenerated random numbers and mapping them to the optimization variable interval, if the result is better, outputting the optimal solution and optimal variable.
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] A UAV 3D path planning method based on an improved snake optimization algorithm includes: setting corresponding UAV parameters based on the maximum safe range of UAV control and state variables; formulating a cost function based on the constraints of the UAV 3D path, transforming the path planning problem into a path optimization problem; obtaining the path fitness based on the path optimization problem; and selecting the optimal path based on the path fitness using the improved snake optimization algorithm, based on the corresponding UAV parameters. The snake optimization algorithm limits the search range, allowing the range of generated random path nodes to be updated in real time. This improvement not only narrows the search range but also reduces computational load, decreases randomness, and accelerates the process of updating path nodes.
[0039] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0040] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0041] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0042] Figure 1 This is a flowchart of the UAV 3D path planning method based on the improved snake optimization algorithm in an embodiment of the present invention;
[0043] Figure 2 This is a flowchart illustrating the setting of corresponding parameters for the UAV in the UAV 3D path planning method based on the improved snake optimization algorithm in this embodiment of the invention.
[0044] Figure 3 This is a flight area analysis diagram in the UAV 3D path planning method based on the improved snake optimization algorithm in an embodiment of the present invention.
[0045] Figure 4 This is a flowchart of the chaotic optimization algorithm in the UAV 3D path planning method based on the improved snake optimization algorithm in an embodiment of the present invention. Detailed Implementation
[0046] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0047] This invention provides a UAV 3D path planning method based on an improved snake optimization algorithm. Please refer to [link to relevant documentation]. Figures 1 to 4 ,include:
[0048] S101: Based on the maximum safe range of the UAV's control and state variables, set the corresponding parameters for the UAV;
[0049] S102: Formulate a cost function based on the constraints of the UAV's 3D path, transform the path planning problem into a path optimization problem, and obtain the path fitness based on the path optimization problem;
[0050] S103: Based on the corresponding parameters of the UAV, the path fitness is selected using an improved snake optimization algorithm to obtain the optimal path.
[0051] The working principle of the above technical solution is as follows: Based on the maximum safe range of UAV control variables (such as UAV flight speed, acceleration, etc.) and state variables (such as yaw angle, roll angle, and pitch angle), the corresponding parameters of the UAV are set; then, a cost function is formulated according to certain constraints, transforming the path planning problem into an optimization problem; then, the path coordinates are used as variables, and the total cost objective function composed of the weighted sum of four costs is solved; finally, the path fitness is selected through an improved snake optimization algorithm to obtain the optimal path.
[0052] The beneficial effects of the above technical solution are as follows: The search range is limited in the snake optimization algorithm, allowing the range of generated random path nodes to be updated in real time. This improvement not only narrows the search range but also reduces computational load, lowers randomness, and accelerates the process of updating path nodes. Furthermore, a chaotic optimization algorithm is introduced, enabling the optimization process to search towards the global optimum more quickly and accelerating convergence. Compared with the basic snake optimization algorithm and the improved particle swarm optimization algorithm, this improved snake optimization algorithm has significant advantages in terms of iteration count, path length, and path smoothness.
[0053] In another embodiment, step S101 includes:
[0054] S1011: Based on the UAV's own motion constraints, the control variables and state variables are limited to the maximum safe range of UAV flight.
[0055] S1012: Based on control variables and state variables, set the corresponding parameters of the UAV. The corresponding parameters of the UAV include the UAV's own performance parameters and the path generation simulation scene parameters.
[0056] S1013: Based on the obstacles in the UAV flight mission space, set the obstacle zone, collision zone and danger zone.
[0057] The working principle of the above technical solution is as follows: Constrained by its own kinematics, during flight, the control variables (such as UAV flight speed and acceleration) and state variables (such as yaw angle, roll angle, and pitch angle) of the UAV must meet the maximum safe range. That is, the actual flight trajectory satisfies the geometric constraint of continuous curvature values. Based on the control variables and state variables, corresponding parameters of the UAV (including UAV performance parameters and path generation simulation scene parameters) are set. The UAV's turning acceleration is determined by these corresponding parameters. During flight, the UAV experiences obstacle zones, collision zones, and danger zones. The interiors of all obstacles in the flight mission space are designated as obstacle zones, and then collision zones and danger zones are defined.
[0058] The beneficial effects of the above technical solution are as follows: Based on the UAV's own motion constraints, control variables and state variables are limited to the maximum safe range of UAV flight; based on the control variables and state variables, corresponding parameters for the UAV are set, including the UAV's own performance parameters and path generation simulation scene parameters; based on obstacles in the UAV's flight mission space, obstacle zones, collision zones, and danger zones are set. By dividing different areas, the UAV can effectively avoid obstacles and prevent damage to the UAV.
[0059] In another embodiment, step S102 includes:
[0060] S1021: Based on the constraint costs of the UAV during flight, formulate the total cost function, where the constraint costs include path length cost, path safety cost, path flight altitude cost, and turning angle (or climb angle) cost.
[0061] S1022: Based on the flight path of the UAV, a simulation scene is generated. The path coordinates are used as variables, and the cost values of the four constraints are calculated according to the corresponding formulas.
[0062] S1023: Based on the total cost function, perform weighted calculations on the constraint cost values to obtain the path fitness.
[0063] The working principle of the above technical solution is as follows: During flight, the UAV needs to consider constraints such as path length, path safety, and flight altitude. The optimal path planning of the UAV is achieved by formulating a total cost function. The total cost function is the optimal standard for achieving path planning and is mainly affected by path length cost, path safety cost, path flight altitude cost, and turning angle / climb angle cost. Based on the UAV flight path, a simulation scene is generated, and the path coordinates are used as variables. The cost corresponding to the four constraints is calculated according to the formula to obtain four corresponding constraint cost values. Based on the total cost function, the constraint cost values are weighted and calculated to obtain the path fitness.
[0064] The simulation scenario setup steps include: modeling the 3D terrain and calculating the corresponding energy consumption value; setting weight coefficients for the remaining energy and energy consumption rate of different nodes; setting the initial energy consumption value of the nodes to a random value; and, to eliminate the influence of random factors, performing 50 simulations for each set of weight coefficients, averaging the results, and obtaining a comparison of energy consumption, path length, and normalized equilibrium path cost under different settings, as well as the UAV's flight path under the condition of minimum cost. Based on the comparison of energy consumption, path length, normalized equilibrium path cost, and the UAV's flight path data under the condition of minimum cost, a simulation scenario diagram is obtained. During the path selection process, the UAV must consider the energy consumption of the next node, the status information of the next node, and whether the UAV will query whether the node has a data transmission requirement.
[0065] It is also necessary to obtain energy optimization paths. The generation of energy optimization paths is based on energy consumption values. The problem of finding energy optimization coverage paths is transformed into the problem of minimum cost traversal of the graph corresponding to energy consumption values. Discrete grids are regarded as destinations in the TSP model, and the energy cost between paths is regarded as the distance value between cities. The energy graph is traversed by using the TSP model.
[0066] The beneficial effects of the above technical solution are as follows: Based on the constraint costs of the UAV during flight, a total cost function is formulated, where the constraint costs include path length cost, path safety cost, path flight altitude cost, and turning angle (or climb angle) cost; based on the UAV flight path, a simulation scenario is generated, and the path coordinates are used as variables to calculate the four corresponding constraint cost values according to the formulas corresponding to the four constraint costs; based on the total cost function, the constraint cost values are weighted and calculated to obtain the path fitness. Optimal path planning for the UAV is achieved by formulating the total cost function.
[0067] In another embodiment, step S103 includes:
[0068] S1031: Based on the importance of the UAV's mission and the constraints of its flight, the improved snake optimization algorithm is divided into an exploration phase and a development phase;
[0069] S1032: If the current UAV flight phase is the exploration phase, then arbitrarily select the path corresponding to the path fitness, and update the path nodes in real time according to the currently selected path;
[0070] S1033: If the current UAV flight phase is the development phase, select the optimal path corresponding to the path fitness, reach the destination of the UAV mission based on the optimal path, and update the path nodes in real time according to the optimal route.
[0071] The working principle of the above technical solution is as follows: The Snake Optimization Algorithm (SO) is a heuristic algorithm designed based on the mating behavior of snakes. If the temperature is low (Temp < 0.6) and food is plentiful (Q > 0.25), mating will occur; otherwise, the snake will only search for food or eat the remaining food. The Snake Optimization Algorithm consists of two phases: the exploration phase and the development phase. In the exploration phase, if Q < 0.25, the snake will search for food by choosing any location and update its position X relative to the food. i,f X i,m During the development phase, assuming Q > 0.25, if Temp > 0.6 (hot), the snake will only move towards the food and update its position x. i,j (t+1). If Temp < 0.6 (cold), the snake will be in either fighting or mating mode. When in fighting mode, the i-th male will move towards the best female individual x. best,f The i-th female individual moves closer to the best male individual x in the group. best,m The positions are close. When the snake is in mating mode, the position X of the i-th female individual is... i,f To the position X of the i-th male individual i,m Approaching the position X of the i-th male individual i,m To the position X of the i-th female individual i,f They will approach each other; if eggs are laid, they will choose the worst male. worst , m And the worst female individual X worst , f Replace them.
[0072] Based on the principles of the snake optimization algorithm, the improved snake optimization algorithm is divided into an exploration phase and a development phase. The exploration phase refers to a phase where the importance of the task is low (e.g., a simple aerial photography mission by a drone) and there are few constraints on flight (e.g., the drone has sufficient energy and the terrain of the current drone flight area is simple). The exploration phase does not require high path adaptability; simply choosing a suitable route is sufficient, and no complex operations are needed. The development phase refers to a phase where the importance of the task is high (e.g., a drone performing surveying or surface exploration) and there are many constraints on flight (e.g., the drone has limited energy and the terrain of the current drone flight area is complex). The exploration phase requires high path adaptability and necessitates the selection of the optimal route.
[0073] The beneficial effects of the above technical solution are as follows: The search range is limited in the snake optimization algorithm, allowing the range of generated random path nodes to be updated in real time. This improvement not only narrows the search range but also reduces the computational load, lowers randomness, and accelerates the process of updating path nodes. Furthermore, a chaotic optimization algorithm is introduced, enabling the optimization process to search towards the global optimum more quickly, thus accelerating the convergence speed.
[0074] In another embodiment, step S1012 includes:
[0075] The area inside all obstacles in the flight mission space is designated as the obstacle zone, the area within a distance D from the obstacle zone is designated as the collision zone, and the area within a distance S from the collision zone is designated as the danger zone. Here, D represents the diameter of the UAV, and S represents the distance between the danger zone and the collision zone.
[0076] If the set of hazards for all obstacles is P, the hazard area is cylindrical or spherical, the hazard center is O, and the radius is R, then the obstacle area, collision area, and hazard area are separated based on the hazard area.
[0077] The working principle of the above technical solution is as follows: Please refer to... Figure 3 Based on the premise that all obstacles within the flight mission space are designated as obstacle zones, the area within a distance D from the obstacle zone is designated as the collision zone, and the area within a distance S from the collision zone is designated as the danger zone, where D represents the diameter of the UAV and S represents the distance between the danger zone and the collision zone; based on the obstacle zone, collision zone, and danger zone, a is defined. i,j b i,j+1 K value, a i,j to b i,j+1 Let K represent a path segment within a given region, and let K represent the distance from the path to the danger center O.
[0078] The beneficial effects of the above technical solution are as follows: based on obstacles in the drone's flight mission space, obstacle zones, collision zones, and danger zones are defined. By dividing these different zones, the drone can effectively avoid obstacles and prevent damage to the drone.
[0079] In another embodiment, step S1022 includes:
[0080] In the cost formulas corresponding to the four constraints, the path length cost F1 is composed of the sum of the distances between any two adjacent nodes from the starting point to the ending point; the path safety cost F2 is related to the collision penalty factor, the value of which is determined by the magnitude of K (represented as the distance from the path to the danger center O); the flight altitude cost F3 is calculated by adding the altitude penalty factors of all path nodes, and the closer the UAV is to the minimum or maximum flight altitude, the greater the altitude penalty factor becomes; the turning angle (or climb angle) related cost F4 is related to the turning angle and climb angle between two consecutive paths.
[0081] The working principle of the above technical solution is as follows: the path length cost F1 is composed of the sum of the distances between any two adjacent nodes from the starting point to the ending point, and the calculation formula is:
[0082]
[0083] Among them, F1(X i ) represents X i The path length cost of the set, X i Let x represent the set of n path nodes passed by the drone on the i-th route, (x i,j ,y i,j ,z i,j ) represents any path node G in space. i,j ;
[0084] The path safety cost F2 is related to the collision penalty factor, the value of which is determined by the magnitude of K, and the calculation formula is as follows:
[0085]
[0086]
[0087] Among them, F2(X) i ) represents X i The path safety cost of a set, T p a represents the collision penalty factor. i,j b i,j+1 Indicates a i,j to b i,j+1 Let K represent a path segment within a given area, D represent the distance from the path to the hazard center O, S represent the distance between the hazard zone and the collision zone, and R represent the radius of the hazard zone.
[0088] When a drone is between the collision zone and the danger zone, the closer the drone is to the collision zone, the higher the collision penalty factor. This will also increase the risk of drones choosing paths away from the collision zone during flight, thus ensuring lower path safety costs.
[0089] Flight altitude cost F3: During drone flight, the flight altitude is limited to a given range, including a minimum flight altitude h. min and maximum flight altitude h max Within given limits, a stable flight altitude can reduce the burden on the UAV control system and save more energy; where h min and h max With path node a i,j The relevant formula for calculating the high cost F3 is as follows:
[0090]
[0091]
[0092] Among them, F3(X i ) represents X i The cost of flight altitude of the set, H i,j h represents the height penalty factor corresponding to the path node. i,j Indicates the altitude relative to sea level; within the specified altitude range, as the drone approaches h... max or h min High penalty factor H i,j This will increase, thus allowing the drone to maintain a relatively stable flight altitude, ensuring lower flight altitude costs, and increasing the altitude penalty factor H for all path nodes. i,j The cost of obtaining flight altitude is summed up as F3.
[0093] Steering angle (or climb angle) related costs F 45 The turning angle and climb angle are important factors affecting path smoothness. Let a i,j It is the turning angle between two consecutive path segments, a′ i,j b′ i,j+1 c′ i,j+2 These are flight path nodes a i,j b i,j+1 c i,j+2 The point projected onto the horizontal plane oxy. Let Z be the unit vector along the Z-axis. The formula for calculating the projection vector is:
[0094]
[0095] Steering angle α i,j The calculation formula is:
[0096]
[0097] Let a i,j b i,j+1 The coordinates are (x) i,j ,y i,j ,z i,j ) and (x i,j+1 ,y i,j+1 ,z i,j+1 If the steering angle β is 0, then the steering angle β is 0. i,j The calculation formula is:
[0098]
[0099] The formula for calculating the cost F4 related to smoothness, specifically the steering angle (or climb angle), is as follows:
[0100]
[0101] Where γ1 and γ2 represent the smoothing penalty coefficients for the turning angle and the climbing angle, respectively.
[0102] The beneficial effects of the above technical solution are as follows: In the cost formula corresponding to the four constraints, the path length cost F1 is composed of the sum of the distances between any two adjacent nodes from the starting point to the ending point; the path safety cost F2 is related to the collision penalty factor, the value of which is determined by the magnitude of K (represented as the distance from the path to the danger center O); the flight altitude cost F3 is calculated by adding the altitude penalty factors of all path nodes, and the closer the UAV is to the minimum or maximum flight altitude, the greater the altitude penalty factor becomes; the turning angle (or climb angle) related cost F4 is related to the turning angle and climb angle between two consecutive paths. This allows the UAV to maintain a relatively stable flight altitude, ensuring that the flight altitude cost is low.
[0103] In another embodiment, step S1023 includes:
[0104] Based on the path node set X i The relevant optimality, safety, and smoothness constraints are used to weight the constraint cost values, and the formula for calculating the total cost function is as follows:
[0105]
[0106] Among them, b k The values represent weighting coefficients, with F1, F2, F3, and F4 representing the constraint cost values related to path length cost, path safety cost, flight altitude cost, and turning angle (or climb angle), respectively.
[0107] The working principle of the above technical solution is as follows: based on the path node set X i The relevant optimality, safety, and smoothness constraints are used to weight the constraint cost values, and the formula for calculating the total cost function is as follows:
[0108]
[0109] Among them, b k The values represent weighting coefficients, with F1, F2, F3, and F4 representing the constraint cost values related to path length cost, path safety cost, flight altitude cost, and turning angle (or climb angle), respectively.
[0110] The beneficial effects of the above technical solution are: by calculating the total cost function, the path planning problem is transformed into an optimization problem, and the path fitness (referring to the path on which the UAV can perform operations) is obtained.
[0111] In another embodiment, step S1033 includes:
[0112] When the drone flight phase is in the development phase, based on the snake optimization algorithm, new path nodes are randomly generated in the alternation phase and the worst path node is replaced.
[0113] The worst path node is replaced by a new path node, and the range of randomly generated new path nodes is limited. The search range of path nodes is narrowed based on the range of the new path nodes.
[0114] The working principle of the above technical solution is as follows: When the drone is in the development stage, based on the snake optimization algorithm, new path nodes are randomly generated during the alternation phase (referring to the egg-laying phase in the snake optimization algorithm principle), and the worst path node is replaced. The formula for calculating the worst path node is:
[0115] X worst,m =X min +rand×(X max -X min )
[0116] X worst,f =X min +rand×(X max -X min )
[0117] Among them, X wotst,m and X worst,f X represents the worst path node. max X min These represent the upper and lower bounds of the path nodes in the space, respectively, and rand represents the range of random numbers generated.
[0118] To reduce the randomness of the alternation phase (referring to the egg-laying phase in the snake optimization algorithm) and decrease the search range, a range is defined for the randomly generated path nodes in the original algorithm. When replacing the worst male path node, let:
[0119] Xmin =min(X) i,f )
[0120] X max =max(X i,f )
[0121] Similarly, when replacing the worst-path node for the female, let:
[0122] X min =min(X) i,m )
[0123] X max =max(X i,m )
[0124] Among them, X i,f and X i,m Let represent the path nodes of the i-th female individual and the i-th male individual, respectively.
[0125] The beneficial effects of the above technical solution are: it ensures that the range of generated random path nodes is updated in real time. This improvement not only narrows the search range, but also reduces the amount of computation, reduces randomness, and speeds up the process of updating path nodes.
[0126] In another embodiment, the snake optimization algorithm is used as the main calculation method, and the optimal path in the path is searched using the chaotic optimization algorithm to guide the search towards the optimal path.
[0127] The working principle of the above technical solution is as follows: defining the search range reduces randomness, increases the speed of computation, and accelerates the process of updating path nodes. To further optimize and improve the snake optimization algorithm in path planning, a chaotic optimization algorithm is introduced. This algorithm features fast search speed, high computational accuracy, and global asymptotic convergence. The addition of this algorithm enables the optimization process to converge to the global optimum more quickly.
[0128] The calculation mainly uses the snake optimization algorithm to find the optimal path X in the path. food Chaotic optimization search is performed to guide the path towards the optimal path, thereby improving the convergence speed of the snake optimization algorithm.
[0129] The beneficial effects of the above technical solution are as follows: the introduction of the chaotic optimization algorithm, which has the characteristics of fast search speed, high calculation accuracy and global asymptotic convergence, enables the optimization process to converge to the global optimum more quickly.
[0130] In another embodiment, the chaotic optimization algorithm includes: extracting the optimal solution of the path node, obtaining variables by assigning values to the optimal solution, generating random numbers based on the variables, reassigning values to the fixed point, mapping the reassigned optimal solution to the optimization variable interval, performing chaotic search on the optimal solution to generate a new solution; determining whether the new solution exceeds a set boundary, if the determination result is that it exceeds the boundary, performing boundary replacement, and then re-determining whether the new solution exceeds the set boundary, if the determination result is within the boundary range, determining whether the new solution is better; if the determination result is not better, regenerating random numbers and chaotic variables, then assigning values to the regenerated random numbers and mapping them to the optimization variable interval, if the determination result is better, then outputting the optimal solution and optimal variables.
[0131] The working principle of the above technical solution is as follows: Please refer to Figure 4 Chaotic optimization algorithms include:
[0132] Step 1: Extract the optimal solution for the path nodes and obtain variables by assigning values to the optimal solution;
[0133] Step 2: Generate random numbers based on the variables and reassign values to the fixed points;
[0134] Step 3: Map the assigned optimal solution to the optimization variable interval;
[0135] Step 4: Perform a chaotic search on the optimal solution to generate a new solution;
[0136] Step 5: Determine whether the new solution exceeds the set boundary. If the result is that it exceeds the boundary, perform boundary replacement and repeat Step 5. If the result is that it is within the boundary, proceed to the next step.
[0137] Step 6: Determine if the new solution is better. If the result is not better, regenerate random numbers and chaotic variables, and repeat step 3. If the result is better, proceed to the next step.
[0138] Step 7: Output the optimal solution and optimal variables.
[0139] The beneficial effects of the above technical solution are as follows: the introduction of the chaotic optimization algorithm, which has the characteristics of fast search speed, high calculation accuracy and global asymptotic convergence, enables the optimization process to converge to the global optimum more quickly.
[0140] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A UAV 3D path planning method based on an improved snake optimization algorithm, characterized in that, include: S101: Based on the maximum safe range of the UAV's control and state variables, set the corresponding parameters for the UAV; S102: Formulate a cost function based on the constraints of the UAV's 3D path, transform the path planning problem into a path optimization problem, and obtain the path fitness based on the path optimization problem; S103: Based on the corresponding parameters of the UAV, the optimal path is obtained by selecting the path fitness based on the improved snake optimization algorithm; Step S103 includes: S1031: Based on the importance of the UAV's mission and the constraints of its flight, the improved snake optimization algorithm is divided into an exploration phase and a development phase; S1032: If the current UAV flight phase is the exploration phase, then arbitrarily select the path corresponding to the path fitness, and update the path nodes in real time according to the currently selected path; S1033: If the current UAV flight phase is the development phase, select the optimal path corresponding to the path fitness, reach the destination of the UAV mission based on the optimal path, and update the path nodes in real time according to the optimal route.
2. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that, Step S101 includes: S1011: Based on the UAV's own motion constraints, the control variables and state variables are limited to the maximum safe range of UAV flight. S1012: Based on control variables and state variables, set the corresponding parameters of the UAV. The corresponding parameters of the UAV include the UAV's own performance parameters and the path generation simulation scene parameters. S1013: Based on the obstacles in the UAV flight mission space, set the obstacle zone, collision zone and danger zone.
3. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that, Step S102 includes: S1021: Based on the constraint costs of the UAV during flight, formulate the total cost function, where the constraint costs include path length cost, path safety cost, path flight altitude cost, and turning angle cost; S1022: Based on the flight path of the UAV, a simulation scene is generated. The path coordinates are used as variables, and the cost values of the four constraints are calculated according to the corresponding formulas. S1023: Based on the total cost function, perform weighted calculations on the constraint cost values to obtain the path fitness.
4. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 2, characterized in that, Step S1012 includes: The area inside all obstacles in the flight mission space is designated as the obstacle zone, the area within a distance D from the obstacle zone is designated as the collision zone, and the area within a distance S from the collision zone is designated as the danger zone. Here, D represents the diameter of the UAV, and S represents the distance between the danger zone and the collision zone. If the set of hazards for all obstacles is P, the hazard area is cylindrical or spherical, the hazard center is O, and the radius is R, then the obstacle area, collision area, and hazard area are separated based on the hazard area.
5. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 3, characterized in that, Step S1022 includes: In the cost formulas corresponding to the four constraints, the path length cost F1 is composed of the sum of the distances between any two adjacent nodes from the starting point to the ending point; the path safety cost F2 is related to the collision penalty factor, the value of which is determined by the magnitude of K, where K represents the distance from the path to the danger center O; the flight altitude cost f3 is calculated by adding the altitude penalty factors of all path nodes, and the closer the UAV is to the minimum or maximum flight altitude, the greater the altitude penalty factor becomes; the turning angle cost F4 is related to the turning angle and the ramp angle between two consecutive paths.
6. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 3, characterized in that, Step S1023 includes: Based on the path node set X i The relevant optimality, safety, and smoothness constraints are used to weight the constraint cost values, and the formula for calculating the total cost function is as follows: Among them, b k The values represent weighting coefficients, with F1, F2, F3, and F4 representing path length cost, path safety cost, flight altitude cost, and turning angle cost, respectively.
7. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that, Step S1033 includes: When the drone flight phase is in the development phase, based on the snake optimization algorithm, new path nodes are randomly generated in the alternation phase and the worst path node is replaced. The worst path node is replaced by a new path node, and the range of randomly generated new path nodes is limited. The search range of path nodes is narrowed based on the range of the new path nodes.
8. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 7, characterized in that, The algorithm primarily uses the snake optimization algorithm for computation, and then uses the chaotic optimization algorithm to perform chaotic optimization search on the optimal path in the path, guiding the search towards the optimal path.
9. The UAV 3D path planning method based on the improved snake optimization algorithm according to claim 8, characterized in that, The chaotic optimization algorithm includes: extracting the optimal solution of the path node, obtaining variables by assigning values to the optimal solution, generating random numbers based on the variables, reassigning values to the fixed point, mapping the reassigned optimal solution to the optimization variable interval, performing chaotic search on the optimal solution to generate a new solution; determining whether the new solution exceeds the set boundary, if the result is that it exceeds the boundary, performing boundary replacement, and then re-determining whether the new solution exceeds the set boundary, if the result is that it is within the boundary range, determining whether the new solution is better; if the result is not better, regenerating random numbers and chaotic variables, reassigning the regenerated random numbers and mapping them to the optimization variable interval, if the result is better, outputting the optimal solution and optimal variable.
Citation Information
Patent Citations
Three-dimensional obstacle avoidance route planning method based on spherical vector pigeon flock algorithm
CN114777789A
Unmanned aerial vehicle path planning method and system
CN115437407A