A Robust Disturbance-Rejection Controller Using Model Predictive Control for Quadrotor UAV in Tracking Aggressive Trajectory

: A robust controller for the waypoint tracking of a quadrotor unmanned aerial vehicle (UAV) is proposed in this paper, in which position control and attitude control are effectively decoupled. Model predictive control (MPC) is employed in the position controller. The constraints of motors are imposed on the state and input variables of the optimization equation. This design effectively mitigates the nonlinearity of the attitude loop and enhances the planning efﬁciency of the position controller. The attitude controller is designed using a nonlinear and robust control law based on SO ( 3 ) space, which enables continuous control on the SO ( 3 ) manifold. By extending the differential ﬂatness of the quadrotor-UAV to the angular acceleration level, the mapping of the control reference from the position controller to the attitude controller is achieved. Simulations are carried out to demonstrate the capability of the proposed controller. In the simulations, multiple aggressive ﬂight trajectories and severe external disturbances are designed. The results show that the controller is robust, with superior accuracy in tracking aggressive trajectories.


Introduction
Nowadays, quadrotor UAVs have been widely employed in various applications, such as agricultural plant protection [1], transportation and logistics distribution [2], and post-disaster rescue operations [3].To meet the demands of different missions and stay robust under challenging environmental conditions, the control methods for quadrotor UAVs have been continuously developed.
In a general task, the controller is responsible for accurately tracking a time-dependent trajectory designated by the planner.As an underactuated system, a quadrotor-UAV has far more state variables than input variables, and the nonlinear characteristics of the system make the control problem challenging.The cascaded PID control method is commonly utilized for quadrotor-UAV control, in which the position of the next time step is considered a reference input.The inner loop controls the attitude, and the outer loop takes charge of the position.The mapping from the position loop to the attitude loop is completed using the differential-flatness attribute of quadrotor UAVs [4][5][6].However, this error-based control method often performs well while tracing a smooth and slow trajectory, but struggles in tracking an aggressive trajectory.
To tackle the problem, a variety of advanced control algorithms for quadrotor UAVs have been proposed, among which MPC has received significant attention.The MPC method constructs an optimization problem based on the quadrotor-UAV model and applies constraints on the states and inputs of the system, and it generates control commands over the predicted time horizon by solving the optimization problem.References [7][8][9] have demonstrated the exceptional control efficiency of this approach.Furthermore, linearized model predictive control (LMPC) and nonlinear model predictive control (NMPC) have been developed and compared in many studies.In the former method, Taylor expansion is generally conducted around the hover point to linearize the quadrotor-UAV model.Linearization saves the computation cost, but downgrades the performance in terms of aggressive trajectory tracking, as the higher-order terms are truncated in the model.On the contrary, the nonlinear model is employed in NMPC for predictive control, resulting in superior tracking accuracy and robustness.However, the optimization offered by this method is usually non-convex, which leads to longer computational time and risks of solver non-convergence.In addition, the reinforcement learning-based control methods have been demonstrated to be effective for quadrotor-UAV control [10][11][12][13].Han et al. proposed a robust controller based on a hierarchical control framework and reinforcement learning [14].A robust control performance is achieved without prior knowledge of quadrotor-UAV dynamics.Kaufmann et al. showcased the application of learning-based approaches in acrobatic quadrotor-UAV flights [12].However, the end-to-end training approach limits the reusability and generalization of the method.
As the quadrotor-UAV is an underactuated system, the state variables are coupled with each other, which makes it difficult to accurately track all the states.The accuracy of attitude tracking is directly related to the accuracy of position tracking.Therefore, attitude control for quadrotor UAVs has been widely investigated in the literature.Traditional attitude control methods for quadrotor-UAVs often rely on Euler angles to represent the attitude, where each Euler angle is individually tracked to achieve attitude control.However, Euler angles reach singularity at specific attitudes.To avoid these issues, quaternion is employed to represent the attitude of quadrotor UAVs, as can be seen in references [15][16][17][18], resulting in improved attitude control performance.In geometric theory, the changes in attitude are correlated to the evolution of the SO(3) manifold.Therefore, Lee et al. and Yu et al. designed attitude controllers based on Lie groups on SO(3) space [19][20][21], which enables continuous control on SO(3) space.Also, with the representation of the attitude using this method, singularities are avoided during the control process.What is more, many researchers integrated the classical robust control algorithms into attitude control for robustness.For instance, Lee et al. [22] came up with an adaptive control algorithm.An adaptive law is employed to provide robust control with bounded errors even in the presence of unknown quadrotor-UAV internal parameters.Considering that quadrotor-UAVs are often subjected to external disturbances during flight, sliding-mode control algorithms are employed for attitude control in references [23][24][25].By incorporating sliding-mode-control terms into the control laws, the system disturbance rejection capability is, therefore, enhanced, and asymptotic convergences are ensured.
In most of the missions for a quadrotor-UAV, the objective of control is accurately tracking the position.The control of the attitude loop is essentially to fulfill the demands of the position loop.Most control approaches usually employ the entire dynamics model of quadrotor UAVs in the optimization process for predictive control, which introduces challenges due to the nonlinear nature of the attitude loop.However, if the desired values can be accurately traced in the attitude loop, the attitude loop can be decoupled from the position loop in the MPC optimization process.The nonlinearity in the attitude loop can, therefore, be avoided.Based on this idea, this paper aims to develop a quadrotor-UAV controller that can accurately track waypoints with temporal information.Contributions to this paper are listed as follows: (1) A robust controller for quadrotor-UAV waypoint tracking is proposed, in which position control and attitude control are decoupled.The control efficiency is enhanced while maintaining robustness.(2) The LMPC algorithm is used in position control, where the motor constraints are incorporated into both the input and state variables of the optimization problem.This approach effectively mitigates the nonlinear characteristics of the attitude loop and enhances the planning efficiency of the position controller.
(3) For the attitude controller, a nonlinear robust control law is designed based on the SO(3) space, which guarantees global asymptotic stability in the sense of Lyapunov.(4) Extensive simulations have verified the excellent control performance of the proposed controller, which can achieve high-precision tracking of the desired trajectory even under severe external disturbances.
The paper is divided into five sections.In Section 2, the model of the quadrotor-UAV as well as the coordinate systems used in current research are introduced.In Section 3, the framework of the proposed controller is elaborated.Descriptions of each module are provided in detail.In Section 4, control performances that have been demonstrated by multiple numerical simulations are provided.Finally, summaries and conclusions are provided in Section 5.

Model
In this article, variables are defined in a unified format.Matrices and vectors are denoted by bold non-italic capital letters and bold non-italic lowercase letters, respectively.Scalars are written in italic letters.The subscripts of a vector represent the components of that vector.For example, v wx , v wy and v wz are the components of the velocity vector along the three axes in the world coordinate system, respectively.
The coordinate systems employed in this paper are the world system W and the body system B. For the body coordinate system, the origin is located at the center of mass of the vehicle.The x-axis and y-axis are parallel to the two arms of the quadrotor-UAV as shown in Figure 1 and it is a right-handed system.For the world coordinate system, the z-axis points in the opposite direction of Earth's gravity.Similar to the paper by Mellinger and Kumar [26], an intermediate coordinate system C between the system W and system B is defined, it shares the same z-axis as the world coordinate system.The numbering of the four motors is illustrated in Figure 1.The propulsion system of the quadrotor-UAV is modeled as a second-order model.Following the discussion in reference [26], it is assumed that the force f i and torque n i produced by each motor are proportional to the square of its rotational speed ω i , as indicated in Equation (1).Within the equation, both k f and k n are constants, while k m stands for the motor response constant.In addition, considering the issue of motor saturation, there exists a maximum rotational speed constraint for each motor.
In the body coordinate system, the thrust T and the three-axis torque τ produced by the four motors are where l represents the length from the motor's rotational axis to the center of mass of the quadrotor-UAV.Following the convention, all angular velocities are represented in the body frame, while position and velocity vectors are represented in the world frame.The quadrotor-UAV is subjected to the forces of gravity and the thrust generated by the motors along the z-axis of the body frame.Newton's second law related to the position control is ma = −mgz w + Tz b (5) in which z w and z b indicate the unit vectors of the z-axis for the world and body frames.
The mass of the quadrotor-UAV is m and the gravitational acceleration is g.The Euler equation related to the attitude control is where J denotes the inertia tensor.The roll, pitch, and yaw angles (φ, θ and ψ) based on the Z-X-Y Euler angle sequence are employed to represent the attitude.The relation between the first derivative of Euler angles and the angular velocities in the body frame is

Methodology
For the proposed controller, a sequence of reference temporal waypoints is the control input.The information of each waypoint mainly consists of the three-dimensional (3D) position and yaw angle p d wx p d wy p d wz ψ d .Figure 2 provides the framework of the controller.The LMPC algorithm is employed in the position loop.The relevant model constraints are implemented on the state and input variables, thus planning the reference trajectory within a future time domain.Based on the differential flatness property of the quadrotor-UAV, the planned trajectory in the position loop can be mapped to the desired input for the attitude controller.In addition, an attitude control law is designed based on the SO(3) space.The nonlinear robust control law achieves accurate tracking of the desired attitude angles.Regarding the control allocation of the quadrotor-UAV, an inverse kinematics solution is obtained based on the optimization approach.Each module will be described in detail in the following sections.

Linear Model Predictive Control
The ability to predict over a wide time domain and consider the constraints of an actual model are the reasons why MPC is widely employed.In this paper, the LMPC is employed in the position controller, and the model constraints primarily incorporate considerations of motor speed limitations and motor response constraints.At each time step, the optimal control sequence for the entire prediction horizon is computed, but only the first control input is applied to the system.This process is iterated in a receding horizon manner, where optimization is performed repeatedly at each time step.
As shown in Figure 2, the selected state variables are the position, velocities, accelerations, and jerks along three axes.These variables are denoted by their respective initials.
The output of the system y is the 3D position, and the control input is the snap, which is the second derivative of acceleration.The reference input r corresponds to the desired position.Among these variables, p, v, a, j, s ∈ R 3 , y ∈ R 3 , u ∈ R 3 , r ∈ R 3 .The reasons for optimizing for the snap will be thoroughly analyzed in the subsequent sections.
The corresponding difference equation can be formulated based on the aforementioned input and state variables.
where A, B, and C are defined as  (10) in which Ts represents the discrete time interval, and I 3×3 denotes the identity matrix.
Given the prediction horizon N, we define the state vector X, the reference input vector Γ, the output vector Y, and the control input vector U over the predicted time horizon.
The relationship between them can be expressed as follows: where x(k) represents the state values at time step k, and u(k − 1) represents the control input at the previous time step.
Considering the limitations of the control inputs and the tracking accuracy, a problem aiming to minimize tracking errors and control input variations can be formulated as min where G 1 is the weight matrix related to tracking errors, and G 2 is the weight matrix related to the control input.Both G 1 and G 2 are positive definite diagonal matrices.
The model constraints considered in the controller are the motor speed constraints and motor response constraints.Combining Equations ( 1) and ( 5), we obtain The motor's maximum speed constraint is imposed on the acceleration term of the state variables.[•] max and [•] min represent the maximum and minimum values of each component in the vector, respectively.The attitude of quadrotor-UAV is assumed to be unchanged within a single time step.This assumption may lead to motor speed saturation in some extreme cases.However, the optimization-based control allocation approach significantly reduces the impact of motor saturation.
By taking the second derivative of both sides of Equation ( 5) and applying the motor response constraints to the snap term of the input variables, we have where ωi,min and ωi,max represent the minimum and maximum motor responsiveness, respectively.Additional constraints, such as velocity limitations, can also be incorporated into the current algorithm.By substituting the variables in Equation ( 15), an optimization problem is formulated as It is worth mentioning that the aforementioned optimization problem can be simplified into a quadratic programming problem due to the absence of nonlinearity in the attitude loop.As a result, it can be solved quickly in real-time.Through solving this optimization equation, the desired position, velocity, acceleration, jerk, and snap can be effectively planned within the predicted time horizon.The first control sequence of the optimization results can then be applied to the controller in the next time step.

Nonlinear Attitude Controller Based on SO(3)
As errors in attitude significantly undermine the position tracking accuracy, an attitude controller that can achieve high-precision tracking is very important to the overall controller.In this paper, a nonlinear and robust attitude control law is designed based on the SO(3) space, which ensures the attitude control is continuous on the SO(3) manifold.Furthermore, the proposed attitude controller is proved to be global asymptotically stable in the sense of Lyapunov.
The Euler equation for the attitude control is where τ dis represents external disturbances and τ is the input moment.Equation ( 22) can be rewritten as where h represents the external perturbation term, satisfying ||h|| ∞ ≤ h max .
According to the Euler rotation theorem, any rotation matrix of SO(3) can be equivalently achieved by rotating around a specific axis by a certain angle.Here, w b R denotes the rotation matrix of the current body coordinate system with respect to the world coordinate system, while w b R d signifies the desired rotation matrix of the body coordinate system with respect to the world coordinate system.Without causing any ambiguity, they are denoted as R and R d for simplicity, respectively.The error of the rotation matrix can be obtained as Following the definition of the error of the rotation matrix, the angle error can be calculated as The angular velocity error is defined as the difference between the desired angular velocity w d b and the actual angular velocity w b : Hence, the attitude control law can be designed based on the angle error and the angular velocity error: Referring to the exponential mapping and algebraic mapping between Lie groups and Lie algebras [27], the calculation of the desired rotation axis based on the error of the rotation matrix can be carried out as follows: where the operator ∧ denotes a conversion of a three-dimensional vector into a 3 × 3 skewsymmetric matrix, while the operator ∨ represents the inverse operation of the operator ∧.
The term h max sgn(w e ) in the control law corresponds to the sliding mode control term for angular velocity control, and it effectively mitigates the influence of external disturbances.Moreover, this term exhibits negligible numerical values, thus ensuring the stability of the controller without inducing any instability concerns.
To demonstrate the robustness of the control law, a Lyapunov function is conducted as follows: By taking the derivative of the Lyapunov function, we have The derivative of the angle term is expanded and the calculation is derived as where sum(|w e |) represents the sum of the absolute values of each element in w e .It is evident that the constructed Lyapunov function is positive definite, and its derivative is negative definite.Consequently, it can be concluded that the control law guarantees the global asymptotic stability of the system in the sense of Lyapunov.By adjusting the coefficients K 1 and K 2 , the convergence rate of the system can be tailored.
The attitude control law is designed based on the SO(3) space to avoid singularities.Concurrently, the control outputs are more efficient on the SO(3) manifold.Simulations presented in Section 4 have demonstrated the exceptional performance of the proposed attitude control law, even in the presence of disturbances and observation uncertainties.The precise tracking of the attitude loop ensures its capability to fulfill the demands of the position loop.Although the attitude loop is excluded from the MPC optimization, its nonlinearity can still be compensated by the attitude controller, thus the overall control performance remains superior.

Differential Flatness
Given the above control scheme, the position and attitude controller can be designed independently.By leveraging the differential flatness properties of the quadrotor-UAV, a mapping from the position loop to the attitude loop is achieved.Differential flatness is referred to as the selection of appropriate variables from the state space and describing the entire state space using these variables and their derivatives.Similar to most articles in the literature, the following flat outputs are selected, namely the 3D position and the yaw angle: σ = [p wx , p wy , p wz , ψ] T (34) The position is planned using the LMPC method within the position loop, and the yaw angle information is pre-defined.A direct mapping from the flat outputs to the desired attitude, angular rate, and angular acceleration is obtained based on these variables and their derivatives.
According to Mellinger and Kumar [26], the desired attitude is calculated through acceleration.As mentioned in Section 2, the coordinate system C is an intermediate coordinate system obtained by rotating the world coordinate system around the z-axis with the yaw angle, and x c indicates the unit vectors of the x-axis for this coordinate system.
By differentiating both sides of Equation ( 5), the jerk planned in the position loop can be mapped into the desired angular velocity.
Also in paper [26], however, the z-axis angular velocity is taken as zero for a constant yaw setpoint, which is actually nonzero.In this paper, the z-axis angular velocity is calculated through Equation (7).By taking the inverse of Equation ( 7), we obtain By solving Equation (38), the z-axis angular velocity can be determined based on the derivative value of the yaw angle.ψ cos φ = −w bx sin θ + w bz cos θ (38) In the attitude controller, both angular velocity and angular acceleration are required as feed-forward terms to enhance tracking accuracy in attitude control.Thus, the differential flatness property is extended to the angular acceleration to calculate its desired value.Similarly, by taking the second derivative of Equation ( 5), we have The equation for calculating the second derivative of thrust T is Expanding Equation (39), the cross product of the angular acceleration with the z-axis of the world coordinate system can be calculated.By projecting this quantity onto the x-axis and y-axis of the body coordinate system, the values of ẇbx and ẇby can be derived as Furthermore, we take the derivative of Equation (38): By solving Equation (42), the angular acceleration of the z-axis in the body coordinate system can be calculated.Based on differential flatness, the information in the position controller, a d , j d , s d , can be mapped to the inputs of the attitude controller, R d , w d , ẇd .Therefore, the second derivative of acceleration, i.e., the snap variable, must be considered in the position controller.Apart from better handling of the constraint of motor responsiveness, another crucial reason for this is to calculate the desired angular acceleration for the attitude controller.

Optimization-Based Control Allocation
The desired thrust can be calculated based on the desired acceleration from the position controller.When combined with the desired torque from the attitude controller, the desired control inputs can be obtained.Under normal conditions, it is sufficient to compute the desired rotational speeds for each motor by solving the system of linear Equations ( 3).Nevertheless, considering potential inaccuracies in the applied constraints and the possibility of excessive torque required during extreme flight conditions, the desired motor rotational speed might still exceed the actual speed limitation.To minimize the effects of motor saturation, the final module employs an optimization-based approach for control allocation.The algorithm is expressed as where Q represents the weight matrix.The desired rotational speeds for the four motors are determined by solving the aforementioned optimization problem.Subsequently, these desired speeds are translated into the corresponding PWM signals and transmitted to the motors.

Results
The simulations were performed within the MATLAB software, and the LMPC optimization equa+tions were solved using the OSQP solver.All modules were individually implemented on a HP OMEN8 Plus laptop, which is equipped with an Intel Core i7-12700H processor and 16 GB RAM.Under this specific hardware configuration, the average computation time for solving the MPC optimization problem is 4 ms.
A series of simulation scenarios were conducted to validate the tracking performance of the proposed controller.The relevant parameters of the quadrotor-UAV are provided in Table 1, which is referred to [28].The performance of the proposed attitude controller in terms of attitude angle tracking is demonstrated in Section 4.1.The trajectory tracking performance of the entire controller is presented in Section 4.2.It is crucial to substantiate the control performance and robustness of the attitude controller, given its direct relevance to the overall controller.In the attitude control law as shown in Equation ( 27), both K 1 and K 2 were set as 10.The desired tracking attitude is given as Firstly, the simulation was carried out without the external disturbances.In Figure 3, the actual and desired attitude and angular rate in three axes are plotted over time.As can be observed in the graph, even with an initial deviation between the actual and desired pitch angle, the system stabilized within 2 seconds.Subsequently, the system accurately tracked the specified attitude angles and angular velocities throughout the ensuing timeframe.Next, observation errors with an amplitude of 0.1 were added to the measured values of attitude and angular rate, while white noise sampled every 0.2 s with an amplitude of 20% of the controller normal operating conditions was employed to simulate the external disturbances.The actual and desired attitude and angular rate are plotted over time in Figure 4. Despite such a large initial pitch angle deviation and a massive amount of disturbances, the system stabilized and converged to the desired states quickly.It is important to note that there were several significant peaks in the actual angular velocities.This was caused by the presence of large random disturbances and observation errors at that particular moment.The attitude controller compensated for tracking errors by outputting a large torque.Actually, the angular velocity remained stable, but there were certain instances where it exhibits higher rates of variation.The results shown above have proved that the proposed nonlinear attitude controller based on SO(3) space has a robust control performance even under considerable external disturbances.

Trajectory Tracking
In order to validate the tracking performance of the proposed LMPC-based robust controller, four simulations were conducted: (a) aggressive trajectory tracking, (b) tracking lemniscate of Bernoulli, (c) acrobatic flight trajectory tracking, and (d) aggressive trajectory tracking under observation errors and extreme external disturbances.In these simulations, other controllers were employed for the purpose of comparison.
In the simulations, the prediction horizon for the position control was set to 50, which means that the LMPC optimizes the reference trajectory of the position loop for the next 50 time steps.Relevant parameters in the LMPC algorithm are presented in Table 2.The planning frequency of the position controller was set as 20 Hz, while the control frequency of the attitude controller was set as 200 Hz.

N
The prediction horizon 50 G 1 The weight matrix of tracking error Diag{20, 20, The weight matrix of control input Diag{0.01,0.005, • • • , 0.005} Q The weight matrix for control allocation Diag{5, 5, 5, 10} The proportional coefficient in attitude control law 10 The proportional coefficient in attitude control law 10

Aggressive Trajectory Tracking
In the first simulation scenario, the initial position for the quadrotor-UAV was at [0, 0, 0].Both velocity and acceleration were configured as zero at the initial time.The given reference waypoints are which requires aggressive attitude changes in both roll and pitch angles.A differential flatness-based cascaded PID controller with velocity feedforward [24] was employed for Furthermore, a controller that combines MPC for position control with PID for attitude control was conducted as a comparative experiment to validate the performance of our attitude controller.The tracking performance is evaluated by comparing the desired and actual dynamics states (i.e., position, velocity, acceleration, attitude, and angular rate), as shown in Figure 5.
The mean square error (MSE) of position for the aforementioned three controllers is shown in Table 3.In this scenario, substantial initial deviations occurred in both the x and z-axes.Moreover, there were also significant attitude changes in roll and pitch angles with an amplitude of 1 radius during flight.As shown in Figure 5 and Table 3, the PID controller with feedforward failed to track the trajectory, leading to observable phase lag in tracking.This shortfall could be attributed to the presence of initial errors, impeding the provision of precise feedforward information.For the controller that combines MPC and PID, although it exhibited a good tracking performance overall, there was a significant tracking error in the y-axis position compared to the proposed controller.This disparity became particularly conspicuous during peaks in the y-axis position, where substantial tracking errors manifest.On the contrary, the proposed controller tracked the given trajectory with high spatial and temporal precision.

Comparison of Different Controllers in Tracking Lemniscate of Bernoulli
To examine the performance of the proposed controller in waypoint tracking, a simulation was conducted utilizing the Bernoulli lemniscate as the reference trajectory.Similarly, the above two controllers (the PID controller with velocity and acceleration feedforward and the controller that combines MPC for position control with PID for attitude control) were implemented for comparison.The given reference waypoints are as follows.The initial position of the quadrotor-UAV was set at [0, 4, 1], and both velocity and acceleration were set to zero at the initial time.
The waypoints and the actual flight path by the three controllers are illustrated in Figure 6.The comparisons between desired and actual values of position, velocity, acceleration, attitude, and angular rate are plotted in separate subplots of Figure 6.The MSE of position for the aforementioned three controllers is presented in Table 4.In this simulation, the PID feedforward controller accurately provided the velocity and acceleration feedforward information.However, its effectiveness was limited by the position loop, which only output the desired acceleration.Consequently, it failed to provide additional feedforward information (desired angular velocity and desired angular acceleration) to the attitude control loop.As a result, significant tracking errors could be observed.The MPC combined with the PID controller showcased a satisfying tracking performance.However, as presented in Figure 6 and Table 4, this controller achieved precise tracking along straight paths, but exhibited larger tracking errors during aggressive turns.This discrepancy arose due to the requirement of the quadrotor-UAV for substantial adjustments in attitude during the turns, which the PID attitude controller failed to track accurately.In contrast, the proposed controller exhibited superior tracking performance.It accurately traced the desired trajectory after the initial adjustments.

Acrobatic Flight Trajectory Tracking
Since the design of the attitude controller is based on the SO(3) space, it possesses the capacity to track dynamic trajectories encompassing substantial attitude maneuvers.An acrobatic flying trajectory in the X-Z plane was prescribed in Figure 7 for testing the proposed controller.The controller that combines MPC for position control with PID for attitude control was added as a comparative experiment.The given reference waypoints are where R was set to 2 m, and v min was set to 6 m/s.The initial position for the quadrotor-UAV was established as [0, 0, 1], and both velocity and acceleration were set to zero at the initial time.In order to track the given waypoints accurately, the pitch angle of the quadrotor-UAV was required to complete a full attitude maneuver from 0 to 2π.Additionally, the large steps in the velocity and acceleration terms at the initial time made it more challenging for the controller.The MSE of position for tracking the acrobatic flight trajectory is shown in Table 5.In the simulation, given the trajectory involving full attitude maneuvers, our attitude controller achieved stable tracking without encountering any singularities.Despite the presence of significant errors in both velocity and acceleration at the initial time, good accuracy in tracking the desired waypoints could be observed in Figure 8 and Table 5.As a comparative experiment, the controller that combines MPC with PID failed to track the given waypoints.This inadequacy could be attributed to the PID attitude controller's limited ability to accurately trace the desired attitude, particularly when dealing with aggressive attitude changes.

Aggressive Trajectory Tracking under Observation Errors and Extreme External Disturbances
Considering the complex environmental factors the quadrotor-UAV may encounter during the actual flight, in the simulation, the artificial state observation errors were introduced for simulating the real-world conditions.Specifically, the random values were added to the state variables to emulate the measurement values.The amplitudes of the random values associated with each state variable are presented in Table 6.The reference waypoints in this case are defined by Equation (45).The initial position for the quadrotor-UAV was set at [0, 0, 0], with both velocity and acceleration initialized to zero at the initial time.Moreover, a significant external disturbance was introduced during the 9th to 11th seconds as shown in Figure 9.During this time interval, a constant force was exerted on the quadrotor-UAV to simulate external disturbances, with magnitudes of 2.5N, 2N, and 1.5N along the three axes, respectively.Given the desired trajectory, observation errors, and external disturbances, the tracking performance of the controller is evaluated by comparing the desired position, velocity, acceleration, attitude, and angular velocity to the actual values in Figure 9.The MSE of position for tracking aggressive trajectory under observation errors and extreme external disturbances is shown in Table 7.The results presented in Figure 9 and Table 7 demonstrated that the proposed controller exhibited strong disturbance rejection capabilities.Even in the presence of observation errors and substantial external disturbances, the controller was able to maintain robust control.It is worth mentioning that the replanning time of our controller in the position loop is less than 0.01 s, which endows our controller with online control capability.

Conclusions
In the context of waypoint tracking tasks for quadrotor UAVs, a robust controller is introduced in this paper.The LMPC algorithm is employed in the position loop and a nonlinear control law based on the SO(3) space is designed for the attitude control.The accurate tracking of the attitude loop enables the decoupling of the attitude control from the optimization within the MPC.The motor model constraints are taken into account for widetime-domain prediction and feasible trajectory optimization.Furthermore, the nonlinear characteristics can be effectively compensated by the attitude controller, therefore allowing the controller to maintain its superior performance while reducing the computational expenses.Multiple aggressive trajectories and external disturbances were designed and simulations were conducted to test the controller.The proposed scheme showed high precision in tracking performance.Since the controller requires low computational resources, it is estimated to be implementable for real-time control for an actual quadrotor-UAV.

Figure 1 .
Figure 1.Coordinate system definition and motor numbering.

Figure 2 .
Figure 2. Framework of proposed the quadrotor-UAV controller based on LMPC.

Figure 3 .
Figure 3. Actual and desired attitude and angular rate without external disturbances.

Figure 4 .
Figure 4. Actual and desired attitude and angular rate with external disturbances.

Figure 5 .
Figure 5. Aggressive trajectory tracking without disturbances.(a) Aggressive trajectory tracking.(b) Desired position (blue curve), actual position by the proposed controller (red curve), actual position by the controller that combines MPC for position control with PID for attitude control (green curve), and actual position by the PID controller with (dashed curve).(c) Actual and desired velocity.(d) Actual and desired acceleration.(e) Actual and desired attitude.(f) Actual and desired angular rate.

Figure 7 .
Figure 7. Acrobatic flight trajectory.The performance in terms of tracking the acrobatic flight trajectory is evaluated by comparing the desired position, velocity, acceleration, attitude, and angular rate to the actual values and they are plotted in Figure8.

8 .
Acrobatic trajectory tracking of the quadrotor-UAV without disturbances.(a) Acrobatic flight tracking.(b) Actual and desired position.(c) Actual and desired velocity.(d) Actual and desired acceleration.(e) Actual and desired attitude.(f) Actual and desired angular rate.

Figure 9 .
Figure 9. Aggressive trajectory tracking under observation errors and external disturbances.(a) Trajectory of proposed controller.(b) Actual and desired position.(c) Actual and desired velocity.(d) Actual and desired acceleration.(e) Actual and desired attitude.(f) Actual and desired angular rate.

Table 1 .
Parameters of the quadrotor-UAV in simulation.

Table 2 .
MPC parameter settings in simulation.

Table 3 .
The MSE in tracking an aggressive trajectory.

Table 4 .
The MSE in tracking Lemniscate of Bernoulli.

Table 5 .
The MSE in tracking acrobatic flight trajectory.

Table 6 .
Observation errors in state variables.