## 2 Literature Review
### Control Design for Quadcopter System Stabilization using Fuzzy PID  
Manual tuning cannot lead to suitable optimal tuning, but the fuzzy PID tuning method automatically adjusts model parameters against a physical object, which leads to suitable optimal tuning. To overcome this, a fuzzy PID-tuned control design for a quadcopter controller was developed. An aerial vehicle flight test mimicked cruising flight conditions, with adjustments made to the pitch and yaw axes [41]. From Figure 3, it is understood that the output of the fuzzy logic controller is used as an input for the PID controller. The nonlinear PID controller optimizes the plant system-based fuzzy logic outputs. The outputs of the plant are provided for the fuzzy logic controller. Based on the plant feedback system, the fuzzy members on or off, and the results of the fuzzy are provided to the PID controller. The controller has two loops: the inner loop and the outer loop. The inner loop penalizes the PID gain, whereas the outer loop penalizes the fuzzy membership functions. The inner loop consists of a PID controller, whereas the outer loop consists of a fuzzy logic controller. Figure 3: Quadcopter controller system architecture and flight dynamics. A quadcopter has only four control inputs and six primary outputs of interest \([x\ y\ z\
otin\theta\ \psi]\), which makes it an underactuated system. This was resolved by creating two different control loops, one working with attitude states and the other with position states. The quadcopter's angular motion is independent of the linear components, but the linear motion is determined by the angle variables. As a result, the goal was to control the attitude variable, which is independent of the linear motion, and then control the linear motion. It is possible to integrate attitude control with the trajectory controller once it is designed and optimized. The control architecture to be implemented on the quadcopter system was as follows [15; 16; 17; 18; 19]:  
\[e(t)=r(t)-y(t) \tag{22}\]  
\[u(t)=K_{P}e(t)+K_{I}\int_{0}^{t}e(\tau)d\tau+K_{D}\ \frac{d}{dt}\ e(t) \tag{23}\]  
where \(u(t)\) represents the control input, \(r(t)\) represents the desired state, and \(y(t)\) is the current or actual state. \(K_{P},\ K_{I}\), and \(K_{D}\) are the gain parameters for the proportional, integral, and derivative gains of the PID controller, respectively. Proportional and derivative gains were used for quadcopter control. The torque generated is proportional to the angular velocities, and therefore we set the torques to be proportional to the controller output, such that \(\tau\ =\mathrm{I}\ \times\ u(t)\) :  
\[ \begin{bmatrix}\tau_{\varphi}\\ \tau_{\theta}\\ \tau_{\psi}\end{bmatrix} = \begin{bmatrix}\mathrm{I}_{\mathrm{xx}}\big{(} \mathrm{k}_{\mathrm{P}\Phi}\big{(}\varphi_{desire}-\varphi\big{)}+\mathrm{k}_ {\mathrm{D}\Phi}\big{(}\dot{\varphi}_{desire}-\dot{\varphi}\big{)}\big{)}\\ \mathrm{I}_{\mathrm{yy}}\big{(}\mathrm{k}_{\mathrm{P}\Theta}\big{(}\theta_{desire }-\theta\big{)}+\mathrm{k}_{\mathrm{D}\Theta}\big{(}\dot{\theta}_{desire}- \dot{\theta}\big{)}\big{)}\\ \mathrm{I}_{\mathrm{zz}}\big{(}\mathrm{k}_{\mathrm{P}\psi}\big{(}\dot{\psi}_{ desire}-\psi\big{)}+\mathrm{k}_{\mathrm{D}\Phi}\big{(}\dot{\psi}_{desire}-\dot{\psi} \big{)}\big{)}\end{bmatrix}  \tag{24}\]  
The input to the quadcopter system is the angular velocity of the rotors. Remember that Equation (15) relates the torque to the square of the angular velocity of the rotors; there are three equations, but four unknowns. For this reason, Euler angles were used to model the quadcopter dynamics, rather than quaternions. Physical singularities also occur due to the limitation of under-actuation in the dynamics of a quadcopter. To allow simplification, the total thrust (\(T\)), which affects the acceleration in the z-direction, was set to be equal to mg (constraint enforced to keep the quadcopter flying).