Gradient-based unmanned aerial vehicle path planning method and system

By using a gradient-based path planning method, combined with Minimum-Jerk optimization and B-spline curves, and utilizing the ESDF distance field to optimize the control point positions, a smooth, safe, and efficient UAV flight path is generated, solving the problems of high energy consumption, poor stability, and high collision risk in existing technologies.

CN121028818APending Publication Date: 2025-11-28XIAN THERMAL POWER RES INST CO LTD +1

Patent Information

Application Number
CN202511571828.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing UAV path planning methods suffer from high energy consumption, poor stability, and high collision risk, especially when the control range is not effectively constrained and obstacle information is not considered.

Method used

A gradient-based path planning method is adopted. The initial trajectory is generated by Minimum-Jerk optimization, the initial B-spline curve is constructed using cubic uniform B-splines, and the total cost function is established by combining the gradient information of the ESDF distance field. The control point positions are iteratively adjusted by gradient descent to minimize the total cost function and generate the optimized B-spline trajectory.

Benefits of technology

It achieves reduced energy consumption, improved stability, and reduced collision risk during drone movement, and generates smooth and safe trajectories that meet real-time planning requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121028818A_ABST
    Figure CN121028818A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicles, in particular to a gradient-based unmanned aerial vehicle path planning method and system. The method comprises the steps of obtaining state vectors of a starting point and a terminal point of an unmanned aerial vehicle, generating an initial trajectory meeting state constraints based on a Minimum-Jerk optimization target, uniformly sampling the initial trajectory to obtain discrete initial control points, constructing an initial B-spline curve by using a cubic uniform B-spline, establishing a total cost function containing smoothness, collision and dynamics feasible constraint terms, and obtaining an initial B-spline curve. And based on the gradient information of the ESDF distance field, iteratively adjusting the position of a control point through a gradient descent method to minimize a cost function to obtain an optimized control point, and generating an optimized B-spline trajectory according to the optimized control point in a fitting manner as a planned flight path of the unmanned aerial vehicle. According to the method, continuous and smooth transition of the position, the speed and the acceleration is guaranteed, the calculation efficiency is improved, the real-time planning requirement of the unmanned aerial vehicle is met, and the problems of large energy consumption, poor stability and collision risks are integrally solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a gradient-based UAV path planning method and system. Background Technology

[0002] In the field of UAV path planning, existing technologies typically use straight lines connecting nodes as the trajectory. While this method is simple and easy to implement, it ignores the initial velocity and acceleration of the UAV itself, requiring the actuator to provide additional driving force to offset the initial motion state. This not only increases energy consumption but also negatively impacts the stability and lifespan of the UAV. To further optimize trajectory smoothness, the Minimum-Jerk method was subsequently introduced. By minimizing the integral of jerk, a polynomial trajectory is generated, which improves stability and energy efficiency during motion to some extent. However, this method still has significant drawbacks: (1) It does not constrain the range of control variables, resulting in large numerical fluctuations during optimization. Adding too many constraints will severely reduce computational efficiency and fail to meet the real-time planning requirements of UAVs; (2) The generated trajectory does not consider obstacle information in the surrounding environment and lacks obstacle avoidance capabilities, exposing the UAV to a high risk of collision and insufficient safety. Therefore, existing technologies urgently need a path planning method that can ensure trajectory smoothness and energy efficiency while efficiently handling constraints and achieving safe obstacle avoidance. Summary of the Invention

[0003] The technical problem to be solved by the embodiments of the present invention is to provide a gradient-based UAV path planning method and system to solve the problems of high energy consumption, poor stability and collision risk in the existing UAV path planning methods.

[0004] This invention discloses a gradient-based unmanned aerial vehicle (UAV) path planning method, comprising: The state vectors of the UAV at the starting point and the ending point are obtained respectively, and the initial trajectory that satisfies the state constraints of the UAV at the starting point and the ending point is generated based on the Minimum-Jerk optimization target. The initial trajectory is uniformly sampled to obtain multiple discrete initial control points. Based on all the initial control points, a cubic uniform B-spline is selected to construct an initial B-spline curve. A total cost function is established, which includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, the positions of the initial control points on the initial B-spline curve are iteratively adjusted using the gradient descent method to minimize the total cost function, thereby obtaining the optimized control points. An optimized B-spline trajectory is generated by fitting all the optimized control points, and the optimized B-spline trajectory is used as the planned flight path of the UAV.

[0005] Optionally, the step of obtaining the state vectors of the UAV at the starting point and the ending point respectively, and generating an initial trajectory that satisfies the state constraints of the UAV at the starting point and the ending point based on the Minimum-Jerk optimization target, includes: Based on the state vectors of the UAV at the starting point and the ending point, the state vectors include position, velocity, acceleration, and yaw angle; Based on the acquired state vector, a fifth-order polynomial trajectory is established to fit the UAV's motion trajectory. The functional expression of the fifth-order polynomial trajectory is as follows:

[0006] In the formula, Indicates the time of the drone Location at any given moment Represents a time variable. Represents the polynomial coefficients. Indicates the order of a polynomial; Differentiating the fifth-order polynomial trajectory based on the Minimum-Jerk method, and establishing the objective function by minimizing the integral of the square of the jerk, the expression of the objective function is as follows:

[0007] In the formula, The integral objective function representing the jerk. Indicates the start time. Indicates the end time. express Regarding time The accelerometer obtained from the third derivative Represents the time derivative. Represents the polynomial coefficient vector. express transpose, This indicates that the calculation is performed over a time interval. The Hessian matrix is ​​obtained by integrating the square of the internal acceleration. Using the acquired state vector, equality constraints are established to ensure that the UAV's trajectory satisfies state matching at the start and end times. The functional expression of the equality constraints is:

[0008] In the formula, Indicates that drones are in space The trajectory function of the position along the axis as a function of time. Trajectory function The first derivative with respect to time, Trajectory function The second derivative with respect to time, When indicating the start time, the drone is in Initial position on the axis When indicating the start time, the drone is in Initial velocity on the axis, When indicating the start time, the drone is in Initial acceleration on the axis, Indicates the drone's position at the finish line time. The endpoint that needs to be reached on the axis. Indicates the drone's position at the finish line time. The required destination speed on the axis. Indicates the drone's position at the finish line time. The acceleration required to reach the endpoint on the axis; The objective function and the equality constraints are transformed into a quadratic programming problem, and the polynomial coefficients in the fifth-order polynomial trajectory are solved using a numerical optimization algorithm based on the quadratic programming problem to obtain the optimal coefficients. Substitute all the obtained optimal coefficients into the fifth-order polynomial trajectory to generate the initial trajectory that satisfies the smoothness and state constraints.

[0009] Optionally, the step of selecting cubic uniform B-splines based on all the initial control points to construct the initial B-spline curve includes: All discrete initial control points are arranged and combined into a control point sequence according to the sampling time. The control point sequence includes a first control point that coincides with the starting point of the initial trajectory and a last control point that coincides with the ending point of the initial trajectory. Construct a B-spline curve model, the functional expression of which is:

[0010] In the formula, Represents a B-spline curve function. Indicates the initial control point. This represents the maximum index of the initial control point. Indicates the first indivual B-spline basis functions This represents the maximum index of the basis functions. Indicates the parameter index. Represents a time variable. Indicates the degree of the B-spline; A cubic uniform B-spline is selected for trajectory fitting, and a node vector is generated based on the number of initial control points. The basis function is then obtained recursively based on the node vector. The control point sequence and the node vector are substituted into the B-spline curve model, and the initial B-spline curve is generated by weighted summation of the basis functions.

[0011] Optionally, the step of selecting a cubic uniform B-spline for trajectory fitting, generating a node vector based on the number of initial control points, and recursively obtaining the basis function based on the node vector includes: A cubic uniform B-spline is selected for trajectory fitting. The number of nodes is determined based on the number of initial control points and the selected B-spline degree, and the node vector is generated. The function expression for determining the number of nodes is:

[0012] In the formula, Indicates the number of nodes; The node vectors are clamped from front to back to constrain the initial B-spline curve to pass through the start and end points of the initial trajectory. The function expression for clamping the node vectors from front to back is:

[0013] In the formula, Represents a node. This represents the starting node with index 0 among the first k+1 nodes in the node vector. This indicates that the index of the first k+1 nodes in the node vector is... The end node, This indicates that the index of the last k+1 nodes in the node vector is... The starting node, This indicates that the index of the last k+1 nodes in the node vector is... The end node, This represents the maximum index of the node vector. This represents the traversal number of nodes uniformly distributed between the first k+1 nodes and the last k+1 nodes within the node vector. The index of a node in the node vector located between the first k+1 nodes and the last k+1 nodes is . Nodes; Based on the node vectors after the front and rear clamping process, the basis functions of the B-spline are calculated using the DeBoor-Cox recursive formula. The functional expression for calculating the basis functions is as follows:

[0014]

[0015] In the formula, Indicates the first indivual B-spline basis functions Indicates the first indivual -1st degree B-spline basis functions This indicates the degree of the B-spline. Indicates the first 1 node This indicates the main condition for judgment. This indicates that the remaining conditions do not satisfy the main condition.

[0016] Optionally, the UAV path planning method further includes, after constructing the initial B-spline curve, establishing and minimizing the total cost function, including: Establish the total cost function, whose functional expression is:

[0017] In the formula, Represents the total cost function. Represents the smoothness constraint term. This represents the weighting coefficient of the smoothness constraint term. Indicates the collision constraint term. This represents the weighting coefficient of the collision constraint term. Represents the dynamically feasible constraint term. Represents the weighting coefficients of the dynamic feasibility constraint terms; Based on the gradient information of the ESDF distance field, the gradient direction of the voxel where each initial control point is located on the initial B-spline curve moves away from the obstacle the fastest is obtained; Obtain the smoothness constraint, collision constraint, and dynamic feasibility constraint of the initial B-spline curve, and calculate the total gradient of the total cost function with respect to the position of each initial control point based on the gradient of each constraint. Based on the obtained total gradient, the positions of each initial control point are iteratively updated in the opposite direction of the gradient using gradient descent until the total cost function converges to obtain the corresponding optimized control point.

[0018] Optionally, the UAV path planning method further includes obtaining the smoothness constraint term of the initial B-spline curve, including: Iterate through the initial B-spline curve to obtain the front difference vectors between all the initial control points and their preceding adjacent initial control points, as well as the back difference vectors between all the initial control points and their following adjacent initial control points. The smoothness constraint term is obtained by summing the front and back difference vectors of all the initial control points. The functional expression for calculating the smoothness constraint term is as follows:

[0019] In the formula, Represents the smoothness constraint term. Indicates the initial control point. Indicates the parameter index. This represents the maximum index of the initial control point.

[0020] Optionally, the UAV path planning method further includes obtaining the collision constraint term of the initial B-spline curve, including: The Euclidean distance from each initial control point on the initial B-spline curve to the nearest obstacle is queried in real time using the ESDF distance field. The collision penalty value for each initial control point is calculated based on the Euclidean distance obtained from the query. The function expression for calculating the collision penalty value is as follows:

[0021] In the formula, This represents the collision penalty value of the initial control point. Indicates the initial control point. Indicates the parameter index. This represents the Euclidean distance from the initial control point to the nearest obstacle. Indicates the preset safety radius; When the Euclidean distance from the initial control point to the nearest obstacle is less than the preset safety radius, the initial control point is pulled along the corresponding gradient direction to adjust its position. The collision constraint term is obtained by summing the collision penalty function values ​​of all the initial control points. The functional expression for calculating the collision constraint term is:

[0022] In the formula, Indicates the collision constraint term. This represents the maximum index of the initial control point.

[0023] Optionally, the UAV path planning method further includes obtaining the dynamic feasibility constraints of the initial B-spline curve, including: The central difference method is used to calculate and obtain the velocity estimate and acceleration estimate of each initial control point on the initial B-spline curve; A penalty function is applied to the velocity estimate and acceleration estimate of each initial control point to calculate the velocity penalty value and acceleration penalty value. The functional expressions for calculating the velocity penalty value and the acceleration penalty value are as follows:

[0024]

[0025] In the formula, This represents the speed penalty value. This represents the velocity estimate at the i-th initial control point. This indicates the preset maximum speed value. This represents the acceleration penalty value. This represents the acceleration at the i-th initial control point. This indicates the preset maximum acceleration value. Indicates the parameter index; The velocity penalty value and the acceleration penalty value of all the initial control points are summed to obtain the dynamic feasible constraint term. The functional expression for calculating the dynamic feasible constraint term is as follows:

[0026] In the formula, Represents the dynamically feasible constraint term. This represents the maximum index of the initial control point.

[0027] This invention also discloses a path planning system that employs the aforementioned gradient-based UAV path planning method. The path planning system includes: The initial trajectory generation module is used to obtain the state vectors of the UAV at the start and end points respectively, and generate an initial trajectory that satisfies the state constraints of the UAV at the start and end points based on the Minimum-Jerk optimization target. An initial curve construction module is used to uniformly sample the initial trajectory to obtain multiple discrete initial control points, and select cubic uniform B-spline to construct an initial B-spline curve based on all the initial control points. The control point optimization module is used to establish a total cost function that includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, the module iteratively adjusts the positions of the initial control points on the initial B-spline curve using the gradient descent method to minimize the total cost function and obtain the optimized control points. The flight path generation module is used to fit and generate an optimized B-spline trajectory based on all the optimized control points, and to use the optimized B-spline trajectory as the planned flight path of the UAV.

[0028] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described gradient-based UAV path planning method.

[0029] Compared with the prior art, the gradient-based UAV path planning method and system provided in this invention have the following advantages: The initial trajectory generated based on the Minimum-Jerk optimization objective ensures the minimization of jerk during UAV movement, thereby reducing energy consumption and improving stability, and avoiding the burden on actuators caused by abrupt changes in the initial state. Secondly, an initial B-spline curve is constructed using cubic uniform B-splines, inheriting the convex hull and local controllability of B-splines, enabling the trajectory optimization process to efficiently handle local adjustments without affecting the overall path. By establishing a total cost function including smoothness constraints, collision constraints, and dynamic feasibility constraints, and applying gradient descent based on the gradient information of the ESDF distance field to iteratively adjust the initial control points, numerical fluctuations are effectively suppressed, while precise obstacle avoidance and dynamic constraints are achieved, ensuring the safety and feasibility of the trajectory. The final optimized B-spline trajectory, as the planned flight path, not only ensures a continuous and smooth transition of position, velocity, and acceleration, but also improves computational efficiency, meeting the real-time planning requirements of UAVs, and comprehensively solving the problems of high energy consumption, poor stability, and collision risk. Attached Figure Description

[0030] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 A schematic block diagram illustrating the steps of a gradient-based UAV path planning method provided in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the UAV trajectory generation problem provided in an embodiment of the present invention; Figure 3 The three-dimensional polynomial trajectory diagram obtained by the optimization library provided in the embodiments of the present invention; Figure 4 The graphs showing the changes in position, velocity, and acceleration over time are provided for embodiments of the present invention. Figure 5 A schematic diagram of a B-spline curve constrained by multiple control points provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the B-spline curve collision avoidance optimization process provided in an embodiment of the present invention; Figure 7 The UAV flight simulation trajectory and environmental point cloud map provided in this embodiment of the invention; Figure 8 The trajectory curve diagram of the UAV flight simulation process provided in the embodiment of the present invention; Figure 9 The diagram showing the three-axis position change during UAV flight simulation provided in this embodiment of the invention; Figure 10 The diagram showing the three-axis velocity variation during UAV flight simulation provided in this embodiment of the invention; Figure 11This is a graph showing the variation of three-axis acceleration during UAV flight simulation provided in an embodiment of the present invention. Figure 12 The graph showing the change in distance between the drone and obstacles during the flight simulation provided in this embodiment of the invention. Detailed Implementation

[0031] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0032] This invention discloses a gradient-based unmanned aerial vehicle (UAV) path planning method, comprising: S1. Obtain the state vectors of the UAV at the starting point and the ending point respectively, and generate an initial trajectory that satisfies the state constraints of the UAV at the starting point and the ending point based on the Minimum-Jerk optimization target; S2. Uniformly sample the initial trajectory to obtain multiple discrete initial control points. Select cubic uniform B-spline based on all the initial control points to construct the initial B-spline curve. S3. Establish a total cost function that includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, iteratively adjust the positions of each initial control point on the initial B-spline curve using the gradient descent method to minimize the total cost function and obtain the optimized control points. S4. Generate an optimized B-spline trajectory based on all optimized control points, and use the optimized B-spline trajectory as the planned flight path of the UAV.

[0033] Through the implementation of the above-described UAV path planning method, the initial trajectory is generated based on Minimum-Jerk optimization. By using the integral of minimizing jerk, the smoothness of acceleration changes during UAV movement can be ensured, thereby significantly reducing energy consumption and improving stability, and avoiding additional burden on the actuators caused by abrupt changes in the initial state. Secondly, B-splines are a tool used in mathematics and computer graphics for curve and surface modeling. The initial trajectory is uniformly sampled to obtain discrete initial control points, and an initial B-spline curve is constructed using cubic uniform B-splines. This fully leverages the convex hull and local controllability advantages of B-splines, allowing the trajectory to be tightly constrained within the convex hull formed by the control points, enhancing the foundation of safety. At the same time, the local adjustment capability ensures the efficiency of the optimization process and avoids the computational overhead caused by global recalculation.

[0034] The concept of Minimum-Jerk was first proposed by neuroscientist Hogan in 1984. He discovered that during human arm movement, the central nervous system instinctively minimizes jerk during the movement, thereby reducing energy consumption and muscle fatigue. This discovery was later introduced into the field of unmanned aerial vehicles (UAVs) and became a classic method for solving the problems of shock and vibration in mechanical systems. In trajectory planning tasks, the core objective of Minimum-Jerk is to minimize the integral of jerk (the time derivative of acceleration) during the UAV's movement, allowing the acceleration to change as slowly as possible, thereby generating a smooth and natural motion trajectory. Therefore, this invention introduces the concept of Minimum-Jerk (minimizing jerk) to generate a smooth motion trajectory, thereby ensuring the stability and safety of the UAV during movement while reducing energy consumption.

[0035] Then, a total cost function including smoothness constraints, collision constraints, and dynamic feasibility constraints is established. Based on the gradient information of the ESDF (Euclidean Signed Distance Field), the positions of the initial control points are iteratively adjusted using gradient descent. The gradient direction of the distance field is used as obstacle avoidance guidance, enabling the control points to move in the direction that moves away from obstacles the fastest, thereby avoiding collision risks in real time. Simultaneously, the smoothness constraint smooths the distribution of control points by simulating an elastic band mechanism, while the dynamic constraints ensure that velocity and acceleration are within a reasonable range. This effectively suppresses numerical fluctuations during the minimization of the total cost function, improves computational efficiency, and meets the real-time planning requirements of UAVs.

[0036] Finally, an optimized B-spline trajectory is generated based on the optimized control points and used as the planned flight path. This combines the smoothness of Minimum-Jerk, the structural advantages of B-splines, and the adaptability of gradient optimization, enabling the UAV path to not only maximize energy efficiency and enhance motion stability, but also significantly reduce the probability of collision through environmental perception and constraint processing. Overall, it provides an efficient, safe, and reliable path planning solution.

[0037] Furthermore, the state vectors of the UAV at the starting point and the ending point are obtained respectively, and an initial trajectory satisfying the state constraints of the UAV at the starting point and the ending point is generated based on the Minimum-Jerk optimization target, including: Based on the state vectors of the UAV at the starting point and the ending point, the state vectors include position, velocity, acceleration, and yaw angle; Based on the acquired state vector, a fifth-order polynomial trajectory is established to fit the UAV's motion trajectory. The functional expression of the fifth-order polynomial trajectory is:

[0038] In the formula, Indicates the time of the drone Location at any given moment Represents a time variable. Represents the polynomial coefficients. Indicates the order of a polynomial; Differentiating the fifth-order polynomial trajectory based on the Minimum-Jerk method, and establishing the objective function by minimizing the integral of the square of the jerk, the expression of the objective function is as follows:

[0039] In the formula, The integral objective function representing the jerk. Indicates the start time. Indicates the end time. express Regarding time The accelerometer obtained from the third derivative Represents the time derivative. Represents the polynomial coefficient vector. express transpose, This indicates that the calculation is performed over a time interval. The Hessian matrix is ​​obtained by integrating the square of the internal acceleration. Using the acquired state vector, equality constraints are established to ensure that the UAV's trajectory satisfies state matching at the start and end times. The functional expression of the equality constraints is:

[0040] In the formula, Indicates that drones are in space The trajectory function of the position along the axis as a function of time. Trajectory function The first derivative with respect to time, Trajectory function The second derivative with respect to time, When indicating the start time, the drone is in Initial position on the axis When indicating the start time, the drone is in Initial velocity on the axis, When indicating the start time, the drone is in Initial acceleration on the axis, Indicates the drone's position at the finish line time. The endpoint that needs to be reached on the axis. Indicates the drone's position at the finish line time. The required destination speed on the axis. Indicates the drone's position at the finish line time. The acceleration required to reach the endpoint on the axis; The objective function and equality constraints are transformed into a quadratic programming problem. Based on the quadratic programming problem, a numerical optimization algorithm is used to solve for the polynomial coefficients in the fifth-order polynomial trajectory to obtain the optimal coefficients. Substitute all the obtained optimal coefficients into the fifth-order polynomial trajectory to generate an initial trajectory that satisfies smoothness and state constraints.

[0041] By implementing the above-described UAV path planning method, the state vectors (including position, velocity, acceleration, and yaw angle) of the UAV at the starting and ending points are obtained, and a fifth-order polynomial trajectory is established to fit the UAV's motion trajectory, ensuring that the trajectory generation process has a solid mathematical foundation and clear physical meaning. Based on the Minimum-Jerk principle, the fifth-order polynomial trajectory is differentiated, and the objective function is to minimize the integral of the square of the jerk. This fundamentally pursues the smoothness of the jerk during motion, which directly results in extremely gradual changes in jerk when the UAV moves along the initial trajectory. This significantly reduces the instantaneous force required by the actuators to adjust speed and direction, effectively reducing unnecessary energy consumption and laying a crucial foundation for the flight stability of the UAV.

[0042] As mentioned above, such as Figure 2 As shown, the red node 'a' represents the current position of the drone, and the red arrow indicates the current velocity direction of the drone. Assume the drone's state vector at this position is... ,but:

[0043] The drone's status includes its location. ,speed acceleration and yaw angle In the formula, Indicates the current location of the drone. This indicates the speed of the drone at its current location. This indicates the acceleration of the drone at its current location.

[0044] Green node b represents the next target node that the drone needs to reach, and its state is similarly determined. That will not be elaborated further. The problem to be solved is how to generate a smooth trajectory for the drone from point A to point B, satisfying the requirement that the drone's position, velocity, and acceleration smoothly change from point A to point B. Transition to .

[0045] Therefore, the first step is to obtain a smooth trajectory between two points, and the most intuitive approach is to use a polynomial for fitting. Polynomials have many excellent characteristics, such as simple expression, efficient matrix computation, and the existence of derivatives of any order. In trajectory representation, polynomial trajectories usually include time information to better integrate with motion variables. If we want to constrain the position, velocity, and acceleration of two points from the perspective of control variables, a total of six variables need to be controlled, so the order of the polynomial should be 5 (a 5th-order polynomial has 6 coefficients). Therefore, this embodiment of the invention establishes a 5th-order polynomial trajectory to fit the motion trajectory of a UAV.

[0046] As mentioned above, the core objective of Minimum-Jerk is to generate a smooth, natural trajectory by minimizing the integral of jerk, allowing the acceleration to change as slowly as possible. Therefore, by directly differentiating the established fifth-order polynomial trajectory by a third, we obtain the mathematical expression for jerk:

[0047]

[0048]

[0049] In the formula, Representation of position function The third derivative of , i.e., jerk (acceleration). Indicates a point in time on the trajectory. Represents a coefficient vector, i.e., time-dependent. basis function vectors, Representing vectors transpose, Represents the polynomial coefficient vector; The vector is the coefficient template of the Jerk expression. The vector represents the polynomial coefficients, and the jerk value is obtained by the dot product of the two. In Minimum-Jerk trajectory planning, the optimization objective is to minimize the jerk integral, i.e., adjust... The vector is used to make the jerk as small as possible, thus ensuring a smooth trajectory.

[0050] Next, by constructing the integral that minimizes the square of the jerk function, we obtain the objective function of the optimization problem. In the objective function:

[0051]

[0052] In the formula, and These represent the time values ​​for the drone at points a and b, respectively. The difference between the two values ​​is the time it takes for the drone to travel from point a to point b. This time determines the drone's speed and needs to be manually set according to the actual speed requirements of the drone. We can obtain the following formula:

[0053] In the formula, To represent the squared value of jerk as a polynomial coefficient vector The quadratic form of . This is a 6x6 symmetric matrix whose elements are time. The function.

[0054] By combining the above formulas, we can obtain the objective function. Simplifying the integral part in the equation, we get:

[0055] make for In time arrive Integrating between them, we get:

[0056] Further through The simplified form yields the objective function of this embodiment of the invention, as follows:

[0057] For the formula For matrices, we only need to substitute the upper and lower limits of time integration. and Find the specific values ​​of this matrix. From this, we can know that... Mathematically, it is a typical quadratic expression; solving the above objective function... The optimization problem can be transformed into a quadratic programming problem. Furthermore, the positions, velocities, and accelerations of the starting point a and the ending point b of the trajectory are fixed values; therefore, this problem is also an equality-constrained programming problem within the broader category of quadratic programming.

[0058] Therefore, this embodiment of the invention establishes equality constraints using the acquired state vector, ensuring that the UAV trajectory precisely matches the state of position, velocity, and acceleration at both the start and end times. This process rigorously guarantees that the generated initial trajectory seamlessly connects the initial and target states of the UAV, avoiding abrupt state jumps at the start and end points, and further enhancing the smoothness and predictability of control. Furthermore, the objective function and equality constraints are transformed into a quadratic programming problem, and the optimal coefficients are obtained by solving the polynomial coefficients in the fifth-order polynomial trajectory using a numerical optimization algorithm. This mathematical transformation and solution process converts the complex trajectory generation problem into a standard optimization problem, ensuring not only the existence and optimality of the solution but also achieving high computational efficiency and reliability through mature numerical algorithms. The resulting initial trajectory naturally possesses high-order smoothness characteristics, providing a high-quality initial solution that satisfies smoothness and state constraints for subsequent optimization based on B-spline curves and gradient descent, fundamentally improving the starting quality of the entire path planning process.

[0059] There are many methods for solving the above optimization problems, including the Lagrange multiplier method, variable elimination method, matrix factorization method, and so on. These methods are all implemented in numerical optimization libraries (such as quadprog in MATLAB and CVXOPT in Python).

[0060] MATLAB is a high-performance numerical and scientific computing software widely used in engineering, physics, computer science, economics, biomedicine, and other fields. Python is a high-level programming language known for its conciseness, readability, and powerful standard library. It is widely used for various programming tasks, including web development, data analysis, artificial intelligence, scientific computing, and automation scripting. `quadprog` is a function in MATLAB used to solve convex quadratic programming problems; CVXOPT is a Python library for solving convex optimization problems, including convex quadratic programming, and provides similar functionality to MATLAB's `quadprog`.

[0061] The following simulation experiment will utilize the quadprog numerical optimization library in MATLAB to solve polynomial trajectories in a three-dimensional environment, verifying the feasibility of the Minimum-Jerk-based polynomial trajectory generation algorithm. The table below shows all the control parameters for the starting point a and the target point b in the simulation environment: Table 1. Parameter table of motion control variables in the simulation environment

[0062] The final polynomial trajectory generated in MATLAB is as follows: Figure 3As shown, the curves of position, velocity, and acceleration in the three dimensions of x, y, and z changing with time during this process are as follows: Figure 4 As shown.

[0063] from Figure 3 and Figure 4 It can be seen that the relevant control quantities (position, velocity, acceleration) during the motion are all smooth and continuous curves, which meet the requirements for smooth motion of the UAV; the values ​​of the starting point and the ending point also meet expectations. However, there are some problems: (1) The range of the control quantities is not constrained, so the value fluctuations will be relatively large during the optimization process. However, if too many constraints are added in the quadratic programming, the computational efficiency of the problem will be greatly reduced, affecting the real-time performance of the UAV's generated trajectory; (2) The generated trajectory does not take into account the information of surrounding obstacles, which will lead to the risk of collision for the UAV.

[0064] Therefore, the embodiments of the present invention further optimize the trajectory based on B-splines and gradients to help UAVs perform exploration tasks more safely and smoothly.

[0065] Furthermore, based on all the initial control points, cubic uniform B-splines are selected to construct initial B-spline curves, including: All discrete initial control points are arranged and combined into a control point sequence according to the sampling time. The control point sequence includes the first control point that coincides with the starting point of the initial trajectory and the last control point that coincides with the ending point of the initial trajectory. Construct a B-spline curve model. The functional expression of the B-spline curve model is as follows:

[0066] In the formula, Represents a B-spline curve function. Indicates the initial control point. This represents the maximum index of the initial control point. Indicates the first indivual B-spline basis functions This represents the maximum index of the basis functions. Indicates the parameter index. Represents a time variable. Indicates the degree of the B-spline; A cubic uniform B-spline is selected for trajectory fitting, and a node vector is generated based on the number of initial control points. The basis function is then obtained recursively based on the node vector. Substitute the control point sequence and node vector into the B-spline curve model, and generate the initial B-spline curve by weighted summation of basis functions.

[0067] As mentioned above, B-splines are a special type of spline curve, possessing advantages such as convex hull, local controllability, and continuity, making them a relatively ideal curve for trajectory optimization. For example... Figure 5 As shown, this is a B-spline curve constrained by multiple control points. Figure 5 In - The green dashed line segments form the control points of the B-spline, and the quadrilateral formed by these control points is the convex hull. The convex hull property of the B-spline means that the trajectory curve always lies within the convex hull of the control points, thus ensuring the safety of the trajectory by constraining the position of the control points; local controllability means that adjusting a single control point only affects a local trajectory segment; and continuity means that the curve meets the requirements for smooth movement of the UAV.

[0068] Furthermore, a cubic uniform B-spline is selected for trajectory fitting, and a node vector is generated based on the number of initial control points. The basis functions are then recursively obtained from the node vectors, including: A cubic uniform B-spline is selected for trajectory fitting. The number of nodes is determined based on the number of initial control points and the selected B-spline degree, and a node vector is generated. The function expression for determining the number of nodes is as follows:

[0069] In the formula, Indicates the number of nodes; The node vectors are clamped at the beginning and end to constrain the initial B-spline curve to pass through the start and end points of the initial trajectory. The function expression for clamping the node vectors at the beginning and end is as follows:

[0070] In the formula, Represents a node. This represents the starting node with index 0 among the first k+1 nodes in the node vector. This indicates that the index of the first k+1 nodes in the node vector is... The end node, This indicates that the index of the last k+1 nodes in the node vector is... The starting node, This indicates that the index of the last k+1 nodes in the node vector is... The end node, This represents the maximum index of the node vector. This represents the traversal number of nodes uniformly distributed between the first k+1 nodes and the last k+1 nodes within the node vector. The index of a node in the node vector located between the first k+1 nodes and the last k+1 nodes is . Nodes; Based on the node vectors after clamping, the basis functions of the B-spline are calculated using the DeBoor-Cox recursive formula. The functional expression for calculating the basis functions is as follows:

[0071]

[0072] In the formula, Indicates the first indivual B-spline basis functions Indicates the first indivual -1st degree B-spline basis functions This indicates the degree of the B-spline. Indicates the first 1 node This indicates the main condition for judgment. This indicates that the remaining conditions do not satisfy the main condition.

[0073] Through the implementation of the above-described UAV path planning method, firstly, discrete initial control points are arranged into a control point sequence according to sampling time, ensuring that the first and last control points of the sequence coincide with the start and end points of the initial trajectory, respectively. This step enables the generated initial B-spline curve to accurately match the start and end states of the UAV, avoiding trajectory deviations at the endpoints. This provides an accurate and coherent basic path for subsequent optimization, enhancing the reliability and controllability of the trajectory. Secondly, a B-spline curve model is constructed, and the control points are weighted and summed using basis functions, endowing the curve with local support and convex hull properties. This ensures that trajectory adjustments only affect local segments without changing the overall shape, improving the flexibility and computational efficiency of the optimization process.

[0074] As mentioned above, a B-spline curve consists of three elements: +1 initial control point , +1 node The degree of the B-spline curve.

[0075] Based on the above, trajectory fitting is performed using cubic uniform B-splines, and a node vector is generated by combining the initial number of control points. Determining the number of nodes ensures that the node distribution matches the control points, providing uniform parameterization support for the curve. The node vector is then clamped, ensuring that the first k+1 nodes in the node vector... The parameter values ​​all satisfy 0, and the last k+1 nodes All parameter values ​​satisfy 1, constraining the initial B-spline curve to strictly pass through the start and end points, ensuring strict satisfaction of state constraints and reducing the risk of singularities at the endpoints. Simultaneously, basis functions are calculated using the DeBoor-Cox recursive formula based on the node vectors. This recursive process ensures the positive definiteness, normalization, and recursive continuity of the basis functions, thereby giving the generated initial B-spline curve high-order smoothness properties, significantly improving the smoothness and differentiability of the trajectory, and laying a stable foundation for gradient descent optimization.

[0076] DeBoor-Cox recursion is a method for calculating B-spline coefficients. A B-spline curve is a curve defined by control points, which are interpolated using B-spline basis functions. Therefore, the B-spline basis functions are recursively defined and can be calculated using DeBoor-Cox recursion. This embodiment of the invention uses cubic uniform B-splines for fitting and optimization. The trajectory of a cubic uniform B-spline maintains continuity in position, velocity, and acceleration levels, while the uniform nodes allow for the reuse of basis function calculations across different intervals.

[0077] Furthermore, the UAV path planning method also includes constructing an initial B-spline curve and then establishing and minimizing the total cost function, including: Establish the total cost function, whose functional expression is:

[0078] In the formula, Represents the total cost function. Represents the smoothness constraint term. This represents the weighting coefficient of the smoothness constraint term. Indicates the collision constraint term. This represents the weighting coefficient of the collision constraint term. Represents the dynamically feasible constraint term. Represents the weighting coefficients of the dynamic feasibility constraint terms; Based on the gradient information of the ESDF distance field, the gradient direction of the voxel where each initial control point is located on the initial B-spline curve moves away from the obstacle the fastest is obtained; Obtain the smoothness constraint, collision constraint, and dynamic feasibility constraint of the initial B-spline curve, and calculate the total gradient of the total cost function with respect to the position of each initial control point based on the gradient of each constraint. Based on the obtained total gradient, the positions of each initial control point are iteratively updated in the opposite direction of the gradient using the gradient descent method until the total cost function converges to obtain the corresponding optimized control point.

[0079] Through the implementation of the above-described UAV path planning method, a total cost function is constructed, consisting of a linear combination of smoothness constraints, collision constraints, and dynamic feasibility constraints. Adjustable weight coefficients are assigned to each constraint, allowing the optimization process to flexibly balance different performance indicators according to actual task requirements. The gradient direction of the voxel where each initial control point is located, moving fastest away from the obstacle, is obtained based on the ESDF distance field, providing accurate environmental perception information for the collision constraints and ensuring the path can actively avoid obstacles. By calculating the gradients of each constraint with respect to the control point position and synthesizing the total gradient, the steepest descent direction of the cost function is determined. Furthermore, the gradient descent method is used to iteratively update the control point position along the opposite direction of the total gradient, causing the total cost function to continuously decrease and eventually converge. This systematically optimizes the initial B-spline curve into a flight trajectory that simultaneously satisfies high-order smoothness, safe obstacle avoidance, and conforms to the physical motion constraints of the UAV, effectively improving the overall quality and reliability of the path.

[0080] Furthermore, the UAV path planning method also includes obtaining the smoothness constraint term of the initial B-spline curve, including: Iterate through the initial B-spline curve to obtain the front difference vectors between all initial control points and their preceding adjacent initial control points, as well as the back difference vectors between all initial control points and their subsequent adjacent initial control points. Summing the front and back difference vectors of all initial control points yields the smoothness constraint term. The functional expression for calculating the smoothness constraint term is as follows:

[0081] In the formula, Represents the smoothness constraint term. Indicates the initial control point. Indicates the parameter index. This represents the maximum index of the initial control point.

[0082] Through the implementation of the above-described UAV path planning method, vector difference operations based on adjacent initial control points can effectively capture the local geometric features of the trajectory. Then, the summation of the front and back difference vectors of all initial control points results in a smoothness constraint term expressed as a second-order difference form of the positional relationship between adjacent control points, essentially reflecting the degree of change in trajectory curvature. The introduction of this smoothness constraint term provides a key smoothness metric for the subsequent optimization of the total cost function. By constraining the spatial distribution of control points, it ensures that the optimized trajectory not only satisfies the state constraints of the start and end points but also possesses continuous and smooth curvature characteristics, laying an important foundation for UAVs to achieve stable flight and reduce energy consumption.

[0083] As mentioned above, from a physical point of view, the smoothness constraint term treats the trajectory as an elastic band, where two terms connect the control points. and , and The resultant force of the two springs. If all terms are 0, then the control points will be evenly distributed on a straight line, which is the smoothest ideal condition. Secondly, to ensure the safety of the curve, a collision constraint term is introduced. Due to the convex hull property of B-splines, the safety of the entire spline trajectory curve can be guaranteed simply by constraining all control points to be sufficiently secure.

[0084] Furthermore, the UAV path planning method also includes obtaining collision constraints for the initial B-spline curve, including: The Euclidean distance from each initial control point on the initial B-spline curve to the nearest obstacle can be queried in real time using the ESDF distance field. The collision penalty value for each initial control point is calculated based on the Euclidean distance obtained from the query. The function expression for calculating the collision penalty value is as follows:

[0085] In the formula, This represents the collision penalty value of the initial control point. Indicates the initial control point. Indicates the parameter index. This represents the Euclidean distance from the initial control point to the nearest obstacle. Indicates the preset safety radius; When the Euclidean distance from the initial control point to the nearest obstacle is less than the preset safety radius, the initial control point is pulled along the corresponding gradient direction to adjust its position. The collision constraint term is obtained by summing the collision penalty function values ​​of all initial control points. The function expression for calculating the collision constraint term is:

[0086] In the formula, Indicates the collision constraint term. This represents the maximum index of the initial control point.

[0087] Through the implementation of the above-described UAV path planning method, the Euclidean distance from each initial control point to the nearest obstacle is queried in real time using the ESDF distance field, providing accurate environmental perception data for collision detection. Based on the queried Euclidean distance, a collision penalty value for each initial control point is calculated according to a preset safety radius. When the Euclidean distance is less than the safety radius, a secondary penalty function mechanism is activated to encourage the control point to move away from the obstacle area. That is, when the distance between the initial control point and the obstacle is greater than the UAV's safety radius, there is no distance penalty, and the collision cost is 0. When the distance is less than the UAV's safety radius, the smaller the value, the greater the penalty.

[0088] Specifically, when a potential collision risk is detected, the initial control points are moved to actively avoid obstacles by adjusting their positions along the gradient direction provided by the ESDF. Finally, the collision penalty function values ​​of all initial control points are summed to obtain the complete collision constraint term. This constraint term, as an important component of the total cost function, systematically pushes the trajectory away from obstacles during the optimization process, ensuring that the generated optimized B-spline trajectory always maintains a safe distance. This effectively reduces the collision risk of the UAV and improves the safety of path planning.

[0089] like Figure 6 As shown, this demonstrates how to optimize control point collision avoidance using gradient information in the ESDF distance field: for each control point at risk of collision, the control point is pulled outwards from the obstacle along the ESDF gradient direction of the voxel where the point is located. Figure 6 (Blue arrow in the middle) until the collision cost at that point is small enough to ensure the safety of the B-spline curve.

[0090] Furthermore, the UAV path planning method also includes obtaining the dynamic feasibility constraints of the initial B-spline curve, including: The central difference method is used to calculate and obtain the velocity and acceleration estimates for each initial control point on the initial B-spline curve. For each initial control point, the velocity and acceleration estimates are applied using penalty functions to calculate the velocity and acceleration penalty values. The functional expressions for calculating the velocity and acceleration penalty values ​​are as follows:

[0091]

[0092] In the formula, This represents the speed penalty value. This represents the velocity estimate at the i-th initial control point. This indicates the preset maximum speed value. This represents the acceleration penalty value. This represents the acceleration at the i-th initial control point. This indicates the preset maximum acceleration value. Indicates the parameter index; The velocity and acceleration penalties for all initial control points are summed to obtain the dynamic feasible constraint term. The functional expression for calculating the dynamic feasible constraint term is as follows:

[0093] In the formula, Represents the dynamically feasible constraint term. This represents the maximum index of the initial control point.

[0094] Through the implementation of the above-described UAV path planning method, the central difference method is used to calculate the velocity and acceleration estimates for each initial control point, and the dynamic characteristics of the trajectory are accurately captured through discrete differential operations. Based on these estimates, velocity penalty functions and acceleration penalty functions are applied to each initial control point. When the velocity or acceleration estimate exceeds the preset maximum velocity or maximum acceleration value, the penalty function generates a non-linearly increasing penalty value. This mechanism effectively constrains the UAV's motion state within the physically permissible range. By summing the velocity and acceleration penalty values ​​for all initial control points, a complete dynamic feasible constraint term is obtained. This constraint term, as a key component of the total cost function, systematically adjusts the trajectory to the dynamically feasible region during gradient descent optimization, ensuring that the generated optimized B-spline trajectory meets the actual motion capabilities of the UAV, avoiding control failures caused by excessive velocity or acceleration requirements, and significantly improving the practicality and reliability of path planning.

[0095] The following is a simulation experiment of drone obstacle avoidance flight in the Gazebo environment to verify the feasibility and safety of the trajectory planned in the embodiment of the present invention. Gazebo is an existing open-source simulation platform widely used in the fields of robotics and automation, providing a virtual 3D environment that allows simulation of the behavior of entities such as robots, vehicles, and drones in various scenarios. The environment consists of a bridge support and several obstacles, including cubes, people, and roadblocks. The drone's starting and ending points are set at opposite ends of the bridge, allowing it to fly from one side to the other. The test assesses the drone's trajectory optimization and obstacle avoidance capabilities during flight. Figure 7 This displays a rough trajectory of the drone during flight and the resulting point cloud map. From Figure 7 As can be seen from the curves, the drone's trajectory is relatively continuous and smooth, and it successfully avoids obstacles along the path. The detailed three-dimensional trajectory curves during this movement are as follows: Figure 8 As shown, from Figure 8 It can also be seen that the drone's movement is relatively smooth.

[0096] To quantitatively analyze the control variables during the motion process, the position, velocity, and acceleration variation curves of the UAV's three axes are given as follows: Figure 9 , Figure 10 and Figure 11 As shown. From Figure 9 , Figure 10 and Figure 11The curve shows a sudden change in the control quantity on the Z-axis during takeoff. This is because the PX4 flight controller cannot execute immediately after receiving control points. Instead, it needs to be manually switched to Offboard mode ("Offboard mode" typically refers to a mode in drone or robotics where the controller (such as a ground station or computer) establishes direct communication with the aircraft or robot via wireless communication, rather than through its built-in autonomous flight system. This mode allows users to send more complex commands and perform more advanced flight operations) before executing the desired trajectory. This results in jitter due to control lag during drone startup. Apart from this, the speed and acceleration changes during the drone's movement are relatively stable, with a maximum speed of 0.6304 m / s and a maximum acceleration of 0.8438 m / s² (excluding the abnormal jitter segment during takeoff; PX4 is an open-source flight control system). Both meet the preset maximum speed and maximum acceleration requirements of 0.8 m / s and 1 m / s², respectively.

[0097] The curve showing the change in distance between the drone and obstacles during flight is as follows: Figure 12 As shown, the minimum distance is 0.6m, which meets the requirement of the safe radius (0.5m) for safe flight of UAVs.

[0098] This invention also discloses a path planning system, which employs the above-mentioned gradient-based UAV path planning method. The path planning system includes: The initial trajectory generation module is used to obtain the state vectors of the UAV at the start and end points respectively, and generate an initial trajectory that satisfies the state constraints of the UAV at the start and end points based on the Minimum-Jerk optimization target. The initial curve construction module is used to uniformly sample the initial trajectory to obtain multiple discrete initial control points in sequence, and select cubic uniform B-splines based on all the initial control points to construct the initial B-spline curve. The control point optimization module is used to establish the total cost function, which includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, the module iteratively adjusts the position of each initial control point on the initial B-spline curve using the gradient descent method to minimize the total cost function and obtain the optimized control points. The flight path generation module is used to fit and generate an optimized B-spline trajectory based on all optimized control points, and then use the optimized B-spline trajectory as the planned flight path for the UAV.

[0099] The present invention also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described gradient-based UAV path planning method.

[0100] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described gradient-based UAV path planning method.

[0101] This invention is described based on flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to specific embodiments. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowcharts and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0104] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the present invention.

Claims

1. A gradient-based unmanned aerial vehicle (UAV) path planning method, characterized in that, The UAV path planning method includes: The state vectors of the UAV at the starting point and the ending point are obtained respectively, and the initial trajectory that satisfies the state constraints of the UAV at the starting point and the ending point is generated based on the Minimum-Jerk optimization target. The initial trajectory is uniformly sampled to obtain multiple discrete initial control points. Based on all the initial control points, a cubic uniform B-spline is selected to construct an initial B-spline curve. A total cost function is established, which includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, the positions of the initial control points on the initial B-spline curve are iteratively adjusted using the gradient descent method to minimize the total cost function, thereby obtaining the optimized control points. An optimized B-spline trajectory is generated by fitting all the optimized control points, and the optimized B-spline trajectory is used as the planned flight path of the UAV.

2. The gradient-based UAV path planning method according to claim 1, characterized in that, The process of acquiring the state vectors of the UAV at the starting point and the ending point, and generating an initial trajectory that satisfies the state constraints of the UAV at the starting point and the ending point based on the Minimum-Jerk optimization objective, includes: Based on the state vectors of the UAV at the starting point and the ending point, the state vectors include position, velocity, acceleration, and yaw angle; Based on the acquired state vector, a fifth-order polynomial trajectory is established to fit the UAV's motion trajectory. The functional expression of the fifth-order polynomial trajectory is as follows: In the formula, Indicates the time of the drone Location at any given moment Represents a time variable. Represents the polynomial coefficients. Indicates the order of a polynomial; Differentiating the fifth-order polynomial trajectory based on the Minimum-Jerk method, and establishing the objective function by minimizing the integral of the square of the jerk, the expression of the objective function is as follows: In the formula, The integral objective function representing the jerk. Indicates the start time. Indicates the end time. express Regarding time The accelerometer obtained from the third derivative Represents the time derivative. Represents the polynomial coefficient vector. express transpose, This indicates that the calculation is performed over a time interval. The Hessian matrix is ​​obtained by integrating the square of the internal acceleration. Using the acquired state vector, equality constraints are established to ensure that the UAV's trajectory satisfies state matching at the start and end times. The functional expression of the equality constraints is: In the formula, Indicates that drones are in space The trajectory function of the position along the axis as a function of time. Trajectory function The first derivative with respect to time, Trajectory function The second derivative with respect to time, When indicating the start time, the drone is in Initial position on the axis When indicating the start time, the drone is in Initial velocity on the axis, When indicating the start time, the drone is in Initial acceleration on the axis, Indicates the drone's position at the finish line time. The endpoint that needs to be reached on the axis. Indicates the drone's position at the finish line time. The required destination speed on the axis. Indicates the drone's position at the finish line time. The acceleration required to reach the endpoint on the axis; The objective function and the equality constraints are transformed into a quadratic programming problem, and the polynomial coefficients in the fifth-order polynomial trajectory are solved using a numerical optimization algorithm based on the quadratic programming problem to obtain the optimal coefficients. Substitute all the obtained optimal coefficients into the fifth-order polynomial trajectory to generate the initial trajectory that satisfies the smoothness and state constraints.

3. The gradient-based UAV path planning method according to claim 1, characterized in that, The step of selecting cubic uniform B-splines based on all the initial control points to construct the initial B-spline curve includes: All discrete initial control points are arranged and combined into a control point sequence according to the sampling time. The control point sequence includes a first control point that coincides with the starting point of the initial trajectory and a last control point that coincides with the ending point of the initial trajectory. Construct a B-spline curve model, the functional expression of which is: In the formula, Represents a B-spline curve function. Indicates the initial control point. This represents the maximum index of the initial control point. Indicates the first indivual B-spline basis functions This represents the maximum index of the basis functions. Indicates the parameter index. Represents a time variable. Indicates the degree of the B-spline; A cubic uniform B-spline is selected for trajectory fitting, and a node vector is generated based on the number of initial control points. The basis function is then obtained recursively based on the node vector. The control point sequence and the node vector are substituted into the B-spline curve model, and the initial B-spline curve is generated by weighted summation of the basis functions.

4. The gradient-based UAV path planning method according to claim 3, characterized in that, The process involves selecting a cubic uniform B-spline for trajectory fitting, generating a node vector based on the number of initial control points, and recursively obtaining the basis function based on the node vector, including: A cubic uniform B-spline is selected for trajectory fitting. The number of nodes is determined based on the number of initial control points and the selected B-spline degree, and the node vector is generated. The function expression for determining the number of nodes is: In the formula, Indicates the number of nodes; The node vectors are clamped from front to back to constrain the initial B-spline curve to pass through the start and end points of the initial trajectory. The function expression for clamping the node vectors from front to back is: In the formula, Represents a node. This represents the starting node with index 0 among the first k+1 nodes in the node vector. This indicates that the index of the first k+1 nodes in the node vector is... The end node, This indicates that the index of the last k+1 nodes in the node vector is... The starting node, This indicates that the index of the last k+1 nodes in the node vector is... The end node, This represents the maximum index of the node vector. This represents the traversal number of nodes uniformly distributed between the first k+1 nodes and the last k+1 nodes within the node vector. The index of a node in the node vector located between the first k+1 nodes and the last k+1 nodes is . Nodes; Based on the node vectors after the front and rear clamping process, the basis functions of the B-spline are calculated using the DeBoor-Cox recursive formula. The functional expression for calculating the basis functions is as follows: In the formula, Indicates the first indivual B-spline basis functions Indicates the first indivual -1st degree B-spline basis functions This indicates the degree of the B-spline. Indicates the first 1 node This indicates the main condition for judgment. This indicates that the remaining conditions do not satisfy the main condition.

5. The gradient-based UAV path planning method according to claim 1, characterized in that, The UAV path planning method further includes, after constructing the initial B-spline curve, establishing and minimizing the total cost function, including: Establish the total cost function, whose functional expression is: In the formula, Represents the total cost function. Represents the smoothness constraint term. This represents the weighting coefficient of the smoothness constraint term. Indicates the collision constraint term. This represents the weighting coefficient of the collision constraint term. Represents the dynamically feasible constraint term. Represents the weighting coefficients of the dynamic feasibility constraint terms; Based on the gradient information of the ESDF distance field, the gradient direction of the voxel where each initial control point is located on the initial B-spline curve moves away from the obstacle the fastest is obtained; Obtain the smoothness constraint, collision constraint, and dynamic feasibility constraint of the initial B-spline curve, and calculate the total gradient of the total cost function with respect to the position of each initial control point based on the gradient of each constraint. Based on the obtained total gradient, the positions of each initial control point are iteratively updated in the opposite direction of the gradient using gradient descent until the total cost function converges to obtain the corresponding optimized control point.

6. The gradient-based UAV path planning method according to claim 5, characterized in that, The UAV path planning method further includes obtaining the smoothness constraint term of the initial B-spline curve, including: Iterate through the initial B-spline curve to obtain the front difference vectors between all the initial control points and their preceding adjacent initial control points, as well as the back difference vectors between all the initial control points and their following adjacent initial control points. The smoothness constraint term is obtained by summing the front and back difference vectors of all the initial control points. The functional expression for calculating the smoothness constraint term is as follows: In the formula, Represents the smoothness constraint term. Indicates the initial control point. Indicates the parameter index. This represents the maximum index of the initial control point.

7. The gradient-based UAV path planning method according to claim 5, characterized in that, The UAV path planning method further includes obtaining the collision constraint term of the initial B-spline curve, including: The Euclidean distance from each initial control point on the initial B-spline curve to the nearest obstacle is queried in real time using the ESDF distance field. The collision penalty value for each initial control point is calculated based on the Euclidean distance obtained from the query. The function expression for calculating the collision penalty value is as follows: In the formula, This represents the collision penalty value of the initial control point. Indicates the initial control point. Indicates the parameter index. This represents the Euclidean distance from the initial control point to the nearest obstacle. Indicates the preset safety radius; When the Euclidean distance from the initial control point to the nearest obstacle is less than the preset safety radius, the initial control point is pulled along the corresponding gradient direction to adjust its position. The collision constraint term is obtained by summing the collision penalty function values ​​of all the initial control points. The functional expression for calculating the collision constraint term is: In the formula, Indicates the collision constraint term. This represents the maximum index of the initial control point.

8. The gradient-based UAV path planning method according to claim 7, characterized in that, The UAV path planning method further includes obtaining the dynamic feasibility constraints of the initial B-spline curve, including: The central difference method is used to calculate and obtain the velocity estimate and acceleration estimate of each initial control point on the initial B-spline curve; A penalty function is applied to the velocity estimate and acceleration estimate of each initial control point to calculate the velocity penalty value and acceleration penalty value. The functional expressions for calculating the velocity penalty value and the acceleration penalty value are as follows: In the formula, This represents the speed penalty value. This represents the velocity estimate at the i-th initial control point. This indicates the preset maximum speed value. This represents the acceleration penalty value. This represents the acceleration at the i-th initial control point. This indicates the preset maximum acceleration value. Indicates the parameter index; The velocity penalty value and the acceleration penalty value of all the initial control points are summed to obtain the dynamic feasible constraint term. The functional expression for calculating the dynamic feasible constraint term is as follows: In the formula, Represents the dynamically feasible constraint term. This represents the maximum index of the initial control point.

9. A path planning system, employing the gradient-based UAV path planning method according to any one of claims 1-7, characterized in that, The path planning system includes: The initial trajectory generation module is used to obtain the state vectors of the UAV at the start and end points respectively, and generate an initial trajectory that satisfies the state constraints of the UAV at the start and end points based on the Minimum-Jerk optimization target. An initial curve construction module is used to uniformly sample the initial trajectory to obtain multiple discrete initial control points, and select cubic uniform B-spline to construct an initial B-spline curve based on all the initial control points. The control point optimization module is used to establish a total cost function that includes smoothness constraints, collision constraints, and dynamic feasibility constraints. Based on the gradient information of the ESDF distance field, the module iteratively adjusts the positions of the initial control points on the initial B-spline curve using the gradient descent method to minimize the total cost function and obtain the optimized control points. The flight path generation module is used to fit and generate an optimized B-spline trajectory based on all the optimized control points, and to use the optimized B-spline trajectory as the planned flight path of the UAV.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes a computer program, it implements the gradient-based UAV path planning method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Unmanned aerial vehicle path planning method and system based on gradient descent method

    CN116203990A

  • Multi-unmanned aerial vehicle cooperative flight path planning method and device and storage medium

    CN116610148A

  • Path planning method of quad-rotor unmanned aerial vehicle

    CN119336042A

  • Deformation wheel type mobile robot path planning method

    CN119828697A

  • Three-dimensional path planning method based on RRT*, B spline and minimum jerk

    CN120778110A

Cited By

  • Hybrid sampling mechanical arm trajectory planning method based on adaptive distance field

    CN121650023A

  • Under-forest scene-oriented autonomous unmanned aerial vehicle speed adaptive trajectory planning method

    CN121857724A