# Supervising Control for Unmanned Aerial Vehicles

Authors: Saeed ur Rehman Sarwar; Saeed ur Rehman
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

A small UAV is considered as a test UAV, and its already published aerodynamic data is used for its modeling. Proportional Integral Differential (PID) controller is designed for pitch attitude control. Atmospheric disturbances such as wind shear and turbulence significantly influence the attitude of UAVs. For this study rotary gust is considered as atmospheric disturbance. Pitch response in presence of atmospheric disturbance is presented. In order to improve the performance in presence of atmospheric disturbance, a supervisory mechanism is proposed. Supervisory mechanism is composed of two modules, “observer module” and “correction generator module.” The human thinking like logic is developed for observer module so that it keeps monitoring the status of flight through specified inputs and outputs from the system and instructs the correction generator module to augment main controller by adding compensation commands. Correction generator module works on fuzzy logic. Simulation results show significant reduction in pitch errors after augmenting the supervisory mechanism, hence proving the efficacy of proposed scheme.


---

## Body

## 1. Introduction

Majority of UAVs being developed today are used for missions like reconnaissance, surveillance, search and rescue, border patrolling, antidrug trafficking, route monitoring, and so forth. All such tasks can be successfully completed by conducting a low to medium manoeuvrability flight at low altitudes. We can make a safe statement that a typical UAV designed for the above mentioned tasks is expected to fly with takeoff weights varying from tens to a few hundreds of kilograms, with speed varying from 60 to 200 km/hr and flying at an altitude of 15,000–20,000 feet above the sea level.The literature survey related to the study of control approaches for aircrafts revealed that intricate and complex schemes are used for manned as well as high manoeuvrability fighter aircrafts whereas simpler control schemes can perform well and are preferred for small and low manoeuvrability aircrafts. Similar trends are also observed in case of Commercial-Off-The-Shelf (COTS) autopilots available for small UAVs where PID is the most commonly used controller. A scheme is proposed in this paper to design a supervising control mechanism for UAVs, which can act like an onboard human pilot. The supervising mechanism senses various system states and parameters including the desired reference input, system output, control commands to the UAV generated by the PID autopilot, and generates appropriate compensation when required. Figure1 below shows various blocks of the proposed scheme and their interconnection.Figure 1
Block Diagram of proposed scheme.


## 2. Main Parts of the Proposed Scheme

Main parts of the proposed scheme as indicated in Figure1 include the following:(1)
UAV model,(2)
prime controller, and(3)
supervisor controller.


### 2.1. UAV Model

A mathematical model is a set of differential equations describing the characteristics of a system. In case of aircrafts or UAVs, the differential equations depicting the dynamic behaviour, also referred to as Equations of Motion (EoM), can be expressed in several forms, that is, as nonlinear fully-coupled, nonlinear semicoupled, nonlinear decoupled, linear coupled, and linear decoupled [1] forms. Nonlinear fullycoupled models describe the UAV dynamics more accurately than any other simplified models and are mostly used for evaluating aircraft performance through computer simulations. However, when it comes to designing the autopilot, simplified models due to their simplicity and ease of implementation have been exploited more frequently.Nonlinear models of UAVs based on the Newton-Euler equations of motion have been derived in Stevens and Lewis [2], Passino [3], Sadraey and Colgren [4], Yao et al. [5], and Leong et al. [6], Snell et al. [1], and Bugajski and Enns [7, 8] which have considered six degrees of freedom (6-DOF) nonlinear dynamics. Fifteen first-order differential equations are considered. The chosen states are position in Earth-Fixed Frame, three velocities, three rates, attitude angles, longitudinal velocity, angle of attack, and side slip angle. Equations are summarized as follows.Positional equations:
(1)
X
˙
=
u
cos
θ
cos
ϕ
+
v
(
-
cos
ϕ
sin
ψ
+
sin
θ
cos
ψ
)
+
w
(
sin
ϕ
sin
ψ
+
cos
ϕ
sin
θ
cos
ψ
)
,
Y
˙
=
u
cos
θ
sin
ψ
+
v
(
cos
ϕ
cos
ψ
+
sin
θ
sin
ψ
)
+
w
(
-
sin
ϕ
cos
ψ
+
cos
ϕ
sin
θ
sin
ψ
)
,
Z
˙
=
u
sin
θ
-
v
(
sin
ϕ
cos
θ
)
-
w
(
cos
ϕ
cos
θ
)
=
-
h
˙
,
where X represents longitude (rad), Y represents latitude (rad), Z and h represent height (ft), u is velocity in longitudinal axis (ft/s), v represents velocity in lateral axis (ft/s), w represents velocity in height axis (ft/s), θ is pitch angle (rad), ψ is heading angle (rad), and ϕ represents roll angle (rad).Velocity equations:
(2)
u
˙
=
r
v
-
w
q
-
g
sin
θ
+
(
T
+
D
cos
α
cos
β
-
L
sin
α
-
Y
cos
α
sin
β
)
M
,
v
˙
=
-
r
u
-
w
p
-
g
sin
ϕ
cos
θ
+
(
D
sin
β
+
Y
cos
β
)
M
,
w
˙
=
r
u
-
w
q
-
g
sin
θ
+
(
T
+
D
cos
α
cos
β
-
L
sin
α
-
Y
cos
α
sin
β
)
M
,
where u is velocity in longitudinal axis (ft/s), v represents velocity in lateral axis (ft/s), w represents velocity in height axis (ft/s), p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), θ is pitch angle (rad), α is angle of attack (rad), β represents roll sideslip angle (rad), T represents thrust force (lbs), Y represents side force (lbs), D represents drag force (lbs), L represents lift force (lbs), M represents mass (lbs), and g represents acceleration due to gravity (ft/sec2).Moment equations:
(3)
p
˙
=
[
(
I
Z
I
Y
-
I
Z
2
-
I
X
Z
2
)
I
Z
l
+
I
X
Z
n
+
I
X
Z
(
I
X
-
I
Y
+
I
Z
)
p
q
+
(
I
Z
I
Y
-
I
Z
2
-
I
X
Z
2
)
q
r
]
×
(
I
X
I
Z
-
I
X
Z
2
)
-
1
,
q
˙
=
[
m
-
p
r
(
I
X
-
I
Z
)
-
I
X
Z
(
p
2
-
r
2
)
]
(
I
Y
)
,
r
˙
=
[
I
X
Z
l
+
I
X
n
+
(
I
X
2
-
I
Y
I
X
+
I
X
Z
2
)
p
q
-
I
X
Z
(
I
Z
-
I
Y
+
I
X
)
q
r
(
I
X
2
-
I
Y
I
X
+
I
X
Z
2
)
]
×
(
I
X
I
Z
-
I
X
Z
2
)
-
1
,
where p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), l is moment about roll axis (ft-lbs), m is moment about pitching axis (ft-lbs), n represents moment about yawing axis (ft-lbs), and IZ, IX, IY, and IXZ represent moment of inertial (slug ft2).Kinematic equations:
(4)
ϕ
˙
=
p
+
tan
θ
+
q
sin
ϕ
+
r
cos
ϕ
,
θ
˙
=
q
cos
ϕ
-
r
sin
ϕ
,
ψ
˙
=
(
q
sin
ϕ
+
r
cos
ϕ
)
cos
θ
,
where p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), θ is pitch angle (rad), ψ is heading angle (rad), and ϕ represents roll angle (rad).Kinematic equations:
(5)
V
˙
=
(
u
u
˙
+
v
v
˙
+
w
w
˙
)
V
,
α
˙
=
(
u
w
˙
-
w
u
˙
)
u
2
+
w
2
,
β
˙
=
(
v
˙
V
-
v
V
˙
)
v
2
c
o
s
β
,
where V is total velocity (ft/s), α is angle of attack (rad), and β is sideslip angle (rad).The forces including lift, drag, side force, and angular moments mentioned in (2) to (3) are calculated using the following equations:
(6)D=QSCD,L=QSCL,Y=QSCY,l=QSbCl,m=QSC-Cm,n=QSbCn,
where Q represents dynamic pressure (lbs/ft2), S is wing surface area (ft2), b is wing span (ft), C- is mean chord length (ft), CD, CL, CY, Cl, Cm, and Cn represent aircraft dimensionless force and moment coefficients which are calculated by using the following equations:
(7)CD=CD0+CDαα+CDδeδe,CY=CYββ+CYppb2V+CYrrb2V+CYδaδa+CYδrδr,CL=CL0+CLαα+CLqQC-2V+CLα˙α˙C-2V+CLδeδe,Cl=Clββ+Clppb2V+Clrrb2V+Clδaδa+Clδrδr,Cm=Cm0+Cmαα+CmqQC-2V+Cmα˙α˙C-2V+CmuuV+Cmδeδe,Cn=Cnββ+Cnppb2V+Cnrrb2V+Cnδaδa+Cnδrδr,
where δa, δe, and δr are aileron, elevator, and rudder deflections (rad), respectively. The description of remaining terms used in (7) is given in Table 1. A small UAV has been selected for simulation and implementation of the above mentioned nonlinear model. The geometric data and aerodynamic coefficients of this UAV [9] used in simulations are listed in Table 1.Table 1
Data of UAV.
Symbol
Value
Description
C
L
0
0.147
Coefficient of lift with zero angle of attack
C
L
α
4.54
Lift due to change in angle of attack
C
L
α
˙
1.972
Lift due to change in rate of angle of attack
C
L
δ
e
0.37
Lift due to change in elevator deflection
C
L
q
5.54
Lift due to change in pitching moment
C
D
0
0.0434
Zero drag
C
D
u
0.001
Coefficient of damping due to forward speed
C
D
δ
e
0.0
Drag due to change in elevator deflection
C
Y
β
−0.83
Side force due to change in side slip angle
C
Y
δ
a
0.0
Side force due to change in aileron deflection
C
Y
δ
r
0.1914
Side force due to change in rudder deflection
C
Y
p
0.0085
Side force due to roll rate
C
Y
r
0.25
Side force due to yaw rate
C
m
0
0.0001
Pitching moment with zero angle of attack
C
m
α
−0.39
Pitching moment due to change in alpha
C
m
u
0.0002
Pitching moment due to forward speed
C
m
α
˙
−4.37
Pitching moment due to rate of alpha
C
m
δ
e
1.2289
Pitching moment due to elevator deflection
C
m
q
−38.201
Pitching moment due toq
C
l
β
−0.022
Roll moment due to side slip angle
C
l
δ
a
0.34
Roll moment due to aileron deflection
C
l
δ
r
0.0154
Roll moment due to rudder deflection
C
l
p
−0.3819
Roll moment due top
C
l
r
0.0514
Roll moment due tor
C
n
β
0.1022
Yaw moment due to side slip angle
C
n
δ
a
−0.0088
Yaw moment due to aileron deflection
C
n
δ
r
−0.1404
Yaw moment due to rudder deflection
C
n
p
−0.017
Yaw moment due top
C
n
r
−0.28
Yaw moment due tor
M
30
Mass of UAV (lbs)
S
10.9
Wing surface area (sq ft)
b
7.92
Wing span (ft)
C
-
1.5
Mean chord length (ft)
I
X
1.08
Moment of inertia aboutX axis (slug-ft2)
I
Y
2.01
Moment of inertia aboutY axis (slug-ft2)
I
Z
3.03
Moment of inertia aboutZ axis (slug-ft2)
I
X
Y
0.0
Product of inertia  XY axis  (slug-ft2)
I
Y
Z
0.0
Product of inertial YZ axis (slug-ft2)
I
X
Z
0.0
Product of inertia  XZ axis (slug-ft2)In order to design a controller, model of the plant can be linearized about an equilibrium point. Different techniques are described in the literature to linearize a system. In our case, we have used the method of [5] to develop the state space model for the longitudinal mode. Resulting longitudinal model with elevator input is given as
(8)[Δu˙Δα˙Δq˙Δθ˙Δh˙]=[XuXα0-g0Zuu0-Zα˙Zαu0-Zα˙u0u0-Zα˙00MuMαMq00001000-u00u00][ΔuΔαΔqΔθΔh]+[XδeZδeu0-Zα˙Mδe00][Δδe].
By using the data given in Table 1 and (7), the dimensional stability derivatives are calculated for longitudinal model through mathematical relations mentioned in Table 2.Table 2
Formulae for calculation of stability derivatives.
Longitudinal dimensional stability derivatives
X
U
=
-
Q
S
(
C
D
U
+
2
C
D
0
)
/
M
u
0
Z
U
=
-
Q
S
(
C
L
U
+
2
C
L
0
)
/
M
u
0
Z
α
=
-
Q
S
(
C
L
α
+
2
C
D
0
)
/
M
M
U
=
Q
S
C
-
(
C
m
u
+
2
C
m
0
)
/
I
Y
u
0
M
α
=
Q
S
C
-
(
C
m
α
)
/
I
Y
M
q
=
Q
S
C
-
C
-
(
C
m
q
)
/
2
I
Y
u
0
X
δ
e
=
-
Q
S
(
C
D
δ
e
)
/
M
Z
δ
e
=
-
Q
S
(
C
L
δ
e
)
/
M
M
δ
e
=
Q
S
C
-
(
C
m
δ
e
)
/
I
Y
Z
α
˙
=
-
Q
S
C
-
(
C
L
α
˙
)
/
2
M
u
0By substituting the dimensional derivatives, we obtain the longitudinal model as follows:(9)[Δu˙Δα˙Δq˙Δθ˙]=[-0.2312.450-32-0.004-7.810.92800.016349.18-15.1400010][ΔuΔαΔqΔθ]+[0-0.01-2.590][δe].
Dynamic characteristics of the longitudinal model are mentioned in Table 3.Table 3
Dynamic characteristics of longitudinal mode.
Eigenvalue
Damping ratio
Frequency (rad/sec)
Period (sec)
Mode
−0.118 ± 0.187i
0.53
0.221
28.41
Phugoid
−11.5 ± 2.08i
0.98
11.7
0.536
Short periodThe results show that the UAV under consideration has two pairs of complex conjugate roots for its longitudinal dynamics. Both the modes, that is, phugoid and short period, exhibit damped response.


### 2.2. Prime Controller

As already mentioned that Commercially Off-The-Shelf autopilots generally employ PID controllers, therefore a PID controller has been selected as a prime controller for this study. Based on the analysis and simulation results of the linearized-longitudinal model of the UAV, a PID controller has been designed as the pitch controller. Step response of pitch controller is shown in Figure2.Figure 2
Step response of pitch controller.The controller is designed for rise time less than 3 sec, settling time less than 8 sec at 4% criterion, and percentage overshoot lesser than 2%. Achieved performance parameters for the step response shown in Figure2 are 2.1 sec rise time, 6.1 sec settling time, and 1.8% overshoot.


### 2.3. Supervising Mechanism

As can be seen from Figure1, the proposed supervising mechanism is an augmentation to the conventional UAV flight controller. Internal layout of the supervising mechanism is given in Figure 3. Major functions of this block are listed as follows:(1)
to monitor the performance of overall system;(2)
to observe the system parameters/states;(3)
in case of degraded system performance due to limitations of the prime controller, generate appropriate compensation commands.Figure 3
Layout of supervising mechanism.The basic function ofObserver/Decision Maker block is to observe the system states, inputs, and outputs. Human reasoning like control logic has been developed to differentiate between the variations in system output as a result of a legitimate change in the input command or due to an unwanted atmospheric disturbance. This block keeps track of the output error and its rate of progression. If the error starts increasing, the Decision Maker block checks whether it is in response to a change in the input command or otherwise, in case the error is a consequence of the change in input command, the supervising mechanism will not take any action and let the prime controller handle the situation. On the other hand, if there is no change in the input command and the error has also increased beyond a predefined threshold, it is taken as a situation where the external disturbance is beyond the handling capability of the prime controller. In this case, the Decision Maker block decides to augment the control effort generated by the prime controller in order to keep the error within the specified limits.On receiving instructions from theDecision Maker block, a correction command is generated by the Correction Generator. The correction command, marked as Uc in the block diagram, is added to the control command generated by the prime controller. The working principal of this module again follows the human-like thinking process implemented as a fuzzy-logic controller. The implementation of intelligent control such as fuzzy logic allows flexibility and efficiency as it is helpful in dealing  complex systems [10, 11]. This block takes error and error rate as its inputs and outputs a correction command to support prime controller in its effort to fight out the disturbance which the prime controller is unable to handle effectively working alone. The rule set for decision making is made on the basis of the practical experience of a UAV pilot; a total of 49 rules have been formulated so far, which are listed in Table 4.Table 4
Rule set for fuzzy controller.
Output
Error rate
NL
NM
NS
Zero
PS
PM
PL
Error
NL
PL
PL
PL
PL
PM
PS
Z
NM
PL
PL
PL
PM
PS
Z
NS
NS
PL
PL
PM
PS
Z
NS
NM
Zero
PL
PM
PS
Z
NS
NM
NL
PS
PM
PS
Z
NS
NM
NL
NL
PM
PS
Z
NS
NM
NL
NL
NL
PL
Z
NS
NM
NL
NL
NL
NL
NL: neg large; NM: neg medium; NS: neg small; PL: pos large; PM: pos medium; PS: pos small.In order to evaluate the performance of the proposed scheme in fighting the disturbances, we inject a common type of atmospheric disturbance in the model and compare the performance of the proposed schemes with that of the PID controller working in standalone configuration. In UAV flights, atmospheric disturbances such as wind, gusts, and turbulence significantly influence parameters like attitude, velocity, altitude, and so forth. Rotational gusts resulting from variation of vertical gust velocity along the longitudinal axis of UAV or from an autonomous vortex sheet produced by atmospheric turbulences cause the aircraft to pitch its nose up or down which is not desired [12]. A UAV flying in atmospheric disturbance, subjected to rotational gust, has been taken as a test case to prove the efficacy of the proposed scheme.Linearized state space model for longitudinal motion of UAV subjected to atmospheric disturbance is(10)x˙=Ax(t)+Bu(t)+Dz(t),y(t)=Cx(t),
where
(11)x(t)=[u,α,q,θ]Tstatevector,u(t)=δeelevatorinput,z(t)=qgrotationalgust(rad/sec),A=[XuXα0-gZuu0-Zα˙Zαu0-Zα˙u0u0-Zα˙0MuMαMq00010],B=[XδeZδeu0-Zα˙Mδe0],D=[00-Mq0],C=[1000010000100001]
when a rotary gust in the form of an impulse, having amplitude of 0.1 rad/sec and a width of 3 seconds as shown in Figure 4, is introduced at t=15 sec; the results are shown in Figure 5.Figure 4
Disturbance in form of rotary gust.Figure 5
Step response in presence of disturbance.We can clearly see oscillations in the step response due to rotary gust as shown in Figure5. Output pitch amplitude varied and ultimately PID controller brought the pitch angle back to the desired level. In order to dampen the oscillations, we retuned the PID gains, as a result of which an improvement was observed. However, retuning of gains on one side improved the disturbance rejection but on the other hand, it modified the overall system response by increasing rise time from 2.1 sec to 4.3 sec and settling time from 6.1 sec to 8.4 sec. Improvement in disturbance rejection by retuning the gains is shown in Figure 6.Figure 6
Improvement in disturbance rejection due to retuning of gains.The two cases discussed above show that PID controllers can handle disturbances to certain level but only after retuning its gains. This approach has the side effect of compromising the desired performance of the controller. In case of UAVs, adjusting gains means a tedious task of conducting the experimental flights for retuning.Keeping in view the above mentioned limitations of UAV specific PID controllers, the concept of supervisory mechanism is now applied. As discussed earlier, supervisory mechanism comprises two modules, that is, a correction generator, which is a fuzzy logic based controller, and an observer/decision maker. After augmenting the supervisory mechanism with the PID-controller based system, the simulations were run again with the same step input and the rotary gust disturbance injected at the same point in time. The result of this simulation clearly depicting the marked improvement in the pitch response is shown in Figure7.Figure 7
Improvement in pitch response after incorporating the supervisory mechanism.Results of few more simulations to observe the pitch response of UAV with multiple input commands and varied disturbance levels at different points in time, both with and without augmenting the supervising mechanism, are presented in the figures as follows. Figure8 shows the pitch response to step input at 5 sec, 60 sec, and 150 sec, respectively. Figure 9 shows rotary gust disturbance with two different amplitudes at two segregated time instants. Figures 10 and 11 show the pitch responses in the presence of disturbance without supervising mechanism and pitch response of the system after incorporating the proposed supervising mechanism.Figure 8
Pitch response with step inputs at 5 sec, 60 sec and 150 sec.Figure 9
Simulated rotary gusts at 15 sec and 85 sec.Figure 10
Step response in presence of disturbance.Figure 11
Improvement in.pitch response after incorporating supervisory mechanism.In order to assess the performance of supervising mechanism in more practical and realistic scenario, the disturbance gust of the form, shown in Figure12, was also used during simulations.Figure 12
Simulated gust disturbances.The pitch response of the system without supervisory mechanism due to rotary gust shown in Figure12 above is shown in Figure 13.Figure 13
Pitch response without supervisory mechanism.As shown in Figure13, PID controller tried to compensate the effects of rotary gust, and the resulting peak error of 0.3991° can be observed in the pitch response. When the supervisory mechanism is invoked, the peak error is reduced to 0.05° under the same disturbance and input conditions, as shown in Figure 14.Figure 14
Improvement in pitch response due to supervisory mechanism.Besides noticing marked improvement in the system response by augmenting the supervising mechanism, another important factor worth noticing will be to quantify the extra control effort employed as a result of incorporating the supervising mechanism, which resulted in the improved performance. In order to assess the control effort,peak deflection of elevator and the cost of effort are measured during the interval when the disturbance is induced, that is, 15 seconds to 33 seconds. Cost of effort is calculated as Σ(|u[n]|), where “u” is the total control effort generated and “n” represents the sampling instants. For the pitch response of Figure 14, the corresponding elevator deflections for the highlighted period of disturbance are shown in Figure 15; the values for the peak elevator deflection and the cost of effort are found to be 0.61° and 1594.4, respectively.Figure 15
Control effort generated by PID controller working alone.In case of the augmented system, the peak elevator deflection and the cost of effort during the same period that is 15 seconds to 33 seconds turn out to be 0.62° and 1607.0, respectively. The results indicate that the augmented system improves the system response with minimal increase in the control effort as shown in Figure16.Figure 16
Control effort generated by augmented system.


## 2.1. UAV Model

A mathematical model is a set of differential equations describing the characteristics of a system. In case of aircrafts or UAVs, the differential equations depicting the dynamic behaviour, also referred to as Equations of Motion (EoM), can be expressed in several forms, that is, as nonlinear fully-coupled, nonlinear semicoupled, nonlinear decoupled, linear coupled, and linear decoupled [1] forms. Nonlinear fullycoupled models describe the UAV dynamics more accurately than any other simplified models and are mostly used for evaluating aircraft performance through computer simulations. However, when it comes to designing the autopilot, simplified models due to their simplicity and ease of implementation have been exploited more frequently.Nonlinear models of UAVs based on the Newton-Euler equations of motion have been derived in Stevens and Lewis [2], Passino [3], Sadraey and Colgren [4], Yao et al. [5], and Leong et al. [6], Snell et al. [1], and Bugajski and Enns [7, 8] which have considered six degrees of freedom (6-DOF) nonlinear dynamics. Fifteen first-order differential equations are considered. The chosen states are position in Earth-Fixed Frame, three velocities, three rates, attitude angles, longitudinal velocity, angle of attack, and side slip angle. Equations are summarized as follows.Positional equations:
(1)
X
˙
=
u
cos
θ
cos
ϕ
+
v
(
-
cos
ϕ
sin
ψ
+
sin
θ
cos
ψ
)
+
w
(
sin
ϕ
sin
ψ
+
cos
ϕ
sin
θ
cos
ψ
)
,
Y
˙
=
u
cos
θ
sin
ψ
+
v
(
cos
ϕ
cos
ψ
+
sin
θ
sin
ψ
)
+
w
(
-
sin
ϕ
cos
ψ
+
cos
ϕ
sin
θ
sin
ψ
)
,
Z
˙
=
u
sin
θ
-
v
(
sin
ϕ
cos
θ
)
-
w
(
cos
ϕ
cos
θ
)
=
-
h
˙
,
where X represents longitude (rad), Y represents latitude (rad), Z and h represent height (ft), u is velocity in longitudinal axis (ft/s), v represents velocity in lateral axis (ft/s), w represents velocity in height axis (ft/s), θ is pitch angle (rad), ψ is heading angle (rad), and ϕ represents roll angle (rad).Velocity equations:
(2)
u
˙
=
r
v
-
w
q
-
g
sin
θ
+
(
T
+
D
cos
α
cos
β
-
L
sin
α
-
Y
cos
α
sin
β
)
M
,
v
˙
=
-
r
u
-
w
p
-
g
sin
ϕ
cos
θ
+
(
D
sin
β
+
Y
cos
β
)
M
,
w
˙
=
r
u
-
w
q
-
g
sin
θ
+
(
T
+
D
cos
α
cos
β
-
L
sin
α
-
Y
cos
α
sin
β
)
M
,
where u is velocity in longitudinal axis (ft/s), v represents velocity in lateral axis (ft/s), w represents velocity in height axis (ft/s), p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), θ is pitch angle (rad), α is angle of attack (rad), β represents roll sideslip angle (rad), T represents thrust force (lbs), Y represents side force (lbs), D represents drag force (lbs), L represents lift force (lbs), M represents mass (lbs), and g represents acceleration due to gravity (ft/sec2).Moment equations:
(3)
p
˙
=
[
(
I
Z
I
Y
-
I
Z
2
-
I
X
Z
2
)
I
Z
l
+
I
X
Z
n
+
I
X
Z
(
I
X
-
I
Y
+
I
Z
)
p
q
+
(
I
Z
I
Y
-
I
Z
2
-
I
X
Z
2
)
q
r
]
×
(
I
X
I
Z
-
I
X
Z
2
)
-
1
,
q
˙
=
[
m
-
p
r
(
I
X
-
I
Z
)
-
I
X
Z
(
p
2
-
r
2
)
]
(
I
Y
)
,
r
˙
=
[
I
X
Z
l
+
I
X
n
+
(
I
X
2
-
I
Y
I
X
+
I
X
Z
2
)
p
q
-
I
X
Z
(
I
Z
-
I
Y
+
I
X
)
q
r
(
I
X
2
-
I
Y
I
X
+
I
X
Z
2
)
]
×
(
I
X
I
Z
-
I
X
Z
2
)
-
1
,
where p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), l is moment about roll axis (ft-lbs), m is moment about pitching axis (ft-lbs), n represents moment about yawing axis (ft-lbs), and IZ, IX, IY, and IXZ represent moment of inertial (slug ft2).Kinematic equations:
(4)
ϕ
˙
=
p
+
tan
θ
+
q
sin
ϕ
+
r
cos
ϕ
,
θ
˙
=
q
cos
ϕ
-
r
sin
ϕ
,
ψ
˙
=
(
q
sin
ϕ
+
r
cos
ϕ
)
cos
θ
,
where p is roll rate (rad/sec), q represents pitch rate (rad/sec), r is yaw rate (rad/sec), θ is pitch angle (rad), ψ is heading angle (rad), and ϕ represents roll angle (rad).Kinematic equations:
(5)
V
˙
=
(
u
u
˙
+
v
v
˙
+
w
w
˙
)
V
,
α
˙
=
(
u
w
˙
-
w
u
˙
)
u
2
+
w
2
,
β
˙
=
(
v
˙
V
-
v
V
˙
)
v
2
c
o
s
β
,
where V is total velocity (ft/s), α is angle of attack (rad), and β is sideslip angle (rad).The forces including lift, drag, side force, and angular moments mentioned in (2) to (3) are calculated using the following equations:
(6)D=QSCD,L=QSCL,Y=QSCY,l=QSbCl,m=QSC-Cm,n=QSbCn,
where Q represents dynamic pressure (lbs/ft2), S is wing surface area (ft2), b is wing span (ft), C- is mean chord length (ft), CD, CL, CY, Cl, Cm, and Cn represent aircraft dimensionless force and moment coefficients which are calculated by using the following equations:
(7)CD=CD0+CDαα+CDδeδe,CY=CYββ+CYppb2V+CYrrb2V+CYδaδa+CYδrδr,CL=CL0+CLαα+CLqQC-2V+CLα˙α˙C-2V+CLδeδe,Cl=Clββ+Clppb2V+Clrrb2V+Clδaδa+Clδrδr,Cm=Cm0+Cmαα+CmqQC-2V+Cmα˙α˙C-2V+CmuuV+Cmδeδe,Cn=Cnββ+Cnppb2V+Cnrrb2V+Cnδaδa+Cnδrδr,
where δa, δe, and δr are aileron, elevator, and rudder deflections (rad), respectively. The description of remaining terms used in (7) is given in Table 1. A small UAV has been selected for simulation and implementation of the above mentioned nonlinear model. The geometric data and aerodynamic coefficients of this UAV [9] used in simulations are listed in Table 1.Table 1
Data of UAV.
Symbol
Value
Description
C
L
0
0.147
Coefficient of lift with zero angle of attack
C
L
α
4.54
Lift due to change in angle of attack
C
L
α
˙
1.972
Lift due to change in rate of angle of attack
C
L
δ
e
0.37
Lift due to change in elevator deflection
C
L
q
5.54
Lift due to change in pitching moment
C
D
0
0.0434
Zero drag
C
D
u
0.001
Coefficient of damping due to forward speed
C
D
δ
e
0.0
Drag due to change in elevator deflection
C
Y
β
−0.83
Side force due to change in side slip angle
C
Y
δ
a
0.0
Side force due to change in aileron deflection
C
Y
δ
r
0.1914
Side force due to change in rudder deflection
C
Y
p
0.0085
Side force due to roll rate
C
Y
r
0.25
Side force due to yaw rate
C
m
0
0.0001
Pitching moment with zero angle of attack
C
m
α
−0.39
Pitching moment due to change in alpha
C
m
u
0.0002
Pitching moment due to forward speed
C
m
α
˙
−4.37
Pitching moment due to rate of alpha
C
m
δ
e
1.2289
Pitching moment due to elevator deflection
C
m
q
−38.201
Pitching moment due toq
C
l
β
−0.022
Roll moment due to side slip angle
C
l
δ
a
0.34
Roll moment due to aileron deflection
C
l
δ
r
0.0154
Roll moment due to rudder deflection
C
l
p
−0.3819
Roll moment due top
C
l
r
0.0514
Roll moment due tor
C
n
β
0.1022
Yaw moment due to side slip angle
C
n
δ
a
−0.0088
Yaw moment due to aileron deflection
C
n
δ
r
−0.1404
Yaw moment due to rudder deflection
C
n
p
−0.017
Yaw moment due top
C
n
r
−0.28
Yaw moment due tor
M
30
Mass of UAV (lbs)
S
10.9
Wing surface area (sq ft)
b
7.92
Wing span (ft)
C
-
1.5
Mean chord length (ft)
I
X
1.08
Moment of inertia aboutX axis (slug-ft2)
I
Y
2.01
Moment of inertia aboutY axis (slug-ft2)
I
Z
3.03
Moment of inertia aboutZ axis (slug-ft2)
I
X
Y
0.0
Product of inertia  XY axis  (slug-ft2)
I
Y
Z
0.0
Product of inertial YZ axis (slug-ft2)
I
X
Z
0.0
Product of inertia  XZ axis (slug-ft2)In order to design a controller, model of the plant can be linearized about an equilibrium point. Different techniques are described in the literature to linearize a system. In our case, we have used the method of [5] to develop the state space model for the longitudinal mode. Resulting longitudinal model with elevator input is given as
(8)[Δu˙Δα˙Δq˙Δθ˙Δh˙]=[XuXα0-g0Zuu0-Zα˙Zαu0-Zα˙u0u0-Zα˙00MuMαMq00001000-u00u00][ΔuΔαΔqΔθΔh]+[XδeZδeu0-Zα˙Mδe00][Δδe].
By using the data given in Table 1 and (7), the dimensional stability derivatives are calculated for longitudinal model through mathematical relations mentioned in Table 2.Table 2
Formulae for calculation of stability derivatives.
Longitudinal dimensional stability derivatives
X
U
=
-
Q
S
(
C
D
U
+
2
C
D
0
)
/
M
u
0
Z
U
=
-
Q
S
(
C
L
U
+
2
C
L
0
)
/
M
u
0
Z
α
=
-
Q
S
(
C
L
α
+
2
C
D
0
)
/
M
M
U
=
Q
S
C
-
(
C
m
u
+
2
C
m
0
)
/
I
Y
u
0
M
α
=
Q
S
C
-
(
C
m
α
)
/
I
Y
M
q
=
Q
S
C
-
C
-
(
C
m
q
)
/
2
I
Y
u
0
X
δ
e
=
-
Q
S
(
C
D
δ
e
)
/
M
Z
δ
e
=
-
Q
S
(
C
L
δ
e
)
/
M
M
δ
e
=
Q
S
C
-
(
C
m
δ
e
)
/
I
Y
Z
α
˙
=
-
Q
S
C
-
(
C
L
α
˙
)
/
2
M
u
0By substituting the dimensional derivatives, we obtain the longitudinal model as follows:(9)[Δu˙Δα˙Δq˙Δθ˙]=[-0.2312.450-32-0.004-7.810.92800.016349.18-15.1400010][ΔuΔαΔqΔθ]+[0-0.01-2.590][δe].
Dynamic characteristics of the longitudinal model are mentioned in Table 3.Table 3
Dynamic characteristics of longitudinal mode.
Eigenvalue
Damping ratio
Frequency (rad/sec)
Period (sec)
Mode
−0.118 ± 0.187i
0.53
0.221
28.41
Phugoid
−11.5 ± 2.08i
0.98
11.7
0.536
Short periodThe results show that the UAV under consideration has two pairs of complex conjugate roots for its longitudinal dynamics. Both the modes, that is, phugoid and short period, exhibit damped response.


## 2.2. Prime Controller

As already mentioned that Commercially Off-The-Shelf autopilots generally employ PID controllers, therefore a PID controller has been selected as a prime controller for this study. Based on the analysis and simulation results of the linearized-longitudinal model of the UAV, a PID controller has been designed as the pitch controller. Step response of pitch controller is shown in Figure2.Figure 2
Step response of pitch controller.The controller is designed for rise time less than 3 sec, settling time less than 8 sec at 4% criterion, and percentage overshoot lesser than 2%. Achieved performance parameters for the step response shown in Figure2 are 2.1 sec rise time, 6.1 sec settling time, and 1.8% overshoot.


## 2.3. Supervising Mechanism

As can be seen from Figure1, the proposed supervising mechanism is an augmentation to the conventional UAV flight controller. Internal layout of the supervising mechanism is given in Figure 3. Major functions of this block are listed as follows:(1)
to monitor the performance of overall system;(2)
to observe the system parameters/states;(3)
in case of degraded system performance due to limitations of the prime controller, generate appropriate compensation commands.Figure 3
Layout of supervising mechanism.The basic function ofObserver/Decision Maker block is to observe the system states, inputs, and outputs. Human reasoning like control logic has been developed to differentiate between the variations in system output as a result of a legitimate change in the input command or due to an unwanted atmospheric disturbance. This block keeps track of the output error and its rate of progression. If the error starts increasing, the Decision Maker block checks whether it is in response to a change in the input command or otherwise, in case the error is a consequence of the change in input command, the supervising mechanism will not take any action and let the prime controller handle the situation. On the other hand, if there is no change in the input command and the error has also increased beyond a predefined threshold, it is taken as a situation where the external disturbance is beyond the handling capability of the prime controller. In this case, the Decision Maker block decides to augment the control effort generated by the prime controller in order to keep the error within the specified limits.On receiving instructions from theDecision Maker block, a correction command is generated by the Correction Generator. The correction command, marked as Uc in the block diagram, is added to the control command generated by the prime controller. The working principal of this module again follows the human-like thinking process implemented as a fuzzy-logic controller. The implementation of intelligent control such as fuzzy logic allows flexibility and efficiency as it is helpful in dealing  complex systems [10, 11]. This block takes error and error rate as its inputs and outputs a correction command to support prime controller in its effort to fight out the disturbance which the prime controller is unable to handle effectively working alone. The rule set for decision making is made on the basis of the practical experience of a UAV pilot; a total of 49 rules have been formulated so far, which are listed in Table 4.Table 4
Rule set for fuzzy controller.
Output
Error rate
NL
NM
NS
Zero
PS
PM
PL
Error
NL
PL
PL
PL
PL
PM
PS
Z
NM
PL
PL
PL
PM
PS
Z
NS
NS
PL
PL
PM
PS
Z
NS
NM
Zero
PL
PM
PS
Z
NS
NM
NL
PS
PM
PS
Z
NS
NM
NL
NL
PM
PS
Z
NS
NM
NL
NL
NL
PL
Z
NS
NM
NL
NL
NL
NL
NL: neg large; NM: neg medium; NS: neg small; PL: pos large; PM: pos medium; PS: pos small.In order to evaluate the performance of the proposed scheme in fighting the disturbances, we inject a common type of atmospheric disturbance in the model and compare the performance of the proposed schemes with that of the PID controller working in standalone configuration. In UAV flights, atmospheric disturbances such as wind, gusts, and turbulence significantly influence parameters like attitude, velocity, altitude, and so forth. Rotational gusts resulting from variation of vertical gust velocity along the longitudinal axis of UAV or from an autonomous vortex sheet produced by atmospheric turbulences cause the aircraft to pitch its nose up or down which is not desired [12]. A UAV flying in atmospheric disturbance, subjected to rotational gust, has been taken as a test case to prove the efficacy of the proposed scheme.Linearized state space model for longitudinal motion of UAV subjected to atmospheric disturbance is(10)x˙=Ax(t)+Bu(t)+Dz(t),y(t)=Cx(t),
where
(11)x(t)=[u,α,q,θ]Tstatevector,u(t)=δeelevatorinput,z(t)=qgrotationalgust(rad/sec),A=[XuXα0-gZuu0-Zα˙Zαu0-Zα˙u0u0-Zα˙0MuMαMq00010],B=[XδeZδeu0-Zα˙Mδe0],D=[00-Mq0],C=[1000010000100001]
when a rotary gust in the form of an impulse, having amplitude of 0.1 rad/sec and a width of 3 seconds as shown in Figure 4, is introduced at t=15 sec; the results are shown in Figure 5.Figure 4
Disturbance in form of rotary gust.Figure 5
Step response in presence of disturbance.We can clearly see oscillations in the step response due to rotary gust as shown in Figure5. Output pitch amplitude varied and ultimately PID controller brought the pitch angle back to the desired level. In order to dampen the oscillations, we retuned the PID gains, as a result of which an improvement was observed. However, retuning of gains on one side improved the disturbance rejection but on the other hand, it modified the overall system response by increasing rise time from 2.1 sec to 4.3 sec and settling time from 6.1 sec to 8.4 sec. Improvement in disturbance rejection by retuning the gains is shown in Figure 6.Figure 6
Improvement in disturbance rejection due to retuning of gains.The two cases discussed above show that PID controllers can handle disturbances to certain level but only after retuning its gains. This approach has the side effect of compromising the desired performance of the controller. In case of UAVs, adjusting gains means a tedious task of conducting the experimental flights for retuning.Keeping in view the above mentioned limitations of UAV specific PID controllers, the concept of supervisory mechanism is now applied. As discussed earlier, supervisory mechanism comprises two modules, that is, a correction generator, which is a fuzzy logic based controller, and an observer/decision maker. After augmenting the supervisory mechanism with the PID-controller based system, the simulations were run again with the same step input and the rotary gust disturbance injected at the same point in time. The result of this simulation clearly depicting the marked improvement in the pitch response is shown in Figure7.Figure 7
Improvement in pitch response after incorporating the supervisory mechanism.Results of few more simulations to observe the pitch response of UAV with multiple input commands and varied disturbance levels at different points in time, both with and without augmenting the supervising mechanism, are presented in the figures as follows. Figure8 shows the pitch response to step input at 5 sec, 60 sec, and 150 sec, respectively. Figure 9 shows rotary gust disturbance with two different amplitudes at two segregated time instants. Figures 10 and 11 show the pitch responses in the presence of disturbance without supervising mechanism and pitch response of the system after incorporating the proposed supervising mechanism.Figure 8
Pitch response with step inputs at 5 sec, 60 sec and 150 sec.Figure 9
Simulated rotary gusts at 15 sec and 85 sec.Figure 10
Step response in presence of disturbance.Figure 11
Improvement in.pitch response after incorporating supervisory mechanism.In order to assess the performance of supervising mechanism in more practical and realistic scenario, the disturbance gust of the form, shown in Figure12, was also used during simulations.Figure 12
Simulated gust disturbances.The pitch response of the system without supervisory mechanism due to rotary gust shown in Figure12 above is shown in Figure 13.Figure 13
Pitch response without supervisory mechanism.As shown in Figure13, PID controller tried to compensate the effects of rotary gust, and the resulting peak error of 0.3991° can be observed in the pitch response. When the supervisory mechanism is invoked, the peak error is reduced to 0.05° under the same disturbance and input conditions, as shown in Figure 14.Figure 14
Improvement in pitch response due to supervisory mechanism.Besides noticing marked improvement in the system response by augmenting the supervising mechanism, another important factor worth noticing will be to quantify the extra control effort employed as a result of incorporating the supervising mechanism, which resulted in the improved performance. In order to assess the control effort,peak deflection of elevator and the cost of effort are measured during the interval when the disturbance is induced, that is, 15 seconds to 33 seconds. Cost of effort is calculated as Σ(|u[n]|), where “u” is the total control effort generated and “n” represents the sampling instants. For the pitch response of Figure 14, the corresponding elevator deflections for the highlighted period of disturbance are shown in Figure 15; the values for the peak elevator deflection and the cost of effort are found to be 0.61° and 1594.4, respectively.Figure 15
Control effort generated by PID controller working alone.In case of the augmented system, the peak elevator deflection and the cost of effort during the same period that is 15 seconds to 33 seconds turn out to be 0.62° and 1607.0, respectively. The results indicate that the augmented system improves the system response with minimal increase in the control effort as shown in Figure16.Figure 16
Control effort generated by augmented system.


## 3. Conclusion

Small UAVs are generally equipped with PID controllers and are tuned for desired performance in specific atmospheric conditions. UAVs perform satisfactorily if the atmospheric conditions do not change much. However, if the UAV system moves to a location where the atmospheric conditions are different, the PID gains may require readjustment/retuning, which is a tedious job and requires numerous UAV test flights; otherwise, performance degradations are observed. The above results have validated the concept that by augmenting a supervising mechanism with the existing PID controller scheme, we can significantly reduce the effects of atmospheric disturbances with almost the same control effort. Proposed scheme can alleviate the hassle of retuning the autopilot and make the system robust against atmospheric disturbances.



---

*Source: 564803-2013-11-26.xml*