Abstract
In this article, the particle swarm optimization algorithm is presented using an improved stochastic variant strategy to optimize the gains of the fuzzy proportional–integral–derivative controller. The particle swarm optimization algorithm aims to renew the elite parameters for the schemes of fuzzy proportional–integral–derivative controls. The integral of time multiplied by absolute error criterion is used to estimate the system performance due to saving the setting and operation time. Facing nonlinear quadrotor attitude control models, the results demonstrate the proposed scheme with better performance.
Keywords
Introduction
Particle swarm optimization (PSO), based on stochastic and population-based adaptive optimization and swarm intelligence technique, was presented by Kennedy and Eberhart, in 1995. Originally, since the PSO is only with few parameters able to be adjusted, it seems extremely effortless. However, its computing speed becomes better and with high accuracy. It also costs smaller memory size by comparison with other learning algorithms such as neural network and genetic algorithms. Several approaches1–6 indicate that PSO performance will heavily depend on every PSO parameter. PSO has applied and achieved satisfied results in many fields such as in biped robot, 6 in electrical power energy systems, 4 in milling machine, 7 and in gun position control. 3
The unmanned aerial vehicles (UAVs), in the last decade have received a strong interest and exponential growth in military surveillance, civilian information search, and rescue operations. The current trends are to design the small flying vehicles capable of hovering maneuvers without or less oscillation as well as forward flight.8–10 In such type, the significant represent is quadrotor that has four symmetric rotorcrafts in each couple.8,9,11
The proportional–integral–derivative (PID) controllers3,8,9,12–15 are of low cost, uncomplicated structure, and easy design, which are applied to many hi-tech fields, from industrial machine to biped robot, and especially in UAV systems. However, the controller methods such as PID, backstepping, and fuzzy PID approaches for the UAVs10,11,16 have problems in practical applications for better performance, robustness, and less oscillation.
Following growing tendency, this article copes with the fuzzy PID controller gains design. The parameter control gains is evaluated by the PSO algorithm and related to the indices of the system performance—the fitness function, the integral of time multiplied by absolute error (ITAE). 12 This algorithm is exploited to optimize fuzzy PID controller gains and aims to solve the complex quadrotor attitude control systems.
System description
PSO algorithm
The fundamental idea of the PSO algorithm is originally generated by imitating the social behavior from animals just like the fish shoal, the bird flock, and the swarm.1–6 PSO represents an optimization process that searching and updating the population based on best moving from an initial random. There are two vectors of position and velocity belonging to every particle. The particle velocity is computed from all particles to the best position by iterations, in which the best position is determined by the associated particles over the path of multiple generations. It assumes the searching space as Dth dimension and with m particles.
The ith particle in the searching space is located at Xi(t) = [xi1(t), xi2(t), …, xiD(t)], and the position in each particle is a potential result. The velocity of the ith particle is given by Vi(t) = [vi1(t), vi2(t), …, viD(t)].
For each generation, the velocity vector of each particle needs to be adjusted by the best position Pi(t) which is the best particle from the neighbors Pg(t) at time t, where Pg(t) = [pg1(t), pg2(t), …, pgD(t)]. From the previous works,1–6 the PSO algorithm is verified as equation (1)
where viD indicates the velocity of the ith particle; piD is the best historical position of the ith particle, while the global best position is pgD; and xiD is the position of the ith particle with objective fitness value. The weighting ω is used to manage the values of viD related to the current value in learning rates c1 and c2.
In equation (1), the items rand1(.) and rand2(.) are random numbers between 0 and 1. The term c1 × rand1(.) × (piD(t) − xiD(t)) mentions the cognitive component which returns the distance at the location where the solution Pi(t) is best. In contrast, the term of c2 × rand2(.) × (pgD(t) − xiD(t)) indicates the social component which reflects the distance between a particle and the best solution found by its neighbors Pg(t). Based on its earlier velocity, equation (1) is used to compute the particle’s new velocity, the distance between its current and the own best previous position, then the collaborative interaction between the particles.1,2,17 This stage features cooperation among all particles by sharing information. The particle updates its position in final.
A set of PID parameter gains [kP, kI, kD] and fuzzy scaling factor gains [ke(t), kde(t)] are represented in each individual, which starts by randomly generating an initial population of pop individuals. The optimization problem is found out by a group of
Controllers design
The simplified PID controllers, whose key functions are to improve the dynamics and to reduce and/or eliminate the steady-state error, are extensively being used in industry, nowadays. By combining a fast learning scheme with PID parameters for high-grade solutions, an enhancement by fuzzy PID controllers is proposed.3,13,17
As shown in Figure 1, the membership functions of the tracking error e(t) and the differential tracking error de(t) are introduced in the fuzzy inference system. The membership function of the output

Fuzzification interface: input e and de, output CI.
The PSO algorithm is adopted to discover the PID controller parameters, the outputs of the proposed fuzzy logic controllers (FLC),
The rules of FLC are able to be recognized by the mapping of the inputs e(t) and de(t) onto the output eFuzzy(t).10,14–18 The strategy aims to bound the error into a stable sliding range;
The FLC dynamic behavior, which is based on expert knowledge, is described by a set of linguistic rules. Mandani’s MIN–MAX inference engine type and center of area (COA) method defuzzification are employed. The error range is limited by sliding range zero error (ZE), and the PID controller gains are regulated by optimal system condition.
The basic implementation parameters of the fuzzy control algorithm, which have seven partitions, are decomposed: negative big (NB), negative medium (NM), negative small (NS), ZE, positive small (PS), positive medium (PM), and positive big (PB). The fuzzy control rules are then designed as shown in Table 1.
The fuzzy rule table.
NB: negative big; NM: negative medium; NS: negative small; ZE: zero error; PS: positive small; PM: positive medium; PB: positive big.
In this article, there are four items of the system response as the rise time, settling time, peak time, and minimum overshoot were integrated to the fitness function of ITAE
In equation (2), λi indicates the ith weighting. The output performance indices such as the rising time, the settling time, the peak time, and the maximum overshoot are weighed to define the fitness. For experiences, the weights could be chosen by [λ1, λ2, λ3, λ4] = [35, 25, 10, 5]. It raises output error performance, which is indicated by
To adapt the PSO algorithm, optimal control gains in quadrotor attitude system are to achieve an optimal compromise between the system stability and the easier flight pilot. Figure 2 shows the proposed controller. The system performance utilizes the fitness function ITAE as below

The diagram of PSO reinforced PID quadrotor attitude control.
Numerical simulation results
The transfer functions attitude model of quadrotor, which referred to Bouabdallah et al.,8,9 is applied to proposed controllers:
Roll channel (lateral control):
Pitch channel (longitudinal control):
Yaw channel (pedal control):
In the simulation results, the numbers of iterations for each control pilot channel are chosen as 30, 50, and 20, respectively. The parameters for tuning fuzzy PID controller gains are chosen as follows: the weighting factor [λ1, λ2, λ3, λ4] = [35, 25, 10, 5], fuzzy scaling factor gains are

Roll channel control: (a) roll angle response, (b) PID parameters in PSO convergence, (c) criterion of fuzzy gains, and (d) the fitness function.

Pitch channel control: (a) pitch angle response, (b) PID parameters in PSO convergence, (c) criterion of fuzzy gains, and (d) the fitness function.

Yaw channel control: (a) yaw angle response, (b) PID parameters in PSO convergence, (c) criterion of fuzzy gains, and (d) the fitness function.
The tracking results make obviously that the proposed controllers have the preeminent pilot as its performance reduced and/or eliminate the damping, overshoot and oscillation at all while the response is especially fast. All results have the maximum response time as just 0.6 s. It is the high effectiveness when compared to the reference results of Bouabdallah et al.,8,9 which just obtain the response time after the third second.
Conclusion
In this article, the proposed PSO algorithm, which rapidly generates and updates the new elite control parameter gains, is used in reinforcement of fuzzy PID controllers. It is then implemented to control quadrotor attitude: roll–pitch–yaw channels. The simulation results demonstrate that the proposed controller really dominates the best performance in saving the settling time, reliability, stability, and less oscillation. Besides, the benefit of the proposed controller design scheme for quadrotor UAV pilot control is achieved.
Footnotes
Academic Editor: Stephen D Prior
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The authors would like to thank the Ministry of Science and Technology, Taiwan, Republic of China, for the subsidies under grant numbers MOST 104-2221-E-218-039, MOST 104-2221-E-218-043 and MOST 105-2221-E-218-019. This research was supported by National Key Laboratory of Digital Control and System Engineering, University of Technology, Vietnam National University, Ho Chi Minh City.
