Unmanned aerial vehicle flight path planning method and system
By combining the convex optimization algorithm with multiple project objective functions to optimize the initial path of the UAV, the UAV's continuous flight trajectory in time domain is generated, which solves the problem of low UAV operation efficiency and realizes efficient and safe flight trajectory planning.
Patent Information
- Application Number
- CN202511096606.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-26
AI Technical Summary
Existing UAV flight trajectory planning methods result in low UAV operation efficiency and usually adopt overly conservative safety margin settings, which prolongs the flight path.
A convex optimization algorithm is used to combine smoothness, safety, dynamics and time objective functions to optimize the initial path of the UAV and generate a continuous flight trajectory of the UAV in the time domain. By obtaining multiple discrete path points, the initial path is constructed and optimized based on the preset UAV path objective function.
It improves the operating efficiency of drones, reduces battery consumption, and lowers inspection costs, while ensuring the integrity and clarity of data collection.
Smart Images

Figure CN120702477A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles (UAVs), and in particular to a UAV flight trajectory planning method and system. Background Art
[0002] With the rapid development of drone technology, its application in the power industry is becoming increasingly widespread, especially in the inspection of overhead transmission lines. Drones have become an important supplement to traditional manual inspections due to their flexibility and efficiency.
[0003] Drones are capable of performing a variety of tasks, including high-definition image acquisition, infrared detection, and LiDAR point cloud scanning. However, to achieve high-quality data acquisition while balancing safety and efficiency, flight trajectory design becomes a key technical issue affecting inspection effectiveness. The flight trajectory determines the drone's coverage of the power transmission line and its surroundings. An improperly designed trajectory can lead to inspection blind spots and miss critical defects. Furthermore, the trajectory affects the resolution and clarity of the image or scan data, which in turn affects subsequent analysis and processing. Furthermore, a reasonable flight trajectory can shorten the drone's flight time, improve mission completion efficiency, reduce battery consumption, and lower inspection costs.
[0004] Existing UAV flight trajectory planning methods are typically based on global path optimization algorithms or local obstacle avoidance algorithms. Their core process involves generating a feasible path through environmental modeling, followed by smoothing and velocity planning to complete the trajectory. However, these methods employ overly conservative safety margins, significantly extending the flight path and resulting in low UAV operational efficiency. Summary of the Invention
[0005] The present invention provides a method and system for planning the flight trajectory of an unmanned aerial vehicle (UAV), which are used to solve the technical problem that the existing UAV flight trajectory planning method leads to low operating efficiency of the UAV.
[0006] A first aspect of the present invention provides a method for planning a flight trajectory of an unmanned aerial vehicle, comprising:
[0007] Get multiple discrete path points of the drone;
[0008] Constructing an initial path for the UAV based on the plurality of discrete path points;
[0009] Based on the convex optimization algorithm, a preset UAV path objective function is used to optimize the UAV initial path according to the preset UAV initial flight conditions to generate the UAV time-domain continuous flight trajectory.
[0010] Optionally, the preset UAV path objective function includes a smoothing project objective function, a safety project objective function, a dynamics project objective function, and a time project objective function; the convex optimization algorithm is used to optimize the UAV initial path according to preset UAV initial flight conditions using the preset UAV path objective function to generate a continuous UAV flight trajectory in the time domain, including:
[0011] Partially derivative the smoothing item target function, the safety item target function, the dynamics item target function, and the time item target function to determine the smoothing item Jacobian determinant, the safety item Jacobian determinant, the dynamics item Jacobian determinant, and the time item Jacobian determinant;
[0012] A convex optimization algorithm is used to optimize the initial path according to the preset UAV flight initial conditions, the smoothness term Jacobian, the safety term Jacobian, the dynamics term Jacobian, and the time term Jacobian to generate a UAV continuous flight trajectory in the time domain.
[0013] Optionally, the smoothing target function is specifically:
[0014] ;
[0015] in, is the target function of the smoothing project; is a fixed quantity in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; is the free variable in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; Select the matrix for the constant; is the mapping matrix; is a block diagonal matrix; is transposed.
[0016] Optionally, the security project target function is specifically:
[0017] ;
[0018] in, It is the function of security project; Status The obstacle clearance penalty term at ; S is the time interval of the UAV flight paths within; is the continuous flight trajectory of the UAV in time domain that changes with time t, and represents the state vector of the UAV at time t; The final time point; is the initial time point; for Velocity vector of the drone at moment 1; is the velocity vector of the UAV; is the discrete sampling interval in the time domain; Over time The changing UAV continuous flight trajectory in time domain is represented by The state vector of the UAV at time ; Status The obstacle gap penalty term at ; k is the index of the discrete time step; is a discrete time point, .
[0019] Optionally, the dynamics project target function is specifically:
[0020] ;
[0021] in, is the target function of the dynamics project; is the speed term; is the acceleration term; The final time point; is the initial time point; is the discrete sampling interval in the time domain; is the speed penalty term; for Velocity vector of the drone at moment 1; is the acceleration penalty term; for The acceleration vector of the drone at time .
[0022] Optionally, the time item target function is specifically:
[0023] ;
[0024] in, is the time item target function; is the time taken for the i-th trajectory; is the total number of trajectories.
[0025] A second aspect of the present invention provides a UAV flight trajectory planning system, comprising:
[0026] The acquisition module is used to obtain multiple discrete path points of the drone;
[0027] A construction module, configured to construct an initial path for the UAV based on the plurality of discrete path points;
[0028] The optimization module is used to optimize the initial path of the drone based on a convex optimization algorithm, using a preset drone path objective function according to preset drone flight initial conditions, and generate a continuous flight trajectory of the drone in the time domain.
[0029] A third aspect of the present invention provides a computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the drone flight trajectory planning method as described in any one of the above items.
[0030] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the drone flight trajectory planning method as described in any one of the above items.
[0031] A fifth aspect of the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer executes the steps of the drone flight trajectory planning method as described in any one of the above items.
[0032] It can be seen from the above technical solutions that the present invention has the following advantages:
[0033] The above scheme of the present invention provides a method for planning the flight trajectory of a UAV, which obtains multiple discrete path points of the UAV; constructs an initial path of the UAV based on the multiple discrete path points; based on a convex optimization algorithm, a preset UAV path objective function is used to optimize the initial path of the UAV according to preset UAV flight initial conditions, and generates a continuous flight trajectory of the UAV in the time domain; based on the above scheme, the present invention combines the convex optimization algorithm, the preset UAV path objective function, and the preset UAV flight initial conditions to optimize the constructed initial path of the UAV, and can output the optimized UAV flight trajectory without setting an overly conservative safety margin, thereby improving the operating efficiency of the UAV. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 A flowchart of a method for planning a flight trajectory of a UAV provided in accordance with the first embodiment of the present invention;
[0036] Figure 2 A schematic diagram of a flow chart of a method for planning a flight trajectory of a UAV provided in the first embodiment of the present invention;
[0037] Figure 3This is a structural block diagram of a UAV flight trajectory planning system provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present invention provide a method and system for planning the flight trajectory of an unmanned aerial vehicle (UAV), which are used to solve the technical problem that the existing UAV flight trajectory planning method leads to low operating efficiency of the UAV.
[0039] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0040] See also Figure 1 , Figure 1 This is a flowchart of the steps of a UAV flight trajectory planning method provided in Example 1 of the present invention.
[0041] The present invention provides a method for planning a flight trajectory of an unmanned aerial vehicle, comprising:
[0042] Step 101: Acquire multiple discrete path points of the UAV.
[0043] It should be noted that the present invention obtains a plurality of preset discrete path points of the drone through the controller call.
[0044] Step 102: Construct an initial path for the UAV based on multiple discrete path points.
[0045] It should be noted that the present invention uses the obtained multiple discrete path points to construct the initial path of the drone.
[0046] Step 103: Based on the convex optimization algorithm, the preset UAV path objective function is used to optimize the UAV initial path according to the preset UAV initial flight conditions to generate the UAV time-domain continuous flight trajectory.
[0047] The preset UAV path objective functions include smoothing objective function, safety objective function, dynamics objective function and time objective function.
[0048] It should be noted that the present invention then combines the convex optimization algorithm, the preset objective function, and the initial conditions to optimize the position, velocity, acceleration, and time distribution of the discrete path points in the initial path of the UAV, and converts them into a time-domain continuous trajectory represented by a piecewise polynomial, that is, the time-domain continuous flight trajectory of the UAV required by the UAV. The present invention uses a piecewise polynomial function to describe the time-domain continuous trajectory. , specifically:
[0049] ; (1)
[0050] in, is the time domain continuous flight trajectory of the UAV at time t, which represents the state vector of the UAV at time t. It is a vector function containing trajectory information such as position, velocity, and acceleration. N is the order of the polynomial trajectory. is the coefficient of the qth order polynomial in the n-1th trajectory; is the polynomial function of the initial trajectory; is the coefficient of the qth order polynomial in the initial trajectory; is the initial time; It is the end time of the first time period and the start time of the second time period, which is used to divide different flight phases; is a time variable, indicating the current time; For A polynomial function describing the flight trajectory of the drone over a period of time; For The coefficient of the qth order polynomial corresponding to the time period (i.e., the second trajectory); The end time of the second time period, used to divide the flight phases; For A polynomial function describing the flight trajectory of the drone over a period of time; is the end moment of the last time period considered by the entire flight trajectory model, marking the end of the described flight process; n is the total number of segments of the trajectory, that is, the trajectory is divided into n segments; q is the degree of the polynomial, ranging from 0 to N, representing the power of each term in the polynomial.
[0051] Furthermore, let Δt i =t i+1 -t i The time allocated to the i-th trajectory segment, the trajectory continuity constraint can be expressed as:
[0052] ; (2)
[0053] in, To represent the i-th trajectory at time Trajectory function when ; is the i+1th trajectory at time Trajectory function when ; The time allocated for the i-th trajectory; The time allocated to the i+1th trajectory; k is the differential order.
[0054] Furthermore, the present invention determines the optimal solution of the time domain continuous trajectory of the UAV as selecting the optimal and appropriate segmented trajectory polynomial coefficients and allocation time Δt i , optimize the following preset UAV path objective function J opt :
[0055] ; (3)
[0056] in, is the preset UAV path objective function; is the target function of the smoothing project; It is the function of security project; is the target function of the dynamics project; is the time item target function; 、 、 、 are the weight coefficients of their corresponding objective functions respectively.
[0057] Furthermore, for the smoothing function, the integration of the high-order derivatives of the continuous trajectory in the time domain is often used as the smoothing function; the integration of the third-order derivative of the trajectory is selected, then It can be expressed as:
[0058] ; (4)
[0059] in, is the trajectory function of the i-th trajectory at time t; n is the number of trajectory segments.
[0060] Scoring segment trajectory coefficient vector =[ , ,…, ] T , for The column vectors are:
[0061] ; (5)
[0062] in, is a block diagonal matrix; is the Hessian matrix (Hessian matrix) of the initial trajectory; For the first trajectory Hessian matrix of time; For the n-1th trajectory The Hessian matrix of time is obtained by integrating the trajectory derivative term in Equation 4 in time domain.
[0063] remember is a column vector consisting of the position, velocity, and acceleration of all endpoints of the segmented trajectory, for The fixed quantities in the equation are the column vectors of position, velocity, and acceleration at the starting and ending points. for The free variables in , that is, the column vectors of position, velocity, and acceleration at the remaining discrete path points except the starting point and the end point, are:
[0064] ; (6)
[0065] in, is the i-th subvector The i-th trajectory at time t i the location of the (starting point); is the i-th subvector The i-th trajectory at time t i Speed (of the starting point); is the i-th subvector The i-th trajectory at time t i acceleration (of the starting point); is the i-th subvector The i-th trajectory at time t i+1 the location of the (end point); is the i-th subvector The i-th trajectory at time t i+1 Speed (of the end point); is the i-th subvector The i-th trajectory at time t i+1 acceleration at the (end point); for The position of the starting point of the entire trajectory; for The velocity at the starting point of the entire trajectory; for The acceleration at the starting point of the entire trajectory; for The position of the end point of the entire trajectory; for The velocity at the end point of the entire trajectory; for The acceleration at the end point of the entire trajectory; for The position of the first trajectory at time t1 (starting point); for The velocity of the first trajectory at time t1 (starting point); for The acceleration of the first trajectory at time t1 (starting point); for The n-1th trajectory at time t n-1 the location of the (starting point); for The n-1th trajectory at time t n-1 Speed (of the starting point); for The n-1th trajectory at time t n-1 The acceleration of the starting point.
[0066] Furthermore, using a closed-form solution method, the continuity constraint can be transformed into:
[0067] ; (7)
[0068] in, The mapping matrix maps the position, velocity, and acceleration at the endpoint of the segmented trajectory to a vector composed of trajectory polynomial coefficients and the time Δt allocated to the segmented trajectory. i related; Select the matrix for the constant to eliminate The repeated variables in the matrix are separated into fixed variables and free variables; the present invention adopts block diagonal matrix representation , specifically:
[0069] ; (8)
[0070] in, for The block submatrix of the trajectory of the initial time period in ; for The block submatrix of the trajectory of the first time period in ; for The block submatrix of the trajectory in the n-1th time period.
[0071] Based on the above foundation, this type of closed-form solution method can obtain a stable numerical solution when the number of trajectory segments is greater than 50, which meets the application scenario of trajectory optimization; the smoothing target function is obtained as follows:
[0072] ; (9)
[0073] in, is the target function of the smoothing project; is a fixed quantity in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; is the free variable in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; Select the matrix for the constant; is the mapping matrix; is a block diagonal matrix; is transposed.
[0074] For the safety project target function, in order to ensure the safety of the generated trajectory, the constraint dis(s,C i )>l0, converted into a safety project function, specifically:
[0075] ; (10)
[0076] in, It is the function of security project; Status The obstacle clearance penalty term at ; S is the time interval of the UAV flight paths within; is the continuous flight trajectory of the UAV in time domain that changes with time t, and represents the state vector of the UAV at time t; The final time point; is the initial time point; for Velocity vector of the drone at moment 1; is the velocity vector of the UAV; is the discrete sampling interval in the time domain; Over time The changing UAV continuous flight trajectory in time domain is represented by The state vector of the UAV at time ; Status The obstacle gap penalty term at ; k is the index of the discrete time step; is a discrete time point, .
[0077] Furthermore, for any point p in the trajectory, the following obstacle gap penalty term is designed: :
[0078] ; (11)
[0079] in, To control the amplitude of the penalty function; To control the amplitude of the penalty function change. For point p on the i-th trajectory, obs(p) can be approximated as dis(p,C i ), reducing the time overhead caused by large-scale raster map data processing; l0 is the reference distance.
[0080] Furthermore, for the dynamics project objective function, the dynamics objective function The purpose is to prevent the speed and acceleration of the optimized trajectory from exceeding the maximum permissible speed and acceleration of the UAV at a certain moment;
[0081] Include speed term With the acceleration term , specifically:
[0082] ; (12)
[0083] in, is the target function of the dynamics project; is the speed term; is the acceleration term; The final time point; is the initial time point; is the discrete sampling interval in the time domain; is the speed penalty term; for Velocity vector of the drone at moment 1; is the acceleration penalty term, both the speed penalty term and the acceleration penalty term are in exponential form, which will not be described in detail in the present invention; for The acceleration vector of the drone at time .
[0084] Furthermore, for the time target function, the segmented trajectory takes time Δt i Optimizing it as a free variable can prevent the occurrence of trajectory knotting and sharp inflection points caused by unreasonable time allocation. However, the iterative optimization process of the smoothing objective function and the dynamic objective function will cause the trajectory allocation time to continue to increase, resulting in a total trajectory time that is too long and does not meet the requirements of trajectory planning. Selecting the following time objective function as a penalty term can obtain a more reasonable segmented trajectory time allocation, where the time objective function is specifically:
[0085] ; (13)
[0086] in, is the time item target function; is the time taken for the i-th trajectory; is the total number of trajectories.
[0087] Furthermore, step 103 may include the following sub-steps S31-S32:
[0088] Step S31, respectively taking partial derivatives of the smoothing item target function, the safety item target function, the dynamics item target function, and the time item target function to determine the smoothing item Jacobian determinant, the safety item Jacobian determinant, the dynamics item Jacobian determinant, and the time item Jacobian determinant;
[0089] Step S32: Using a convex optimization algorithm, the initial path is optimized according to the preset UAV flight initial conditions, the smoothing term Jacobian, the safety term Jacobian, the dynamic term Jacobian, and the time term Jacobian, to generate a continuous flight trajectory of the UAV in the time domain.
[0090] The smoothing term Jacobian includes the smoothing term Jacobian about the drone state and the Jacobian determinant of the smoothing term for the UAV trajectory allocation time .
[0091] The safety term Jacobian includes the safety term Jacobian about the drone state and the Jacobian determinant of the safety term for the UAV trajectory allocation time .
[0092] The Jacobian determinant of the dynamics term includes the Jacobian determinant of the dynamics term about the drone state and the Jacobian determinant of the dynamics term for the UAV trajectory distribution time .
[0093] The time term Jacobian includes the time term Jacobian of the drone state and the Jacobian of the time term for the UAV trajectory allocation time .
[0094] It should be noted that the present invention uses a convex optimization algorithm based on gradient descent for trajectory optimization. For the selected multiple objective functions (i.e., smoothing item objective function, safety item objective function, dynamics item objective function, and time item objective function), the Jacobian determinant (Jacobian determinant) relative to the free variable is calculated respectively, i.e., the smoothing item Jacobian determinant, the safety item Jacobian determinant, the dynamics item Jacobian determinant, and the time item Jacobian determinant. In order to facilitate the subsequent calculation process, the present invention selects and As an optimization variable, the trajectory coefficient can be indirectly calculated to obtain the optimized trajectory. = , we can get:
[0095] ; (14)
[0096] in, 、 、 and They are The block matrices of the upper left, upper right, lower left, and lower right in are; taking partial derivatives of the above formula, we can get:
[0097] ; (15)
[0098] Let the combination variable matrix K=S , then:
[0099] ; (16)
[0100] ;
[0101] in, is the Jacobian determinant of the smoothing term of the UAV state, which represents the target function of the smoothing term right The partial derivative of The Jacobian determinant of the smoothing term for the time distribution of the UAV trajectory represents the target function of the smoothing term Time interval The partial derivative of .
[0102] Furthermore, the matrix and are all block diagonal matrices, and their The partial derivatives of can be written as follows:
[0103] ; (17)
[0104] in, is a matrix right The partial derivative of is a matrix right The partial derivative of .
[0105] Furthermore, after determining the mapping relationship in Formula 14 and the order of the piecewise polynomial trajectory, and Both are easily available. , μ is the three coordinate axis components xyz, then:
[0106] ; (18)
[0107] in, is the normal vector of the half-plane closest to the current position in the local safe flight channel; is the time vector, 、 、 is a discrete time point; is the block matrix at the bottom right of matrix N, N= ; V is the polynomial coefficient that maps the position to the velocity; c is the obstacle clearance penalty function of formula (18); for The vector components in ; is the Jacobian determinant of the safety term of the drone state, which represents the safety term function The partial derivative of is the obstacle gap penalty function for the obstacle observation value The partial derivative of 、 Indicates that the drone is at t k The module length of the velocity vector at the moment; the function of the safety project target The partial derivative of , that is, the Jacobian determinant of the safety term for the UAV trajectory allocation time as follows:
[0108] ; (19)
[0109] Furthermore, the dynamic objective function J d The gradient derivation of the free variables is similar to the safety project target function, that is, the Jacobian determinant of the dynamics term of the drone state and the Jacobian determinant of the dynamics term for the UAV trajectory distribution time Calculation process and Jacobian determinant of safety term for drone status and the Jacobian determinant of the safety term for the UAV trajectory allocation time The calculation process is the same and will not be described in detail in the present invention.
[0110] Furthermore, for the time-term target function, the Jacobian determinant of the time term of the UAV state is , the Jacobian determinant of the time term of the UAV trajectory allocation time .
[0111] Furthermore, the present invention adopts the following initial values as the initial conditions of the iterative optimization process, that is, the preset UAV flight initial conditions, specifically:
[0112] ; (20)
[0113] in, is the preset average velocity of the trajectory; The positions of all discrete path points are considered fixed quantities; is the velocity and acceleration at all path endpoints except the starting point and the end point, and You can get ; is the initial time interval; is the i-th path point; is the i+1th path point; are the velocity and acceleration vectors at all path endpoints except the starting and ending points; is a fixed quantity (the vector corresponding to the fixed information such as the position of all discrete path points); is the distance between the path points.
[0114] Furthermore, after determining the initial conditions and the calculation formula of the Jacobian determinant, the trajectory is optimized using the convex optimization algorithm. and Combining the above formulas, we can obtain the trajectory coefficients and allocated time of the piecewise polynomial, thereby generating the desired time-domain continuous flight trajectory, i.e., the UAV's time-domain continuous flight trajectory. This process gradually constructs a continuous flight trajectory that meets the requirements by setting initial conditions, applying an optimization algorithm, and performing subsequent substitution calculations. This involves processing and optimizing parameters such as the velocity and acceleration of the path endpoints and the time interval to achieve trajectory continuity in the time domain and meet the requirements of the relevant objective function.
[0115] It is worth mentioning that the preset UAV flight initial conditions are mainly used in the iterative process of trajectory optimization, whose goal is to gradually optimize the speed and acceleration of the path points (i.e. ), and time allocation For the representation of piecewise polynomial trajectories, piecewise polynomial trajectories It is usually expressed as follows (taking a cubic polynomial as an example): For each trajectory, the polynomial coefficients a0, a1, a2, and a3 need to be determined. These coefficients are determined by the position, velocity, acceleration, and time distribution of the path points. Decide.
[0116] As a comparison of technical effects, we can refer to existing technologies. With the rapid development of drone technology, its application in the power industry is becoming more and more extensive, especially in the inspection of overhead transmission lines. Drones have become an important supplement to traditional manual inspections due to their flexibility and efficiency.
[0117] Drones are capable of performing a variety of tasks, including high-definition image acquisition, infrared detection, and LiDAR point cloud scanning. However, to achieve high-quality data collection while balancing safety and efficiency, flight trajectory design becomes a key technical issue affecting inspection effectiveness.
[0118] The importance of flight trajectory design; the flight trajectory is the core of the UAV's inspection mission, which directly determines the following aspects:
[0119] The first aspect involves the integrity and quality of data collection. The flight trajectory determines the drone's coverage of the power transmission line and its surroundings. Improper trajectory design can lead to inspection blind spots and miss critical defects. Furthermore, the trajectory also affects the resolution and clarity of the image or scan data, which in turn affects subsequent analysis and processing.
[0120] 2. The second aspect involves operational efficiency; a reasonable flight trajectory can shorten the flight time of the drone, improve mission completion efficiency, reduce battery consumption, and reduce inspection costs.
[0121] When inspecting overhead transmission lines, drones are often used for flight inspections and to perform different specific tasks. During drone inspections, various factors such as safety, efficiency, and inspection quality should be fully considered to ensure that data collection is safe and complete while also taking efficiency into account and ensuring that high-definition images or laser scanning point cloud data can be obtained during inspections.
[0122] However, how to design and generate the required flight trajectory while taking into account efficiency and achieving safe and efficient flight operations while ensuring the integrity and clarity of the data is a technical problem that needs to be solved by those skilled in the art.
[0123] In response to the above problems, the present invention proposes a UAV flight trajectory planning method, please refer to Figure 2 The method obtains multiple preset discrete path points, forming an initial path composed of these discrete path points. A convex optimization algorithm is then used to optimize the position, velocity, acceleration, and time distribution of the discrete path points in the initial path, transforming them into a time-continuous trajectory represented by a piecewise polynomial. The time-continuous trajectory is then described using a piecewise polynomial function. The optimal solution for the time-continuous trajectory is determined by selecting the optimal and appropriate piecewise trajectory polynomial coefficients and time distribution. In specific applications, a safety objective function is established based on the constraints imposed on the trajectory within the safe flight channel. During the calculation process, a weighted multi-objective optimization function is established, combining performance indicators such as flight smoothness, dynamic characteristics, flight time, and target image resolution. A convex optimization algorithm is then used to optimize the position, velocity, acceleration, and time distribution of the discrete path points in the initial path, transforming them into a time-continuous trajectory represented by a piecewise polynomial. Ultimately, this method achieves safe and efficient flight operations while ensuring data integrity and clarity, while also balancing safe flight efficiency.
[0124] In an embodiment of the present invention, the present invention provides a method for planning the flight trajectory of a UAV, which obtains multiple discrete path points of a UAV; constructs an initial path of the UAV based on the multiple discrete path points; based on a convex optimization algorithm, a preset UAV path objective function is used to optimize the initial path of the UAV according to preset UAV flight initial conditions, and generates a continuous flight trajectory of the UAV in the time domain; based on the above scheme, the present invention combines the convex optimization algorithm, the preset UAV path objective function, and the preset UAV flight initial conditions to optimize the constructed initial path of the UAV, and can output the optimized UAV flight trajectory without setting an overly conservative safety margin, thereby improving the operating efficiency of the UAV.
[0125] See also Figure 3 , Figure 3 This is a structural block diagram of a UAV flight trajectory planning system provided in Example 2 of the present invention.
[0126] The present invention provides a UAV flight trajectory planning system, comprising:
[0127] An acquisition module 301 is used to acquire multiple discrete path points of the UAV;
[0128] A construction module 302 is used to construct an initial path of the UAV based on multiple discrete path points;
[0129] The optimization module 303 is used to optimize the initial path of the drone based on a convex optimization algorithm, using a preset drone path objective function and according to preset drone initial flight conditions, to generate a continuous flight trajectory of the drone in the time domain.
[0130] Furthermore, the preset UAV path objective function includes a smoothing objective function, a safety objective function, a dynamics objective function, and a time objective function; the optimization module 303 is specifically used to:
[0131] Partial derivatives of the smoothing item target function, safety item target function, dynamics item target function, and time item target function are calculated respectively to determine the smoothing item Jacobian, safety item Jacobian, dynamics item Jacobian, and time item Jacobian.
[0132] A convex optimization algorithm is used to optimize the initial path according to the preset UAV flight initial conditions, smoothness term Jacobian, safety term Jacobian, dynamics term Jacobian, and time term Jacobian to generate the UAV continuous flight trajectory in time domain.
[0133] Furthermore, the target function of the smoothing item is as follows:
[0134] ;
[0135] in, is the target function of the smoothing project; is a fixed quantity in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; is the free variable in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; Select the matrix for the constant; is the mapping matrix; is a block diagonal matrix; is transposed.
[0136] Furthermore, the security project target function is specifically:
[0137] ;
[0138] in, It is the function of security project; Status The obstacle clearance penalty term at ; S is the time interval of the UAV flight paths within; is the continuous flight trajectory of the UAV in time domain that changes with time t, and represents the state vector of the UAV at time t; The final time point; is the initial time point; for Velocity vector of the drone at moment 1; is the velocity vector of the UAV; is the discrete sampling interval in the time domain; Over time The changing UAV continuous flight trajectory in time domain is represented by The state vector of the UAV at time ; Status The obstacle gap penalty term at ; k is the index of the discrete time step; is a discrete time point, .
[0139] Furthermore, the target function of the dynamics project is specifically:
[0140] ;
[0141] in, is the target function of the dynamics project; is the speed term; is the acceleration term; The final time point; is the initial time point; is the discrete sampling interval in the time domain; is the speed penalty term; for Velocity vector of the drone at moment 1; is the acceleration penalty term; for The acceleration vector of the drone at time .
[0142] Furthermore, the time item target function is specifically:
[0143] ;
[0144] in, is the time item target function; is the time taken for the i-th trajectory; is the total number of trajectories.
[0145] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] An embodiment of the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory; when the computer program is executed by the processor, the processor executes the steps of the drone flight trajectory planning method as described in any of the above embodiments.
[0147] An embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the drone flight trajectory planning method as described in any of the above embodiments are implemented.
[0148] An embodiment of the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the drone flight trajectory planning method as described in any of the above embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0150] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0151] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for planning the flight trajectory of an unmanned aerial vehicle, characterized in that: include: Get multiple discrete path points of the drone; Constructing an initial path for the UAV based on the plurality of discrete path points; Based on the convex optimization algorithm, a preset UAV path objective function is used to optimize the UAV initial path according to the preset UAV initial flight conditions to generate the UAV time-domain continuous flight trajectory.
2. The UAV flight trajectory planning method according to claim 1, characterized in that: The preset UAV path objective function includes a smoothing project objective function, a safety project objective function, a dynamics project objective function, and a time project objective function; the convex optimization algorithm uses the preset UAV path objective function to optimize the UAV initial path according to the preset UAV initial flight conditions to generate a UAV continuous flight trajectory in the time domain, including: Partially derivative the smoothing item target function, the safety item target function, the dynamics item target function, and the time item target function to determine the smoothing item Jacobian determinant, the safety item Jacobian determinant, the dynamics item Jacobian determinant, and the time item Jacobian determinant; A convex optimization algorithm is used to optimize the initial path according to the preset UAV flight initial conditions, the smoothness term Jacobian, the safety term Jacobian, the dynamics term Jacobian, and the time term Jacobian to generate a UAV continuous flight trajectory in the time domain.
3. The UAV flight trajectory planning method according to claim 2, characterized in that: The smoothing target function is specifically: ; in, is the target function of the smoothing project; is a fixed quantity in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; is the free variable in the column vector consisting of the position, velocity, and acceleration at all endpoints of the segmented trajectory; Select the matrix for the constant; is the mapping matrix; is a block diagonal matrix; is transposed.
4. The UAV flight trajectory planning method according to claim 2, characterized in that: The security project target function is specifically: ; in, It is the function of security project; Status The obstacle clearance penalty term at ; S is the time interval of the UAV flight paths within; is the continuous flight trajectory of the UAV in time domain that changes with time t, and represents the state vector of the UAV at time t; The final time point; is the initial time point; for Velocity vector of the drone at moment 1; is the velocity vector of the UAV; is the discrete sampling interval in the time domain; Over time The changing UAV continuous flight trajectory in time domain is represented by The state vector of the UAV at time ; Status The obstacle gap penalty term at ; k is the index of the discrete time step; is a discrete time point, .
5. The UAV flight trajectory planning method according to claim 2, characterized in that: The target function of the dynamics project is specifically: ; in, is the target function of the dynamics project; is the speed term; is the acceleration term; The final time point; is the initial time point; is the discrete sampling interval in the time domain; is the speed penalty term; for Velocity vector of the drone at moment 1; is the acceleration penalty term; for The acceleration vector of the drone at time .
6. The UAV flight trajectory planning method according to claim 2, characterized in that: The time item target function is specifically: ; in, is the time item target function; is the time taken for the i-th trajectory; is the total number of trajectories.
7. A UAV flight trajectory planning system, characterized in that: include: The acquisition module is used to obtain multiple discrete path points of the drone; A construction module, configured to construct an initial path for the UAV based on the plurality of discrete path points; The optimization module is used to optimize the initial path of the drone based on a convex optimization algorithm, using a preset drone path objective function according to preset drone flight initial conditions, and generate a continuous flight trajectory of the drone in the time domain.
8. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the drone flight trajectory planning method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the UAV flight trajectory planning method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer is caused to execute the drone flight trajectory planning method according to any one of claims 1 to 6.