# Attitude and Altitude Control of Trirotor UAV by Using Adaptive Hybrid Controller

Authors: Zain Anwar Ali; Daobo Wang; Suhaib Masroor; M. Shafiq Loya
Journal: Journal of Control Science and Engineering
 (2016)

---

## Abstract

The paper presents an adaptive hybrid scheme which is based on fuzzy regulation, pole-placement, and tracking (RST) control algorithm for controlling the attitude and altitude of trirotor UAV. The dynamic and kinematic model of Unmanned Aerial Vehicle (UAV) is unstable and nonlinear in nature with 6 degrees of freedom (DOF); that is why the stabilization of aerial vehicle is a difficult task. To stabilize the nonlinear behavior of our UAV, an adaptive hybrid controller algorithm is used, in which RST controller tuning is performed by adaptive gains of fuzzy logic controller. Simulated results show that fuzzy based RST controller gives better robustness as compared to the classical RST controller.


---

## Body

## 1. Introduction

The automatic control of airborne machines has been a challenge to the researchers for numerous years. Significant attention has been given to the control of UAVs [1]. Simple construction, vertical taking off and landing (VTOL) capability, and rapid steering are the main reasons of micro helicopter that attract military and civilian users. UAVs are widely used in surveillance, firefighting, rescue, traffic monitoring, and environmental monitoring scenarios [2, 3].There are two groups in which UAVs are categorized, that is, fixed and rotary wings. In real-world tasks, fixed-wing UAVs have existed for years in routine reconnaissance assignments, but they lack the hovering flying ability. Rotorcrafts are foremost complex types of flying machine. They are multi-input multioutput (MIMO) under actuated structures capable of executing vertical takeoff and landing (VTOL) and also quick maneuvering turns. Utmost vertical takeoff and landing flying machines depend on gyro equilibrium or accelerometer systems to endure steady hovering flight [4–6]. To fulfill the aforementioned necessities, a multirotor UAV is best available resolution for this. Multirotor style UAV has a number of categories together with birotor, trirotor, and quadrotor. In this paper, our main concern relates to trirotor UAV having three rotors situated in the midway from center of gravity [7].The trirotor UAV has an issue of having a yawing moment brought in due to feedback torque from unpaired rotor. To overcome such condition, a number of strategies of trirotor UAV have been established with their specific explanations such as single trirotor UAV having a servo motor connected with one of its rotor axes to diminish yaw moment by tilting at certain angle. The other category of trirotor UAV is termed as coaxial trirotor, and Draganflyer X6 might be reflected as this type [8]. It devises dual rotors mounted on every rotor axis, thus having overall six rotors. Using two counterrotating rotors on every axis, the feedback torque has annulled. This form of trirotor ensures an improved stability compared to the solo trirotor UAV style.A trirotor UAV has four control parameters, that is, altitude, lateral, longitudinal, and angular moments, which provides 6 degrees of freedom (DOF) and three Cartesian coordinates, that is,x, y, z [9], while the output includes rotational velocities, translational velocities, and rotational angles. Rotational and translational subsystems are incorporated to establish sequential control due to the nonlinear behavior of trirotor UAV. Before the real flight test the simulation of UAV parameters is necessary; in this research, we have to check all parameters which are highly unstable and nonlinear like control commands of UAV, Euler angles, and translational and rotational velocity components [10], by resolving the error which is found in the yaw moment of unpaired rotor reaction produced by the turning effect “torque” in a frame. To nullify the tilt angle a Brushless DC Motor (BLDC) is installed in a triangular frame of trirotor.Different hybrid controller algorithms were previously applied for controlling the attitude and altitude of UAV, like conventional Proportional Integral Derivative (PID) controller with Backstepping Scheme, fuzzy based PID controller, adaptive PID controller, and Adaptive Sliding Mode Controller [11–14], but no one considers fuzzy based regulation, pole-placement, and tracking (RST) for controlling the dynamics of trirotor UAV. In this paper, we use hybrid controller scheme named as a fuzzy based RST controller, which was previously addressed by [15]. The polynomial regulator of RST looks to be the remarkable substitute of the systematic PID controller. RST controller theory is totally based on pole-placement algorithm, and it has potential to execute poles in the closed-loop system to handle in a distinct way the objectives of tracking and regulation.The robust RST controller of [16] is firstly applied in our highly unstable system and then after that fuzzy based RST controller (F-RST) is applied in it, taking the difference in terms of attitude stability between controllers. The overall performance of RST is good between robustness and complexity, but there are little transient errors to control the dynamics of the UAV as compared to our proposed F-RST approach.The main contributions in this research are as follows: (1) A novel algorithm to control the highly nonlinear system; (2) fuzzy logic controller with fine tuning gains of RST; (3) transient behavior of our system being realistic same as the experimental point of view; (4) the robustness and nullification of the rotor reaction already proven in yaw control.The paper is divided into six sections. Section1 defines the introduction, Section 2 defines the rigid body equations of motion, and the dynamics and representation of the UAV are defined in Section 3. The control approach and control algorithm are defined in Section 4. Moreover, simulations and results are discussed in Section 5. Lastly the whole paper is concluded in Section 6.


## 2. Rigid Body Equations

The equations of motion of a rigid body are defined by the second law of Newton, which expresses that the summation of all outside force acts in a body is equivalent to the time period variation of the body momentum. Moreover, the sum of external forces in the body is also equivalent to the rate of change of angular momentum. Trirotor has 6-DOF unstable and nonlinear equations of motion, which can be expressed in “differential” equation.Following is the equation of motion. The rotational or angular rates of the system are defined by(
p
,
q
,
r
), and the translational velocity and its position are defined by (
u
,
v
,
w
) and (
x
,
y
,
z
). Euler angles or attitude and external moments of an aircraft fixed body are defined by (
φ
,
θ
,
ψ
) and (
L
,
M
,
N
) [17–20].Rotational velocity components:(1)
p
=
φ
˙
-
ψ
˙
sin
⁡
θ
,
q
=
ψ
˙
sin
⁡
φ
cos
⁡
θ
+
θ
˙
cos
⁡
φ
,
r
=
ψ
˙
cos
⁡
φ
cos
⁡
θ
-
θ
˙
sin
⁡
φ
.Translational velocity components:(2)
u
=
m
w
˙
+
m
p
v
-
z
-
m
g
cos
⁡
θ
cos
⁡
φ
m
q
,
v
=
m
u
˙
+
m
q
w
-
x
-
m
g
sin
⁡
θ
r
m
,
w
=
m
v
˙
+
m
r
u
-
y
-
m
g
cos
⁡
θ
sin
⁡
φ
p
m
.Euler angles:(3)
θ
˙
=
-
r
sin
⁡
θ
+
q
cos
⁡
φ
,
φ
˙
=
p
+
r
cos
⁡
φ
tan
⁡
θ
+
q
sin
⁡
φ
tan
⁡
θ
,
ψ
˙
=
sec
⁡
θ
r
cos
⁡
φ
+
q
sin
⁡
φ
.Aerodynamic moments:(4)
L
=
I
x
p
˙
-
I
x
z
r
˙
-
I
x
z
p
q
+
q
r
I
z
-
I
y
,
M
=
I
y
q
˙
+
I
x
z
p
2
-
r
2
+
r
p
I
x
-
I
z
,
N
=
-
I
x
z
p
˙
+
I
z
r
˙
+
I
x
z
q
r
+
p
q
I
y
-
I
x
.The rotational and translational velocity of the aircraft in terms of kinetic energy are written as(5)
T
r
o
t
a
t
i
o
n
a
l
=
0.5
∗
I
x
φ
˙
-
ψ
˙
sin
⁡
θ
2
+
0.5
∗
I
y
θ
˙
cos
⁡
φ
+
ψ
˙
cos
⁡
θ
sin
⁡
φ
2
+
0.5
∗
I
z
ψ
˙
cos
⁡
θ
cos
⁡
φ
-
sin
⁡
φ
2
,
T
t
r
a
n
s
l
a
t
i
o
n
a
l
=
0.5
∗
m
x
˙
2
+
0.5
∗
m
y
˙
2
+
0.5
∗
m
z
˙
2
,where I
x, I
y, and I
z are inertial moments and “m” is the mass about x-, y-, z-axis, respectively.


## 3. System Dynamics

The dynamics constraints and parameters of UAV are highly unstable and nonlinear system is nearly similar to other aircrafts, which may help to design the controller for the successful flight operation. According to the momentum theory which was proposed by Newton, fluid axial velocity “u” through actuator is mostly greater than the speed “v” with which actuator is progressing through the air [21]. The generated thrust by the rotors equals the physique of the air passing through the circle in a unit time. The combination of blade theory and momentum is derived from moments and aerodynamic forces. Figure 1(a) shows the model of trirotor aerial vehicle in which two rotors are fixed in the body and one rotor is rotational called tilt rotor, to nullify the reaction torque effects. It has an obvious benefit for the generation of quick motion by using its tilt rotor, but for the stabilization of aerial vehicle it may require a very precise tilt angle [22, 23].Figure 1
Arrangement of trirotor UAV with (a) tilt angle and (b) system parameters.
(a)
(b)The hovering state of trirotor blades depends upon the propeller which becomes ineffective by increasing the number of blades on the propeller and limits its forward flight speed. By utilizing the momentum theory of helicopter aerodynamics which is similar to trirotor UAV theory [24], there are three propellers which are fixed in the rotors. The coefficient of thrust, torque, and nondimensional power are used to elaborate the rotor characteristics which are independent of rotor size, in which radius of blade is denoted by “R,” angular velocity is given by “δ,” area of blade is “A,” “ρ” is the air density, shaft of rotor is “Q,” thrust is “T,” and aerodynamics thrust coefficient is denoted by “C
t
′”:(6)
C
t
′
=
T
ρ
A
δ
R
2
,
C
q
′
=
Q
ρ
A
δ
R
2
R
,
C
p
′
=
P
ρ
A
δ
R
3
.The power coefficient is written as(7)
P
=
Q
δ
.By putting the power coefficient,(8)
C
p
′
=
C
q
′
=
Q
δ
ρ
A
δ
R
3
=
Q
ρ
A
δ
R
2
R
.The UAV hovering, identical incursion, and constant coefficient profile drag are supposed to beC
d
o
=
0.015, the supposition known as the modified momentum theory, while rotor solidarity ratio is given as “σ.” The induced power in the flight climbed mostly two or three times in excess of the power profile. Consider(9)
C
p
′
=
K
C
t
′
2
∗
C
t
′
+
1
8
∗
σ
∗
C
d
o
.


### 3.1. Representation of System

The placement of the aerial vehicle is explained by using Euler angle responses having altitude and attitude control which rotates alongx-, y-, and z-axis. It also presents the position of the center with respect to the Earth body frame and orientation of the aircraft is represented by (
φ
,
θ
,
ψ
) [25]. Newton’s Euler base dynamics of rigid body movement depend on the rotational and translational subsystems [26]. Moreover, the force components of aerodynamics, components of translational and rotational velocity, and moments are described in Table 1.Table 1
Dynamics & constants of UAV.
x-, y-, z-axis system
Aerodynamics force components
Translational subsystem components
Rotational subsystem components
Coordinates inertia
Roll (φ)
x
u
p
I
x
Pitch (θ)
y
v
q
I
y
Yaw (ψ)
z
w
r
I
zThe configuration of trirotor with tilt angle is shown in Figure1(a) taken from [6] and system parameter is defined in Figure 1(b) from [3], in which the distance from the centre body is denoted by “l.” The forces which are created by rotors R1, R2, and R3 are f
1, f
2, and f
3 respectively, and the torque produced by the rotors is denoted by τ
1
,
τ
2
,
τ
3. The force acting on the frame of the aircraft contains the thrust which is vertical along the positive z-axis and we can say that(10)
F
z
′
=
f
1
+
f
2
+
f
3
∗
cos
⁡
α
.The forces and torques of trirotor are written as(11)
f
k
=
K
t
′
δ
k
2
,
τ
k
=
K
τ
′
δ
k
2
,where K
t
′ is thrust coefficient, K
τ
′ is torque coefficients, and δ is the angular velocity of the rotor.


## 3.1. Representation of System

The placement of the aerial vehicle is explained by using Euler angle responses having altitude and attitude control which rotates alongx-, y-, and z-axis. It also presents the position of the center with respect to the Earth body frame and orientation of the aircraft is represented by (
φ
,
θ
,
ψ
) [25]. Newton’s Euler base dynamics of rigid body movement depend on the rotational and translational subsystems [26]. Moreover, the force components of aerodynamics, components of translational and rotational velocity, and moments are described in Table 1.Table 1
Dynamics & constants of UAV.
x-, y-, z-axis system
Aerodynamics force components
Translational subsystem components
Rotational subsystem components
Coordinates inertia
Roll (φ)
x
u
p
I
x
Pitch (θ)
y
v
q
I
y
Yaw (ψ)
z
w
r
I
zThe configuration of trirotor with tilt angle is shown in Figure1(a) taken from [6] and system parameter is defined in Figure 1(b) from [3], in which the distance from the centre body is denoted by “l.” The forces which are created by rotors R1, R2, and R3 are f
1, f
2, and f
3 respectively, and the torque produced by the rotors is denoted by τ
1
,
τ
2
,
τ
3. The force acting on the frame of the aircraft contains the thrust which is vertical along the positive z-axis and we can say that(10)
F
z
′
=
f
1
+
f
2
+
f
3
∗
cos
⁡
α
.The forces and torques of trirotor are written as(11)
f
k
=
K
t
′
δ
k
2
,
τ
k
=
K
τ
′
δ
k
2
,where K
t
′ is thrust coefficient, K
τ
′ is torque coefficients, and δ is the angular velocity of the rotor.


## 4. Controlling Approach

The control strategy of trirotor is same as conventional helicopter theory. The product of Euler angles controls the orientation of flight. The controlling approach of UAV consists of roll, pitch, yaw, and altitude control and tilt angle also plays a vital role in the displacement of UAV. The “δ
1” is rotor 1, “δ
2” is rotor 2, and “δ
3” is rotor 3 and the speed of rotors is measured in round per minute (RPM).Roll Control Strategy. It is divided into two cases, clockwise and anticlockwise movement of rotors.(1)
In clockwise rotation the speed of rotor 2 is 4000 RPM, greater than rotor 1 speed with about 3000 RPM, and rotor 1 speed is greater than rotor 3 speed with about 2000 RPM which is shown in Figure2(a). Mathematically δ
2
>
δ
1
>
δ
3.
(2)
In anticlockwise rotation the speed of rotor 3 is 4000 RPM, greater than rotor 1 speed with about 3000 RPM, and rotor 1 speed is greater than rotor 2 speed with about 2000 RPM which is also shown in Figure2(b). Mathematically δ
3
>
δ
1
>
δ
2.Figure 2
Roll Control Strategy with respect to anticlockwise (a) and clockwise (b) movement.
(a)
(b)Pitch Control Strategy. The two conditions for controlling the pitch of the trirotor are as follows: One is Nose-Up and the second is Nose-Down; it could be done by varying the speed of rotors.(1)
For Nose-Up condition the speed of rotor 2 and rotor 3 is the same, about 4000 RPM, as compared to the speed of rotor 1 which was about 2000 RPM to control the pitch Nose-Up condition, which is shown in Figure3(a). Mathematically δ
2
=
δ
3
>
δ
1.
(2)
For Nose-Down, the speed of rotor 1 is about 4000 RPM as compared to the speed of rotor 2 and rotor 3 which is equal to about 2000 RPM to control the pitch Nose-Down condition, as shown in Figure3(b). Mathematically δ
1
>
δ
2
=
δ
3.Figure 3
Pitch Control Strategy with respect to Nose-Up (a) and Nose-Down (b) conditions.
(a)
(b)Yaw Control Strategy. To control the yaw moment we require to achieve the desired lift, the speed of all rotors increases constantly while the thrust angle must change, where “α” is the tilt angle which can be used for rapid turn in hazardous environment. Figure 4 shows the change of tilt angle; mathematically we can say that δ
1
=
δ
2
=
δ
3, with α = 0.Figure 4
Movement of yaw control.Altitude Control Strategy. To maintain the desired altitude speed of all rotors must be the same. The speed of rotors increases frequently; when reaching the desired altitude, the speed of all rotors is 4000 RPM which is shown in Figure 5, in which angular velocity is also constant for all three rotors. Mathematically δ
1
=
δ
2
=
δ
3.Figure 5
Altitude Control Strategy.Control Algorithm. Our proposed hybrid controller is characterized in this section, in which the gains of RST controller are utilized for the tuning of fuzzy logic controller. The hybrid control algorithm is also used for the accurate tuning of each input parameter. The close-loop response of RST controller is shown in Figure 6, Figure 7 defines the attitude hold condition of trirotor UAV, and Figure 8 defines the complete block diagram of overall control algorithm of our system.Figure 6
Internal close-loop block diagram of RST controller.Figure 7
Attitude hold condition of trirotor UAV.Figure 8
Simulink Matlab base block diagram of fuzzy RST controller.The semantics levels of the fuzzy based RST controller are referred to as negative below (NEB), negative small (NES), zero (ZER), positive small (PSS), and positive big (PSB), in which “err” is the error and “d
e
/
d
t” is its derivative. The fuzzy controller if-then rules are shown in Tables 2–4 for the tuning of fuzzy based regulation, pole-placement, and tracking (RST) gains denoted as K
R, K
S, and K
T.Table 2
If-then rule of fuzzy logic controller forK
R.
d
e
/
d
t
E
r
r
o
r
NEB
NES
ZER
PSS
PSB
NEB
ZER
ZER
ZER
ZER
ZER
NES
ZER
PSS
PSS
PSS
ZER
ZER
PSS
PSS
PSS
PSS
PSS
PSS
PSB
PSS
PSS
PSS
PSS
PSB
PSB
PSB
PSB
PSB
PSBTable 3
If-then rule of fuzzy logic controller forK
S.
d
e
/
d
t
Error
NEB
NES
ZER
PSS
PSB
NEB
PSS
PSB
PSB
PSB
PSB
NES
PSS
PSS
PSS
PSS
PSB
ZER
ZER
PSS
PSS
PSS
PSB
PSS
ZER
PSS
PSS
PSS
PSS
PSB
ZER
PSB
PSB
PSB
PSSTable 4
If-then rule of fuzzy logic controller forK
T.
d
e
/
d
t
Error
NEB
NES
ZER
PSS
PSB
NEB
ZER
PSS
PSS
PSS
ZER
NES
PSS
PSS
PSM
PSS
PSS
ZER
PSM
PSS
PSM
PSM
PSM
PSS
PSM
PSM
PSM
PSS
PSL
PSB
PSL
PSM
PSM
PSS
PSLThe membership function of fuzzy logic controller input error “err” and derivative of input “derr” are shown in Figures 9 and 10 having ranges −1 to 1 and amplitude is about 0 to 1.Figure 9
Membership function of fuzzy logic controller for input error.Figure 10
Membership function of fuzzy logic controller for input derivative error.The outputs of fuzzy (RST) controller are referred to as regulation gain (K
R), pole-placement gain (K
S), and tracking gain (K
T). The semantic levels are allocated as zero (ZER), positive small (PSS), and positive big (PSB) and their ranges and amplitude are 0 to 1. After defuzzification, the output of fuzzy logic controller is change into crisps which is shown in Figures 11–13.Figure 11
Membership function of fuzzy logic controller for output regulation gain (F
K
R).Figure 12
Membership function of fuzzy logic controller for output pole-placement gain (F
K
S).Figure 13
Membership function of fuzzy logic controller for output tracking gain (F
K
T).The output of fuzzy logic controller is used as an adaptive gain for the RST controller and can be written as(12)
u
F
R
t
=
f
R
e
x
,
d
e
x
d
t
K
R
e
x
t
,
u
F
S
t
=
f
S
e
x
,
d
e
x
d
t
K
S
∫
0
t
e
x
t
,
u
F
T
t
=
f
T
e
x
,
d
e
x
d
t
K
T
d
e
x
t
d
t
,in which RST controller gains in (12) are defined as regulation gain (K
R), pole-placement gain (K
S), and tracking gain (K
T), whereas the gain values are tuned manually; after that accurate tuning of the system parameters is performed by F
K
R, F
K
S, and F
K
T.And outputs of fuzzy controllers are(13)
F
K
R
=
f
R
e
x
,
d
d
t
e
R
;
F
K
S
=
f
S
e
x
,
d
d
t
e
S
;
F
K
T
=
f
T
e
x
,
d
d
t
e
T
.The RST controller is defined as R
=
(
q
2
+
r
0
q
+
r
1
); S
=
(
S
0
q
2
+
S
1
q
+
S
2
); T
=
T
0
q
+
T
1
A
0.And finally the fuzzy RST controller for altitude and attitude stabilization control of trirotor UAV can be written as(14)
u
F
-
R
S
T
x
,
y
,
z
t
=
F
T
R
∗
u
c
t
-
F
S
R
y
t
,with t
=
0,1
,
2
….The same controller is designed fory, z, φ, θ, ψ.


## 5. Simulation Results and Discussions

The effectiveness of our proposed hybrid adaptive fuzzy RST controller is presented in this section, along with the nonlinear simulations for the attitude and altitude stabilization control of trirotor UAV on Matlab Simulink and compare fuzzy RST controller with the conventional RST controller. The simulation is done forx-, y-, and z-axis along with attitude control; Table 5 defines the parameter of trirotor UAV. The UAV subsystem is divided into rotational and translational subsystems. Initial errors in the system are controlled and stabilized by rotational subsystem and attitude angle is converging to zero to realize the hovering state. The translational components depend on Euler angles; however the Euler angles and rotational subsystem do not depend on translational subsystem.Table 5
Parameters of trirotor UAV.
Parameters
I
x
I
y
I
z
l
Mass
Values
0.3105
0.2112
0.2215
0.3050
0.785
Si units
kgm2
kgm2
kgm2
m
kgFigure15 shows the altitude, lateral, longitudinal, and angular control of UAV. The rise time and settling time for each input channel are between 1 to 2 seconds along with minor “bumps.” The altitude of the UAV is set to “unity” as shown in Figure 14. Figure 16 shows the attitude response having different initial angles, but after that it will converge to zero, which means that it will easily hold the attitude control of UAV. The rotational and translational velocity rate responses are shown in Figures 17 and 18 and both converge to the desired values easily.Figure 14
Altitude control of trirotor UAV.Figure 15
Control commands of trirotor UAV.
(a)
(b)
(c)
(d)Figure 16
Comparison of F-RST with RST controller for Euler angle responses.
(a)
(b)
(c)Figure 17
Rotational velocity responses.
(a)
(b)
(c)Figure 18
Translational velocity responses.
(a)
(b)
(c)The sampling time was set to 0.2 seconds for every simulation which was done in five seconds. Our proposed method converges to desired responses abruptly and efficiently as shown in Figures16–19. The initial conditions of Euler angles are φ
=
0.54, θ
=
2.4, ψ
=
2.5 radians, and reference input control commands are x
d
=
y
d
=
ψ
=
0
m
/
s and z
d
=
1
m, while u
=
v
=
0 and w
=
1 are translational velocity components. The rotational velocity converges to zero to maintain the desired attitude hold position easily; the results in Figures 15–18 show that our proposed algorithm has better robustness.Figure 19
Position rate and altitude of trirotor UAV.
(a)
(b)
(c)All the simulated constraints of UAV yield to original trimmed conditions, especially in the Euler angle responses shown in Figure16, our proposed algorithm with the conventional RST controller. In Figure 18 translational velocity is u
=
v
=
0, w
=
1, which means it easily controlled the attitude of UAV, without any overshoot, undershoot, and transient error, and settling time response is also better than the previously adaptive RST controller. The results show that our proposed controller is able to stabilize the attitude angles and altitude of trirotor UAV.


## 6. Conclusion

Fuzzy based RST control algorithm is used to control the unstable and nonlinear behavior of trirotor UAV. However, the translational and rotational subsystems are used to achieve the desired attitude and altitude. The robustness of our algorithm is demonstrated by using the computer simulation, which shows the effectiveness of the controller that has better transient response with very low overshoot and undershoot to achieve the desired attitude. At last, the trirotor converges very fast according to the desired position.



---

*Source: 6459891-2016-06-29.xml*