# Critically Leveraging Theory for Optimal Control of Quadrotor Unmanned Aircraft Systems
## 2 The Structure and Mathematical Model of the Quadrotor
### Drone Kinematics  
Think of the plane as a solid cross-shaped block. Set B = {B1, B2, B3} to be the coordinate system attached to the airframe, where B1 is the axis in the normal flight direction of the aircraft, B2 is perpendicular to B1, and to the right, B3 has the vertical direction upwards, perpendicular to the plane B1 OB2. The coordinate system I = {EX, EY, EZ} is associated with the earth (Figure 3).  
Vector \(\xi\) = [x y z]' represents the position of the plane's center of mass in the earth coordinate system. Orient the plane through a transfer matrix RI: B\(\rightarrow\)I, where RI \(\epsilon\) SO is an orthogonal matrix [22]. The transfer matrix can be obtained through three consecutive rotations around the three axes of the plane coordinate system. In this project, fixed Euler XYZ angles are utilized to describe the rotation of the UAV relative to the ground [23; 24]. These angles must satisfy the following condition:  
Figure 3: Diagram of Quadrotor.  
Figure 2: The corresponding torque controls the angles (**a**) yaw, (**b**) pitch, and (**c**) roll.  
Roll angle, \(\phi\): \(-\frac{\pi}{2}<\pi<\frac{\pi}{2}\);  
Pitch angle, \(\theta\): \(-\frac{\pi}{2}<\theta<\frac{\pi}{2}\);  
Yaw angle, \(\Psi\): \(-\pi<\Psi<\pi\).  
From the above three rotations, the coordinate system transformation matrix from B\(\rightarrow\)I is:  
\[\mathrm{R_{I}}=\begin{bmatrix}\cos_{\Psi}\cos_{\theta}&\cos_{\Psi}\sin_{ \theta}\sin_{\pi}-\sin_{\Psi}\cos_{\pi}&\cos_{\Psi}\sin_{\theta}\cos_{\pi}+ \sin_{\Psi}\sin_{\pi}\\ \sin_{\Psi}\cos_{\theta}&\sin_{\Psi}\sin_{\theta}\sin_{\pi}+\cos_{\Psi}\cos_{ \pi}&\sin_{\Psi}\sin_{\theta}\cos_{\pi}-\cos_{\Psi}\sin_{\pi}\\ -\sin_{\theta}&\cos\mathrm{oss}\mathrm{sin}_{\pi}&\cos_{\theta}\cos_{\pi}\\ \end{bmatrix} \tag{1}\]  
The kinematic equations of rotation and translation can be derived using the transfer matrix. The translational kinematics can be expressed as follows:  
\[\mathrm{v_{I}}=\mathrm{R_{I}}\cdot\mathrm{v_{B}} \tag{2}\]  
For \(\mathrm{v_{I}}=\left[\mathrm{u_{O}}\ \mathrm{v_{O}}\ \mathrm{w_{O}}\right]^{\prime}\) and \(\mathrm{v_{B}}=\left[\mathrm{u_{L}}\ \mathrm{v_{L}}\ \mathrm{w_{L}}\ \mathrm{l}\right]^{\prime}\), the linear velocities of the plane's center of mass are represented in the earth coordinate system, and the plane coordinate system.  
The rotation kinematics are derived from the relationship between the transfer matrix and the derivative with a skewed symmetry matrix as follows:  
\[\dot{\mathrm{\eta}}=\mathrm{W_{\eta}^{-1}}\omega \tag{3}\]  
\[\begin{bmatrix}\dot{\pi}\\ \dot{\mathrm{\theta}}\\ \dot{\mathrm{\Psi}}\end{bmatrix}=\begin{bmatrix}1&\mathrm{sin}\gamma\mathrm{tan }\theta&\mathrm{cos}\gamma\mathrm{tan}\theta\\ 0&\cos\pi&-\mathrm{sin}\pi\\ 0&\mathrm{sin}\gamma\mathrm{sec}\theta&\mathrm{cos}\gamma\mathrm{sec}\theta \end{bmatrix}\begin{bmatrix}\mathrm{P}\\ \mathrm{q}\\ \mathrm{r}\end{bmatrix} \tag{4}\]  
where \(\mathrm{\eta}=\left[\mathrm{\Phi}\ \mathrm{\theta}\ \mathrm{\Psi}\right]^{\prime}\) and \(\omega=\left[\mathrm{p}\ \mathrm{q}\ \mathrm{r}\right]^{\prime}\) are the angular velocities in the drone coordinate system.