Self-adaptive MPC quad-rotor unmanned aerial vehicle control method, medium and equipment
Through the adaptive MPC method, the control time domain and weight coefficient of the quadrotor UAV are dynamically adjusted, which solves the problem of insufficient system adaptability caused by weight selection in traditional NMPC methods due to the dependence of human expert knowledge and fixed prediction time domain, and achieves better trajectory tracking and control performance.
Patent Information
- Application Number
- CN202510236566.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-02-28
AI Technical Summary
In the nonlinear model predictive control (NMPC) method of traditional quadrotor drones, weight selection depends on human expert knowledge, and it is difficult to take into account the optimization needs of multiple flight trajectories. In the fixed prediction time domain, the system adaptability and flexibility are insufficient when facing different flight trajectories.
A four-rotor UAV control method for adaptive MPC is proposed. By establishing a discrete time kinematic model and defining cost function, the adaptive control time domain is designed, and the optimization problem is solved using a two-stage alternating algorithm, and the prediction time domain and weight coefficient are dynamically adjusted.
This method successfully optimizes the trajectory tracking of the quadrotor UAV, improves the control stability and generalization capabilities of the system, reduces the computing burden, and improves the overall performance of the system.
Smart Images

Figure CN119828480A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and in particular to an adaptive MPC four-rotor unmanned aerial vehicle control method, medium and equipment. Background Art
[0002] In recent years, drones have been widely used in disaster search and rescue, police enforcement, and power system inspection due to their excellent agility and practicality. Accurate position control is essential for drones to successfully complete these tasks. However, since quadrotor drones exhibit significant nonlinear behavior and strong coupling characteristics, designing a controller with high robustness and stability for them faces major challenges.
[0003] The Model Predict Control (MPC) algorithm has the ability to explicitly handle complex system constraints. It uses rolling optimization and feedback correction strategies to online correct the predicted trajectory at each moment, and has strong anti-interference ability. Since the actual quadcopter model is nonlinear, the nonlinear model predictive control (NMPC) algorithm is being widely used in the control system of quadcopters. The main advantage of the NMPC algorithm is that it can predict the near future moment under the premise of meeting certain constraints, and when making such predictions, it will comprehensively consider the predictions of all future moments in the prediction time domain.
[0004] In the nonlinear model predictive control (NMPC) problem of quadrotor drones, the state cost weight coefficients and control cost weight coefficients of the corresponding cost function will significantly affect the control performance of the system. However, in current research, most of the state cost and control cost weight coefficients of the cost function are carefully selected based on human expert knowledge (tuned for platform and trajectory). Although fixed weight coefficients are widely used in the control problem of quadrotor drones, this approach is not optimal for executing operation trajectories with minimum position error and sufficiently "smooth" changes in predictive control. In addition, when it comes to a series of complex and unique drone flight scenarios, the fixed weight tuning mechanism may be difficult to achieve satisfactory generalization effects.
[0005] In the nonlinear model predictive control (NMPC) problem of quadrotor drones, a fixed prediction horizon is usually used, which may lead to excessive system computational burden in some cases. The adaptive prediction horizon strategy can dynamically adjust the prediction horizon length according to the actual needs of the system, thereby reducing unnecessary calculations and improving computational efficiency. In the face of uncertainty and external interference in the quadrotor drone system model, the adaptive prediction horizon strategy can improve the robustness of the system by adjusting the prediction horizon, ensuring that the drone system can maintain good control performance under different flight trajectories. Summary of the invention
[0006] The present invention proposes an adaptive MPC quadrotor unmanned aerial vehicle control method, which can solve at least one of the technical problems in the background technology.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] A method for controlling a quadrotor drone using adaptive MPC includes the following steps:
[0009] S1: Establish a discrete time kinematic model based on the operating state parameters and control parameters of the controlled quadrotor drone;
[0010] S2: Combined with the physical constraints of the quadrotor drone, inequality constraints are established and combined with the discrete time kinematic model to define the cost function of the quadrotor drone control problem, and the adaptive control time domain is designed as the cyclic prediction time domain N(k) = N min +M-rem(k,M)
[0011] Among them, N(k) is the prediction time domain at time k; N min is the length of the minimum prediction time domain; M represents the cycle length, which is a positive integer; rem is the remainder operation, that is, the remainder obtained by dividing the current time k by the cycle length M;
[0012] S3: Define the optimization problem based on the cost function of the quadrotor drone control problem;
[0013] S4: Combined with the inequality constraints of relevant control parameters, a two-stage alternating algorithm is used to solve the optimization problem.
[0014] Furthermore, the operating state parameters and control parameters of the quadrotor drone in step S1 of the present invention include:
[0015] Quad-rotor UAV operating status parameters: quad-rotor UAV position, linear speed and UAV attitude information;
[0016] Quadrotor UAV operating control parameters: 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 a discrete time kinematic model of the system in step S1 of the present invention includes: assuming that the dynamic characteristics of the quadrotor drone are represented by a set of differential equations f(x,u), the specific form of the discrete kinematic model of f(x,u) is:
[0018]
[0019] is the state variable of the quadrotor UAV system; where p WB =[p x ,p y ,p z ] T represents the position of the drone's body coordinate system B relative to the world coordinate system W, v WB =[v x ,v y ,v z ] T represents the linear velocity of the drone's body coordinate system B relative to the world coordinate system W, q WB =[q w ,q x ,q y ,q z ] T Represents the posture of the drone'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 drone, which is used to describe the motion state of the drone itself; while the world coordinate system W is a global, fixed reference coordinate system, which is used to describe the absolute position and attitude information of the drone in the entire environment;
[0021] is the input variable of the quadrotor drone system; where c = [0,0,c] T is the mass-normalized thrust vector, c = (f1 + f2 + f3 + f4) / m, f i is the thrust generated by the i-th motor of the quadrotor drone, m is the mass of the drone; ω B =[ω x ,ω y ,ω z ] T is the angular velocity of the quadrotor in the body coordinate system B;
[0022] They are the time derivatives of the drone position, linear velocity and quaternion; g = [0, 0, -g] T is the gravity vector, g is 9.81m / s 2⊙ is the operator used to represent the multiplication between quaternions and vectors; Λ(ω B )q WB is the quaternion q WB The time derivative of B ) is the angular velocity vector ω B The antisymmetric matrix, f(x k ,u k ) is used to represent the relationship between the state change of the rotorcraft over time and the control input.
[0023] Furthermore, the cost function for solving the quadrotor drone control problem defined in step S2 of the present invention includes:
[0024] The cost function can be defined as Where -λp(Q,θ) is the term related to the state cost weight matrix, λ is the Lagrangian variable, p(Q,θ) is the cost function related to the weight, θ is its corresponding parameter, N(k) is the prediction time domain at time k, It is a quadratic cost function in the form of a summation, which is used to measure the cost of the change in state and control variables, where Q k and R k They are the state weight matrix and the control weight matrix, α is the step size, l k The reference state Reference Control With the predicted status Predictive Control The vector of differences.
[0025] Furthermore, the optimization problem in step S3 of the present invention includes: optimization of state and input 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, corresponding to the estimated value of the change of the state variable, the estimated value of the change of the control variable and the estimated value of the weight matrix; It is the outer layer about the weight matrix Q=[Q1,…Q N ]'s maximization operation; is the change Δx of the inner layer regarding the state variable k and the control variable change Δu k Minimization operation; is the initial state constraint; It describes the dynamic update relationship of the change of state variables from time k to time k+1; The error between the system state change obtained by the system dynamic model and the state at time k+1 directly predicted; and They are the function f(x,u) about the state variable and the control variable at the point The partial derivative matrix at is the system matrix; By predicting the state based on time k and predictive control input Calculate constraint-related quantities; They are the function g(x,u) about the state variable and the control variable at the point The partial derivative matrix at ;
[0029] Assume there is a reference state and reference control The state error is recorded as The control error is recorded as The discrete control objective is defined as Where Q k and R k They are the state weight matrix and the control weight matrix, which are used to adjust the relative importance of the state error and the control error in the cost function;
[0030] Discrete Control Objectives The sequential approximation is usually performed via a quadratic programming problem, the solution of which is used as the gradient direction Δx k and Δu k , to take the step that minimizes the original continuous problem; by Iterate, where and is the system prediction value; α is the iteration step size, which ensures the stability and convergence of the iterative update process; given the state measurement value Status prediction and control prediction In the case of , the discrete control optimization problem can be approximated as follows:
[0031]
[0032] in
[0033] H k is the Hessian matrix of the Lagrangian function, which can be seen here as
[0034] g(x,u) is the inequality constraint function, and f(x,u) is the discrete state equation of the system.
[0035] Furthermore, the method of solving the optimization problem in the NMPC algorithm by using a two-stage alternating algorithm in step S4 of the present invention comprises: two stages;
[0036] In the first stage, the weight coefficients are fixed and the system state and control variables are predicted, and in the second stage, the system state and control variables are fixed and the weight coefficients are estimated;
[0037] Phase 1: When the weights are fixed, the optimization problem in Equation 3 is simplified to a quadratic programming QP problem as expressed in Equation 4:
[0038] Since the optimization problem represented by Equation 4 has a quadratic loss term, as well as linear constraints and inequality constraints, it is a convex quadratic programming problem with linear constraints, where the linear constraints represent the update of the discrete-time kinematic model of the system;
[0039]
[0040] After solving the problem, the state prediction value is updated to The control prediction value is updated to α is the step size, which is used to control the magnitude of each iterative update;
[0041] The second stage: By adjusting and updating the weight coefficients in the cost function, the cost function can be based on the error between the reference state and the current predicted state, that is, Penalize the state error and control error of the system at future moments, so that the control strategy can better adapt to the actual situation and optimize the system performance;
[0042] Fix the control variables and state variables in equation 3, and let q=Q11=…=Q N 1, where 1 is a vector; in the simplest form, define p(Q) = (Q1) T (Q1), by defining h k =(Δx k +αl k )⊙Δx k , ⊙ represents the corresponding multiplication of elements, simplifying Equation 3 to a quadratic problem and obtaining the solution:
[0043]
[0044] Where N t (N t ≤N(k)) is the sub-time range used for weight update, and the estimated value is obtained After that, the weight matrix Q is updated to It means to generate a diagonal matrix. The only parameter that needs to be adjusted is γ, and the λ parameter is generally between 0.5 and 5.
[0045] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0046] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0047] In traditional NMPC control problems, a fixed prediction horizon is usually used, which has certain limitations in terms of system adaptability and flexibility when the UAV faces different flight trajectories. The adaptive prediction horizon strategy can significantly reduce the computational burden while ensuring control performance, thereby optimizing resource utilization.
[0048] It can be seen from the above technical solutions that the present invention proposes an adaptive nonlinear model predictive control method, which solves the problem that the traditional NMPC weight selection relies on experience and is difficult to take into account multiple trajectory optimization requirements; the adaptive control time domain is used to better cope with the dynamic changes of the system and improve the overall performance of the system. The control method used in the present invention successfully optimizes the trajectory tracking of the quadcopter drone and improves the stability and generalization ability of the system control. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a schematic diagram of the process of the method of the present invention;
[0050] Figure 2 Schematic diagram of the two-stage alternating algorithm used in the present invention. DETAILED DESCRIPTION
[0051] 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 fix the prediction time domain during the control process, a quadrotor UAV path tracking control method of adaptive MPC is proposed, including an adaptive weight coefficient and an adaptive prediction time domain. The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments.
[0052] like Figure 1 As shown, the adaptive MPC quadrotor drone control method described in this embodiment includes the following steps:
[0053] S1: Establish a discrete time kinematic model based on the operating state parameters and control parameters of the controlled quadrotor drone;
[0054] S2: Combined with the physical constraints of the quadrotor drone, inequality constraints are established and combined with the discrete time kinematic model to define the cost function of the quadrotor drone control problem, and the adaptive control time domain is designed as the cyclic prediction time domain N(k) = N min +M-rem(k,M)
[0055] Among them, N(k) is the prediction time domain at time k; N min is the length of the minimum prediction time domain; M represents the cycle length, which is a positive integer; rem is the remainder operation, that is, the remainder obtained by dividing the current time k by the cycle length M;
[0056] S3: Define the optimization problem based on the cost function of the quadrotor drone control problem;
[0057] S4: Combined with the inequality constraints of relevant control parameters, a two-stage alternating algorithm is used to solve the optimization problem.
[0058] The following is a detailed description of each step:
[0059] S1: Establish a discrete time kinematic model of the system according to the operating state parameters and control parameters of the controlled quadrotor drone;
[0060] The operating state parameters of the quadcopter include: the position, linear velocity and attitude information of the quadcopter; the operating control parameters of the quadcopter include: mass-normalized thrust and angular velocity, where the mass-normalized thrust is obtained by dividing the total thrust (i.e. the sum of the thrusts generated by the four motors on the quadcopter) by the mass of the aircraft. Define the adaptive prediction time domain in the optimization problem, and the adaptive prediction time domain strategy can dynamically adjust the prediction time domain in the control problem according to the current moment.
[0061] Assuming that the dynamic characteristics of the quadrotor drone are represented by a set of differential equations f(x,u), the specific form of the discrete kinematic model of f(x,u) is:
[0062]
[0063] is the state variable of the quadrotor UAV system; among them, p WB =[p x ,p y ,p z ] t represents the position of the drone's body coordinate system B relative to the world coordinate system W, v wB =[v x ,v y ,v z ] T represents the linear velocity of the drone's body coordinate system B relative to the world coordinate system W, qWB =[q w ,q x ,q y ,q z ] T Represents the posture of the drone's body coordinate system B relative to the world coordinate system W.
[0064] The body coordinate system B is a coordinate system fixed on the drone, which is used to describe the motion state of the drone itself; while the world coordinate system W is a global, fixed reference coordinate system, which is used to describe the absolute position and attitude information of the drone in the entire environment.
[0065] is the input variable of the quadrotor drone system. Where c=[0,0,c] T is the mass-normalized thrust vector, c = (f1 + f2 + f3 + f4) / m, f i is the thrust generated by the i-th motor of the quadrotor drone, m is the mass of the drone; ω B =[ω x ,ω y ,ω z ] T is the angular velocity of the quadrotor in the body coordinate system B.
[0066] They are the time derivatives of the drone position, linear velocity and quaternion; g = [0, 0, -g] T is the gravity vector, g is 9.81m / s 2 ⊙ is the operator used to represent the multiplication between quaternions and vectors; Λ(ω B )q WB is the quaternion q WB The time derivative of B ) is the angular velocity vector ω B The antisymmetric matrix of f(x k ,u k ) is used to represent the relationship between the state (position, speed, attitude) of the rotorcraft and the control input (thrust, angular velocity) over time.
[0067] Define the prediction horizon in the optimization problem as the cyclic prediction horizon N(k)=N min +M-rem(k,M). N(k) is the prediction time domain at time k; N min is the length of the minimum prediction time domain; M represents the cycle length, which is a positive integer; rem is the remainder operation, that is, the remainder obtained by dividing the current time k by the cycle length M;
[0068] S2: Based on the discrete-time kinematic model combined with the physical constraints of the quadrotor drone, the inequality constraints of the relevant control parameters are established, and the cost function of the quadrotor drone control problem is defined in combination with the discrete-time kinematic model;
[0069] The physical limitations of the UAV platform are modeled through the inequality constraints g(x,u) in order to obtain feasible solutions. When solving problems related to UAV control, it is necessary to ensure that the values of the state variables x and control variables u are within the range allowed by the actual physical conditions. The minimum constraints are combined into a vector The maximum limit combination is a vector In solving the optimization problem, the control variable u must satisfy u min ≤u≤u max , to ensure that the control strategy conforms to the physical characteristics of the drone.
[0070] The cost function can be defined as Where -λp(Q,θ) is a term related to the state cost weight matrix, λ is a Lagrangian variable, p(Q,θ) is a cost function related to the weight, θ is its corresponding parameter, and N(k) is the prediction time domain at time k. It is a quadratic cost function in the form of a summation, which is used to measure the cost of the change in state and control variables, where Q k and R k They are the state weight matrix and the control weight matrix, α is the step size, l k The reference state Reference Control With the predicted status Predictive Control The vector of differences.
[0071] S3: Define the optimization problem based on the cost function of the quadrotor drone control problem;
[0072] The optimization problem includes the optimization of state and input as well as the adaptive update of weight coefficients.
[0073] The mathematical description of the optimization problem is as follows:
[0074]
[0075] are the optimal results to be obtained, corresponding to the estimated values of the change in state variables, the estimated values of the change in control variables, and the estimated values of the weight matrix. It is the outer layer about the weight matrix Q=[Q1,…Q N ] is the maximization operation, that is, by adjusting Q, the overall objective function value is maximized. is the change Δx of the inner layer regarding the state variable kand the control variable change Δu k Minimization operation. is the initial state constraint, which is equal to the difference between the initial state measurement value and the initial state reference value. It describes the dynamic update relationship of the change of state variables from time k to time k+1. The error between the system state change obtained by the system dynamic model and the state at time k+1 directly predicted. and They are the function f(x,u) about the state variable and the control variable at the point The partial derivative matrix at is the system matrix. By predicting the state based on time k and predictive control input Calculate the constraint-related quantities. They are the function g(x,u) about the state variable and the control variable at the point The partial derivative matrix at .
[0076] The proposed formula (3) is a minimum-maximum problem with quadratic and bilinear cost functions. If the weight coefficients in formula (3) are fixed, the simplified problem about the system state and control variables is a convex optimization problem; if the system state and control variables are fixed, the simplified problem about the weight coefficient variables can be converted into a convex optimization problem. Since there are relatively mature solutions to convex optimization problems, this property provides convenience for solving this problem.
[0077] Assume there is a reference state and reference control The state error is recorded as The control error is recorded as The discrete control objective is defined as Where Q k and R k They are the state weight matrix and the control weight matrix, which are used to adjust the relative importance of the state error and the control error in the cost function.
[0078] Discrete Control Objectives This is usually done sequentially via quadratic programming problems (QPs). The solution to the QP is used as the gradient direction Δx k and Δu k , to take steps that minimize the original continuous problem. Iterate, where and is the system prediction value. α is the iteration step size, which ensures the stability and convergence of the iterative update process. Given the state measurement value Status prediction and control prediction In the case of , the discrete control optimization problem can be approximated as follows:
[0079]
[0080] in
[0081] H k is the Hessian matrix of the Lagrangian function, which can be seen here as g(x,u) is the inequality constraint function, and f(x,u) is the discrete state equation of the system.
[0082] S4: Combined with the inequality constraints of relevant control parameters, a two-stage alternating algorithm is used to solve the optimization problem, and the mass-normalized thrust and angular velocity input variables at the next moment are obtained. At the same time, the relevant weight coefficients in the cost function are updated, and the mass-normalized thrust and angular velocity input variables at the next moment are sent to the controlled UAV as adjustment quantities, thereby completing the UAV control.
[0083] A 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 (simultaneously optimizing the state, control variables and weight matrix) into two relatively simple sub-problems, and gradually approach the optimal solution through alternating solutions.
[0084] like Figure 2 As shown, the first stage: when the weights are fixed, formula (3) is transformed into a quadratic programming (QP) problem. Formula (3) is a complex optimization problem involving the weight matrix, the change in state variables, and the change in control variables, including maximization and minimization operations and multiple constraints. After the weights are fixed, the problem focuses on the optimization of Δx and Δu, and the following form is obtained:
[0085]
[0086] This constraint problem is a quadratic function used to measure the cost of changing the state and control variables. k and R k are the state weight matrix and the control weight matrix, which are determined in the fixed weight stage. After solving the quadratic programming problem represented by equation (4), the optimal estimate of the change in state variables is obtained. and optimal estimates of the changes in the control variables pass Perform iterative updates of system states and input variables.
[0087] Phase 2: In this phase, the weight Q is adjusted and updated to make the cost function adapt to the actions taken. Specifically, the error that may occur in the future is penalized based on the error between the current reference state and the current predicted state. This enables the system to dynamically adjust the emphasis on the errors of different state variables in the cost function according to the current operating state, thereby guiding the system to run in a more desired direction and improving control performance.
[0088] In equation (3), the control variables and state variables are fixed. Define p(Q,θ) as (Q1) T (Q1), where 1 is a vector. Through this definition, the weight matrix is linked to the cost function so that the weights can be adjusted in subsequent optimization to minimize the cost.
[0089] By defining h k =(Δx k +αl k )⊙Δx k (⊙ denotes corresponding element multiplication), simplifying equation (3) to a quadratic problem and finding a closed-form solution:
[0090]
[0091] Get an estimate After that, the weight matrix is updated as That is to say The elements of are used as diagonal elements to form a diagonal matrix, which is used as the updated weight matrix.
[0092] The two-stage alternating algorithm is an iterative and repetitive process that continuously executes 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.
[0093] In traditional NMPC control problems, the weight coefficient of the state cost is often selected based on expert knowledge. Although it can reflect a certain stability, it may not be optimal for executing trajectories with the lowest position error and achieving "smooth" changes in predictive control. Moreover, fixed weight selection makes it difficult to achieve good tracking performance and control smoothness on different trajectories.
[0094] In traditional NMPC control problems, a fixed prediction horizon is usually used, which has certain limitations in terms of system adaptability and flexibility when the UAV faces different flight trajectories. The adaptive prediction horizon strategy can significantly reduce the computational burden while ensuring control performance, thereby optimizing resource utilization.
[0095] The present invention proposes an adaptive nonlinear model predictive control method, which solves the problem that the traditional NMPC weight selection relies on experience and is difficult to take into account multiple trajectory optimization requirements; the adaptive control time domain is used to better cope with the dynamic changes of the system and improve the overall performance of the system. The control method used in the present invention successfully optimizes the trajectory tracking of the quadcopter drone and improves the stability and generalization ability of the system control.
[0096] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0097] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0098] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the adaptive MPC quadrotor drone control methods in the above embodiments.
[0099] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above methods.
[0100] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0101] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0102] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0103] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive MPC quadrotor drone control method, characterized in that: The following steps are involved: S1: Establish a discrete time kinematic model based on the operating state parameters and control parameters of the controlled quadrotor drone; S2: Combined with the physical constraints of the quadrotor drone, inequality constraints are established and combined with the discrete time kinematic model to define the cost function of the quadrotor drone control problem, and the adaptive control time domain is designed as the cyclic prediction time domain N(k) = N min +M-rem(k,M) Among them, N(k) is the prediction time domain at time k; N min is the length of the minimum prediction time domain; M represents the cycle length, which is a positive integer; rem is the remainder operation, that is, the remainder obtained by dividing the current time k by the cycle length M; S3: Define the optimization problem based on the cost function of the quadrotor drone control problem; S4: Combined with the inequality constraints of relevant control parameters, a two-stage alternating algorithm is used to solve the optimization problem.
2. The adaptive MPC quadrotor drone control method according to claim 1, characterized in that: The operating state parameters and control parameters of the quadrotor drone in step S1 include: Quad-rotor UAV operating status parameters: quad-rotor UAV position, linear speed and UAV attitude information; Quadrotor UAV operating control parameters: mass-normalized thrust and angular velocity, where the mass-normalized thrust is obtained by dividing the total thrust by the mass of the aircraft.
3. The adaptive MPC quadrotor drone control method according to claim 2, characterized in that: The method for establishing a discrete time kinematic model of the system in step S1 includes: Assuming that the dynamic characteristics of the quadrotor drone are represented by a set of differential equations f(x,u), the specific form of the discrete kinematic model of f(x,u) is: is the state variable of the quadrotor UAV system; among them, p WB =[p x ,p y ,p z ] T represents the position of the drone's body coordinate system B relative to the world coordinate system W, v WB =[v x ,v y ,v z ] T represents the linear velocity of the drone's body coordinate system B relative to the world coordinate system W, q WB =[q w ,q x ,q y ,q z ] T Represents the posture of the drone's body coordinate system B relative to the world coordinate system W; The body coordinate system B is a coordinate system fixed on the drone, which is used to describe the motion state of the drone itself; while the world coordinate system W is a global, fixed reference coordinate system, which is used to describe the absolute position and attitude information of the drone in the entire environment; is the input variable of the quadrotor drone system; where c = [0,0,c] T is the mass-normalized thrust vector, c = (f1 + f2 + f3 + f4) / m, f i is the thrust generated by the i-th motor of the quadrotor drone, m is the mass of the drone; ω B =[ω x ,ω y ,ω z ] T is the angular velocity of the quadrotor in the body coordinate system B; They are the time derivatives of the drone position, linear velocity and quaternion; g = [0, 0, -g] T is the gravity vector, g is 9.81m / s 2 ⊙ is the operator used to represent the multiplication between quaternions and vectors; Λ(ω B )q wB is the quaternion q WB The time derivative of B ) is the angular velocity vector ω B The antisymmetric matrix, f(x k ,u k ) is used to represent the relationship between the state change of the rotorcraft over time and the control input.
4. The adaptive MPC quadrotor drone control method according to claim 3, characterized in that: The cost function defined in step S2 for solving the quadrotor drone control problem includes: The cost function is defined as Where -λp(Q,θ) is the term related to the state cost weight matrix, λ is the Lagrangian variable, p(Q,θ) is the cost function related to the weight, θ is its corresponding parameter, N(k) is the prediction time domain at time k, It is a quadratic cost function in the form of a summation, which is used to measure the cost of the change in state and control variables, where Q k and R k They are the state weight matrix and the control weight matrix, α is the step size, l k The reference state Reference Control With the predicted status Predictive Control The vector of differences.
5. The adaptive MPC quadrotor drone control method according to claim 1, characterized in that: The optimization problem in step S3 includes: optimization of state and input and adaptive update of weight coefficients; The mathematical description of the optimization problem is as follows: is the optimal result to be obtained, corresponding to the estimated value of the change of the state variable, the estimated value of the change of the control variable and the estimated value of the weight matrix; It is the outer layer about the weight matrix Q=[Q1,…Q N ]'s maximization operation; is the change Δx of the inner layer regarding the state variable k and the control variable change Δu k Minimization operation; is the initial state constraint; It describes the dynamic update relationship of the change of state variables from time k to time k+1; The error between the system state change obtained by the system dynamic model and the state at time k+1 directly predicted; and They are the function f(x,u) about the state variable and the control variable at the point The partial derivative matrix at is the system matrix; By predicting the state based on time k and predictive control input Calculate constraint-related quantities; They are the function g(x,u) about the state variable and the control variable at the point The partial derivative matrix at ; Assume there is a reference state and reference control The state error is recorded as The control error is recorded as The discrete control objective is defined as Where Q k and R k They are the state weight matrix and the control weight matrix, which are used to adjust the relative importance of the state error and the control error in the cost function; Discrete Control Objectives The sequential approximation is usually performed via a quadratic programming problem, the solution of which is used as the gradient direction Δx k and Δu k , to take the step that minimizes the original continuous problem; by Iterate, where and is the system prediction value; α is the iteration step size, which ensures the stability and convergence of the iterative update process; given the state measurement value Status prediction and control prediction In the case of , the discrete control optimization problem is approximated as follows: in H k is the Hessian matrix of the Lagrangian function, which is considered here as g(x,u) is the inequality constraint function, and f(x,u) is the discrete state equation of the system.
6. The adaptive MPC quadrotor drone control method according to claim 5, characterized in that: The method of solving the optimization problem in the NMPC algorithm using the two-stage alternating algorithm in step S4 includes: two stages; In the first stage, the weight coefficients are fixed and the system state and control variables are predicted, and in the second stage, the system state and control variables are fixed and the weight coefficients are estimated; Phase 1: When the weights are fixed, the optimization problem in equation (3) is simplified to the quadratic programming QP problem as expressed in equation (4): Since the optimization problem represented by equation (4) has a quadratic loss term, as well as linear constraints and inequality constraints, it is a convex quadratic programming problem with linear constraints, where the linear constraints represent the update of the discrete-time kinematic model of the system; After solving the problem, the state prediction value is updated to The control prediction value is updated to α is the step size, which is used to control the magnitude of each iterative update; The second stage: By adjusting and updating the weight coefficients in the cost function, the cost function can be based on the error between the reference state and the current predicted state, that is, Penalize the state error and control error of the system at future moments, so that the control strategy can better adapt to the actual situation and optimize the system performance; Fix the control variables and state variables in equation (3) and set q = Q11 = ... = Q N 1, where 1 is a vector; in the simplest form, define p(Q) = (Q1) T (Q1), by defining h k =(Δx k +αl k )⊙Δx k , ⊙ represents the corresponding multiplication of elements, simplifying equation (3) to a quadratic problem and obtaining the solution: Where N t (N t ≤N(k)) is the sub-time range used for weight update, and the estimated value is obtained After that, the weight matrix Q is updated to It means to generate a diagonal matrix, where the only parameter that needs to be adjusted is γ.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 6.
8. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 6.
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
Four-rotor unmanned aerial vehicle model prediction control method based on multiple models
CN118092493A
Adaptive robust MPC method for processing system with parameter uncertainty and input delay
CN119002275A
Path planning method oriented to various parking scenarios
WO2025010853A1