Obstacle avoidance path planning method, system, device and medium for unmanned aerial vehicle
By constructing the relative motion relationship between the UAV and dynamic obstacles and using reinforcement learning algorithms, the problem of insufficient accuracy in UAV obstacle avoidance path planning was solved, and high-precision and stable obstacle avoidance path planning was achieved in complex dynamic environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing UAV obstacle avoidance path planning methods suffer from insufficient path planning accuracy in complex dynamic environments. In particular, the failure to effectively integrate UAV dynamic constraints with kinematic prediction models and obstacle maneuvering states leads to deviations between the planning results and the actual executable trajectories. Furthermore, traditional multi-index fixed-weight evaluation mechanisms are difficult to dynamically adjust decision preferences, resulting in path oscillations or insufficient safety margins.
By establishing the real-time relative motion relationship between the UAV and dynamic obstacles, evaluation values for heading deviation, obstacle distance, and trajectory fit are constructed. Combined with reinforcement learning algorithms, the evaluation weights are dynamically adjusted to generate reference trajectories that meet the dynamic constraints of the UAV, thereby achieving precise discrimination and trajectory quality evaluation in multi-obstacle conflict scenarios.
It improves the accuracy and stability of obstacle avoidance path planning for UAVs in complex and dynamic environments, enhances the flexibility and global optimality of obstacle avoidance decisions, and ensures the safety and smoothness of path selection.
Smart Images

Figure CN122149470A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous flight technology, and in particular to obstacle avoidance path planning methods, systems, devices and media for unmanned aerial vehicles (UAVs). Background Technology
[0002] With the widespread application of unmanned aerial vehicles (UAVs) in military reconnaissance, logistics delivery, power line inspection, and emergency rescue, their autonomous flight capability in complex dynamic environments has become one of the core key technologies. Especially in scenarios with randomly maneuvering obstacles, UAVs not only need to perceive environmental changes in real time, but also need to quickly generate obstacle avoidance paths that balance safety, efficiency, and smoothness while satisfying their own dynamic constraints. Therefore, it is necessary to propose a UAV obstacle avoidance path planning method that can adapt to dynamic environmental changes, possess predictive capabilities, and achieve adaptive optimization, in order to improve the real-time autonomous obstacle avoidance capability and path planning reliability of UAVs in complex dynamic scenarios.
[0003] However, existing UAV obstacle avoidance path planning methods generally suffer from insufficient accuracy when dealing with complex environments containing dynamic, unknown, and randomly maneuvering obstacles. Specifically, some methods fail to establish accurate motion models based on the relative positions and velocities of the UAV and dynamic obstacles, lacking predictive control mechanisms that can reflect the actual movement trends of obstacles, resulting in inconsistencies between the generated obstacle avoidance direction and the actual risk evolution. Furthermore, traditional local planning methods fail to effectively integrate UAV dynamic constraints and kinematic prediction models when generating candidate trajectories, leading to discrepancies between the planning results and the actual executable trajectories. In addition, existing trajectory evaluation mechanisms often employ fixed-weight multi-index weighting, failing to dynamically adjust decision preferences based on environmental complexity and obstacle maneuvering states. This can easily lead to directional deviations, path oscillations, or inaccurate safety margin judgments in multi-obstacle conflict scenarios, further reducing the accuracy of path selection. Summary of the Invention
[0004] This invention provides a method, system, device, and medium for obstacle avoidance path planning for unmanned aerial vehicles (UAVs), which can improve the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments.
[0005] In a first aspect, embodiments of the present invention provide an obstacle avoidance path planning method for an unmanned aerial vehicle (UAV), comprising: Acquire the first position and first motion state of the drone, as well as the second position and second motion state of each dynamic obstacle; The corrected acceleration of the UAV is calculated based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the corrected acceleration, and the reference trajectory of the UAV is determined according to the correction result. Based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position, the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory are determined. Based on the heading deviation evaluation value, the obstacle distance evaluation value, the trajectory fit evaluation value, and each evaluation weight, the trajectory evaluation value of the UAV is calculated. Based on the trajectory evaluation value, the target obstacle avoidance trajectory is determined to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the speed of the UAV into a preset UAV kinematic model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
[0006] This invention establishes real-time relative motion relationships between the UAV and various dynamic obstacles, enabling the path planning process to make decisions based on real-world environmental dynamic information. This provides a reliable data foundation for subsequent accurate modeling and control, improving the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments. By obtaining a reference trajectory for the UAV, which reflects the motion trends and maneuverability of dynamic obstacles, it achieves forward-looking trajectory generation based on relative motion prediction, further enhancing the accuracy of obstacle avoidance path planning in complex dynamic environments. Finally, by ensuring that the generated trajectory satisfies the UAV's own dynamic constraints, it guarantees consistency between the planning results and actual flight control capabilities. This improves the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments. By quantitatively evaluating candidate trajectories from multiple dimensions such as directional consistency, safety margin, and trajectory smoothness, it enables precise judgment of trajectory quality in multi-obstacle conflict scenarios, thereby improving the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments. By dynamically adjusting the evaluation weights based on reinforcement learning algorithms, the trajectory evaluation mechanism can adaptively change decision preferences according to the complexity of the environment and the maneuverability of obstacles, achieving a dynamic balance between safety and efficiency, avoiding path oscillations or misjudgments caused by fixed weights, and thus improving the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments.
[0007] Furthermore, the step of determining the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position includes: The target azimuth angle is calculated based on the coordinates of the endpoint of each candidate trajectory and the target point position, and the difference between the target azimuth angle and the heading angle of the endpoint of each candidate trajectory is calculated, so as to determine the heading deviation evaluation value corresponding to each candidate trajectory based on the difference. Extract several discrete trajectory points from each candidate trajectory, calculate the Euclidean distance between each discrete trajectory point and each second position to obtain each first distance value, and filter the minimum value of each first distance value to determine the obstacle distance evaluation value corresponding to each candidate trajectory based on the minimum value; Calculate each second distance value between each discrete trajectory point and the corresponding reference point in the reference trajectory, and calculate the average value of each second distance value, so as to determine the trajectory fit evaluation value corresponding to each candidate trajectory based on the average value.
[0008] This invention constructs heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value respectively, and quantitatively evaluates candidate trajectories from three dimensions: target approach, obstacle avoidance safety, and trajectory smoothness consistency. This achieves a comprehensive multi-factor measurement of candidate trajectories, improves the rationality and stability of trajectory selection, and thus enhances the obstacle avoidance safety and path planning accuracy of UAVs in dynamic environments.
[0009] Furthermore, each of the evaluation weights is dynamically adjusted based on a reinforcement learning algorithm, including: A state space for reinforcement learning is constructed based on the first position, the first motion state, each of the second positions, and each of the second motion states. Based on the state space, the preset continuous weight action space, and the preset reward function, a preset reinforcement learning algorithm is used to perform iterative optimization of the strategy with the goal of maximizing the expected cumulative value of the reward function, thereby determining the dynamic adjustment strategy for each evaluation weight.
[0010] This invention introduces a reinforcement learning algorithm to dynamically and adaptively adjust the evaluation weights, enabling the weight allocation to be optimized in real time as the environmental state changes. This improves the adaptability of the trajectory evaluation mechanism to complex dynamic scenarios, enhances the flexibility and global optimality of obstacle avoidance decisions, and improves the safety and stability of UAV path planning.
[0011] Furthermore, the step of correcting the first motion state based on the corrected acceleration to determine the reference trajectory of the UAV based on the correction result includes: The corrected acceleration is decomposed directionally to obtain the first acceleration component and the second acceleration component of the UAV along the heading direction; The speed of the UAV is updated based on the first acceleration component to obtain the target speed; The heading angle change rate is calculated based on the velocity vector direction of the second acceleration component and the target velocity, and the heading angle of the UAV is updated by discrete integration based on the heading angle change rate to obtain the target heading angle, wherein the first motion state includes the velocity and the heading angle; The reference trajectory of the UAV is determined based on the target speed and the target heading angle.
[0012] This invention decomposes the corrected acceleration into a heading and applies it to the velocity and heading angle respectively, thereby achieving decoupled updates of the UAV's motion state. This makes speed adjustment and direction adjustment more coordinated and smooth, thereby improving the continuity and executability of reference trajectory generation and enhancing the stability and control accuracy of UAV path planning in dynamic environments.
[0013] Furthermore, the calculation of the corrected acceleration of the UAV based on the first position, the first motion state, each of the second positions, and each of the second motion states includes: Calculate the relative coordinates between the first position and each of the second positions, and determine the relative displacement components between the UAV and each dynamic obstacle based on the relative coordinates; The relative velocity components between the UAV and each dynamic obstacle are calculated based on the velocity and heading angle in the first motion state and each of the second motion states, and the angle between the UAV and each dynamic obstacle is determined based on the relative velocity components and the relative displacement components. The corrected acceleration of the UAV is calculated based on each of the relative displacement components, each of the relative velocity components, each of the included angles, and a preset proportional guidance coefficient.
[0014] This invention constructs a proportional guidance correction mechanism based on the relative displacement components, relative velocity components, and their angular relationship between the UAV and dynamic obstacles. This mechanism enables the correction acceleration to accurately reflect the movement trend and potential collision risk of the obstacles, thereby improving the foresight and accuracy of obstacle avoidance direction calculation and enhancing the accuracy and safety of UAV path planning in complex dynamic environments.
[0015] Furthermore, each of the candidate trajectories is obtained by predicting the trajectory by inputting the speed of the UAV into a preset UAV kinematic model, including: Within the preset feasible speed space of the drone, the speed of the drone is discretized and sampled to obtain several sets of speed pairs; Each of the aforementioned velocity pairs is input into a preset UAV kinematics model to update the UAV's pose parameters by discrete integration within a preset prediction time window, thereby obtaining a corresponding discrete trajectory point sequence, and determining each of the aforementioned candidate trajectories based on each of the aforementioned discrete trajectory point sequences.
[0016] This invention provides a method for discretizing and sampling the speed of a UAV within a feasible speed space, and then using a kinematic model to predict and generate candidate trajectories. This ensures that the generated trajectories meet the dynamic constraints of the UAV and are feasible, thereby improving the real-time performance and feasibility of trajectory planning and enhancing the UAV's local path search capability in complex environments.
[0017] Furthermore, determining the target obstacle avoidance trajectory based on the trajectory evaluation value to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory includes: The heading deviation evaluation value, the obstacle distance evaluation value, and the trajectory fit evaluation value are normalized respectively to obtain normalized heading index, normalized distance index, and normalized fit index. Based on the preset path smoothing coefficient and each of the evaluation weights, the normalized heading index, the normalized distance index and the normalized fit index are weighted and summed to obtain the trajectory evaluation value corresponding to each of the candidate trajectories. The trajectory evaluation values are compared, and the candidate trajectory corresponding to the maximum value of the trajectory evaluation value is taken as the target obstacle avoidance trajectory, so as to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory.
[0018] This invention normalizes each evaluation value and combines it with path smoothing coefficient and dynamic evaluation weight for weighted fusion, thereby achieving a unified dimensional comprehensive evaluation of candidate trajectories. This improves the stability and rationality of trajectory optimization results, ensures that the selected target obstacle avoidance trajectory achieves a balance between safety, proximity and continuity, and enhances the reliability and smoothness of UAV obstacle avoidance flight.
[0019] Secondly, embodiments of the present invention provide an obstacle avoidance path planning system for unmanned aerial vehicles (UAVs), characterized in that the system includes: an acquisition module, a correction module, and an obstacle avoidance module; The acquisition module is used to acquire the first position and first motion state of the UAV, as well as the second position and second motion state of each dynamic obstacle; The correction module is used to calculate the correction acceleration of the UAV based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the correction acceleration, and determine the reference trajectory of the UAV based on the correction result. The obstacle avoidance module is used to determine the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position. It then calculates the trajectory evaluation value of the UAV based on the heading deviation evaluation value, obstacle distance evaluation value, trajectory fit evaluation value, and each evaluation weight. Finally, it determines the target obstacle avoidance trajectory based on the trajectory evaluation value, driving the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the UAV's speed into a preset UAV kinematics model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
[0020] This invention, through the construction of a functional system including an acquisition module, a correction module, and an obstacle avoidance module, achieves modular processing of environmental information perception, correction acceleration calculation, and comprehensive evaluation and selection of candidate trajectories. It combines proportional guidance prediction mechanism with reinforcement learning weight adaptive optimization, thereby improving the real-time obstacle avoidance decision-making capability and path planning accuracy of UAVs in complex dynamic environments.
[0021] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the obstacle avoidance path planning method for the UAV as described in this application.
[0022] Fourthly, embodiments of the present invention provide a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device or system where the computer-readable storage medium is located to perform the obstacle avoidance path planning method for a drone as described in this application.
[0023] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0024] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating one embodiment of the obstacle avoidance path planning method for unmanned aerial vehicles provided in this application; Figure 2 This is a flowchart illustrating steps S201 to S204 provided in this application; Figure 3 This is a flowchart illustrating steps S301 to S303 provided in this application; Figure 4 This is a flowchart illustrating the drone obstacle avoidance path planning method provided in this application; Figure 5This is a schematic diagram of an embodiment of the obstacle avoidance path planning method for unmanned aerial vehicles provided in this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0028] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0030] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0031] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0032] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0033] With the widespread application of drones in military reconnaissance, logistics delivery, power line inspection, and emergency rescue, their autonomous obstacle avoidance capability in complex dynamic environments has become a key technology. However, in scenarios with randomly maneuvering obstacles, existing path planning methods generally suffer from insufficient accuracy: on the one hand, they lack predictive motion modeling based on the relative position and velocity of the drone and dynamic obstacles, making it difficult to accurately reflect the risk evolution trend; on the other hand, some methods fail to effectively integrate dynamic constraints and kinematic prediction models, resulting in deviations between the planned trajectory and the actual executable trajectory; at the same time, traditional multi-index fixed-weight evaluation mechanisms are difficult to dynamically adjust decision preferences according to the complexity of the environment, and are prone to path oscillation, insufficient safety margin, or inaccurate direction selection in multi-obstacle conflict scenarios, thus affecting the accuracy and reliability of obstacle avoidance path planning for drones in complex dynamic environments.
[0034] See Figure 1 In order to improve the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments, an embodiment of the present invention provides an obstacle avoidance path planning method for UAVs, including steps S101 to S103. Step S101: Obtain the first position and first motion state of the drone, as well as the second position and second motion state of each dynamic obstacle; In some embodiments, the first position of the drone is the drone at the current moment. Spatial position coordinates in the global coordinate system. Under two-dimensional planar modeling conditions, the first position can be represented as... Under three-dimensional spatial modeling conditions, it can be represented as The location data can be obtained through the fusion positioning results of Global Navigation Satellite System (GNSS), Inertial Measurement Unit (IMU), and barometer, or calculated through visual odometry and lidar positioning algorithms. The first motion state is used to characterize the current kinematic state information of the UAV, including but not limited to the UAV's linear velocity. angular velocity Heading angle And linear acceleration information. In some implementations, linear velocity can be obtained from GPS velocity measurement results or visual velocity estimation results, angular velocity is obtained from the gyroscope output in the inertial measurement unit, and heading angle is obtained by fusing gyroscope and magnetometer data using an attitude calculation algorithm. To ensure data stability, the first motion state can be fused and filtered using an extended Kalman filter (EKF). For each dynamic obstacle, the second position is the spatial coordinate information of each obstacle at the current moment, denoted as... or ,in Indicates the first There is one obstacle. The second motion state includes the magnitude of the obstacle's velocity. , direction angle of motion and acceleration Isokinetic parameters.
[0035] In some embodiments, the position and motion state information of dynamic obstacles are acquired through environmental perception sensors such as airborne LiDAR, millimeter-wave radar, and visual cameras. First, obstacle targets are identified using a target detection algorithm. Then, a multi-target tracking algorithm (such as Kalman filtering or extended Kalman filtering) is used to estimate the state of the obstacle's historical trajectory, obtaining its velocity and acceleration information. If only position data is available for the obstacle, the velocity vector can be calculated using the position difference between adjacent time points, and its acceleration can be further estimated using the velocity difference. In this embodiment, to facilitate subsequent proportional guidance and optimal control calculations, the relative motion quantities between the UAV and each dynamic obstacle are further constructed, including relative displacement vectors and relative distances. Relative velocity vector and line of sight The relative distance is calculated from the Euclidean distance between the UAV and the corresponding obstacle, and the relative speed is the difference between the UAV's velocity vector and the obstacle's velocity vector.
[0036] Through the above steps, it is possible to acquire and fuse information on the UAV's own motion state and the motion of dynamic obstacles in real time, and to construct the relative motion relationship between the UAV and each obstacle. This provides an accurate environmental and state basis for subsequent acceleration correction calculations and proportional guidance predictions, thereby improving the accuracy of obstacle avoidance decisions and the reliability of path planning for UAVs in complex dynamic environments.
[0037] Step S102: Calculate the corrected acceleration of the UAV based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the corrected acceleration, and determine the reference trajectory of the UAV based on the correction result. In some embodiments, calculating the corrected acceleration of the UAV based on the first position, the first motion state, each of the second positions, and each of the second motion states includes: calculating the relative coordinates between the first position and each of the second positions to determine the relative displacement components between the UAV and each dynamic obstacle based on the relative coordinates; calculating the relative velocity components between the UAV and each dynamic obstacle based on the velocity and heading angle in the first motion state and each of the second motion states, and determining the angle between the UAV and each dynamic obstacle based on the relative velocity components and the relative displacement components; and calculating the corrected acceleration of the UAV based on each of the relative displacement components, each of the relative velocity components, each of the angles, and a preset proportional guidance coefficient.
[0038] In some embodiments, the relative coordinates between the first position and each of the second positions are calculated to determine the relative displacement components between the UAV and each dynamic obstacle based on the relative coordinates. Specifically, this involves establishing a two-dimensional Cartesian coordinate system and performing geometric modeling of the UAV and the dynamic obstacles. Let the UAV at its current moment... The first position is , No. The second position of the dynamic obstacle is The relative displacement component between the drone and the dynamic obstacle is defined as follows: , ,in, This represents the displacement component of the obstacle relative to the UAV in the x-axis direction; Let be the displacement component of the obstacle relative to the drone in the y-axis direction. Further, the relative distance between the drone and the obstacle is defined as: ,in, This represents the Euclidean distance between the drone and the obstacle. It is a function of time. Based on geometric relationships, the line-of-sight angle (LOS angle) between the drone and the obstacle is denoted as... The triangular relationship satisfies: ,in, The line-of-sight angle between the UAV and the obstacle is defined; this angle serves as the fundamental geometric parameter for proportional guidance calculations. Through the aforementioned relative coordinate calculations, a geometric relationship model between the UAV and the obstacle is constructed, providing the basic geometric quantities for subsequent proportional guidance acceleration calculations.
[0039] In some embodiments, the relative velocity components between the UAV and each dynamic obstacle are calculated based on the velocity and heading angle in the first motion state and each of the second motion states, and the angles between the UAV and each dynamic obstacle are determined based on the relative velocity components and the relative displacement components. Specifically, let the UAV velocity be... The heading angle is The speed of the obstacle is The direction angle of motion is The relative velocity vector between the drone and the obstacle is defined as: Its size is recorded as follows: ,in, The relative speed between the drone and the obstacle; This indicates the relative motion tendency between the two. Furthermore, the relative motion angle is introduced. , defined as the angle between the relative velocity vector and the reference direction, is used to characterize the relative motion direction. Furthermore, the rate of change of the relative displacement components with time satisfies: ,in, Represents relative displacement components The derivative with respect to time; Let be the angle between the relative velocity direction and the reference direction. Furthermore, the rate of change of the line-of-sight angle satisfies: ,in, The obstacle avoidance vector angle; Let be the angle between the line of sight and the obstacle avoidance vector. By differentiating the geometric relationship over time and combining it with the above relationships, we can obtain the expression for the angular velocity of the obstacle avoidance vector: ; in, The obstacle avoidance vector angular velocity; This is the derivative of the relative distance with respect to time. The angle between the line of sight and the obstacle avoidance vector is defined. Through the above steps, the complete construction of the relative motion geometry between the UAV and the obstacle is achieved.
[0040] In some embodiments, the corrected acceleration of the UAV is calculated based on each of the relative displacement components, each of the relative velocity components, each of the included angles, and a preset proportional guidance coefficient. Specifically, this involves: first, calculating the traditional proportional guidance acceleration according to the proportional guidance law. The expression for proportional guidance acceleration is: ,in, For traditional proportional guidance command acceleration; This is the proportional guidance coefficient; The magnitude of the relative velocity; The obstacle avoidance vector angular velocity. The aforementioned... Substituting the expression, we get: In this scheme, the proportional guidance coefficient Adaptive adjustment based on obstacle maneuverability: ; in, Acceleration of the obstacle; , This represents the obstacle maneuverability threshold. Based on this, to overcome the problem that traditional proportional guidance does not consider distance and energy efficiency, an optimal control correction term is introduced to construct a unified optimal proportional guidance acceleration: ; in, The corrected unified optimal proportional guidance command acceleration; This is the distance-dependent step size gain; The angle between the relative velocity vector and the line-of-sight angle; This represents the relative distance between the drone and the obstacle. This correction term introduces a distance attenuation factor. This allows the drone to obtain greater corrective acceleration when approaching obstacles, thereby reducing control intensity when moving away from obstacles, thus improving energy utilization efficiency and miss distance control accuracy. The final corrective acceleration... This is used for subsequent updates to the drone's speed and heading, enabling the generation of smooth, safe, and energy-optimized obstacle avoidance trajectories.
[0041] Please refer to Figure 2 In some embodiments, the step of correcting the first motion state based on the corrected acceleration and determining the reference trajectory of the UAV based on the correction result includes: steps S201 to S204. Step S201: Decompose the corrected acceleration into directions to obtain the first acceleration component and the second acceleration component of the UAV along the heading direction; In some embodiments, due to corrected acceleration There is an angle between the direction and the current heading angle of the drone. To achieve component control of velocity and heading, the corrected acceleration needs to be decomposed directionally. Let... To correct the angle between the acceleration direction and the current heading angle, the acceleration component along the current heading direction is defined as the first acceleration component; the acceleration component perpendicular to the current heading direction, used to change the heading, is defined as the second acceleration component. The first acceleration component is: The second acceleration component is: ,in, Corresponding velocity increment direction component; Corresponding heading correction direction component; To correct the angle between the acceleration direction and the current heading angle, the above directional decomposition achieves functional decoupling of the unified optimal proportional guidance acceleration in both speed control and heading control directions.
[0042] Step S202: Update the speed of the UAV based on the first acceleration component to obtain the target speed; In some embodiments, the drone speed is updated using a discrete integral method. Let the current drone speed be... The sampling period is Then, based on the first acceleration component, the velocity is updated to obtain: ; in, The speed of the drone at the current moment; The updated target speed; This is the first acceleration component along the heading direction; This is to control the cycle time interval. Essentially, this update method involves performing a first-order discrete integral on the acceleration along the heading direction to obtain the velocity increment. In practical applications, the updated target velocity can also be limited by combining UAV hardware performance constraints (such as maximum thrust and maximum speed limits) to ensure that the control commands remain within the allowable range of the aircraft structure.
[0043] Step S203: Calculate the heading angle change rate based on the velocity vector direction of the second acceleration component and the target velocity, and update the heading angle of the UAV by discrete integration based on the heading angle change rate to obtain the target heading angle, wherein the first motion state includes the velocity and the heading angle; In some embodiments, the UAV heading control is implemented using a vector synthesis method. Let the UAV heading angle at the current moment be... Then the heading angle update formula is: ; in, This is the current heading angle; The updated target heading angle; This is the second acceleration component; This represents the current speed of the drone. Essentially, it represents the rate of change of the heading angle. Therefore, the rate of change of the heading angle can be expressed as: Within the discrete control period, this rate of change is discretely integrated, i.e., multiplied by... The heading angle is updated. Through the above mechanism, the following is achieved: the first acceleration component controls the speed magnitude; the second acceleration component controls the heading rotation; thus completing the speed-heading coupled control under the unified optimal proportional guidance method. It should be noted that the first motion state includes the UAV's current speed. and heading angle The above update process is the dynamic update process of the first motion state.
[0044] Step S204: Determine the reference trajectory of the UAV based on the target speed and the target heading angle.
[0045] In some embodiments, in obtaining the target speed and target heading angle Then, the velocity vector direction of the UAV at the next moment can be constructed. Specifically: the target velocity determines the magnitude of the velocity vector; the target heading angle determines the direction of the velocity vector. Within the control cycle, the UAV moves along the updated heading direction at the target velocity, thus forming a continuous sequence of discrete trajectory points in space. By repeatedly executing the following within each control cycle: unified optimal proportional guidance correction acceleration calculation; acceleration direction decomposition; velocity discrete integral update; heading angle discrete integral update, a set of time-series trajectory points can be obtained, forming the UAV's reference trajectory. This reference trajectory has the following technical effects: inheriting the smoothness of the proportional guidance law; improving near-obstacle avoidance capability through distance-related correction terms; improving response accuracy to obstacles with different maneuverability through adaptive proportional guidance coefficient N; and achieving an optimal balance between energy consumption and miss distance. Thus, continuous reference trajectory generation of UAV based on the unified optimal proportional guidance method is realized, providing high-precision trajectory input for subsequent flight control execution systems.
[0046] Through the above steps, a complete relative motion geometric model between the UAV and dynamic obstacles is constructed. Based on proportional guidance, a distance-related correction term and a maneuverability adaptive proportional guidance coefficient are introduced to achieve accurate calculation and decoupled update of the correction acceleration, so that speed control and heading control are coordinated and consistent, thereby generating a continuous, smooth, energy-optimized, and safety-margin-controllable reference trajectory, improving the obstacle avoidance accuracy and stability of the UAV in complex dynamic environments.
[0047] Step S103: Based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position, determine the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory. Then, based on the heading deviation evaluation value, the obstacle distance evaluation value, the trajectory fit evaluation value, and each evaluation weight, calculate the trajectory evaluation value of the UAV. Based on the trajectory evaluation value, determine the target obstacle avoidance trajectory to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the UAV's speed into a preset UAV kinematics model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
[0048] In some embodiments, each of the candidate trajectories is obtained by predicting the trajectory by inputting the speed of the UAV into a preset UAV kinematics model, including: discretizing and sampling the speed of the UAV within a preset feasible speed space of the UAV to obtain several sets of speed pairs; inputting each speed pair into the preset UAV kinematics model to update the pose parameters of the UAV by discrete integration within a preset prediction time window to obtain a corresponding discrete trajectory point sequence, and determining each of the candidate trajectories based on each discrete trajectory point sequence.
[0049] In some embodiments, the drone's velocity is discretized and sampled within a preset feasible velocity space to obtain several velocity pairs. Specifically, to address the problem of flexible trajectory selection in complex scenarios with multiple obstacles, a dynamic window method (DWA) is introduced to sample the drone's velocity space based on a unified optimal proportional guidance reference trajectory. First, the feasible velocity space of the drone is constructed. Let the drone's linear velocity be... angular velocity is Under the constraints of UAV dynamics, its feasible velocity space is defined as: ,in, These are the minimum and maximum allowable linear speeds for the drone, respectively. These are the minimum and maximum angular velocities allowed for the drone, respectively. This represents the set of velocities of the UAV within the limits allowed by its structure and control capabilities. Furthermore, to ensure that the sampling velocities satisfy the instantaneous dynamic reachability constraints, dynamic window constraints are also needed, taking into account the current motion state. Let the current linear velocity of the UAV be... angular velocity is The maximum linear acceleration of the drone is The maximum angular acceleration is Within a control cycle, the range of variation for linear velocity and angular velocity is limited by acceleration constraints. These constraints determine the upper and lower limits of the dynamic window, ensuring that the sampled velocity pairs are physically feasible. Within the aforementioned feasible velocity range, sampling intervals are set for both linear velocity and angular velocity. and Uniform discrete sampling is performed. Let the upper and lower limits of the sampled velocity space be: , —Lower and upper limits for linear velocity sampling; , —Lower and upper limits for angular velocity sampling. Then, given a sampling interval, the total number of velocity pairs generated is: ; in, The total number of sampling velocity pairs to satisfy the constraints; each velocity pair is represented as Each group Each corresponds to a candidate trajectory. Through the above discretization sampling process, several sets of candidate velocity pairs that satisfy dynamic constraints are formed within the feasible velocity space of the UAV, providing an input basis for subsequent trajectory prediction and selection.
[0050] In some embodiments, each velocity pair is input into a preset UAV kinematic model to update the UAV's pose parameters by discrete integration within a preset prediction time window, thereby obtaining a corresponding discrete trajectory point sequence. Based on each discrete trajectory point sequence, each candidate trajectory is determined. Specifically, for each sampled velocity pair... The data is input into the UAV kinematics model to simulate and predict the UAV's future pose within a preset prediction time window. The UAV kinematics model adopts a two-wheel differential kinematics model, and its discrete form is as follows: ; in, , For the first The predicted location coordinates of the drone at a given moment; For the first The heading angle of the drone at a predicted moment; , , These are the pose parameters from the previous prediction time. The linear velocity obtained from the current sampling; The angular velocity obtained from the current sample; This represents the time step of the discrete integral. This is the index for predicting the number of steps. In the specific implementation process: the actual pose of the UAV at the current moment is used. As an initial condition; within the prediction time window, according to a fixed time step. Perform recursive calculations; save the corresponding pose point at each time step. After multiple discrete integral updates, for each velocity pair... This yields a set of trajectory points: ; in, This represents the discrete trajectories formed by the UAV moving at this speed within the prediction time window; this set represents the discrete trajectories formed by the UAV moving at this speed within the prediction time. Taking the sequence of trajectory points generated for each speed pair as a candidate trajectory, then under the influence of all sampled speed pairs, a sequence of discrete trajectories can be formed. The above process achieves the following: sampling in velocity space; trajectory simulation within the prediction time window; generation of a set of candidate trajectories that satisfy the UAV dynamics constraints; and lays the foundation for subsequent trajectory feasibility screening and optimal trajectory selection based on evaluation functions.
[0051] Please refer to Figure 3 The step of determining the heading deviation evaluation value, obstacle distance evaluation value and trajectory fit evaluation value of each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position and the preset target point position includes: steps S301 to S303; Step S301: Calculate the target azimuth angle based on the endpoint position coordinates of each candidate trajectory and the target point position, and calculate the difference between the target azimuth angle and the endpoint heading angle of each candidate trajectory, so as to determine the heading deviation evaluation value corresponding to each candidate trajectory based on the difference. In some embodiments, for each candidate trajectory sampled and predicted using the dynamic window method First, extract the endpoint pose parameters of the trajectory at the end of the prediction time window. Let the first... The coordinates of the endpoint of the candidate trajectory are The final heading angle is Let the location of the target point be... The target azimuth can then be calculated based on the spatial relationship between the endpoint and the target point. This angle represents the direction angle from the endpoint of the candidate trajectory to the target point. Based on this, a heading evaluation function is constructed: ,in, The azimuth angle from the end point of the trajectory to the target point; The heading angle of the UAV at the endpoint of the candidate trajectory; This represents the angular deviation between the destination heading and the target heading; supplementary angles are used for evaluation, with larger values indicating that the heading is closer to the target direction. This yields the heading deviation evaluation value for each candidate trajectory. This is used to characterize the quality of the trajectory toward the target point.
[0052] Step S302: Extract several discrete trajectory points from each candidate trajectory, calculate the Euclidean distance between each discrete trajectory point and each second position to obtain each first distance value, and filter the minimum value of each first distance value to determine the obstacle distance evaluation value corresponding to each candidate trajectory based on the minimum value; In some embodiments, for each candidate trajectory It contains several discrete trajectory points: Let the set of positions of all dynamic obstacles be: ,in, This represents a discrete trajectory point on the candidate trajectory; Indicates the position of any dynamic obstacle; This is the set of all obstacle locations in the current environment. For each discrete trajectory point... With each obstacle position Perform Euclidean distance calculation to obtain the first distance value. The obstacle distance evaluation value is defined as follows: ; in, This represents the Euclidean distance between trajectory points and obstacles; the minimum distance between all trajectory points and all obstacles is taken as the safety margin index for that trajectory. This index is used to evaluate the minimum safe distance between the trajectory and the nearest obstacle within the prediction time window; the larger the value, the safer the trajectory.
[0053] Step S303: Calculate each second distance value between each discrete trajectory point and the corresponding reference point in the reference trajectory, and calculate the average value of each second distance value, so as to determine the trajectory fitting evaluation value corresponding to each candidate trajectory based on the average value.
[0054] In some embodiments, to ensure that the DWA candidate trajectory maintains consistency with the Unified Optimal Proportional Guidance (PN) reference trajectory in multi-obstacle scenarios, a trajectory fit evaluation metric is introduced. Let the reference trajectory generated by the Unified Optimal Proportional Guidance method be: Let the current candidate trajectory be... On The discrete trajectory points are: The candidate trajectory is matched one by one with the reference trajectory according to the time step or index order, and the Euclidean distance between the corresponding points is calculated to obtain the second distance value: The trajectory fit evaluation function is defined as follows: ; in, To predict the number of discrete trajectory points within the time window; For candidate trajectory number A discrete point; This refers to the reference point on the proportional guidance reference trajectory. This index quantifies the deviation of the candidate trajectory from the PN reference trajectory by summing and averaging the second distance values. In actual evaluation, the smaller the deviation, the closer the trajectory is to the unified optimal proportional guidance trajectory, which can maintain the smoothness and directional consistency of the overall trajectory while ensuring flexible obstacle avoidance in multiple obstacles.
[0055] In some embodiments, the evaluation weights are dynamically adjusted based on a reinforcement learning algorithm, including: constructing a reinforcement learning state space based on the first position, the first motion state, each of the second positions, and each of the second motion states; and using the state space, a preset continuous weight action space, and a preset reward function, performing iterative optimization of the strategy with the goal of maximizing the expected cumulative value of the reward function, and determining the dynamic adjustment strategy for each evaluation weight.
[0056] In some embodiments, a state space for reinforcement learning is constructed based on the first position, the first motion state, each of the second positions, and each of the second motion states. Specifically, to achieve adaptive weight adjustment for multi-obstacle scenarios in dynamic environments, the state space of the reinforcement learning algorithm is first constructed. Used to characterize the interaction between the drone and the environment at any given time. The comprehensive state information. The state space. It consists of the following information: UAV's own state information: including the UAV's first position and first motion state, specifically including: current pose parameters ,in, The coordinates of the UAV in the global coordinate system; The current heading angle and current linear velocity of the drone. Current angular velocity Dynamic obstacle state information: including the second position and second motion state of each dynamic obstacle, specifically including: the... The location of the obstacle ;No. Speed information for each obstacle (magnitude and direction). Target point information: including target point location. And the distance and azimuth information from the drone's current position to the target point. Therefore, at time... The reinforcement learning state vector can be represented as: ; in, The state space represents the number of dynamic obstacles within the current perception range; it fully reflects the spatial and kinematic relationships between the UAV, the target, and multiple obstacles. Within this state space, the following can be simultaneously expressed: the relative relationship between the UAV and the target point; the relative positions and potential conflict risks between the UAV and each obstacle; and the impact of the current motion state on future trajectory reachability. This state space, constructed in this way, enables reinforcement learning algorithms to comprehensively perceive complex dynamic environments, providing accurate environmental representations for the subsequent dynamic optimization of evaluation weights, thereby improving the accuracy of obstacle avoidance path planning for UAVs in complex dynamic environments.
[0057] In some embodiments, based on the state space, a preset continuous weight action space, and a preset reward function, a preset reinforcement learning algorithm is used to perform iterative policy optimization with the objective of maximizing the expected cumulative value of the reward function, thereby determining the dynamic adjustment strategy for each evaluation weight. Specifically, the proximal policy optimization (PPO) algorithm is used to optimize the weight coefficients in the dynamic window method (DWA) evaluation function. The evaluation function is: ; in, This is the evaluation value for heading deviation; This is the obstacle distance evaluation value; This is the evaluation value for trajectory fit. This is the speed evaluation value; These are the weighting coefficients for each evaluation value; This is a smoothing coefficient. In this embodiment, the weight coefficient vector is defined as the action of reinforcement learning: The continuous weighted action space is: In other words, the reinforcement learning policy network outputs four consecutive values at each time step, corresponding to the weights of the four evaluation values. The policy function is denoted as: ,in, For policy network parameters; This is the current state; The weighted action is the output. In this embodiment, a one-dimensional Gaussian distribution is used to model the policy output, and its probability density function is: ,in, The mean of the policy network output; Standard deviation; These are the weight values obtained from sampling. To ensure both security and efficiency in the system, the reward function is set as follows: ; in, Positive rewards for achieving the goal; Penalty for collision; This represents the amount by which the target distance decreases at the current moment. The linear velocity of the drone; The absolute value of the angular velocity; This is the reward weighting coefficient. The reward function encourages: approaching the goal; maintaining high efficiency; reducing sharp turns; and avoiding collisions. The cumulative reward is: ,in, Discount factor; Let be the total number of steps in the trajectory. Further, generalized advantage estimation (GAE) is employed: ; in, It is a value function; For value network parameters; These are the GAE parameters. The probability ratio between the old and new strategies is: The objective function for PPO pruning is: ; in, Let be the clipping factor. The total loss function is: ,in, For policy entropy; , These are empirical coefficients. Parameters are updated using gradient descent: , ,in, Let be the learning rate. Through the above policy iteration process, the reinforcement learning objective function—the expected cumulative reward—is maximized. Finally, the optimal policy parameters are obtained. This leads to a dynamic weight adjustment strategy: That is, automatically increase the height when there are many obstacles. Improved in sparse environments and Improvement when PN trajectory deviation is large This enables adaptive optimization of the DWA evaluation function weights, allowing the system to automatically balance safety, efficiency, and smoothness in multi-obstacle conflict scenarios, avoiding the rigidity issues associated with traditional fixed weights. Ultimately, this achieves automatic, balanced, safe, efficient, and high-precision obstacle avoidance flight for UAVs in complex dynamic environments, thereby improving the accuracy of obstacle avoidance path planning in such environments.
[0058] In some embodiments, determining the target obstacle avoidance trajectory based on the trajectory evaluation value to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory includes: normalizing the heading deviation evaluation value, the obstacle distance evaluation value, and the trajectory fit evaluation value to obtain a normalized heading index, a normalized distance index, and a normalized fit index; weighting and summing the normalized heading index, the normalized distance index, and the normalized fit index based on a preset path smoothing coefficient and each of the evaluation weights to obtain a trajectory evaluation value corresponding to each candidate trajectory; comparing each trajectory evaluation value, and selecting the candidate trajectory corresponding to the maximum value of the trajectory evaluation value as the target obstacle avoidance trajectory to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory.
[0059] In some embodiments, the heading deviation evaluation value, the obstacle distance evaluation value, and the trajectory fit evaluation value are normalized to obtain normalized heading index, normalized distance index, and normalized fit index. Specifically, since the dimensions and numerical ranges of different evaluation indicators are different, in order to ensure the fairness of the comprehensive evaluation, it is necessary to normalize the heading deviation evaluation value, the obstacle distance evaluation value, and the trajectory fit evaluation value. ; in, For the first Candidate trajectories; The denominator is the total number of candidate trajectories; the sum of the index values corresponding to all candidate trajectories is the total number of trajectories. Through the above normalization process, all evaluation indicators are transformed into dimensionless values on the same scale, preventing any single indicator from dominating the evaluation results due to its large numerical magnitude, thus improving the objectivity and stability of the evaluation.
[0060] In some embodiments, the normalized heading index, the normalized distance index, and the normalized fit index are weighted and summed based on a preset path smoothing coefficient and each of the evaluation weights to obtain the trajectory evaluation value corresponding to each candidate trajectory. Specifically, after obtaining the normalized index, a comprehensive evaluation function is constructed: ; in, This is the comprehensive evaluation value of the candidate trajectory; This is the path smoothing coefficient, used to adjust the overall smoothness of the evaluation function; , , , These are the weighting coefficients for the heading, distance, fit, and speed indicators, respectively. This represents the current linear velocity. After reinforcement learning optimization, the weight coefficients... , , , The policy network dynamically outputs data to achieve adaptive adjustment for different scenarios. During calculation, the normalized indicators mentioned above are substituted into the evaluation function to form the trajectory evaluation value corresponding to each candidate trajectory. This weighted mechanism achieves the following balance: Emphasizing goal orientation; through Emphasizing security; through Preserve the smoothing properties of the PN trajectory; through To ensure flight efficiency; through Improve the overall smoothness of the path.
[0061] In some embodiments, the trajectory evaluation values are compared, and the candidate trajectory corresponding to the maximum value of the trajectory evaluation value is selected as the target obstacle avoidance trajectory to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Specifically, this involves evaluating all candidate trajectories that meet the dynamic constraints and do not collide, to obtain a set of evaluation values. ,in, The number of candidate trajectories; For the first The comprehensive evaluation value of the candidate trajectories. The trajectory that satisfies the following formula is selected as the target obstacle avoidance trajectory: The corresponding speed group The current control commands are input into the UAV motion control system, causing the UAV to fly along the optimal trajectory. Through the above process of "generation-filtering-normalization-weighting-optimization," the following are achieved: generating feasible trajectories under dynamic constraints; comprehensively considering safety and target orientation in multi-obstacle environments; preserving the smoothness advantage of the modified PN trajectory; using reinforcement learning to achieve adaptive weight adjustment; and selecting the optimal solution from the set of feasible trajectories in real time. This effectively solves the trajectory conflict problem in complex multi-obstacle scenarios, achieving safe, efficient, and smooth dynamic obstacle avoidance flight, and improving the accuracy and stability of obstacle avoidance path planning for UAVs in complex dynamic environments.
[0062] For ease of understanding, Figure 4 This is a flowchart illustrating the UAV obstacle avoidance path planning method provided in this application. First, system initialization is performed; then, an initial dynamic obstacle avoidance direction is generated based on geometric modeling and proportional guidance laws; the command acceleration is corrected based on optimal control principles to improve control smoothness and dynamic response performance; next, a proportional navigation (PN) reference trajectory is generated based on the corrected motion state. Following this, the DWA-PPO fusion decision-making stage begins, which includes: sampling DWA trajectories within the UAV's feasible velocity space to generate several candidate trajectories; using a PPO policy network to comprehensively evaluate and decide on each candidate trajectory, outputting the optimal obstacle avoidance trajectory for the current cycle; then, the optimal obstacle avoidance trajectory and corresponding control commands for the current cycle are output; and the UAV is driven to fly according to the control commands. Afterwards, it is determined whether the target point has been reached. If not, the process returns to the aforementioned steps to enter the next control cycle; if the target point has been reached, the task ends. Through this process, dynamic obstacle avoidance path planning and real-time decision control based on the fusion of proportional guidance and reinforcement learning are realized.
[0063] Through the above steps, a closed-loop path planning mechanism of "proportional guidance to generate reference trajectory + dynamic window method to generate candidate trajectory + reinforcement learning adaptive weighting + multi-index comprehensive selection" is realized. Under the premise of satisfying dynamic constraints, UAVs can simultaneously take into account safety, target orientation, trajectory smoothness and flight efficiency in complex dynamic environments with multiple obstacles, avoiding the performance rigidity problem caused by fixed weights, thereby significantly improving the adaptive capability, stability and real-time performance of obstacle avoidance path planning.
[0064] like Figure 5 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; An embodiment of the present invention provides a schematic diagram of the structure of an obstacle avoidance path planning system for an unmanned aerial vehicle (UAV), including: an acquisition module 100, a correction module 200, and an obstacle avoidance module 300; The acquisition module 100 is used to acquire the first position and first motion state of the UAV, as well as the second position and second motion state of each dynamic obstacle; The correction module 200 is used to calculate the correction acceleration of the UAV based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the correction acceleration, and determine the reference trajectory of the UAV based on the correction result. The obstacle avoidance module 300 is used to determine the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position. It also calculates the trajectory evaluation value of the UAV based on the heading deviation evaluation value, obstacle distance evaluation value, trajectory fit evaluation value, and each evaluation weight. Finally, it determines the target obstacle avoidance trajectory based on the trajectory evaluation value, thereby driving the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the UAV's speed into a preset UAV kinematics model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
[0065] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the obstacle avoidance path planning method for UAVs provided by any of the above-described method embodiments of the present invention. For a more detailed workflow and principle of this system, please refer to the relevant descriptions of the above methods.
[0066] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0067] Based on the above embodiments of the obstacle avoidance path planning method for UAVs, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the obstacle avoidance path planning method for UAVs according to any embodiment of the present invention.
[0068] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0069] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0070] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0071] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the obstacle avoidance path planning method for a UAV as described in any of the above-described method embodiments of the present invention.
[0072] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0073] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for obstacle avoidance path planning for unmanned aerial vehicles (UAVs), characterized in that, include: Acquire the first position and first motion state of the drone, as well as the second position and second motion state of each dynamic obstacle; The corrected acceleration of the UAV is calculated based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the corrected acceleration, and the reference trajectory of the UAV is determined according to the correction result. Based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position, the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory are determined. Based on the heading deviation evaluation value, the obstacle distance evaluation value, the trajectory fit evaluation value, and each evaluation weight, the trajectory evaluation value of the UAV is calculated. Based on the trajectory evaluation value, the target obstacle avoidance trajectory is determined to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the speed of the UAV into a preset UAV kinematic model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
2. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, The determination of the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value for each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position includes: The target azimuth angle is calculated based on the coordinates of the endpoint position of each candidate trajectory and the position of the target point, and the difference between the target azimuth angle and the heading angle of the endpoint of each candidate trajectory is calculated, so as to determine the heading deviation evaluation value corresponding to each candidate trajectory based on the difference. Extract several discrete trajectory points from each candidate trajectory, calculate the Euclidean distance between each discrete trajectory point and each second position to obtain each first distance value, and filter the minimum value of each first distance value to determine the obstacle distance evaluation value corresponding to each candidate trajectory based on the minimum value; Calculate each second distance value between each discrete trajectory point and the corresponding reference point in the reference trajectory, and calculate the average value of each second distance value, so as to determine the trajectory fit evaluation value corresponding to each candidate trajectory based on the average value.
3. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, The evaluation weights are obtained by dynamic adjustment based on reinforcement learning algorithms, including: A state space for reinforcement learning is constructed based on the first position, the first motion state, each of the second positions, and each of the second motion states. Based on the state space, the preset continuous weight action space, and the preset reward function, a preset reinforcement learning algorithm is used to perform iterative optimization of the strategy with the goal of maximizing the expected cumulative value of the reward function, thereby determining the dynamic adjustment strategy for each evaluation weight.
4. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, The step of correcting the first motion state based on the corrected acceleration and determining the reference trajectory of the UAV based on the correction result includes: The corrected acceleration is decomposed directionally to obtain the first acceleration component and the second acceleration component of the UAV along the heading direction; The speed of the UAV is updated based on the first acceleration component to obtain the target speed; The heading angle change rate is calculated based on the velocity vector direction of the second acceleration component and the target velocity, and the heading angle of the UAV is updated by discrete integration based on the heading angle change rate to obtain the target heading angle, wherein the first motion state includes the velocity and the heading angle; The reference trajectory of the UAV is determined based on the target speed and the target heading angle.
5. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, The calculation of the corrected acceleration of the UAV based on the first position, the first motion state, each of the second positions, and each of the second motion states includes: Calculate the relative coordinates between the first position and each of the second positions, and determine the relative displacement components between the UAV and each dynamic obstacle based on the relative coordinates; The relative velocity components between the UAV and each dynamic obstacle are calculated based on the velocity and heading angle in the first motion state and each of the second motion states, and the included angle between the UAV and each dynamic obstacle is determined based on the relative velocity components and the relative displacement components. The corrected acceleration of the UAV is calculated based on each of the relative displacement components, each of the relative velocity components, each of the included angles, and a preset proportional guidance coefficient.
6. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, Each of the candidate trajectories is obtained by predicting the trajectory by inputting the speed of the UAV into a preset UAV kinematic model, including: Within the preset feasible speed space of the drone, the speed of the drone is discretized and sampled to obtain several sets of speed pairs; Each of the aforementioned velocity pairs is input into a preset UAV kinematics model to update the UAV's pose parameters by discrete integration within a preset prediction time window, thereby obtaining a corresponding discrete trajectory point sequence, and determining each of the aforementioned candidate trajectories based on each of the aforementioned discrete trajectory point sequences.
7. The obstacle avoidance path planning method for a UAV as described in claim 1, characterized in that, The step of determining the target obstacle avoidance trajectory based on the trajectory evaluation value, so as to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory, includes: The heading deviation evaluation value, the obstacle distance evaluation value, and the trajectory fit evaluation value are normalized respectively to obtain normalized heading index, normalized distance index, and normalized fit index. Based on the preset path smoothing coefficient and each of the evaluation weights, the normalized heading index, the normalized distance index and the normalized fit index are weighted and summed to obtain the trajectory evaluation value corresponding to each of the candidate trajectories. The trajectory evaluation values are compared, and the candidate trajectory corresponding to the maximum value of the trajectory evaluation value is taken as the target obstacle avoidance trajectory, so as to drive the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory.
8. A path avoidance planning system for an unmanned aerial vehicle (UAV), characterized in that, The system includes: an acquisition module, a correction module, and an obstacle avoidance module; The acquisition module is used to acquire the first position and first motion state of the UAV, as well as the second position and second motion state of each dynamic obstacle; The correction module is used to calculate the correction acceleration of the UAV based on the first position, the first motion state, each of the second positions and each of the second motion states, so as to correct the first motion state based on the correction acceleration, and determine the reference trajectory of the UAV based on the correction result. The obstacle avoidance module is used to determine the heading deviation evaluation value, obstacle distance evaluation value, and trajectory fit evaluation value of each candidate trajectory based on each candidate trajectory, the reference trajectory, each second position, and the preset target point position. It then calculates the trajectory evaluation value of the UAV based on the heading deviation evaluation value, obstacle distance evaluation value, trajectory fit evaluation value, and each evaluation weight. Finally, it determines the target obstacle avoidance trajectory based on the trajectory evaluation value, driving the UAV to perform obstacle avoidance flight according to the target obstacle avoidance trajectory. Each candidate trajectory is obtained by inputting the UAV's speed into a preset UAV kinematics model for trajectory prediction, and each evaluation weight is dynamically adjusted based on a reinforcement learning algorithm.
9. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the obstacle avoidance path planning method for an unmanned aerial vehicle as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, the device containing the computer-readable storage medium is controlled to perform the obstacle avoidance path planning method for the unmanned aerial vehicle as described in any one of claims 1 to 7.