# 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
**  
(i) _Stability:_ Substituting (39) into the \((x,\ y)\) position system (38) of a quadrotor, we obtain  
\[\dot{\chi}_{p} =A_{p}\chi_{p}+B_{p}(t)\big{(}-\Gamma_{p}^{-1}(t)B_{p}^{T}(t)P_{p} \chi_{p}\big{)}\] \[=\big{(}A_{p}-B_{p}(t)\Gamma_{p}^{-1}(t)B_{p}^{T}(t)P_{p}\big{)} \chi_{p}\] \[=\big{(}A_{p}-B_{p,0}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))B_{p,0 }^{T}P_{p}\big{)}\chi_{p}. \tag{45}\]  
From Lemma 1, (45) can be rewritten as  
\[\dot{\chi}_{p} =\Big{\{}A_{p}-B_{p,0}\gamma_{p}^{-1}I_{2\times 2}B_{p,0}^{T}P_{p} \Big{\}}\,\chi_{p}\] \[=\Big{\{}A_{p}-\gamma_{p}^{-1}B_{p,0}B_{p,0}^{T}P_{p}\Big{\}}\, \chi_{p} \tag{46}\]  
Consider the positive definite function \(V(\chi_{p})=\chi_{p}^{T}P_{p}\chi_{p}\) as a Lyapunov function candidate. Differentiating \(V(\chi_{p})\) with respect to the time and substituting (45), we obtain  
\[\dot{V}(\chi_{p}) =\chi_{p}^{T}P_{p}\chi_{p}+\chi_{p}^{T}P_{p}\dot{\chi}_{p}\] \[=\bigg{\{}\bigg{(}A_{p}-\frac{1}{\gamma_{p}}B_{p,0}B_{p,0}^{T}P_{ p}\bigg{)}\chi_{p}\bigg{\}}^{T}P_{p}\chi_{p}+\chi_{p}^{T}P_{p}\bigg{(}A_{p}- \frac{1}{\gamma_{p}}B_{p,0}B_{p,0}^{T}P_{p}\bigg{)}\chi_{p}\] \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]0  
Since \(P_{p}\) is a symmetric matrix satisfying the equation \(P_{p}=P_{p}^{T}\), we obtain  
\[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]1 \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]2 \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]3 \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]4 \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]5  
Therefore, we have \(V\big{(}\chi_{p}(t)\big{)}\leq V\big{(}\chi_{p}(0)\big{)}e^{-\alpha t}\), which implies the exponential stability of the system. When the time goes to infinity, the state \(\chi_{p}\) related to the \((x,\ y)\) position of a quadrotor goes to zero. Therefore this result solves the position control problem (9). (ii) _Inverse Optimality:_ In order to prove the inverse optimality, we use the comparison Lemma [19]. Then, we have  
\[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]6  
Therefore, we can check that \(V\big{(}\chi_{p}(t)\big{)}\) has a finite value. In addition, using (39) and (40), \(\dot{V}(\chi_{p})\) can be rewritten as  
\[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]7From the definition of \(V(\chi_{p})=\chi_{p}^{T}P_{p}\chi_{p}\), we know that \(\lim_{t\to\infty}V\big{(}\chi_{p}(t)\big{)}=0\) is satisfied. Therefore, integrating (47) with respect to time from zero to infinity, we obtain  
\[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]8 \[\chi_{p}(t)\leq\alpha\chi_{p}^{-\kappa t},\ \ \lim_{t\to\infty}\chi_{p}(t)=0,\]9  
Because \(Q_{P}\) and \(P_{p}\) are positive definite matrices, matrices \(Q_{p}\), \(P_{p}\), \(\Gamma_{p}(t)\), \(A_{p}\), and \(B_{p}(t)\) satisfy the matrix-type HJB equation  
\[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,\]0  
Then, \(u_{p}=-k_{p}(\chi_{z},\phi,\theta,\psi)\cdot\chi_{p}\) is the optimal solution for the objective functional (48).