PSO-Based Algorithm Applied to Quadcopter Micro Air Vehicle Controller Design

Due to the rapid development of science and technology in recent times, many effective controllers are designed and applied successfully to complicated systems. The significant task of controller design is to determine optimized control gains in a short period of time. With this purpose in mind, a combination of the particle swarm optimization (PSO)-based algorithm and the evolutionary programming (EP) algorithm is introduced in this article. The benefit of this integration algorithm is the creation of new best-parameters for control design schemes. The proposed controller designs are then demonstrated to have the best performance for nonlinear micro air vehicle models.


Introduction
The state of the art design first developed by Kennedy and Eberhart [1] in 1995 is particle swarm optimization (PSO)-based on inspiration from the social behavior of groups of birds and fish. The PSO-based algorithm is effortless and simply requires the adjustment of a few parameters [2]. Additionally, when compared with other methods, such as neural networks, machine learning, and genetic computation, it achieves better performances in computing speed, accuracy, and small memory size. The advantages of the PSO-based algorithm are very impressive, and as a result, many scientists have used it to solve their problems, ranging from shop-scheduling to optimized control gains. Some others have even upgraded this algorithm by combining PSO with another methodology. Hence, different types of hybrid PSOs have been proposed due to multi-objective functioning. For example, Liu et al. [3] used a PSO-based memetic algorithm (PSOMA) to solve a flow shops scheduling issue. Later, Solihin et al., using a PSO-based algorithm, optimized the state feedback for a flexible link manipulator tracking control [4]. The combination of PSO and gravitational search algorithm (GSA) was introduced by Mirjalili et al. [5] in 2010. A novel hybrid binary particle swarm optimization algorithm (HBPSO) that combined the PSO's concept and a Genetic Algorithm (GA) was presented by Menhas et al. [6]. Ghodrati and Lotfi combined cuckoo search (CS) and particle swarm optimization (PSO) [7] in 2012. A hybrid particle swarm optimization algorithm (HPSOM) used to integrate the PSO algorithm with the genetic algorithm mutation method was introduced by Esmin and Matwin [8]. A PSO-based algorithm was also used by Koyuncua and Erolb [9] to cope with scheduling new product development projects in 2015. All of these methods stated above can increase the convergence speed and improve the chosen system. Following this trend, this research paper focuses on the PSO-based algorithm and upgrades this algorithm by using evolutionary programming [10]. Its benefit is that it creates new best-parameters in a short time, improving the multi-object optimization process.
Conventional proportional-integral-derivative (PID) controllers that have a simple control structure are applied in many industrial fields. Moreover, due to regulated control gains, a new hybrid control approach fuzzy-PID [11,12] is applied for an autonomous mini-helicopter. In this paper, a fuzzy-PID controller [11][12][13] that has various advantages is chosen for the controller design task. The parameter gains are then evaluated by using the fitness functions. The Integral of the Squared Error (ISE) [14] that is associated with the system's performance indices is selected for this assignment. The attitude-based models of the quadcopter micro air vehicle are exploited to illustrate the augmenting benefits.

PSO-Based Algorithm Applied Controller Design
Evolutionary algorithms are a group of algorithms that include genetic algorithm (GA) and evolutionary programming (EP). Although similar to genetic programming (GP), the EP method allows for the evolution of the optimized parameters and having a fixed structure. The EP process neglects the crossover operator while keeping the main operator mutation and the selection strategy. The populations' members are observed as a part of a specific species rather than similar species members; thus, a new offspring is generated by each parent [10].
The mutation stage occurs at every x i (t) and generates X j (t) = [x j1 (t), x j2 (t), . . . , x jD (t)] by using Equation (1): where x jD is the jth individual error data, and N(0,1) is a random normal distribution of x. The mutation rate is noted as mr. The next step is the selection operator wherein the new individual of every particle j is selected by using the roulette wheel technique. It picks x jD from the set of all X j , then updates v i and x i by the major equation of the PSO-based algorithm. In this article, the proposed algorithm creates an elite PSO-based algorithm by the combination of PSO and EP. These effects usually attain a better result than either the PSO or the existing algorithms alone.
The fundamental PSO algorithm is a great number of particles moving around in a multi-dimensional space, such as the schooling of fish, the flocking of birds, and the swarm theory [1,2]. The major PSO algorithm can be verified by Equation (2): The velocity and the position of particle i are noted by v iD and x iD , respectively. The best particle historical position is p iD , and the global best position is p gD . In order to go along with learning rates l 1 and l 2 , the inertia weight ω is a user-defined parameter. It manages the relationship of the previous values of particle velocities to the current value. The rand 1 (·), rand 2 (·) items are uniformly distributed random numbers [0,1]. The l 1 × rand 1 (·) × (p iD (t) − x iD (t)) term refers to the cognitive component. It reflects the distance at which the best solution P i (t) of a particle is located. The combination of the PSO-based algorithm and EP will generate and update the parameters of the control system performance index. Some specific performance indicators are usually designed to evaluate and determine the minimum error criterion [14]. Due to system advantages, the ISE performance index is chosen as shown in Equation (3): The performance index f (ISE) is the minima for all swarm particles, meaning that the optimization issue determines a group of five fuzzy-PID control parameters k P , k I , k D , k e , and k de . After that, each new particle is said to represent a group of solutions. The four items rising time, settling time, peak time, and maximum overshoot are of significant focus on each control system. They are exploited to find out the minimum ISE fitness function, as shown in Equation (4).
The weighting factors of each control factor are noted as α i . The rising time, settling time, peak time, and maximum overshoot are estimated via the output performance, and then its values are recorded. Afterward, the particle groups which contain a large error can be eliminated. Thus, the convergence speed of the system is also accelerated. The fitness function settles in the range: The whole progression can be assigned as illustrated in Figure 1: After that, each new particle is said to represent a group of solutions. The four items rising time, settling time, peak time, and maximum overshoot are of significant focus on each control system. They are exploited to find out the minimum ISE fitness function, as shown in Equation (4).
The weighting factors of each control factor are noted as αi. The rising time, settling time, peak time, and maximum overshoot are estimated via the output performance, and then its values are recorded. Afterward, the particle groups which contain a large error can be eliminated. Thus, the convergence speed of the system is also accelerated. The fitness function settles in the range: The whole progression can be assigned as illustrated in Figure 1: The main functions of PID controllers are improving the dynamic response and reducing or eliminating the steady state errors. The improvement of the fuzzy-PID controller by incorporating a fast learning PID controller gains with fuzzy control parameters, yielding a high-quality solution [15], is chosen in this article. As shown in Figure 2, the tracking error e(t) and the differential tracking error de(t) after modifying the triangle membership function in segments (0, 0.3, 0.6, and 1) are the inputs of the fuzzy inference system. The two inputs e(t) and de(t), and the output CI are formal triangular membership functions. The main functions of PID controllers are improving the dynamic response and reducing or eliminating the steady state errors. The improvement of the fuzzy-PID controller by incorporating a fast learning PID controller gains with fuzzy control parameters, yielding a high-quality solution [15], is chosen in this article. As shown in Figure 2, the tracking error e(t) and the differential tracking error de(t) after modifying the triangle membership function in segments (0, 0.3, 0.6, and 1) are the inputs of the fuzzy inference system. The two inputs e(t) and de(t), and the output CI are formal triangular membership functions. Based on expert knowledge, the dynamic behavior of the fuzzy logic controller (FLC) is described by a set of linguistic rules [16]. In this paper, we employed Mandani's Min-Max inference engine type and center of area method (COA) defuzzification. Seven partitions are decomposed and implemented to fuzzy control parameters: negative big (NB), negative medium (NM), negative small (NS), zero (ZE), positive small (PS), positive medium (PM) and positive big (PB). The application of fuzzy control rules that have only three NB and three PB are then designated in Table  1. The structure of the fuzzy-PID input is presented by Equation (5).

Quadcopter as a Micro Air Vehicle
The quadcopter as a micro air vehicle (MAV) [17,18] in Figure 3 has six degrees of freedom (DOF) and is depicted using a right hand generalized Earth coordinate system of axes and a right hand body frame. It has a special form with two pairs of contra-rotating rotors to provide lift and directional control. Unlike conventional helicopters, it typically has fixed-pitch blades and varies their thrust by changing rotor speeds. The quadcopter has two major motivating benefits, which are its reliability and compactness. The Quadcopter configuration can be described as having four propellers, with two pairs of propellers (1 and 3) and (2 and 4) that turn in opposite directions in a cross configuration. By varying the rotor speed, the lift force and the motion-creation are changed. Hence, vertical motion is generated by increasing or decreasing the four propeller's speeds simultaneously. Changing the speed of propellers 2 and 4 conversely produces roll rotation that goes together with lateral motion. Pitch rotation and the corresponding lateral motion is the result of the Based on expert knowledge, the dynamic behavior of the fuzzy logic controller (FLC) is described by a set of linguistic rules [16]. In this paper, we employed Mandani's Min-Max inference engine type and center of area method (COA) defuzzification. Seven partitions are decomposed and implemented to fuzzy control parameters: negative big (NB), negative medium (NM), negative small (NS), zero (ZE), positive small (PS), positive medium (PM) and positive big (PB). The application of fuzzy control rules that have only three NB and three PB are then designated in Table 1. The structure of the fuzzy-PID input is presented by Equation (5).

Quadcopter as a Micro Air Vehicle
The quadcopter as a micro air vehicle (MAV) [17,18] in Figure 3 has six degrees of freedom (DOF) and is depicted using a right hand generalized Earth coordinate system of axes and a right hand body frame. It has a special form with two pairs of contra-rotating rotors to provide lift and directional control. Unlike conventional helicopters, it typically has fixed-pitch blades and varies their thrust by changing rotor speeds. The quadcopter has two major motivating benefits, which are its reliability and compactness. The Quadcopter configuration can be described as having four propellers, with two pairs of propellers (1 and 3) and (2 and 4) that turn in opposite directions in a cross configuration. By varying the rotor speed, the lift force and the motion-creation are changed. Hence, vertical motion is generated by increasing or decreasing the four propeller's speeds simultaneously. Changing the speed of propellers 2 and 4 conversely produces roll rotation that goes together with lateral motion. Pitch rotation and the corresponding lateral motion is the result of the speed of propellers 1 and 3 being conversely modified. As it results from the difference in the counter-torque between each pair of propellers, yaw rotation is more subtle.
speed of propellers 1 and 3 being conversely modified. As it results from the difference in the counter-torque between each pair of propellers, yaw rotation is more subtle.

Simulation Results
The previously mentioned parameters are established for the numerical simulation test in this section. The PSO-based algorithm for attitude pilot angle: Roll, Pitch, and Yaw are set on 30, 50, and 20 generations, respectively. The fitness weighting factors that occurred in Equation (4)

Simulation Results
The previously mentioned parameters are established for the numerical simulation test in this section. The PSO-based algorithm for attitude pilot angle: Roll, Pitch, and Yaw are set on 30, 50, and 20 generations, respectively. The fitness weighting factors that occurred in Equation (4)

Conclusions
In this article, the proposed PSO-based algorithm-which optimized fuzzy-PID controller gains and achieved minimization by the ISE fitness criterion-has been successfully implemented to attitude control Roll, Pitch, and Yaw of the quadcopter micro air vehicle models. The best performances are successfully accomplished by implementing the proposed controller. The algorithm saves the settling time and improves the reliability, as well as the stability of the system models. Due to demonstration of the augmented benefits of PSO algorithm, real time flight control is to be future research work.

Conclusions
In this article, the proposed PSO-based algorithm-which optimized fuzzy-PID controller gains and achieved minimization by the ISE fitness criterion-has been successfully implemented to attitude control Roll, Pitch, and Yaw of the quadcopter micro air vehicle models. The best performances are successfully accomplished by implementing the proposed controller. The algorithm saves the settling time and improves the reliability, as well as the stability of the system models. Due to demonstration of the augmented benefits of PSO algorithm, real time flight control is to be future research work.