Unmanned aerial vehicle control method, apparatus, device, storage medium, and program product

By determining the real-time status and desired trajectory data of the UAV, calculating the compensation torque and optimizing the feedback control strategy, the problem of UAV control accuracy and stability being affected by signal time delay is solved, and efficient and stable tracking in complex environments is achieved.

CN122186445APending Publication Date: 2026-06-12ANHUI KAIYANG TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610295764.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-11
Publication Date
2026-06-12

Smart Images

  • Figure CN122186445A_ABST
    Figure CN122186445A_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned plane control method, device, equipment, storage medium and program product, belong to unmanned plane technical field.In the present application, first determine position error data and speed error data;Position control data is determined based on position error data, speed error data and historical control data;Desired attitude data is determined based on position control data;Attitude error data and angular velocity error data are determined based on real-time state data and desired attitude data;Compensation torque data is determined based on angular velocity error data, historical torque control data and unmanned plane dynamics data;Target feedback data is determined based on angular velocity error data;Attitude torque control data is determined based on attitude error data, angular velocity error data, compensation torque data and target feedback data;Motor control instruction for unmanned plane is determined based on position control data and attitude torque control data, and unmanned plane is controlled based on motor control instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a UAV control method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the rapid development of drone technology, drones, due to their simple structure and high maneuverability, have been widely used in aerial surveying, logistics delivery, and agricultural plant protection. In actual flight missions, drones need to accurately track preset trajectories under external environmental interference, which places high demands on the robustness and optimization of the control system.

[0003] Currently, most existing UAV trajectory tracking control methods employ a traditional hierarchical control architecture, where the outer-loop position control and inner-loop attitude control are separated. The position loop typically uses proportional-integral-derivative (PI-DI) control or backstepping control to generate the desired attitude command, while the attitude loop achieves attitude tracking through linear control methods or sliding mode control. Some methods introduce disturbance observers to estimate external disturbances or use adaptive control to address parameter uncertainties.

[0004] However, when dealing with the time delay problem in control signal transmission, related technologies usually adopt simple phase advance compensation, failing to effectively utilize the dynamic characteristics of UAVs for active compensation. This makes it difficult to fundamentally solve the phase lag problem caused by time delay, thereby affecting the control accuracy and stability of UAVs. Summary of the Invention

[0005] This application provides a method, apparatus, device, storage medium, and program product for controlling unmanned aerial vehicles (UAVs), which can solve the problem of poor control accuracy in UAVs. The technical solution is as follows: On the one hand, a method for controlling an unmanned aerial vehicle (UAV) is provided, the method comprising: Acquire real-time status data and desired trajectory data of the drone; Based on the real-time status data and the desired trajectory data, position error data and velocity error data are determined; based on the position error data, velocity error data, and historical control data, position control data is determined; based on the position control data, desired attitude data is determined. Based on the real-time status data and the desired attitude data, attitude error data and angular velocity error data are determined; based on the angular velocity error data, historical torque control data, and UAV dynamics data, compensation torque data is determined; based on the angular velocity error data, target feedback data is determined; based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data, attitude torque control data is determined. Based on the position control data and the attitude torque control data, motor control commands are determined for the UAV, and the UAV is controlled based on the motor control commands.

[0006] In one possible implementation, determining the position control data based on the position error data, the velocity error data, and the historical control data includes: The first interference data is determined based on the speed error data and the historical control data; The position control data is determined based on the position error data, the velocity error data, and the first interference data.

[0007] In another possible implementation, determining the compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data includes: The equivalent torque data is determined based on the historical torque control data; The second interference data is determined based on the angular velocity error data, the equivalent torque data, and the UAV dynamics data. The compensation torque data is determined based on the second interference data.

[0008] In another possible implementation, determining the target feedback data based on the angular velocity error data includes: The angular velocity error data is input into a designated evaluation network to obtain performance index data; The parameter data of the specified evaluation network are updated based on the performance index data and the specified weight data; The target feedback data is determined based on the updated parameter data.

[0009] In another possible implementation, determining the target feedback data based on the updated parameter data includes: Determine gradient data based on updated parameter data; The target feedback data is determined based on the gradient data and the specified weight data.

[0010] In another possible implementation, determining the motor control commands for the UAV based on the position control data and the attitude torque control data includes: The position control data and the attitude torque control data are allocated to obtain the allocation data. The motor control command is determined based on the allocated data.

[0011] On the other hand, a drone control device is provided, the device comprising: The acquisition module is configured to acquire real-time status data and desired trajectory data of the UAV; The first determining module is configured to determine position error data and velocity error data based on the real-time status data and the desired trajectory data; determine position control data based on the position error data, the velocity error data, and historical control data; and determine desired attitude data based on the position control data. The second determining module is configured to: determine attitude error data and angular velocity error data based on the real-time state data and the desired attitude data; determine compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data; determine target feedback data based on the angular velocity error data; and determine attitude torque control data based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data. A control module is configured to determine motor control commands for the UAV based on the position control data and the attitude torque control data, and to control the UAV based on the motor control commands.

[0012] In one possible implementation, the first determining module is configured to: The first interference data is determined based on the speed error data and the historical control data; The position control data is determined based on the position error data, the velocity error data, and the first interference data.

[0013] In another possible implementation, the second determining module is used for: The equivalent torque data is determined based on the historical torque control data; The second interference data is determined based on the angular velocity error data, the equivalent torque data, and the UAV dynamics data. The compensation torque data is determined based on the second interference data.

[0014] In another possible implementation, the second determining module is used for: The angular velocity error data is input into a designated evaluation network to obtain performance index data; The parameter data of the specified evaluation network are updated based on the performance index data and the specified weight data; The target feedback data is determined based on the updated parameter data.

[0015] In another possible implementation, the second determining module is used for: Determine gradient data based on updated parameter data; The target feedback data is determined based on the gradient data and the specified weight data.

[0016] In another possible implementation, the control module is used for: The position control data and the attitude torque control data are allocated to obtain the allocation data. The motor control command is determined based on the allocated data.

[0017] On the other hand, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the method described in any of the above.

[0018] On the other hand, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in any of the preceding claims.

[0019] On the other hand, a computer program product is provided, including computer program instructions that, when run on a computer, cause the computer to perform the method described in any of the preceding claims.

[0020] The beneficial effects of the technical solution provided in this application are as follows: By determining the tracking error of position and attitude, the controller ensures rapid response and accurate tracking of the target trajectory. Utilizing historical control data and UAV dynamics data to determine the compensation torque effectively counteracts the adverse effects of inherent UAV dynamics and latency, enhancing control stability and anti-disturbance capability. By determining target feedback data online based on angular velocity error, the UAV can dynamically optimize its feedback control strategy, favoring more efficient and lower-energy-consumption control actions while maintaining tracking accuracy, thus achieving an optimal performance balance overall and helping to extend the UAV's endurance. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart of the unmanned aerial vehicle (UAV) control method provided in an embodiment of this application; Figure 3This is a flowchart of a drone control method provided in another embodiment of this application; Figure 4 This is a schematic diagram of the simulation results provided in the embodiments of this application; Figure 5 This is a schematic diagram of the simulation results provided in the embodiments of this application; Figure 6 This is a schematic diagram of the simulation results provided in the embodiments of this application; Figure 7 This is a schematic diagram of the simulation results provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of the unmanned aerial vehicle control device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0024] This disclosure provides a method for controlling an unmanned aerial vehicle (UAV). This method can be implemented using a computer device, which may be a terminal device or a server installed inside the UAV. The terminal device may be an onboard computing unit or a flight control computer (FCC). The server may be an application server, a cloud service server, or a server used to perform certain computing tasks, etc. This disclosure uses the example of a terminal device as the computer device for detailed explanation; other cases are similar and will not be described in detail.

[0025] like Figure 1 As shown, the terminal device may include a processor 110, a memory 120, and a communication component 130, etc.

[0026] Processor 110 can be a central processing unit (CPU), which can be used to execute various operation instructions.

[0027] The memory 120 can be various volatile or non-volatile memory, such as solid-state disk (SSD), dynamic random access memory (DRAM), etc. The memory can be used to store pre-stored data, intermediate data, and result data related to the processing.

[0028] The communication component 130 can be a wired network connector, a wireless fidelity (WiFi) module, a Bluetooth module, a cellular communication module, etc. The communication component can be used to transmit data with other devices.

[0029] In some embodiments, such as Figure 2 As shown, the UAV control method includes: S201. Obtain real-time status data and desired trajectory data of the UAV.

[0030] Real-time status data refers to data measured and fed back by the UAV's onboard sensors in real time during flight. This includes, but is not limited to, the UAV's actual position coordinates in three-dimensional space, its actual speed in three-dimensional space, its actual rotational attitude angles (including roll, pitch, and yaw), and its actual angular velocity about its own axis. Desired trajectory data typically refers to a pre-given or operator-specified trajectory that the UAV needs to precisely follow, including the sequence of desired position coordinates the UAV needs to reach in three-dimensional space and the desired yaw angle the UAV needs to maintain.

[0031] S202. Determine position error data and velocity error data based on the real-time status data and the desired trajectory data; determine position control data based on the position error data, the velocity error data, and historical control data; determine desired attitude data based on the position control data.

[0032] Position error data refers to the difference between the actual position coordinates of the UAV and its expected position coordinates at the same moment in each direction; that is, the degree of deviation between the UAV's current position and the target position. Velocity error data refers to the difference between the UAV's actual speed and its expected flight speed. The expected flight speed is not directly derived from the expected trajectory data, but is an intermediate target speed calculated based on the position error data using a virtual control law algorithm. Its purpose is to guide the UAV to move in a direction that reduces position error. Therefore, velocity error data is simply the difference between the UAV's actual speed and this intermediate target speed (expected flight speed).

[0033] Historical control data refers to the position control data calculated and output in the previous control cycle. The process of determining position control data includes: based on velocity error data and historical control data, using a nonlinear disturbance observer algorithm, determining the first disturbance data. The first disturbance data is a real-time estimate of the unknown external disturbance (such as persistent wind or gusts) acting on the UAV's position dynamics. The nonlinear disturbance observer, based on the current velocity error data and historical control data, continuously updates its internal dynamics to estimate the magnitude and direction of the disturbance at the current moment. Then, based on the position error data, velocity error data, and the first disturbance data, a backstepping control algorithm is used to calculate and synthesize the position control data. The position control data is a three-dimensional vector, and its physical meaning is the components of the total lift that the UAV needs to generate at the current moment in three spatial directions. This force is used to overcome gravity, counteract wind disturbances, and accurately track the desired position trajectory.

[0034] Since UAVs generate the required horizontal force by changing their own attitude, it is necessary to deduce the attitude the UAV should achieve to generate this force from the calculated position control data. The desired attitude data refers to the target body rotation angles that the UAV needs to achieve to accurately execute the commands corresponding to the position control data, including the desired roll angle, desired pitch angle, and desired yaw angle. The desired yaw angle is directly derived from the desired trajectory data. The desired roll angle and desired pitch angle are obtained by geometrically solving the horizontal and vertical components of the force in the position control data. This calculation process ensures that when the UAV maintains this desired attitude, the total lift generated by its rotors, after being decomposed in space, precisely provides the three-dimensional control force required by the position control data.

[0035] S203. Determine attitude error data and angular velocity error data based on the real-time status data and the desired attitude data; determine compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data; determine target feedback data based on the angular velocity error data; determine attitude torque control data based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data.

[0036] The attitude error data refers to the difference between the actual rotational attitude angle of the UAV and the desired attitude data determined in the previous step, reflecting the gap between the UAV's current attitude and the target attitude to be achieved. The angular velocity error data refers to the difference between the actual rotational angular velocity of the UAV and the currently desired rotational angular velocity. The desired rotational angular velocity is an intermediate target angular velocity calculated using a virtual control law algorithm based on the attitude error data, aiming to guide the UAV's rotational speed in a direction that reduces attitude error. In short, the angular velocity error data is the difference between the actual angular velocity and the intermediate target angular velocity (desired rotational angular velocity).

[0037] Historical torque control data refers to the attitude torque control data calculated and output in the previous control cycle. UAV dynamics data refers to model data describing the inherent laws of the UAV's attitude rotational motion. The process of determining compensation torque data includes: Addressing the signal transmission and execution delays (input time lag) in the UAV's control system, the historical torque control data is processed using the Pad approximation mathematical method to determine equivalent torque data. Equivalent torque data is an intermediate variable that simulates the equivalent effect of historical control commands on the UAV at the current moment, considering the time lag. Next, based on angular velocity error data, equivalent torque data, and UAV dynamics data, a second disturbance data is determined using a nonlinear disturbance observer. This second disturbance data is a real-time estimate of the unknown external disturbance torque (such as asymmetric aerodynamic torque) acting on the UAV's attitude dynamics. Finally, based on the second disturbance data and combined with the dynamic characteristics of the desired attitude, the compensation torque data is calculated using a feedforward control law. The compensation torque data is the compensating control torque that needs to be applied in advance to counteract the estimated external disturbance torque and linearize the system dynamics.

[0038] Angular velocity error data is input into a pre-constructed designated evaluation network (single evaluation network) to assess the long-term control cost implied by the current angular velocity error state. Its output is the performance index data. To guide the network's learning and updating towards the desired optimal performance, designated weight data, i.e., pre-defined positive definite symmetric matrices, are introduced, including a state error weight matrix and a control energy consumption weight matrix, used to quantify the importance of tracking accuracy and actuator energy consumption in the performance index, respectively. The learning objective of the designated evaluation network is to make its output performance index data (i.e., performance index function) approximate the theoretically optimal solution satisfying the Hamilton-Jacobi-Bellman equation, which is a core condition for solving the infinite-time domain optimal control problem. Based on the current network output performance index data, dynamic angular velocity error, and designated weight data, the Hamiltonian error is calculated. Using the Hamiltonian error as a driving signal, an adaptive update law dynamically adjusts the connection weights within the designated evaluation network online, i.e., updates its parameter data, thereby making the network's prediction of long-term performance increasingly accurate. As the parameter data is continuously updated, the network's sensitivity to changes in the performance index function, i.e., its gradient data, is also more accurately characterized. Based on the fact that the optimal feedback control law is proportional to the negative gradient of the optimal performance index function with respect to the system state, the gradient data generated by the updated network is combined with the control energy consumption weight matrix in the specified weight data to perform a combined operation, thereby parsing out the target feedback data that approximates the theoretical optimal solution at the current moment. The target feedback data is a torque vector, which can balance the tracking speed and control cost to achieve the optimal overall performance.

[0039] The compensation torque data is added to the target feedback data to form a base torque command. Simultaneously, to further ensure the stable convergence of attitude and angular velocity errors, the base torque command is adjusted through a linear feedback loop, incorporating both attitude and angular velocity error data. Finally, all these components are combined to obtain complete attitude torque control data.

[0040] S204. Based on the position control data and the attitude torque control data, determine the motor control command for the UAV, and control the UAV based on the motor control command.

[0041] Specifically, position control data and attitude torque control data are used as input to the control distributor for calculation. Based on the mechanical layout of the (quadcopter) UAV (e.g., a cross or X shape), a matrix multiplication operation is performed to obtain the distribution data. The distribution data represents the squared value of the thrust or lift that each of the four motors needs to provide. Based on the distribution data, the final motor control commands sent to the four electronic speed controllers are determined using a motor model or lookup table. These motor control commands are typically pulse-width modulated signals or target speed values. The electronic speed controllers drive the motors to the corresponding speeds according to the motor control commands, thereby generating precise thrust and torque, ultimately achieving flight control of the UAV and enabling it to robustly and optimally track the desired trajectory.

[0042] In this embodiment, the robustness of the UAV against disturbances such as gusts is significantly improved by using a nonlinear disturbance observer to estimate and feedforward compensate for unknown external forces and torques in real time. The Pad approximation technique effectively addresses the input time delay problem in control signal transmission and execution, avoiding performance degradation or even instability caused by delays. Particularly noteworthy is the adoption of an online learning mechanism based on adaptive dynamic programming using a single-evaluation network. This mechanism dynamically optimizes the feedback control strategy online, aiming to minimize a comprehensive performance index extending from the current moment to an infinite future timeframe. This index simultaneously balances trajectory tracking accuracy and control... In terms of energy consumption, the UAV can not only accurately track in the present, but its control behavior throughout the entire flight process is globally optimized, thus theoretically achieving optimal tracking on an infinite time scale, maximizing the UAV's endurance and reducing actuator wear. In addition, the complex trajectory tracking control problem is decoupled into cascaded control of position and attitude loops, and clearly connected through an inverse solver, resulting in a clear structure that is conducive to engineering implementation and debugging. By comprehensively utilizing feedforward compensation, feedback optimization, and interference observation, the UAV can still stably and accurately complete the trajectory tracking task in an energy-optimal manner under conditions of interference and time delay.

[0043] In some embodiments, such as Figure 3 As shown, the control algorithm of the UAV control method is substituted into the simulation model for testing, including: S301. Considering the constraints of input time delay and external disturbances on the model, establish the position loop and attitude loop dynamic models of the UAV system respectively.

[0044] S302. The Pad approximation technique is used to address the input time delay problem in the attitude loop, and the external disturbances existing in the position loop and attitude loop are estimated by the disturbance observer technique within the backstepping framework.

[0045] S303. Design of an optimal robust trajectory tracking controller based on a single-network adaptive dynamic programming algorithm.

[0046] S304. Analyze the stability conditions of a closed-loop system using the Lyapunov stability method.

[0047] S305. Substitute the control algorithm into the simulation model for testing to verify that the control algorithm can be used for the control of the UAV system and has good performance.

[0048] In step S301, based on the constraints of input time delay and external disturbances on the model, the position loop and attitude loop dynamic models of the UAV system are established respectively. The specific method is as follows:

[0049] Table 1: Physical meaning of each parameter Considering the constraints of input time delay and external disturbances on the quadrotor unmanned aerial vehicle (QUAV) system, its dynamic model is shown in the following formulas (1) and (2): (1) (2) in The physical meanings of the remaining parameters are shown in Table 1.

[0050] In step S302, the Pad approximation technique is used to address the input time delay problem in the attitude loop, and the external disturbances existing in the position and attitude loops are estimated using the disturbance observer technique within the backstepping framework. The specific process is as follows: First, a robust position tracking controller is designed within the backstepping framework. For ease of description, [the following will be used] and Replace with and The location subsystem (1) can be rewritten as:

[0051] Next, the position tracking error is defined as... , ,in For the expected value, The virtual control signal is for the position loop. To compensate for unknown external disturbances, the control law of the position subsystem is designed as shown in the following formula (3): (3) in Let be the positive definite matrix to be designed. for The estimated value can be obtained by designing an interference observer of the following form, as shown in formula (4): (4) in As an auxiliary vector, This is the gain matrix to be designed.

[0052] To address the input time delay issue in the attitude subsystem, we employ the Pad approximation technique, as detailed below:

[0053] in For Laplace transform, Let it be a Laplace variable. Then define an intermediate variable. ,Right now: Further, we can obtain Then, using the inverse Laplace transform, we obtain... ,in .and It can be represented as Therefore, the dynamic model of the attitude subsystem in formula (2) can be written as:

[0054] Next and Replace with and We can obtain:

[0055] Attitude subsystem control input in this invention It consists of two parts, as shown in the following formula (5): (5) in, For feedforward control input, This is the optimal feedback control input. First, the feedforward control input... The design is as follows:

[0056] The design of the interference observer for the attitude loop is similar to that for the position loop, and its form is shown in the following formula (6): (6) in As an auxiliary vector, The gain matrix to be designed, .

[0057] In step S303, an optimal robust trajectory tracking controller is designed based on a single-network adaptive dynamic programming algorithm. The specific design method is as follows: This invention designs an optimal feedback controller for the following nominal error system. .

[0058]

[0059] in For error system dynamics.

[0060] First, select the performance index function. ,in and It is a positive definite symmetric matrix. Therefore, the corresponding Hamiltonian equation is:

[0061] in Combining the conditions for the existence of the optimal solution Thus, the ideal optimal feedback control input can be obtained:

[0062] in This represents the optimal form of the performance index function. Substituting the above equation into the Hamilton equation and setting the equation to zero, we obtain the HJB equation (Hamilton-Jacobi-Bellman equation) in the following form:

[0063] The HJB equations are then solved using the ADP (Adaptive Dynamic Programming) algorithm to obtain the optimal feedback control input. The approximate optimal solution, while for the ideal optimal feedback control input... There exists a function of the error variable. ,satisfy This holds true; at the same time, there exists a bounded positive definite matrix. Make the equation Established, among which Let be a Lyapunov function with respect to the error variable, and , .

[0064] First, a single-evaluation network is constructed to approximate the result. We can obtain:

[0065] in, The weight vector to be obtained. For the activation function of the neural network, The number of hidden nodes in the neural network. To estimate the error, the above equation is used for... Taking the partial derivative, we get: .

[0066] Assumption and It is bounded. and For error First derivative and It is also bounded, meaning it has positive constants. , , and Make , , Next, we will... Substituting into the HJB equation and the optimal feedback control input From this, we can obtain:

[0067]

[0068] in This represents the bounded residual value. .

[0069] assumed for The estimated value, then and The estimated value can be expressed as:

[0070]

[0071] In order to obtain the required Define the objective function and minimize The adaptive update law for the target is designed as shown in the following formula (7): (7) in, , These are the parameters to be designed. Conditional function. The specific form is as follows:

[0072] In step S304, the stability conditions of the closed-loop system are analyzed using the Lyapunov stability method. The specific design method is as follows: For QUAV systems (1) and (2) under external disturbance and input time delay constraints, a robust position tracking controller as shown in (3) and a robust optimal attitude tracking controller as shown in (5) are designed. Simultaneously, disturbance observers as shown in (4) and (6) are designed to estimate external disturbances, and an adaptive update law as shown in (7) is designed to estimate the optimal weights. By selecting appropriate parameters, it can be ensured that the state tracking error, disturbance estimation error, and neural network weight estimation error within the entire closed-loop system are uniformly and eventually bounded.

[0073] Choose the following Lyapunov function:

[0074] in ,right Taking the first derivative, we get:

[0075] in , , , .

[0076] when When, satisfy Assuming tracking error If the incentive condition is continuous, then there exists a normal number. Make Select At this point, choosing the appropriate parameters will make , , , And the following inequalities hold: , , , , , , ,in, Then it can be guaranteed .

[0077] when When considering Under the given conditions, choose appropriate parameters to make , , And the following inequalities hold: , , , , , , Then it can be guaranteed .

[0078] According to Lyapunov's extended theorem, for and In both cases, it can be guaranteed that the error variables in the closed-loop system are consistent and eventually bounded.

[0079] In step S305, a set of parameters for an actual UAV system are given, the control algorithm is described as Matlab language code, and its applicability to the control of UAV systems under input time delay and external disturbances is verified.

[0080] First, the QUAV model parameters used in the simulation. , Secondly, the design parameters for the controller and disturbance observer are selected as follows: , , , , Input delay time The corresponding optimal feedback controller parameters are set as follows: , , , Then select the desired position signal and yaw angle signal as... The selections for disturbance force and disturbance torque are as follows:

[0081]

[0082] Furthermore, the choice of the excitation function is as follows: Finally, simulation analysis was performed using Simulink. The simulation time was 20 seconds, and the simulation results are as follows: Figures 4-7 As shown.

[0083] By utilizing the Pad approximation method and nonlinear disturbance observer technique, intermediate variables are introduced to eliminate the influence of input time delay and external disturbances on the system, thereby improving control accuracy and enabling the control signal to respond promptly to the controlled variable. The tracking control problem of the original system is transformed into a stabilization problem of a nominal error system. An adaptive dynamic programming method with a single-evaluation neural network structure is used to design the optimal feedback controller for this error system, ensuring that the system has strong robustness and optimal tracking performance. By using a single network structure to approximate the performance index function, the optimal adaptive control law is obtained. In UAV systems, using a single-evaluation network instead of the typical execution-evaluation dual network structure is more significant, as it can reduce memory requirements and computational burden.

[0084] In this embodiment, the performance indicators cover the entire time domain from the current moment to the infinite future. This allows the controller to move beyond short-term, local optimization and instead focus on achieving optimal global performance for the UAV throughout the entire flight mission, or even over any long flight timescale. The infinite-time optimization perspective offers a more fundamental advantage, enabling true long-term planning of the UAV's control behavior. Control decisions made at each moment not only consider immediate tracking error reduction but also weigh the impact on cumulative energy consumption and tracking accuracy over an infinite timeframe. This fundamentally avoids drastic fluctuations in control commands or energy waste caused by pursuing short-term rapid responses, ensuring... The smoothness and economy of flight control throughout the entire process; in contrast, the performance of finite-time optimal control may degrade near the end of the mission time, and its optimization effect heavily depends on the assumption that the mission duration is accurately known. However, this embodiment does not have any prior requirements on the mission duration, and has stronger adaptability and universality. Therefore, it can ensure that the UAV system can not only track the trajectory stably and accurately in complex environments with interference and time delays, but also allocate control energy in a sustainable and globally optimal manner. This theoretically maximizes the UAV's endurance potential and reduces the cumulative wear of the actuators, demonstrating its significant progress in the foresight of control strategies and overall performance optimization.

[0085] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0086] Based on the same inventive concept, corresponding to the drone control method provided in the embodiments of this application, this application also provides a drone control device.

[0087] refer to Figure 8 The unmanned aerial vehicle (UAV) control device includes: The acquisition module 801 is configured to acquire real-time status data and desired trajectory data of the UAV; The first determining module 802 is configured to determine position error data and velocity error data based on the real-time status data and the desired trajectory data; determine position control data based on the position error data, the velocity error data and historical control data; and determine desired attitude data based on the position control data. The second determining module 803 is configured to: determine attitude error data and angular velocity error data based on the real-time state data and the desired attitude data; determine compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data; determine target feedback data based on the angular velocity error data; and determine attitude torque control data based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data. The control module 804 is configured to determine motor control commands for the UAV based on the position control data and the attitude torque control data, and to control the UAV based on the motor control commands.

[0088] In one possible implementation, the first determining module 802 is configured to: The first interference data is determined based on the speed error data and the historical control data; The position control data is determined based on the position error data, the velocity error data, and the first interference data.

[0089] In another possible implementation, the second determining module 803 is used for: The equivalent torque data is determined based on the historical torque control data; The second interference data is determined based on the angular velocity error data, the equivalent torque data, and the UAV dynamics data. The compensation torque data is determined based on the second interference data.

[0090] In another possible implementation, the second determining module 803 is used for: The angular velocity error data is input into a designated evaluation network to obtain performance index data; The parameter data of the specified evaluation network are updated based on the performance index data and the specified weight data; The target feedback data is determined based on the updated parameter data.

[0091] In another possible implementation, the second determining module 803 is used for: Determine gradient data based on updated parameter data; The target feedback data is determined based on the gradient data and the specified weight data.

[0092] In another possible implementation, the control module 804 is used for: The position control data and the attitude torque control data are allocated to obtain the allocation data. The motor control command is determined based on the allocated data.

[0093] It should be noted that the UAV control device provided in the above embodiments is only illustrated by the division of the above functional modules when controlling the UAV. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the UAV control device and the UAV control method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0094] Based on the same inventive concept, corresponding to the drone control method provided in the embodiments of this application, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the drone control method described in the above embodiments.

[0095] Figure 9 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0096] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0097] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0098] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0099] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0100] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0101] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0102] The electronic devices described above are used to implement the corresponding UAV control methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0103] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to perform the UAV control method described above. This computer-readable storage medium can be non-transitory. For example, the computer-readable storage medium can be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices, etc.

[0104] In an exemplary embodiment, a computer program product is also provided, including computer program instructions that, when executed on a computer, cause the computer to perform the drone control method described above.

[0105] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0106] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0107] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0108] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling an unmanned aerial vehicle (UAV), characterized in that, include: Acquire real-time status data and desired trajectory data of the drone; Based on the real-time status data and the expected trajectory data, position error data and velocity error data are determined; Position control data is determined based on the position error data, the velocity error data, and historical control data; Determine the desired attitude data based on the position control data; Attitude error data and angular velocity error data are determined based on the real-time status data and the desired attitude data; compensation torque data is determined based on the angular velocity error data, historical torque control data, and UAV dynamics data; target feedback data is determined based on the angular velocity error data. Attitude torque control data is determined based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data; Based on the position control data and the attitude torque control data, motor control commands are determined for the UAV, and the UAV is controlled based on the motor control commands.

2. The UAV control method according to claim 1, characterized in that, The process of determining position control data based on the position error data, the velocity error data, and historical control data includes: The first interference data is determined based on the speed error data and the historical control data; The position control data is determined based on the position error data, the velocity error data, and the first interference data.

3. The UAV control method according to claim 1, characterized in that, The determination of compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data includes: The equivalent torque data is determined based on the historical torque control data; The second interference data is determined based on the angular velocity error data, the equivalent torque data, and the UAV dynamics data. The compensation torque data is determined based on the second interference data.

4. The UAV control method according to claim 1, characterized in that, The determination of target feedback data based on the angular velocity error data includes: The angular velocity error data is input into a designated evaluation network to obtain performance index data; The parameter data of the specified evaluation network are updated based on the performance index data and the specified weight data; The target feedback data is determined based on the updated parameter data.

5. The UAV control method according to claim 4, characterized in that, Determining the target feedback data based on the updated parameter data includes: Determine gradient data based on updated parameter data; The target feedback data is determined based on the gradient data and the specified weight data.

6. The UAV control method according to claim 1, characterized in that, The step of determining motor control commands for the UAV based on the position control data and the attitude torque control data includes: The position control data and the attitude torque control data are allocated to obtain the allocation data. The motor control command is determined based on the allocated data.

7. A drone control device, characterized in that, include: The acquisition module is configured to acquire real-time status data and desired trajectory data of the UAV; The first determining module is configured to determine position error data and velocity error data based on the real-time status data and the desired trajectory data; and to determine position control data based on the position error data, the velocity error data, and historical control data. Determine the desired attitude data based on the position control data; The second determining module is configured to determine attitude error data and angular velocity error data based on the real-time state data and the desired attitude data; determine compensation torque data based on the angular velocity error data, historical torque control data, and UAV dynamics data; and determine target feedback data based on the angular velocity error data. Attitude torque control data is determined based on the attitude error data, the angular velocity error data, the compensation torque data, and the target feedback data; A control module is configured to determine motor control commands for the UAV based on the position control data and the attitude torque control data, and to control the UAV based on the motor control commands.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method described in any one of claims 1 to 6.

10. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed on a computer, the computer causes the computer to perform the method as described in any one of claims 1 to 6.