Abstract
Considering that quadrotor unmanned aerial vehicles (UAVs) often encounter unknown disturbance caused by model parameter perturbations and environmental changes, a novel hybrid controller based on feedforward compensation and particle swarm optimization-aided self-coupling proportional-integral-derivative (FC-PSO-SCPID) is proposed for quadrotor UAVs through the outer loop (position) control and the inner loop (attitude) control. In the proposed controller, feedforward compensator is introduced to compensate for the hysteresis effect on a certain independent variable (disturbance) using the inverse model. Hence, the tracking speed and accuracy are dramatically improved, and the output can reach the preset value instantly. In SCPID controller, the speed factor is difficult to obtain automatically, and thus the particle swarm optimization (PSO) is introduced to adjust the parameters by using the integrated time absolute error (ITAE). Moreover, the stability analysis for the closed-loop systems of both the position and attitude of the quadrotor UAV system was proved by Hurwitz stability criterion. Extensive simulations conducted in MATLAB/Simulink show that the FC-PSO-SCPID controller outperforms conventional methods in terms of response speed, steady-state accuracy, and anti-disturbance ability. Specifically, the convergence time and steady-state error of the proposed controller are less than 1.5 s and 1%, respectively. In addition, the situation of stability failure has also been discussed.
Keywords
Introduction
Recently, quadrotor UAVs (unmanned aerial vehicles) have been widely used in various fields due to the unique ability to perform a variety of task-based unmanned.1,2 For example, In Guo et al., 3 UAVs are applied to the field of building inspection. In Ikeda et al., 4 a nonlinear control method is proposeed using in UAV transportation field.
However, the controller design for quadrotor UAVs faces many difficulties, such as complex environmental disturbance, strong coupling and the underactuated characteristics (6 degrees of freedom and 4 actuators). 5 Thus, many researchers have carried out work using various control methods for stabilizing quadrotor UAVs, which mainly include PID (proportional-integral-derivative) control, 6 LQR (linear quadratic) control, 7 H-infinity control, 8 SMC (sliding mode control), 9 backstepping control, 10 adaptive control, 11 robust control. 12 In addition, some typical controllers have been proposed in other application areas, such as the H–infinity controller and μ-controllers which are used in active suspension systems of electric vehicle. 13 In Gopi, 14 a novel approach is proposed for stability analysis of DC drive.
Among these control methods, most of them overly rely on the accuracy of the model. However, it is very difficult to accurately model the system due to uncertain disturbances. Thus, the control system cannot achieve good performance. Instead, PID has many advantages like model-free and simple design. 15 Thus, it is the most widely used in the control tasks of quadrotor UAVs.
In Li and Li,
16
a PID controller is applied to control both position and orientation of the quadrotor UAVs. However, the classical PID controllers has some limitations: (1) obtain the linearized mathematical model of the controlled object by ignoring the nonlinear part; (2) adjust some parameters depending on the experience for good performance. Aiming at the first limitation, many nonlinear PID controllers have been studied for quadrotor UAVs. In González-Vázquez and Moreno-Valenzuela,
17
a nonlinear PI/PID controller has been proposed to control the motion of a quadrotor UAV. In Yasser et al.,
18
a sliding-mode based nonlinear PID controller is designed, in which the controller parameters are tuned to minimize a multi-objective function using GA (genetic algorithm). In Ortiz et al.,
19
a nonlinear robust PID controller is proposed for attitude regulation of a quadrotor. In Alkhoori et al.,
20
the gain scheduling PID control strategy approach is designed for quadrotor UAVs. In Najm et al.,
21
a nonlinear PID controller is proposed to stabilize the translational and rotational motion of a quadrotor and to track a given trajectory with minimum energy and error. On the other hand, to get optimum control parameters, some optimization algorithms are used in PID. In Erkol,
22
four PID controllers, in which the optimum parameters are determined by the artificial bee colony algorithm, particle swarm optimization, and genetic algorithm, are designed to control attitude and hover. In Chen et al.,
23
the large amount of decentralized
Obviously, a single controller does not have it all. Thus, some hybrid controllers by merging more control algorithms are proposed for tackle this. In Alajmi et al., 24 a novel tracking hybrid controller, which combines the robust adaptive neuro-fuzzy inference system (ANFIS) and particle swarm optimization (PSO) algorithm, is proposed for a quadrotor UAV. In Giernacki et al., 25 a new hybrid control system for a quadrotor UAV based on PID and finite-time state-dependent riccati equation (SDRE) control is proposed for precise control and stabilization. Although these hybrid control methods have been improved, they are complicated for implementation. Instead, the feedforward compensator has the clear theory, flexible tuning, and remarkable effect, and is suitable for high-precision motion control systems (such as UAVs) with strict dynamic performance. In Dai et al., 26 the performance of the model-based feedforward controller is analyzed and verified. In Chen et al., 27 The feedforward compensation and sliding mode controller are combined to improve the control accuracy of soft robots.
Recently, aiming at tuning problem for PID controller, the self-coupling PID (SCPID) control method was proposed by Zeng and Liu. 28 The key characteristic of SCPID is the introduction of coupling speed factor, and the three components of proportion, integral and differentiation are tightly coupled together by the speed factor to form a control signal. Thus, the speed factor directly determines the response speed, control accuracy and anti-disturbance ability of the controller. The traditional PID require adjusting three gain parameters, while SCPID has only the speed factor to adjust. Theoretically, it is more convenient for the single-parameter controller than the multi-parameter controllers. Thus, the SCPID control method has been used for various systems, 28 such as non-affine pure-feedback nonlinear system, uncertain chaotic systems, nonlinear underactuated systems and large time delays systems. Aiming at selection of speed factor, adaptive speed factor (ASF) model and minimum speed factor model are successively proposed for optimize the speed factor. 29 However, these two optimization models only provide the range of values for the speed factor, the determination of specific value for the speed factor still needs to be manually obtained through repeated experiments. Aiming at parameter selection, some algorithms are used to optimize the controller parameters automaticly. In Feng et al., 30 an improved PSO algorithm is proposed to optimize the coefficients of the PID controller. In He et al., 31 a multi-strategy enhanced PSO algorithm is used to optimize the fuzzy-PID controller. In Gopi et al., 32 the tree-seed algorithm is used for tuning PID coefficients.
In addition, the speed factor should be tuned as big as possible to improve the response speed of the control system, but this will cause overshot and oscillations due to the integral saturation problem at the initial stage of response. Compared with the traditional PID controller, SCPID is more difficult to eliminate steady-state errors.
Aiming at these deficiencies, a novel hybrid controller based on feedforward compensation and PSO-aided SCPID (FC-PSO-SCPID) is proposed for quadrotor UAVs under unknown disturbance. The main contributions of this paper are as follows:
(1) To adjust the speed factor adaptively, the particle swarm optimization (PSO) algorithm is introduced to optimize the SCPID controller parameter, which can improve the response speed and tracking accuracy.
(2) The feedforward compensation controller is proposed to cancel out the hysteresis effect on a certain independent change, which can greatly reduce or even eliminate steady-state errors.
(3) The stability analysis for the closed-loop systems of both the position and attitude of the 6-DOF UAV system was proved by Hurwitz stability criterion, and good anti-disturbance robustness of the two control systems have been theoretically proven.
Thus, the application of the hybrid controller based on FC-PSO-SCPID for quadrotor UAV control can achieve fast dynamic responsiveness and good steady-state accuracy.
The rest of this paper is organized as follows. Section 2 introduces the complete mathematical model of the quadrotor UAV. Then, the FC-PSO-SCPID is presented, and the subsystem controller based on FC-PSO-SCPID are designed in Section 3. Section 4 gives the simulation results and analysis. Finally, conclusions are given in Section 5.
Mathematical model
In this paper, “X” type quadrotor UAV was chosen, and its diagonal propellers can rotate in opposite directions. In the quadrotor UAV, the lift force generated by the propellers can be changed with changing speed of four motors, and then the control of the lift, roll, pitch and yaw will be realized.
Euler angle and rotation matrix
To model the quadrotor UAV dynamic, two reference frames including inertial frame

UAV quadrotor system.

The process of rotation.
During position control, it is necessary to compensate the orientation of the quadrotor’s body, and thus the rotation matrix
where
where the
Hence, the compensation is attained using the transpose of the rotation matrix, that is, the transformation equation from the body frame to the inertial frame can be written as
where
Dynamical modeling of the quadrotor UAV
In order to simplify the modeling of the quadrotor UAV, the following assumptions are made: (1) The structure of quadrotor UAV is rigid and symmetrical; (2) The geometric center of the quadrotor UAV is the same with the center of the gravity; (3) The gravity and moment of inertia are unchanged.
Dynamic model of position subsystem
The lifts generated by the four rotors in the body frame are defined as
Also, the total lift can be decomposed into three components
According to Newton’s law of motion, the position subsystem of the quadrotor UAV can be modeled as follows
where
Dynamic model of attitude subsystem
According to Newton’s formula of motion, the attitude subsystem of the quadrotor UAV is modeled as follows
where
By combining the equations (8) and (9), the overall dynamic model yields in the form of equation (10)
where
Control scheme and controller design
The hybrid controller based on FC-PSO-SCPID
The FC-SCPID controller
Aiming at the independent weighted summation of the error, the error integral and the error derivative in the traditional PID controller, the SCPID controller can make the three different units be linked by the speed factor, which not only reflects coordinated control mechanism, but also overcomes the difficulty of multi-parameter adjustment.
The coordinated control law of the SCPID is defined as follows
where
To improve the response speed of the control system, the speed factor
where

The SCPID controller with feedforward compensation.
The closed-loop transfer function from
here,
Also
Substituting equations (13) and (14) into equation (12) yields
Assuming that the steady-state error of the system is canceled by the feedforward compensator, thus:
So, we can obtain the feedforward compensator
Hence, the feedforward compensator is constructed using the inverse model.
From Figure 5, the control variable
Theoretically, the feedforward compensator can achieve perfect control performance, and make the output instantly reach the preset value. However, when there is a sudden change in the setpoint, for example, a step signal, the control variable signal is an impulse signal with an infinite amplitude. Therefore, the filtering operation is introduced for limiting the control variable to be large.
The controller parameter optimization with PSO
In the SCPID, the speed factor is the key for obtaining satisfactory control effects. In addition, some control channel parameters are mutually coupled in the controllers of the quadrotor UAV. Although the adjustment rules based on manual has been given in Zeng and Liu, 28 the appropriate value of the speed factor is difficult to automatically obtain. Therefore, PSO algorithm is used to adjust the parameters of SCPID controllers.
PSO is an evolutionary computing method proposed by Kennedy and Eberhart,
35
and the key idea is to use the principle of information sharing to simulate a group search process. To find the best solution, a particle updates its velocity and adjusts its position by tracking its own best experience and the whole population’s best memory. The velocity updating and position adjusting strategies in a
where,
Firstly, particles are randomly distributed into the entire search space, and then the particle qualities can be judged according to their fitness values. In this paper, the index of integrated time absolute error (ITAE) is selected as the fitness function, and it comprehensively considers the time response and absolute error of the system, which can better reflect the dynamic response of the system. The ITAE index is defined as follow:
The smaller the value, the better the convergence accuracy and control speed of the control system.
To optimize the speed factor of the SCPID using PSO, the speed factor

The FC-PSO-SCPID control system.
The design of the PF-PSO-SCPID controller for quadrotor UAV
The quadrotor UAV is controlled using double-loop serial control method. As shown in Figure 5, the controller includes for outer-loop subsystem for position and inner-loop subsystem attitude. The stability of the controller for the quadrotor UAV greatly depends on the response speed of the inner-loop control system. Thus, the inner-loop control system is the FC-PSO-SCPID controller, while the outer-loop control system is the PSO- SCPID controller. It is worth noting that, as shown in Figure 5, the reference input of the system is

The FC-PSO-SCPID controller for quadrotor UAV.
Let
By solving the above equations, the total lift, the desired angle signals
Thus, the system can be regarded as a full-driven control system, and the reference of position system is given directly, and the reference of pitch and roll angles are calculated through equation (22).
Position subsystem controller design
By substituting equation (21) into equation (8), the sub-model of the position can be simplified as:
According to the control law of the SCPID, the virtual control variables can be described as:
here,
Therefore, the block diagram of the position controllers based on the PSO-SCPID is shown in Figure 6.

The position controllers based on the PSO-SCPID.
Stability proof of the position subsystem
To demonstrate the effectiveness of the position subsystem controller, this paper conducts the theoretical proving for two theorems.
where the
Assume that the expected output of the system is
Thus, the controlled error system can be obtained as
where
Substituting equation (21) into equation (28), the following equation can be obtained
Obviously, the system shown in equation (29) is actually an error perception system under the excitation of composite total disturbance
Thus, the zero status response
Therefore, the transfer function can be expressed as
when
Hence, equation (33) can be transformed into the time domain as follow
where the symbol * represents the convolution operation, and
Also, the differentiation
When
According to equation (35), the following formulas can be obtained
Therefore, we can conclude
Obviously, when
Attitude subsystem controller design
The attitude control subsystem is based on FC-PSO-SCPID controller. To obtain the control variables, we should find the model of the control object. According to equation (9), the models of roll, pitch and yaw can be obtained as follow
According to the control law of the FC-SCPID controller, the control variables can be obtained by substituting equation (40) into equation (17):
Thus, the control variables of roll, pitch and yaw can be expressed as follow
where
Therefore, the structure diagram of the attitude controller for the quadrotor UAV is shown in Figure 7.

The attitude controller based on FC-PSO-PID.
Stability proof of the attitude subsystem
Similarly, the attitude control subsystem satisfies the stability and has good anti-disturbance robustness when the speed factor is greater than zero and the total disturbances is bounded. The two theorems can be described as follow:
where the
Equally, the controlled error system of the attitude can be obtained
where
Assuming that
Also, the system transfer function shown in equation (43) can be expressed as
Thus, when
where the unit impulse response
So
When
Therefore, we can conclude
As a result, under the condition of
Although the controller’s stability is theoretically guaranteed, the assumed stability conditions may fail under extreme practical scenarios. For instance, in the case of sudden vertical gusts, if the change rate of gust velocity exceeds the dynamic response capability of the flight control system, it will trigger a transient mismatch between aerodynamic forces and control forces. This mismatch can cause the UAV to lose control, such as tumbling or diving.
Simulation verification
In order to verify the control effectiveness of the proposed scheme above, two simulation experiments are conducted with the quadrotor UAV. One is to track the reference attitude, and the other is to track desired trajectory. The parameters setting of the UAV and simulation are given in Tables 1 and 2, respectively.
Parameter values of the quadrotor UAV.
The simulation setup.
The attitude tracking
In this section, tracking the desired attitude angles is employed to verify the control effectiveness of the attitude controller. The reference of the attitude angle was set as
where
To simulate the external disturbance, sinusoidal disturbance
The parameters setings of PSO algorithm in attitude and position subsystems are shown in Table 3. To ensure the stability of quadrotor UAVs, the response speed of the attitude control loop must be significantly faster than that of the position control loop. Thus, the speed factor of the attitude subsystem is larger than that of the position subsystem. According to this, the ranges of particle motion in the PSO algorithm are set different (
The parameters of PSO algorithm in different subsystems.
The control parameters for attitude subsystem.
Figure 8 shows the attitude control results for three channels without external disturbance. Six controllers all achieve relatively good tracking effects. For the roll and pitch channel, when the expected value changes suddenly, SCPD, SCPID, and PSO-SCPID experience obvious overshoot, and SCPID has largest overshoot of 14% and 15% for the roll and pitch, respectively. In contrast, there is no overshoot for PID, FC-SCPID, and FC-PSO-SCPID. The convergence time of the proposed FC-PSO-SCPID controller is about 0.35 and 0.35 s for the roll and pitch, while FC-SCPID and PID have about 0.6 and 0.5 s, and 0.6 and 0.6 s, respectively. Also, the FC-PSO-SCPID has the lowest steady-state error, which is less than 0.0001 m. For the yaw channel, it can be seen from the local magnification diagram that the FC-PSO-SCPID cotroller can achieve almost error-free tracking performance for the attitude tracking, and has the best control ability than the other control schemes.

Attitude tracking effect without disturbance: (a) roll channel, (b) pitch channel, and (c) yaw channel.
To simulate the UAV under regular wind disturbance, the external disturbances

Attitude tracking effect under sinusoidal disturbance: (a) roll channel, (b) pitch channel, and (c) yaw channel.
To simulate the random wind disturbance for the quadrotor UAV during flight, white noise with 20 dB is added. Figure 10 shows the tracking results. For roll and pitch channel, all controller can almost track the reference curve except for slight oscillation. Specifically, the FC-PSO-SCPID has the smallest oscillation amplitude (about 1%), and the PID has the largest oscillation amplitude (about 15%). In addition, SCPD, SCPID and PSO-SCPID have obvious overshoot (about 30%). In contrast, the FC-SCPID and FC-PSO-SCPID do not exhibit overshoot. As for yaw channels, the FC-PSO-SCPID has the smallest oscillation amplitude (about 1%), and the PSO-SCPID have the largest oscillation amplitude (about 8%). All controller do not exhibit overshoot.

Attitude tracking effect under white noise disturbance: (a) roll channel, (b) pitch channel, and (c) yaw channel.
Table 5 shows the ITAE values of different controllers under conditions of different disturbances. It is obvious that the proposed FC-PSO-SCPID has the least ITAE values for three channels, and especially for the yaw channel, the ITAE is close to zero, which indicates that it has good tracking effect.
ITAE values of different controllers.
In conclusion, all controllers can achieve good attitude control in the case of no disturbance. When the disturbance was added, PID has large tracking error, and SCPID has a large overshoot in roll and pitch channel. In contrast, FC-PSO-SCPID demonstrates superior performance over other controllers in terms of steady-state error, overshoot, response time, and other metrics, whether under no disturbance conditions or in the presence of disturbances.
The trajectory tracking
In this simulation, to validate the trajectory tracking effect based on the proposed controller, a planar circle-shaped trajectory is chosen as desired trajectory, and the reference trajectory
The initial position of the quadrotor UAV is set to the origin, namely
To simulate different external disturbances, the random wind or the horizontal time-varying gust disturbance are applied. The time-varying gust is generated with a white noise signal through a filter to simulate the impact of atmospheric turbulence on UAV flight.
36
The gust disturbance waveforms in

The gust disturbance in
The velocity factor of different control method.
Parameter values of PID.
Figure 12 shows the tracking trajectory under conditions of without disturbance, time-varying gust disturbance and random wind. As shown in Figure 12, the quadrotor UAV can eventually reach stability by using the six control methods. However, the PID has the obvious trajectory tracking deviation at the start and the SCPD has the largest steady-state error. When the horizontal time-varying gust disturbance is added, most controllers produce overshoot in the horizontal direction, and the PID spends more time to reach stability compared with other controllers. In the case of random wind, all controllers exhibit oscillatory, and the PID has the largest oscillation amplitude in

The tracking trajectory under different conditions: (a) without disturbance, (b) gust disturbance, and (c) random wind disturbance.
To show the tracking effect more specifically, Figures 13–15 give the tracking results in

Trajectory tracking effect without disturbance: (a)

Trajectory tracking effect under horizontal time-varying gust disturbance: (a)

Trajectory tracking effect under random wind disturbance: (a)
In the case of horizontal time-varying gust disturbance (shown in Figure 14), for the
As shown in Figure 15, the proposed FC-PSO-SCPID controller can track the desired trajectory rapidly but exhibits larger oscillation. This may be because that the feedforward compensator is designed under the assumption of delay-free case and it ignores the delay of practical systems.
In addition, when the gust disturbance is added to the vertical channel, we find that the FC-PSO-SCPID-based UAV system experiences instability, as shown in Figure 16. Obviously, the UAV will loss control (diving) when the disturbance is excessive. In comparison with

Vertical gust disturbance applied to the
Table 8 shows the ITAE values of different controllers with/without disturbance. Obviously, the proposed FC-PSO-SCPID has the least ITAE values for three channels in most cases.
ITAE values of different controllers in different cases.
Conclusions
This paper proposes FC-PSO-SCPID controller for the quadrotor UAV. The stability analysis for the closed-loop systems of both the position and attitude of the quadrotor UAV system was proved by Hurwitz stability criterion. Experimental results demonstrated its remarkable capability to not only improve the response speed and reduce the steady-state error but also to achieve good tracking effect and have good anti-interference robustness by comparison with the PID, SCPD, SCPID, FC-SCPID, and PSO-SCPID controllers. However, the proposed method also has some shortcomings: (1) The proposed method have the significant oscillation in the case of random wind disturbance. Maybe this is because the feedforward compensator ignores the delay of practical systems. (2) The proposed method may exhibit sensitivity to vertical wind, which could cause the instability.
In future work, we will improve the algorithm and establish a systematic experimental framework to validate the proposed controller. Firstly, the proposed control method will be embedded within the PX4 autopilot ecosystem for hardware-in-the-loop (HIL) simulation. Secondly, physical flight tests will be conducted on a customized quadrotor platform equipped with RTK-GPS.
Footnotes
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Science Foundation of China (52277078, 52377168, 61903049, 51977013), Natural Science Foundation of Hunan Province of China (2022JJ30609, 2021JJ30186), and the Project of Education Bureau of Hunan Province, China (21A0210, 18C1599).
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data availability statement
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.
