Professional Documents
Culture Documents
5, 526-535 (2020)
ASTESJ
www.astesj.com
ISSN: 2415-6698
Special Issue on Innovative Research in Applied Science, Engineering and Technology
Multi Closed-loop Adaptive Neuro-Fuzzy Inference System for Quadrotor Position Control
Halima Housny1, El Ayachi Chater*,2, Hassan El Fadil1
1
Electrical Engineering, National School of Applied Sciences, Ibn Tofail University, Kénitra 14000, Morocco
2
Electrical Engineering, Higher School of Technology, Mohammed V University, Salé 11060, Morocco
𝑭𝑏 ≔ [0 0 𝑇 ]𝑇 (5)
𝑭𝑒 ∶= 𝑹(𝜂)𝑭𝑏 (6)
𝑚𝝃̈ = 𝑭𝑒 − 𝑾𝑔 (7)
where m denotes the aerial vehicle total mass, and 𝑾𝑔 denotes the
quadrotor weight vector, which is given by:
𝑾𝑔 ≔ [0 0 𝑚𝑔]T (8)
Now, let us notice that the well-known rotation matrix from 𝑼𝜂 ≔ [𝜏𝜑 𝜏𝜃 𝜏𝜓 ]𝑇 , (9)
𝓕𝐵 -frame to 𝓕𝐸 -frame is given by [27]:
with
𝑐𝜃 𝑐𝜓 𝑠𝜑 𝑠𝜃 𝑐𝜓 − 𝑐𝜑 𝑠𝜓 𝑐𝜑 𝑠𝜃 𝑐𝜓 + 𝑠𝜑 𝑠𝜓
𝑹(𝜂) = [𝑐𝜃 𝑠𝜓 𝑠𝜑 𝑠𝜃 𝑠𝜓 + 𝑐𝜑 𝑐𝜓 𝑐𝜑 𝑠𝜃 𝑠𝜓 − 𝑠𝜑 𝑐𝜓 ] (1) 𝜏𝜑 𝑘𝑙(−𝜔2 2 + 𝜔4 2 )
−𝑠𝜃 𝑠𝜑 𝑐𝜃 𝑐𝜑 𝑐𝜃 [ 𝜏𝜃 ] ∶= [ 𝑘𝑙(−𝜔1 2 + 𝜔3 2 ) ] (10)
𝜏𝜓 2 2 2
𝑑( −𝜔1 + 𝜔2 − 𝜔3 + 𝜔4 )2
with 𝑐𝛼 : = 𝑐𝑜𝑠(𝛼) , 𝑠𝛼 ≔ 𝑠𝑖𝑛(𝛼). This means that
where 𝑙 denotes the distance between each rotor and the quadrotor
𝝃̇ = 𝑹(𝜂)𝑽𝒃 (2) center of mass. (𝑑 > 0) denotes the drag constant.
Thus, using Newton formalism for rotational motions, the
where 𝝃̇ ≔ [𝑣𝑥 𝑣𝑦 𝑣𝑧 ]𝑇 and 𝑽𝑏 ≔ [𝑢 𝑣 𝑤]𝑇 denote
aerial vehicle rotation dynamics are described by:
respectively the earth-fixed and body-fixed vehicle linear
velocities.
𝑱𝜴̇𝑏 = 𝑼𝜂 − 𝜴𝑏 x 𝑱𝜴𝑏 (11)
Now, concerning angular velocities, the transformation matrix
from the 𝓕𝐸 -frame to the 𝓕𝐵 -frame is denoted the transfer matrix where 𝑱 ≔ 𝑑𝑖𝑎𝑔(𝑗𝑥 , 𝑗𝑦 , 𝑗𝑧 ) denotes the inertia matrix, and 𝛀𝑏
and is given by [27] denotes the above body-fixed angular velocity defined in (4).
1 0 −𝑠𝜃 Then, let us notice that, using the following vectors:
𝑻(𝜂) = [0 𝑐𝜑 𝑠𝜑 𝑐𝜃 ] (3)
0 −𝑠𝜑 𝑐𝜑 𝑐𝜃 𝑼 ∶= [𝑇 𝜏𝜑 𝜏𝜃 𝜏𝜓 ]𝑇
{ (12)
𝛀𝑠 ∶= [𝜔1 2 𝜔2 2 𝜔3 2 𝜔4 2 ]𝑇
Then, it follows that
and considering the following actuation matrix:
𝜴𝑏 = 𝑻(𝜂)𝜼̇ (4)
𝑘 𝑘 𝑘 𝑘
where 𝜼̇ ≔ [𝜑̇ 𝜃̇ 𝜓 denotes the Euler angles rates, and
̇ ]𝑇 𝐌𝑎 ∶= [ 0 −𝑘𝑙 0 𝑘𝑙 ] (13)
−𝑘𝑙 0 𝑘𝑙 0
𝛀𝑏 ≔ [𝑝 𝑞 𝑟]𝑇 denotes the body-fixed angular velocity.
−𝑑 𝑑 −𝑑 𝑑
2.2. Quadrotor dynamic model
www.astesj.com 528
H. Housny et al. / Advances in Science, Technology and Engineering Systems Journal Vol. 5, No. 5, 526-535 (2020)
it results that the control distribution from the actuating motors enumerates the main steps of the code to implement using a
may be described by: simulation tool (e.g. Matlab). For clarity, the methodology of the
PSO-based ANFIS+I control design may be summarised using
𝑈 = M𝑎 Ω𝑠 (14) algorithm 1.
Algorithm 1: PSO-based ANFIS+I control algorithm
Ultimately, according to (4), (7), and (11), the quadrotor
dynamics can be summarized as follows: Collect training data
Generate ANFIS controller
𝑥̇ = 𝑣𝑥 ANFIS Enhancement with integral control
𝑦̇ = 𝑣𝑦 ANFIS+I scaling factors optimization using PSO
𝑧̇ = 𝑣𝑧 3.3. ANFIS architecture
𝑇
𝑣̇𝑥 = ( 𝑐𝜑 𝑠𝜃 𝑐𝜓 + 𝑠𝜑 𝑠𝜓 )
𝑚 The adaptive neuro-fuzzy inference system (ANFIS) algorithm
𝑇
𝑣̇𝑦 = ( 𝑐𝜑 𝑠𝜃 𝑠𝜓 − 𝑠𝜑 𝑐𝜓 ) was firstly introduced by Jang in 1993 [28], which was considered
𝑚
𝑇 as an intelligent hybrid algorithm based on the benefits of both
𝑣̇𝑧 = (𝑐𝜑 𝑐𝜃 ) −𝑔 fuzzy logic control (FLC) and artificial neural network (ANN)
𝑚
𝜑̇ = 𝑝 + 𝑞 𝑠𝜑 𝑡𝜃 + 𝑟 𝑐𝜑 𝑡𝜃 (15) approaches. The idea started from the fact that to design a suitable
𝜃̇ = 𝑞𝑐𝜑 − 𝑟𝑠𝜑 FLC for the considered plant, we need a minimum of knowledge
𝑠 𝑐 upon the system functioning, which allows us to define the fuzzy
𝜓̇ = 𝑞 𝜑 + 𝑟 𝜑 rules of the controller. Then, we should define the membership
𝑐𝜃 𝑐𝜃
𝜏𝜑 𝑗𝑦 −𝑗𝑧 function type and degree. For this reason, the design of this control
𝑝̇ = + 𝑞𝑟 is considered a complicated task despite the wide use of the FLC
𝑗𝑥 𝑗𝑥
𝜏𝜃 𝑗𝑧 −𝑗𝑥 system in control engineering [29]. Thus, to compensate for the
𝑞̇ = + 𝑝𝑟
𝑗𝑦 𝑗𝑦 disadvantages of the FLC system, the artificial neural network
𝜏𝜓 𝑗𝑥 −𝑗𝑦 (ANN) is also used. Roughly, the ANN algorithm may be utilized
{ 𝑟̇ = 𝑗𝑧
+
𝑗𝑧
𝑝𝑞
during the learning process, which can approximate an unknown
function from the system inputs and outputs data set, using a
Now, considering the above quadrotor dynamics, and using multitude of neurons in a similar way of a human-being brain.
enhanced fuzzy control strategies, our objective is guaranteeing the
tracking-control of arbitrary 𝜉𝑑𝑒𝑠 position for any 𝜓𝑑𝑒𝑠 -yaw Indeed, through five layers of the ANN algorithm, the system
orientation, and ensuring the stabilization of (𝜑, 𝜃) attitude angles, output 𝑦 is computed from (𝑥1 , 𝑥2 ) inputs using several inference
in presence of unknown aerial vehicle payload mass parameter. system parameters such as the fuzzy rules number and the
membership function type and degree. For clarity, Figure 2 shows
3. Multi Closed-loop PSO-based ANFIS plus Integral the ANFIS architecture model.
Controller
3.1. Problem statement
From the above objective, let us design the system inputs,
namely the vector 𝑼 ∶= [𝑇 𝜏𝜑 𝜏𝜃 𝜏𝜓 ]𝑇 , which allows
ensuring the tracking of (𝑥des , 𝑦des , 𝑧des )-reference trajectory for
arbitrary 𝜓𝑑𝑒𝑠 -yaw orientation, and the stabilization of (𝜑, 𝜃)
quadrotor attitude, despite random payload mass change during the
vehicle flight, which also means a change of the matrix inertia.
More concisely, we aim to stabilize the quadrotor system while
tracking a position reference trajectory with the constraint to keep Figure 2: ANFIS architecture with two membership function
small overshoot and small rise and settling times, despite the
presence of external disturbances. Then, it is worth noticing that Now, the learning process of the ANFIS algorithm may be
because of quadrotor under-actuation, the control system structure described as follows:
may be designed using two control subsystems. Namely, an
First, in the fuzzification layer, the output of each node is
upstream control subsystem whose role is to ensure the reference
computed from the following equation:
trajectory tracking, and a downstream control subsystem whose
role is stabilizing the vehicle attitude.
𝑂𝑖1 = 𝜇𝐴𝑖 (𝑥1 )
3.2. PSO-based ANFIS plus integral algorithm { (16)
𝑂𝑖1 = 𝜇𝐵𝑖 (𝑥2 )
Now, we briefly describe the proposed PSO-based adaptive
neuro-fuzzy inference system plus integral (ANFIS+I) control where (𝑥1 , 𝑥2 ) are the inputs, (𝐴𝑖 , 𝐵𝑖 ) are the node linguistic label,
strategy that is based on a Multi-Closed-loop ANFIS controller, where 𝑖 varies from 1 to the membership function number.
where the additional control scaling gains are optimized using a Then, to compute the output node of the second layer, we use
multidimensional PSO algorithm. For clarity, algorithm 1 the product of each input entering into the node as follows:
www.astesj.com 529
H. Housny et al. / Advances in Science, Technology and Engineering Systems Journal Vol. 5, No. 5, 526-535 (2020)
𝑂𝑗2 = 𝑤𝑗
{ (17)
𝑤𝑗 = 𝜇𝐴𝑖 (𝑥1 ) ∗ 𝜇𝐵𝑖 (𝑥2 )
𝑂𝑗3 = 𝑤
̅𝑗
{ 𝑤𝑗 (18)
𝑤
̅𝑗 = ∑9
𝑗=1 𝑤𝑗
www.astesj.com 530
H. Housny et al. / Advances in Science, Technology and Engineering Systems Journal Vol. 5, No. 5, 526-535 (2020)
Table 2: ANFIS algorithm parameters 𝑐2 denote the cognitive and social constants, respectively. 𝑟1 and
𝑟2 are arbitrary scalars in the interval [0,1]. 𝑤 is the inertia weight
Training epoch Training error Optimization that is used to balance the effect of the previous velocity to the
number 𝑛𝑒𝑝 goal 𝐸𝑡𝑟𝑎𝑖𝑛 method actual value. Thus, at each specific time t, for each particle 𝑖 in
Last-squares and each dimension 𝑗, several parameters are to consider: the velocity
20 0 back-propagation 𝜈𝑖𝑗𝑡 , the position 𝜒𝑖𝑗
𝑡 𝑡
, the local best fitness 𝜒1,𝑖𝑗 , and the global best
gradient descent 𝑡
fitness 𝜒2,𝑖𝑗 . Then, to design the four PSO-based ANFIS+I
controller, a code was developed using Matlab Environment. The
main steps of this code are presented in Algorithm 2.
Algorithm 2: Multidimensional PSO algorithm steps
Result: Optimum parameters
Set the search space, the particles number n, the number
of iteration niter;
Repeat:
Generate a random population
Evaluate the objective function
Evaluate the local and global best fitness
Compute the velocity and position of particles
according to equation (22)
Until the maximum number of iterations (niter) is reached
PSO-based
PID ANFIS ANFIS+I
ANFIS+I
𝑀𝑝 (%) 5.17 5.05 5.47 4.08
𝑇𝑟 (𝑠) 2.9 3.006 3.02 2.4
𝑥
𝑇𝑠 (𝑠) 26.5 26.7 26.5 15.24
𝐼𝑇𝐴𝐸 1.003 0.99 1.01 0.15
𝑀𝑝 (%) 5.17 5.04 5.47 4.08
𝑇𝑟 (𝑠) 2.9 3.006 3.02 2.4
𝑦
𝑇𝑠 (𝑠) 26.5 26.79 26.5 15.24
𝐼𝑇𝐴𝐸 1.49 1.49 1.5 0.24
𝑀𝑝 (%) 6.95 4.04 7.008 0.61
𝑇𝑟 (𝑠) 1.68 1.75 1.68 1.8
𝑧
𝑇𝑠 (𝑠) 8.23 8.11 8.24 6.05
𝐼𝑇𝐴𝐸 0.47 0.35 0.47 0.10 Figure 10: 𝜃-state tracking control response
www.astesj.com 535