Trajectory tracking control of four-rotor UAV based on nonlinear extended state observer and model predictive control in wind disturbance environment

In this paper, a novel hybrid controller utilizing a nonlinear extended state observer (NLESO) is introduced. According to the Newton-Euler equation, the four-rotor UAV is modeled and divided into the position subsystem and attitude subsystem. The position subsystem is controlled using the Model Predictive Control (MPC) algorithm. At the same time, the attitude controller utilizes the Sliding Mode Control (SMC) algorithm, which provides an enhanced level of responsiveness, resulting in reduced response times. The Nonlinear Extended State Observer (NLESO) is used in each controller in order to counteract the effects of disturbances. The findings obtained from the simulation experiments demonstrate that the controller design exhibits favorable tracking performance and robust resistance against external disturbances.


Introduction
The four-rotor UAV is a complex system with non-linear characteristics and limited control inputs.It is easily impacted by numerous external disturbances during flight, leading to deviations from the intended flight path.How to eliminate disturbances in complex environments and realize real-time trajectory tracking has become a meaningful research problem.
Model predictive control (MPC) is an advanced control algorithm, and the objective of MPC is to ascertain the most advantageous input at the current moment through the process of forecasting future conditions.Sliding mode control (SMC) represents a distinctive type of nonlinear control characterized by its ability to achieve rapid response and resilience in the presence of disturbances [8].ADRC refers to an innovative control system that was first introduced by Huang et al. [1].However, the conventional ESO is characterized by a multitude of parameters, leading to heightened complexity in the process of parameter adjustment.The NLESO introduced in [2] exhibits a straightforward configuration akin to the conventional LESO, albeit with reduced observation errors and a decreased number of parameters.
In order to better control the UAV, Raffo et al. [3] divided the four-rotor model into a rotating subsystem and a translational subsystem, and combined with H ∞ and MPC method to control the UAV.Sadeghzadeh I [9] uses Gain-Scheduled PID and Model Predictive Control Techniques to control the drone.According to [4], the ADRC is specifically engineered to manage the attitude of the quadcopter.
In this paper, a hybrid controller of MPC + NLESO and SMC + NLESO is designed.The MPC method is used to control the position subsystem, and the SMC method, which features a faster response speed, is used to control the attitude subsystem [11].The simulation study presents evidence of the effectiveness of the proposed hybrid control strategy.Meanwhile, regarding the external disturbance issue of the four-rotor UAV, the active disturbance rejection controller is added to both subsystems and

UAV model
It is assumed that the rate of the quadrotor on the x, y, and z axes is  , the position subsystem of the quadrotor can be represented by the following model: (cos sin cos sin sin ) (cos sin sin sin cos ) Assuming that  , and represent the three attitude angles of the quadrotor, the attitude subsystem can be represented by the following model: , ,

Position control
The position controller design used in this paper is shown in Figure 1.
is the centroid position of the UAV.The vector e is created by determining the difference between the actual path and the route of reference.
The model of positional imprecision can be expressed numerically as follows: ( 1) Where According to the position error model, the MPC optimization problem can be constructed as follows: The ideal input sequence is presumed to be , taking the initial element of the sequence 0 u  , the input can be acquired as demonstrated in Equation (7).

Nonlinear extended state observe.
The purpose of the NLESO is to assess and provide reparation for the disruption.Compared with the traditional ESO, the NLESO [2] used in this paper has a faster observation speed, a smaller interference observation error range and also reduces the number of adjustable parameters.According to the UAV model, the variable ) (t f represents the overall disturbance experienced by the system.Then, the NLESO can be designed as: The value of the disturbance being observed is denoted as 3 z , 1  refers to the difference between the actual path and the route of reference, and 1 2 3 , ,    represents the amplification factor of the state observer.The NLESO employs the utilization of specific nonlinear functions as follows to ensure the optimal functioning of second-order NLESO: In combination with Equation ( 7), the control input can be compensated:

Attitude controller
The SMC method, which is suitable for highly dynamic systems, is used for attitude control.The overall attitude controller integrated with the disturbance observer [10] is shown in Figure 2.
) ( ) Where c is the parameter of the sliding mode surface.The approaching law is sgn( ) . Therefore, the input can be obtained as: Supposing there is an error y z   1 1  , according to the attitude model, a second-order extended state observer can be established: The observed disturbance is compensated to the input:

Simulation and results
This section will simulate the path tracking of the quadrotor UAV.The precise specifications of the UAV are presented in Table 1

Comparison between ESO and NLESO
The altitude system of the UAV is taken as the object of control.The three attitude angles are set to 0° and an external disturbance is added to the altitude channel.The parameters for the two observers are established according to the specifications outlined in Tables 2 and 3. Table 2. Parameters of the ESO observer.3 is the observed value of the disturbance by the traditional ESO observer.It can be seen that the output of the ESO observer will produce a small range of jitter when the reference interference signal mutates.Figure 4 is the estimated value of the disturbance by the improved NLESO observer.It can be seen that the NLESO observer can effectively reduce the jitter of the output signal so that the observation results are smoother, and the error is smaller.Figure 5 shows the actual input value after the disturbance is compensated.It can be seen that the input value after the ESO observer compensation has a small degree of jitter, and the input value after the NLESO observer compensation is smoother, which can be seen as the observation effect of NLESO is better than ESO.

Simulation experiment of path tracking in a wind-disturbed environment
To ascertain the efficacy of the controller developed in this paper, the comparative experiments of PID, MPC-SMC, and MPC-SMC-NLESO control methods are carried out.The controller's parameters were determined according to the specifications provided in Table 4.
150, 7500, 125000 The trajectory is shown in Equation ( 16): The interference of the UAV during flight mainly comes from the external wind field interference.Therefore, different wind disturbances in Equations ( 17) are added in three directions to assess the resistance to disturbances of NLESO: 2sin(0.5 ), 2sin(0.5 ), 5cos( ) The outcomes of the simulation are depicted in Figures 6 through Figures 10.Figures 6, 7, and 8 illustrate the outcomes of path tracking for the three control methods in the presence of external disturbances.Figure 9 shows the comparison of lateral errors of the three control methods in the three directions, and Table 5 displays the root-mean-square errors for the three control techniques.
It can be seen that both the MPC+SMC control method and the PID control enable the UAV to effectively track and follow a predetermined reference trajectory.However, the MPC+SMC control method has a smaller lateral deviation than PID.After adding the NLESO nonlinear state observer, the tracking errors in the three directions are significantly reduced, the output path is smoother, and the trajectory oscillation phenomenon is obviously weakened.It can be proved that the MSC-SMC-NLESO hybrid controller proposed in this paper has better robustness.10 shows the tracking effect of three attitude angles under the SMC control method.It can be seen from the figure that for the highly dynamic system, the efficacy of the SMC method is superior in tracking the reference input, which can quickly reach the stable value, although a certain amount of overshoot will be generated at some moments.As show in figure 11.

Conclusion
In this paper, a hybrid control method of four-rotor combined with NLESO is established.Based on the findings of the simulation, this method can effectively make the UAV track the reference trajectory, and its tracking effect is better than the traditional PID method.Meanwhile, the NLESO observer used in this paper has a faster observation speed and a smaller interference observation error range than ESO, verifying the effectiveness and superiority of the proposed method.
is the rotational inertia in three directions, , ,       is the rotating torque generated by the propellers.

Figure 1 .
Figure 1.The block diagram of the position controller.

Figure 2 .
Figure 2. The block diagram of the attitude controller.According to Equation (2), the attitude model of UAV can be obtained.Taking the angle  as an example,

Figure 4 .
Figure 4. Estimation of perturbations by NLESO.Figure5shows the actual input value after the disturbance is compensated.It can be seen that the input value after the ESO observer compensation has a small degree of jitter, and the input value after the NLESO observer compensation is smoother, which can be seen as the observation effect of NLESO is better than ESO.

Figure 5 .
Figure 5.The input value after compensation by the observer

Figure 9 .
Figure 9.Comparison of tracking errors of three methods.Table 5. Root mean square error of three control methods.
according to the expected position trajectory, the reference input can be

Table 5 .
Root mean square error of three control methods.