## 4 Quadrotor Control
### Quadrotor Intelligent Control Using PSO, CS, and PSO-CS  
To control the nonlinear and fully coupled quadrotor defined by Equations (1)-(6), it is suitable to use a method directly applicable to nonlinear systems as PSO, CS, and the cooperative PSO-CS. Instead of linear PID controllers, the intelligent and adaptive controllers can look for optimal PIDs parameters for the six quadrotors' outputs [\(\phi\), \(\theta\), \(\psi\), \(x\), \(y\), \(z\)].  
The initial populations (\(N\) = 200) of PSO, CS, and PSO-CS are randomly dispersed in a search space that is chosen sufficient to contain all possible solutions [0, 200] and its dimension \(D\) is set to 18. To define the exploration capacity of each particle in order to improve the convergence of the process and to not exceed the velocity limits, we tested numerous values of w, and the compromise between local and global exploration in PSO was achieved for \(w\) = 0.8. The confidence coefficients C\({}_{1}\) and C\({}_{2}\) define the exploration capacity. They determine the degree of influence of the past positions of the particle itself and those of the other particles of the swarm in order to regulate the velocities relative to the best local and global positions, thus making it possible to determine the movements relative to these best positions. \(C_{1}\)R\({}_{1}\) and \(C_{2}R_{2}\) are represented by matrices with dimension of 200 \(\times\) swarm size. We considered that \(C_{1}R_{1}\) takes random values in [0, 0.8] to avoid the problem of fast convergence, when \(C_{2}R_{2}\) takes random values in [0, 1.2] to give more importance to the global best solution \(Pg\) (the interval of C\({}_{2}\)R\({}_{2}\) is large to that of C\({}_{1}\)R\({}_{1}\)). In CS, the parameters used in experiments are as follows: Abandon probability \(P_{a}\) = 0.25, and the Levy flights settings, \(\alpha\) = 0.1 and \(\lambda\) = 1.5. In PSO-CS, the same settings of PSO and CS are conserved: \(P_{a}\) = 0.25, and the Levy flights settings, \(\alpha\) = 0.1, \(\lambda\) = 1.5 and \(C_{2}\) with random values in [0, 1.2].  
To evaluate the optimization performance of the quadrotor's responses using the proposed approaches, the fitness function (profit) is defined in a similar way in order to minimize the differences between the desired and the controlled outputs responses of the quadrotor. This fitness function is defined in Equation (22) as the sum of the errors \(E_{k}\) that characterize the difference in behavior between the inputs and the outputs of the quadrotor based on the Integral Square Error (ISE), with \(l\) = 6 and \(k\) = {1, 2, 3, 4, 5, 6}.  
\[F=\sum\
olimits_{k=1}^{l}\int_{0}^{\infty}E_{k}^{2}(t)dt \tag{22}\]  
\[ISE=\int_{0}^{\infty}E_{k}^{2}(t)dt \tag{23}\]  
The performances found with ISE are compared to those established using three other performance indices: Integral Absolute Error (IAE), Integral Time Absolute Error (ITAE), and Integral Time Square Error (ITSE).  
\[IAE=\int_{0}^{\infty}\bigl{|}E_{k}(t)\bigr{|}dt \tag{24}\]  
\[ITAE=\int_{0}^{\infty}t\,\bigl{|}E_{k}(t)\bigr{|}dt \tag{25}\]  
\[ITSE=\int_{0}^{\infty}t\,E_{k}^{2}(t)dt \tag{26}\]  
The maximum number of generations for the three programs (PSO, CS and PSO-CS) is fixed as the stop criterion and set to 20.