0% found this document useful (0 votes)
99 views16 pages

Neural Network-Based Adaptive Sliding Mode Control Design For Position and Attitude Control of A Quadrotor UAV

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views16 pages

Neural Network-Based Adaptive Sliding Mode Control Design For Position and Attitude Control of A Quadrotor UAV

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Aerospace Science and Technology 91 (2019) 12–27

Contents lists available at ScienceDirect

Aerospace Science and Technology


www.elsevier.com/locate/aescte

Neural network-based adaptive sliding mode control design for


position and attitude control of a quadrotor UAV
Hadi Razmi a,∗ , Sima Afshinfar b
a
Department of Electrical Engineering, East Tehran Branch, Islamic Azad University, Tehran, Iran
b
Young Researchers and Elite club, East Tehran Branch, Islamic Azad University, Tehran, Iran

a r t i c l e i n f o a b s t r a c t

Article history: In this paper, a novel method is suggested for the position and attitude tracking control of a quadrotor
Received 16 May 2018 UAV in the presence of parametric uncertainties and external disturbance. The proposed method
Received in revised form 16 December 2018 combines neural network adaptive scheme with sliding mode control, which preserves the advantages
Accepted 30 April 2019
of the two methods. Firstly, dynamic model of quadrotor is divided into two fully actuated and under
Available online 7 May 2019
actuated subsystems. Secondly, sliding mode controllers are corresponding designed for each subsystem,
Keywords: and their coefficients in sliding manifolds are adaptively tuned by the neural network method. In each
Sliding mode control section, using Lyapunov theory, stability of closed loop system is proven.
Neural network Finally, the method is examined for a square path tracking and a maximum overshoot of 7.5133% and a
Quadrotor settling time 5.6648 s are obtained. By comparing the results obtained through different methods, it is
concluded that the proposed controller provides the following main advantages: (1) good transient and
steady state behaviors, (2) insensitivity to parameter variations, (3) disturbance rejection capability, and
(4) remarkable stability and performance robustness. Hence, for operational purposes in which the fast
and accurate response are of crucial importance, using the neural network-based adaptive sliding mode
control approach is recommended.
© 2019 Elsevier Masson SAS. All rights reserved.

1. Introduction So far, different methods for attitude and position control of


the quadrotor, such as linear control, nonlinear control, optimal
control, adaptive control, robust control and intelligent control
More recently, Unmanned Aerial Vehicles (UAVs) such as
quadrotors are an important part of scientific studies in the fields methods, have been proposed in the literature [7,8], and some of
of commercial military, civilian, industrial, and academic platform them have been reviewed in [9]. Sliding mode control method is
[1,2]. The quadrotors have a lot of benefits such as the Vertical one of the most useful and efficient approaches used to control
Take-Off and Landing (VTOL), hover capability, high speed maneu- the quadrotor because of the fast response, good transient per-
verability, good agility, small size, light weight, low cost, and high formance, easy tuning and implementation, and strong robustness
performance [3,4]. Due to these benefits, their applications do- with respect to bounded external disturbances and system uncer-
mains cover photography, mapping, monitoring, inspection, recon- tainties [10].
naissance, surveillance, search and rescue, and remote inspection A pure sliding mode controller has the following challenges and
[3,5]. drawbacks in practical applications:
However, the control of a quadrotor is difficult because of the
highly coupled nonlinear dynamics, unstable and multi-variable • Chattering problem or high frequency oscillations of the con-
nature, possibly non-minimum phase, underactuation, as well as trol signals,
existence parameter uncertainties and external disturbances, like • Stability analysis,
payload, wind gusts, model uncertainties, and internal friction [6]. • Tracking performance in finite time,
• High vulnerability to measurement noise,
• Employment of unnecessarily large control signals to overcome
the parametric uncertainties,
*Corresponding author.
• Necessity of a thorough and accurate knowledge of the plant
E-mail addresses: [email protected] (H. Razmi), [email protected]
(S. Afshinfar). dynamics for the calculation of the equivalent control.

https://doi.org/10.1016/j.ast.2019.04.055
1270-9638/© 2019 Elsevier Masson SAS. All rights reserved.
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 13

Nomenclature

[θ, φ, ψ]T The orientation angle vector of the quadrotor in I x , I y , and I z The mass moments of inertia in the x, y, and z
body-frame axes, respectively
[x, y , z] T The position vector of the center of the gravity of the Jr The inertia of the propeller
ki (i = 1, · · · , 6) The drag coefficients
quadrotor in earth-frame
l The distance from the center of each rotor to the cen-
i (i = 1, · · · , 4) The angular speed of the propeller i
ter of the gravity of the quadrotor
r The overall residual rotor angular velocity ms The total mass of the quadrotor
C The force to moment scaling factor UAV Unmanned Aerial Vehicle
g The acceleration of gravity VTOL Vertical Take-Off and Landing

Therefore, in order to overcome one or more of these drawbacks, quad-rotor unmanned helicopter in the presence of external dis-
many modifications to the classical sliding mode control have been turbances. The authors in [24] proposed the sliding mode control
suggested in the literature. technique combined with the backstepping control technique for
In [8] an adaptive sliding mode control is suggested for finite- a quadrotor unmanned aerial vehicle in order to achieve Cartesian
time stabilization of quad-rotor unmanned aerial vehicle in face of position trajectory tracking capability.
parametric uncertainties. A second order sliding mode control for From the literature survey, the main challenge with the sliding
the position and attitude tracking control of a small quadrotor UAV mode control is found in the tuning of its sliding surface param-
is suggested in [11]. In [12], an adaptive fuzzy gain-scheduling slid- eters. The sliding mode control can be investigated in two parts.
ing mode method is proposed for the attitude control of quadro- The reaching or hitting phase is the first part where the trajecto-
tors in the presence of parametric uncertainties and external dis- ries starting from a given initial condition and move toward the
turbances. A global fast dynamic terminal sliding mode control sliding surface. During this phase, the system response is sensitive
scheme is designed in [13] for the finite-time position and attitude to parameter variations and disturbances and cannot be controlled
tracking control of a small quadrotor UAV with external distur- directly. The second part is known as the sliding phase. During this
bances. In [14], a novel robust terminal sliding mode controller phase, the trajectories move only on the desired sliding surface
and a sliding mode controller are recommended for position and and are insensitive to parameter variations and noise. Therefore,
attitude tracking of the fully actuated and underactuated subsys- various methods have been introduced to shorten the duration or
tems of a small quadrotor unmanned aerial vehicle, respectively. even eliminate the reaching phase. In order to meet this goal and
In [15], a new control structure that employs the least squares improving the performance of the system with sliding mode con-
method to solve the over-determined problem of the control in- trol algorithms, time-varying switching surfaces instead of constant
put in the translational motion and the sliding mode controller is surfaces has been used in the literature [25]. In [26], a neural-
suggested to provide robust tracking and stabilization of a quad- network-based adaptive gain scheduling backstepping sliding mode
copter. The reference [16] presents a chattering free adaptive in- control approach is recommended for a class of uncertain strict-
tegral sliding mode controller for stabilizing a class of multi-input feedback nonlinear system. Chattering phenomenon as a common
multi-output systems under both matched and mismatched types problem in the SMC is reduced by employing a radial basis func-
of uncertainties. Stabilization of the vertical take-off and landing tion neural network in this reference. In [27], a new control struc-
aircraft system is considered to demonstrate the effectiveness of ture employing fuzzy adaptive sliding mode control is suggested
the proposed controller. In [17], a fault-tolerant neural network in- for trajectory tracking of an autonomous airship to provide robust
terval type-2 fuzzy sliding mode trajectory tracking controller is tracking in the presence of model uncertainties. In [28], a neural
proposed for each subsystem of the octorotor helicopter in the network approximation-based nonsingular terminal sliding mode
presence of actuator and sensor faults. The reference [18] presents controller is proposed for trajectory tracking of robotic airships. In
a control strategy based on interval fuzzy type-2 and sliding mode order to meet the lump uncertainties of the robotic airship, the
for attitude and position tracking problem of a coaxial trirotor in radical basic function neural network is employed. In [29], a novel
the presence of defects in the system. In [19], three second or- time specified nonsingular terminal sliding mode control scheme
der sliding mode control methods, i.e., the super twisting sliding is proposed for trajectory tracking of robotic airships. In order to
mode controller, the modified super twisting sliding mode con- guarantee the specified finite time stability, a nonsingular terminal
troller and the nonsingular terminal super twisting sliding mode sliding manifold is employed in this paper.
controller are employed for the altitude tracking of a quadrotor air- Neural networks, one of the most popular intelligent computa-
craft in a real-time application at outdoors environments. In [20], tion approaches, which have powerful capability of tackling nonlin-
the design of position and attitude tracing controllers based on the earity, fault tolerance, adaptation, generalization, and continuously
adaptive radical basis function neural networks and double-loop online learning [30], are good candidates for this purpose. Thus, an
integral sliding mode control for a quadrotor unmanned aerial ve- adaptive sliding surface based on neural networks, which has not
hicle is addressed in the presence of sustained disturbances and been investigated so far, will be studied.
parameter uncertainties. The authors in [21] developed a robust This paper studies the position and attitude control problem
chattering-free altitude controller based on a continuous sliding for a quadrotor UAV in the presence of parametric uncertainties
mode control for the efficient performance of a quadrotor aircraft and external disturbances and proposes an adaptive robust con-
system. The integral sliding mode controller based on backstepping troller based on the sliding mode control technique combined with
is proposed in [22] for the underactuated model of a quadrotor the neural network scheme. The designed controller is divided
subject to smooth bounded disturbances, including sideslip aero- into four sub-controllers: altitude controller, yaw angle controller,
dynamics and wind gust, as well as dissipative drag in orientation pitch angle controller, and roll angle controller. The sliding surface
and position dynamics. In [23] a novel robust terminal sliding coefficients in each of these controllers are adaptively tuned by
mode controller combined with an under-actuated system slid- the neural network method. The stability of closed loop system is
ing mode controller is used to control the attitude of a small proven by the Lyapunov theory. Simulation results are presented to
14 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

demonstrate the effectiveness of the offered technique compared It should be noted that the roll, pitch and yaw angles are limited
to the previous methods in different situations. The main contri- to (− π2 < φ < π2 ), (− π2 < θ < π2 ) and (−π < ψ < π ), respectively
butions of this paper are as follows: [11].
Also, control inputs u 1 , u 2 , u 3 and u 4 can be calculated by the
• A novel method is suggested for the position and attitude following equation [11]:
tracking control of a quadrotor UAV in the presence of para- ⎛ ⎞ ⎛ ⎞⎛ ⎞
metric uncertainties and external disturbance, which preserves u1 b b b b 21
the advantages of the sliding mode control method and the ⎜ u ⎟ ⎜ lb −lb 0⎟ ⎜ 2⎟
⎜ 2⎟ ⎜ 0 ⎟ ⎜ 2 ⎟
neural network adaptive scheme. ⎜ ⎟=⎜ ⎟⎜ ⎟ (7)
⎝ u3 ⎠ ⎝ 0 −lb 0 lb ⎠ ⎝ 23 ⎠
• Instead of using the general learning method, the specialized
learning method have been used to train the neural network. u4 −k k −k k 24
With this learning architecture, there is no longer a specific
where, k and b are two positive constant parameters whose values
training phase, and the neural network is trained online. The
depend on the number of blades, the lift and drag coefficients of
specialized learning architecture is “goal-directed” and back-
the blade, the radius of the propeller, the geometry, and the den-
propagation adaptively adjusts the sliding mode controller pa-
sity of air [11].
rameters at every sample so that the actual plant output ap-
proaches the desired output.
3. Problem statement
• An adaptive tuning sliding surface is considered for reducing
the duration of the reaching phase, ensuring less sensitivity to
Differential equations of the quadrotor can be introduced as the
parameter variations and disturbances.
• The time-varying switching surfaces with the hyperbolic tan- following compact affine nonlinear state space form:
gent function in definition is used in order to prevent the

ẋi = xi +1
occurrence of the chattering phenomenon in the control in- (8)
puts. ẋi +1 = f (x) + h(x)u j + d(x)
• Combining the neural networks with sliding mode controllers,
results in a better tracking performance compared to the re- where, x = [x1 , . . . , xi , xi +1 , . . . , x12 ] T = [x, ẋ, y , ẏ , z, ż, φ, φ̇, θ, θ̇, ψ,
sults presented in the references [11] and [13], in terms of ψ̇] T is the system state vector, u j is one of the control inputs
settling time, maximum overshoot, and steady state error.
{u 1 , u 2 , u 3 , u 4 }, and f (x) and h(x) = 0 are two smooth non-linear,
real and known functions of x.
This article consists of the following sections: The trajectory tracking control objective can be stated as fol-
In the second section, mathematical modeling of the quadrotor lows:
is presented. In the third section, problem statement is addressed. On the basis of xi , given a desired xid , determines piecewise
In the fourth section, the details of controller design are expressed. continuous control law u j for the quadrotor which is function of
The simulation and comparison results are provided in the fifth state variables only and achieves desirable tracking performance
section. In the sixth section, the conclusions are presented. in the presence of parametric uncertainties in f (x) and h(x) and
unknown time-varying disturbances d(x), with all state variables
2. Mathematical modeling stabilized.

The quadrotor UAV is a six degrees of freedom aircraft with Assumption 1. d(x), which represents the disturbances and the un-
four rotors arranged in a cross shape. The dynamic equations of certainties, will be ignored in controller design as not modeled
the quadrotor by definition of body-frame and earth-frame are as dynamic term.
follows [11,13]:
Assumption 2. The desired trajectory xid and the first and second
sin θ cos φ cos ψ + sin φ sin ψ k1 ẋ order derivatives of xid are bounded and measurable.
ẍ = u1 − (1)
ms ms
sin θ cos φ sin ψ + sin φ cos ψ k2 ẏ 4. Controller design
ÿ = u1 − (2)
ms ms
cos θ cos φ k3 ż The dynamic model of the quadrotor can be divided into the
z̈ = u1 − g − (3) following subsystems:
ms ms
I y − Iz Jr l k4 l • A fully-actuated subsystem.
φ̈ = θ̇ ψ̇ + θ̇ r + u2 − φ̇ (4)
Ix Ix Ix Ix • An under-actuated subsystem.
Iz − Ix Jr l k5l
θ̈ = φ̇ ψ̇ − φ̇ r + u3 − θ̇ (5) Altitude and yaw angle controllers will be designed for the
Iy Iy Iy Iy
fully-actuated subsystem as well as pitch and roll angles con-
Ix − I y c k6
ψ̈ = θ̇ φ̇ + u4 − ψ̇ (6) trollers for the under-actuated subsystem. Fig. 1 shows the block
Iz Iz Iz diagram of these controllers. In this research work, a novel adap-
For the quadrotor dynamic model given by (1)–(6), the following tive sliding mode controller based on neural networks is used for
assumptions are made [11]: the position and attitude control of the quadrotor, which is de-
scribed in details, in the following subsections.
• The angular velocity of the quadrotor in earth-frame and body-
frame are the same when the quadrotor is hovering in the air. 4.1. Altitude controller design
• The quadrotor structure is symmetric and rigid.
• The origin of the body-frame and the center of gravity is one. The altitude controller must be designed in a way that the state
• The axes of the body-frame are coincident to the quadrotor variable z can track the desired path zd . According to (8), the dy-
inertia axes. namic equation (3) can be rewritten as follows:
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 15

Fig. 1. The control block diagram.



ẋ5 = x6 Step 2. Define the reaching law as follows:
cos θ cos φ (9)
ẋ6 = [− g ] + [ ]u 1 + [− km3sż ]
ms ṡ z = −εz tanh s z (13)
cos θ cos φ
where, i = 5, j = 1, x5 = z, x6 = ż, f (x) = − g, h(x) = ms
, and where, εz is a designed positive number.
d(x) = − km3 ż . Altitude control algorithm structure of the quadrotor
s
Step 3. With the consideration of (12) and (13), the control law u 1
is shown in Fig. 2 which is described as the following steps:
is designed as follows:

Step 1. Select the sliding surface as follows: ms ms


u1 = [ w z (żd − ż) + z̈d + g ] + [εz tanh s z ]
cos θ cos φ cos θ cos φ



s z = w z ( zd − z) + (żd − ż) (10) u 1eq u 1dis

where, w z is a design positive constant. (14)


The differential of s z is:
The control law u 1 have two terms, namely the equivalent control
term u 1eq and discontinuous control term u 1dis .
ṡ z = w z (żd − ż) + (z̈d − z̈) (11)

Substituting (3) into (11) yields: Remark 2. In order to take the system towards the designed slid-
ing surface regardless of the sign of the states, and to eliminate the
cos θ cos φ chattering phenomenon caused by the switching control action,
s z = w z (żd − ż) + z̈d − u1 + g (12)
ms the hyperbolic tangent function is used to design the discontin-
uous control u 1dis .
Remark 1. It is clear that selecting a positive number for w z , pro-
vides the desired asymptotic behavior in steady state. Step 4. The stability of the closed-loop system is proven as follows:
16 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

propagation algorithm. The neural network is trained by the spe-


cialized learning architecture [31] to minimize the following per-
formance error E which is defined as a function of the difference
between the actual plant output and the desired output:

1
E= ( zd − z)2 (17)
2
Invoking the gradient descent method [32], we have the following
adaptation equations:

t
∂E
εz = εz,0 − ηz dt (18)
∂ εz
0

t
∂E
w z = w z,0 − ηz dt (19)
∂ wz
0

where, ηz is the learning rate which determines the convergence


speed of neural network, and εz,0 and w z,0 are the initial values
of εz and w z , respectively.
Using the chain rule, ∂∂εE and ∂∂wE are obtained as follows:
z z

∂E ∂ E ∂ z ∂ u 1dis ∂ z ms tanh s z
= = −( zd − z) (20)
∂ εz ∂ z ∂ u 1dis ∂ εz ∂ u 1dis cos θ cos φ
∂E ∂ E ∂ z ∂ u 1dis ∂ s z
=
∂ wz ∂ z ∂ u 1dis ∂ s z ∂ w z
∂z ms εz 4e−2s z
= −( zd − z) ( zd − z ) (21)
∂ u 1dis cos θ cos φ (1 + e−2s z )2
 
Assuming ∂ u∂ z = sign ∇ ∇ z
u 1dis
[33,34], we have:
1dis

t  ∇ z  m ( z − z) tanh s
s d z
εz = εz,0 + ηz sign dt (22)
∇ u 1dis cos θ cos φ
0
Fig. 2. The altitude controller block diagram. (For interpretation of the colors in the t  ∇ z  4m ε ( z − z)2 e−2s z
figure(s), the reader is referred to the web version of this article.) s z d
w z = w z,0 + ηz sign dt (23)
∇ u 1dis cos θ cos φ(1 + e−2s z )2
0
Theorem 1. For the nonlinear system (9), if the sliding surface s z is
selected as (10), and the control law u 1 is designed as (14), then the where, ∇ is called the ascending or backward differences operator,
close-loop system will be stable, and it can guarantee the state errors as ∇ f k = f k − f k−1 .
converge to zero.
Assumption 3. The parameters ηz , εz0 , and w z0 in (22) and (23)
Proof. Select the following positive Lyapunov function candidate: will be determined by the trial and error method.

1 4.2. Yaw angle controller design


V = s2z (15)
2
The yaw angle controller must be designed so that the state
Invoking (13), the time derivative of V is:
variable ψ can track the desirable path ψd . Invoking (6) and (8),
dynamical equations required for this subsystem can be rewritten
V̇ = ṡ z s z = −εz s z tanh s z ≤ −εz |s z | ≤ 0 (16)
as follows:
From (16), it is concluded that V̇ will always be negative and the 
u 1 designed as (14) ensures Lyapunov stability of the nonlinear ẋ11 = x12
(24)
system (9). Therefore, the Theorem 1 has been verified. 2 ẋ12 = [0] + [ Ic ]u 4 + [− kI 6 ψ̇]
z z

c
where, i = 11, j = 4, x11 = ψ , x12 = ψ̇ , f (x) = 0, h(x) = Iz
, and
Remark 3. There are two parameters which need to be designed
for sliding surface (10) and discontinuous control (14), w z and εz . d(x) = − kI 6z ψ̇ .
These parameters can be determined based on the requirements
for the steady-state tracking precision or the fastness of the sliding Remark 4. Due to the fact that the structure of the quadrotor and
mode system and the conversion speed of discontinuous control. its rotors are considered rigid and symmetric, so I x = I y .

Step 5. Neural network is deployed to adjust the coefficients w z Similar to the altitude control algorithm structure, the sliding
and εz with the adaptation law derived from the conventional back surface sψ and control input u 4 are designed as follows:
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 17

Fig. 3. The pitch angle controller block diagram.



sψ = w ψ (ψd − ψ) + (ψ̇d − ψ̇) (25) ẋ9 = x10
(29)
ẋ10 = [0] + [ Il ]u 3 + [φ̇ ψ̇ I z I− I x −
Jr k5 l
Iz Iz Iy
φ̇ r − Iy
θ̇ ]
u4 = [ w ψ (ψ̇d − ψ̇) + ψ̈d ] + [εψ tanh sψ ] y y
(26)
c
c
where, i = 9, j = 3, x9 = θ , x10 = θ̇ , f (x) = 0, h(x) = l
Iy
, and d(x) =
u 4eq u 4dis
I z −I x Jr k5 l
φ̇ ψ̇ Iy
− Iy
φ̇ r − Iy
θ̇ .
Likewise, the neural network is used to adjust the positive coeffi- The pitch angle control problem, which is illustrated in Fig. 3,
cients w ψ and εψ , and following results are obtained: is formulated as follows.

t  ∇ψ  I (ψ − ψ) tanh s
z d ψ Step 1. Choose the following sliding surface which is a linear com-
εψ = εψ,0 + ηψ sign dt (27) bination of position and velocity tracking errors of two state vari-
∇ u 4dis c
0 ables [x, θ]:
t  ∇ψ  4I ε (ψ − ψ)2 e−2sψ
z ψ d sθ = α1 (ẋd − ẋ) + α2 (xd − x) + (θ̇d − θ̇ ) + α3 (θd − θ) (30)
w ψ = w ψ,0 + ηψ sign dt (28)
∇ u 4dis c (1 + e−2sψ )2 where, α1 , α2 , and α2 are three design constants.
0
The derivative of s with respect to time can be obtained as fol-
The trial and error method will be used in ηψ , εψ,0 and w ψ,0 con- lows:
sideration.
ṡθ = α1 (ẍd − ẍ) + α2 (ẋd − ẋ) + (θ̈d − θ̈ ) + α3 (θ̇d − θ̇) (31)
4.3. Pitch angle controller design
Substituting (1) and (5) into (31) yields:
The objective of pitch angle controller design is to guaran-  sin θ cos φ cos ψ 
tee the state variables [x, θ] converge to the desired trajectories ṡθ = α1 ẍd − u1
ms
[xd , θd ].  
l
In accordance with (8), the dynamic equation (5) can be ex- + α2 (ẋd − ẋ)+ θ̈d − u 3 +α3 (θ̇d − θ̇) (32)
pressed as follows: Iy
18 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

Step 2. The desired asymptotic behavior in steady state of the Remark 6. There is four design parameters, w 1 , w 2 , w 3 and εθ
closed-loop system is investigated as follows [35]: which can be selected based on the requirements for the conver-
Setting sθ and ṡθ to zero, (30) and (31) is transformed to: sion speed of discontinuous control and the steady-state tracking
precision or the fastness of the sliding mode system.
α2 1 α3
ẋd − ẋ = − (xd − x) − (θ̇d − θ̇) − (θ − θ) (33)
α1 α1 α1 d Step 6. To adapt the coefficients w 1 , w 2 , w 3 and εθ , neural net-
θ̈d − θ̈ = −α1 (ẍd − ẍ) − α2 (ẋd − ẋ) − α3 (θ̇d − θ̇) (34) work is trained to minimize the following error E:
Assuming υ1 = θd − θ , υ2 = θ̇d − θ̇ and υ3 = xd − x and according 1
to (1); (33) and (34) can be rewritten as follows: E= (xd − x)2 (40)
2


⎪υ̇1 = υ2 The adaptation equations are as follows:


⎨υ̇2 = α1 [sin(θd −υ1 ) cos φ cos ψ+sin φ sin ψ]u 1 + α2 α3 υ1
ms α1 t
α22 (35) ∂E

⎪ + [ α2
− α ] υ + υ − α ẍ εθ = εθ,0 − ηθ dt (41)

⎪ α1 3 2 α1 3 1 d
∂ εθ
⎩υ̇ = − α3 υ − 1 υ − α2 υ
3 α1 1 α1 2 α1 3 0

Taking the first order Taylor series expansion around the equilib-
t
∂E
rium point [υ1 , υ2 , υ3 ] = [0, 0, 0], the linearized form of (35) can w 1 = w 1,0 − ηθ dt (42)
∂ w1
be written as: 0
⎛ ⎞ ⎛ ⎞⎛ ⎞ t
υ̇ 0 1 0 υ1 ∂E
1
⎝ υ̇2 ⎠ = ⎜ α22 ⎟ ⎝ w 2 = w 2,0 − ηθ dt (43)
α [cos θd cos φ cos ψ]u 1
⎝− 1 ms
α2
α1 − α3 α1 ⎠
υ2 ⎠ ∂ w2
0
υ̇3 − αα31 − α11 α2
− α1 υ3



t
υ̇ υ ∂E
A w 3 = w 3,0 − ηθ dt (44)
(36) ∂ w3
0
w 1 ms w 2 ms
Supposing α1 = [cos θ cos φ cos ψ]u 1 , α2 = [cos θd cos φ cos ψ]u 1 and α3 = where, ηθ is the learning rate, and εθ,0 , w 1,0 , w 2,0 and w 3,0 are
d
w 3 , the characteristic polynomial (36) can be obtained as follows: the initial values of εθ , w 1 , w 2 and w 3 , respectively and will be
considered by the trial and error method.
s3 + w 3 s2 + w 1 s + w 2 = 0 (37)
By applying the chain rule and assuming that ∂ u∂ x =
  3dis
In accordance with the Routh–Hurwitz theorem, it is easy to show sign ∇ ∇ x
u 3dis
[33], we can formulate (41)–(44) as follows:
that, all the roots of the polynomial (36) have negative real parts
precisely when all the coefficients w 1 , w 2 and w 3 are positive and t  ∇ x  I (x − x) tanh s
w2 < w1 w3. y d θ
εθ = εθ,0 + ηθ sign dt (45)
∇ u 3dis l
Remark 5. An autonomous system υ̇ = A υ , where υ (t ) ∈ R n and 0

A is an n × n matrix with real entries, has a constant solution


w 1 = w 1,0
υ (t ) = 0. This solution is asymptotically stable as t → ∞ if and t  ∇ x  4I m ε (x − x)(ẋ − ẋ)e−2sθ
y s θ d d
only if for all eigenvalues λ of A, Re (λ) < 0. Use of this result + ηθ sign dt
in practice, in order to determine the stability of the origin for a ∇ u 3dis l cos θd cos φ cos ψ(1 + e−2sθ )2 u 1
0
linear system, is simplified by the Routh-Hurwitz stability theo- (46)
rem. The eigenvalues of a matrix are the roots of its characteristic w 2 = w 2,0
polynomial. A polynomial in one variable with real coefficients is
t  ∇x 
called a Hurwitz polynomial if the real parts of all roots are strictly 4I y ms εθ (xd − x)2 e−2sθ
negative. The Routh-Hurwitz theorem points a characterization of + ηθ sign dt
∇ u 3dis l cos θd cos φ cos ψ(1 + e−2sθ )2 u 1
Hurwitz polynomials by means of an algorithm that eschews cal- 0
culation of the roots. (47)
t  ∇ x  4I ε (x − x)(θ − θ)e−2sθ
Step 3. Define the following reaching law with a designed positive y θ d d
w 3 = w 3,0 + ηθ sign dt
number εθ : ∇ u 3dis l(1 + e−2sθ )2
0
ṡθ = −εθ tanh sθ (38) (48)

Step 4. The control law u 3 is calculated as follows: 4.4. Roll angle controller design
  
Iy sin θ cos φ cos ψ+sin φ sin ψ
α1 ẍd − u1 Iy The roll angle controller must be designed so that the state
u3 =
l ms
 + [εθ tanh sθ ] variables [ y , φ] can track the desire variables [ yd , φd ]. We have the
+ α2 (ẋd − ẋ) + θ̈d + α3 (θ̇d − θ̇) l


u 3dis
following dynamical equations required for this subsystem:
u 3eq 
ẋ7 = x8
(39) I y −I z Jr k4 l (49)
ẋ8 = [0] + [ Il ]u 2 + [θ̇ ψ̇ Ix
+ Ix
θ̇ r − Ix
φ̇]
x
Step 5. Considering the positive Lyapunov function candidate V = l
1 2 where, i = 7, j = 2, x7 = φ , x8 = φ̇ , f (x) = 0, h(x) = , and d(x) =
s , the proof of the stability of the closed-loop system is similar
2 θ
Ix
I y −I z Jr k4 l
to Theorem 1. θ̇ ψ̇ Ix
+ Ix
θ̇ r − Ix
φ̇ .
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 19

Fig. 4. Position tracking results.

Fig. 5. Attitude tracking results.


20 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

Fig. 6. Control inputs.

Similar to the pitch angle control, we have the following sliding t  ∇y 


surface and control input sφ and u 2 : w 4 = w 4,0 − ηφ sign
∇ u 2dis
0
sφ = α4 ( ẏd − ẏ ) + α5 ( yd − y ) + (φ̇d − φ̇) + α6 (φd − φ) (50)
   4I x ms εφ ( yd − y )( ẏd − ẏ )e−2sφ
Ix
α4 ÿd − sin θ cos φ sinmψ− sin φ cos ψ
u1 Ix × dt (56)
u2 =
l s  + [εφ tanh sφ ] l[sin θ sin φd sin ψ + cos φd cos ψ](1 + e−2sφ )2 u 1
+ α5 ( ẏd − ẏ ) + φ̈d + α6 (φ̇d − φ̇) l


u 2dis t  ∇y 
u 2eq w 5 = w 5,0 − ηφ sign
(51) ∇ u 2dis
0
It is supposed that:
4I x ms εφ ( yd − y )2 e−2sφ
w 4ms × dt (57)
α4 = − (52) l[sin θ sin φd sin ψ + cos φd cos ψ](1 + e−2sφ )2 u 1
[sin θ sin φd sin ψ − cos φd cos ψ]u 1
w 5ms
α5 = − (53) t  ∇ y  4I ε ( y − y )(φ − φ)e−2sφ
[sin θ sin φd sin ψ − cos φd cos ψ]u 1 x φ d d
w 6 = w 6,0 + ηφ sign dt
α6 = w 6 (54) ∇ u 2dis l(1 + e−2sφ )2
0
Using Routh-Hurwitz criteria, the desired asymptotic behavior in
steady state of the linearized closed-loop system can be achieved (58)
when w 4 , w 5 and w 6 are positive and w 5 < w 4 w 6 .
The values of parameters ηφ , w 4,0 , w 5,0 and w 6,0 will be obtained
Similarly, the following results are obtained by using the neural
by the trial and error method.
network:
In the next section, the results of employing the proposed con-
t  ∇ y  I ( y − y ) tanh s troller in the position and attitude control of a quadrotor UAV in
x d φ
εφ = εφ,0 + ηφ sign dt (55) different situations are evaluated and compared with other meth-
∇ u 2dis l ods.
0
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 21

Fig. 7. Adjustable parameters for controllers u 1 and u 4 .

Table 1 Table 2
The numerical values of quadrotor UAV model parameters. The numerical values of controller parameters.

Parameter Value Unit Parameter Value Parameter Value


ms 1.1 [kg] ε z ,0 1 w z ,0 1
l 0.21 [m] εψ,0 1 w ψ,0 1
Ix 1.22 [Ns2 /rad] εθ,0 10 w 1,0 40
Iy 1.22 [Ns2 /rad] εφ,0 7.5 w 2,0 25
Iz 2.2 [Ns2 /rad] ηz 1 w 3,0 10
Jr 0.2 [Ns2 /rad] ηψ 0.1 w 4,0 40
ki (i = 1, 2, and 3) 0.1 [Ns/m] ηθ 1 w 5,0 25
ki (i = 4, 5, and 6) 0.12 [Ns/m] ηφ 1 w 6,0 10
g 9.81 [m/s2 ]
b 5 [N m2 ]
k 2 [N/ms2 ] 
c 1 –
0.6, if t ≤ 10 or t > 30;
xd = ;
0.3, otherwise.
5. Simulation results 
0.6, if t ≤ 50;
zd = ; θd = 0
In this section, the performance of the proposed controller is 0, otherwise.
evaluated in the presence of parametric uncertainties and distur-  (59)
bances by simulation in the MATLAB/Simulink software. The values 0.6, if t ≤ 20 or t > 40;
yd = ;
of the quadrotor UAV model and proposed controller parameters 0.3, otherwise.
are summarized in Tables 1 and 2, respectively. It is obvious that 
the results will change by taking into account other numerical val- 0.5, if t ≤ 60;
ψd = ; φd = 0
ues for these parameters. 0, otherwise.
The purpose of the controller design is to track the following
desired trajectory: Simulations are presented in the following subsections.
22 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

Fig. 8. Adjustable parameters for controller u 2 .

5.1. Desired trajectory tracking with parametric and unstructured sliding surfaces attenuate gradually and converge to the neighbor-
uncertainties hood of zero asymptotically.
Fig. 11 compares the performance of the proposed methods in
this paper and references [11] and [13] in tracking the desired tra-
In this subsection, the following assumptions have been made:
jectory in 3D space. It should be noted that the proposed method
in reference [13] has not been simulated; however, given the very
• The initial values of state variables are assumed to be zero.
similarity of the results presented in this reference with reference
• d(x) term, which is a not-modeled dynamic part, is neglected
[11], both references are pointed in Fig. 11. As shown in Fig. 11,
in the controller design in order to consider unstructured un-
the performance of our proposed controller is better than the pro-
certainty.
posed methods in the other two mentioned references. For better
• In the numerical values of I x , I y , I z , l, and c parameters, 25%
comparison of these methods, the numerical results of the maxi-
of uncertainty is considered.
mum overshoot, settling time and steady state error are compared
in Table 3. According to the numerical results of Table 3, in the fol-
Tracking the variables x, y and z are shown in Fig. 4 and that
lowing cases, the controller performance proposed in this paper is
of the variables θ , φ and ψ in Fig. 5. Although the selected de-
superior to the method presented in reference [11]:
sired trajectory has sudden changes, tracking has been done with
reasonable accuracy. As shown in Figs. 4 and 5, the percentage of
• It has 43.75% and 28.55% lower maximum overshoot in track-
maximum overshoot is very small in tracking variables x, y, z and
ing variables x and y, respectively.
ψ . However, in spite of considering parametric and unstructured
• It has 3.18%, 11.09%, 50.46% and 23.32% lower settling time in
uncertainties, the steady state error in tracking these variables is
tracking variables x, y, z and ψ , respectively.
equal to zero. Control inputs u 1 through u 4 are also shown in
Fig. 6. In none of the control signals there is undesired chatter-
5.2. Desired trajectory tracking with external disturbances
ing phenomenon. The adjustable parameters of the controllers u 1
and u 4 in Fig. 7 and the controllers u 2 and u 3 are shown in Figs. 8
and 9, respectively. Also, the time histories of sliding mode have In this subsection, in addition to the assumptions in the previ-
been shown in Fig. 10. From Fig. 10, it can be observed that all the ous subsection, the term 0.01 sin(0.01t ) is added as the external
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 23

Fig. 9. Adjustable parameters for controller u 3 .

Table 3
Quantitative comparisons of simulation results.

The proposed method in this article The method presented in the reference [11]
Maximum overshoot [%] x 5.2658 9.3612
y 6.8057 9.5251
z 3.2255 × 10−8 0.0109
ψ 0.0038 0.0101

Settling time [s] x 4.2947 4.4357


y 5.4823 6.1658
z 1.7629 3.5583
ψ 2.7284 3.5583

Steady state error x [m] 6.8834 × 10−14 1.9382 × 10−6


y [m] 1.1996 × 10−10 3.2554 × 10−6
z [m] 2.9662 × 10−5 1.9369 × 10−8
ψ [rad] 1.0738 × 10−16 2.0552 × 10−4

disturbance to the right of Eqs. (1)–(6). Also, 5% uncertainty in the Quantitative comparisons of trajectory tracking results are given
value of parameter ms is considered. in Table 4 and the proposed controller shows better performance
Fig. 12 compares the performance of the controllers proposed compared to the controller proposed in reference [11]. The results
in this paper and reference [11] in tracking variables x, y, z and ψ .
of this table are summarized below:
Also, the trajectory tracking results obtained from using the meth-
ods presented in this article and Reference [11] in 3D are shown
• Using the proposed method in this article instead of the con-
in Fig. 13. As shown in Figs. 12 and 13, the controller proposed in
reference [11] is not robust to the uncertainty of the ms parame- troller proposed in reference [11] causes 12.29, 5.51, 50.14 and
ter, and this uncertainty leads to a steady state error in tracking 30.89 percent less settling time to track variables x, y, z and
variable z. ψ , respectively.
24 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

Fig. 10. The sliding variables.

Fig. 11. Quarotor’s path.


H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 25

Fig. 12. Compare tracking results.

Table 4
Quantitative comparisons of simulation results.

The proposed method in this article The method presented in the reference [11]
Maximum overshoot [%] x 5.6833 10.2499
y 7.5133 9.5647
z 3.7433 0
ψ 0.0120 0.0515

Settling time [s] x 4.1946 4.7822


y 5.6648 5.9952
z 0.9826 1.9708
ψ 2.6486 3.8325

Steady state error x [m] 0.0034 0.0097


y [m] 0.0044 0.0052
z [m] 8.0761 × 10−5 0.1776
ψ [rad] 1.2532 × 10−4 0.0025

• In comparison with the method presented in reference [11], As a result, the proposed method in this paper trackes the de-
the use of the controller proposed in this paper for the track- sired trajectory with acceptable transient and steady state response
ing of the variables x and y, shows 44.55 and 21.45 percent characteristics, and provides robustness against parametric uncer-
decrease in maximum overshoot, respectively. tainties and external disturbances.
• When using the method proposed in this article, the variable
z is tracked with a settling time of 0.9826 s, a maximum over- 6. Conclusion
shoot of 3.7433% and without the steady state error, while
using the method presented in reference [11], this variable will In this paper, the position and attitude tracking of a quadrotor
be tracked with a settling time of 1.9708 s, a maximum over- UAV by using an adaptive sliding mode control was investigated. In
shoot of 0% and the steady state error of 0.1776 m. order to improve the proposed control method efficiency, a neural
26 H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27

Fig. 13. Quarotor’s path.

network was applied to adjust the sliding mode controller parame- [5] Z. Jia, J. Yu, Y. Mei, Y. Chen, Y. Shen, X. Ai, Integral backstepping sliding mode
ters, adaptively. A specialized learning architecture based on some control for quadrotor helicopter under external uncertain disturbances, Aerosp.
Sci. Technol. 68 (2017) 299–307.
approximation of the backpropagated error that allows adaptive
[6] Z. Xu, X. Nian, H. Wang, Y. Chen, Robust guaranteed cost tracking control of
control with a neural network was proposed. The performance of quadrotor UAV with uncertainties, ISA Trans. 69 (2017) 157–165.
the adaptive sliding mode control method in the tracking purposes [7] R. Pérez-Alcocer, J. Moreno-Valenzuela, R. Miranda-Colorado, A robust approach
of a quadrotor UAV in the presence of parametric uncertainties and for trajectory tracking control of a quadrotor with experimental validation, ISA
external disturbance was presented. Moreover, the results of the Trans. 65 (2016) 262–274.
position and attitude tracking by means of our proposed method [8] O. Mofid, S. Mobayen, Adaptive sliding mode control for finite-time stability of
quad-rotor UAVs with parametric uncertainties, ISA Trans. 72 (2018) 1–14.
and the methods proposed in references [11] and [13] were com-
[9] A. Zulu, S. John, A review of control algorithms for autonomous quadrotors,
pared. The proposed adaptive sliding mode control method has the Open J. Appl. Sci. 4 (2014) 547–556.
advantages of higher speed and accuracy, less sensitivity to param- [10] S.B.F. Asl, S.S. Moosapour, Adaptive backstepping fast terminal sliding mode
eter variations and disturbances, and the chattering avoidance in controller design for ducted fan engine of thrust-vectored aircraft, Aerosp. Sci.
the control inputs and the obtained results confirm the integrity of Technol. 71 (2017) 521–529.
[11] E.H. Zheng, J.J. Xiong, J.L. Luo, Second order sliding mode control for a quadro-
this approach.
tor UAV, ISA Trans. 53 (4) (2014) 1350–1356.
[12] Y. Yang, Y. Yan, Attitude regulation for unmanned quadrotors using adaptive
Declaration of Competing Interest fuzzy gain-scheduling sliding mode control, Aerosp. Sci. Technol. 54 (2016)
208–217.
None declared under financial, general, and institutional com- [13] J.J. Xiong, G.B. Zhang, Global fast dynamic terminal sliding mode control for a
quadrotor UAV, ISA Trans. 66 (2017) 233–240.
peting interests.
[14] J.J. Xiong, E.H. Zheng, Position and attitude tracking control for a quadrotor
UAV, ISA Trans. 53 (3) (2014) 725–731.
Acknowledgements [15] B. Sumantri, N. Uchiyama, S. Sano, Least square based sliding mode control for
a quad-rotor helicopter and energy saving by chattering reduction, Mech. Syst.
The authors are thankful to authorities of East Tehran Branch, Signal Process. 66 (2016) 769–784.
[16] S. Mondal, C. Mahanta, Chattering free adaptive multivariable sliding mode
Islamic Azad University, Tehran, Iran, for providing support and
controller for systems with matched and mismatched uncertainty, ISA Trans.
necessary facilities. 52 (3) (2013) 335–341.
[17] S. Zeghlache, D. Saigaa, K. Kara, Fault tolerant control based on neural network
References interval type-2 fuzzy sliding mode controller for octorotor UAV, Front. Comput.
Sci. 10 (4) (2016) 657–672.
[1] B. Tian, L. Liu, H. Lu, Z. Zuo, Q. Zong, Y. Zhang, Multivariable finite time atti- [18] S. Zeghlache, K. Kara, D. Saigaa, Fault tolerant control based on interval type-2
tude control for quadrotor UAV: theory and experimentation, IEEE Trans. Ind. fuzzy sliding mode controller for coaxial trirotor aircraft, ISA Trans. 59 (2015)
Electron. 65 (3) (2018) 2567–2577. 215–231.
[2] H. Du, W. Zhu, G. Wen, D. Wu, Finite-time formation control for a group of [19] F. Muñoz, I. González-Hernández, S. Salazar, E.S. Espinoza, R. Lozano, Second or-
quadrotor aircraft, Aerosp. Sci. Technol. 69 (2017) 609–616. der sliding mode controllers for altitude control of a quadrotor UAS: real-time
[3] X. Liang, Y. Fang, N. Sun, H. Lin, Nonlinear hierarchical control for unmanned implementation in outdoor environments, Neurocomputing 233 (2017) 61–71.
quadrotor transportation systems, IEEE Trans. Ind. Electron. 65 (4) (2018) [20] S. Li, Y. Wang, J. Tan, Y. Zheng, Adaptive RBFNNs/integral sliding mode control
3395–3405. for a quadrotor aircraft, Neurocomputing 216 (2016) 126–134.
[4] Y.C. Choi, H.S. Ahn, Nonlinear control of quadrotor for point tracking: actual [21] I. González, S. Salazar, R. Lozano, Chattering-free sliding mode altitude control
implementation and experimental tests, IEEE/ASME Trans. Mechatron. 20 (3) for a quad-rotor aircraft: real-time application, J. Intell. Robot. Syst. 73 (1–4)
(2015) 1179–1192. (2014) 137–155.
H. Razmi, S. Afshinfar / Aerospace Science and Technology 91 (2019) 12–27 27

[22] H. Ramirez-Rodriguez, V. Parra-Vega, A. Sanchez-Orta, O. Garcia-Salazar, Robust [29] Y. Yang, A time-specified nonsingular terminal sliding mode control ap-
backstepping control based on integral sliding modes for tracking of quadro- proach for trajectory tracking of robotic airships, Nonlinear Dyn. 92 (3) (2018)
tors, J. Intell. Robot. Syst. 73 (1–4) (2014) 51–66. 1359–1367.
[23] E. Zheng, J. Xiong, Quad-rotor unmanned helicopter control via novel robust [30] H. Razmi, A.M. Kashtiban, Nonlinear PID-based analog neural network control
terminal sliding mode controller and under-actuated system sliding mode con- for a two link rigid robot manipulator and determining the maximum load
troller, Optik, Int. J. Light Electron Opt. 125 (12) (2014) 2817–2825. carrying capacity, Int. J. Soft Comput. Eng. 2 (1) (2012) 228–234.
[24] F. Chen, R. Jiang, K. Zhang, B. Jiang, G. Tao, Robust backstepping sliding-mode [31] M. Khalid, S. Omatu, A neural network controller for a temperature control
control and observer-based fault estimation for a quadrotor UAV, IEEE Trans. system, IEEE Control Syst. 12 (3) (1992) 58–64.
Ind. Electron. 63 (8) (2016) 5044–5056. [32] J. Ye, Adaptive control of nonlinear PID-based analog neural networks for a
[25] S. Tokat, I. Eksin, M. Güzelkaya, New approaches for on-line tuning of the linear nonholonomic mobile robot, Neurocomputing 71 (7–9) (2008) 1561–1565.
sliding surface slope in sliding mode controllers, Turk. J. Electr. Eng. Comput. [33] M. Saerens, A. Soquet, Neural controller based on back-propagation algo-
Sci. 11 (1) (2003) 45–60. rithm, in: IEE Proceedings F (Radar and Signal Processing), vol. 138, IET, 1991,
[26] Y. Yueneng, Y. Ye, Backstepping sliding mode control for uncertain strict- pp. 55–62.
feedback nonlinear systems using neural-network-based adaptive gain schedul- [34] H. Razmi, Adaptive neural network based sliding mode altitude control for a
ing, J. Syst. Eng. Electron. 29 (3) (2018) 580–586. quadrotor UAV, J. Cent. South Univ. 25 (11) (2018) 2654–2663.
[27] Y.n. Yang, J. Wu, W. Zheng, Trajectory tracking for an autonomous airship us- [35] N. Chatrenour, H. Razmi, H. Doagou-Mojarrad, Improved double integral sliding
ing fuzzy adaptive sliding mode control, J. Zhejiang Univ. Sci. C 13 (7) (2012) mode MPPT controller based parameter estimation for a stand-alone photo-
534–543. voltaic system, Energy Convers. Manag. 139 (2017) 97–109.
[28] Y. Yang, Y. Yan, Neural network approximation-based nonsingular terminal slid-
ing mode control for trajectory tracking of robotic airships, Aerosp. Sci. Technol.
54 (2016) 192–197.

You might also like