Abstract
This article presents a comparison of controllers which have been applied to a fixed-wing Unmanned Aerial Vehicle (UAV). The comparison is realized between classical linear controllers and nonlinear control laws. The concerned linear controllers are: Proportional-Derivative (PD) and Proportional-Integral-Derivative (PID), while the nonlinear controllers are: backstepping, sliding modes, nested saturation and fuzzy control. These controllers are compared and analysed for altitude, yaw and roll by using simulation tests.
1. Introduction
The number of applied control theories used for UAVs has increased in recent years due to the large number of applications that they can realize. Some of these applications are focused in dangerous missions such as monitoring disaster areas, localization of victims, infrastructure inspection for inaccessible locations, tasks of surveillance, photography, etc. All these applications are obviously related to one important UAV characteristic: the avoidance of risk to pilots and crew when flight conditions have low visibility or take place in bad weather [1].
A basic part of UAV control depends of the obtained dynamic model, which allows us to analyse the system behaviour. The aerodynamic model obtention is very important in the study of UAVs given that these vehicles have a very high risk of damage, even if the ground is only located a few metres below the vehicle, as small oscillations could lead the UAV to crash. For the above reason, the controller must be applied experimentally once several simulations have been tested in order to adjust the controller parameters [2].
The flying qualities of UAVs are just as important as for piloted aircraft. Although envelope boundaries may not be quite the same, they will be equally demanding. Thus, the theory, tools and techniques described in [2] or [3] can be applied to the analysis of the flight dynamics of fixed-wing UAVs.
The control methodologies that have used in this paper were selected once we had chosen the aerodynamic model, such control laws are: PD and PID [4], sliding modes [5], nested saturation [6], backstepping [5], [7] and fuzzy logic [8]. The model equations describe the decoupled dynamics of the airplane [2], then each controller is applied in order to control the movements of attitude, yaw or roll. The main objective of this paper consists of adopting general model equations of a fixed-wing in order to apply and analyse the performance of the basic controller methodologies.
The paper organization is as follows. Section 2 presents the mathematical model of the airplane. Section 3 deals with the control laws applied to the airplane. In Section 4, the results obtained by simulations are presented. Finally, Section 5 presents the conclusions and future work.
2. Airplane model
In order to obtain the model equations, by omitting any flexible structure of the UAV, the fixed-wing UAV is considered as a rigid body. Also we do not consider the curvature of the Earth, it is considered as a plane, because the UAV will only fly short distances - then with the previous consideration it is possible to apply Newton's laws of motion.
2.1 Longitudinal dynamics
The parameters involved in the longitudinal dynamic model (1)–(5) are shown in Figure 1.

Pure pitching motion
These allow analysing the movement toward the front of an airplane [9], particularly the altitude control:
where V is the magnitude of the airplane speed, a describes the angle of attack, γ represents the flight-path angle and θ denotes the pitch angle. In addition, q is the pitch angular rate (with respect to the y - axis of the aircraft body), T denotes the force of engine thrust, h is the airplane altitude [9] and δ e represents the elevator deviation. The aerodynamic effects on the airplane are obtained by the lift force L and the drag force D. M is the pitching moment which acts on the airplane, m denotes the total mass of the airplane, g is the gravitational constant and Iyy describes the component y of the diagonal of the inertial matrix. The value of angle of attack is obtained by using the following relation α=θ-γ[3]. The lift force L, the drag force D and the pitching moment M are defined as [9]:
where q̄ denotes the dynamic pressure, S represents the wing platform area and c̄ is the mean aerodynamic chord. CD, CL and CM are the aerodynamic coefficients for drag force, lift force and pitch moment respectively.
2.2 Lateral dynamic
The lateral dynamic generates the roll motion and, at the same time, induces a yaw motion (and vice versa), then a natural coupling exists between the rotations about the axes of roll and yaw [10]. In our case, it is considered that there is a decoupling of roll and yaw movements. Thus, each movement can be controlled independently. Generally, the effects of the engine thrust are also ignored [10]. In Figure 2, the yaw motion is represented, which can be described with the following equations:

Pure yawing motion
where ψ represents the angle of yaw and r denotes the yaw rate, with respect to the centre of gravity of the airplane. N is the yawing moment and I represents the inertia in the z - axis. δ r is the rudder deflection. Vx corresponds to the speed of the airplane in the longitudinal x - axis, Vy is the speed in the lateral y-axis, F describes the thrust force in the longitudinal x-axis and Fy denotes the component of the resultant lateral force on the y - axis. The equations related to the above forces and the yaw moment are [3]:
where Cx0, Cy y Cn are the aerodynamic coefficients involved for the lateral dynamics. These coefficients are obtained by considering small angles and with a low airplane speed.
The following equations describe the dynamics for the roll motion:
where p denotes the roll rate, L̄ is the rolling moment, Ixx represents the inertia for the x - axis and φ describes the roll angle. The aerodynamic effects on the airplane are obtained as they are obtained for the yaw motion. In Figure 3, it is observed that δ a represents the deviation of the ailerons. In the case of the roll moment, this corresponds the expression L̄=q̄SbCL, where b is the wing span of the airplane and CL represents the aerodynamic coefficient of the roll moment [3].

Pure rolling motion
3. Controllers design
In this section, we describe the linear and nonlinear controllers that have been designed in order to control the fixed-wing UAV.
3.1 Altitude control
In order to design the altitude control law, we consider the equations that define the longitudinal dynamics, except equation (1) which defines the linear longitudinal velocity, because it is considered a constant velocity. We also define the error as eh(t) = hd - h(t) in order to design the linear and nonlinear controllers, and it denotes the difference between the desired altitude hd with respect to the current altitude h(t). The control signal for the PID is [11]:
While for the PD [11], the control signal is given by:
where kpl, kvl and kil are the control gains related to the controllers PD or PID, and l=h,Ψ,φ (we will use Ψ and φ in the next linear controllers). These gain values, for the simulation results, have first been estimated by the second method of Ziegler-Nichols, and then we did a series of fine tunings in order to get the desired response [4].
For sliding mode control we consider x2h=q and x1eγ =γ-γ d . The respective sliding manifold is given by sh=k1hx1eγ+x2h with k1h is a nonnegative constant gain. The sliding mode control is obtained as:
where β xh =ahk1h|x1eγ|+b1hx22h+β0h [5]. β0h, a1h and b1h are nonnegative constants. The sign function is defined as sgn(sh) = sgn(s):
The nested saturation controller is proposed to globally asymptotically stabilize a chain of n integrators with one input [6]. By applying a transformation over (3) and (4), where x1h = γ - γ d , x2h = q and x3h = M, we have that:
where k1h, k2h and k3h are nonnegative constant parameters of the controller. Finally, by following the method of [6], the nested saturation control can be written as:
The σ bnl (s):ℝ→ℝ is a conventional saturation function, where bnl is a positive constant value (bound) and where n = 1, 2, 3 and 1 = h, Ψ, φ (we will use Ψ and φ in the next nested saturation controllers):
In [9] we propose a backstepping technique used only for equation (2), where the angle γ is considered as the output to be controlled, and where the reference value is denoted by γ ref . Then, (2) can be written as:
and by using the backstepping methodology [5], [9], we can obtain the next control input:
where k1h, k2h and k3h denote nonnegative constant
For the case of the fuzzy controller, the membership functions of the altitude error eh are shown in Figure 4, while the membership functions related to the altitude rate error evh are done in the Figure 5 [8]. We consider three input cases: when the inputs are negatives (N), zero (Z) or positives (P). To obtain the output, we have used the “max-min” inference [8], which we will also use to control the yaw and roll motions. For the membership functions of the output, given by the Figure 6, we have considered the cases: negative large (NL), negative small (NS), zero (Z), positive small (PS) and positive large (PL). The Table 1 contains the respective rules.

Membership functions for the altitude position error

Membership functions for the altitude rate error

Rules for the altitude fuzzy controller
Rules for the altitude fuzzy controller
3.2 Yaw control
In order to design the control laws for this movement, we only consider the equations that define the yaw motion, then we exclude (11) and (12) because they link the lateral and longitudinal linear velocities generated by the yaw angle.
For PID and PD controllers, we have used the general structures shown in (20) and (21), but now, obviously it is considered that the error is eΨ(t) = Ψ d -Ψ(t), where Ψ d denotes the desired yaw angle and Ψ(t) is obtained by integrating (10).
In the case of the nonlinear controllers, the error is
where the function sgn(sψ)= sgn(s) was defined before. The nested saturation control is realized by using the same procedure that has been described for the altitude control. Let us consider
where K1ψ,K2ψ,K3ψ are the nonnegative constant gains. The nested saturation control is given by
The backstepping controller has been designed by taking (9), as an approximation of a single degree of freedom of yaw model [10], then we can write
where the control input is obtained as
with k1Ψ and k2Ψ as the nonnegative constant gains. δ1ψ = eψ(t) and zψ = x.1ψ+k1ψδ1ψ
The fuzzy controller is now generated by using seven membership functions for the inputs (angle and rate errors) and an equal number of membership functions for the output. The Figures 7 and 8 correspond to the input signals of the position error e pl , where and l=Ψ,φ (we will use Ψ and φ in order to identify the corresponding error in the Table 2) and the rate error evl respectively. Figure 9 corresponds to the output and all the cases have been defined as: negative large (NL), negative medium (NM), negative small (NS), zero (Z), positive small (PS), positive medium (PM) and positive large (PL). The same nomenclature is used for the fuzzy controller related to the roll control. In Table 2, we show the rules that have been used for the controllers of yaw and roll motions.

Yaw position error

Yaw rate error

Output membership functions for yaw control
Rules for yaw and roll fuzzy controller
3.3 Roll control
In order to design the attitude linear and nonlinear control laws for the roll movement, we consider the equations that only define the roll motion, then we exclude (18) and (19) because they link the lateral and longitudinal linear velocities generated by roll angle.
For the development of the roll control strategy, the same general structures as those used for the PID and PD controllers presented previously in (20) and (21) are used. Let us define the roll angle error as e(t)=φ d -φ(t) in order to design the linear controllers, where φ d is the desired roll angle and φ(t) is obtained by integrating the roll rate in equation (17).
In order to design the nonlinear controllers for roll movement, the error is defined as eφ=φ(t)-φ d . Let us define x2φ=p, then the sliding manifold obtained is sφ = k1φeφ(t) + x2φ and βxφ = aφk1φ|eφ(t)|+b1φx22φ+β0φ[5], where β0φ, aφ, b1φ are nonnegative constants The obtained control law is:
For the nested saturation control, we consider x1 = eφ(t). The transformation of the roll dynamics is given by:
where k1φ, k2φ and k3φ are nonnegative constant gains. The nested saturation control is:
The backstepping controller has been designed by taking (16) as an approximation of a single degree of freedom of the roll model [10], then we can write ṗ= CLpp + CLδaδ a By using ẋ1φ= ṗ, x1φ = CLpp and x2φ = CLδaδ a and by defining the integrator backstepping as ẋ2φ=u, the new system to be controlled is:
Following the backstepping methodology presented in [5], the controller is finally obtained as:
where k1φ and k2φ are nonnegative constant gains,δ1φ=eφ(t) and zφ=ẋ1φ+k1φδ1φ
Concerning the fuzzy control strategy, seven membership functions are used for the input and output roll control. Figure 10 and Figure 11 show the membership functions that have been used as input signals for the position error epl and the rate error evl, respectively. The membership functions for the output roll control are shown in Figure 12.

Roll position error

Roll rate error

Output membership functions for the roll control
4. Simulation Results
This section presents the simulation results that has been obtained for each one of the cases under analysis.
4.1 Altitude movement
Figure 13 shows a constant signal corresponding to an altitude reference of 15 metres, in addition the response of each one of the controllers is presented. Figure 14 shows the controller output signal that is applied to the aircraft in order to obtain the desired altitude. The used gain values for the linear controllers are shown in Table 3, and the gains for nonlinear control simulations are shown in Table 4, Table 5 and Table 6.
Gains of the linear controllers
Gains of sliding modes controllers
In Figure 13, we can see that all signals accomplish the objective within 20 seconds. The PID controller reaches the desired altitude faster than the PD controller - the PD control shows a good response, but it is slower at reaching the desired altitude and applies almost the same pair or torque as the PID controller.

Controllers' response for altitude
The nested saturations signal reaches the desired altitude faster than the other controllers. The sliding modes and backstepping controllers produce very similar responses. The difference is given by the evidence of chattering in the sliding mode control. The fuzzy control presents an oscillatory torque. For this movement, we conclude that the nested saturation control has a better response and it applies a small torque in comparison with the sliding modes and backstepping controllers, but with very small variations. In Figure 15, a zoom of the three output signals related to the sliding modes controllers are shown in order to visualize the chattering.

Output signals of the controllers for altitude

Chattering of sliding modes controllers
Gains of nested saturation controllers
Gains of backstepping controllers
4.2 Yaw movement
The gains applied for the yaw controllers are presented in Table 3 for the PID and PD controllers, and the gains for nonlinear controllers are shown in Table 4, Table 5 and Table 6. Figure 16 shows a yaw reference of 10o, as well as the responses of the six controllers. Figure 17 shows the applied moments that we need to apply in order to obtain the desired angular movement. Since some of the controllers in Figures 14, 17 and 20 seem to have a low or even zero applied torque, we have dedicated Figure 18 to realize a zoom to those controllers in order to study their performance.

Controllers' response for yaw

Output signals of the controllers for yaw

Zoom of output signals of controllers
We can see that the PD control has a steady-state error of 0.0006 o . The PD and PID signals converge to the desired reference angle within 14 seconds. For the case of the fuzzy controller, the angular displacement converges to the reference value faster than the PD and PID controllers, by applying a low torque (Figure 18).
The backstepping converges quickly to zero torque and it can also be seen that the controller signals converge to the desired reference angle within 10 seconds, without steady-state error and with a very small overshoot in the nested saturation control. The sliding modes and backstepping controllers converge to the reference value in a damped form, but with different slopes in the transient response. In Figure 17, we can see that sliding modes control applies a lower torque than nested saturations and backstepping controllers in order to reach the desired angle. However, the sliding mode control has the well-known chattering in its control signal (Figure 15).
4.3 Roll movement
Figure 19 shows a reference signal of 10 o as well as the six controller responses. The Figure 20 shows the roll moments that have been generated for stabilizing the roll dynamics. The PD and PID controllers have no steady-state error and they converge to the desired angle in 8.5 seconds with a low torque (Figure 18). We can see that the backstepping controller has a small steady-state error of 0.0004 o , the controllers reach the reference within 14 seconds with a buffered form. The nested saturation control has a very small over shoot. The applied torques for nested saturations and backstepping are large, the sliding modes control and fuzzy control applies a lower torque in order to converge to a desired value, compared with the other controllers, however the sliding modes control produces chattering in its control signal (Figure 15). The controllers' gains for the linear controllers are presented in Table 3 and for nonlinear controllers are presented in Table 4, Table 5 and Table 6.

Controllers' response for roll

Output signals of the controllers for roll
5. Conclusion
In this paper, we have realized a comparison of six controllers for the flight of a fixed-wing airplane. Based on the 3D decoupled motion simulation results, it is concluded that for each movement (altitude, yaw and roll) there is a specific controller that has a better performance with respect to the others.
The sliding modes and backstepping controllers produce acceptable responses for the altitude control, but they generate very high torques. The fuzzy controller shows good performance, since it combines a good response with low torque for each one of the three dynamics: altitude, yaw and roll. Concerning the PD controller, it has an undesirable steady-state error in yaw dynamics. On the other hand, the PID controller produces an acceptable response in the three movements.
Taking into account the results obtained from the other nonlinear controllers, it is concluded that the nested saturation has one of the better performances in altitude, it combines a good response with low torque to reach the desired altitude, except in yaw and roll where it produces an acceptable response, but with large torque. The sliding modes and backstepping controllers produce an acceptable response in altitude control, but generate a very high torque.
The sliding modes controller has an acceptable performance in yaw and roll movements, with lower torques in comparison with nested saturations and backstepping, but with a high frequency chattering. For the roll and yaw dynamics, the nested saturations has a acceptable performance, but it produces high torques in order to converge to the desired values and small overshoots. The backstepping for the yaw and roll dynamics performs well, but it generates a high output moment.
It is worth mentioning an interesting behaviour encountered for the fuzzy controller case. It was found that, by adding more membership functions, it is easier to control the yaw and roll motion. Initially, we only considered three membership functions for the position and rate errors, and with five output functions. When that number was increased, this controller provided better responses. From the simulations results, we can observe that the choice of a controller for stabilizing the flight of a fixed-wing airplane is not a trivial problem. This is because the airplane is very unstable for certain movements of the ailerons, stabilizers and elevators. The airplane considered in our problem has a low wing, so we can consider it an acrobatic airplane with higher nonlinearities in its system.
The mathematical model that defines the aerodynamic behaviour of the fixed-wing UAV contains many important factors that should be considered when designing a more suitable controller. One of these important factors is related to the aerodynamic coefficients.
Our future work will concentrate on the development of a radio-controlled airplane with embedded systems in order to validate the previous results and on the design of robust linear controllers.
