An unmanned aerial vehicle trajectory planning method based on topological priori and residual diffusion
By employing topological priors and residual diffusion, a collision-free trajectory that satisfies UAV kinematic constraints in complex urban environments is generated. This solves the problems of high computational latency and non-real-time trajectory planning in existing technologies, achieving efficient and safe trajectory planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2026-04-08
- Publication Date
- 2026-06-05
AI Technical Summary
Existing UAV trajectory planning technologies struggle to simultaneously achieve multimodal exploration of global topological paths, strict collision avoidance safety at the micro-geometric level, and satisfaction of UAV kinematic constraints in complex 3D urban environments. They also suffer from high computational latency and difficulty in meeting real-time requirements.
A trajectory planning method based on topological priors and residual diffusion is adopted. A coarse feasible path is generated through a topological prior network, and a local geometric refinement is performed using a residual diffusion refinement module. Combined with soft and hard constraints, the safety and kinematic feasibility of the trajectory are ensured. A straight baseline + hierarchical residual representation is used to decouple global topological decision and local geometric correction.
The generated trajectory achieves a 100% success rate in obstacle avoidance and kinematic feasibility, with excellent trajectory quality, strong versatility, high computational efficiency, good applicability, real-time performance, and versatility. The generated trajectory is smooth and conforms to the kinematic constraints of the UAV platform.
Smart Images

Figure CN122149488A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aircraft control technology, and more particularly to a method for unmanned aerial vehicle (UAV) trajectory planning. Background Technology
[0002] With the rapid development of urban air mobility and intelligent air mobility systems, drones are gradually moving from isolated airspaces into complex urban environments. In urban canyons, flight space is often non-convex and filled with dense skyscrapers, crisscrossing power lines, and narrow corridors. A fundamental prerequisite for large-scale deployment of drones in such densely populated areas is that the planning system must be able to provide highly robust, safe, and predictable trajectories under strict physical and kinematic constraints.
[0003] Currently, existing trajectory planning technologies can be mainly divided into the following categories, but all of them have obvious drawbacks or shortcomings:
[0004] 1. Planning methods based on traditional optimization and search: These methods employ front-end search (such as A* or RRT* algorithms) to find initial paths, followed by back-end path smoothing and optimization using polynomial optimization or B-spline parameterization. Obstacle avoidance and kinematic feasibility are ensured by constructing safe flight corridors or performing quadratic planning tasks. While these methods are mathematically rigorous, optimizing landscapes in complex 3D non-convex urban environments is often extremely complex and difficult to solve. The solver's performance is overly dependent on the quality of initial values, easily leading to the algorithm getting trapped in local optima; furthermore, the computational cost is extremely high in large and complex scenarios, making it difficult to meet the real-time requirements of urban air traffic systems.
[0005] 2. A planning method based on pure data-driven and end-to-end generation: This method leverages the powerful fitting capabilities of deep learning, learning from expert demonstrations on large-scale datasets to directly regress complete path coordinates end-to-end in the original state space, thereby generating a trajectory distribution with multimodal features. This method has the following drawbacks:
[0006] (1) Lack of clear safety and physical feasibility guarantees: Pure data-driven models are essentially based on probability distribution sampling and cannot provide strict kinematic feasibility and environmental collision avoidance guarantees.
[0007] (2) Scale-precision coupling problem: In urban environments, models must learn both macroscopic topological guidance and microscopic geometric details within a single high dynamic range numerical space. This coupling often hinders model convergence, causing the generated trajectories to either deviate from the intended path globally or penetrate the boundaries of non-convex obstacles locally.
[0008] 3. Combining differentiable optimization layers or physically-aware generative models: To address the lack of hard constraints in purely data-driven models, existing research attempts to embed physical rules into the generative mechanism or construct differentiable collision detection and optimization layers in neural networks (e.g., using implicit differentiation to treat the quadratic programming solution process as a network layer). This approach has the following drawbacks:
[0009] (1) High computational latency: The introduction of the iterative optimization layer exacerbates the computational latency, which severely limits the real-time performance of the system in real-world scenarios.
[0010] (2) Target conflict leads to distribution distortion: The gradient applied by strict constraints often conflicts with the data manifold learned by the generative model. This forces the denoising process to sacrifice global topological regularity in order to satisfy local feasibility, which will cause the generator to degenerate into a local optimizer, thus losing the core advantage of generative programming in exploring the global optimal solution space.
[0011] In summary, existing UAV trajectory planning technologies cannot simultaneously achieve the following with low computational latency in complex 3D urban obstacle scenarios: (1) multimodal exploration capability of global topology path; (2) strict collision avoidance safety at the micro-geometric level; and (3) kinematic feasibility that meets the physical constraints of UAVs (hard constraints such as maximum speed, acceleration, yaw rate and climb rate). Summary of the Invention
[0012] The objectives of this invention include at least one of the following: (1) providing a planning method and system that can automatically generate strictly collision-free trajectories that meet the kinematic constraints of UAVs in complex urban 3D environments; (2) taking into account trajectory diversity, trajectory quality and computational efficiency while ensuring safety and 100% compliance with constraints; (3) decoupling global topology decisions and local geometric corrections through reasonable trajectory representation and network structure design, fundamentally reducing the learning difficulty and avoiding conflicts between constraints and generation distributions.
[0013] The present invention provides various exemplary embodiments for achieving the above objectives, which are further described and illustrated in the appended claims and the following detailed description.
[0014] It should be understood that the following embodiments are merely illustrative of the technical solutions of the present invention, and not intended to limit the scope of protection of the present invention. Various substitutions or modifications can be made by those skilled in the art without departing from the spirit of the present invention, and all such substitutions or modifications should fall within the scope of protection of the present invention. Attached Figure Description
[0015] Figure 1 A method for UAV trajectory planning based on topological priors and residual diffusion is presented.
[0016] Figure 2 The overall system structure for implementing the present invention is shown.
[0017] Figure 3 yes Figure 2 Examples of topological prior networks and residual diffusion refiners in [the text]. Detailed Implementation
[0018] The invention will be further described in detail below with reference to examples.
[0019] This invention provides a UAV trajectory planning method based on topological priors and residual diffusion, which consists of the following functional modules.
[0020] Functional Module 1. Environmental Awareness and Preprocessing Module, which can be used to perform the following operations:
[0021] (1) Collect sparse point cloud data of the three-dimensional urban environment, including building surfaces and ground points;
[0022] (2) Model the set of obstacles, and represent static obstacles such as buildings as axis-aligned bounding boxes or their union;
[0023] (3) Transform the starting point and ending point of the UAV to a unified standard coordinate system and normalize the coordinate scale.
[0024] Functional module 2. Straight baseline generation module, which can be used to perform the following operations:
[0025] (1) Ignore obstacles and perform linear interpolation on the start and end points to generate a straight baseline path containing a fixed number of intermediate waypoints;
[0026] (2) The entire path is divided into: starting point, ending point (hard boundary conditions) and intermediate waypoint sequence.
[0027] Functional module 3. Topology prior network module, which can be used to perform the following operations:
[0028] (1) A multi-level PointNet++ encoder is used to extract features from the input point cloud at four scales to obtain a multi-scale feature pyramid from coarse to fine and a global topological feature vector.
[0029] (2) Construct a query vector sequence containing temporal location encoding and target relative location encoding, and use a coarse-to-fine Transformer decoder with self-attention + multi-scale cross-attention to focus on point cloud features from coarse to fine in sequence;
[0030] (3) Output the topological residual sequence with the same length as the intermediate waypoint of the straight baseline, and add it to the baseline trajectory to form the coarse path of the first stage.
[0031] Functional module 4. Residual diffusion refinement module, which can be used to perform the following operations:
[0032] (1) Subtract the actual path from the above coarse path to obtain the intermediate waypoint residual sequence, and perform structure-aware normalization on it as the clean signal of the diffusion model.
[0033] (2) Construct a diffusion denoising network based on Transformer: Input diffusion time step encoding, coarse trajectory intermediate waypoint sequence, point cloud features, origin and destination information, and task condition vector (target relative displacement and distance); first, perform self-attention encoding on the coarse path to obtain the topology, and then perform self-attention on the noise residual to ensure smooth motion. Align the coarse path and point cloud through cross attention respectively; combine adaptive normalization, and use time step, condition vector and global environment features to modulate the internal features of the network.
[0034] (3) The diffusion model outputs fine-grained geometric residuals in the residual space, which are superimposed with the coarse path to obtain the refined path. The starting point and the ending point are hard-connected to ensure that the boundary conditions are accurately met.
[0035] Functional module 5. Kinematics-based geometric pre-guidance module (soft constraints), which can be used to perform the following operations:
[0036] (1) In the diffusion sampling loop, geometric and kinematic indices are calculated for each step of the predicted path: the tangential vector and curvature are obtained from the difference between adjacent waypoints, and the lateral acceleration is calculated based on the reference speed; the climb rate is estimated based on the altitude change of adjacent waypoints and the path length; for waypoints that violate the constraints such as maximum lateral acceleration and maximum climb rate, the severity weight of the violation is calculated; using the Laplace smoothing idea, the violating waypoints are softly corrected along the midpoint of the preceding and following adjacent points and the midpoint of the altitude direction to reduce curvature and ease the slope;
[0037] (2) After each sampling step, perform several rounds of global Laplace smoothing on the entire trajectory and re-fix the start and end points;
[0038] (3) Convert the corrected trajectory back into residual form and use it as input for the next diffusion time step.
[0039] Functional module 6. Security module (hard constraints), which can be used to perform the following operations:
[0040] After diffusion generation is complete, this module performs post-processing on the trajectory, including geometric projection and time reparameterization, to achieve strict safety boundaries.
[0041] (1) Geometric shaping and collision projection
[0042] For each intermediate waypoint, check whether it has entered an obstacle or a safety buffer zone. If it has, call the projection operator to project the point onto the free space surface along the shortest distance to ensure that it maintains at least a preset safety distance from the obstacle.
[0043] The process is repeated during iteration: the projected waypoint sequence is smoothed using Laplace, so that the trajectory automatically shrinks to an approximate geodesic while maintaining the homotopy class; the midpoint of each segment of the trajectory between every two intermediate waypoints is checked to see if it intrudes into an obstacle. If it does, the midpoint is projected into the feasible space and the adjacent waypoints are pulled along the direction of the midpoint; the projection is repeated to prevent the smoothed waypoints from sliding into obstacles.
[0044] (2) Time allocation and kinematic constraint recalibration
[0045] After obtaining the geometrically collision-free trajectory, an initial time step is assigned to each segment, with the initial value being the minimum time that satisfies the constraints of maximum speed, maximum climb rate, and maximum yaw rate. The velocity and acceleration at each waypoint are calculated using a differential method. If the acceleration modulus at any point exceeds the upper limit, the adjacent time interval is amplified proportionally to the excess. The above acceleration check and time amplification process is repeated until the acceleration at all waypoints no longer exceeds the limit or the maximum number of iterations is reached. After completion, an explicitly time-stamped spatiotemporal trajectory sequence is obtained, ensuring that the trajectory is strictly executable under the given platform performance parameters.
[0046] The main working principle of this invention includes the following principles.
[0047] 1. The principle of decoupling residual representation from scaling
[0048] In urban environments, ideal trajectories typically approximate straight lines on a large scale, with local deviations only occurring near obstacles. This invention does not directly regress the entire trajectory in absolute coordinate space. Instead, it decomposes the target trajectory into a straight baseline plus residual deformation, and further breaks it down into coarse topological residuals plus fine geometric residuals. Through this representation, the signals learned by the network exhibit a zero-mean, small dynamic range distribution, significantly reducing training difficulty and naturally decoupling macroscopic topology from microscopic geometry.
[0049] 2. Topological Priors and the Hierarchical Generation Mechanism of Diffusion Refinement
[0050] The topology prior network utilizes global point cloud features and time series queries to first select a safe homotopy class globally and generate a roughly feasible baseline path that bypasses major obstacles. The diffusion refinement module then performs local geometric random search and refinement within this homotopy class, preserving the multimodal path distribution (different obstacle avoidance methods and different height channels) while improving path smoothness and obstacle avoidance performance.
[0051] 3. The principle of combining hardware and software constraints to ensure compliance
[0052] Geometric pre-guidance incorporates heuristic corrections based on curvature and ascent rate during the diffusion process, which is equivalent to gradually pushing the trajectory towards the kinematically feasible region during sampling, while preserving the randomness of the diffusion model. After generation, the safety module rigidly corrects all remaining collisions and kinematic violations to the feasible region through non-gradient geometric projection and time recalibration, but does not participate in network training, thereby avoiding the problem of gradient conflict with the generation distribution.
[0053] Compared with existing path planning methods based on A*, RRT*, and traditional optimization, this invention has the following differences:
[0054] 1. Different trajectory representation: It uses a straight baseline plus layered residuals instead of directly searching or regressing the complete trajectory in space;
[0055] 2. Different planning paradigms: Instead of the sequential structure of searching first and then optimizing, it uses a generative model to directly sample multiple feasible trajectories from the data distribution.
[0056] The key differences between this invention and existing end-to-end deep learning or diffusion-based trajectory generation methods include:
[0057] 1. Introduce an explicit topological prior network: First determine the global homotopy class through a multi-scale point cloud-Transformer structure, and then perform diffusion refinement on it, instead of the common single-stage direct diffusion of the entire trajectory;
[0058] 2. Perform diffusion in residual space: The diffusion model only learns the geometric offset relative to the baseline, the signal scale is smaller, the training is more stable, and the boundary conditions are strictly guaranteed by directly connecting the start and end points;
[0059] 3. Employ a combination of hardware and software constraint guarantees, rather than a differentiable optimization layer:
[0060] (1) Soft constraints: embedding geometric pre-guidance based on curvature and rate of ascent in diffusion sampling;
[0061] (2) Hard constraints: In the post-processing stage, all geometric and kinematic constraints are satisfied through non-gradient geometric projection and time recalibration;
[0062] (3) It does not require embedding complex optimization problems into the network backpropagation, which significantly reduces computational overhead and avoids destroying the generated distribution.
[0063] Compared with the prior art, the present invention has the following significant advantages and beneficial effects:
[0064] 1. Significantly improved security
[0065] (1) In the experimental scenario, the trajectory generated by the present invention achieved a 100% success rate in both obstacle avoidance and kinematic feasibility;
[0066] (2) By using safe distance projection and midpoint traction, the tunneling problem in discrete sampling is effectively avoided, ensuring that the entire trajectory remains collision-free in continuous space.
[0067] 2. Excellent trajectory quality
[0068] (1) Compared with traditional A*, RRT* and other methods, the trajectory generated by the present invention is shorter, has fewer broken lines, and has smoother curvature changes, which can significantly reduce the control difficulty and execution energy consumption of the control system;
[0069] (2) Compared with the trajectory generated by the single-stage network, the trajectory velocity, acceleration, climb rate and yaw rate curves are smoother and without obvious oscillation peaks after the addition of the geometric pre-guidance and safety assurance module.
[0070] 3. High degree of ambiguity and robustness
[0071] By leveraging the inherent random sampling characteristics of diffusion models, this invention can generate multiple feasible trajectories with different geometries and even different homotopy classes under the same environmental and origin-end conditions. By introducing indicators such as average pairwise distance for evaluation, it can be seen that the differences between samples are not local noise, but substantial path differences, providing redundant route selection and online switching capabilities for practical tasks.
[0072] 4. Good real-time performance
[0073] Compared to traditional methods such as A* and RRT*, the present invention requires less computation time to generate trajectories and has the potential for application on airborne platforms.
[0074] 5. Good applicability
[0075] The trajectory kinematic constraint parameters (maximum speed, acceleration, yaw rate, climb rate, etc.) can be configured according to different UAV platforms, and the method itself has good versatility.
[0076] Figure 1 This paper presents a UAV trajectory planning method based on topological priors and residual diffusion. For example... Figure 1 As shown, the method includes: environmental perception and preprocessing; generating a straight baseline for the UAV trajectory; generating a first residual sequence based on a topological prior network to adjust the intermediate waypoint positions of the UAV trajectory, which is superimposed on the straight baseline of the trajectory to obtain a coarse path; generating a second residual sequence based on a diffusion denoising network to remove noise, which is superimposed on the coarse path to obtain a fine path; performing spatial safety checks and temporal safety checks on the fine path to provide the final path.
[0077] Environmental perception and preprocessing may include: collecting sparse point cloud data of the three-dimensional environment in which the UAV trajectory is located, wherein the point cloud includes points representing building surfaces and points representing the ground; modeling a set of obstacles, representing static obstacles such as buildings as axis-aligned bounding boxes or the union of axis-aligned bounding boxes; transforming the coordinates of the UAV's starting point and ending point to the normal coordinate system of the three-dimensional environment in which it is located, and normalizing the coordinates.
[0078] The straight baseline for generating the drone trajectory can include: performing linear interpolation on the straight line between the drone's start point and end point while ignoring obstacles to generate a straight baseline path containing a fixed number of intermediate waypoints; and splitting the entire straight baseline path into a sequence of drone start point, end point, and intermediate waypoints.
[0079] Spatial safety checks for fine paths include iteratively performing the following operations: moving intermediate waypoints that are less than a safety margin from obstacles or are located inside obstacles to a safety boundary surface outside obstacles; performing Laplace smoothing on the sequence of intermediate waypoints; detecting the midpoint of each segment between every two intermediate waypoints, projecting midpoints that are less than a safety margin from obstacles or are located inside obstacles onto a safety boundary surface outside obstacles, and adjusting intermediate waypoints at both ends of the midpoints toward the safety boundary surface.
[0080] Performing time safety checks on fine paths includes adjusting the flight time of each segment between every two intermediate waypoints to meet speed and acceleration constraints.
[0081] The topological prior network can be trained using multiple sample data, each of which contains at least: input conditions including sparse point cloud data of the 3D environment in which the UAV trajectory is located, and output results including at least the first residual sequence data.
[0082] The diffusion denoising network generates a second residual sequence from Gaussian noise based on a reverse diffusion process, and the forward diffusion process corresponding to the reverse diffusion process for training the diffusion denoising network includes a process of diffusion from the real residual sequence data between the real trajectory and the coarse path to Gaussian noise.
[0083] Based on the diffusion denoising network, a second residual sequence for noise removal is generated, which is superimposed with the coarse path to obtain a fine path, including kinematic correction in each diffusion time step.
[0084] Kinematic corrections may include: moving intermediate waypoints with lateral acceleration greater than a set threshold to reduce local curvature of the path at the intermediate waypoints; and moving intermediate waypoints with climb / descent velocities greater than a set threshold to reduce climb / descent velocities at the intermediate waypoints.
[0085] The kinematically corrected data is used as the initial value for the next diffusion time step.
[0086] In the topological prior network, a four-layer hierarchical PointNet++ encoder is used to extract features from the point cloud in a fine-to-coarse manner, and then a four-layer coarse-to-fine Transformer decoder is used to obtain the first residual sequence. The coarse-to-fine Transformer decoder uses cross-attention.
[0087] The topological prior network performs the following operations: hierarchical multi-scale sampling and local neighborhood feature aggregation are performed on the point cloud in the relative starting coordinate system to obtain environmental features at multiple scales; the state context formed by the starting point, the ending point and their relative distance are injected into the intermediate waypoint query sequence; cross-attention decoding is performed on the environmental features at multiple scales in order from coarse to fine scale to output the first residual sequence used to correct the straight baseline.
[0088] The diffusion denoising network uses time steps for incremental updates and employs self-attention and cross-attention.
[0089] In each diffusion time step, the diffusion denoising network first performs self-attention processing on the current trajectory features, then performs cross-attention processing on the baseline path features and point cloud environment features respectively, and modulates the feature transformation based on the time step embedding to output the update result of the second residual sequence.
[0090] In the diffusion denoising network, before diffusion sampling begins, the key vector and value vector required for each denoising layer across attention are pre-calculated for the point cloud conditional features that remain unchanged at each diffusion time step; at each diffusion time step, the query vector is calculated only based on the current trajectory features, and the key vector and value vector are reused to complete the cross-attention calculation.
[0091] Figure 2 The overall system structure for implementing the present invention is shown.
[0092] Figure 3 yes Figure 1 Examples of topological prior networks and residual diffusion refiners in [the text].
[0093] As attached Figure 2 As shown in the figure, this embodiment provides a UAV safety trajectory planning system for urban air traffic, which mainly includes the following units.
[0094] 1. Environmental perception and preprocessing unit
[0095] Used to construct a three-dimensional workspace, i.e., a set , Refers to a three-dimensional real vector space, and includes a set of M static obstacles such as city buildings and the ground. Modeling, for example, modeling as an axis-aligned bounding box (AABB) or its union. Obtaining an environmental point cloud (i.e., a set of N points p) from obstacle surfaces and ground sampling. And downsampled to a fixed scale using methods such as farthest point sampling, for example These points are used for subsequent network input.
[0096] 2. Topological Prior Networks (with appendix) Figure 2 Module 1 in
[0097] Function: Given only a starting point ,end and environmental point clouds In this case, a globally feasible coarse path topology (i.e., homotopy class) is inferred using a neural network, and a rough path that satisfies obstacle avoidance is output as a baseline for subsequent refinement.
[0098] Structure: Includes a hierarchical PointNet++ encoder (which extracts multi-scale local geometric features and global topological features from the original environment point cloud through PointNet++'s hierarchical sampling (FPS) and local feature aggregation (SA layer), and a coarse-to-fine Transformer decoder (based on a coarse-to-fine Transformer structure, first generating the global topological skeleton of the path, then gradually refining the local geometric details of the path, and finally outputting a collision-free continuous path) (see appendix for details). Figure 2 (Left half)
[0099] 3. Residual diffusion refiner (with attachment) Figure 2 Module 2 in the appendix Figure 3 (Right half)
[0100] Function: Based on the topology prior, diffuse denoising and sampling of intermediate waypoints in the residual space are performed to achieve smoothing of local geometric details and refinement of obstacle avoidance, while keeping the topology structure determined by the topology prior network intact.
[0101] Structure: Internally, it includes a residual diffusion sampling submodule and a kinematically aware geometric pre-guidance submodule.
[0102] 4. Security Module (attached) Figure 2 Module 3 in
[0103] Geometric projection and time reparameterization are performed on the discrete waypoint sequence generated by residual diffusion to ensure that the trajectory simultaneously satisfies collision safety constraints and platform kinematic constraints (maximum speed, maximum acceleration, maximum climb rate, maximum yaw rate, etc.) without changing the trajectory homotopy class.
[0104] In one specific embodiment, the UAV trajectory planning method of the present invention may include the following operations:
[0105] Operation 1. Workspace Modeling and Path Discretization:
[0106] (1) Construct a three-dimensional workspace under geographic coordinates or local ENU (East-North-Sky) coordinate system, such as a 100 m × 100 m × 40 m urban low-altitude airspace, with a permitted flight altitude of 5 to 35 m, to simulate the urban canyon environment.
[0107] (2) Model obstacles such as buildings as several axis-aligned cuboids or combinations thereof to form an obstacle set. .
[0108] (3) Sparse point clouds were obtained by sampling from the surface of obstacles and the ground. After being downsampled, it is used as the input to the subsequent neural network.
[0109] (4) The starting point is given by the task planning layer. and the end point (That is, the start and end points are freely specified), and the line connecting the two is discretized at equal intervals. waypoints (e.g.) ), to obtain the linear baseline trajectory At this point, each intermediate waypoint is at its base position. The positional difference between the base position and the final determined true waypoint can be represented by the geometric residual.
[0110] (5) Denote the T-2 intermediate waypoints (represented in 3D coordinates) excluding the first and last points as a set.
[0111]
[0112] The subsequent network only learns and corrects on the middle segment, while the first and last points are fixed by hard constraints and do not participate in the learning, thereby reducing the learning difficulty and ensuring that the boundary conditions are strictly satisfied.
[0113] (6) By randomizing the number, shape, and distribution of obstacles, the A* algorithm is used to generate 150,000 samples as a dataset for network training and validation. That is, the 150,000 samples can include training samples and validation samples for the neural network. The sample data can contain the correspondence between the initial conditions in the above form and the geometric residuals of intermediate waypoints (representing the difference between the base position and the true position).
[0114] After training, the neural network can output the geometric residual / topological residual of each intermediate waypoint based on any initial input conditions (mainly including the environmental point cloud, starting point, ending point, intermediate waypoints, i.e., the number of intermediate points, etc.).
[0115] This topological residual corresponds to the adjustment that should be made to the base position of each intermediate waypoint in three-dimensional space.
[0116] Operation 2. Topology Prior Generation (corresponding appendix) Figure 3 (Left side)
[0117] (1) Multi-scale point cloud feature extraction
[0118] Using a four-layer hierarchical PointNet++ encoder to process point clouds Feature extraction is performed to obtain point sets and feature pair sets at different scales. The number N of points P decreases layer by layer as the scale (s) increases, for example... This forms a geometric topological feature pyramid from local to global. The dimension C of feature F can be set to... Global max pooling is performed on the highest-level features (i.e., scale 3) to obtain a global environment feature vector (e.g., further reducing the spatial dimension) from the multi-point, multi-dimensional feature vector. It is used to characterize the overall obstacle layout and urban block topology.
[0119] A state-multilayer perceptron is used to encode the start point, end point, and their relative relationships to obtain task state features; context projection is used to map global environment features and the task state features to a unified feature space; query embedding is used to provide learnable query representations corresponding to each discrete time step; query initialization is used to fuse query embedding, temporal coding, and contextual condition information to generate decoder input; temporal coding is used to preserve the temporal order information during path generation; linear path interpolation is used to generate an initial path based on the start point and end point, providing a reference baseline for subsequent topology residual prediction.
[0120] (2) Initialization of the path query vector: First, construct a vector with a length of... Learnable query vector matrix ,in This represents the embedding dimension. To ensure the query vector possesses the necessary scene information and navigation context, time and location encoding is injected into the basic query parameters. and global point cloud features Embedded with target conditional state After stitching, a learnable linear projection matrix is used. Mapping this to the query space and adding it to the first two terms yields the initial query vector:
[0121]
[0122] in, This represents the basic parameters that can be learned. Indicates time location encoding. It is a learnable linear projection weight matrix. Represents global point cloud features. This represents the target conditional state embedding, used to encode the relative spatial relationship between the start position, end position, and their Euclidean distance.
[0123] (2) Transformer decoding from coarse to fine
[0124] The decoder consists of four layers, each processing a set of points and features at different scales. Cross-attention is employed: the first two layers prioritize features at a coarse scale (e.g., 64 points at scale 3 and 128 points at scale 2) to identify macroscopic homotopy classes such as passageways and corridors that bypass tall buildings globally; the latter two layers focus on features at a fine scale (e.g., 512 points at scale 1 and scale 0) to make local geometric corrections near building edges and street narrow spaces. Through this attention mechanism, the query vector is fused with spatial information at different scales layer by layer, ultimately outputting the topological residual for each discrete time step. (Correction amount at the topological level).
[0125] (3) Coarse path generation
[0126] The topological prior network (trained with the aforementioned 150,000 samples, i.e., trained simultaneously for both the Point++ encoder and the Transformer decoder) is then applied based on the input... Predicted topological residuals Adding it to the middle segment of the linear baseline yields the middle coarse trajectory:
[0127] ,
[0128] By concatenating the starting and ending points, a coarse baseline trajectory is generated:
[0129]
[0130] While the coarse trajectory has avoided most obstacles on a macro level, minor collisions or kinematic inconsistencies may still exist locally, requiring further refinement.
[0131] Operation 3. Residual diffusion refining (corresponding appendix) Figure 3 (Right side) and kinematic pre-guidance:
[0132] (1) Definition of residual and forward diffusion process (In the training phase, 150,000 samples are used for training. Based on the real trajectory in the samples and the coarse baseline obtained by the corresponding neural network, the relationship between the refined residual and the noise xk is obtained.)
[0133] Define the true trajectory excluding the middle segment between the start and end points. The difference between the middle segment of the coarse baseline (refined residual) and the final segment is a geometric residual sequence:
[0134]
[0135] For each time step (i.e., the time interval from moving from one intermediate waypoint to the next adjacent intermediate waypoint), the residuals are independently statistically normalized to obtain clean data for the diffusion model. That is, the refined residuals after normalization:
[0136]
[0137] Where j represents the index of the point. , These are the mean and variance of the neural network obtained statistically from the training set.
[0138] Using multi-step Markov diffusion, Gradually add noise to Gaussian noise The noise intensity is adjusted using offset cosine modulation to ensure smooth decay of geometric details. Through this training phase, the neural network learns how to... Gradually add noise to Gaussian noise In the subsequent reverse solution process, the neural network can obtain the result from the Gaussian noise. .
[0139] During the training phase, point clouds from the training samples are utilized. ,starting point ,end And the corresponding actual trajectory Supervised learning is then conducted. First, the point cloud is... ,starting point and the end point Input stage 1 obtains the coarse baseline path of the corresponding sample. Subsequently, the intermediate waypoint sequences, excluding the start and end points, are extracted from the actual trajectory and the coarse baseline path, respectively, and denoted as... and The difference between the two is calculated as the refined residual. Furthermore, the refined residuals are statistically normalized at each time step to obtain clean residual samples. Under this premise, the random sampling diffusion step and sampling with Gaussian noise of the same dimension According to the forward diffusion relationship
[0140]
[0141] Construct the first The noisy refined residuals are then used to establish the relationship between the refined residuals and the noise variables. The correspondence between them; during training, the neural network learns the noisy refined residual under the constraints of point cloud, start and end points, and coarse baseline path. Restore clean residual Or its equivalent noise characterization.
[0142] Operation 4. Diffusion Denoising Network Structure (Appendix) Figure 3 (in the "Denoising Transformer")
[0143] (1) Input information stream, including the following parameters:
[0144] o Noise status (The initial noise sequence here is an arbitrary Gaussian noise sequence generated directly): represents the residual sequence at the current time step;
[0145] o baseline intermediate trajectory : Encodes the baseline feature sequence through self-attention;
[0146] o Environmental point cloud : Encoded into local-global hybrid environment features by a point cloud encoder (PointNet++);
[0147] o condition vector : Reflects the relative position and distance between the start and end points;
[0148] o diffusion time step embedding This is used to inform the neural network which (time) step it is currently in the denoising process.
[0149] (2) Multi-stream attention fusion
[0150] o Self-attention is applied to the noisy residual sequence to ensure the smoothness of the trajectory in the time dimension;
[0151] o Perform cross-attention on the baseline features (specifically, perform cross-attention between the trajectory features currently being denoised (as the Query) and the baseline features (as the key vector and value vector) to ensure that the refined residuals follow the coarse path topologically and do not cross different homotopy classes;
[0152] o Perform cross-attention on point cloud features (specifically, perform cross-attention between the trajectory features currently being denoised (as the Query) and the point cloud features (as the Key and Value) to enable local residuals to gravitate around the building surface or street valley boundary, thereby improving safety margin.
[0153] (3) Adaptive layer normalization conditional modulation
[0154] o Utilizing adaptive layer normalization, by Generate scaling and translation parameters to conditionally modulate intermediate features of the Transformer, enabling joint control of time, task, and environment.
[0155] (4) v-parameterization and objective function
[0156] The denoising network does not directly predict noise or clean residuals, but rather predicts... ,
[0157] in, The denoising network is in the first... The predicted target at each time step, Indicates the diffusion time step (from arrive ), It is the first The cumulative noise figure under step cosine scheduling, This is the actual Gaussian noise sampled during this noise addition step. It is different from the directly predicted noise. Or clean sample Unlike others, v-parameterization uses
[0158]
[0159] As a monitoring target. On the other hand, the forward diffusion process satisfies
[0160]
[0161] therefore, , , and The relationships between them do not need to be learned separately, but are determined by the same forward noise addition formula during the construction of the training data: first by... and Constructing noisy samples Then by Calculate the corresponding monitoring signal In obtaining network predictions Then, it can also be combined with the current noisy state. Directly parse and recover the corresponding :
[0162]
[0163] That is, in the prediction Then, it can be combined with the noisy samples at the current moment. Directly restore No additional learning required from arrive The mapping.
[0164] During training, Min-SNR weighted L1 loss is used, and endpoint constraint loss and overall trajectory consistency loss are added to explicitly suppress endpoint drift of long sequences.
[0165] (5) Trajectory reconstruction during the sampling stage
[0166] o from noise via DDIM sampler The above was obtained through iteration. Then to Then, inverse normalization is performed to obtain the refined residuals. .
[0167] The o-shaped line is superimposed on the thick baseline, and the first and last points are joined together to obtain the original output path:
[0168]
[0169] Operation 5. Related operations performed by the kinematics-aware geometry pre-guided submodule:
[0170] To avoid the proliferation of physically unexecutable trajectories generated solely from data distribution, this embodiment modifies the current predicted trajectory in each sampling iteration. The mechanism of introducing geometric guidance based on kinematic perception is as follows:
[0171] (1) Geometric-kinematic mapping
[0172] The tangent vector is obtained by the difference between adjacent waypoints. Curvature estimated based on bending angle and arc length and using reference speed Estimate lateral acceleration. This is the speed scaling factor, used to scale the maximum speed down to a safe, smooth reference speed:
[0173]
[0174] o Determined by the altitude difference between adjacent waypoints Estimating the local climb ratio with the section length This leads to the equivalent climb rate requirement. .
[0175] (2) Irregularity detection and partial correction
[0176] oIf If the turn is too sharp at that point, the weight is calculated based on the degree of exceeding the limit. The greater the degree of exceeding the limit, the greater the weight, and the point is moved to the midpoint between its preceding and following waypoints. Directional translation reduces local curvature;
[0177] oIf If the height is reduced along the z-direction, the height will be contracted towards the median height of adjacent points, thus reducing the climbing / descending slope.
[0178] (3) Global Laplace Smoothing
[0179] o Perform Laplace smoothing on all intermediate waypoints over several iterations:
[0180] The smoothing coefficient (0 < βsmooth < 1) means that the larger the value, the closer the waypoint is to the mean of adjacent waypoints (the smoother it is); the smaller the value, the more the original waypoint position is preserved.
[0181] After each smoothing cycle, the first and last points are forcibly restored to their original values. and To avoid boundary drift.
[0182] (4) Write back the residual
[0183] The corrected trajectory is then converted back to residual form and used as the initial value for the next diffusion time step (a step update), so that the final trajectory is as close as possible to the kinematically feasible region before entering the safety assurance module.
[0184] In addition, related embodiments of the present invention also provide operations related to the security module.
[0185] While the aforementioned pre-guidance can significantly improve the kinematics of the trajectory, it still cannot provide a rigorous theoretical safety guarantee. Therefore, this embodiment employs a safety assurance module to... Perform final projection and time reparameterization.
[0186] 1. Geometric Correction: Collision Projection + Laplacian + Midpoint Traction
[0187] (1) Collision detection and projection
[0188] o Perform point-by-point detection of intermediate waypoints and obstacle aggregation The distance, when the distance is less than the safety margin Or when the point is inside an obstacle, for example, when calling a projection function / operator. Change the position of the intermediate waypoint and project it onto the safe boundary surface outside the obstacle along the shortest distance direction.
[0189] (2) Homotopy-preserving Laplace smoothness
[0190] o While keeping the initial and final points fixed, intermediate waypoints are calculated using coefficients. To perform Laplace smoothing, refer to the smoothing methods described above. This allows the path to automatically shrink towards the geodesic in a geometric sense while maintaining the topology around obstacles, thereby shortening the path and eliminating jagged edges.
[0191] (3) Midpoint safety traction
[0192] o for the midpoint of each segment between every two waypoints Perform collision detection; if the midpoint is inside the obstacle or the distance is less than... Then it is projected onto the safety surface. And can correspondingly direct the two adjacent endpoints toward The direction is adjusted to achieve a surface-fitting effect by pulling the endpoints with the midpoint, which can effectively eliminate the wall-penetrating and tunneling problems caused by discrete sampling.
[0193] After multiple iterations, a geometrically perfect obstacle-avoiding and smooth spatial path is obtained.
[0194] 2. Time allocation and iterative recalibration
[0195] After obtaining a geometrically safe path, time still needs to be allocated to each segment so that the trajectory meets the kinematic limits of the UAV platform in terms of speed, acceleration, climb rate, and yaw rate.
[0196] (1) Initial time allocation based on first-order constraints
[0197] o For each segment between every two intermediate waypoints Calculate the time required to satisfy the following three constraints based on the segment length, vertical displacement, and directional rotation angle:
[0198] Time required for a speed-constrained flight segment: ;
[0199] Time required for vertical displacement under climb rate constraint: ;
[0200] Time required for directional turn under yaw rate constraints:
[0201] , It is the steering redundancy coefficient (safety / dynamic compensation).
[0202] The maximum value among the three is taken as the initial time for this period. This ensures that the first-order constraints (velocity constraints) are not violated.
[0203] (2) Iterative amplification based on second-order constraints (acceleration constraints)
[0204] o Calculate segment speed from initial time And use finite difference to estimate acceleration
[0205]
[0206] If the magnitude (i.e., absolute value) of acceleration at a certain point is found. Then calculate the scaling factor.
[0207]
[0208] Multiply the relevant time period by A uniform amplification is performed to reduce the required acceleration.
[0209] Repeat the detection and amplification process until all points satisfy the acceleration constraint or the maximum number of iterations is reached, thus obtaining the final time series. The absolute times for each waypoint are then summed. .
[0210] The final output spacetime trajectory Theoretically, this simultaneously satisfies the following: the distance from any point to the surface of any obstacle is not less than the safety margin. For any segment and any waypoint, the speed, acceleration, rate of climb, and yaw rate shall not exceed the platform's preset limits.
[0211] In the above embodiments, the following typical parameter settings can be used.
[0212] 1. Typical parameters in the embodiments
[0213] In a typical embodiment, the following parameters may be used (for example only, not as a limitation):
[0214] • Workspace size: 100 m × 100 m × 40 m;
[0215] Permissible flight altitude: 5–35 m;
[0216] • Number of point cloud samples: 4096;
[0217] • Number of discrete points on the trajectory: T = 64;
[0218] Maximum speed of drones m / s, maximum acceleration m / s 2 Maximum climb rate m / s, maximum yaw rate rad / s;
[0219] • The topological prior network and diffusion model use the AdamW optimizer with weight decay. The learning rate uses a cosine annealing strategy, with 150,000 training and validation samples.
[0220] 2. Quantitative comparison with existing technologies
[0221] In the simulated urban environment described above, 100 different start-end point scenarios were selected. Under the same computing resources, comparative experiments were conducted on the method of this invention, the method using only topological prior networks, and the classic A* and RRT* algorithms. The main indicators included computation time, path length, kinematic feasibility, and obstacle avoidance success rate. The experimental results are shown in the table below:
[0222] *Note: Data are mean ± variance.
[0223] As can be seen from the table:
[0224] 1. Significantly improved safety
[0225] While traditional search methods (A*, RRT*) can achieve 100% obstacle avoidance, they completely disregard the kinematic constraints of the drone, resulting in a kinematic feasibility rate of 0%.
[0226] Although the method using only the topological prior network (without using the residual diffusion denoising refiner and security guarantee module proposed in this invention) has a faster inference speed, there are still risks such as crossing obstacles or being tangent to buildings in 36% of the scenarios.
[0227] After introducing the residual diffusion refinement and safety assurance module, this invention achieved a 100% obstacle avoidance success rate and a 100% kinematic feasibility rate in all test scenarios.
[0228] 2. Balancing path quality and efficiency
[0229] The average path length generated by this invention is approximately 100.51 m, which is about 7% shorter than A* and about 25% shorter than RRT*, indicating that a shorter path closer to the geodesic can be obtained through residual space learning and geometric contraction in the security module.
[0230] Despite the introduction of diffusion and safety post-processing, under the same computing environment, the average computation time of this invention is approximately 524.81 ms, which is much lower than RRT*'s approximately 34 s and also lower than A*'s 578.58 ms, meeting the real-time requirements of most urban air traffic missions.
[0231] All the steps, methods and functions disclosed in this article can be implemented by means of functional units or modules in one or more computing devices, a typical example of which is an aircraft control device.
[0232] Specifically, the aircraft control unit may have a built-in processor and a memory for storing executable instructions. When the processor retrieves and executes the relevant instructions in the memory, it can drive the control unit to perform the functions described in the embodiments of the present invention.
[0233] Furthermore, each functional unit in the computing device can be implemented by a processing circuit. This circuit can integrate one or more microprocessors, microcontrollers, or other digital hardware such as digital signal processors (DSPs) and dedicated digital logic. The core task of this processing circuit is to be configured to execute program code stored in memory. The memory can be one or more types such as read-only memory (ROM), random access memory (RAM), cache memory, flash memory, or optical memory. The program code stored therein contains not only instructions for executing communication protocols, but more importantly, specific instructions for implementing the advanced technologies described herein. In specific embodiments, the processing circuit drives the corresponding functional unit to perform its preset function in this way.
[0234] In this technical context, the term "unit" should be interpreted broadly. It can refer to physical entities, such as electrical and electronic circuits, equipment, modules, and logic solid-state devices; it can also refer to non-physical entities, such as computer programs or instruction sets written to perform the various tasks, processes, calculations, and output functions described herein.
[0235] Furthermore, it should be understood that the specific network structures, attention mechanism implementations, encoder and decoder layer settings, multi-head attention partitioning, feedforward neural network structures, positional encoding methods, normalization processing, activation function selection, parameter initialization, and training optimization details of various neural networks, topological prior networks, Transformer networks, and diffusion networks described in this paper can all adopt the implementation structures and training methods of various neural networks, topological prior networks, Transformer networks, and diffusion networks known in the art. Those skilled in the art can make conventional selections and settings according to actual application scenarios without creative effort based on the existing publicly available technologies. Therefore, this paper will not elaborate on the internal implementation details of the aforementioned neural networks one by one.
Claims
1. A UAV trajectory planning method based on topological priors and residual diffusion, characterized in that, The method includes: Environmental perception and preprocessing; Generate a straight baseline for the drone's trajectory; Based on the topological prior network, a first residual sequence of intermediate waypoint positions is generated to adjust the UAV trajectory, which is then superimposed on the straight baseline of the trajectory to obtain a coarse path. Based on the diffusion denoising network, a second residual sequence for noise removal is generated, which is superimposed with the coarse path to obtain the fine path; For fine-grained paths, spatial and temporal safety checks are performed to provide the final path; The environmental perception and preprocessing includes: Collect sparse point cloud data of the three-dimensional environment in which the drone's trajectory is located. The point cloud includes points representing building surfaces and points representing the ground. Model the set of obstacles, representing static obstacles such as buildings as axis-aligned bounding boxes or the union of axis-aligned bounding boxes; Transform the starting and ending coordinates of the drone to the standard coordinate system of the three-dimensional environment, and normalize the scale of the coordinates; The straight baseline for generating the drone trajectory includes: Ignoring obstacles, linear interpolation is performed on the straight line between the drone's starting point and ending point to generate a straight baseline path containing a fixed number of intermediate waypoints; The entire straight baseline path is broken down into: the UAV's starting point, ending point, and intermediate waypoint sequence; The spatial safety check for fine-grained paths includes iteratively performing the following operations: Move intermediate waypoints that are less than the safety margin from obstacles or that are inside obstacles to the safety boundary surface outside obstacles; Laplace smoothing is applied to the sequence of intermediate waypoints; For each segment between two intermediate waypoints, the midpoint is detected, and the midpoints that are less than the safety margin from the obstacle or are located inside the obstacle are projected onto the safety boundary surface outside the obstacle. The intermediate waypoints at both ends of the midpoint are adjusted towards the safety boundary surface. The time safety checks for fine-grained paths include: Adjust the flight time for each segment between every two intermediate waypoints to meet speed and acceleration constraints.
2. The UAV trajectory planning method according to claim 1, in, The topological prior network is trained using multiple sample data, and each sample data contains at least: input conditions including sparse point cloud data of the three-dimensional environment in which the UAV trajectory is located, and output results including at least the first residual sequence data; The diffusion denoising network generates a second residual sequence from Gaussian noise based on a reverse diffusion process, and the forward diffusion process corresponding to the reverse diffusion process for training the diffusion denoising network includes: a process of diffusion from the real residual sequence data between the real trajectory and the coarse path to Gaussian noise. Among them, the generation of a second residual sequence for noise removal based on the diffusion denoising network, which is superimposed with the coarse path to obtain the fine path, includes: performing kinematic correction in each diffusion time step processing; The kinematic corrections include: Move intermediate waypoints where the lateral acceleration is greater than a set threshold to reduce the local curvature of the path at those waypoints. Move the position of intermediate waypoints where the climb / descent speed is greater than the set threshold, in order to reduce the climb / descent speed at the intermediate waypoints; The kinematically corrected data is used as the initial value for the next diffusion time step.
3. The UAV trajectory planning method according to claim 1 or 2, in, In the aforementioned topological prior network, a four-layer hierarchical PointNet++ encoder is used to extract features from the point cloud in a fine-to-coarse manner, and then a four-layer coarse-to-fine Transformer decoder is used to obtain the first residual sequence. Among them, the coarse-to-fine Transformer decoder uses cross-attention; The topological prior network performs the following operations: hierarchical multi-scale sampling and local neighborhood feature aggregation are performed on the point cloud in the relative starting coordinate system to obtain environmental features at multiple scales; the state context formed by the starting point, the ending point and their relative distance is injected into the intermediate waypoint query sequence; cross-attention decoding is performed on the environmental features at multiple scales in order from coarse to fine scale, and the first residual sequence used to correct the straight baseline is output.
4. The UAV trajectory planning method according to claim 1 or 2, in, The diffusion denoising network uses time steps for step updates and employs self-attention and cross-attention. In this process, the diffusion denoising network first performs self-attention processing on the current trajectory features at each diffusion time step, then performs cross-attention processing on the baseline path features and the point cloud environment features respectively, and modulates the feature transformation based on the time step embedding to output the update result of the second residual sequence.
5. The UAV trajectory planning method according to claim 1 or 2, in, In the diffusion denoising network, before diffusion sampling begins, the key vector and value vector required for each denoising layer across attention are pre-calculated for the point cloud conditional features that remain unchanged at each diffusion time step; at each diffusion time step, the query vector is calculated only based on the current trajectory features, and the key vector and value vector are reused to complete the cross-attention calculation.
6. A drone trajectory planning device, comprising: processor, and Memory used to store executable instructions; When the processor retrieves and runs the executable instructions stored in the memory, the UAV trajectory planning device executes the UAV trajectory planning method based on topological prior and residual diffusion according to any one of claims 1 to 5.