## 4 Quadrotor Control
### Rectangular Trajectory Tracking  
This experimental simulation on the quadrotor engages to test the PIDs' efficiency when the vehicle tracks a square trajectory without overturning. In this mode, inputs for desired positions (\(x_{d}\), \(y_{d}\), \(z_{d}\)) are considered pulse signals and desired yaw attitude is set to \(0^{\circ}\). Figure 9 shows the tracking of each position coordinate (\(x\), \(y\), \(z\)) and the tracking trajectories in 3D plan obtained using the proposed \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Output**} & \multirow{2}{*}{**Performances**} & \multicolumn{4}{c}{**Method**} \\ \cline{3-6}  & & PSO & CS & PSO-CS & RM \\ \hline \multirow{6}{*}{\(x\)} & \(\mathrm{T_{s}}\) (s) & 0.730 & 1.384 & 0.522 & 3.779 \\ \cline{2-6}  & \(\mathrm{M_{p}}\) (\%) & 0.412 & 1.769 & 0.446 & 22.869 \\ \cline{2-6}  & \(\mathrm{ISE}\) & 0.227 & 0.346 & 0.1650 & 0.365 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.324 & 0.492 & 0.234 & 0.714 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.034 & 0.083 & 0.018 & 0.176 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 0.088 & 0.262 & 0.038 & 0.847 \\ \hline \multirow{6}{*}{\(y\)} & \(\mathrm{T_{s}}\) (s) & 0.675 & 1.018 & 0.782 & 3.517 \\ \cline{2-6}  & \(\mathrm{M_{p}}\) (\%) & 0.497 & 0.898 & 0.010 & 30.741 \\ \cline{2-6}  & \(\mathrm{ISE}\) & 0.237 & 0.296 & 0.226 & 0.441 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.322 & 0.410 & 0.319 & 0.802 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.036 & 0.058 & 0.034 & 0.245 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 0.083 & 0.152 & 0.076 & 0.954 \\ \hline \multirow{6}{*}{\(z\)} & \(\mathrm{T_{s}}\) (s) & 1.070 & 1.821 & 0.813 & 1.855 \\ \cline{2-6}  & \(\mathrm{M_{p}}\) (\%) & 0.107 & 2.463 & 0.002 & 3.467 \\ \cline{2-6}  & \(\mathrm{ISE}\) & 0.243 & 0.406 & 0.208 & 0.342 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.397 & 0.587 & 0.308 & 0.617 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.050 & 0.129 & 0.031 & 0.122 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 0.134 & 0.312 & 0.081 & 0.521 \\ \hline \multirow{6}{*}{\(\phi\)} & \(\mathrm{ISE}\) & 0.028 & 0.006 & 0.005 & 0.093 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.197 & 0.053 & 0.032 & 0.431 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.016 & 0.001 & 0.000 & 0.076 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 0.388 & 0.036 & 0.013 & 0.741 \\ \hline \multirow{6}{*}{\(\theta\)} & \(\mathrm{ISE}\) & 0.334 & 0.129 & 0.024 & 0.912 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.886 & 0.271 & 0.068 & 1.509 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.386 & 0.026 & 0.001 & 1.238 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 2.006 & 0.134 & 0.023 & 2.822 \\ \hline \multirow{6}{*}{\(\psi\)} & \(\mathrm{T_{s}}\) (s) & 0.172 & 0.207 & 0.097 & 2.228 \\ \cline{2-6}  & \(\mathrm{M_{p}}\) (\%) & 0.300 & 20.424 & 0.047 & 16.129 \\ \cline{2-6}  & \(\mathrm{ISE}\) & 0.036 & 0.037 & 0.022 & 0.138 \\ \cline{2-6}  & \(\mathrm{IAE}\) & 0.073 & 0.068 & 0.038 & 0.331 \\ \cline{2-6}  & \(\mathrm{ITSE}\) & 0.0012 & 0.012 & 0.000 & 0.033 \\ \cline{2-6}  & \(\mathrm{ITAE}\) & 0.038 & 0.011 & 0.006 & 0.244 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performances obtained with Particle Swarm Optimization (PSO), Cuckoo Search (CS), Particle Swarm Optimization-Cuckoo Search (PSO-CS), and Reference Model (RM) for the quadrotor. methods. Responses for desired and controlled roll (\(\phi\)) and pitch (\(\theta\)) attitudes are illustrated in Figure 6. Table 5 resumes the errors ISE used to compute fitness function. It can be noticeably observed from Figure 9 and Table 5 that the adaptive autotuned controllers using PSO, CS, and PSO-CS have good performances (reduced errors) for positions (\(x,y,z\)) control. PSO-CS and PSO responses always lead to fast settling times with no overshoot for \(x\) position. RM presents overshoots for positions and CS shows few overshoots for \(y\) position and altitude \(z\). The intelligent PSO and the cooperative PSO-CS drive the system toward perfect tracking of the prescribed square trajectory. Also, all these methods allowed maintaining the yaw angle in zero degrees: no overturning of the aircraft.