Optimal Stabilization of A Quadrotor UAV by a Constrained Fuzzy Control and PSO

This work aims to design an optimal fuzzy PD (FPD) control for the attitude and altitude stabilization of a quadrotor. The control design is done by mean of the particle swarm optimization (PSO) under the constraints of the controller interpretability and the saturation of the actuators. Concretely, a decentralized control structure is adopted where four FPD controllers are used to stabilize the quadrotor angles (roll, pitch and yaw) and height. A PSO-based algorithm is used to simultaneously tune the four constrained controllers regarding a cost function quantifying the whole system performances. The simulation results are presented to show the efficiency of the proposed approach.


Introduction
In the recent last years, the quadrotor unmanned aerial vehicles (UAVs) are become very familiar. This Famousness is due to their success trough many applications in various domains. The raisons behind this attraction by quadrotors return largely to their simple and useful configuration with six DOF. The movement of the system is controlled via the relative speeds of four rotors.
The quadrotor stabilization is primordial for a safe and reliable tasks achievement. Therefore, many control techniques have been applied to this end [1][2][3][4][5][6]. Among them, the classical PID control has been largely used despite its poor performances when it is badly tuned and/or used with nonlinear systems. Fuzzy PID control [7] is presented in literature as an alternative to address the difficulties with classical PID control. It combines the advantages these controllers namely the simplicity, the interpretability of the control structure and more they can deal with non linear systems.
Last years, the population-based optimization methods have been gained a special interest to solve the fuzzy controllers design problem; Genetic Algorithm (GA) [8], Particle swarm optimization(PSO) [9], Ant Colony Optimization (ACO) [10], Bees Algorithm [11], and Gravitational Search Algorithm (GSA) [12]. Among these methods, PSO is distinguished by the simplicity and the efficiency of the algorithm trough a continuous search space.
In this paper, one suggests to apply the PSO for the fuzzy control optimal design for attitude and altitude stabilization of a quadrotor, under the system inputs saturation physical constraint and the maintain of the logical interpretability in the optimal controllers' structures.
The remainder of this paper is organized as follows. Section II gives a general description and presents a dynamical model of a quadrotor. Section III gives an overview the PSO and presents the FPD controller design method using PSO. In section IV, first the FPD decentralized control structure for the stabilization of the quadrotor is presented then PSO design method is used and simulation results are presented. Section V concludes the paper.

The quadrotor model
The quadrotor helicopter is a small UAV with four propellers actuated by DC motors mounted on the end of two perpendicular arms. A basic diagram is shown in Fig. 1. Each rotors pair of the same arm rotates in the same direction; one pair rotates clockwise, while the other rotates counter clockwise. The quadrotor moves by adjusting the angular velocity of each rotor. The quadrotor dynamical model is given by [1]: ‫ݔ‬ ଵ = ߮ and ‫ݔ‬ ଶ = ߮̇ are respectively the roll angle and corresponding angular velocity; ‫ݔ‬ ଷ = ߠ and ‫ݔ‬ ସ = ߠ̇ are respectively the pitch angle and corresponding angular velocity; ‫ݔ‬ ହ = ߰ and ‫ݔ‬ = ߰̇ are respectively the yaw angle and corresponding angular velocity; ‫ݔ‬ = ܺ, ‫ݔ‬ ଽ = ܻ, and ‫ݔ‬ ଵଵ = ܼ are the Cartesian position coordinates. ‫ݔ‬ ଼ = ܺ̇, ‫ݔ‬ ଵ = ܻ̇, and ‫ݔ‬ ଵଶ = ܼ̇are translation velocities. The values of the parameters in the state space model are given by Table1.

The fuzzy PD control
The fuzzy proportional derivative (FPD) control law is given by . Where f is the function of the fuzzy inference system, ‫ݑ‬ ி is the control signal, ‫ݕ‬ is the reference signal and ‫ݕ‬ is the system's controlled output. According to the typical structural design of FPD controllers in [13], one uses FPD controllers with 3 membership functions for input variables and 5 singletons for the output variable as shown on Fig. 2. The rule base of the controllers is donated by Table 2. The crisp control action is determined by the average sum (2). ( Where ‫ܥ‬ is the conclusion of rule ݅ and ܸ is its truth value calculated by the algebraic product method given by: ܸ = ߤ ൫݁(‫)ݐ‬൯. ߤ ∆ (∆݁). ߤ ௬ ‫)ݕ(‬ is the membership grade of the input variable ‫ݕ‬ evaluated in rule ݅ by the corresponding membership function.
The labels NB, NS, ZR, PS, and PB refer respectively to the linguistic terms; Negative Big, Negative Small, around Zero, Positive Small and Positive Big. Note here that, if one considers the typical structure design of the FPD controller with The input membership functions and the output singletons are evenly distributed on their corresponding universes of discourse, i.e., The universes of discourse are large enough such that all possible inputs are always within their limits. Then, the crisp control signal calculated by (2) is given by [13]: Equation (6) shows clearly that the typical FPD controllers are identical to the classical PD controllers with the following proportional and integral gains: A nonlinear FPD controller can be reached by moving the input membership functions and/or the output singletons from their modal positions. That is, the FPD controllers combine the advantages of classical PD controllers and fuzzy controllers; the simplicity, the structure interpretability, and the nonlinearity.
4 Quadrotor optimal stabilization using PSO design-based fuzzy control

Particle swarm optimization
Particle swarm optimization (PSO), initially introduce by Kennedy and Eberhart [14], is a heuristic optimization method inspired by the movement of individuals within a swarm. PSO technique conducts search in parallel using a population of particles, corresponding to individuals. Each particle represents a candidate solution to the problem at hand. In the PSO system, a particle makes use of the best position encountered by itself and that of its neighbors to steer toward an optimal solution. The performance of each particle is measured using a predefined fitness function, which quantifies the performance of the optimization problem.
The mathematical expressions for velocity and position updates are given by Where: 1 ≤ ݅ ≤ ܰ, 1 ≤ ݆ ≤ ‫,ܦ‬ 1 ≤ ݇ ≤ ‫.ܭ‬ ܰ is the number of particles in the swarm, ‫ܦ‬ is the dimension of particle, and ‫ܭ‬ is the maximum iterations. ‫ݔ‬ is the position of particle ݅ in the dimension ݆ at iteration ݇, ‫ݒ‬ is the velocity of particle ݅ in the dimension ݆ at iteration ݇, ‫ݐݏܾ݁‬ is a personal best of particle ݅ in the dimension ݆, ‫ݐݏܾ݁݃‬ is a global best of all particles in the dimension ݆. ‫ݓ‬ is the inertia weight factor, ܿ ଵ and ܿ ଶ are the acceleration constants, ‫ݎ‬ ଵ and ‫ݎ‬ ଶ are random numbers in interval [0, 1].

The control structure
The control goal is to stabilize angles and height of the quadrotor. That is, one uses four decentralized FPD controllers as presented by the bloc diagram on the Fig. 3. The controllers FPD ୧ (i = 1,2,3) have the same structure of section 3, however, the FPD ସ is modified as: u ସ (t) = mg + u ୈ (t)

The parameters' design vector
The design parameters' vector is constructed by the positions of the input membership functions and the positions of the output singletons of the four FPD controllers. However, one takes symmetrical fuzzy controllers with respect to zero, i.e.,‫ܧ‬ = ‫ܧ−‬ ே = ‫ܧ‬ , ‫ܦ‬ = ‫ܦ−‬ ே = ‫ܦ‬ , ܷ ௌ = −ܷ ே = ܷ ଵ and ܷ = −ܷ ே = ܷ ଶ where the index ݅ refer to controller FPD ୧ . In addition, because of the quadrotor body symmetry, one takes identical controllers for the roll and pitch angles (i.e. FPD ଵ = FPD ଶ ). That is, the parameters' vector is then

The cost function
The effectiveness of the FPD control scheme is evaluated at the end of the whole control system response to desired inputs by a unique cost function evaluating simultaneously the four system responses. Therefore, in order to overcame the non homogeneity of the outputs, in the cost function instead of using the errors signals directly, one uses the relative errors defined as : and . Without loss of generality, one considers in this work the integral sum of relative errors (ISRE) cost function given by

The optimization problem constraints
In this work one consider two types of constraints.
The control structure interpretability One has to preserve the semantic interpretability of the fuzzy rule bases of the controllers such that all parameters values correspond concretely to their linguistic terms (e.g.: a minus signed value correspond to the term 'Negative', a positive signed value correspond to the term 'Positive ', a 'Small' value is less than a 'Medium' value which is itself less than a 'Big' value,…).

The system input constraints
In practice, the system inputs are subject to physical constraints often caused by the actuators limitations. That can degrade the closed system performance and may leads to the instability, if one does not take care of the problem in the control design. In this work, one considers the actuators' amplitudes saturation such as a control inputs ‫ݑ‬ do not come over certain bounds, i.e. ‫ݑ‬ ≤ ‫ݑ‬ ≤ ‫ݑ‬ ௫ .
In this work one takes:

The algorithm
In the algorithm of the FPD control design using PSO, a particle is one value of the FPD controllers' parameters vector. A particle swarm is a group of parameters vector values which are manually or randomly initialized in search space defined by limits of the components of the tuning parameters vector. So, a particle position ‫ݔ‬ is the controllers' parameter vector value, ‫ݐݏܾ݁ܲ‬ is the best parameters values vector regarding the cost function, ‫ݐݏܾ݁ܩ‬ is the global best parameters values vector of all particles. The algorithm steps are summarized in table 3.

Simulations
In the simulations, one takes: The initial states: ߮(0) = 0. The Fig. 4 shows the evolution of the cost function with iterations. Table 4 gives the optimal parameters' values. Fig. 5 show the angles (roll, pitch and yaw), Fig. 6 show the control signals ‫ݑ‬ ଵ , ‫ݑ‬ ଶ and ‫ݑ‬ ଷ . Fig 7 show the height and Fig. 8 show the control signal ‫ݑ‬ ସ .  (4) and (5) respectively. End k←k+1 End The optimal parameters' vector is Gbest. End

Conclusion
In this paper, one has proposed a PSO-based method to FPD control design for the stabilization of a quadrotor under the actuators saturation and interpretability of the FPD control. Four FPD controllers are used in a decentralized control structure to stabilize the quadrotor attitude and height. The constrained PSO method is used to tune the FPD controllers' parameters simultaneously in order to minimize an integral square error cost function which quantity the whole system performance.
The simulation results show the efficiency of the proposed method.