A fast solution method for nonlinear MPC quadrotor control

CN123010415APending Publication Date: 2026-10-30HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611217390.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

但实时性和安全性之间仍然难以兼顾

Benefits of technology

(1)本发明将传统非线性模型预测控制在线反复迭代求解转化为神经求解器的快速前向计算,从而加快非线性模型预测控制的求解,提高四旋翼无人机非线性模型预测控制的实时性,有利于满足高频闭环控制需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010415A_ABST
    Figure CN123010415A_ABST
Patent Text Reader

Abstract

The application relates to the field of flight control technology of quadrotor unmanned aerial vehicles, and particularly discloses a fast solving method for nonlinear MPC quadrotor unmanned aerial vehicle control. The method comprises the following steps: establishing a discrete dynamic model of the quadrotor unmanned aerial vehicle, setting a prediction time domain, defining a cost function and physical constraints, and forming a nonlinear model predictive control optimization problem; in the offline training stage, the dynamic model is embedded into a neural solver as a differentiable layer, a loss function is constructed by using the cost function and state constraint penalty, and the network parameters are updated through unsupervised learning; in the online solving stage, the first-order gradient of the cost function with respect to the control sequence at the last time is calculated by using automatic differentiation, the gradient is input into the neural solver as guide information, a control sequence increment is generated, the control sequence increment is superimposed with the initial sequence, the first item of the obtained control sequence is sent to the unmanned aerial vehicle, and a rolling closed-loop control is formed. While ensuring the trajectory tracking accuracy and constraint satisfaction capability, the online solving real-time performance of the nonlinear model predictive control is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quadrotor unmanned aerial vehicle (UAV) flight control technology, specifically to a fast solution method for nonlinear MPC quadrotor UAV control, used to achieve real-time solution of nonlinear model predictive control optimization problems and closed-loop control of quadrotor UAVs. Background Technology

[0002] In recent years, quadcopter drones have demonstrated great potential in fields such as automated inspection, search and rescue in unknown areas, due to their superior agility and wide-range maneuverability. However, because quadcopter drones are typical underactuated, strongly coupled nonlinear systems, traditional control methods often struggle to balance control performance and constraint satisfaction under complex trajectory tracking and constraints. Nonlinear model predictive control (NMPC), which can explicitly handle system nonlinearity and input state constraints, is being widely applied to the control systems of quadcopter drones.

[0003] The performance advantage of nonlinear model predictive control is based on the high cost of online computation. It requires solving optimization problems with nonlinear dynamic constraints and multidimensional variable coupling relationships at each sampling time. When the system control frequency is high, the computational burden of commonly used solvers will increase significantly, which may lead to solution delay, control lag, or even a decrease in closed-loop performance. This has become one of the key factors limiting the practical deployment of nonlinear model predictive control.

[0004] To address the issue of insufficient real-time performance in solving nonlinear model predictive control (MMDC) problems, existing methods can be broadly categorized into three types. The first type utilizes linearization methods to transform the nonlinear system into a linear form, accelerating the solution speed. Alternatively, it designs trigger thresholds through event-triggered mechanisms, initiating the optimization problem only when necessary, effectively reducing the average computation frequency. However, the applicability of the first type of method is often limited when facing continuous disturbances or complex constraints. The second type of method utilizes neural networks to construct an end-to-end mapping from system state to control variables. By imitating the optimal control variables generated by nonlinear model predictive control, this type of method has high computational efficiency, but it mainly relies on offline data learning and lacks explicit utilization of the system's physical laws. Furthermore, it is prone to problems such as insufficient constraint handling and decreased tracking accuracy in scenarios outside the training distribution. The third type of method introduces the concept of learning optimization into the model predictive control framework. It utilizes long short-term memory networks to accelerate interior-point method iteration, improving the online solution efficiency of nonlinear model predictive control. However, a balance between real-time performance and security remains difficult to achieve. A neural solver guided by physical gradients is a nonlinear model predictive control approximation solution method that can fully utilize system dynamics and optimization structure information while maintaining high solution efficiency, real-time performance, accuracy, and generalization ability. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a fast solution method for nonlinear MPC quadrotor UAV control.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A fast solution method for nonlinear MPC quadrotor UAV control includes: Establish a dynamic model of a quadcopter UAV; Set up a prediction time domain, establish inequality constraints on control parameters based on physical constraints, define a cost function, and form a nonlinear model predictive control optimization problem; During the offline training phase, the dynamic model is embedded into the training process, and the loss function is composed of the cost function and the state constraint penalty. Differentiable dynamics are used to update the network parameters of the neural solver through unsupervised learning. During online solving, the control sequence of the previous time step is used as the initial control sequence. The first-order gradient of the cost function with respect to the initial control sequence is calculated by automatic differentiation. The first-order gradient is used as the guiding information to be input into the neural solver to obtain the control sequence increment. The increment is added to the initial control sequence to obtain the control sequence at the current time step. The first term of the current control sequence is sent to the controlled UAV to realize rolling closed-loop control.

[0007] In one embodiment, establishing the dynamic model of the quadcopter drone specifically includes: The mass of the quadcopter drone is The corresponding moment of inertia is The thrust of the four rotors of the quadcopter drone Directly used as control input , The status of quadcopter drones The dynamic model of the quadcopter drone is as follows: ; The three-axis positions of the quadcopter drone. The three-axis velocities of the quadcopter UAV in the inertial reference frame. This describes the attitude characteristics of a quadcopter drone, including its roll angle. Pitch angle Yaw angle ; The three-axis angular velocities of the quadcopter UAV in the body coordinate system; It is the acceleration due to gravity. Let Z be the unit vector along the lower edge of the body coordinate system. Let be the rotation matrix from the body coordinate system to the inertial coordinate system. This is the transformation matrix between Euler angular rate and body angular velocity. The torque is generated by the difference in rotor thrust and aerodynamic counter-torque. Assume the sampling period of the quadcopter UAV is The dynamic model is discretized using the fourth-order Runge-Kutta method as follows: ; and These represent the states of the quadcopter drone at time k and time k+1, respectively. For the control input at time k, Let represent the discrete state transition function defined by the fourth-order Runge-Kutta method.

[0008] In one embodiment, the setting of the prediction time domain, establishing inequality constraints on control parameters based on physical constraints, and defining a cost function to form a nonlinear model predictive control optimization problem specifically includes: Set the prediction time domain to N. Let k be the predictive control sequence at time k; define the state error. Input error ,in and They represent in Always Predicted state and control input at any given time. Indicating quadcopter drones in Reference status at any given time express Reference control input at time; Define the cost function of nonlinear model predictive control. : ; Q is the state error weight matrix, R is the control error weight matrix, and P is the terminal state weight matrix; Define the system control constraints as follows: The state constraints are: , ; and These are the lower and upper limits for controlling the input, respectively. The future predicted at the current moment The roll angle at any given moment, and These are the lower and upper limits of the roll angle, respectively. The future predicted at the current moment The pitch angle at any given moment. and Let these be the lower and upper limits of the pitch angle, respectively; define the nonlinear model predictive control problem: ; ; ; ; ; .

[0009] In one embodiment, embedding the dynamic model into the training process, using a cost function and a state constraint penalty to form a loss function, and utilizing differentiable dynamics to update the network parameters of the neural solver through unsupervised learning, specifically includes: During offline training, the dynamic model is embedded as a differentiable layer to construct a complete differentiable chain from the control sequence to the cost function, and the network parameters of the neural solver are updated with the goal of minimizing the cost function. Loss function during training for: ; in, These are the network parameters of the neural solver. For a randomly generated training dataset, initial states with noise perturbation are randomly generated for each batch. and reference trajectory , For the state constraint function, when the predicted state exceeds the safety boundary... , The penalty weight constant, It is a linear rectification function.

[0010] In one embodiment, the step of using the control sequence from the previous time step as the initial control sequence, calculating the first-order gradient of the cost function with respect to the initial control sequence through automatic differentiation, inputting the first-order gradient as guiding information into the neural solver to obtain the control sequence increment, and adding it to the initial control sequence to obtain the control sequence at the current time step, specifically includes: At the current time k, the control sequence obtained at the previous time step... As initial values, the cost function is calculated using automatic differentiation techniques based on the current state and reference trajectory of the quadcopter UAV. Regarding the first gradient of the control sequence : ; The first-order gradient is used as guiding information input into the neural solver to obtain the control sequence increment. This is then added to the initial control sequence to obtain the control sequence at the current time. : .

[0011] Compared with the prior art, the beneficial technical effects of the present invention are: (1) This invention transforms the traditional online iterative solution of nonlinear model predictive control into fast forward calculation of neural solver, thereby accelerating the solution of nonlinear model predictive control, improving the real-time performance of nonlinear model predictive control of quadcopter UAV, and helping to meet the requirements of high-frequency closed-loop control.

[0012] (2) While improving the solution speed, the present invention can retain the ability of nonlinear model predictive control to handle nonlinear dynamics and state constraints of quadrotor UAVs, and take into account trajectory tracking performance, constraint satisfaction ability and closed-loop control stability. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the neural solver of the present invention; Figure 2 This is a schematic diagram of the control logic flow of the present invention; Figure 3 This is a flowchart of the method of the present invention. Detailed Implementation

[0014] A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.

[0015] like Figure 3 As shown, a fast solution method for nonlinear model predictive control of a quadrotor UAV according to the present invention includes the following steps: S1: Based on the actual controlled quadcopter UAV, establish a dynamic model of the system. According to the set sampling period, discretize the continuous-time dynamic model to obtain a discrete model of the quadcopter UAV. The state parameters of the UAV include: the position, linear velocity, attitude, and corresponding angular velocity of the quadcopter UAV; the control parameters include: the thrust of the four rotors.

[0016] S2: Set the prediction time domain and establish inequality constraints for relevant control parameters based on the physical constraints of the quadrotor UAV. Based on the obtained dynamic model, define the cost function for the quadrotor UAV control problem, forming a constrained nonlinear predictive control optimization problem.

[0017] S3: During the offline training phase, the dynamic model of the quadcopter UAV is embedded into the training process. The cost function of the nonlinear model predictive control and the state constraint penalty are used together to form the loss function. Differentiable dynamics are used to update the network parameters through unsupervised learning, so that the solver can make full use of the physical laws of the system.

[0018] S4: Using the control sequence from the previous time step as the initial control sequence, calculate the first-order gradient of the nonlinear model predictive control cost function with respect to the initial control sequence using the automatic differentiation method. Use the first-order gradient as guiding information to output the control sequence increment. Add this increment to the initial control sequence to obtain the current control sequence. Send the first term of the current control sequence to the controlled UAV, thus completing the rolling closed-loop control of the quadcopter UAV.

[0019] This invention proposes a lightweight neural solver guided by physical gradients. Guided by the first-order gradient of the nonlinear model predictive control cost function, it corrects the control sequence. This enables rapid solving of nonlinear model predictive control, reduces the computational burden of online nonlinear model predictive control, and improves the real-time performance of quadrotor UAV control. Furthermore, it proposes an unsupervised training method based on a differentiable dynamic model, embedding the quadrotor UAV dynamic model into the training process of the neural solver, thereby enhancing the solver's ability to utilize and generalize the system's physical laws.

[0020] 1. Establish a dynamic model.

[0021] Assume the quadcopter drone is a rigid body with 6 degrees of freedom and a mass of... The corresponding moment of inertia is The thrust of the four rotors of the quadcopter drone Directly used as control input Define the state space of the system as The system dynamics equations can be described as follows: (1) The three-axis positions of the quadcopter drone. The three-axis velocities of the quadcopter UAV in the inertial reference frame. The roll angle, pitch angle, and yaw angle of the quadcopter drone are used to represent its attitude characteristics. The angular velocities of the three axes of the quadcopter UAV in the body coordinate system are given. It is the acceleration due to gravity. Let Z be the unit vector along the lower edge of the body coordinate system. Let be the rotation matrix from the machine frame to the inertial frame. Where, It is the set of all rotation matrices in three-dimensional space.

[0022] Here is the transformation matrix between Euler angular rate and body angular velocity, i.e.: .

[0023] The torque generated by the difference in rotor thrust and aerodynamic counter-torque, for an X-shaped quadcopter UAV, when rotors 1 and 3 rotate clockwise and rotors 2 and 4 rotate counterclockwise, is... The calculation formula is: .

[0024] The arm length of a quadcopter drone. The corresponding anti-torque coefficient is given. Since nonlinear model predictive control operates in discrete time, while equation (1) represents continuous-time dynamics, the model needs to be discretized. Let the sampling period of the system be... The system is discretized using the fourth-order Runge-Kutta method (RK4) as follows: ; and These represent the system states at time k and time k+1, respectively. This is the control input at time k. Let represent the discrete state transition function defined by the fourth-order Runge-Kutta method.

[0025] 2. Construct a nonlinear model predictive control optimization problem.

[0026] Set the prediction time domain to N. Let be the predictive control sequence at time k. Define the system state error as... The input error is ,in and They represent in Always Predicted state and control input at any given time. Indicating quadcopter drones in Reference status at any given time express The reference control input at time t; the cost function is defined as: ; The cost function consists of two parts: stage cost and terminal cost. Q is the state error weight matrix, and R is the control error weight matrix. Together, they form the stage cost term, used to evaluate the control performance at each prediction time point within the prediction domain. P is the terminal state weight matrix, used to measure the deviation between the predicted state and the reference state at the end of the prediction domain.

[0027] Setting a terminal cost can strengthen the constraint on the predicted terminal state, prompting the system to approach the reference state at the end of the prediction time domain, and helps to reduce the impact of finite prediction time domain truncation, thereby improving the closed-loop stability of the system.

[0028] Define system control constraints as State constraints , Furthermore, the nonlinear model predictive control problem is defined as follows: (6) The constraints of a quadcopter UAV are not limited to equation (6). They may also include rotor speed variation rate, thrust variation rate, position boundary, velocity boundary, angular velocity boundary, obstacle avoidance safety distance, and battery power constraints.

[0029] 3. Offline training phase.

[0030] The proposed neural solver is based on a multilayer perceptron and has the following structure: Figure 1 As shown, it specifically includes: The optimization information embedding module is used to extract features from the first-order gradient of the NMPC cost function and the current control sequence, and output an optimized feature vector. The state context embedding module is used to extract features from the current state, reference state, and tracking error of the quadcopter UAV and output a state feature vector. A multi-layer fully connected feature fusion module, whose input is connected to the output of the optimization information embedding module and the state context embedding module respectively, is used to fuse the optimization feature vector and the state feature vector, and perform nonlinear transformation through a multi-layer fully connected layer and the GELU activation function to output fused features; The output module, connected to the output of the multi-layer fully connected feature fusion module, is used to generate a predictive control sequence increment based on the fusion features, and add the predictive control sequence increment to the initial control sequence to obtain the updated control sequence at the current time.

[0031] The offline training phase employs an unsupervised training framework based on differentiable dynamics, directly constructing the network training process as a trajectory optimization problem. A known dynamic model is used as the differentiable layer in the computation, building a complete differentiable chain from the control sequence to the cost function. The network updates its weight parameters by minimizing the nonlinear model's prediction of the control cost function, achieving rapid solution to the nonlinear optimization problem. This method effectively shifts the computational burden of online iteration to the offline training phase.

[0032] The core objective of training is to find a set of optimal parameters. This enables the control sequence obtained by the network to allow the nonlinear model to predict the control cost function within the prediction time domain N. Minimize. Considering the state constraints of the drone, a soft constraint mechanism is introduced during training, which reduces the loss function. Defined as the sum of the expected value of the trajectory cost and the state constraint penalty: ; For a randomly generated training dataset, in each training batch, an initial state with noise perturbation is randomly generated. and reference trajectory This non-fixed data forces the network to adapt to varying flight conditions, preventing the network from overfitting to a specific trajectory. The state constraint function in equation (6) represents the state when the predicted state exceeds the safety boundary. , This is the weighting constant. As a state constraint penalty term, when the predicted state goes out of bounds, this term propagates a strong gradient signal back into the network, thereby correcting the network output to meet the system's safety constraints. After training, the proposed neural solver is embedded into the nonlinear model predictive control framework to achieve fast solution of nonlinear model predictive control.

[0033] 4. Solve online.

[0034] After the neural solver is trained, it is embedded into a nonlinear model predictive control framework. At the current time k, the control sequence obtained from the previous time step is used... As initial values, based on the current state and reference trajectory of the quadcopter UAV, the first-order gradient of the nonlinear model predictive control cost function with respect to the control sequence is calculated using automatic differentiation techniques: .

[0035] The first-order gradient is used as guiding information input into the neural solver to obtain the control sequence increment. This sequence is then added to the initial control sequence to obtain the control sequence at the current time. .

[0036] control sequence The first item in the sequence is sent to the controlled quadrotor UAV to obtain the state at the next moment. The current control sequence is then used as the initial value for solving the next moment's problem. This process is repeated to form a nonlinear model predictive control rolling closed-loop control. The specific process is as follows: Figure 2 As shown.

[0037] Example: This embodiment optimizes the conventional nonlinear model predictive control solution method for quadrotor UAVs. Specifically, it includes the following steps: Step 1: Establish the discrete-time model of the nonlinear system of the quadcopter UAV, and its mathematical description is as follows: ; ; The three-axis positions of the quadcopter drone. The three-axis velocities of the quadcopter UAV in the inertial reference frame. These are the roll angle, pitch angle, and yaw angle of a quadcopter drone. Let be the angular velocities of the three axes of the quadcopter drone in the body coordinate system. The mass of the quadcopter drone is... Corresponding moment of inertia . It is the acceleration due to gravity. Let Z be the unit vector along the lower edge of the body coordinate system. Let be the rotation matrix from the machine frame to the inertial frame. This is the transformation matrix between Euler angular rate and body angular velocity.

[0038] The torque generated by the difference in rotor thrust and aerodynamic counter-torque, for an X-shaped quadcopter UAV, when rotors 1 and 3 rotate clockwise and rotors 2 and 4 rotate counterclockwise, is... The calculation formula is: ; The arm length of a quadcopter drone. This represents the corresponding inverse torque coefficient. Since nonlinear model predictive control operates in discrete time, this method uses the sampling time... The system is discretized using the fourth-order Runge-Kutta method. The input variables for the quadcopter UAV are the thrust of the four rotors, i.e. , .

[0039] Step 2: Set the prediction time domain to The control sequence of the system at time k is: Define state error and input error ,in and They represent in Always Predicted state and control input at any given time. Indicating quadcopter drones in Reference status at any given time express The reference control input at time step. The cost function is defined as: .

[0040] Q is the state error weight matrix, R is the control error weight matrix, and P is the terminal state weight matrix. Their specific values ​​are... , , .

[0041] Define constraints , , This leads to a nonlinear model predictive control optimization problem with constraints: .

[0042] Step 3: The offline training phase employs an unsupervised training framework based on differentiable dynamics. The network training process is directly constructed as a trajectory optimization problem, utilizing a known dynamic model as the differentiable layer in the computation to build a complete differentiable chain from the control sequence to the cost function. The network updates its weight parameters by minimizing the nonlinear model's prediction of the control cost function, achieving rapid solution to the nonlinear optimization problem. This method effectively shifts the computational burden of online iteration to the offline training phase.

[0043] The core objective of training is to find a set of optimal parameters. This ensures that the control sequence obtained by the network minimizes the predictive control cost function of the nonlinear model within the prediction time domain N, and the loss function during training. The definition of is: ; For a randomly generated training dataset, in each training batch, an initial state with noise perturbation is randomly generated. and reference trajectory This non-fixed data forces the network to adapt to varying flight conditions, preventing overfitting to specific trajectories. This embodiment uses the AdamW optimizer to update network parameters, with a learning rate set to... The training batch size is set to 32, the training sequence length is set to 20, and the number of training rounds is set to 100. It is a rectified linear unit used to extract the violation amount of state constraints. When the state does not violate the constraint, the output is 0, and when the constraint is violated, the corresponding constraint violation amount is output.

[0044] Step 4: After training the neural solver, embed it into the nonlinear model predictive control framework to solve the control sequence. At the current time k, use the control sequence obtained from the previous time step. As initial values ​​for optimization, the first-order gradient of the cost function with respect to the control sequence is calculated using automatic differentiation techniques: .

[0045] The first-order gradient is used as guiding information input into the neural solver to obtain the control sequence increment. This sequence is then added to the initial control sequence to obtain the control sequence at the current time. ; control sequence The first item in the sequence is sent to the controlled quadcopter UAV to obtain the state at the next moment. The current control sequence is then used as the initial value for solving the next moment. This process is repeated to form a nonlinear model predictive control rolling closed-loop control.

[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0047] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple steps or stages, which are not necessarily completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0048] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0049] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.

[0050] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A fast solution method for nonlinear MPC quadrotor UAV control, characterized in that, include: Establish a dynamic model of a quadcopter UAV; Set up a prediction time domain, establish inequality constraints on control parameters based on physical constraints, define a cost function, and form a nonlinear model predictive control optimization problem; During the offline training phase, the dynamic model is embedded into the training process, and the loss function is composed of the cost function and the state constraint penalty. Differentiable dynamics are used to update the network parameters of the neural solver through unsupervised learning. During online solving, the control sequence of the previous time step is used as the initial control sequence. The first-order gradient of the cost function with respect to the initial control sequence is calculated by automatic differentiation. The first-order gradient is used as the guiding information to be input into the neural solver to obtain the control sequence increment. The increment is added to the initial control sequence to obtain the control sequence at the current time step. The first term of the current control sequence is sent to the controlled UAV to realize rolling closed-loop control.

2. The fast solution method for nonlinear MPC quadrotor UAV control according to claim 1, characterized in that, The establishment of the dynamic model of the quadcopter UAV specifically includes: The mass of the quadcopter drone is The corresponding moment of inertia is The thrust of the four rotors of the quadcopter drone Directly used as control input , The status of quadcopter drones The dynamic model of the quadcopter drone is as follows: ; The three-axis positions of the quadcopter drone. The three-axis velocities of the quadcopter UAV in the inertial reference frame. This describes the attitude characteristics of a quadcopter drone, including its roll angle. Pitch angle Yaw angle ; The three-axis angular velocities of the quadcopter UAV in the body coordinate system; It is the acceleration due to gravity. Let Z be the unit vector along the lower edge of the body coordinate system. Let be the rotation matrix from the body coordinate system to the inertial coordinate system. This is the transformation matrix between Euler angular rate and body angular velocity. The torque is generated by the difference in rotor thrust and aerodynamic counter-torque. Assume the sampling period of the quadcopter UAV is The dynamic model is discretized using the fourth-order Runge-Kutta method as follows: ; and These represent the states of the quadcopter drone at time k and time k+1, respectively. For the control input at time k, Let represent the discrete state transition function defined by the fourth-order Runge-Kutta method.

3. The fast solution method for nonlinear MPC quadrotor UAV control according to claim 2, characterized in that, The process of setting the prediction time domain, establishing inequality constraints on control parameters based on physical constraints, and defining a cost function to form a nonlinear model predictive control optimization problem specifically includes: Set the prediction time domain to N. Let k be the predictive control sequence at time k; define the state error. Input error ,in and They represent in Always Predicted state and control input at any given time. Indicating quadcopter drones in Reference status at any given time express Reference control input for the moment; Define the cost function of nonlinear model predictive control. : ; Q is the state error weight matrix, R is the control error weight matrix, and P is the terminal state weight matrix; Define the system control constraints as follows: The state constraints are: , ; and These are the lower and upper limits for controlling the input, respectively. The future predicted at the current moment The roll angle at any given moment, and These are the lower and upper limits of the roll angle, respectively. The future predicted at the current moment The pitch angle at any given moment. and Let these be the lower and upper limits of the pitch angle, respectively; define the nonlinear model predictive control problem: ; ; ; ; ; 。 4. The fast solution method for nonlinear MPC quadrotor UAV control according to claim 3, characterized in that, The process of embedding a dynamic model into the training process, using a cost function and a state constraint penalty to form a loss function, and utilizing differentiable dynamics to update the network parameters of the neural solver through unsupervised learning, specifically includes: During offline training, the dynamic model is embedded as a differentiable layer to construct a complete differentiable chain from the control sequence to the cost function, and the network parameters of the neural solver are updated with the goal of minimizing the cost function. Loss function during training for: ; in, These are the network parameters of the neural solver. For a randomly generated training dataset, initial states with noise perturbation are randomly generated for each batch. and reference trajectory , For the state constraint function, when the predicted state exceeds the safety boundary... , The penalty weight constant, It is a linear rectifier function.

5. The fast solution method for nonlinear MPC quadrotor UAV control according to claim 1, characterized in that, The process of using the control sequence from the previous time step as the initial control sequence, calculating the first-order gradient of the cost function with respect to the initial control sequence through automatic differentiation, inputting the first-order gradient as guiding information into the neural solver to obtain the control sequence increment, and adding it to the initial control sequence to obtain the control sequence at the current time step, specifically includes: At the current time k, the control sequence obtained at the previous time step... As initial values, the cost function is calculated using automatic differentiation techniques based on the current state and reference trajectory of the quadcopter UAV. Regarding the first gradient of the control sequence : ; The first-order gradient is used as guiding information input into the neural solver to obtain the control sequence increment. This sequence is then added to the initial control sequence to obtain the control sequence at the current time. : 。