# A Comparative Study of Control Methods for X3D Quadrotor Feedback Trajectory Control
## 3 X3D Quadrotor Controller Design
### Model Reference Adaptive PID Control System Based on MIT Rule  
Numerous controllers, including PI, PD, PID, and feedback, can be adapted utilizing particular adaptation methods to improve system performance. In this research, the model reference adaptive PID controller based on MIT rule was used to investigate the fast-tracking and stability control of quadrotor [31]. The Massachusetts Institute of Technology (MIT) developed the MRAC-based MIT rule in 1960 [32]. It employs the model reference adaptation control technique to ensure that the actual plant output follows the output of the reference model when the reference inputs are the same for any practical system with  
Figure 8: Surface view of FC (Z), FC (\(\psi\)). Figure 7: Error, Rate of Error, and Output Membership Functions. Figure 9: Surface view of FC (X), FC(Y), FC (\(\phi\)), FC (\(\theta\)). undetermined and unpredictable characteristics that can be adjusted by control settings [33] as illustrated in Figure 10. This section presents the MIT-rule-based design parameter adaption rules for a PID controller. The following are the steps to creating an MRAC using the MIT rule. Obtain the MRAC system reference model that yields the desired trajectory \(y_{m}\). \[G_{m}(s)=\frac{y_{m}(s)}{u_{c}(s)}=\frac{\alpha s+{\omega_{n}}^{2}}{s^{2}+2s \xi\omega_{n}+{\omega_{n}}^{2}} \tag{26}\]  
Closed-loop characteristics such as settling time \(t_{S}\) and overshoot (OS) are used to estimate the damping ratio \(\zeta\) and natural frequency \(\omega_{n}\). Table 5 lists the specifications of the reference model for the X3D quadrotor. The transfer function of the reference model is changed as follows:  
\[G_{m}(s)=\frac{y_{m}(s)}{u_{c}(s)}=\frac{0.1058}{s^{2}+0.1496+0.1058} \tag{27}\]  
1. State the adaptive law of MRAC system for PID controller as \[u(t)=K_{P}e(t)+K_{I}\int_{0}^{t}e(t)dt-K_{D}\frac{dy_{p}}{dt}\] (28) where \(e(t)=u_{c}-y_{p}\) The PID controller's transfer function in Laplace domain is described in Equation (29) \[U(s)=K_{P}E+\frac{K_{I}}{s}E-K_{D}sy_{p}\] (29)
2. State the tracking error \(e\) for the system as \[e=r-y_{p}\] (30) where \(r\) is the system reference input. \[\frac{de}{dt}=-\frac{dy_{p}}{dt}\] (31)  
Figure 7:0 MRAC System with MIT Rules. \begin{table}
\begin{tabular}{l c} \hline \hline
**Parameters** & **Values** \\ \hline Settling time & 20s \\ \hline Damping ratio & 0.707 \\ \hline Steady-state error & 0\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: X3D Quadrotor reference model specifications. 3. As stated in Equation (34), estimate the adaption error \(\varepsilon\). \[\varepsilon=y_{p}-y_{m}\] (32) where \(y_{p}\) denotes the plant output and \(y_{m}\) denotes the reference model output. 4. As follows, describe the MIT rule, which is described as the temporal rate \(\Phi\) of change proportional to the cost function's (\(J\)) negative gradient. \[\frac{d\Phi}{dt}=-\gamma\frac{\partial J}{\partial\Phi}=-\gamma e\frac{ \partial e}{\partial\Phi}\] (33) For calculating the value of PID controller parameters (\(\dot{K}_{P},\ \dot{K}_{D},\ \dot{K}_{I}\)), use the MIT Rule (gradient method). The following are the estimated adjustment parameters. \[ \begin{array}{l}\frac{dK_{p}}{dt}=-\gamma_{p}\varepsilon\bigg{(}\frac{s}{s^ {2}+2s\xi\omega_{n}+\omega_{n}{}^{2}}\bigg{)}e\\ \frac{dK_{I}}{dt}=-(\gamma_{I})\varepsilon\bigg{(}\frac{1}{s^{2}+2s\xi\omega_ {n}+\omega_{n}{}^{2}}\bigg{)}e\\ \frac{dK_{D}}{dt}=\gamma_{D}\varepsilon\bigg{(}\frac{s^{2}}{s^{2}+2s\xi\omega _{n}+\omega_{n}{}^{2}}\bigg{)}y_{p}\end{array} \] (34) For the approximate parameters \(K_{P},K_{I}\)_and_\(K_{D}\) of adaptation, the law is as (35). \[ \begin{array}{l}\theta_{1}=K_{p}=-\bigg{(}\frac{\gamma_{p}}{s}\bigg{)} \varepsilon\bigg{(}\frac{s}{s^{2}+2s\xi\omega_{n}+\omega_{n}{}^{2}}\bigg{)}e \\ \theta_{2}=K_{I}=-\big{(}\frac{\gamma_{I}}{s}\big{)}\varepsilon\bigg{(}\frac{ 1}{s^{2}+2s\xi\omega_{n}+\omega_{n}{}^{2}}\bigg{)}e\\ \theta_{3}=K_{D}=\big{(}\frac{\gamma_{p}}{s}\bigg{)}\varepsilon\bigg{(}\frac{ s^{2}}{s^{2}+2s\xi\omega_{n}+\omega_{n}{}^{2}}\bigg{)}y_{p}\end{array}