# Critically Leveraging Theory for Optimal Control of Quadrotor Unmanned Aircraft Systems
## 2 The Structure and Mathematical Model of the Quadrotor
### Nonlinear Control \(H_{\infty}\) for Rotational Subsystem
\begin{array}{rl}\frac{\partial\mathrm{V}}{\partial t}+\frac{\partial^{T} \mathrm{V}}{\partial x}\mathrm{f}(x,t)+\frac{1}{2}\frac{\partial^{T}\mathrm{V }}{\partial x}\Big{[}\frac{1}{\gamma^{2}}\mathrm{K}(x,t)\mathrm{K}^{T}(x,t)- \mathrm{G}(x,t)\mathrm{R}^{-1}\mathrm{G}^{T}(x,t)\Big{]}\frac{\partial V}{ \partial x}-\frac{\partial^{T}\mathrm{V}}{\partial x}\mathrm{G}(x,t)\mathrm{ R}^{-1}\mathrm{C}^{T}\mathrm{h}(x)\\ +\frac{1}{2}\mathrm{h}^{T}(x)\Big{(}\mathrm{Q}-\mathrm{C}\mathrm{R}^{-1} \mathrm{C}^{T}\Big{)}\mathrm{h}(x)=0\\ \end{array}  \tag{41}\]  
To:  
\[u=-R^{-1}\bigg{(}C^{T}h(x)+G^{T}(x,t)\frac{\partial V}{\partial x}\bigg{)} \tag{44}\]  
Then:  
\[\frac{dV}{dt}\leq-\frac{1}{2}y^{T}Qy-\frac{1}{2}u^{T}Ru-y^{T}Cu+\frac{1}{2}\gamma^ {2}||d||^{2} \tag{45}\]  
Integrate both sides from 0 to t = T and notice that \(V(x_{0},0)=0\) and \(V(x,t)\geq 0\):  
\[\frac{1}{2}\int\limits_{0}^{T}\bigg{(}\left\|W \begin{bmatrix}y\\ u\end{bmatrix} \right\|^{2}\bigg{)}dt\leq\frac{1}{2}\gamma^{2}\int\limits_{0}^ {T}\|d\|^{2}dt \tag{46}\]  
The rotational kinematics model derived from the Euler-Lagrange formula is used to develop the H\({}_{\infty}\) nonlinear controller. \(\tau_{\eta}\) can be written as:  
\[\tau_{\eta}=\tau_{\eta a}+\tau_{\eta d} \tag{47}\]  
where \(\tau_{\eta a}\) is the torque vector, and \(\tau_{\eta d}\) represents the total effect of the system model error and external noises. Considering the error vector:  
From considering the matrix \(W\) in (39), consider the structure for the matrix \(Q\) and \(S\):  
\[Q= \begin{bmatrix}Q_{11}&Q_{12}&Q_{13}\\ Q_{21}&Q_{22}&Q_{23}\\ Q_{31}&Q_{32}&Q_{33}\end{bmatrix} ,\quad S= \begin{bmatrix}S_{1}\\ S_{2}\\ S_{3}\end{bmatrix} \]  
To apply the theoretical results proved above, we need to rewrite the nonlinear kinematics equation of the deviation according to the standard form of the nonlinear control \(H_{\infty}\) in the following form:  
\[\dot{x}_{\eta}=f(x_{\eta},t)+g(x_{\eta},t)u+k(x_{\eta},t)d \tag{51}\]  
where:  
\[f(x_{\eta},t)=T_{0}^{-1} \begin{bmatrix}-M(n)^{-1}C(n,\dot{n})&0&0\\ T_{1}^{-1}&I-T_{1}^{-1}T_{2}&-I+T_{1}^{-1}(T_{2}-T_{3})\\ 0&I&-I\end{bmatrix} T_{0}x_{\eta} \tag{52}\]  
\[g(x_{\eta},t)=k(x_{\eta},t)=T_{0}^{-1} \begin{bmatrix}M(n)^{-1}\\ 0\\ 0\end{bmatrix}  \tag{53}\]  
where:  
\[T_{0}= \begin{bmatrix}T_{1}&T_{2}&T_{3}\\ 0&I&I\\ 0&0&I\end{bmatrix}  \tag{54}\]  
The solution of the Hamilton-Jacobi-Bellman-Isaacs (HJBI) function relies on the selection of the cost function \(\mathcal{L}\), particularly the choice of the function \(h(x_{\eta})\). Here, choose \(h(x_{\eta})=x_{\eta}\). Once chosen, computing the control law \(u\) will require finding the Lyapunov function \(V(x_{\eta},t)\). The following theorem will help us do this:  
Theorem: Given a scalar function \(V(x_{\eta},t)\):  
\[V(x_{\eta},t)=\frac{1}{2}x_{\eta}^{\prime}T_{0}^{\prime} \begin{bmatrix}M(n)&0& 0\\ 0&Y&X-Y\\ 0&X-Y&Z+Y\end{bmatrix}  \tag{55}\]  
where \(X,Y,Z\in R^{n\times n}\) are constant matrices and positively symmetric such that \(Z-XY^{-1}X+2X>0\) and \(T_{0}\) are defined in (54). T is the matrix in (50). If these matrices satisfy:  
\[ \begin{bmatrix}O&Y&X\\ Y&2X&Z+2X\\ X&Z+2X&O\end{bmatrix} +Q+\frac{1}{\gamma^{2}}T^{\prime}T-\big{(}S^{\prime}+T \big{)}^{\prime}R^{-1}\big{(}S^{t}+T\big{)}=0 \tag{56}\]  
Then the function \(V(x_{\eta},t)\) at (55) will be a solution of the HJBI equation with a value of \(\gamma\). This theorem is obtained from [PERSON] et al. (2005) [34]. Considering the system, prove:  
\[M(q)\ddot{q}+N\big{(}q,\dot{q}\big{)}=\tau+\tau_{d} \tag{57}\]  
where:  
\[N\big{(}q,\dot{q}\big{)}=C(q,\dot{q})\dot{q}+F\big{(}\dot{q}\big{)}+G(q) \tag{58}\]  
where \(q\in R^{n}\) is the state variable, and \(\dot{q}\) is its derivative. Assume that these two vectors are both measurable. The vector \(\tau\) serves as the input signal of the system, while \(\tau_{d}\) represents the cumulative noise and errors of the system.