A method for controlling a quadrotor unmanned aerial vehicle (UAV) using adaptive model predictive control (MPC), a medium and an apparatus

By using an adaptive MPC method that adaptively adjusts the prediction time domain and weight coefficients, the problem of excessive computational burden on the quadrotor UAV under different flight trajectories is solved, thereby improving control performance and stability and achieving better trajectory tracking and system adaptability.

CN119828480BActive Publication Date: 2025-11-07HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510236566.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-11-07
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

In the existing technology, the nonlinear model predictive control (NMPC) algorithm for quadrotor UAVs is difficult to balance multiple trajectory optimization requirements when facing different flight trajectories with fixed weight selection, resulting in excessive computational burden and insufficient robustness of the system.

Method used

An adaptive MPC method is adopted to optimize the control problem of quadrotor UAVs by adaptively adjusting the prediction time domain and weight coefficients, combined with a two-stage alternating algorithm. The prediction time domain length and weight matrix are dynamically adjusted to adapt to the needs of different flight scenarios.

Benefits of technology

It improves the control performance and stability of quadcopter drones, optimizes resource utilization, and enhances the system's generalization ability and trajectory tracking effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828480B_ABST
    Figure CN119828480B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-adapting MPC quadrotor unmanned aerial vehicle control method, medium and equipment, the method is by collecting actual controlled quadrotor unmanned aerial vehicle operating state parameter and control parameter, establishes the discrete time kinematic model of system;In combination with the physical constraint of quadrotor unmanned aerial vehicle, the inequality constraint of relevant control parameter is established, the kinematic model obtained, define the cost function of solving quadrotor unmanned aerial vehicle control problem;According to cost function, define optimization problem, and the constraint of system state and control input;Using two-stage alternating algorithm to solve the optimization problem in NMPC algorithm, the mass normalized thrust and angular velocity input variable of next time are obtained, the relevant weight coefficient in cost function is updated simultaneously, the mass normalized thrust and angular velocity input variable of next time are sent to controlled unmanned aerial vehicle as adjustment amount, using adaptive control time domain, better cope with the dynamic change of unmanned aerial vehicle control system, improve the overall performance of system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of unmanned aerial vehicle control, and particularly relates to a four-rotor unmanned aerial vehicle control method based on adaptive MPC, a medium and equipment. BACKGROUND

[0002] In recent years, unmanned aerial vehicles have been widely used in disaster search and rescue, police law enforcement, power system inspection and other key tasks due to their excellent agility and practicality. Precise position control is crucial for unmanned aerial vehicles to successfully complete these tasks. However, due to the significant nonlinear behavior and strong coupling characteristics of four-rotor unmanned aerial vehicles, designing a controller with high robustness and high stability for them poses a major challenge.

[0003] Model Predict Control (MPC) algorithm has the ability to explicitly handle system complex constraints, adopts rolling optimization and feedback correction strategy, and corrects the predicted trajectory at each time online, which has strong anti-interference ability. Since the actual four-rotor unmanned aerial vehicle model is nonlinear, Nonlinear Model Predict Control (NMPC) algorithm is being widely applied to the control system of four-rotor unmanned aerial vehicles. The main advantage of NMPC algorithm is that it can predict the future time in the near future under certain constraint conditions, and when making such predictions, it will consider the prediction of all future times within the prediction time domain.

[0004] In the problem of nonlinear model predictive control (NMPC) of four-rotor unmanned aerial vehicles, the state cost weight coefficient and control cost weight coefficient corresponding to the cost function will significantly affect the control performance of the system. However, in current research, the weight coefficients of the state cost and control cost of most cost functions are carefully selected based on human expert knowledge (adjusted for platform and trajectory). Although fixed weight coefficients are widely used in the control problem of four-rotor unmanned aerial vehicles, this method is not optimal for executing a running trajectory with the lowest position error and sufficient "smooth" changes in predictive control. In addition, when a series of complex and diverse unmanned aerial vehicle flight scenarios are involved, the fixed weight adjustment mechanism may not achieve satisfactory generalization.

[0005] In the nonlinear model predictive control (NMPC) problem of quadrotor unmanned aerial vehicles, a fixed prediction horizon is usually used, which may lead to excessive system computation burden in some cases. An adaptive prediction horizon strategy can dynamically adjust the prediction horizon length according to the actual needs of the system, thereby reducing unnecessary computation and improving computational efficiency. In the face of the uncertainty of the quadrotor unmanned aerial vehicle system model and external disturbances, the adaptive prediction horizon strategy can improve the robustness of the system by adjusting the prediction horizon, ensuring that the unmanned aerial vehicle system maintains good control performance under different flight trajectories. SUMMARY

[0006] The quadrotor unmanned aerial vehicle control method of adaptive MPC provided by the application can at least solve one of the technical problems in the background art.

[0007] To achieve the above-mentioned purpose, the application adopts the following technical solutions:

[0008] A quadrotor unmanned aerial vehicle control method of adaptive MPC, comprising the following steps:

[0009] S1: Establish a discrete-time kinematic model according to the operating state parameters and control parameters of the controlled quadrotor unmanned aerial vehicle;

[0010] S2: Establish inequality constraints in combination with the physical constraints of the quadrotor unmanned aerial vehicle, and combine the discrete-time kinematic model to define a cost function of the quadrotor unmanned aerial vehicle control problem, and design the adaptive control horizon as a cyclic prediction horizon

[0011] Wherein, is the prediction horizon at time t; is the minimum prediction horizon length; represents the cycle length, which is a positive integer; is the modulo operation, that is, the current time t is divided by the cycle length to obtain the remainder;

[0012] S3: Define an optimization problem according to the cost function of the quadrotor unmanned aerial vehicle control problem;

[0013] S4: Use a two-stage alternating algorithm to solve the optimization problem in combination with the inequality constraints of the relevant control parameters.

[0014] Further, the operating state parameters and control parameters of the quadrotor unmanned aerial vehicle in step S1 include:

[0015] Quadrotor unmanned aerial vehicle operating state parameters: position, linear velocity and unmanned aerial vehicle attitude information of the quadrotor unmanned aerial vehicle;

[0016] ​​The operating control parameters for a quadcopter drone are: mass-normalized thrust and angular velocity, where the mass-normalized thrust is obtained by dividing the total thrust by the mass of the aircraft.

[0017] Furthermore, the method for establishing the discrete-time kinematic model of the system in step S1 of the present invention includes: assuming that the dynamic characteristics of the quadcopter UAV are determined by a set of differential equations. express, The specific form of the discrete kinematic model is as follows:

[0018]

[0019] Let be the state variables of the quadrotor unmanned aerial vehicle system; where This indicates the position of the UAV's body coordinate system B relative to the world coordinate system W. This represents the linear velocity of the UAV's body coordinate system B relative to the world coordinate system W. This represents the attitude of the UAV's body coordinate system B relative to the world coordinate system W;

[0020] The body coordinate system B is a coordinate system fixed on the UAV and is used to describe the motion state of the UAV itself; while the world coordinate system W is a global, fixed reference coordinate system used to describe the absolute position and attitude information of the UAV in the entire environment.

[0021] For the quadcopter unmanned aerial vehicle system, where, It is the mass-normalized thrust vector. , It is the first quadcopter drone i The thrust generated by each motor It's about the quality of the drone; It is the angular velocity of the quadcopter in the body coordinate system B;

[0022] , These are the time derivatives of the drone's position, linear velocity, and quaternion, respectively. It is the gravity vector. g Pick ; It is an operator used to represent multiplication between quaternions and vectors; It represents quaternions. The time derivative, where It is the angular velocity vector antisymmetric matrix, It is used to represent the relationship between the state of a rotary-wing UAV and the control input over time.

[0023] Further, the cost function defined in step S2 for solving the quadrotor unmanned aerial vehicle control problem comprises:

[0024] The cost function can be defined as ; wherein is a term related to the state cost weight matrix, is a Lagrange variable, is a cost function related to the weight of, is a corresponding parameter thereof, is a prediction horizon at the moment, is a quadratic cost function in the form of summation, which is used to measure the cost of state and control variable changes, wherein and are a state weight matrix and a control weight matrix, respectively, is a step size, is a vector composed of the difference between the reference state , the reference control and the predicted state , the predicted control .

[0025] Further, the optimization problem in step S3 comprises: optimization of states and inputs, and adaptive update of weight coefficients;

[0026] The mathematical description of the optimization problem is as follows:

[0027]

[0028] is the optimal result to be obtained, which respectively corresponds to the estimated value of the state variable change, the estimated value of the control variable change and the estimated value of the weight matrix; is the maximum operation of the outer layer with respect to the weight matrix ; is the minimum operation of the inner layer with respect to the state variable change and the control variable change ; is an initial state constraint; is a dynamic update relationship describing the state variable change from the k moment to the k+1 moment; wherein, is the error between the system state change obtained through the system dynamic model and the directly predicted state at the k+1 moment; and are the partial derivative matrix of the function with respect to the state variable and the control variable at the point , which is a system matrix; , the prediction state at the k moment is used to calculate the state variable change and predictive control input Calculate the constraint-related quantities; These are functions Regarding state variables and control variables at points The partial derivative matrix at point;

[0029] Assuming a reference state exists and reference control The state error is denoted as The control error is denoted as Discrete control objective is defined as ,in and These are the state weight matrix and the control weight matrix, respectively, used to adjust the relative importance of state error and control error in the cost function;

[0030] Discrete control objectives Typically, a sequential approximation is performed using a quadratic programming problem, and the solution to the quadratic programming problem is used as the gradient direction. and To take steps that minimize the original continuous problem; through Perform iterations, where , and This is the system's predicted value; It is the iteration step size, ensuring the stability and convergence of the iterative update process; given the state measurement value State prediction and control prediction In this case, the discrete control optimization problem can be approximated as follows:

[0031]

[0032] in ; It is the Hessian matrix of the Lagrange function, which can be regarded as... , Let inequality constraint function be used. This is the discrete state equation of the system.

[0033] Furthermore, the method for solving the optimization problem in the NMPC algorithm using a two-stage alternating algorithm in step S4 of the present invention comprises two stages;

[0034] In the first stage, the weighting coefficients are fixed and the system state and control variables are predicted. In the second stage, the system state and control variables are fixed and the weighting coefficients are estimated.

[0035] Phase 1: When the weights are fixed, the mathematical description of the optimization problem simplifies to... and The quadratic programming (QP) problem represented by the optimized formula:

[0036] Since and The optimization problem represented by the optimized formula has a quadratic loss term, and linear constraints and inequality constraints, so it is a convex quadratic programming problem with linear constraints, where the linear constraints represent the discrete-time kinematic model update of the system;

[0037]

[0038] After solving the problem, the state prediction value is updated as , and the control prediction value is updated as , is a step size for controlling the magnitude of each iteration update;

[0039] Second stage: by adjusting and updating the weight coefficient in the cost function, the cost function can punish the error between the reference state and the current predicted state , the state error and the control error of the system at future time, so that the control strategy is more suitable for the actual situation and optimizes the system performance;

[0040] Fix the control variable and the state variable in the mathematical description of the optimization problem, let where 1 is a vector; in the simplest form, define ), by defining , represent the corresponding multiplication of elements, and simplify the mathematical description of the optimization problem to a quadratic problem and obtain the solution as:

[0041]

[0042] where is a sub-time range for weight update, and the estimated value is obtained, and then the weight matrix Q is updated as , representing generating a diagonal matrix, where the only parameter to be adjusted is , The parameter is generally taken as a value between 0.5 and 5.

[0043] In another aspect, the application also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps of the above method.

[0044] In still another aspect, the present application also discloses a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the above method.

[0045] In the traditional NMPC control problem, a fixed prediction horizon is usually used, and when the UAV faces different flight trajectories, there are certain limitations in system adaptability and flexibility. The adaptive prediction horizon strategy can significantly reduce the computational burden while ensuring the control performance, thereby optimizing resource utilization.

[0046] From the above technical solution, the present application proposes an adaptive nonlinear model predictive control method, which solves the problem that the traditional NMPC weight selection depends on experience and is difficult to consider multiple trajectory optimization requirements; using an adaptive control horizon, the dynamic changes of the system are better handled, and the overall performance of the system is improved. The control method used in the present application successfully optimizes the trajectory tracking of a quadrotor UAV and improves the stability and generalization ability of system control. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 is a flowchart of the method described in the present application;

[0048] Figure 2 is a schematic diagram of the two-stage alternating algorithm used in the present application. DETAILED DESCRIPTION

[0049] In order to solve the problem that the traditional NMPC (Nonlinear Model Predictive Control, NMPC) does not adaptively adjust the weight coefficient according to the flight trajectory of the quadrotor UAV and the fixed prediction horizon in the control process, an adaptive MPC quadrotor UAV path tracking control method is proposed, which includes adaptive weight coefficient and adaptive prediction horizon. The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments.

[0050] As shown in Figure 1 The adaptive MPC quadrotor UAV control method described in the present embodiment comprises the following steps:

[0051] S1: establishing a discrete-time kinematic model according to the operating state parameters and control parameters of the controlled quadrotor UAV;

[0052] S2: combining the physical constraints of the quadrotor UAV, establishing inequality constraints and combining the discrete-time kinematic model to define the cost function of the quadrotor UAV control problem, and designing the adaptive control horizon as a cyclic prediction horizon

[0053] wherein, is the prediction horizon at the current time; is the length of the minimum prediction horizon; denotes the cycle length, which is a positive integer; is the modulo operation, i.e., the current time divided by the cycle length and the remainder is taken;

[0054] S3: defining an optimization problem according to the cost function of the quadrotor unmanned aerial vehicle control problem;

[0055] S4: solving the optimization problem by using a two-stage alternating algorithm in combination with inequality constraints of relevant control parameters.

[0056] The following describes each step in detail:

[0057] S1: establishing a discrete-time kinematic model of the system according to the operating state parameters and control parameters of the quadrotor unmanned aerial vehicle to be controlled;

[0058] The operating state parameters of the quadrotor unmanned aerial vehicle include the position, linear velocity and attitude information of the quadrotor unmanned aerial vehicle; the operating control parameters of the quadrotor unmanned aerial vehicle include the mass-normalized thrust and angular velocity, wherein the mass-normalized thrust is obtained by dividing the total thrust (i.e., the sum of the thrusts generated by the four motors of the quadrotor unmanned aerial vehicle) by the mass of the aircraft. The adaptive prediction horizon in the optimization problem is defined, and the adaptive prediction horizon strategy can dynamically adjust the prediction horizon in the control problem according to the current time.

[0059] Suppose that the dynamic characteristics of the quadrotor unmanned aerial vehicle are represented by a set of differential equations . The specific form of the discrete kinematic model of

[0060]

[0061] is the state variable of the quadrotor unmanned aerial vehicle system; wherein, represents the position of the body coordinate system B of the unmanned aerial vehicle relative to the world coordinate system W, represents the linear velocity of the body coordinate system B of the unmanned aerial vehicle relative to the world coordinate system W, represents the attitude of the body coordinate system B of the unmanned aerial vehicle relative to the world coordinate system W.

[0062] The body coordinate system B is a coordinate system fixed on the unmanned aerial vehicle, which is used to describe the motion state of the unmanned aerial vehicle itself; while the world coordinate system W is a global and fixed reference coordinate system, which is used to describe the absolute position and attitude information of the unmanned aerial vehicle in the entire environment.

[0063] is the input variable of quadrotor UAV system. Wherein, is the mass normalized thrust vector, , is the thrust generated by the first motor of quadrotor UAV, i is the mass of UAV; is the angular velocity of quadrotor in body coordinate system B.

[0064] , are the time derivative of UAV position, linear velocity and quaternion respectively; is the gravity vector, g take ; is the operator used to represent the multiplication between quaternion and vector; is the time derivative of quaternion , wherein is the skew symmetric matrix of angular velocity vector . is used to represent the relationship between the state (position, velocity, attitude) of rotor UAV and control input (thrust, angular velocity) over time.

[0065] The prediction horizon in the optimization problem is defined as the cyclic prediction horizon . is the prediction horizon at time ; is the length of the minimum prediction horizon; represents the cycle length, which is a positive integer; is the modulo operation, that is, the remainder obtained by dividing the current time by the cycle length ;

[0066] S2: According to the discrete-time kinematics model combined with the physical constraints of quadrotor UAV, the inequality constraints of related control parameters are established, and the cost function of quadrotor UAV control problem is defined combined with the discrete-time kinematics model;

[0067] The physical limitations of UAV platform are modeled through inequality constraints , the purpose of which is to obtain feasible solutions. When solving related problems such as UAV control, it is necessary to ensure that the values of state variables and control variables are within the range allowed by actual physical conditions. The minimum limit is combined into vector , and the maximum limit is combined into vector . In the solution of optimization problem, the control variable​ Need to meet To ensure that the control strategy meets the physical characteristics of the UAV.

[0068] The cost function can be defined as Where is the term related to the state cost weight matrix, is the Lagrange variable, is the cost function related to the weight of is its corresponding parameter, is the prediction horizon at time k. is a quadratic cost function in the form of summation, which measures the cost of state and control variable changes, where and are the state weight matrix and control weight matrix, respectively, is the step size, is the vector composed of the difference between the reference state , the reference control and the predicted state , the predicted control .

[0069] S3: According to the cost function of the quadrotor UAV control problem, define the optimization problem;

[0070] Wherein, the optimization problem includes the optimization of state and input and the adaptive update of weight coefficient.

[0071] The mathematical description of the optimization problem is as follows:

[0072]

[0073] is the optimal result to be obtained, which corresponds to the estimated value of the state variable change, the estimated value of the control variable change and the estimated value of the weight matrix, respectively. is the maximization operation of the outer layer with respect to the weight matrix , that is, by adjusting , the overall objective function value reaches the maximum. is the minimization operation of the inner layer with respect to the state variable change and the control variable change . is the initial state constraint, which is equal to the difference between the initial state measurement value and the initial state reference value. is the dynamic update relationship of the state variable change from time k to time k+1. Wherein, , the error between the system state change obtained by the system dynamic model and the directly predicted state at time k+1. and are functions of the state and control variables at point . The constraint-related quantities are computed based on the predicted state and predicted control input at time k. are functions of the state and control variables at point .

[0074] The mathematical description of the proposed optimization problem is a min-max problem with quadratic and bilinear cost functions. If the weight coefficients in the mathematical description of the optimization problem are fixed, the simplified problem with respect to the system state and control variables is a convex optimization problem; if the system state and control variables are fixed, the simplified problem with respect to the weight coefficient variables can also be converted into a convex optimization problem. Since there are mature solving methods for convex optimization problems, this property provides convenience for solving the problem.

[0075] Assume that there exist reference state and reference control , the state error is denoted as , and the control error is denoted as . The discrete control objective is defined as , where and are the state weight matrix and control weight matrix, respectively, used to adjust the relative importance of the state error and control error in the cost function.

[0076] The discrete control objective is usually sequentially approximated by quadratic programming problems (QPs). The solution of the quadratic programming problem is used as the gradient direction and to take steps to minimize the original continuous problem. Iteration is performed by , where , . and are the predicted values of the system. is the iteration step size, which ensures the stability and convergence of the iterative update process. Given the state measurement value , the state prediction , and the control prediction , the discrete control optimization problem can be approximated as follows:

[0077]

[0078] where . is the Hessian matrix of the Lagrangian function, which can be seen as . , . is the inequality constraint function, is the discrete state equation of the system.

[0079] S4: Combined with the inequality constraints of the relevant control parameters, the two-stage alternating algorithm is used to solve the optimization problem to obtain the mass-normalized thrust and angular velocity input variables at the next time, and the relevant weight coefficients in the cost function are updated, and the mass-normalized thrust and angular velocity input variables at the next time are sent to the controlled unmanned aerial vehicle as adjustment variables, thereby completing the unmanned aerial vehicle control.

[0080] The two-stage alternating algorithm is used to solve the optimization problem. The idea of this alternating algorithm is to decompose the originally complex joint optimization problem (optimizing state, control variable and weight matrix at the same time) into two relatively simple sub-problems, and gradually approach the optimal solution through alternating solution.

[0081] As shown in Figure 2 , the first stage: when the weight is fixed, the mathematical description of the optimization problem is changed into a quadratic programming (QP) problem. The mathematical description of the optimization problem is a complex optimization problem involving weight matrix, state variable change and control variable change, containing maximization and minimization operations and multiple constraint conditions. After fixing the weight, the problem focuses on the optimization of and , to obtain and Optimized formula:

[0082]

[0083] This constraint problem is a quadratic function, which is used to measure the cost of state and control variable changes. Among them and are the state weight matrix and the control weight matrix, which have been determined in the fixed weight stage. After solving the quadratic programming problem represented by the optimized formula of and , the optimal estimate of the state variable change and the optimal estimate of the control variable change are obtained, and the system state and input variable are iteratively updated through .

[0084] The second stage: this stage adjusts and updates the weight Q, so that the cost function can adapt to the action taken. Specifically, it is based on the error between the current reference state and the current predicted state, and the error that may occur in the future is punished. Make the system able to dynamically adjust the emphasis on the error of different state variables in the cost function according to the current running state, so as to guide the system to run in a direction more in line with expectations, and improve the control performance.

[0085] In the mathematical description of the optimization problem, the control variables and state variables are fixed. Define For Where 1 is a vector. Through this definition, the weight matrix is associated with the cost function, so that the weight is adjusted in subsequent optimization to minimize the cost.

[0086] By defining ( Elementary multiplication), the mathematical description of the optimization problem is simplified to a quadratic problem and the closed-form solution is obtained:

[0087]

[0088] Get the estimated value After that, the weight matrix is updated to That is, the elements of As a diagonal matrix composed of diagonal elements, which is used as the updated weight matrix.

[0089] The two-stage alternating algorithm is an iterative process that repeatedly performs stage 1 (state and control prediction) and stage 2 (weight update) until the convergence condition is met. The purpose of this iterative structure is to gradually achieve the optimal control state of the system by continuously adjusting the state, control variable prediction and weight matrix.

[0090] In the traditional NMPC control problem, the weight coefficient of the state cost is usually selected based on expert knowledge, which can reflect a certain stability, but may not be optimal for executing the trajectory with the lowest position error and achieving "smooth" changes in predictive control. Moreover, fixed weight selection is difficult to achieve good tracking performance and control smoothness on different trajectories.

[0091] In the traditional NMPC control problem, a fixed prediction horizon is usually used, and when the UAV faces different flight trajectories, there are certain limitations in system adaptability and flexibility. The adaptive prediction horizon strategy can significantly reduce the computational burden while ensuring control performance, thereby optimizing resource utilization.

[0092] The application provides an adaptive nonlinear model predictive control method, solves the problem that weight selection of a traditional NMPC depends on experience and is difficult to consider multiple trajectory optimization requirements, and uses an adaptive control time domain to better cope with dynamic changes of a system and improve overall performance of the system.

[0093] In another aspect, the application further discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to enable the processor to perform steps of the above method.

[0094] In another aspect, the application further discloses a computer device, which comprises a memory and a processor, and the memory stores a computer program, and the computer program is executed by the processor to enable the processor to perform steps of the above method.

[0095] In another embodiment provided in the application, a computer program product containing instructions is also provided, which enables a computer to perform the four-rotor unmanned aerial vehicle control method of the adaptive MPC in any of the above embodiments when the computer program product is executed on the computer.

[0096] It can be understood that the system, device and storage medium provided in the embodiments of the application correspond to the method provided in the embodiments of the application, and the explanation, examples and beneficial effects of the related content can be referred to the corresponding part in the above method.

[0097] In the embodiments described above, all or some of the steps can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs or program elements. The computer programs reside (at least temporarily) in a memory of a computer during execution. The memory can be a RAM memory, a flash memory, a ROM memory, an EPROM memory, or any other suitable memory. The memory can be integral to or separate from the computer. The computer programs can be written in any suitable programming language, such as C, C++, Java, Visual Basic, etc. The computer programs can be written in assembly or machine language, if desired. The computer programs can be distributed over network coupled file servers, or can be distributed by any other suitable means.

[0098] It is to be noted that, in the present document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily implying any actual relationship or order between such entities or actions. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. In addition, terms such as "first" and "second" are used herein only to distinguish one element from another, without necessarily implying any actual relationship or order between such elements.

[0099] Each of the embodiments described in the present specification is described in a related manner, and the same or similar parts between the embodiments can be mutually referred to. Each of the embodiments mainly describes the difference from other embodiments. In particular, the system embodiments are described in a relatively simple manner, since they are substantially similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.

[0100] The above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for controlling a quadcopter drone with adaptive MPC, characterized in that, The method comprises the following steps: S1: establishing a discrete-time kinematic model according to the operating state parameters and control parameters of the controlled quadrotor unmanned aerial vehicle; S2: in combination with the physical constraints of the quadrotor unmanned aerial vehicle, inequality constraints are established and combined with a discrete-time kinematics model to define a cost function of the quadrotor unmanned aerial vehicle control problem, and an adaptive control time domain is designed as a cyclic prediction time domain wherein is the prediction horizon at the time instant; is the length of the minimum prediction horizon; denotes the cycle length, being a positive integer; is the modulo operation, i.e. the current time instant divided by the cycle length giving the remainder; S3: defining an optimization problem according to a cost function of the quadrotor unmanned aerial vehicle control problem; S4: combining inequality constraints of relevant control parameters and solving the optimization problem by using a two-stage alternating algorithm; The method for solving the optimization problem in the NMPC algorithm in step S4 includes two stages: In the first stage, the weight coefficient is fixed, and the system state and control variable are predicted, and in the second stage, the system state and control variable are fixed, and the weight coefficient is estimated; The first stage: when the weight is fixed, the mathematical description of the optimization problem is converted into a quadratic programming (QP) problem: Since the optimization problem represented by the mathematical description of the optimization problem has a quadratic loss term, as well as linear constraints and inequality constraints, it is a convex quadratic programming problem with linear constraints, wherein the linear constraints represent the discrete-time kinematic model update of the system; In the formula, is the minimization operation of the inner layer about the state variable variation and the control variable variation ; is the initial state constraint; is a dynamic updating relationship describing the state variable variation from the k time to the k+1 time; wherein, is the error between the system state variation obtained by the system dynamic model and the directly predicted state at the k+1 time; and are the partial derivative matrices of the functions about the state variable and the control variable at the point , and the system matrix; is the constraint related quantity calculated by the predicted state at the k time and the predicted control input ; are the partial derivative matrices of the functions about the state variable and the control variable at the point , is a vector composed of the difference between the reference state , the reference control and the predicted state , the predicted control ; After solving this problem, the state prediction value is updated as , and the control prediction value is updated as , is a step size for controlling the magnitude of the update in each iteration; Second stage: by adjusting and updating the weight coefficient in the cost function, the cost function can be able to according to the error between the reference state and the current predicted state , the state error and control error of the system at future time are punished, so that the control strategy is more adaptive to the actual situation, and the system performance is optimized; The control and state variables in the fixed optimization problem are denoted as where 1 is a vector; in the simplest form, define ), by defining , The optimization problem is simplified to a quadratic problem and the solution is obtained as where is a sub-time range for weight update, resulting in an estimate After that, the weight matrix Q is updated as , denotes generating a diagonal matrix, where the only parameter to adjust is , is a Lagrange variable.

2. The quadcopter drone control method with adaptive MPC according to claim 1, wherein, The operating state parameters and control parameters of the quadrotor unmanned aerial vehicle in step S1 include: The operating state parameters of the quadrotor unmanned aerial vehicle: the position, linear velocity and unmanned aerial vehicle attitude information of the quadrotor unmanned aerial vehicle; The operating control parameters of the quadrotor unmanned aerial vehicle: mass-normalized thrust and angular velocity, wherein the mass-normalized thrust is obtained by dividing the total thrust by the mass of the aircraft.

3. The quadcopter drone control method with adaptive MPC according to claim 2, wherein, The method for establishing the discrete-time kinematic model of the system in step S1 includes: Let us assume that the dynamics of a quadrotor drone are represented by a set of differential equations , The discrete kinematic model of the form of (1) is given by are state variables of the quadcopter unmanned aerial vehicle system; wherein represents a position of a body coordinate system B of the unmanned aerial vehicle relative to a world coordinate system W, represents a linear velocity of the body coordinate system B of the unmanned aerial vehicle relative to the world coordinate system W, represents an attitude of the body coordinate system B of the unmanned aerial vehicle relative to the world coordinate system W; The body coordinate system B is a coordinate system fixed on the unmanned aerial vehicle, which is used to describe the motion state of the unmanned aerial vehicle itself; and the world coordinate system W is a global and fixed reference coordinate system, which is used to describe the absolute position and attitude information of the unmanned aerial vehicle in the entire environment; For the quadcopter unmanned aerial vehicle system, where, It is the mass-normalized thrust vector. , It is the first quadcopter drone i The thrust generated by each motor It's about the quality of the drone; It is the angular velocity of the quadcopter in the body coordinate system B; , are the time derivatives of the drone position, linear velocity, and quaternion, respectively; is the gravity vector, g takes ; is the operator used to represent the multiplication between a quaternion and a vector; is the time derivative of the quaternion , where is the skew-symmetric matrix of the angular velocity vector , is used to represent the relationship between the change in state of the rotorcraft drone over time and the control inputs.

4. The control method of claim 3, wherein: The definition of the cost function for solving the quadrotor unmanned aerial vehicle control problem in step S2 includes: The cost function is defined as where is a term related to the state cost weight matrix, is a Lagrange variable, is a cost function related to the weight, is its corresponding parameter, is the prediction horizon at time instant, is a quadratic cost function in summation form to measure the cost of state and control variable changes, where and are the state weight matrix and control weight matrix, respectively, is the step size, is a vector composed of the difference between the reference state , the reference control and the predicted state , the predicted control .

5. The quadcopter drone control method with adaptive MPC according to claim 1, wherein: The optimization problem in step S3 includes state and input optimization and adaptive update of the weight coefficient; The mathematical description of the optimization problem is as follows: are the optimal results to be obtained, respectively corresponding to the estimated value of the state variable change amount, the estimated value of the control variable change amount, and the estimated value of the weight matrix; is a maximization operation on the outer layer with respect to the weight matrix ; is a minimization operation on the inner layer with respect to the state variable change amount and the control variable change amount , is a step size; Assume a reference state and a reference control , the state error is denoted as , the control error is denoted as , and the discrete control objective is defined as where and are the state weight matrix and the control weight matrix, respectively, used to adjust the relative importance of the state error and the control error in the cost function; Discrete control objective By sequentially approximating the quadratic programming problem, the solution of the quadratic programming problem is used as the gradient direction and to take a step that minimizes the original continuous problem; by iterating where , and are the system predicted values; is the iteration step size, ensuring stability and convergence of the iterative update process; given the state measurement , the state prediction and the control prediction , the discrete control optimization problem is approximated as follows: The computer program is executed by the processor, so that the processor executes the method as claimed in any one of claims 1 to 5. ; is the Hessian matrix of the Lagrangian function, here seen as , is the inequality constraint function, is the discrete state equation of the system.

6. A computer readable storage medium storing a computer program, characterized in that, The memory stores a computer program, which is executed by the processor, so that the processor executes the method as claimed in any one of claims 1 to 5. 7.A computer device, comprising a memory and a processor, and characterized in that, ​

Citation Information

Patent Citations

  • Path tracking control method for adaptive pose correction based on MPC

    CN114047722A

  • Longitudinal adaptive control method based on nonlinear MPC rapid solving method

    CN117681872A