A bidirectional tree random search method based on complex environment node cost function
By improving the bidirectional tree random search method and combining obstacle modeling and path optimization, the problems of low convergence efficiency, insufficient path quality and poor environmental adaptability in UAV trajectory planning are solved, and more efficient and better path planning is achieved, which is suitable for UAV flight in complex environments.
Patent Information
- Application Number
- CN202511756613.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-11-27
AI Technical Summary
Existing UAV trajectory planning algorithms suffer from problems such as low convergence efficiency, insufficient path quality, poor environmental adaptability, and lack of trajectory smoothness in complex environments. Especially in complex scenarios such as urban areas with high-rise buildings or industrial plants, traditional algorithms require a large number of iterations and have poor path planning, resulting in wasted computing resources, low security, and low efficiency.
A bidirectional tree random search method based on the node cost function of complex environment is adopted. By using the improved bidirectional minimum cost fast expansion random tree algorithm (Bi-Mincost-RRT), combined with obstacle modeling, target bias strategy and path optimization, the UAV planning path is generated, including obstacle detection, bidirectional tree expansion and path pruning and smoothing.
It improves the speed and quality of path search for UAVs in complex environments, ensures the rationality of reliability calculations for UAVs in complex scenarios, optimizes environmental adaptability and trajectory smoothness, and reduces waste of computing resources and flight oscillations.
Smart Images

Figure CN121209396B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) trajectory planning technology. Background Technology
[0002] In the field of UAV trajectory planning, traditional Rapid Expanded Random Tree (RRT) algorithms and their derivatives (such as Bi-RRT and Informed-RRT) can achieve path search, but they have significant limitations in complex environments.
[0003] Low convergence efficiency: One-way search or random sampling without target guidance leads to redundancy in the search space, especially in obstacle-dense or high-dimensional spaces, resulting in numerous iterations and time-consuming path connections. For example, in complex urban environments with towering buildings, traditional RRT algorithms may require thousands or even tens of thousands of iterations to find a feasible path, which greatly wastes computational resources and time, severely impacting the timeliness of UAV mission execution.
[0004] Insufficient path quality: Traditional algorithms do not fully consider environmental risks and flight costs, and the generated paths may have problems such as redundant inflection points, excessively close proximity to obstacles, or high energy consumption. Taking logistics delivery drones as an example, if the path planning is poor, frequent turns and close proximity to obstacles will not only increase flight energy consumption, but may also cause safety accidents due to excessively close proximity to obstacles, reducing the efficiency and safety of logistics delivery.
[0005] Poor environmental adaptability: Single obstacle modeling (such as using only spheres or cuboids) cannot accurately match mixed risk scenarios such as urban building clusters and industrial facilities, resulting in low collision detection efficiency and a high risk of misjudgment. In some industrial areas, there are large equipment and pipes with various irregular shapes. Traditional simple obstacle models are difficult to accurately describe these complex structures, causing drones to be unable to accurately avoid them during path planning, increasing the risk of collision.
[0006] Lack of trajectory smoothness: The path formed by discrete nodes has not undergone post-processing and is difficult to meet the dynamic constraints of UAV flight, which may lead to flight oscillation or energy loss. For UAVs that need to perform high-precision mapping or photography tasks, an unsmooth flight trajectory will cause jitter and deviation in the captured images or mapping data, affecting the quality of mission completion.
[0007] In existing technologies, bidirectional search (Bi-RRT) can accelerate path connection, but it lacks target bias guidance; cost function optimization (such as Informed-RRT) does not integrate the multi-objective balance of environmental risk and flight energy consumption, which makes the algorithm prone to getting trapped in local optima or computational redundancy in complex scenarios. Summary of the Invention
[0008] To overcome the problems of low convergence efficiency, insufficient path quality, poor environmental adaptability, and lack of trajectory smoothness in existing UAV trajectory planning technologies, this invention provides a bidirectional tree random search method based on the node cost function in complex environments.
[0009] The technical solution adopted by this invention to achieve the above objectives is: a bidirectional tree random search method based on the node cost function in a complex environment, comprising the following steps:
[0010] S1. Survey the drone's flight area and obtain obstacle data within the area, including obstacle type, location coordinates, and size parameters;
[0011] S2. Model the obstacles to generate a complex environment model;
[0012] S3. On the complex environment model, an improved bidirectional minimum cost fast expansion random tree algorithm is applied. The sampling strategy is adjusted according to the preset target to construct a dual-tree structure. The node with the lowest cost is selected to alternately expand the two trees to generate the UAV planning path.
[0013] Preferably, in step S1, obstacle data within the area is obtained by using finite element analysis or environmental surveying of the UAV flight area, including obstacle type, position coordinates and size parameters. The obstacle type includes spheres, cuboids and mixed geometries, the position coordinates include center coordinates and vertex coordinates, and the size parameters include radius, length, width and height.
[0014] Preferably, in step S2, the UAV flight area with obstacles is defined as a complex environment, and the obstacles are divided into three categories: spherical obstacles, cuboid obstacles, and combined obstacles. The state space of the complex environment... for:
[0015] ;
[0016] in, For a free zone in a complex environment, For obstacle areas in complex environments;
[0017] Sphere obstacles are determined by the center coordinates. and radius It is confirmed that the area it occupies is:
[0018] ;
[0019] in, Let be the coordinate point in the state space that satisfies the condition that the coordinate point is not within the obstacle area;
[0020] The detection of obstacles on a sphere is expressed as follows:
[0021] ;
[0022] in, Detection points in the drone's planned path;
[0023] When detecting obstacles on a sphere, the parametric equation of the line segment is:
[0024] ;
[0025] in, , To detect the two endpoints of a line segment, To normalize the parameters, calculate the distance from the path node to the center of the sphere and determine whether the path node collides with the sphere.
[0026] The point on the line segment closest to the center of the spherical obstacle satisfy:
[0027] ;
[0028] like The line detection formula is:
[0029] Calculate the parameters of the nearest point from the line segment to the center of the sphere, determine whether the line segment collides with the sphere, and the time complexity of the detection strategy is O(n log n). ;
[0030] A cuboid obstacle is defined by its center coordinates and length. ,Width ,high It is determined that its smallest vertex is The largest vertex is Its occupied area is:
[0031] ;
[0032] in, The coordinate axes are For point exist , , Component vectors on each axis and for The smallest and largest achievable coordinates;
[0033] The rectangular obstacle point detection is expressed as:
[0034] ;
[0035] in, For testing points exist , , Component vectors on each axis;
[0036] When detecting obstacles in a cuboid shape, the intersection theorem of line segments aligned with axes is used, on the coordinate axes. The above calculation time interval:
[0037] ;
[0038] ;
[0039] ;
[0040] in, , To detect the two endpoints on a line segment, , As endpoints , exist , , Component vectors on each axis , Indicates the time it takes for a line segment to enter and leave the corresponding axis plane;
[0041] The time complexity of the detection strategy for determining whether a line segment intersects with a cuboid obstacle is O(log n). ;
[0042] The obstacles are a mixture of spheres and cuboids; collision detection requires a combined detection strategy for both spheres and cuboids, resulting in a time complexity of O(n log n). .
[0043] Preferably, in step S2, the edge distribution of the obstacle is fitted and optimized, and samples of the obstacle's geometric parameters, such as the radius of a sphere and the length, width, and height of a cuboid, are collected to construct a likelihood function:
[0044] :
[0045] in, Let be the Johnson SB probability density function. , For shape parameters, For scale parameters, The position parameters are used; the optimal parameter estimates are obtained by maximizing the likelihood function using the gradient descent method.
[0046] Preferably, in step S3, a target bias strategy is introduced to guide the generation of random sampling points, assuming... Generate random numbers for the preset target bias threshold. Control the sampling direction, if random number Then the random tree grows freely and randomly in the sampling space; if Then the random tree grows towards the target point;
[0047] starting point and the end point As the root node, starting from the origin and the end point Simultaneously construct the search tree and Alternate selection trees in each iteration Kazuki When expanding the tree nodes, select the node closest to the target bias point from the active tree. Generate new nodes along its direction with a step size. :
[0048] ;
[0049] in, As the target bias point, This is the minimum step size for the drone.
[0050] If the distance between the expanded nodes of the two trees is less than the connection step size ,Pick If the connection path has no collision, then the two trees are considered to be successfully connected, the path segments are merged, and a complete path is generated.
[0051] Preferably, in step S3, the node cost is evaluated using an improved minimum cost method, including the path length cost. for:
[0052] ;
[0053] in, Weights are used to control path length;
[0054] Obstacle Distance Cost for:
[0055] ;
[0056] in, For nodes To the center point of each spherical obstacle distance, For nodes To the center point of each cuboid obstacle distance, It is a very small constant. and To adjust the weights for obstacle avoidance sensitivity;
[0057] The energy consumption cost of flight altitude is:
[0058] ;
[0059] in, The energy consumption cost of flight altitude , They are nodes and nodes height, The weighting is determined by the impact of high energy consumption;
[0060] Node cost for:
[0061] ;
[0062] Set appropriate settings according to the established environment. , , , The value is used to select the node with the lowest cost for expansion.
[0063] Preferably, in step S3, the path length coefficient In battery life-sensitive scenarios In time-sensitive scenarios, take Obstacle distance coefficient , Take in areas with dense obstacles , Strengthen obstacle avoidance priority and take action in open areas. , High energy consumption coefficient In areas with drastic altitude changes, take Take in flat areas .
[0064] Preferably, the method further includes step S4, which involves pruning and smoothing the UAV planned path to obtain the UAV target planned path, traversing all adjacent path nodes on the preliminary planned path, and determining the adjacent nodes. and The path is checked for collisions with obstacles. If there is no collision between two points, redundant intermediate nodes are removed, and the two nodes are directly connected, i.e., path pruning is performed. A smooth curve is constructed at the corner using cubic spline interpolation. The cubic spline interpolation function is... In the interval The above satisfies:
[0065] ;
[0066] in, , , , These are the spline coefficients;
[0067] By solving the continuity condition of the first derivative at the endpoints and the continuity condition of the second derivative Determine the spline coefficients , , , This generates a trajectory with continuous and smooth curvature, which is the target planning path for the UAV.
[0068] The beneficial effects of this invention are as follows:
[0069] This invention can characterize the dynamic correlation between obstacle constraints, target bias, and path cost in UAV path planning under complex environments by using an improved Bi-Mincost-RRT algorithm. This results in a more efficient search convergence speed and better path quality, ensuring the rationality of reliability calculation for UAVs in complex scenarios such as urban building clusters and dangerous airspaces, and optimizing the environmental adaptability of UAV trajectory planning. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of the overall process of an embodiment of the present invention;
[0071] Figure 2 This is a schematic diagram showing the comparative experimental results of various algorithms in a spherical environment in the examples of embodiments of the present invention;
[0072] Figure 3 This is a schematic diagram of the comparative experimental results of various algorithms in a cuboid environment in the examples of embodiments of the present invention;
[0073] Figure 4 These are performance analysis data illustrations of various algorithms in the examples of this invention. Detailed Implementation
[0074] Embodiments of the present invention provide a bidirectional tree random search method based on a node cost function in a complex environment, such as... Figure 1 As shown, it includes the following steps:
[0075] S1. Using finite element analysis or environmental surveying, obtain obstacle data within the UAV's flight area, including obstacle type, position coordinates, and size parameters. Obstacle types include spheres, cuboids, and mixed geometries. Position coordinates include center coordinates and vertex coordinates. Size parameters include radius, length, width, and height.
[0076] S2. Based on obstacle data, classify and model obstacles:
[0077] S2-1. Define the UAV flight area with obstacles as a complex environment. Based on obstacle type, classify obstacles into three categories: spherical obstacles, cuboid obstacles, and combined obstacles; state space of complex environment. for:
[0078] ;
[0079] in, For a free zone in a complex environment, For obstacle areas in complex environments, The geometric characteristics of the object determine the difficulty of path planning.
[0080] S2-2. To determine whether the UAV's planned path will collide with an obstacle, collision detection is performed on each type of obstacle. Collision detection includes point detection and line detection. Point detection is used to determine whether a single discrete point (such as a path node) in the UAV's planned path is located within the area occupied by an obstacle, requiring path adjustment or replanning. Line detection is used to determine whether the line segments between adjacent nodes in the UAV's planned path intersect with obstacles. If a path node is located within an obstacle or the line segments between adjacent nodes intersect with an obstacle, it means a collision will occur, requiring path adjustment or replanning.
[0081] Sphere obstacles are determined by the center coordinates. and radius It is confirmed that the area it occupies is:
[0082] ;
[0083] in, Let be the coordinate point in the state space that satisfies the condition that the coordinate point is not within the obstacle area;
[0084] The detection of obstacles on a sphere is expressed as follows:
[0085] ;
[0086] in, Detection points in the drone's planned path;
[0087] When detecting obstacles on a sphere, the parametric equation of the line segment is:
[0088] ;
[0089] in, , To detect the two endpoints of a line segment, To normalize the parameters, calculate the distance from the path node to the center of the sphere and determine whether the path node collides with the sphere.
[0090] The point on the line segment closest to the center of the spherical obstacle satisfy:
[0091] ;
[0092] like The line detection formula is:
[0093] Calculate the parameters of the nearest point from the line segment to the center of the sphere, determine whether the line segment collides with the sphere, and the time complexity of the detection strategy is O(n log n). .
[0094] A cuboid obstacle is defined by its center coordinates and length. ,Width ,high It is determined that its smallest vertex is The largest vertex is Its occupied area is:
[0095] ;
[0096] in, The coordinate axes are Let be the coordinate point in the state space that satisfies the condition that the coordinate point is not within the obstacle area. For point exist , , Component vectors on each axis and for The smallest and largest achievable coordinates;
[0097] The rectangular obstacle point detection is expressed as:
[0098] ;
[0099] in, For testing points exist , , Component vectors on each axis;
[0100] When detecting obstacles in a cuboid shape, the intersection theorem of line segments aligned with axes is used, on the coordinate axes. The above calculation time interval:
[0101] ;
[0102] ;
[0103] ;
[0104] in, , To detect the two endpoints on a line segment, , As endpoints , exist , , Component vectors on each axis , Indicates the time it takes for a line segment to enter and leave the corresponding axis plane;
[0105] The intersection of the time intervals for each axis is calculated using the three formulas above. This determines whether a line segment intersects with a cuboid obstacle. The time complexity of this detection strategy is O(log n). .
[0106] The obstacles are a mixture of spheres and cuboids. Collision detection requires dynamically switching between detection strategies for convex regions (spheres) and non-convex regions (combination of cuboids), resulting in a time complexity of O(n log n). .
[0107] S2-3. The edge distribution characteristics of obstacles are fitted using the Johnson SB distribution, which is more adaptable to asymmetric and bounded data and can accurately characterize the statistical characteristics of obstacles (such as building cluster height and hazardous airspace radius) in urban environments.
[0108] The obstacle edge distribution is fitted and optimized by collecting samples of obstacle geometric parameters, such as the radius of a sphere and the length, width, and height of a cuboid, and a likelihood function is constructed.
[0109] :
[0110] in, Let be the Johnson SB probability density function. , For shape parameters, For scale parameters, The position parameters are used; the optimal parameter estimates are obtained by maximizing the likelihood function using the gradient descent method.
[0111] S2-4. Construct a complex environment model by integrating all obstacle models in the UAV's flight area.
[0112] S3. Apply the improved Bi-Mincost-RRT algorithm to the complex environment model to obtain the initial planned path for the UAV:
[0113] S3-1. Use a one-way tree target bias strategy for sampling;
[0114] Introducing a target bias strategy to guide the generation of random sampling points, let... The preset target bias threshold is dynamically adjusted based on environmental complexity; the higher the path uncertainty, the better. The larger the value, the smaller the value; conversely, the smaller the value, the smaller the value. Typically, a value of 0.3-0.7 is used to generate random numbers. Control the sampling direction, if random number Then the random tree grows freely and randomly in the sampling space, i.e., free random sampling; if If the random tree grows towards the target point, it is biased towards target sampling. By guiding the search direction probabilistically, it balances random exploration with target proximity, thereby improving search efficiency.
[0115] S3-2, Use a bidirectional search tree mechanism to search;
[0116] starting point and the end point As the root node, starting from the origin and the end point Simultaneously construct the search tree and Both trees employ a probabilistic target-biased mechanism, alternating tree selection in each iteration. Kazuki When expanding the tree nodes, select the node from the active tree that is closest to the target bias point (the nearest node in the passive tree). Generate new nodes along its direction with a step size. :
[0117] ;
[0118] in, As the target bias point, This is the minimum step size for the drone.
[0119] If the distance between the expanded nodes of the two trees is less than the connection step size If the connection path has no collisions, then the two trees are considered successfully connected, the path segments are merged, and a complete path is generated. This bidirectional search method can narrow down the search range more quickly and find feasible paths.
[0120] like This could lead to the distance between the expanded nodes of the two trees always being greater than the threshold, preventing a connection and increasing the number of iterations; if The step size may be too large, which may lead to missed collision detection (e.g., there is a small obstacle between two nodes). Therefore, this embodiment sets... In practical applications, the scaling factor can be adjusted according to the average size of the obstacles: when the obstacle size is small (such as a swarm of drones), take... When the obstacle is large (such as a high-rise building), take To balance connection efficiency and collision safety.
[0121] S3-3. Evaluate node costs using an improved minimum cost method.
[0122] The improved minimum cost method calculates the path cost, which mainly includes the cost of path length, obstacle distance, and flight altitude energy consumption.
[0123] The path length cost is directly proportional to the path distance to the target point. for:
[0124] ;
[0125] in, Weights are used to control path length;
[0126] When located in a risk zone, the cost of obstacle distance is inversely proportional to the distance to the nearest obstacle; when located within an obstacle zone, the cost is infinite. for:
[0127] ;
[0128] in, For nodes To the center point of each spherical obstacle distance, For nodes To the center point of each cuboid obstacle distance, It is a very small constant. and To adjust the weights for obstacle avoidance sensitivity;
[0129] Energy consumption costs and nodes at flight altitudes and nodes Related to the height difference:
[0130] ;
[0131] in, The energy consumption cost of flight altitude , They are nodes and nodes height, The weighting is determined by the impact of high energy consumption;
[0132] Node cost for:
[0133] ;
[0134] Set appropriate settings according to the established environment. , , , The system selects the node with the lowest cost for expansion and guides the search tree to expand into the low-cost region by optimizing the weight coefficient combination, thereby finding a better path.
[0135] coefficient , , , The specific weight allocation principle for optimization using the Analytic Hierarchy Process (AHP) is as follows:
[0136] Path length coefficient In scenarios where battery life is a critical factor (such as logistics drones), take... Prioritize shortening the path; in time-sensitive scenarios (such as emergency rescue) The length requirement can be relaxed appropriately to speed up the search.
[0137] Obstacle distance coefficient , Take in areas with dense obstacles (such as city centers) , Strengthen obstacle avoidance priority; take action in open areas (such as suburbs). , This reduces the need for detours.
[0138] High energy consumption coefficient : Take samples in areas with drastic altitude changes (such as mountainous cities) This reduces energy consumption caused by frequent changes in altitude; and it allows for the selection of energy sources in flat areas. This weakens the impact of height.
[0139] S3-4. Initialize the obstacle environment, define constraints and collision detection methods, and set the parameters of the improved minimum cost algorithm (such as step size L and maximum number of iterations). Enter the algorithm loop, updating the iteration count, search tree, and sample points in each iteration, using the cost function. Select sample points, expand the search tree, and determine whether they connect to the target point and find a feasible path. If no path is found, continue searching until a feasible path is found, then exit the loop, thus constructing a complete path from the starting point to the destination, and obtaining the initial planned path for the drone.
[0140] S4. Prune and smooth the initial planned path of the UAV to obtain the target planned path of the UAV:
[0141] S4-1. Traverse all adjacent path nodes on the initially planned path and determine the adjacent nodes. and If the path does not collide with obstacles, then the redundant intermediate nodes are deleted and the two nodes are directly connected, which is to perform path pruning and simplify the path structure.
[0142] S4-2. The pruned path is smoothed using cubic spline interpolation. Specifically, a smooth curve is constructed at the corners based on the discrete nodes on the path. This embodiment uses cubic spline interpolation. The cubic spline interpolation function... In the interval The above satisfies:
[0143] ;
[0144] in, , , , The spline coefficients are determined by the endpoint positions, the first derivative, and the continuity condition of the second derivative.
[0145] By solving the continuity condition of the first derivative at the endpoints and the continuity condition of the second derivative Determine the spline coefficients , , , This generates a smooth trajectory with continuous curvature, which serves as the target planning path for the UAV. The target path satisfies the dynamic requirements of UAV flight, reducing oscillations and energy loss during flight.
[0146] This embodiment provides the following example of "UAV trajectory planning in a 3D urban environment":
[0147] The spherical obstacle has a center coordinate of (50, 50, 75), a radius of 15m, and occupies an area of... During collision detection, for the point to be detected... ,calculate If the value is less than or equal to 15, then a point collision occurs; for line segments... ,calculate ,like Then calculate The distance to the center of the ball determines whether a collision has occurred.
[0148] The cuboid obstacle has its center coordinates at (35, 20, 20), with length, width, and height of 10m, 10m, and 40m respectively. Its smallest vertex is (30, 15, 0), its largest vertex is (40, 25, 40), and it occupies an area of... During line detection, the time interval for each axis is calculated. and If the intersection of the intervals is not empty, then the line segment intersects the cuboid.
[0149] There are multiple obstacles; the above are only some of them. The above process explains how to set up obstacles.
[0150] One-way tree target bias search: Set target bias threshold Random numbers are generated in each iteration. ,like If the sampling point is biased towards the endpoint (99,99,99), then the sampling point is generated; otherwise, random sampling is used.
[0151] Bidirectional search tree mechanism: Initialize two trees (starting from the root node) and (With the root node as the endpoint), expand alternately. During expansion, select the node closest to the target bias point from the active tree, such as... When expanding, the target bias point is Calculate the position of the new node from the nearest node in the array, with a step size. , .
[0152] Improved minimum cost method: setting weighting coefficients , , , Path length cost In the obstacle distance cost, the risk zone is set within 5m outside the obstacle. If a node is within the risk zone, ,in , The distance from the node to the nearest obstacle surface; energy consumption cost at flight altitude. Let this be the node height. Calculate the total cost. Choose the node with the lowest cost to expand.
[0153] The initial maximum number of iterations is set to 1000, and the step size is... If the value is 5m, enter the loop. In each iteration, generate new sample points, evaluate and filter them using a cost function, and expand the search tree. When the search tree... and When the distance between the extended nodes is less than 7.5m and there is no collision in the connecting path, the search stops, the path segments of the two trees are merged, and a complete path from the starting point to the ending point is constructed.
[0154] The generated path is pruned to remove redundant nodes, and then a smooth trajectory is generated using cubic spline interpolation to ensure continuous path curvature and meet UAV flight performance constraints. When pruning path points, for example, path points A(10,10,10), B(20,20,20), C(30,30,30), it is determined whether the path from A to C collides with an obstacle. If not, B is deleted, and A and C are reconnected. Then, during cubic spline interpolation, new nodes are added at corners, such as inserting points (15,15,15) and (25,25,25) between A and C, constructing a cubic spline curve to ensure path smoothness. When calculating coefficients, the first and second derivatives at the endpoints are ensured to be continuous, generating a smooth trajectory with continuous curvature, thus obtaining the UAV target planning path.
[0155] The following data was obtained from two different environments, and the average of 30 experiments were conducted using the traditional Rapid Expanding Random Tree (RRT*) algorithm and its derivative Bi-RRT*, as well as the improved Rapid Expanding Random Tree (Bi-Mincost-RRT*) algorithm of this embodiment.
[0156] Environment 1: The state space is 100*100*100m, and the spherical obstacles are set as shown in Table 1 below:
[0157] Table 1
[0158] ;
[0159] Under this environment, the results of the control experiment are as follows Figure 2 As shown in Table 2, the numerical analysis of each algorithm is as follows:
[0160] Table 2
[0161] ;
[0162] Environment 2: The state space is 100*100*100m, and the rectangular obstacles are set as shown in Table 3 below:
[0163] Table 3
[0164] ;
[0165] Under this environment, the results of the control experiment are as follows Figure 3 As shown in Table 4, the numerical analysis of each algorithm is as follows:
[0166] Table 4
[0167] ;
[0168] Numerical diagrams for each algorithm are shown below. Figure 4 As shown.
[0169] This invention has been described through embodiments. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of this invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.
Claims
1. A bidirectional tree random search method based on the node cost function in complex environments, characterized in that, Includes the following steps: S1. Survey the drone's flight area and obtain obstacle data within the area, including obstacle type, location coordinates, and size parameters; S2. Model the obstacles to generate a complex environment model; S3. In complex environment models, an improved bidirectional minimum cost fast expansion random tree algorithm is applied. The sampling strategy is adjusted according to the preset target to construct a dual-tree structure: Starting point and the end point As the root node, starting from the origin and the end point Simultaneously construct the search tree and Alternate selection trees in each iteration Kazuki When expanding the tree nodes, select the node closest to the target bias point from the active tree. Generate new nodes along its direction with a step size. ; The two trees are expanded alternately by selecting the node with the lowest cost. The costs include path length cost, obstacle distance cost, flight altitude energy cost, and node cost. Path length cost... for: ; in, Weights are used to control path length; Obstacle Distance Cost for: ; in, For nodes To the center point of each spherical obstacle distance, For nodes To the center point of each cuboid obstacle distance, It is a very small constant. and To adjust the weights for obstacle avoidance sensitivity; The energy consumption cost of flight altitude is: ; in, The energy consumption cost of flight altitude , They are nodes and nodes height, The weighting is determined by the impact of high energy consumption; Node cost for: ; If the distance between the expanded nodes of the two trees is less than the connection step size If the connection path has no collision, then the two trees are considered to be successfully connected, the path segments are merged, and a drone planning path is generated.
2. The bidirectional tree random search method based on the node cost function in complex environments according to claim 1, characterized in that, In step S1, obstacle data within the UAV flight area is obtained using finite element analysis or environmental survey. This data includes obstacle type, location coordinates, and size parameters. Obstacle types include spheres, cuboids, and mixed geometries. Location coordinates include center coordinates and vertex coordinates. Size parameters include radius, length, width, and height.
3. The bidirectional tree random search method based on the node cost function in complex environments according to claim 1, characterized in that, In step S2, the drone flight area with obstacles is defined as a complex environment, and the state space of the complex environment is: The obstacles are divided into three categories: spherical obstacles, cuboid obstacles, and combined obstacles. Sphere obstacles are determined by the center coordinates. and radius It is confirmed that the area it occupies is: ; in, Let be the coordinate point in the state space that satisfies the condition that the coordinate point is not within the obstacle area; The detection of obstacles on a sphere is expressed as follows: ; in, Detection points in the drone's planned path; When detecting obstacles on a sphere, the parametric equation of the line segment is: ; in, , To detect the two endpoints of a line segment, To normalize the parameters, calculate the distance from the path node to the center of the sphere and determine whether the path node collides with the sphere. The point on the line segment closest to the center of the spherical obstacle satisfy: ; like The line detection formula is: Calculate the parameters of the nearest point from the line segment to the center of the sphere, determine whether the line segment collides with the sphere, and the time complexity of the detection strategy is O(n log n). ; A cuboid obstacle is defined by its center coordinates and length. ,Width ,high It is determined that its smallest vertex is The largest vertex is Its occupied area is: ; in, The coordinate axes are For point exist , , Component vectors on each axis and for The smallest and largest achievable coordinates; The rectangular obstacle point detection is expressed as: ; in, For testing points exist , , Component vectors on each axis; When detecting obstacles in a cuboid shape, the intersection theorem of line segments aligned with axes is used, on the coordinate axes. The above calculation time interval: ; ; ; in, , To detect the two endpoints on a line segment, , As endpoints , exist , , Component vectors on each axis , This indicates the time it takes for a line segment to enter and leave the corresponding axis plane.
4. The bidirectional tree random search method based on the node cost function in complex environments according to claim 3, characterized in that, In step S2, the likelihood function is constructed: : in, Let be the Johnson SB probability density function. , For shape parameters, For scale parameters, Let be the location parameters; maximize the likelihood function to obtain the optimal parameter estimates.
5. The bidirectional tree random search method based on the node cost function in complex environments according to claim 1, characterized in that, In step S3, let Generate random numbers for the preset target bias threshold. Control the sampling direction, if random number Then the random tree grows freely and randomly in the sampling space; if Then the random tree grows towards the target point; Calculate new node : ; in, As the target bias point, This is the minimum step size for the drone. If the distance between the expanded nodes of the two trees is less than the connection step size ,Pick .
6. The bidirectional tree random search method based on the node cost function in complex environments according to claim 1, characterized in that, In step S3, the path length coefficient In battery life-sensitive scenarios In time-sensitive scenarios, take Obstacle distance coefficient , Take in areas with dense obstacles , Strengthen obstacle avoidance priority and take action in open areas. , High energy consumption coefficient In areas with drastic altitude changes, take Take in flat areas .
7. The bidirectional tree random search method based on the node cost function in complex environments according to claim 1, characterized in that, The process also includes step S4, which involves pruning and smoothing the UAV's planned path to obtain the UAV's target planned path, traversing all adjacent path nodes on the initial planned path, and determining the adjacent nodes. and If the path does not collide with obstacles, and there is no collision between two points, then the redundant intermediate nodes are deleted and the two nodes are directly connected, which is to perform path pruning. At the corner, a smooth curve is constructed, and the curvature is made continuous and smooth using the cubic spline interpolation method. This curve is the UAV target planning path trajectory.
Citation Information
Patent Citations
Bidirectional RRT obstacle avoidance path planning method based on mixed multi-strategy sampling
CN118607736A
Improved robot path planning method based on RRT algorithm
CN120778114A