Autonomous tracking method and device for unmanned aerial vehicle in dynamic scene
By optimizing the drone trajectory using Kalman filters and Hybrid A* and A* methods, the problem of poor drone safety in dynamic scenarios is solved, enabling real-time rapid response and efficient tracking, and improving the drone's autonomous tracking capability.
Patent Information
- Application Number
- CN202511012522.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-21
AI Technical Summary
Existing drone autonomous tracking technology suffers from high system latency, insufficient real-time performance and rapid response capabilities in dynamic scenarios, resulting in poor safety.
Kalman filters are used for information prediction, and Hybrid A* and A* methods are combined for trajectory optimization and hierarchical path search. Through model prediction and obstacle avoidance, a collision-free reference trajectory is generated to achieve autonomous tracking of the UAV.
It improves the flight safety and tracking stability of UAVs in dynamic environments, enabling them to respond quickly and in real time to changes in the dynamic environment and targets, and enhancing their autonomous tracking capabilities.
Smart Images

Figure CN120993931A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicles, and in particular to an unmanned aerial vehicle autonomous tracking method and device for a dynamic scenario. BACKGROUND
[0002] With the rapid development of modern unmanned aerial vehicle technology, unmanned aerial vehicle autonomous tracking technology is widely used in urban security monitoring, ecological environment research, emergency rescue and other fields due to its unique technical complexity and wide applicability. At present, the motion planning system for realizing autonomous tracking of unmanned aerial vehicles generally adopts a hierarchical architecture, i.e., a front-end path search layer and a back-end trajectory optimization layer. The front-end path search layer and the back-end trajectory optimization layer cooperate to generate a feasible trajectory of the unmanned aerial vehicle. The motion control module of the unmanned aerial vehicle realizes trajectory tracking through the flight state feedback of the unmanned aerial vehicle.
[0003] However, this planning and control separation architecture still faces many challenges in dynamic scenarios. First, the separation of planning and control increases the system level, resulting in a significant increase in system delay. Second, the motion planning system has a low running frequency and does not consider flight state feedback, resulting in insufficient real-time performance, rapid response capability and disturbance rejection capability. Therefore, these defects result in the problem of poor safety of the existing motion planning for autonomous tracking of unmanned aerial vehicles in dynamic environments. SUMMARY
[0004] The embodiments of the present application provide a wireless electric energy transmission system and method suitable for electric vehicles with different chassis heights, which solves the technical problem of poor safety of the motion planning for autonomous tracking of unmanned aerial vehicles in dynamic environments in the prior art, realizes full consideration of the uncertainty in dynamic environments, enables the unmanned aerial vehicle to respond in real time and quickly, adapts to the rapid changes of dynamic environments and dynamic targets, and improves the flight safety, reliability and tracking stability of the unmanned aerial vehicle in dynamic scenarios.
[0005] In a first aspect, the embodiments of the present application provide an unmanned aerial vehicle autonomous tracking method for a dynamic scenario, comprising:
[0006] After obtaining the current information of the tracking target of the unmanned aerial vehicle, the current information is predicted and processed by a Kalman filter to obtain the current predicted trajectory of the tracking target;
[0007] The current predicted trajectory is optimized and processed by a Hybrid A* method to obtain the current target trajectory of the tracking target;
[0008] The current target trajectory is searched by a hierarchical path search method to obtain the current search trajectory of the unmanned aerial vehicle;
[0009] The current search trajectory is optimized and processed to obtain the current reference trajectory of the unmanned aerial vehicle;
[0010] based on the current reference trajectory, control the UAV to fly along a target predicted trajectory corresponding to the current reference trajectory and control the current flight state of the UAV to realize the tracking flight of the UAV to the tracking target.
[0011] Optionally, the optimization processing of the current predicted trajectory by the Hybrid A* method to obtain the current target trajectory of the tracking target comprises:
[0012] collision detection between the predicted points of the current predicted trajectory and the environmental obstacles to determine whether there is a collision point;
[0013] If there is the collision point, an obstacle avoidance point of the current predicted trajectory is obtained according to the predicted point corresponding to the collision point, and the obstacle avoidance point is taken as the starting point and the end point of the current predicted trajectory, and the Hybrid A* method is used to obtain the current target trajectory, wherein the corresponding predicted point is the predicted point that collides with the collision point earliest, the obstacle avoidance point is the target predicted point that meets the preset obstacle avoidance condition among the predicted points before the corresponding predicted point, the preset obstacle avoidance condition is that the Euclidean distance between the target predicted point and the corresponding predicted point is greater than the preset obstacle avoidance distance, and the Euclidean distance between the target predicted point and the corresponding predicted point is the smallest among the predicted points before the corresponding predicted point;
[0014] If there is no collision point, the current predicted trajectory is determined as the current target trajectory.
[0015] Optionally, the Hybrid A* method is used to obtain the current target trajectory with the obstacle avoidance point as the starting point and the end point of the current predicted trajectory, comprising:
[0016] from the obstacle avoidance point, the next target predicted point of the obstacle avoidance point is determined by the cost function of the Hybrid A* method, and then the next target predicted point of the obstacle avoidance point is taken as the current target predicted point, the next target predicted point of the current target predicted point is determined by the cost function of the Hybrid A* method, until the end point of the current predicted trajectory is reached, the current target trajectory is obtained, and the target predicted point is the node with the minimum cost function value of the Hybrid A* method;
[0017] wherein the cost function of the Hybrid A* method is:
[0018]
[0019] f k(n) is the total cost function of the current target prediction point, and is also the cost function value of the Hybrid A* method, g k (n) is the actual cost function of the current target prediction point, h (k) (n) is the heuristic cost function of the current target prediction point, n 目标 is the sequence number of the target prediction point, λ a is the acceleration factor of the UAV, a is the acceleration required for the current target prediction point to expand, k is the current target prediction point, g is the node adjacent to the current target prediction point, p x is the x-axis coordinate of the node, p y is the y-axis coordinate of the node, p z is the z-axis coordinate of the node.
[0020] Optionally, the hierarchical path search of the current target trajectory by the A* method to obtain the current search trajectory of the UAV comprises:
[0021] Taking the current position of the UAV as the starting point of the current layer and the first target prediction point of the current target trajectory as the end point of the current layer, the A* method is used to search the navigation path of the current layer of the UAV, and then the first target prediction point of the current target trajectory is taken as the starting point of the next layer of the current layer, and the second target prediction point of the current target trajectory is taken as the end point of the next layer of the current layer. The A* method is used to search the navigation path of the next layer of the navigation path of the current layer, until the end point of the current target trajectory is reached, and the navigation path of each layer is searched layer by layer to obtain the current search trajectory, wherein the navigation path of each layer is the path with the minimum cost function value of the A* method.
[0022] Optionally, the cost function of the A* method is:
[0023]
[0024] wherein, is the cost function value of the A* method of the lth layer, n 起点 is the starting point of the lth layer, g 起点 represents the end point of the lth layer, is the starting point position of the lth layer, represents the end point position of the lth layer, is the horizontal Euclidean distance between the starting point position of the lth layer and the end point position of the lth layer, is the vertical Euclidean distance between the starting point position of the lth layer and the end point position of the lth layer, D t is the expected tracking distance, ω D is the weight coefficient of the tracking distance.
[0025] Optionally, the optimization processing on the current search trajectory to obtain the current reference trajectory of the UAV comprises:
[0026] For each layer of the navigation path of the current search trajectory, the RDP (Ramer Douglas Peucker) method is used to perform the thinning processing on the navigation path to obtain a corresponding thinning path and a thinning navigation point of the thinning path.
[0027] If the path total length of the thinning path is greater than the total navigation length of the UAV, the flight time corresponding to the path total length is determined as the flight time of the thinning path, wherein the total navigation length is the total navigation length based on the predicted time step, the current speed and the maximum acceleration of the UAV.
[0028] If the path total length of the thinning path is not greater than the total navigation length of the UAV, the predicted time step is determined as the flight time of the thinning path.
[0029] According to the flight time of the thinning path and the thinning navigation point of the thinning path, the flight time of each sub-path of the thinning path is obtained, wherein each sub-path of the thinning path is divided based on the thinning navigation point of the thinning path.
[0030] According to the thinning path, the flight time of the thinning path and the flight time of each sub-path of the thinning path, the optimized navigation path is obtained.
[0031] The thinning processing and the time length allocation processing are performed on each layer of the navigation path of the current search trajectory to obtain the optimized navigation path of each layer of the current search trajectory, and then the current reference trajectory is obtained.
[0032] Optionally, the control of the UAV along the target predicted trajectory corresponding to the current reference trajectory and the control of the current flight state of the UAV based on the current reference trajectory comprises:
[0033] The state transition model of the MPC (Model Predictive Control) of the UAV is obtained, and the reference parameters of the MPC are set according to the current reference trajectory.
[0034] Based on the reference parameters of the MPC, the state transition model of the MPC is constrained by the minimization objective function of the MPC to obtain the target predicted trajectory, and the UAV is controlled to fly according to the target predicted trajectory, and the current flight state is controlled.
[0035] Optionally, the minimization objective function of the MPC is:
[0036]
[0037] wherein f is a function value of a minimization objective function of the MPC, p ref,i is position information of the UAV at the i-th waypoint of the current reference trajectory, p i is position information of the UAV at the i-th waypoint of the current target trajectory, R p is a position weight, u i is the j-th jerk of the UAV at the i-th waypoint of the current target trajectory, R u is a jerk weight, v N is the velocity of the UAV at the last segment of the current target trajectory, R v,N is a velocity weight of the UAV at the last segment of the current target trajectory, a N is the acceleration of the UAV at the last segment of the current target trajectory, R a,N is a velocity weight of the UAV at the last segment of the current target trajectory, R u,c is a smoothness weight of the input jerk, u m is the jerk obtained by the minimization objective function, which is the m-th jerk.
[0038] Optionally, the current information is predicted by the Kalman filter to obtain the current predicted trajectory of the tracking target, comprising:
[0039] a second-order integral equation is taken as a state transition equation of the Kalman filter to obtain the current predicted trajectory, wherein the state transition equation of the Kalman filter is:
[0040]
[0041] v n = v n-1 + a n-1 · Δt;
[0042] x n = [p n , v n , a n ] T , u0 = [p0, v0] T ;
[0043] wherein p n is position information of the tracking target at the n-th predicted point of the current predicted trajectory, v n is velocity of the tracking target at the n-th predicted point of the current predicted trajectory, and a nan acceleration of the tracking target at the n th prediction point of the current prediction trajectory, u n a jerk of the tracking target at the n th prediction point of the current prediction trajectory, p0 is initial position information of the tracking target, v0 is initial velocity of the tracking target, and u0 is initial jerk of the tracking target.
[0044] Based on the same inventive concept, in a second aspect, the present application also provides a UAV device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the UAV autonomous tracking method in a dynamic scene.
[0045] The one or more technical solutions in the embodiments of the present application have at least the following technical effects or advantages:
[0046] After obtaining the current information of the tracking target of the UAV in the embodiments of the present application, the current information is predicted and processed by the Kalman filter to obtain the current prediction trajectory of the tracking target. Through the Kalman filter, not only the future state of the tracking target can be predicted based on the current information of the tracking target to obtain the current prediction trajectory of the tracking target, but also the motion state of the tracking target can be efficiently estimated under the interference of visual detection noise, and accurate state estimation of the tracking target is provided through recursive update, so as to capture the short-time stability of the tracking target in motion. The current prediction trajectory is optimized by the Hybrid A* method to obtain the current target trajectory of the tracking target. The kinematic model of the tracking target is used to expand the search target prediction point to produce a path that is more consistent with the motion characteristics of the tracking target, i.e., the current target trajectory. In this way, the executability and dynamics of the current target trajectory of the tracking target are ensured, and the obstacle avoidance behavior of the tracking target is also realized, so as to efficiently generate a collision-free prediction trajectory and ensure the importance of the executable trajectory of the tracking target. In this way, the motion intention of the tracking target and the special requirements of the tracking task can be fully considered to improve the safety and reliability of the UAV autonomous tracking in a dynamic environment.
[0047] Then, the current search trajectory of the UAV is obtained by performing hierarchical path search on the current target trajectory by using the A* method. This is to process the current target trajectory in layers, construct a local navigation path layer by layer, and gradually approach the optimal path of the UAV, so as to complete the navigation path search of the UAV from a long-term perspective. At the same time, unnecessary calculation overheads in the hierarchical path search process are effectively controlled, so that the UAV has better dynamic adaptability to the rapid changes of the motion state of the tracked target. Then, the current search trajectory is optimized to obtain the current reference trajectory of the UAV. This is to extract the optimized waypoints from different layers of the current search trajectory, generate a smooth and dynamically feasible polynomial optimized current search trajectory, that is, the current reference trajectory, which provides a high-quality reference trajectory with good dynamic feasibility and tracking adaptability for subsequent control of the actual flight state and actual flight trajectory of the UAV. Finally, based on the current reference trajectory, the UAV is controlled to fly along the target predicted trajectory corresponding to the current reference trajectory and control the current flight state of the UAV, so as to realize the tracking flight of the UAV to the tracked target. In this way, the high integration of planning and control is realized, the uncertainty in the dynamic environment is fully considered, the UAV can respond in real time and quickly, adapt to the rapid changes of the dynamic environment and the dynamic tracking target, the autonomous tracking ability of the UAV in the dynamic environment is improved, and the flight safety, reliability and tracking stability of the UAV in the dynamic scene are enhanced. BRIEF DESCRIPTION OF DRAWINGS BRIEF DESCRIPTION OF DRAWINGS
[0048] BRIEF DESCRIPTION OF DRAWINGSVarious other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The detailed description is made with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0049] BRIEF DESCRIPTION OF DRAWINGS Figure 1 BRIEF DESCRIPTION OF DRAWINGSA step flow diagram of the autonomous tracking method for the UAV in the dynamic scene in the embodiment of the application is shown; BRIEF DESCRIPTION OF DRAWINGS
[0050] BRIEF DESCRIPTION OF DRAWINGS Figure 2 BRIEF DESCRIPTION OF DRAWINGSA structure diagram of the current predicted trajectory of the tracked target in the embodiment of the application is shown; BRIEF DESCRIPTION OF DRAWINGS
[0051] BRIEF DESCRIPTION OF DRAWINGS Figure 3 BRIEF DESCRIPTION OF DRAWINGSA structure diagram of the current target trajectory of the tracked target in the embodiment of the application is shown; BRIEF DESCRIPTION OF DRAWINGS
[0052] BRIEF DESCRIPTION OF DRAWINGS Figure 4 BRIEF DESCRIPTION OF DRAWINGSA structure diagram of the navigation path of a certain layer of the current search trajectory and the corresponding sparse path of the navigation path in the embodiment of the application is shown; BRIEF DESCRIPTION OF DRAWINGS
[0053] BRIEF DESCRIPTION OF DRAWINGS Figure 5 BRIEF DESCRIPTION OF DRAWINGSAnother structural schematic diagram of a navigation path of a certain layer of a current search trajectory in the embodiment of the application and a sparse path corresponding to the navigation path is shown. DETAILED DESCRIPTION
[0054] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.
[0055] Embodiment One
[0056] The first embodiment of the application provides a method for autonomous tracking of a UAV in a dynamic scene, as shown in the following formula (1): Figure 1 The method comprises the following steps:
[0057] S101, after obtaining the current information of the tracking target of the UAV, performing prediction processing on the current information by using a Kalman filter to obtain a current predicted trajectory of the tracking target;
[0058] S102, performing optimization processing on the current predicted trajectory by using a Hybrid A* method to obtain a current target trajectory of the tracking target;
[0059] S103, performing hierarchical path search on the current target trajectory by using an A* method to obtain a current search trajectory of the UAV;
[0060] S104, performing optimization processing on the current search trajectory to obtain a current reference trajectory of the UAV;
[0061] S105, based on the current reference trajectory, controlling the UAV to fly along a target predicted trajectory corresponding to the current reference trajectory and controlling the current flight state of the UAV, so as to realize the tracking flight of the UAV to the tracking target.
[0062] In the embodiment, the tracking target is a target tracked by the UAV, such as a pedestrian, a vehicle or a pet tracked by the UAV.
[0063] After obtaining the current information of the tracking target of the unmanned aerial vehicle, the embodiment performs prediction processing on the current information through the Kalman filter to obtain the current predicted trajectory of the tracking target. Through the Kalman filter, not only the future state of the tracking target can be predicted based on the current information of the tracking target to obtain the current predicted trajectory of the tracking target, but also the motion state of the tracking target can be efficiently estimated under the interference of visual detection noise, and accurate state estimation of the tracking target is provided through recursive update, so as to capture the short-time stability of the tracking target in motion. The current predicted trajectory is optimized through the Hybrid A* method to obtain the current target trajectory of the tracking target. The kinematic model of the tracking target is used to expand the search target prediction point to produce a path that is more consistent with the motion characteristics of the tracking target, that is, the current target trajectory. In this way, the executability and dynamics of the current target trajectory of the tracking target are ensured, and the obstacle avoidance behavior of the tracking target is also realized, so as to efficiently generate a collision-free predicted trajectory and ensure the importance of the executable trajectory of the tracking target. In this way, the motion intention of the tracking target and the special requirements of the tracking task can be fully considered to improve the safety and reliability of the autonomous tracking of the unmanned aerial vehicle in a dynamic environment.
[0064] Then, the current target trajectory is searched through the A* method to obtain the current search trajectory of the unmanned aerial vehicle. This is a hierarchical path search of the current target trajectory, which gradually approaches the optimal path of the unmanned aerial vehicle by constructing a local navigation path layer by layer to complete the navigation path search of the unmanned aerial vehicle from a long-term perspective. At the same time, unnecessary computational overhead in the hierarchical path search process is effectively controlled, so that the unmanned aerial vehicle has better dynamic adaptability to the rapid changes of the motion state of the tracking target. Then, the current search trajectory is optimized to obtain the current reference trajectory of the unmanned aerial vehicle. This is to extract optimized waypoints from different levels of the current search trajectory to generate a smooth and dynamically feasible polynomial optimized current search trajectory, that is, the current reference trajectory, which provides a high-quality reference trajectory with good dynamic feasibility and tracking adaptability for subsequent control of the actual flight state and actual flight trajectory of the unmanned aerial vehicle. Finally, based on the current reference trajectory, the unmanned aerial vehicle is controlled to fly along the target prediction trajectory corresponding to the current reference trajectory and control the current flight state of the unmanned aerial vehicle to realize the tracking flight of the unmanned aerial vehicle to the tracking target. In this way, the high integration of planning and control is realized, the uncertainty in the dynamic environment is fully considered, the unmanned aerial vehicle can respond in real time and quickly adapt to the rapid changes of the dynamic environment and the dynamic tracking target, and the autonomous tracking capability of the unmanned aerial vehicle in the dynamic environment is improved, and the flight safety, reliability and tracking stability of the unmanned aerial vehicle in the dynamic scene are enhanced.
[0065] Next, the specific implementation steps of the unmanned aerial vehicle autonomous tracking method provided by the embodiment will be described in detail in combination with Figure 1
[0066] Firstly, step S101 is performed. After obtaining the current information of the tracking target of the UAV, the current information is processed by a Kalman filter to obtain a current predicted trajectory of the tracking target.
[0067] Specifically, the current information of the tracking target is obtained by a camera, a lens or the like of the UAV tracking the tracking target. The current information of the tracking target includes current position information, current speed and current acceleration of the UAV. Throughout the method, the tracking target and the UAV are in the same three-dimensional coordinate system. The camera, the lens or the like of the UAV can also obtain position information and environmental information of the UAV. The environmental information includes but is not limited to position information and volume information of obstacles and the like.
[0068] After obtaining the current information of the tracking target, a second-order integral equation is used as a state transition equation of the Kalman filter to obtain the current predicted trajectory, wherein the state transition equation of the Kalman filter is as follows:
[0069]
[0070] v n =v n-1 +a n-1 ·Δt;
[0071] x n =[p n ,v n ,a n ] T , u0=[p0,v0] T ;
[0072] wherein p n is position information of the tracking target at an n-th predicted point of the current predicted trajectory, v n is speed of the tracking target at the n-th predicted point of the current predicted trajectory, a n is acceleration of the tracking target at the n-th predicted point of the current predicted trajectory, u n is jerk of the tracking target at the n-th predicted point of the current predicted trajectory, p0 is initial position information (i.e. current position information) of the tracking target, v0 is initial speed (i.e. current speed) of the tracking target, and u0 is initial jerk (i.e. current jerk) of the tracking target. In addition, the Kalman filter not only outputs the current predicted trajectory based on the current information of the tracking target, but also outputs an optimal estimation state of the tracking target at the current time.
[0073] In order to ensure real-time capture of dynamic changes of the tracking target and improve the trajectory prediction accuracy, the Kalman filter is iteratively updated at a set frequency (such as a frequency of 100 Hz), so as to realize real-time and efficient estimation of the motion state of the tracking target. After each iteration of the Kalman filter, the current optimal estimation state is taken as an initial state, a prediction time step of At is taken as At, and a prediction window size of N is taken as N, so as to perform the next iteration. The specific values of At and N can be set according to actual requirements. For example, the Kalman filter processes a motion trajectory of 3 s (seconds) in the future, takes At as 0.1 s, and takes N as 30, so as to calculate the position information, velocity, acceleration, and jerk of the tracking target at each time. Specifically, at the first time, the position information, velocity, acceleration, and jerk of the tracking target at the n = 1 prediction point. At the second time, the position information, velocity, acceleration, and jerk of the tracking target at the n = 2 prediction point. In this way, until the position information, velocity, acceleration, and jerk of the tracking target at the n = 30 prediction point at the 30th time are calculated. It can be seen that n of the n prediction points not only represents the number of the prediction point, but also has a time attribute, representing different times in a continuous time length. Then, p n is the position information of the tracking target at the n th prediction point of the current prediction trajectory, and can also be the position information of the tracking target at the n th time, v n , a n , and u n In this way, the motion state of the tracking target at different times (i.e., different prediction points) forms the current prediction trajectory of the tracking target. In subsequent various trajectory generation processes, the letter parameters of the nodes or waypoints in the trajectory not only represent the numbers of the nodes or waypoints, but also have a time attribute.
[0074] Therefore, through the prediction process of the Kalman filter, the motion state of the tracking target is forwardly predicted, and the future motion trajectory of the tracking target, i.e., the current prediction trajectory of the tracking target, is predicted. The Kalman filter can efficiently estimate the motion state of the tracking target under the interference of visual detection noise, provide an accurate estimation state of the tracking target through recursive updating, and thus capture the short-time stability of the motion of the tracking target.
[0075] Then, step S102 is performed, and the current prediction trajectory is optimized by the Hybrid A* method to obtain the current target trajectory of the tracking target.
[0076] Specifically, collision detection is performed between the prediction points of the current prediction trajectory and the environmental obstacles to determine whether there is a collision point. The collision detection process is as follows: as shown in FIG. 4, the current prediction trajectory is prediction point 1-prediction point 2-prediction point 3-prediction point 4-prediction point 5. Whether the positions of the prediction points of the current prediction trajectory are located within the position range of the environmental obstacles is determined. If the positions of the prediction points of the current prediction trajectory are located within the position range of the environmental obstacles, it is determined that there is a collision point. If the positions of the prediction points of the current prediction trajectory are not located within the position range of the environmental obstacles, it is determined that there is no collision point. Figure 2 Figure 2 Does any predicted point in the current trajectory fall within the location range of an environmental obstacle? If so, it indicates that a predicted point in the current trajectory falls within the location range of an environmental obstacle, i.e., it is assumed that... Figure 2 If predicted point 3 is located within the location range of an environmental obstacle, then a collision point is determined to exist. Otherwise, it means that no predicted point of the current predicted trajectory is located within the location range of an environmental obstacle. Figure 2 If none of the predicted points are located within the location range of environmental obstacles, then no collision point is determined. Alternatively, check if there are environmental obstacles on the predicted path between any two adjacent predicted points in the current predicted trajectory. If so, it indicates that there are environmental obstacles on the predicted path between any two adjacent predicted points in the current predicted trajectory, such as... Figure 2 If there are environmental obstacles on the predicted path between predicted points 3 and 4, then a collision point is determined to exist. Otherwise, it means that there are no environmental obstacles on the predicted path between any two adjacent predicted points in the current predicted trajectory, and therefore no collision point is determined to exist.
[0077] If a collision point exists, the obstacle avoidance point of the current predicted trajectory is obtained based on the predicted point corresponding to the collision point. The obstacle avoidance point is used as the starting point, and the ending point of the current predicted trajectory is used as the ending point. The current target trajectory is then obtained using the Hybrid A* method. Here, the corresponding predicted point is the earliest predicted point to collide with the collision point, and the obstacle avoidance point is the target predicted point determined from the predicted points preceding the corresponding predicted point that meets preset obstacle avoidance conditions. The preset obstacle avoidance conditions are that the Euclidean distance between the target predicted point and the corresponding predicted point is greater than a preset obstacle avoidance distance, and the Euclidean distance between the target predicted point and the corresponding predicted point is the smallest among the predicted points preceding the corresponding predicted point. The preset obstacle avoidance distance can be set according to actual needs.
[0078] For example, such as Figure 2 As shown, during collision detection, if prediction point 3 is located within the area of an environmental obstacle, or if an environmental obstacle exists on the predicted path between prediction points 3 and 4, a collision point is determined to exist. Since prediction point 3 is the earliest prediction point to collide with the collision point, it is designated as the prediction point corresponding to the collision point. Prediction points preceding prediction point 3 are prediction point 1 and prediction point 2. The Euclidean distance between prediction point 3 and prediction point 1 is D1, and the Euclidean distance between prediction point 3 and prediction point 2 is D2. D1 > D2, and both D1 and D2 are greater than the preset obstacle avoidance distance D0. Therefore, prediction point 2 corresponding to D2 is designated as the target prediction point, also known as the obstacle avoidance point.
[0079] Using the obstacle avoidance point as the starting point and the end point of the current predicted trajectory as the ending point, the current target trajectory is obtained through the Hybrid A* method. For example... Figure 3As shown, taking prediction point 2 as the starting point and the end point of the current prediction trajectory (i.e. prediction point 5) as the end point, the current target trajectory is obtained by the Hybrid A* method, and the current target trajectory is prediction point 1-prediction point 2-prediction point 3'-prediction point 4'-prediction point 5.
[0080] The specific process of obtaining the current target trajectory by the Hybrid A* method is as follows.
[0081] From the obstacle avoidance point, the next target prediction point of the obstacle avoidance point is determined by the cost function of the Hybrid A* method. Then, the next target prediction point of the obstacle avoidance point is taken as the current target prediction point, and the next target prediction point of the current target prediction point is determined by the cost function of the Hybrid A* method, until the end point of the current prediction trajectory is reached, and the current target trajectory is obtained. The target prediction point is the node with the minimum cost function value of the Hybrid A* method.
[0082] Specifically, the obstacle avoidance point is taken as the current target prediction point and input into the Hybrid A* method model. The Hybrid A* method model calculates each adjacent node around the current target prediction point, and the adjacent node of the current target prediction point with the minimum cost function value calculated by the Hybrid A* method model is the next target prediction point of the obstacle avoidance point. The next target prediction point of the obstacle avoidance point is taken as the current target prediction point and input into the Hybrid A* method model. In this way, the next target prediction point of the current target prediction point is determined, until the end point of the current prediction trajectory is reached. These target prediction points form the current target trajectory.
[0083] The cost function of the Hybrid A* method is as follows.
[0084]
[0085] f k (n) is the total cost function of the current target prediction point, which is also the cost function value of the Hybrid A* method, g k (n) is the actual cost function of the current target prediction point, h (k) (n) is the heuristic cost function of the current target prediction point, n 目标 is the sequence number of the target prediction point, λ a is the acceleration factor of the unmanned aerial vehicle, a is the acceleration required for the expansion of the current target prediction point, k is the current target prediction point, g is the node adjacent to the current target prediction point, p x is the x-axis coordinate of the node, p y is the y-axis coordinate of the node, p z is the z-axis coordinate of the node.
[0086] The Hybrid A* method of the embodiment differs from the traditional Hybrid A* in that the total acceleration input of the node is defined as the actual cost to reflect the characteristics of the tracking target avoiding obstacles with "minimum energy cost". The heuristic function is defined as the Euclidean distance between the current node and the end point to ensure the efficiency of the search direction.
[0087] It should also be noted that the Hybrid A* method also uses a second-order integral equation as a kinematic constraint to expand the node, and uses Δt as the step size to ensure that the time information of the predicted waypoint is consistent with the predicted trajectory of the Kalman filter.
[0088] After collision detection, if there is no collision point, the current predicted trajectory is determined as the current target trajectory, indicating that there is no collision behavior on the current predicted trajectory, so as to fully utilize the advantages of the Kalman filter in capturing the motion stability of the tracking target.
[0089] By using the Hybrid A* method, the kinematic model of the tracking target is used to expand the search node to generate a path that is more consistent with the motion characteristics of the tracking target, i.e., the current target trajectory, to ensure the executability of the path. In the prediction process of the current target trajectory, the dynamics of the predicted trajectory can be ensured to be reasonable, and the active obstacle avoidance behavior of the tracking target in a complex scene can be handled in combination with the environmental obstacles to efficiently generate a collision-free target prediction trajectory of the tracking target. In this way, the motion intention of the tracking target and the special requirements of the tracking task can be fully considered to improve the safety and reliability of the autonomous tracking of the unmanned aerial vehicle in a dynamic environment.
[0090] Next, step S103 is performed to perform hierarchical path search on the current target trajectory by the A* method to obtain the current search trajectory of the unmanned aerial vehicle.
[0091] Specifically, the current position of the unmanned aerial vehicle is taken as the starting point of the current layer, and the first target prediction point of the current target trajectory is taken as the end point of the current layer, and the A* method is used to search the navigation path of the current layer of the unmanned aerial vehicle. The first target prediction point of the current target trajectory is taken as the starting point of the next layer of the current layer, and the second target prediction point of the current target trajectory is taken as the end point of the next layer of the current layer, and the A* method is used to search the navigation path of the next layer of the current layer, until the end point of the current target trajectory is reached, and the navigation path of each layer is searched layer by layer to obtain the current search trajectory. The navigation path of each layer is the path with the minimum cost function value of the A* method.
[0092] Specifically, taking the current position of the UAV as the start point of the current layer and the first target prediction point of the current target trajectory as the end point of the current layer, the current position of the UAV to the first target prediction point of the current target trajectory forms the current layer, and the navigation path of the current layer is searched by the A* method. The A* method searches multiple paths between the start point and the end point of the current layer, and the path with the minimum cost function value of the A* method in the multiple paths is taken as the navigation path of the current layer.
[0093] The next layer of the current layer is taken as the current layer, in which the first target prediction point of the current target trajectory is taken as the start point of the current layer and the second target prediction point of the current target trajectory is taken as the end point of the current layer, and the navigation path of the current layer is searched by the A* method. In this way, the navigation path of each layer is searched layer by layer until the end point of the current target trajectory is reached. The navigation path of each layer forms the current search trajectory.
[0094] In the process of searching layer by layer, the A* method comprehensively considers the tracking distance, the historical trajectory of the tracking target and the cone-shaped visual field geometry (i.e. the camera cone-shaped visual field of the UAV, which is equivalent to the area that can be seen by human eyes), ensuring that the navigation path of each layer has higher safety, reasonable tracking distance and good tracking target visibility in the tracking process, thereby effectively improving the safety, adaptability and stability of the path in the tracking task of the tracking target. The cost function of the A* method is:
[0095]
[0096] wherein, is the cost function value of the A* method of the lth layer, n 起点 is the start point of the lth layer, g 起点 represents the end point of the lth layer, is the start point position of the lth layer, represents the end point position of the lth layer, is the horizontal Euclidean distance between the start point position of the lth layer and the end point position of the lth layer, is the vertical Euclidean distance between the start point position of the lth layer and the end point position of the lth layer, D t is the expected tracking distance, ω D is the weight coefficient of the tracking distance.
[0097] It should be noted that in the process of searching layer by layer, the A* method of the embodiment considers factors such as obstacles in the environment, avoiding collision behavior in the current search trajectory of the UAV, i.e. the current search trajectory is a collision-free trajectory. This fully considers the uncertainty in the dynamic environment, enabling the UAV to respond in real time and quickly adapt to the rapid changes in the dynamic environment and dynamic target, improving the flight safety, reliability and tracking stability of the UAV in the dynamic scene.
[0098] The hierarchical path search process of the embodiment is to process the current target trajectory of the tracking target in layers, construct a local navigation path layer by layer, and gradually approach the optimal path of the UAV, while effectively controlling unnecessary computing overhead in the search process. The hierarchical path search process realized by combining the A* method with the current target trajectory proposed in the embodiment constructs a navigation path optimized layer by layer. This can complete the path search of the UAV from a long-term perspective, making the UAV have better dynamic adaptability to the rapid changes in the motion state of the tracking target.
[0099] Therefore, in the autonomous tracking task of the UAV, the core goal of path search is not only to solve the shortest path, but more importantly, to ensure the safety, stability and adaptability of the path in the autonomous tracking task, especially in a dynamic environment. The high uncertainty of the environment brings more severe challenges to the safety of the path. To cope with the above challenges, the embodiment proposes a hierarchical path search process combining the current target trajectory of the tracking target and the A* method. This process aims to construct a heuristic search of multiple A* methods in the time-space dimension by combining the current target trajectory information with increasing time scales. At the same time, the path length cost, tracking distance cost, historical trajectory cost and cone-shaped visual field constraint are considered in the heuristic search process of each layer to improve the safety, tracking stability and target visibility of the path.
[0100] Then, step S104 is performed to optimize the current search trajectory to obtain the current reference trajectory of the UAV.
[0101] Specifically, for the navigation path of each layer of the current search trajectory, first, step A1 is performed to perform thinning processing on the navigation path by the RDP (Ramer Douglas Peucker) method to obtain a thinning path corresponding to the navigation path and a thinning navigation point of the thinning path.
[0102] Specifically, as shown in Figure 4 Each layer of the navigation path of the current search trajectory is formed by a plurality of discrete navigation points, and it can be seen that the discreteness of each layer of the navigation path is high, and the tortuosity of the current search trajectory is large. In each layer of the navigation path of the current search trajectory, the RDP method is used to perform thinning processing on the navigation path to obtain the position information of the thinning navigation point, i.e. the thinning navigation point. The thinning navigation point comes from the discrete navigation points on the navigation path. The start point and the end point of each layer of the navigation path and the thinning navigation point form a thinning path of each layer. The thinning path has the advantages of shorter path and smoother path compared with the navigation path.
[0103] By introducing a thinning algorithm to simplify the hierarchical path of the current search trajectory, spatial information of waypoints for the current reference trajectory is constructed, thereby improving the real-time performance and accuracy of the current reference trajectory generation. The hierarchical path search process uses the A* method, whose output waypoints are excessively dense due to the characteristics of the A* method. Directly using this for trajectory generation would lead to trajectory redundancy and decreased computational efficiency. Therefore, this embodiment introduces the RDP method to thin the waypoints of each layer of the navigation path. The RDP method retains key geometric feature points of the navigation path, thereby significantly reducing the number of waypoints while maintaining the overall shape of the navigation path. Specifically, the RDP method is applied separately to simplify the navigation path for each layer, thus avoiding oversimplification of the hierarchical spatial information.
[0104] Next, in step A2, after obtaining the thinned path and the thinned waypoints corresponding to the flight path, a time allocation strategy needs to be applied to the thinned path. If the total length of the thinned path is greater than the total flight length of the UAV, the flight time corresponding to the total path length is determined as the flight time of the thinned path. Here, the total flight length is the total length of the flight path obtained based on the UAV's predicted time step, current speed, and maximum acceleration. If the total length of the thinned path is not greater than the UAV's total flight length, the predicted time step is determined as the flight time of the thinned path.
[0105] Next, step A3 is executed to obtain the flight time of each sub-path of the thinned path based on the flight time of the thinned path and the thinned waypoints of the thinned path. Each sub-path of the thinned path is divided based on the thinned waypoints of the thinned path.
[0106] For example, such as Figure 5 As shown, assume that in a certain layer of the current search trajectory, the total duration of this layer's navigation path is a predicted time step of 0.1s, i.e., Δt = 0.1s. The total length of the thinned path is S1, and the total navigation length of the UAV is S2. The thinned path is the starting point of this layer's navigation path - thinning point 1 - thinning point 2 - ending point of this layer's navigation path. S1 = the path s1 between the starting point and thinning point 1 of this layer's navigation path + the path s2 between thinning point 1 and thinning point 2 + the path s3 between thinning point 2 and the ending point of this layer's navigation path. s1 accounts for 6 / 10 of S1, s2 accounts for 3 / 10 of S1, and s3 accounts for 1 / 10 of S1. S2 = v 起点 +1 / 2a 无人机 Δt 2 v 起点 a represents the current speed of the UAV when it is at the starting point of its flight path on this layer. 无人机 This represents the maximum acceleration of the drone.
[0107] If S1 > S2, indicating that the UAV cannot reach the end point within the predicted time step even if it accelerates at the maximum acceleration from the start point of the layer navigation path, the predicted time step At is determined as the flight time of the thinned path according to S1 = v 起点 + 1 / 2a 无人机 t 目标 2 , the flight time of the thinned path is obtained as t 目标 , t 目标 is the flight time of the thinned path. t 目标 is determined as the flight time of the thinned path. If S1 < S2, indicating that the UAV can reach the end point within the predicted time step even if it accelerates at the maximum acceleration from the start point of the layer navigation path, the predicted time step At is determined as the flight time of the thinned path.
[0108] After determining the flight time of the thinned path, the flight time of each sub-path in the thinned path is allocated according to the proportion of each sub-path in the thinned path. s1 accounts for 6 / 10 of S1, s2 accounts for 3 / 10 of S1, and s3 accounts for 1 / 10 of S1. The flight time of path s1 between the start point of the layer navigation path and the thinned point 1 is the flight time of the thinned path x 6 / 10. The flight time of path s2 between the thinned point 1 and the thinned point 2 is the flight time of the thinned path x 3 / 10. The flight time of path s3 between the thinned point 2 and the end point of the layer navigation path is the flight time of the thinned path x 1 / 10.
[0109] After constructing the spatial information of the waypoints of the current reference trajectory, a time allocation strategy needs to be further designed to generate the time information of the waypoints. In this time allocation strategy, the motion prediction of the tracking target and the dynamic constraints of the UAV are considered comprehensively to ensure the reasonableness and feasibility of the time parameters, and to improve the flight safety, reliability and tracking stability of the UAV in dynamic scenarios.
[0110] Then, step A4 is performed to obtain the optimized navigation path according to the thinned path, the flight time of the thinned path, and the flight time of each sub-path of the thinned path. Specifically, the thinned path, the flight time of the thinned path, and the flight time of each sub-path of the thinned path are processed by a BIVP (Boundary Intermediate Value Problem) trajectory optimization method to obtain the optimized navigation path. Here, the hierarchical spatial information and time information of the waypoints are combined with the BIVP method to generate a hierarchical spatiotemporal trajectory that highly fits the autonomous tracking task. The hierarchical spatiotemporal information is converted as input of the reference trajectory generation method model, and finally a smooth and dynamically feasible polynomial trajectory is generated, which provides a high-quality reference trajectory with good dynamic feasibility and tracking adaptability for the actual flight state and actual flight trajectory of the UAV (i.e., the UAV's planning control integration process, also referred to as step S105).
[0111] The above-mentioned thinning processing and time length allocation processing are performed on each layer of the current search trajectory to obtain an optimized flight path of each layer of the current search trajectory, and then a current reference trajectory is obtained. Specifically, the above-mentioned steps A1-A4 are performed on each layer of the current search trajectory to obtain an optimized flight path of each layer. The optimized flight path of each layer of the current search trajectory forms the current reference trajectory.
[0112] The high-quality reference trajectory, i.e., the current reference trajectory, generated by step S104 is crucial for subsequent trajectory optimization and motion control of the UAV in the planning and control integration process of the UAV. The embodiment proposes a reference trajectory generation process based on hierarchical spatiotemporal information for autonomous tracking. First, hierarchical spatial information is constructed based on the thinned path corresponding to each layer flight path output by the RDP method. Second, waypoint selection and time allocation of the reference trajectory are completed. On this basis, the BIVP method is used to generate a high-quality reference trajectory that meets the dynamics constraints of the UAV in real time. The reference trajectory is in the same topology as the hierarchical path in space and matches the motion prediction trajectory of the tracked target (i.e., the current target trajectory of the tracked target) in time. Step S104 generates the reference trajectory, i.e., the current reference trajectory, by fully considering the spatiotemporal information in the autonomous tracking task, which provides excellent reference values for high-frequency optimization in the subsequent planning and control integration process of the UAV.
[0113] Finally, step S105 is performed to control the UAV to fly along the target prediction trajectory corresponding to the current reference trajectory and control the current flight state of the UAV based on the current reference trajectory, so as to realize tracking flight of the UAV on the tracked target.
[0114] Specifically, a state transition model of model predictive control (MPC) of the UAV is obtained, and reference parameters of the MPC are set according to the current reference trajectory. Based on the reference parameters of the MPC, the state transition model of the MPC is constrained by a minimization objective function of the MPC to obtain a target prediction trajectory, and the UAV is controlled to fly according to the target prediction trajectory while the current flight state is controlled.
[0115] wherein the state vector of the UAV is defined as x' i = [p' i , v' i , a' i ] T by the MPC, p' i is position information of the UAV at the i-th waypoint, v i ' is the speed of the UAV at the i-th waypoint, and a iThe acceleration of the UAV at the i-th waypoint. The input of the MPC is the jerk u' i i i The derivative of the velocity. The range of the jerk of the UAV in the MPC can be set according to actual needs. The state transition model of the MPC is described by a fourth-order integral model, which ensures the continuity of the target prediction trajectory in position, velocity and acceleration through high-order derivatives, and lays a kinematic foundation for subsequent optimization. The state transition model of the MPC is:
[0116]
[0117] According to the current reference trajectory, the specific reference parameters of the MPC are set, in order to ensure that the smooth local trajectory generated by the MPC is consistent with the motion prediction of the tracking target in space and time, the prediction time step and the prediction window size of the MPC are respectively aligned with the prediction time step At and the prediction window size N of the tracking target. At the same time, each reference value of each prediction time step of the MPC corresponds to each waypoint of the current reference trajectory generated in step S104. The current reference trajectory contains N discrete points, corresponding to each time step in the prediction window of the MPC, ensuring that the target prediction trajectory generated by the MPC matches the autonomous tracking task requirements.
[0118] The MPC comprehensively considers multiple costs to achieve a balance between the smoothness of the target prediction trajectory, the control stability of the UAV and the tracking accuracy of the trajectory. The minimization objective function of the MPC is the cost function f of the MPC optimization problem, defined as follows:
[0119]
[0120] Where f is the function value of the minimization objective function of the MPC, p' ref,i is the position information of the UAV at the i-th waypoint of the current reference trajectory, i.e. the reference value, p i is the position information of the UAV at the i-th waypoint of the current target trajectory, R p is the position weight, u i is the jerk of the UAV at the i-th waypoint of the current target trajectory, R u is the jerk weight, v' N is the velocity of the UAV under the last segment of the flight path of the current target trajectory, R v,N is the velocity weight of the UAV under the last segment of the flight path of the current target trajectory, a' N is the acceleration of the UAV under the last segment of the flight path of the current target trajectory, R a,N is the acceleration weight of the UAV under the last segment of the flight path of the current target trajectory, R u,c The smoothness weight of the input jerk, u' m The jerk obtained by minimizing the objective function, which is the mthjerk.
[0121] The reference path tracking error cost ||p' ref,i -p' i || 2 ×R p : used to measure the deviation between the predicted position of the MPC of the UAV and the reference position, ensuring that the target predicted trajectory fits the reference trajectory.
[0122] The control input cost ||u' i || 2 ×R u : used to limit the size of the control input, thereby controlling the total energy consumption of the target predicted trajectory, while preventing excessive control from causing the method to become unstable.
[0123] The control input smoothness cost ||u' i+1 -u' i || 2 ×R u,c : used to reduce the mutation of the control input, ensuring that the target predicted trajectory is smooth and reducing camera jitter and motion blur caused by body jitter.
[0124] The terminal velocity cost ||v' N || 2 ×R v,N : used to constrain the velocity of the UAV at the end of the prediction time domain, avoiding excessive end velocity.
[0125] The terminal acceleration cost ||a' N || 2 ×R a,N : used to constrain the acceleration of the UAV at the end of the prediction time domain, ensuring smooth movement of the UAV.
[0126] By minimizing this comprehensive cost function, i.e., the minimization objective function of the MPC, the MPC generates a local trajectory that is smooth and fits the reference path, i.e., the target predicted trajectory, while maintaining the stability of the control input, under the premise of satisfying the constraints. The design of this optimization problem lays the foundation for subsequent constraint and control quantity conversion, achieving high integration of planning and control, thereby improving the autonomous tracking ability of the UAV in dynamic environments.
[0127] The step S105 of the embodiment is a planning control method based on a prediction control of a rolling horizon model, and the planning and control are unified in the model prediction control to realize collaborative optimization. The method of the step S105 takes the model prediction control as the core, converts the MPC problem into the trajectory optimization problem of the UAV through the optimization function, and comprehensively considers the reference path tracking error cost, the control input cost and the control input smoothness cost in the optimization function. In addition, in order to effectively deal with the environmental obstacles and the UAV dynamics limit, the method introduces the convex polyhedron constraint based on the safety corridor and the dynamics constraint in the optimization problem. Finally, the method establishes the explicit mapping of the trajectory parameters and the control input through the differential flatness characteristic, eliminates the interface delay between the planning and control modules in the traditional architecture, realizes the high integration of the planning and control, and generates the optimal control instruction and the smooth local trajectory for the autonomous tracking task in real time on the basis of the previously generated reference trajectory, significantly improves the real-time performance and response ability of the UAV motion planning system, and thus enhances the tracking safety, stability and accuracy of the UAV in the dynamic scene.
[0128] In addition, the UAV autonomous tracking method of the embodiment is repeatedly executed. At the current time, the steps S101-S105 are executed, at the next time of the current time, the steps S101-S105 are repeatedly executed, and the steps are sequentially and cyclically extended.
[0129] The one or more technical solutions in the embodiment of the application have at least the following technical effects or advantages:
[0130] After obtaining the current information of the tracking target of the UAV, the current prediction trajectory of the tracking target is obtained by performing prediction processing on the current information through the Kalman filter. Through the Kalman filter, the future state of the tracking target can be predicted based on the current information of the tracking target to obtain the current prediction trajectory of the tracking target. In addition, the motion state of the tracking target can be efficiently estimated under the interference of visual detection noise, and accurate state estimation of the tracking target is provided through recursive updating, so that the short-time stability of the tracking target in motion is captured. The current target trajectory of the tracking target is obtained by performing optimization processing on the current prediction trajectory through the Hybrid A* method. The kinematic model of the tracking target is used to expand the search target prediction point to produce a path that is more consistent with the motion characteristics of the tracking target, i.e., the current target trajectory. In this way, the executability and dynamics rationality of the current target trajectory of the tracking target are ensured, and the obstacle avoidance behavior of the tracking target is also realized, so that a collision-free prediction trajectory is efficiently generated, and the importance of the executable trajectory of the tracking target is ensured. In this way, the motion intention of the tracking target and the special requirements of the tracking task can be fully considered to improve the safety and reliability of the UAV autonomous tracking in the dynamic environment.
[0131] Then, the current search trajectory of the UAV is obtained by performing hierarchical path search on the current target trajectory by using the A* method. This is to process the current target trajectory in layers, construct a local navigation path layer by layer, and gradually approach the optimal path of the UAV, so as to complete the navigation path search of the UAV from a long-term perspective. At the same time, unnecessary calculation overheads in the hierarchical path search process are effectively controlled, so that the UAV has better dynamic adaptability to the rapid changes of the motion state of the tracked target. Then, the current search trajectory is optimized to obtain the current reference trajectory of the UAV. This is to extract the optimized waypoints from different layers of the current search trajectory, generate a smooth and dynamically feasible polynomial optimized current search trajectory, i.e., the current reference trajectory, which provides a high-quality reference trajectory with good dynamic feasibility and tracking adaptability for subsequent control of the actual flight state and actual flight trajectory of the UAV. Finally, based on the current reference trajectory, the UAV is controlled to fly along the target predicted trajectory corresponding to the current reference trajectory and control the current flight state of the UAV, so as to realize the tracking flight of the UAV on the tracked target. In this way, the high integration of planning and control is realized, the uncertainty in the dynamic environment is fully considered, the UAV can respond in real time and quickly, adapt to the rapid changes of the dynamic environment and the dynamic tracked target, the autonomous tracking ability of the UAV in the dynamic environment is improved, and the flight safety, reliability and tracking stability of the UAV in the dynamic scene are enhanced.
[0132] Embodiment two
[0133] Based on the same inventive concept, the second embodiment of the present application also provides a UAV device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of any one of the above autonomous tracking methods for the UAV in the dynamic scene when executing the program.
[0134] Those skilled in the art will appreciate that embodiments of the application can be provided as methods and devices. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they understand the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0135] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.
Claims
1. A method for autonomous tracking of a UAV in a dynamic scene, the method comprising: The application relates to a method for tracking a target by a UAV (Unmanned Aerial Vehicle). After obtaining current information of a tracking target of a UAV, the current information is processed by a Kalman filter to obtain a current predicted trajectory of the tracking target; The current predicted trajectory is processed by a Hybrid A* method to obtain a current target trajectory of the tracking target; The current target trajectory is processed by an A* method to obtain a current search trajectory of the UAV; The current search trajectory is processed to obtain a current reference trajectory of the UAV; Based on the current reference trajectory, the UAV is controlled to fly along a target predicted trajectory corresponding to the current reference trajectory and the current flight state of the UAV is controlled to realize tracking flight of the UAV on the tracking target. 2.The method for dynamic scene oriented autonomous tracking of UAVs according to claim 1, wherein, The current predicted trajectory is processed by a Hybrid A* method to obtain a current target trajectory of the tracking target, and the method comprises the following steps: Collision detection is performed on a predicted point of the current predicted trajectory and an environmental obstacle to determine whether a collision point exists; If the collision point exists, an obstacle avoidance point of the current predicted trajectory is obtained according to a corresponding predicted point of the collision point, the obstacle avoidance point is taken as a starting point, and a terminal point of the current predicted trajectory is taken as an end point, and the Hybrid A* method is used to obtain the current target trajectory, wherein the corresponding predicted point is a predicted point that collides with the collision point earliest, the obstacle avoidance point is a target predicted point that meets a preset obstacle avoidance condition among the predicted points before the corresponding predicted point, the preset obstacle avoidance condition is that a Euclidean distance between the target predicted point and the corresponding predicted point is greater than a preset obstacle avoidance distance, and the Euclidean distance between the target predicted point and the corresponding predicted point is the smallest among the predicted points before the corresponding predicted point; If the collision point does not exist, the current predicted trajectory is determined as the current target trajectory. 3.The method of claim 2, wherein, The obstacle avoidance point is taken as a starting point, a terminal point of the current predicted trajectory is taken as an end point, and the Hybrid A* method is used to obtain the current target trajectory, and the method comprises the following steps: From the obstacle avoidance point, a next target predicted point of the obstacle avoidance point is determined by a cost function of the Hybrid A* method, the next target predicted point of the obstacle avoidance point is taken as a current target predicted point, a next target predicted point of the current target predicted point is determined by the cost function of the Hybrid A* method, and the current target trajectory is obtained until the terminal point of the current predicted trajectory is reached, the target predicted point is a node with the minimum cost function value of the Hybrid A* method; The cost function of the Hybrid A* method is as follows: f k (n) is the total cost function of the current target prediction point, and is also the cost function value of the Hybrid A* method, g k (n) is the actual cost function of the current target prediction point, h (k) (n) is the heuristic cost function of the current target prediction point, n 目标 is the sequence number of the target prediction point, λ a is the acceleration factor of the UAV, a is the acceleration required for the current target prediction point to expand, k is the current target prediction point, g is the node adjacent to the current target prediction point, p x is the x-axis coordinate of the node, p y is the y-axis coordinate of the node, p z is the z-axis coordinate of the node. 4.The method of claim 2, wherein, The current target trajectory is processed by an A* method to obtain a current search trajectory of the UAV, and the method comprises the following steps: The current position of the unmanned aerial vehicle is taken as a starting point of a current layer, a first target prediction point of the current target trajectory is taken as an end point of the current layer, a navigation path of the current layer is searched by the A* method, the first target prediction point of the current target trajectory is taken as a starting point of a next layer of the current layer, a second target prediction point of the current target trajectory is taken as an end point of the next layer of the current layer, a navigation path of the next layer of the current layer is searched by the A* method, until the end point of the current target trajectory is reached, a navigation path of each layer is searched layer by layer, and the current search trajectory is obtained, wherein the navigation path of each layer is a path with a minimum cost function value of the A* method.
5. The method of claim 4, wherein, The cost function of the A* method is: wherein, is a cost function value of the A* method for the lth layer, n 起点 is a start point of the lth layer, g 起点 denotes an end point of the lth layer, is a start point position of the lth layer, denotes an end point position of the lth layer, is a horizontal Euclidean distance between the start point position of the lth layer and the end point position of the lth layer, is a vertical Euclidean distance between the start point position of the lth layer and the end point position of the lth layer, D t is a desired tracking distance, ω D is a weight coefficient of the tracking distance. 6.The method for dynamic scene oriented autonomous tracking of UAVs according to claim 5, wherein, The optimization processing on the current search trajectory to obtain the current reference trajectory of the unmanned aerial vehicle comprises: For the navigation path of each layer of the current search trajectory, the RDP (Ramer Douglas Peucker) method is used to perform thinning processing on the navigation path, to obtain a thinned path corresponding to the navigation path and a thinned navigation point of the thinned path; If the total length of the thinned path is greater than the total navigation length of the unmanned aerial vehicle, the flight time corresponding to the total path is determined as the flight time of the thinned path, wherein the total navigation length is a total navigation path length obtained based on a predicted time step, a current speed and a maximum acceleration of the unmanned aerial vehicle; If the total length of the thinned path is not greater than the total navigation length of the unmanned aerial vehicle, the predicted time step is determined as the flight time of the thinned path; According to the flight time of the thinned path and the thinned navigation point of the thinned path, the flight time of each sub-path of the thinned path is obtained, wherein each sub-path of the thinned path is divided based on the thinned navigation point of the thinned path; According to the thinned path, the flight time of the thinned path and the flight time of each sub-path of the thinned path, an optimized navigation path is obtained. The thinning processing and the time length allocation processing are performed on each navigation path of each layer of the current search trajectory, to obtain the optimized navigation path of each layer of the current search trajectory, and further to obtain the current reference trajectory.
7. The method of claim 6, wherein, The control of the unmanned aerial vehicle along the target prediction trajectory corresponding to the current reference trajectory and the control of the current flight state of the unmanned aerial vehicle based on the current reference trajectory comprise: An MPC (Model Predictive Control) state transition model of the unmanned aerial vehicle is obtained, and reference parameters of the MPC are set according to the current reference trajectory; The state transition model of the MPC is constrained by a minimization objective function of the MPC based on the reference parameters of the MPC, to obtain the target prediction trajectory, and the unmanned aerial vehicle is controlled to fly according to the target prediction trajectory, and the current flight state is controlled. 8.The method of claim 7, wherein, The minimization objective function of the MPC is: wherein f is a function value of a minimization objective function of the MPC, p ref,i is position information of the UAV at the i-th waypoint of the current reference trajectory, p i is position information of the UAV at the i-th waypoint of the current target trajectory, R p is a position weight, u i is jerk of the UAV at the i-th waypoint of the current target trajectory, R u is a jerk weight, v N is velocity of the UAV under the last segment of the flight path of the current target trajectory, R v,N is a velocity weight of the UAV under the last segment of the flight path of the current target trajectory, a N is acceleration of the UAV under the last segment of the flight path of the current target trajectory, R a,N is a velocity weight of the UAV under the last segment of the flight path of the current target trajectory, R u,c is a smoothness weight of the input jerk, u m is a jerk obtained by the minimization objective function, the jerk being the m-th jerk. 9.The method of claim 1, wherein, The prediction processing on the current information by the Kalman filter to obtain the current prediction trajectory of the tracking target comprises: The second-order integral equation is taken as a state transition equation of the Kalman filter to obtain the current predicted trajectory, wherein the state transition equation of the Kalman filter is: v n = v n-1 + a n-1 · Δt; x n = [p n , v n , a n ] T , u0= [p0,v0] T ; wherein p n is the position information of the tracking target at the n-th prediction point of the current prediction trajectory, v n is the velocity of the tracking target at the n-th prediction point of the current prediction trajectory, a n is the acceleration of the tracking target at the n-th prediction point of the current prediction trajectory, u n is the jerk of the tracking target at the n-th prediction point of the current prediction trajectory, p0 is the initial position information of the tracking target, v0 is the initial velocity of the tracking target, and u0 is the initial jerk of the tracking target.
10. A drone device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor implements the method for autonomous tracking of the unmanned aerial vehicle in the dynamic scene according to any one of claims 1-9 when executing the program.