# Inverse Optimal Design for Position Control of a Quadrotor
## 3 Design of Inverse Optimal Position Controller
### Altitude Control of a Quadrotor
In addition, the state \(\chi_{z}\) in (14) decreases exponentially with regard to the initial value_, i.e.,  
\[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]  
_with positive constants \(\alpha\) and \(\kappa\)._  
(ii) Inverse Optimality: _The pseudo altitude control input (17) of a quadrotor minimizes the objective functional_  
\[J\big{(}\chi_{z}(0),v_{1}(.)\big{)}=\int_{0}^{\infty}\Big{(}\chi_{z}^{T}(t)Q_ {z}\chi_{z}(t)+\gamma_{alt}(t)\|v_{1}(t)\|^{2}\Big{)}\,dt,\]  
_for a positive definite matrix \(Q_{z}\) and the \(\gamma_{alt}(t)>0\)._  
**Proof of Theorem 1. **  
_(i) Stability:_ Substituting (17) into (16), we obtain the altitude system (16) of a quadrotor as follows:  
\[\dot{\chi}_{z} =A_{z}\chi_{z}-\gamma_{alt}^{-1}(t)B_{z}(t)\,\Big{(}B_{z}^{T}(t)P _{z}\chi_{z}\Big{)}\] \[=\Big{(}A_{z}-\gamma_{alt}^{-1}(t)B_{z}(t)B_{z}^{T}(t)P_{z}\Big{)} \,\chi_{z}\] \[=\Big{(}A_{z}-\gamma_{alt}^{-1}(t)B_{z,0}T_{1}^{2}(\phi,\theta) B_{z,0}^{T}P_{z}\Big{)}\,\chi_{z}. \tag{22}\]  
By using (19), (22) can be rewritten as follows:  
\[\dot{\chi}_{z}= \big{(}A_{z}-\frac{1}{\gamma_{z}}B_{z,0}B_{z,0}^{T}P_{z}\big{)} \chi_{z}. \tag{23}\]  
Consider the positive definite function \(V(\chi_{z})=\chi_{z}^{T}P_{z}\chi_{z}\) as a Lyapunov function candidate. Differentiating \(V(\chi_{z})\) with respect to the time and substituting (23), we obtain  
\[\dot{V}(\chi_{z}) =\chi_{z}^{T}P_{z}\chi_{z}+\chi_{z}^{T}P_{z}\dot{\chi}_{z}\] \[=\bigg{\{}\,\bigg{(}A_{z}-\frac{1}{\gamma_{z}}B_{z,0}B_{z,0}^{T}P _{z}\bigg{)}\,\chi_{z}\  
_(ii) Inverse Optimality:_ In order to prove the inverse optimality, we use the comparison Lemma [19]. Then, we have  
\[0<V\big{(}\chi_{z}(t)\big{)}\leq V\big{(}\chi_{z}(0)\big{)}e^{-\alpha t }<\infty.\]  
Therefore, we can check that \(V(\chi_{z}(t))\) has a finite value. In addition, using (17)-(19), \(\dot{V}(\chi_{z})\) can be rewritten as follows:  
\[-\dot{V}(\chi_{z})=\chi_{z}^{T}Q_{z}\chi_{z}+\gamma_{alt}(t)v_{1}^{T}v_{1}. \tag{24}\]  
From the definition of \(V(\chi_{z})=\chi_{z}^{T}P_{z}\chi_{z}\), we can show that \(\lim_{t\to\infty}V\big{(}\chi_{z}(t)\big{)}=0\) is satisfied. Therefore, integrating (24) with respect to time from zero to infinity, we have  
\[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]0 \[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]1  
Because \(Q_{z}\) and \(P_{z}\) are positive definite matrices, the matrices \(Q_{z}\), \(P_{z}\), \(\gamma_{alt}(t)\), \(A_{z}\), and \(B_{z}(t)\) satisfy the matrix-type HJB equation  
\[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]2  
Then, \(v_{1}=-k_{z}(\phi,\theta)\cdot\chi_{z}\) is the optimal solution for the objective functional (25). By using (19), (26) can be changed as follows:  
\[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]3  
Therefore, the inverse optimal pseudo altitude control input (17) is the optimal solution for the objective functional (25), because (27) has the same form as that of the HJB equation. Therefore, the pseudo altitude control input \(v_{1}\) is the optimal solution for the objective functional (25) and the altitude system (16) of a quadrotor. This result thus solves the problem of inverse optimality. **Remark 1**. : _In the system expressed by (16), for input coupling matrix \(B_{z}(t)\) given in (15) and the \(\gamma_{alt}(t)\) given in (19), are satisfied the following equation:_  
\[\chi_{z}(t)\leq\alpha\chi_{z}^{-\kappa t},\ \lim_{t\to\infty}\chi_{z}(t)=0,\]4  
_Specially, if \(\gamma_{alt}(t)\) is set appropriately like (19), the time varying matrix term, such as the left side of (28), is replaced by a constant matrix term like the right side of (28). Meanwhile, (28) is used to demonstrate stability and inverse optimality._  
**Remark 2**.