## 2 Literature Review
### Control Design for Quadcopter System Stabilization using Fuzzy PID
Converting this thrust equation to the appropriate reference frame and utilizing a PD to minimize the error in the z-axis gives  
\[T=\left(g+k_{gz}(z_{desire}-z)+k_{Dz}\big{(}\dot{z}_{desire}-\dot{z}\big{)} \frac{m}{c(\phi)c(\theta)}\right) \tag{25}\]  
and then angular velocity becomes  
\[ \begin{bmatrix}\omega_{1}^{2}\\ \omega_{2}^{2}\\ \omega_{3}^{3}\\ \omega_{4}^{2}\end{bmatrix} = \begin{bmatrix}k_{t}&k_{t}&k_{t}&k_{t}\\ 0&-lk_{t}&0&lk_{t}\\ -lk_{t}&0&lk_{t}&0\\ k_{b}&k_{b}&-k_{b}&k_{b}\end{bmatrix} ^{-1} \begin{bmatrix}T\\ \tau_{\varphi}\\ \tau_{\theta}\\ \tau_{\psi}\end{bmatrix}  \tag{26}\]  
After some simplifications,  
\[ \begin{cases}\omega_{1}^{2}=\frac{T}{4k_{1}}-\frac{\tau_{\theta}}{2 lk_{t}}- \frac{\tau_{\varphi}}{4k_{b}}\\ \omega_{2}^{2}=\frac{T}{4k_{1}}-\frac{\tau_{\varphi}}{2 lk_{t}}+\frac{\tau_{ \varphi}}{4k_{b}}\\ \omega_{3}^{2}=\frac{T}{4k_{1}}+\frac{\tau_{\varphi}}{2 lk_{t}}-\frac{\tau_{ \varphi}}{4k_{b}}\\ \omega_{4}^{2}=\frac{T}{4k_{1}}+\frac{\tau_{\varphi}}{2 lk_{t}}+\frac{\tau_{ \varphi}}{4k_{b}}\end{cases}  \tag{27}\]  
Feedback linearization is a nonlinear control technique where the main concept consists of mathematically converting nonlinear system dynamics into (fully or partially) linear dynamics, allowing linear control methods to be used. Our goal was to design a controller that could exactly cancel out the system dynamics. From Equation (10), we replaced \(\dot{x}=k_{\rm Dx}k_{\rm x}(x-x_{\rm d})\), \(\ddot{x}=k_{\rm px}k_{\rm x}\left(\dot{x}-\dot{x}_{\rm d}\right)\), where \(k_{px},\ k_{Dx}\), and \(k_{x}\) are gain values, and replaced \(\ddot{y},\ \dot{y},\ \ddot{z}\), and \(\dot{z}\), respectively:  
\[\frac{T}{m} \begin{bmatrix}c(\psi)s(\theta)c(\phi)+s(\psi)s(\phi)\\ s(\psi)s(\theta)c(\phi)+c(\psi)s(\phi)\\ c(\theta)c(\phi)\end{bmatrix} = \begin{bmatrix}k_{\rm px}k_{\rm x}\left(\dot{x}- \dot{x}_{\rm d}\right)\\ k_{\rm px}k_{\rm y}\left(\dot{y}-\dot{y}_{\rm d}\right)\\ k_{\rm px}k_{\rm z}\left(\dot{z}-\dot{x}_{\rm d}\right)\end{bmatrix} +g \begin{bmatrix}0\\ 0\\ 1\end{bmatrix} +\frac{1}{m} \begin{bmatrix}k_{\rm Dx}k_{\rm x}(x-x_{\rm d})\\ k_{\rm Dy}k_{\rm y}(y-y_{\rm d})\\ k_{\rm Dz}k_{\rm z}(z-z_{\rm d})\end{bmatrix}  \tag{28}\]  
Back substituting Equation (17) into Equation (15) gives  
\[\left\{ \begin{aligned} k_{\rm px}k_{\rm x}\left(\dot{x}-\dot{x}_{ \rm d}\right)+\frac{k_{Dx}k_{\rm x}}{m}(x-x_{d})=\frac{T}{m}c(\psi)s(\theta)c( \phi)\\ k_{\rm pp}k_{\rm y}\left(\dot{y}-\dot{y}_{\rm d}\right)+\frac{k_{Dx}k_{\rm y }}{m}(y-y_{d})=\frac{T}{m}s(\psi)s(\theta)c(\phi)+c(\psi)s(\phi)\\ k_{\rm pz}k_{\rm z}\left(\dot{z}-\dot{z}_{\rm d}\right)+\frac{k_{Dx}k_{\rm y }}{m}(z-z_{d})=\frac{T}{m}s(\psi)s(\theta)c(\phi)+c(\theta)c(\phi)\end{aligned} \right. \tag{29}\]  
Taking the square of both sides of Equation (18) and adding the equations together gives  
\[\frac{T^{2}}{m^{2}}=\left\{ \begin{aligned} k_{\rm px}^{2}\left( \dot{x}-\dot{x}_{\rm d}\right)^{2}+\frac{k_{Dx}^{2}k_{\rm x}^{2}}{m}(x-x_{d}) ^{2}+\frac{2k_{\rm px}k_{\rm x}k_{Dx}}{m}(x-x_{d})\left(\dot{x}-\dot{x}_{\rm d }\right)\\ +k_{\rm py}^{2}\left(\dot{y}-\dot{y}_{\rm d}\right)^{2}+\frac{k_{Dy}^{2}k_{ \rm y}^{2}}{m}(y-y_{d})^{2}+\frac{2k_{\rm py}k_{\rm y}k_{\rm y}}{m}(y-y_{d}) \left(\dot{y}-\dot{y}_{\rm d}\right)\\ +k_{\rm pz}^{2}\left(\dot{z}-\dot{z}_{\rm d}\right)^{2}+\frac{k_{Dz}^{2}k_{ \rm z}^{2}}{m}(z-z_{d})^{2}+g^{2}+2 gk_{\rm az}\left(\dot{z}-\dot{z}_{\rm d} \right)\\ +\frac{2 gk_{Dz}k_{\rm z}}{m}(z-z_{d})+\frac{2k_{\rm pz}k_{\rm Dz}k_{ \rm z}}{m}(z-z_{d})\left(\dot{z}-\dot{z}_{\rm d}\right)\end{aligned} \right. \tag{30}\]  
From Equation (16),  
\[\left\{ \begin{aligned} F_{x}=c(\psi)s(\theta)c(\phi)+s(\psi)s(\phi) \\ F_{y}=s(\psi)s(\theta)c(\phi)-c(\psi)s(\phi)\end{aligned} \right. \tag{31}\]  
and from the equation  
\[s(\theta)c(\phi)=\frac{\rm{Fy}\ +\ c(\psi)s(\phi)}{s(\psi)} \tag{32}\]  
\[\left\{