Professional Documents
Culture Documents
Self-Tuned PID Controller For The Aerosonde UAV Autopilot
Self-Tuned PID Controller For The Aerosonde UAV Autopilot
net/publication/331212298
CITATIONS READS
11 1,294
2 authors:
Some of the authors of this publication are also working on these related projects:
Modeling of fixed wing UAV and design of multivariable flight controller using PID tuned by local optimal control View project
All content following this page was uploaded by Amr Sarhan on 03 May 2020.
proposed controller. UAVs. This is not only due to their simple structure
and easy implementation, but also because of their
acceptable performances. However, for successful
1. Introduction
implementation of such controllers, and without
Unmanned Aerial Vehicles (UAVs) play important
requiring complex mathematical developments,
roles in critical missions. Nowadays; they are used in a
parameters adjustment or tuning procedures are needed
growing number of civil applications beside their use
to achieve enhanced performance through the operating
within military applications. They are used for damage
envelope [5].
inspection after disasters, observation of volcanoes and
In this paper; an autopilot is designed to control the
also for reconnaissance. This is because of its low cost
longitudinal motion (altitude, and speed), and lateral
and also to protect human crew in such dangerous
motion (heading angle) of Aerosonde UAV. In aircraft
missions [1,2]. An autopilot is used for flight control to
modeling phase, the aerodynamic forces (lift and drag)
track a reference path [3]. The autonomous controller
as well as the aircraft inertia are taken into account. A
has to guarantee the accuracy of the tracking path, and
self-tuned PID is used to design the controller of the
the robustness with respect to environmental
autopilot. Two other controllers are designed to be
disturbances and especially wind. Small UAVs are
compared with the self-tuned PID controller. The first
significantly sensitive to wind disturbance since its
controller is genetically tuned PID and the second is the
magnitude may be comparable to the UAVs speed [4].
fuzzy logic controller. The autopilot performances have
The fixed-wing classification of UAV, in contrast to
been studied with respect to each controller. A
rotary wing or flapping wings, is similar to the typical
comparative study using simulation model of the
aircraft design for manned operations. The flight
Aerosonde UAV is held to decide which controller is
performance of this aircraft is affected by the
the best in terms of performance analysis and
aerodynamic parameters as well as physical external
robustness to external disturbances.
conditions like altitude, wind, payload variation and
limited resources. The fixed-wing UAV dynamical
model is nonlinear and strongly coupled. It is also 2. Aerosonde UAV model
affected by external disturbances like wind gusts. The The Aerosonde UAV system is modeled by
controller must be robust against model uncertainties simulating a number of test flights, using the standard
configuration of MATLAB and the Aerosim
Aeronautical Simulation Block Set [6], which provides a commanded pitch angle θc. The Pitch Attitude Hold
a complete set of tools for rapid development of autopilot converts pitch attitude error into a
detailed six-degree-of-freedom nonlinear generic commanded pitch rate qc. The Pitch Rate Hold
manned/unmanned aerial vehicle models. A model autopilot converts pitch rate error to elevator command
which is called Aerosonde UAV is used as a test air δe. The Velocity Hold autopilot converts velocity error
vehicle [7]. The basic characteristics of Aerosonde to throttle command δt.
UAV shown in Figure 1 are listed in Table 1[8]. The The lateral autopilot is shown in Figure 4. The input
great flexibility of the Aerosonde, combined with a command to the lateral autopilot is the commanded
sophisticated command and control system, enables heading,ψc. The output is the aileron command δa. The
deployment command from virtually any location. Heading Hold autopilot converts heading error to roll
attitude command, ϕc. The Roll Attitude Hold autopilot
Table 1: Aerosonde UAV Specifications. converts roll angle error to roll rate command, p c. The
Aerosonde UAV Specifications Roll Rate Hold autopilot converts the roll rate error to
aileron command, δa.
Weight 27-30 lb The longitudinal autopilot is realized using two
control loops (altitude and velocity), whereas the lateral
Wing span 2.9 m autopilot is realized using only one control loop
(heading angle). Each control loop is realized with
Engine 24 cc, 1.2 Kw three different controllers. The First controller is PID
with fixed gains tuned using Genetic Algorithm (GA).
Flight Fully autonomous The second one is the fuzzy logic controller. The third
one uses online fuzzy inference mechanist to tune the
Maximum Speed 30- 40 m/s PID parameters.
RT
techniques, several methods have been developed. In wind disturbance are considered for each controller in
this paper the fuzzy self tuning method is used for PID the next section.
parameters calculations. To show its effectiveness it is
compared with genetically tuned PID, and FLC. 5. Simulation results
For genetically tuned PID, a multi objective Self tuned PID controller is designed for the
function is used to minimize the mean square value of Aerosonde UAV autopilot. To show its effectiveness;
the error between the desired input and the system self tuned PID is compared with both genetically tuned
output, minimize the overshoot, and also minimize the PID, and FLC. The simulation results for the three
coupling between the system outputs. different controllers based on the full nonlinear model
Figure 5 show the block diagram of self tuning PID, are studied from performance and robustness points of
where the controller Parameters are initially set to view. This nonlinear model takes into consideration the
certain values by any tuning method. Then the FLC is complexity of the aerodynamic forces/torques.
used for fine tuning. An online calculated value by FLC Furthermore, the controllers and observers were
is added to each initial value of the control parameters developed in Matlab/Simulink with a sampling time of
to give the final value used for the PID controller. 0.02s, using the Runge-Kutta solver. Finally,
In this paper, the initial values of PID parameters disturbances represented by wind in the X-Y plane are
are set using GA and the added values are obtained taken into consideration to verifying robustness of each
using online FLC. The final tuned parameters of the controller.
self-tuned PID controller can be calculated from the
next set of equations given in (2). 5.1. Autopilot for longitudinal motion without
K P K P1 K P 2 external wind disturbances
KI KI1 KI 2 (2) In this subsection, two control loops are considered
as in Figure 3. One is for the altitude, and the other is
K D K D1 K D 2
RT
for the speed. There is a coupling between them should
where: K P , K I , and K D are the proportional, be taken into consideration.
integral, and derivative final gains; respectively. A desired altitude and speed have to be tracked by
the Aerosonde UAV autopilot. The response of the
IJE
K P1 , K I 1 , and K D1 are the proportional, integral, and autopilot of the longitudinal motion of the UAV is
derivative initial gains calculated from GA; plotted in Figure 6. The figure shows similar response
respectively. for the three types of controllers. The UAV reaches the
K P 2 , K I 2 , and K D 2 are the proportional, integral, and desired altitude and speed with constant pitch angle.
derivative gains calculated using online fuzzy inference A reference altitude with fixed speed is tracked as
mechanism; respectively. shown in Figure 7. The three autopilot controllers show
The obtained values from (2) are the PID Controller approximately identical responses for altitude tracking
parameters used in (1). with constant speed. In each step up or down the speed
FLC is designed as a second controller to be is affected instantaneously because of the coupling
compared with the self tuning PID. FLC is one of the effect.
artificial intelligence methods for control that has a A reference speed with fixed altitude is tracked as in
nonlinear and rule-based nature. The fuzzy logic Figure 8. The three autopilot controllers show
controller provides an algorithm, which converts the approximately identical responses for speed tracking
linguistic control based on expert knowledge into an with constant altitude. The altitude is slightly affected
automatic control strategy. Therefore, the fuzzy logic by speed change due to coupling effect.
algorithm is much closer in spirit to human thinking
than traditional logical systems [10]. 5.2. Autopilot for lateral motion without
In this paper, the fuzzy like PID is designed with external wind disturbances
seven triangular membership functions for each input In this subsection, one control loop is considered as
(the error, rate of error, and integrated error). The if- in Figure 4. This control loop is concerned with the
then rules are established based on expert knowledge. heading angle.
The three controllers (self-tuned PID, genetically A desired heading angle has to be tracked by the
tuned PID, fuzzy like PID) are compared based on Aerosonde UAV autopilot. Figure 9 shows the
simulation results obtained from Aerosonde UAV autopilot response in this case. It can be seen that the
model. The performance and robustness to external three autopilot controllers show approximately similar
responses. The bank angle reaches the zero value and
remains constant at that value. When a reference If the wind speed exceeds certain limit, the FLC and
heading angle has to be tracked, the autopilot response the genetically tuned PID become unstable but the self-
of the Aerosonde UAV is shown in Figure 10. The tuned-PID controller shows robust performance. Figure
three autopilot controllers show approximately 12 shows the autopilot response when the X component
identical responses for heading angle tracking. In each of the wind speed is 4m/s and the Y component is 8m/s.
step up or down the bank angle are affected It is clear that, at this wind speed value the FLC and the
instantaneously and then return back to zero position. genetically tuned PID fails to control the autopilot of
lateral motion. The self-tuned PID controller shows
5.3. Autopilot for longitudinal motion affected robust performance and robust stability in this case.
by external wind disturbances It can be seen from the altitude curve that the,
The effect of cross wind disturbance in X-Y plane is altitude of the UAV controlled by FLC and genetically
studied in this subsection. The UAV is subjected to tuned PID reaches zero which means crash. That is why
crosswind disturbance in the X-Y plane from the the simulations in banking and heading angles are
beginning of normal operation. A desired altitude and stopped for the FLC and genetically tuned PID.
speed have to be tracked by the Aerosonde UAV
autopilot. It should be noted that; when the wind speed 6. Conclusion
is low, the three controllers for the autopilot behave in A self-tuned PID is designed for Aerosonde
similar way and the disturbance rejection is achieved. autopilot as a fixed wing UAV. Online fuzzy inference
As the wind speed increases, the autopilot response is used as the fine tuning mechanism for PID controller.
differs according to the controller robustness. The initial controller parameters are calculated using
If the wind speed exceeds certain limit, the FLC GA. This controller is compared with genetically tuned
becomes unstable but the two other controllers remain PID controller whose parameters are the initial
of identical performance. Figure 11 shows the autopilot parameters of the self-tuned PID. It is also compared
response when the X component of the wind speed is with fuzzy like PID. The comparison based on
RT
12.4m/s and the Y component is 18m/s. it is clear that, simulation results obtained from Aerosonde UAV
at this speed value the FLC fails to control the autopilot model. The tracking performance of a predetermined
of the longitudinal motion, whereas the performance of path and the robustness to external disturbances are
IJE
two other controllers are identical and robust. It can be taken into consideration as criteria for comparison.
seen from the altitude curve that, the altitude of the Two autopilots for longitudinal and lateral motions
UAV controlled by FLC reaches zero which means are considered. The longitudinal autopilot has two
crash. That is why the simulation is stopped for the control loops one for the altitude and the other for the
FLC. speed. The lateral autopilot has one control loop for
From robust stability point of view, the FLC is heading angle. The three controllers for the two
robustly unstable at this value of wind speed but the autopilots are designed using the controller techniques
two other controllers are robustly stable. From robust discussed previously.
performance point of view, the best autopilot controller The simulation results show approximately similar
is the self-tuned PID. This can be verified from the autopilot performances when the UAV is not subjected
speed curve because it has lower steady state error than to any external disturbances. This is for both
the genetically tuned PID. Also it can be seen from the longitudinal and lateral autopilot.
bank angle curve, the oscillations are lower than the The external disturbances and especially the wind
genetically tuned PID affect the autopilot controller. This is confirmed by the
simulation results. For longitudinal autopilot,
5.4. Autopilot for lateral motion affected by disturbance rejection is achieved for all controllers
external wind disturbances when the UAV is subjected to relatively small speed
In this subsection, the Aerosonde UAV is subjected values. When the external wind speed increases, the
to cross wind disturbance in the X-Y plane from the self tuned PID and the genetically tuned PID show
beginning of normal operation. A desired heading robust performance. The fuzzy like PID fails to cope
angle has to be tracked by the Aerosonde UAV with this external wind speed after certain speed limit.
autopilot. When the wind speed is low, the three For lateral autopilot, disturbance rejection is achieved
controllers for the autopilot behave in similar way and for all controllers when the UAV is subjected to
the disturbance rejection is achieved. As the wind speed relatively small speed values. When the external wind
increases, the autopilot response differs according to speed increases, the self-tuned PID shows robust
the controller robustness. performance. The fuzzy like PID and the genetically
tuned PID fail to control the lateral autopilot after [12] R. Beard, D. Kingston, M. Quigley, D. snyder, R.
certain speed limit. Christiansen, W. Johnson, T. McLain, and M. Goodrich,
From the simulation results obtained based on the “Autonomous Vehicles Technologies for Small Fixed Wing
Aerosonde UAV simulation model, the autopilot UAVs”, AIAA Journal of aerospace computing, information,
and Communication, Vol. 2, No. 1, pp. 92-108, January 2005.
controlled using any of the discussed controllers show
acceptable results when the UAV is not subjected to
any external wind disturbance.
The autopilot controlled by self-tuned PID achieves
an excellent performance when dealing with external
wind disturbances. The other two controllers fail to
cope with this external wind disturbance beyond certain
wind speed limit.
10. References
[1] Y. Sato, T. Yamasaki, H. Takano, and Y. Baba, “
Trajectory Guidance and Control for a small UAV”, KSAS
International Journal, Vol. 7, No 2, pp. 137-144, November
2006.
[2] A. Topalov, D. Seyzinski, S. Nikolova, N. Shakev, and O.
Kaynak, “Neuro-Adaptive Trajectory Control of Unmanned
Aerial Vehicles”, 4th international conference with
international participation Space, Ecology, Nanotechnology,
Safety, June 2008,Varna, Bulgaria.
[3] H. Castaneda, J. Morales, E. Diaz, “Quasi-Continuous
Sliding Mode Flight Control for a Fixed-Wing UAV”,
RT
Congreso Nacional de Control Automatico, Ensenada,Baja
California, Mexico, October 2013.
[4] A. Brezoescu, T. Espinoza, P. Castillo, and R. Lozano,
“Adaptive Trajectory Following for a Fixed-Wing UAV in
IJE
hc θc Pitch qc Pitch δe
Altitude
Attitude Rate UAV
Hold
Hold Hold
h θ q
Vc velocity δt V
UAV
Hold
ψc ϕc Roll pc δa
Heading Roll Rate
Attitude UAV
Hold Hold
Hold
RT
ψ ϕ p
IJE
Ke
FLC
d
K ce
dt
Kd Ki KP
+ PID
r(t) Plant y(t)
e(t)
Controller
_
45
40
Altitude [m]
35
30
26.5
26
25.5
25
RT
Speed [m/sec]
24.5
24
IJE
23.5
23
PID Using Fuzzy
22.5 PID
Fuzzy
22
0 2 4 6 8 10 12 14 16 18 20
Time [sec]
30
25
20
Pitch Angle [deg]
15
10
0
0 2 4 6 8 10 12 14 16 18 20
Time [sec]
Figure 6: The response of the autopilot for the longitudinal motion of the UAV.
65
60
55
50
Altitude [m]
45
40
35
PID Using Fuzzy
30 PID
Fuzzy
25
0 50 100 150 200 250 300 350 400 450 500
Time [sec]
27
26
25
Speed [m/s]
24
23
29
28
27
Speed [m/s]
26
25
24
PID Using Fuzzy
23 PID
Fuzzy
22
0 50 100 150 200 250 300 350 400 450 500
Time [sec]
42
40
38
Altitude [m]
36
34
32
PID Using Fuzzy
30 PID
Fuzzy
28
0 50 100 150 200 250 300 350 400 450 500
Time [sec]
70
60
Heading Angle [deg]
50
40
30
20
PID Using Fuzzy
10 PID
Fuzzy
0
0 5 10 15 20 25 30 35 40 45 50
Time [sec]
90
80
70
Bank Angle [deg]
60
50
40
30
20 PID Using Fuzzy
PID
10
Fuzzy
0
0 2 4 6 8 10 12 14 16 18 20
Time [sec]
RT
Figure 9: The response of the autopilot for the lateral motion of the UAV.
IJE
350
PID Using Fuzzy
300 PID
Fuzzy
Heading Angle [deg]
250
200
150
100
50
0
0 100 200 300 400 500 600 700
Time [sec]
100
PID Using Fuzzy
PID
Fuzzy
50
Bank Angle [deg]
-50
-100
0 100 200 300 400 500 600 700
Time [sec]
40
35
30
Altitude [m]
25
20
15
10
25
Speed [m/sec]
RT
20
IJE
80 15
10
60
Bank Angle [deg]
40 -5
Bank Angle [deg]
-10
20 -15
-20
-40
-60
PID Using Fuzzy
-80 PID
Fuzzy
-100
0 1 2 3 4 5 6
Time [sec]
Figure11: The response of the autopilot for the longitudinal motion when the UAV is subjected
to external wind disturbances.
250
Heading Angle [deg]
200
150
100
50
0
2 4 6 8 10 12 14 16 18 20
Time [sec]
X-wind=4 m/sec Y-wind=8m/sec
200
PID Using Fuzzy
PID
150
Fuzzy
100
Bank Angle [deg]
50
RT
0
IJE
-50
-100
-150
-200
0 2 4 6 8 10 12 14 16 18 20
Time [sec]
1100
1000
PID Using Fuzzy
900
PID
Fuzzy
800
700
Altitude [m]
600
500
400
300
200
100
0 1 2 3 4 5 6 7 8 9
Time [sec]
Figure 12: The response of the autopilot for the lateral motion when the UAV is subjected to
external wind disturbances.