Unmanned helicopter trajectory planning method based on RRT* and artificial potential field method

By combining RRT* and the artificial potential field method, the motion planning of the unmanned helicopter is optimized, the problems of path search speed and trajectory optimization quality are solved, and an efficient and safe flight trajectory is generated.

CN118730105APending Publication Date: 2024-10-01SOUTH CHINA UNIV OF TECH

Patent Information

Application Number
CN202410704050.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Among the existing unmanned helicopter motion planning technologies, the RRT* algorithm is slow in searching the global optimal path, the artificial potential field method is difficult to reach the target point, and the trajectory optimization is prone to 'knotting', which affects the trajectory quality.

Method used

Combining RRT* and the artificial potential field method, the path search algorithm is optimized to generate a safe flight channel by introducing the target offset probability threshold and the repulsion component, and the Bezier curve and trapezoidal time allocation criteria are used to optimize the trajectory to ensure that the trajectory meets the needs of unmanned helicopters. Dynamic constraints.

Benefits of technology

The path search speed is accelerated, the safety and quality of the trajectory are improved, and a smooth flight trajectory that satisfies dynamic constraints is generated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118730105A_ABST
    Figure CN118730105A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned helicopter trajectory planning method based on RRT * and an artificial potential field method, and the method comprises the following steps: selecting a starting point and a target node of flight in a scene in which the position of an obstacle is known, and obtaining an initialized map; performing path search on the initialized map by using an improved RRT * algorithm to obtain a feasible initial path communicating the starting point with the target node; generating a safe flight channel according to the obtained feasible initial path, and distributing time for each section of safe flight channel by using a trapezoidal time distribution criterion; energy minimization is used as an optimization index, a Bezier curve is used for representing the trajectory, and an executable smooth flight trajectory is generated under the condition that the dynamic constraint of the unmanned helicopter is met. According to the method, the randomness of the RRT * path planning method is reduced, the method has obvious optimization effects on time, path length and iteration times, and a smooth and executable flight path is planned according to the dynamic constraint condition of the unmanned helicopter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of motion planning, and in particular to an unmanned helicopter trajectory planning method based on RRT* and an artificial potential field method. Background Art

[0002] At present, unmanned helicopters have the characteristics of vertical take-off and landing and hovering, and have better load-bearing capacity than general multi-rotor drones, making them widely used in complex terrain, multi-obstacle transportation and rescue and other fields. As the algorithms of unmanned helicopters become more mature and the computing power of hardware continues to improve, research on the motion planning of unmanned helicopters has been launched. The mainstream motion planning consists of two aspects: path planning and trajectory optimization.

[0003] The purpose of path planning is to obtain an obstacle-free path connecting the starting point to the end point. Among the typical algorithms, the RRT* algorithm avoids spatial modeling compared to the A* algorithm. It is more suitable for unmanned helicopters, which usually need to fly in large and complex maps, saving a lot of time and space. However, its disadvantages are that it is relatively random and converges slowly to the global optimal path. The artificial potential field method, as a local path planning method, enables the aircraft to adapt well to changes in the surrounding environment and has high real-time performance. However, complex potential field environmental conditions can easily make the trajectory reach the local optimum and fail to reach the target point.

[0004] The purpose of trajectory optimization is to smoothly connect the points obtained by path planning so that the generated trajectory meets the UAV's dynamic constraints and also meets some performance indicators, such as the shortest path and the lowest energy consumption. Among them, the typical algorithm is the Minimum snap algorithm, which generates a smooth trajectory with the lowest energy consumption, but the disadvantage is that if the time allocation is unreasonable, the generated trajectory is prone to "knotting", which reduces the trajectory quality.

[0005] When an unmanned helicopter flies in a complex environment, it needs to quickly search for an initial path that is as far away from obstacles as possible, giving the trajectory optimization step more space to plan a smooth trajectory with good quality that meets the dynamic constraints of the unmanned helicopter. Summary of the invention

[0006] The purpose of the present invention is to solve the above-mentioned defects in the prior art and to provide an unmanned helicopter trajectory planning method based on RRT* and artificial potential field method.

[0007] The purpose of the present invention can be achieved by adopting the following technical solutions:

[0008] A trajectory planning method for an unmanned helicopter based on RRT* and an artificial potential field method, the trajectory planning method comprising the following steps:

[0009] S1. First, select the starting point X of the flight in a scenario where the obstacle position is known. start With the target node X target , get an initialized map with obstacle location information;

[0010] S2. On the initialization map, use the improved RRT* algorithm to search for a path and obtain a path connecting the starting point X start With the target node X target A feasible initial path;

[0011] S3. Generate a connected starting point X based on the feasible initial path start With the target node X target The safety flight channel is divided into two sections, and the time is allocated to each safety flight channel using the ladder time allocation principle;

[0012] S4. Taking energy minimization as the optimization index, the trajectory is represented by a Bezier curve, and an executable smooth flight trajectory is generated in a safe flight channel under the condition of satisfying the dynamic constraints of the unmanned helicopter.

[0013] Further, in step S2, the RRT* algorithm is a method of randomly generating two-dimensional coordinate sampling points X in the map. rand is the search direction, and finally the connection starting point X is searched start With the target node X target A path search algorithm for a feasible initial path, where the feasible initial path refers to the connected starting point X found for the first time. start With the target node X target But it does not pass through obstacles. The improved RRT* algorithm introduces the target bias probability threshold p on this basis. target Combined with the artificial potential field method, the specific steps of improving the RRT* algorithm are as follows:

[0014] S21. Starting point X start Generate and maintain a fast search random tree for the root node, each time selecting a sampling point X on the map sample As an extension direction of the fast search random tree, the fast search random tree is a computer data structure that represents the node connection relationship. A target bias probability threshold p is set in advance. target Each time this step is performed, a random number p between 0 and 1 is generated. rand , and randomly generate a two-dimensional coordinate point X in the map rand , if p rand Greater than p target , then the sampling point X sample Take the randomly generated two-dimensional coordinate point X in the map rand , otherwise the sampling point X sampleLet's take the target node X target , the expression is as follows:

[0015]

[0016] By introducing the target bias probability threshold p target This method can increase the targeting of the expansion of the fast search random tree and reduce the randomness of its expansion direction, thereby speeding up the search for a feasible initial path.

[0017] S22. The artificial potential field method is a local path planning method. Its basic idea is to imitate the concept of potential field in physics, artificially construct an artificial potential field composed of the gravitational field of the target node and the repulsive field around the obstacle, and use the direction of the resultant force on the moving object as the search direction to find the path to the target node. Combining the artificial potential field method with the RRT* algorithm can further speed up the search speed while increasing the distance of the feasible initial path from the obstacle and improving the safety of the flight trajectory.

[0018] Therefore, in this step, the artificial potential field method is combined to improve: find the distance from the sampling point X on the fast search random tree. sample The nearest node X near , is the nearest node X near Add target node X respectively target The gravitational component of the force The repulsive force acting on the obstacle To act on the nearest node X near The combined force Direction is used as the expansion direction of the fast search random tree, starting from the nearest node X near Start extending a distance ρ in this direction to generate a new node X for the fast search random tree near The distance ρ is the expansion step length preset by the RRT* algorithm, and the resultant force The calculation formula is as follows:

[0019]

[0020] in Represents the action on the nearest node X near The force pointing to the original expansion direction of the fast search random tree, that is, pointing to the sampling point X sample The component of the direction, n represents the new node X of the fast search random tree to be generated new Serial number, is the target node X target The gravitational component of the force, is the repulsive force of the obstacle, Represents the action on the nearest node X nearThe combined force pointing to the new expansion direction of the fast search random tree, where the target node X target The gravitational component of the force The calculation formula is as follows:

[0021]

[0022] where ρ is the expansion step size, g is the gravitational gain coefficient, It points from the origin to the target node X target The vector of It points from the origin to the nearest node X near The vector of Represents the nearest node X obtained by subtracting the two near Point to the target node X target The position vector of represents the length of the vector, the vector Dividing it by its length gives the unit vector pointing in the direction of the vector. The above force pointing to the original expansion direction of the fast search random tree is The calculation formula is as follows:

[0023]

[0024] Where ρ is the expansion step size, Partial representation by the nearest node X near Point to sampling point X sample The obstacle repulsion component mentioned above is The calculation formula is as follows:

[0025]

[0026] where k rep is the repulsion gain coefficient, x represents the nearest node X near The serial number in the fast search random tree, p(x) represents the shortest distance from the xth node in the fast search random tree to the obstacle, which is directly calculated from the obstacle position information given by the map initialization. p0 is the range distance of the obstacle repulsion, X obstacle is the node closest to the node X among all obstacles near The center point of the shortest obstacle, and Represented by node X obstacle Point to the nearest node X near Vector Pair Vector The directional derivative represents the negative gradient direction of the obstacle repulsive field.

[0027] S23. Determine the new node X newWhether the requirements are met: the nearest node X near With the new node X new Connect into a line segment X near X new , if this line segment X near X new If it coincides with the obstacle area on the map, then the new node X is discarded. new , return to step S21; if the line segment has no overlap with the obstacle area, retain node X new As a new node of the fast search random tree, continue to the next step S24;

[0028] S24. Select parent node and prune: take new node X new Generate a circle with a radius of r as the center, and put all the fast search random tree nodes in the circle into a set C near Inside, traverse the set C near All nodes in the as new nodes X new The parent node of the new node X is calculated from the parent node of the new node X. new Connect to starting point X start The sum of the path distances of the nodes is selected, and the parent node with the shortest distance sum is selected as the new node X. new The parent node X f ; X f Remove C near Then traverse C again near , calculate C near For each node X i Originally connected to the starting point X start The sum of the path distances Let X i With new node X new Calculate X again for the parent node i Connect to starting point X start The sum of the path distances like Less than Then X i Select new node X new As the parent node of , otherwise it remains the same;

[0029] S25. Check whether to stop improving the RRT* algorithm: If the new node X new Distance from target node X target The distance is less than the preset threshold r stop , then it is considered that the connected starting point X has been searched start With the target node X target If the number of iterations of the RRT* algorithm exceeds the set number t stop, and stop improving the RRT* algorithm; if both conditions are not met, continue to repeat the above steps S21 to S24.

[0030] Furthermore, in step S3, the safe flight channel used to limit the search range of the feasible initial path is a group of cubes with different side lengths, there is a common area between two adjacent safe flight channels of the cubes, and there is no obstacle inside any safe flight channel of the cube. The process of generating the safe flight channel of the cube is as follows:

[0031] S31. Starting from the starting point, set the path points on the feasible initial path as the geometric center points of the cube safe flight channel in sequence. The side length of the cube depends on the minimum value of the distance from its center point to the map boundary and the distance from each obstacle, that is, generate the maximum cube safe flight channel that does not touch obstacles and map boundaries;

[0032] S32. Traverse the path points on the feasible initial path in sequence. If the geometric center point of the current cube safe flight channel is inside the previous cube safe flight channel, discard the path point. Otherwise, select the path point as the geometric center point of the next cube safe flight channel until the target node X is reached. target If it is included in the safe flight path of the cube, then the starting point X start To target node X target A safe flight channel consisting of a series of cubes that does not contain obstacle areas is generated.

[0033] Furthermore, the time it takes for the unmanned helicopter to pass through each cube's safe flight channel is determined by the maximum speed limit and the side length of the cube. The calculation formula for the trapezoidal time allocation criterion is as follows:

[0034]

[0035] Where S i represents the side length of the safe flight channel of the i-th cube, t i represents the time allocated to the ith cube. There are m safe flight paths for cubes in total. max represents the maximum speed of the drone, a max Represents the maximum acceleration of the drone. The trapezoidal time allocation rule means simulating the unmanned helicopter to start from a stationary position at an acceleration of a. max Accelerate until the maximum speed v is reached max , with v max After a period of uniform flight, the max The vehicle decelerates and arrives at the target node when the deceleration reaches 0. The time spent in this process is used for the time allocation of this trajectory.

[0036] Furthermore, in step S4, the flight trajectory is a curve in three-dimensional space, and the position of each dimension of the curve is represented by a piecewise Bezier curve, as shown below:

[0037]

[0038] Among them, p u (t) represents the position of the flight trajectory on the u coordinate axis, where u represents one of the x, y, and z coordinate axes. The flight trajectory is also divided into m segments according to the number of safe flight channels of the cube. represents the jth Bezier curve parameter of the i-th trajectory in the i-th cube safe flight channel on the u-axis. There are n Bezier curve parameters in total. T0 represents the starting time point of the flight trajectory, T1, T2, …, T m is the end time point of each trajectory, t1, t2, …, t m The time to pass through each cube's safe flight channel:

[0039] t i =T i -T i-1 ,i=1,2,…,m

[0040] is the Bernstein basis function, and the calculation formula is as follows:

[0041]

[0042] in It is the number of combinations of j and n, and the calculation formula is:

[0043]

[0044] The trajectory optimization is transformed into a quadratic programming problem with energy minimization as the indicator and with equality constraints and inequality constraints, as shown below:

[0045]

[0046] The quadratic programming problem is a form of optimization problem. u represents the objective function of the optimization problem, is the trajectory position p u (t) The fourth derivative is taken;

[0047] The equality constraint includes the constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the starting and target nodes, and the continuity constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the connection of each intermediate trajectory. The continuity constraint means that the value of a certain order derivative at the end point of the i-th trajectory and the starting point of the i+1-th trajectory must be equal. The equality constraint expression is as follows:

[0048]

[0049] in, represents the trajectory position p u (t) is the k-th derivative at time point t, They represent the position, velocity, acceleration and jerk of the flight trajectory at time point t, respectively. When k is 0, 1, 2, or 3 and They represent the unmanned helicopter at the starting point X start With the target node X target The position, velocity, acceleration and jerk given values ​​at the starting point are respectively start With the target node X target The position, velocity, acceleration and jerk constraints at each trajectory are given in Equation (3). The position, velocity, acceleration and jerk continuity constraints at each trajectory connection are given in Equation (3). This formula is the definition formula of continuity, i.e., T i The limit values ​​of the trajectory segments at both ends of the moment at this point should be equal;

[0050] The inequality constraints include the position, velocity, acceleration, and jerk constraints of the entire flight trajectory. The inequality constraints are expressed as follows:

[0051] p u,i (t)∈C i (4)

[0052]

[0053] C of the set (4) in the inequality constraint i represents the i-th cube safe flight channel area. This formula indicates that the entire flight trajectory must be located in the cube safe flight channel. Inequality (5) constrains the flight speed of the unmanned helicopter. Inequality (6) constrains the acceleration of the unmanned helicopter. Inequality (7) constrains the acceleration of the unmanned helicopter. max 、a max and j max They represent the maximum velocity, maximum acceleration, and maximum jerk, respectively.

[0054] By optimizing the feasible initial path, a smooth trajectory that satisfies the dynamic constraints of the unmanned helicopter and is executable is obtained.

[0055] Compared with the prior art, the present invention has the following advantages and effects:

[0056] (1) The present invention introduces the idea of ​​target bias probability threshold and artificial potential field method in the rapid search random tree expansion step of the RRT* algorithm. While introducing the target bias probability threshold to make the rapid search random tree expand toward the target node in a targeted manner, a gravitational component is added to the target node to further guide the rapid search random tree to expand toward the target node, thereby speeding up the search speed. On the other hand, a repulsive component is introduced for the obstacle to prevent the searched feasible initial path from being too close to the obstacle, thereby improving safety.

[0057] (2) The present invention constrains the flight trajectory of the unmanned helicopter through a series of cubic flight channels, and adopts a trapezoidal time allocation criterion to allocate time for each trajectory, thereby improving the quality of the obtained trajectory; then, the Bezier curve is used to represent the flight trajectory, and its convex hull property is utilized to ensure that the entire trajectory is within the cubic safety flight channel.

[0058] (3) The present invention selects the minimum energy index to optimize the flight trajectory, thereby converting the trajectory optimization problem into a quadratic programming problem with equality constraints and inequality constraints, which can more easily generate a smooth trajectory that meets the dynamic constraints of the unmanned helicopter. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0060] Figure 1 is a flow chart of an unmanned helicopter trajectory planning method based on RRT* and artificial potential field method disclosed in an embodiment of the present invention;

[0061] Figure 2 is a schematic diagram of a flight environment in an embodiment of the present invention, Figure 2 The rectangles in the middle are obstacle areas, and the others are obstacle-free areas. The circle in the lower left corner is the starting point, and the circle in the upper right corner is the end point.

[0062] Figure 3 is a search process diagram of the improved RRT* algorithm in Example 1 of the present invention;

[0063] Figure 4 is a feasible initial path graph obtained by improving the RRT* algorithm in Example 1 of the present invention;

[0064] Figure 5It is a cubic flight channel diagram connecting the starting point to the end point and excluding the obstacle area in Example 1 of the present invention;

[0065] Figure 6 is the final trajectory graph obtained through the trajectory optimization step in Example 1 of the present invention;

[0066] Figure 7 is a search process diagram of the improved RRT* algorithm in Example 2 of the present invention;

[0067] Figure 8 is a feasible initial path graph obtained by improving the RRT* algorithm in Example 2 of the present invention;

[0068] Fig. 9 It is a cube flight channel diagram connecting the starting point to the end point and excluding the obstacle area in Example 2 of the present invention;

[0069] Fig.10 It is the final trajectory diagram obtained through the trajectory optimization step in Example 2 of the present invention. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 described embodiments are 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 creative work are within the scope of protection of the present invention.

[0071] Example 1

[0072] This embodiment discloses a trajectory planning method for an unmanned helicopter based on RRT* and artificial potential field method. Figure 1 As shown, the specific steps of the trajectory planning method include:

[0073] S1. First, select the starting point X of the flight in a scenario where the obstacle position is known. start With the target node X target , so as to obtain an initialization map with obstacle location information, such as Figure 2 The 500m*500m map with obstacles shown, starting point X start With the target node X target The coordinates are taken as (50,50) and (450,450) respectively;

[0074] S2. On the initialization map, use the improved RRT* algorithm to search for a path and obtain a path connecting the starting point X start With the target node X target A feasible initial path;

[0075] The RRT* algorithm is a two-dimensional coordinate sampling point X randomly generated in the map. rand is the search direction, and finally the connection starting point X is searched start With the target node X target A path search algorithm for a feasible initial path, where the feasible initial path refers to the connected starting point X found for the first time. start With the target node p target But it does not pass through obstacles. The improved RRT* algorithm introduces the target bias probability threshold p on this basis. target Combined with the artificial potential field method, the specific steps of improving the RRT* algorithm are as follows:

[0076] S21. Starting point X start Generate and maintain a fast search random tree for the root node, each time selecting a sampling point X on the map sample As an extension direction of the fast search random tree, the fast search random tree is a computer data structure that represents the node connection relationship. A target bias probability threshold p is set in advance. target Each time this step is executed, a random number X between 0 and 1 is generated. rand , and randomly generate a two-dimensional coordinate point X in the map rand , if p rand Greater than p target , then the sampling point X sample Take the randomly generated two-dimensional coordinate point X in the map rand , otherwise the sampling point X sample Let's take the target node X target , the expression is as follows:

[0077]

[0078] S22. Improved by combining artificial potential field method: Find the distance from sampling point X on the fast search random tree sample The nearest node X near , is the nearest node X near Add target node X respectively target The gravitational component of the force The repulsive force acting on the obstacle To act on the nearest node X near The combined force Direction is used as the expansion direction of the fast search random tree, starting from the nearest node X near Start extending a distance ρ in this direction to generate a new node X for the fast search random tree new The distance ρ is the expansion step length preset by the RRT* algorithm, and the resultant force The calculation formula is as follows:

[0079]

[0080] in Represents the action on the nearest node X near The force pointing to the original expansion direction of the fast search random tree, that is, pointing to the sampling point X sample The component of the direction, n represents the new node X of the fast search random tree to be generated new The serial number, is the target node X target The gravitational component of the force, is the repulsive force of the obstacle, Represents the action on the nearest node X near The combined force pointing to the new expansion direction of the fast search random tree, where the target node X target The gravitational component of the force The calculation formula is as follows:

[0081]

[0082] where ρ is the expansion step size, g is the gravitational gain coefficient, It points from the origin to the target node X target The vector of It is from the origin to the nearest node X near The vector of Represents the nearest node X obtained by subtracting the two near Point to the target node X target The position vector of represents the length of the vector, the vector Dividing it by its length gives the unit vector pointing in the direction of the vector. The above force pointing to the original expansion direction of the fast search random tree is The calculation formula is as follows:

[0083]

[0084] Where ρ is the expansion step size, Partial representation by the nearest node X near Point to sampling point X sample The obstacle repulsion component mentioned above is The calculation formula is as follows:

[0085]

[0086] where k rep is the repulsion gain coefficient, x represents the nearest node X nearThe serial number in the fast search random tree, p(x) represents the shortest distance from the xth node in the fast search random tree to the obstacle, which is directly calculated from the obstacle position information given by the map initialization. p0 is the range distance of the obstacle repulsion, X obstacle is the node closest to the node X among all obstacles near The center point of the shortest obstacle, and Represented by node X obstacle Point to the nearest node X near Vector Pair Vector The directional derivative represents the negative gradient direction of the obstacle repulsive field.

[0087] S23. Determine the new node X new Whether the requirements are met: the nearest node X near With the new node X new Connect into a line segment X near X new , if this line segment X near X new If it coincides with the obstacle area on the map, then the new node X is discarded. new , return to step S21; if the line segment has no overlap with the obstacle area, retain node X new As a new node of the fast search random tree, continue to the next step S24:

[0088] S24. Select parent node and prune: take new node X new Generate a circle with a radius of r as the center, and put all the fast search random tree nodes in the circle into a set C near Inside, traverse the set C near All nodes in the as new nodes X new The parent node of the new node X is calculated from the parent node of the new node X. new Connect to starting point X start The sum of the path distances of the nodes is selected, and the parent node with the shortest distance sum is selected as the new node X. new The parent node X f ; X f Remove C near Then traverse C again near , calculate C near For each node X i Originally connected to the starting point X start The sum of the path distances Let X i With new node X new Calculate X again for the parent node i Connect to starting point X start The sum of the path distances like Less than Then X i Select new node X new As the parent node of , otherwise it remains the same;

[0089] S25. Check whether to stop improving the RRT* algorithm: If the new node X new Distance from target node X target The distance is less than the preset threshold r stop , then it is considered that the connected starting point X has been searched start With the target node X target If the number of iterations of the RRT* algorithm exceeds the set number t stop , and stop improving the RRT* algorithm; if both conditions are not met, continue to repeat the above steps S21 to S24.

[0090] In this embodiment, the target bias probability threshold p in step S21 is target is taken as 0.3, the expansion step length ρ of step S22 is taken as 20m, the gravity gain coefficient g is taken as 1.0, and the repulsion gain coefficient k is taken as rep is taken as 1.20, the radius r in step S24 is taken as 10m, and the distance threshold r in step S25 is taken as stop Take it as 10m, the maximum number of iterations t stop Take it as 1500.

[0091] Through step S2, a path connecting the starting point X is searched. start With the target node X target A feasible initial path, such as Figure 3 and Figure 4 As shown, Figure 3 is the search process of the improved RRT* algorithm. Figure 4 It is the feasible initial path searched by the improved RRT* algorithm.

[0092] S3. Generate a connected starting point X based on the feasible initial path start With the target node X target The safety flight channel is divided into two sections, and the time is allocated to each safety flight channel using the ladder time allocation principle;

[0093] In step S3, the safe flight channel used to limit the search range of the feasible initial path is a group of cubes with different side lengths. There is a common area between two adjacent safe flight channels of cubes, and there is no obstacle inside any safe flight channel of the cube. The process of generating the safe flight channel of the cube is as follows:

[0094] S31. Starting from the starting point, set the path points on the feasible initial path as the geometric center points of the cube safe flight channel in sequence. The side length of the cube depends on the minimum value of the distance from its center point to the map boundary and the distance from each obstacle, that is, generate the maximum cube safe flight channel that does not touch obstacles and map boundaries;

[0095] S32. Traverse the path points on the feasible initial path in sequence. If the geometric center point of the current cube safe flight channel is inside the previous cube safe flight channel, discard the path point. Otherwise, select the path point as the geometric center point of the next cube safe flight channel until the target node X is reached. target If it is included in the safe flight path of the cube, then the starting point X start To target node X target And a safe flight channel consisting of a series of cubes without obstacle areas is generated, such as Figure 5 shown.

[0096] After the cube safety flight channel is generated, the allocated time for the unmanned helicopter to pass through each cube safety flight channel is determined by the maximum speed limit and the side length of the cube. The calculation formula of the trapezoidal time allocation rule is as follows:

[0097]

[0098] Where S i represents the side length of the safe flight channel of the i-th cube, t i represents the time allocated to the ith cube. There are m safe flight paths for cubes in total. max represents the maximum speed of the drone, a max Represents the maximum acceleration of the drone. The trapezoidal time allocation rule means simulating the unmanned helicopter to start from a stationary position at an acceleration of a. max Accelerate until the maximum speed v is reached max , with v max After a period of uniform flight, the max The vehicle decelerates and arrives at the target node when the deceleration reaches 0. The time spent in this process is used for the time allocation of this trajectory.

[0099] S4. Taking energy minimization as the optimization index, the trajectory is represented by a Bezier curve. Under the condition of satisfying the dynamic constraints of the unmanned helicopter, an executable smooth flight trajectory is generated in the safe flight channel, such as Figure 6 As shown;

[0100] The flight trajectory is a curve in three-dimensional space, and the position of each dimension of the curve is represented by a piecewise Bezier curve, as shown below:

[0101]

[0102] Among them, p u (t) represents the position of the flight trajectory on the u coordinate axis, where u represents one of the x, y, and z coordinate axes. The flight trajectory is also divided into m segments according to the number of safe flight channels of the cube. represents the jth Bezier curve parameter of the i-th trajectory in the i-th cube safe flight channel on the u-axis. There are n Bezier curve parameters in total. T0 represents the starting time point of the flight trajectory, T1, T2, …, T m is the end time point of each trajectory, t1, t2, …, t m The time to pass through each cube's safe flight channel:

[0103] t i =T i -T i-1 ,i=1,2,…,m

[0104] is the Bernstein basis function, and the calculation formula is as follows:

[0105]

[0106] in It is the number of combinations of j and n, and the calculation formula is:

[0107]

[0108] The trajectory optimization is transformed into a quadratic programming problem with energy minimization as the indicator and with equality constraints and inequality constraints, as shown below:

[0109]

[0110] The quadratic programming problem is a form of optimization problem. u represents the objective function of the optimization problem, is the trajectory position p u (t) The fourth derivative is taken;

[0111] The equality constraint includes the constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the starting and target nodes, and the continuity constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the connection of each intermediate trajectory. The continuity constraint means that the value of a certain order derivative at the end point of the i-th trajectory and the starting point of the i+1-th trajectory must be equal. The equality constraint expression is as follows:

[0112]

[0113] in, represents the trajectory position p u (t) is the k-th derivative at time point t, They represent the position, velocity, acceleration and jerk of the flight trajectory at time point t, respectively. When k is 0, 1, 2, or 3 and They represent the unmanned helicopter at the starting point X start With the target node X target The position, velocity, acceleration and jerk given values ​​at the starting point are respectively start With the target node X target The position, velocity, acceleration and jerk constraints at each trajectory are given in Equation (3). The position, velocity, acceleration and jerk continuity constraints at each trajectory connection are given in Equation (3). This formula is the definition formula of continuity, i.e., T i The limit values ​​of the trajectory segments at both ends of the moment at this point should be equal;

[0114] The inequality constraints include the position, velocity, acceleration, and jerk constraints of the entire flight trajectory. The inequality constraints are expressed as follows:

[0115] p u,i (t)∈C i (4)

[0116]

[0117] C of the set (4) in the inequality constraint i represents the i-th cube safe flight channel area. This formula indicates that the entire flight trajectory must be located in the cube safe flight channel. Inequality (5) constrains the flight speed of the unmanned helicopter. Inequality (6) constrains the acceleration of the unmanned helicopter. Inequality (7) constrains the acceleration of the unmanned helicopter. max 、a max and j max Respectively represent the maximum speed, maximum acceleration and maximum jerk, which are 4m / s and 2m / s respectively in this embodiment. 2 and 5m / s 3 .

[0118] Example 2

[0119] This embodiment discloses a trajectory planning method for an unmanned helicopter based on RRT* and artificial potential field method. Figure 1 As shown, the specific steps of the trajectory planning method include:

[0120] S1. Referring to step S1 in Example 1, first select the starting point X of the flight in a scene where the obstacle position is known. start With the target node Xtarget , so as to obtain an initialization map with obstacle location information, such as Figure 2 The 500m*500m map with obstacles shown, starting point X start With the target node X target The coordinates are taken as (50,50) and (450,450) respectively;

[0121] S2. Referring to step S2 in Example 1, on the initialization map, the improved RRT* algorithm is used to search for a path to obtain a path connecting the starting point X start With the target node X target A feasible initial path;

[0122] In this embodiment, the target bias probability threshold p in step S21 is target is taken as 0.05, the expansion step length ρ of step S22 is taken as 20m, the gravity gain coefficient g is taken as 0.5, and the repulsion gain coefficient k is taken as rep is taken as 0.5, the radius r in step S24 is taken as 10m, and the distance threshold r in step S25 is taken as stop Take it as 10m, the maximum number of iterations t stop Take it as 1500.

[0123] Compared with Example 1, this embodiment reduces the target bias probability threshold p target The effect of artificial potential field method on path search is to search for a path connecting the starting point X through step S2. start With the target node X target A feasible initial path, such as Figure 7 and Figure 8 shown. Figure 7 This is the search process of improving the RRT* algorithm in Example 2, and Figure 3 Compared with the search process in Example 1, almost all areas of the map are searched, which slows down the speed of searching for a feasible initial path.

[0124] S3. Referring to step S3 in Example 1, Fig. 9 As shown, a connected starting point X is generated based on the feasible initial path start With the target node X target The safety flight channel is divided into two sections, and the time is allocated to each safety flight channel using the ladder time allocation principle;

[0125] S4. Referring to step S4 in Example 1, energy minimization is used as the optimization index, and the trajectory is represented by a Bezier curve. Under the condition of satisfying the dynamic constraints of the unmanned helicopter, an executable smooth flight trajectory is generated in the safe flight channel, such as Fig.10 shown.

[0126] In summary, embodiments 1 and 2 can quickly plan a smooth flight trajectory in a complex environment that is as far away from obstacles as possible and meets the dynamic constraints of the unmanned helicopter.

[0127] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A trajectory planning method for an unmanned helicopter based on RRT* and artificial potential field method, characterized in that: The trajectory planning method comprises the following steps: S1. First, select the starting point X of the flight in a scenario where the obstacle position is known. start With the target node X target , get an initialized map with obstacle location information; S2. On the initialization map, use the improved RRT* algorithm to search for a path and obtain a path connecting the starting point X start With the target node X target A feasible initial path; S3. Generate a connected starting point X based on the feasible initial path start With the target node X target The safety flight channel is divided into two sections, and the time is allocated to each safety flight channel using the ladder time allocation principle; S4. Taking energy minimization as the optimization index, the trajectory is represented by a Bezier curve, and an executable smooth flight trajectory is generated in a safe flight channel under the condition of satisfying the dynamic constraints of the unmanned helicopter.

2. The unmanned helicopter trajectory planning method based on RRT* and artificial potential field method according to claim 1 is characterized in that: In step S2, the RRT* algorithm is a method that randomly generates two-dimensional coordinate sampling points X in the map. rand is the search direction, and finally the connection starting point X is searched start With the target node X target A path search algorithm for a feasible initial path, where the feasible initial path refers to the connected starting point X found for the first time. start With the target node X target However, for paths that do not pass through obstacles, the improved RRT* algorithm introduces a target bias probability threshold p target Combined with the artificial potential field method, the specific steps of improving the RRT* algorithm are as follows: S21. Starting point X start Generate and maintain a fast search random tree for the root node, each time selecting a sampling point X on the map sample As an extension direction of the fast search random tree, the fast search random tree is a computer data structure that represents the node connection relationship, and a target bias probability threshold p is pre-set. target Each time this step is performed, a random number p between 0 and 1 is generated. rand , and randomly generate a two-dimensional coordinate point X in the map rand , if p rand Greater than p target , then the sampling point X sample Take the randomly generated two-dimensional coordinate point X in the map rand , otherwise the sampling point X sample Let's take the target node X target , the expression is as follows: S22. Improved by combining artificial potential field method: Find the distance from sampling point X on the fast search random tree sample The nearest node X near , is the nearest node X near Add target node X respectively target The gravitational component of the force The repulsive force acting on the obstacle To act on the nearest node X near The combined force Direction is used as the expansion direction of the fast search random tree, starting from the nearest node X near Start extending a distance ρ in this direction to generate a new node X for the fast search random tree new The distance ρ is the expansion step length preset by the RRT* algorithm, and the resultant force The calculation formula is as follows: in Represents the action on the nearest node X near The force pointing to the original expansion direction of the fast search random tree, that is, pointing to the sampling point X sample The component of the direction, n represents the new node X of the fast search random tree to be generated new The serial number, is the target node X target The gravitational component of the force, is the repulsive force of the obstacle, Represents the action on the nearest node X near The combined force pointing to the new expansion direction of the fast search random tree, where the target node X target The gravitational component of the force The calculation formula is as follows: where ρ is the expansion step size, g is the gravitational gain coefficient, It points from the origin to the target node X target The vector of It is from the origin to the nearest node X near The vector of Represents the nearest node X obtained by subtracting the two near Point to the target node X target The position vector of represents the length of the vector, the vector Dividing it by its length gives the unit vector pointing in the direction of the vector. The above force pointing to the original expansion direction of the fast search random tree is The calculation formula is as follows: Where ρ is the expansion step size, Partial representation by the nearest node X near Point to sampling point X sample The unit vector of the direction, the obstacle repulsion component mentioned above The calculation formula is as follows: where k rep is the repulsion gain coefficient, x represents the nearest node X near The serial number in the fast search random tree, p(x) represents the shortest distance from the xth node in the fast search random tree to the obstacle, which is directly calculated from the obstacle position information given by the map initialization. p0 is the range distance of the obstacle repulsion, X obstacle is the node closest to the nearest node X among all obstacles near The center point of the shortest obstacle, and Represented by node X obstacle Point to the nearest node X near Vector Pair Vector The directional derivative represents the negative gradient direction of the obstacle repulsive field; S23. Determine the new node X new Whether the requirements are met: the nearest node X near With the new node X new Connect into a line segment X near X new , if this line segment X near X new If it coincides with the obstacle area on the map, then the new node X is discarded. new , return to step S21; if the line segment has no overlap with the obstacle area, retain node X new As a new node of the fast search random tree, continue to the next step S24; S24. Select parent node and prune: take new node X new Generate a circle with a radius of r as the center, and put all the fast search random tree nodes in the circle into a set C near Inside, traverse the set C near All nodes in the as new nodes X new The parent node of the new node X is calculated from the parent node of the new node X. new Connect to starting point X start The sum of the path distances of the nodes is selected, and the parent node with the shortest distance sum is selected as the new node X. new The parent node X f ; X f Remove C near Then traverse C again near , calculate C near For each node X i Originally connected to the starting point X start The sum of the path distances Let X i With new node X new Calculate X again for the parent node i Connect to starting point X start The sum of the path distances like Less than Then X i Select new node X new As the parent node of , otherwise it remains the same; S25. Check whether to stop improving the RRT* algorithm: If the new node X new Distance from target node X target The distance is less than the preset threshold r stop , then it is considered that the connected starting point X has been searched start With the target node X target If the number of iterations of the improved RRT* algorithm exceeds the set number t stop , and stop improving the RRT* algorithm; if both conditions are not met, continue to repeat the above steps S21 to S24.

3. The unmanned helicopter trajectory planning method based on RRT* and artificial potential field method according to claim 1, characterized in that: In step S3, the safe flight channel used to limit the search range of the feasible initial path is a group of cubes with different side lengths, there is a common area between two adjacent cube safe flight channels, and there is no obstacle inside any cube safe flight channel. The cube safe flight channel generation process is as follows: S31. Starting from the starting point, set the path points on the feasible initial path as the geometric center points of the cube safe flight channel in sequence. The side length of the cube depends on the minimum value of the distance from its center point to the map boundary and the distance from each obstacle, that is, generate the maximum cube safe flight channel that does not touch obstacles and map boundaries; S32. Traverse the path points on the feasible initial path in sequence. If the geometric center point of the current cube safe flight channel is inside the previous cube safe flight channel, discard the path point. Otherwise, select the path point as the geometric center point of the next cube safe flight channel until the target node X is reached. target If it is included in the safe flight path of the cube, then the starting point X start To target node X target A safe flight channel consisting of a series of cubes that does not contain obstacle areas is generated.

4. According to the cube safety flight channel of claim 3, the time for the unmanned helicopter to pass through each cube safety flight channel is determined by the maximum speed limit and the side length of the cube, and the trapezoidal time allocation rule calculation formula is as follows: Where S i represents the side length of the safe flight channel of the i-th cube, t i represents the time allocated to the ith cube. There are m safe flight paths for cubes in total. max represents the maximum speed of the drone, a max represents the maximum acceleration of the UAV. The trapezoidal time allocation rule means simulating the unmanned helicopter to start from a stationary position at an acceleration of a max Accelerate until the maximum speed v is reached max , with v max After a period of uniform flight, the max The vehicle decelerates and arrives at the target node when the deceleration reaches 0. The time spent in this process is used for the time allocation of this trajectory.

5. The unmanned helicopter trajectory planning method based on RRT* and artificial potential field method according to claim 1, characterized in that: In step S4, the flight trajectory is a curve in three-dimensional space, and the position of each dimension of the curve is represented by a piecewise Bezier curve, as shown below: Among them, p u (t) represents the position of the flight trajectory on the u coordinate axis, where u represents one of the x, y, and z coordinate axes. The flight trajectory is also divided into m segments according to the number of safe flight channels of the cube. represents the jth Bezier curve parameter of the i-th trajectory in the i-th cube safe flight channel on the u-axis. There are n Bezier curve parameters in total. T0 represents the starting time point of the flight trajectory, T1, T2, …, T m is the end time point of each trajectory, t1, t2, …, t m The time to pass through each cube's safe flight channel: t i =T i -T i-1 ,i=1,2,…,m is the Bernstein basis function, and the calculation formula is as follows: in It is the number of combinations of j and n, and the calculation formula is: The trajectory optimization is transformed into a quadratic programming problem with energy minimization as the indicator and with equality constraints and inequality constraints, as shown below: The quadratic programming problem is a form of optimization problem. u represents the objective function of the optimization problem, is the trajectory position p u (t) The fourth derivative is taken; The equality constraint includes the constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the starting and target nodes, and the continuity constraints of the position, velocity, acceleration and jerk of the unmanned helicopter at the connection of each intermediate trajectory. The continuity constraint means that the value of a certain order derivative at the end point of the i-th trajectory and the starting point of the i+1-th trajectory must be equal. The equality constraint expression is as follows: in, represents the trajectory position p u (t) is the k-th derivative at time point t, They represent the position, velocity, acceleration and jerk of the flight trajectory at time point t, respectively. When k is 0, 1, 2, or 3 and They represent the unmanned helicopter at the starting point X start With the target node X target The position, velocity, acceleration and jerk given values ​​at the starting point are respectively start With the target node X target The position, velocity, acceleration and jerk constraints at each trajectory are given in Equation (3). The position, velocity, acceleration and jerk continuity constraints at each trajectory connection are given in Equation (3). This formula is the definition formula of continuity, i.e., T i The limit values ​​of the trajectory segments at both ends of the moment at this point should be equal; The inequality constraints include the position, velocity, acceleration, and jerk constraints of the entire flight trajectory. The inequality constraints are expressed as follows: p u,i (t)∈C i (4) C of the set (4) in the inequality constraint i represents the i-th cube safe flight channel area. This formula indicates that the entire flight trajectory must be located in the cube safe flight channel. Inequality (5) constrains the flight speed of the unmanned helicopter. Inequality (6) constrains the acceleration of the unmanned helicopter. Inequality (7) constrains the acceleration of the unmanned helicopter. max 、a max and j max They represent the maximum speed, maximum acceleration and maximum jerk respectively; By optimizing the feasible initial path, a smooth trajectory that satisfies the dynamic constraints of the unmanned helicopter and is executable is obtained.

Citation Information

Patent Citations

  • Track planning method for multi-rotor unmanned aerial vehicle in indoor environment

    CN114815884A

  • Unmanned aerial vehicle trajectory planning and tracking control method based on improved AAPF-IRRT algorithm

    CN115903894A

  • Robot path planning method based on safe artificial potential field and RRT*

    CN117824652A

  • Path planning method with artificial potential field based on obstacle classification and medical system for steering flexible needle

    US20200330159A1

Cited By

  • Unmanned aerial vehicle dynamic obstacle avoidance method based on safe flight corridor

    CN120686891A

  • Intelligent flight path planning method for unmanned aerial vehicle

    CN120947650A