# Inverse Optimal Design for Position Control of a Quadrotor
## 3 Design of Inverse Optimal Position Controller
### Position Control of a Quadrotor Based on Altitude Control
Here, a positive definite matrix \(\Gamma_{p}(t)\) is given by  
\[\Gamma_{p}(t)=\gamma_{p}\cdot I_{2\times 2}\cdot\widetilde{u}_{1}^{2}, \tag{41}\]  
and \(P_{p}= \begin{bmatrix}P_{11p}&P_{12p}\\ P_{12p}^{T}&P_{22p}\end{bmatrix} \) is the solution of the ARE  
\[A_{p}^{T}P_{p}+P_{p}A_{p}-\frac{1}{\gamma_{p}}P_{p}B_{p,0}B_{p,0}^{T}P_{p}+Q_ {p}=0_{4\times 4},\]where \(A_{p}:= \begin{bmatrix}0_{2\times 2}&I_{2\times 2}\\ 0_{2\times 2}&0_{2\times 2}\end{bmatrix} \) and \(B_{p,0}:= \begin{bmatrix}0_{2\times 2}\\ I_{2\times 2}\end{bmatrix} \), respectively, and a positive definite matrix \(Q_{p}:= \begin{bmatrix}q_{p,1}&0_{2\times 2}\\ 0_{2\times 2}&q_{p,2}\end{bmatrix} ,q_{p,1},\ q_{p,2}\) are the positive matrices. Through the \((x,\ y)\) position dynamics (35) of a quadrotor, which is expressed in terms of \(P\), \(V\), and \(T_{2}(\chi_{z}(t),\phi(t),\theta(t),\psi(t))\) given by (34), we can consider the position control input defined by  
\[u_{p}= \begin{bmatrix}u_{11}\\ u_{22}\end{bmatrix} = \begin{bmatrix}\tan\theta\\ \sec\theta\tan\phi\end{bmatrix} . \tag{42}\]  
**Assumption 3**. : _To derive a reference attitude value for position control, the attitude of the quadrotor is assumed to be perfect tracking._  
The motion along the \(x\) and \(y\) axes is related to the pitch and roll angles, respectively. The reference roll(\(\theta_{d}\)) and pitch(\(\phi_{d}\)) angles of a quadrotor that enable the quadrotor to converge in the desired position are obtained from the inverse optimal position control input \(u_{p}\) designed in Section 3.2. Therefore, the reference roll(\(\theta_{d}\)) and pitch(\(\phi_{d}\)) angles are obtained by using the position control input (42) as follows:  
\[\theta_{d} =\arctan\left(u_{11}\right) \tag{43}\] \[\phi_{d} =\arctan\left(\frac{u_{22}}{\sec\theta_{d}}\right). \tag{44}\]  
For notational convenience, we will use the state vector \(\chi_{p}\) throughout the following lemma and theorem that gives the stability and inverse optimality of the position control input (39). **Lemma 1**. : \(T_{2}(\chi_{z}(t),\phi(t),\theta(t),\psi(t))\Gamma_{p}^{-1}(t)\Gamma_{2}^{T}( \chi_{z}(t),\phi(t),\theta(t),\psi(t))=\gamma_{p}^{-1}I_{2\times 2}.\)__  
Proof of Lemma 1.: Using (34) and (41), we obtain  
\[T_{2}(\chi_{z}(t),\phi(t),\theta(t),\psi(t))\Gamma_{p}^{-1}(t) \Gamma_{2}^{T}(\chi_{z}(t),\phi(t),\theta(t),\psi(t))\] \[= \left\{\widetilde{u}_{1}\cdot \begin{bmatrix}\cos\psi&\sin\psi\\ \sin\psi&-\cos\psi\end{bmatrix} \cdot(\gamma_{p}\cdot I_{2\times 2}\cdot \widetilde{u}_{1}^{2})^{-1}\cdot\left(\widetilde{u}_{1}\cdot \begin{bmatrix} \cos\psi&\sin\psi\\ \sin\psi&-\cos\psi\end{bmatrix} \right)^{T}\right\}\] \[= \left\{ \begin{bmatrix}\cos\psi&\sin\psi\\ \sin\psi&-\cos\psi\end{bmatrix} \cdot{\gamma_{p}}^{-1}\cdot I_{2\times 2} \cdot \begin{bmatrix}\cos\psi&\sin\psi\\ \sin\psi&-\cos\psi\end{bmatrix} ^{T}\right\}\] \[= \gamma_{p}^{-1}I_{2\times 2}.\]  
**Theorem 2**. : _Consider the transformation matrix \(T_{2}(\chi_{z}(t),\phi(t),\theta(t),\psi(t))\), as shown in (34) satisfying Lemma 1, and the \((x,\ y)\) position system (38) of a quadrotor with the position control input (39). Then,_  
(i) Stability: _The position control input (39) asymptotically stabilize the \((x,\ y)\) position system (38) of a quadrotor. Further, the state \(\chi_{p}\) in (36) decreases exponentially with regard to the initial value, i.e.,_  
\[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]  
_with positive constants \(\alpha\) and \(\kappa\)._  
(ii) Inverse Optimality: _The \((x,\ y)\) position control input (39) of a quadrotor minimizes the objective functional_  
\[J\big{(}\chi_{p}(0),u_{p}(.)\big{)}=\int_{0}^{\infty}\big{(}\chi_{p}^{T}Q_{p} \chi_{p}+u_{p}^{T}\Gamma_{p}(t)u_{p}\big{)}dt,\]_for some positive definite matrix \(Q_{p}\) and a time varying positive definite matrix \(\Gamma_{p}(t)\)._  
**Proof of Theorem 2.