# Error Dynamics Based Dual Heuristic Dynamic Programming for Self-Learning Flight Control
## 2 Mathematical Model of Air Vehicle  
The kinematical and dynamical equations of the air vehicle are shown below.  
\[\dot{\Omega}=g_{s}\omega+\frac{1}{m\upsilon}F_{s} \tag{1}\]  
\[\dot{\omega}=-\Big{(}I^{\sigma(t)}\Big{)}^{-1}\mu I^{\sigma(t)}\omega+\Big{(}I^ {\sigma(t)}\Big{)}^{-1}M \tag{2}\]  
where \(\Omega=[\alpha,\beta,\gamma_{V}]^{\mathrm{T}}\) and \(\omega=[\omega_{x},\ \omega_{y},\ \omega_{z}]^{\mathrm{T}}\) are the system state vectors. \(\alpha\), \(\beta\), and \(\gamma_{V}\) denote the attack angle, sideslip angle, and bank angle separately; \(\omega\) is the angular rate vector with roll rate \(\omega_{x}\), yaw rate \(\omega_{y}\), and pitch rate \(\omega_{z}\). \(m\) and \(\upsilon\) are the mass and the velocity of the vehicle.  
For the slow loop subsystem (1), the concrete expressions of \(g_{s}\) and \(F_{s}\) are as follows:  
\[g_{s}=\begin{bmatrix}-\cos\alpha\mathrm{tan}\beta&\sin\alpha\mathrm{tan}\beta &1\\ \sin\alpha&\cos\alpha&0\\ \cos\alpha\mathrm{sec}\beta&-\sin\alpha\mathrm{sec}\beta&0\end{bmatrix},\ \ \ F_{s}=\begin{bmatrix}-F_{y}/\cos\beta\\ F_{z}\\ (F_{y}\cos\gamma_{V}-F_{z}\mathrm{sin}\gamma_{V})\mathrm{tan}\beta+F_{y}\mathrm{ tan}\beta\end{bmatrix}\]  
For the fast loop subsystem (2), the concrete expressions of \(I^{\sigma(t)}\), \(\mu\), and \(M\) are as follows:  
\[I^{\sigma(t)}=\begin{bmatrix}I_{x}^{\sigma(t)}&-I_{xy}^{\sigma(t)}&-I_{xz}^{ \sigma(t)}\\ -I_{xy}^{\sigma(t)}&I_{y}^{\sigma(t)}&-I_{yz}^{\sigma(t)}\\ -I_{zx}^{\sigma(t)}&-I_{zy}^{\sigma(t)}&I_{z}^{\sigma(t)}\end{bmatrix},\ \mu=\begin{bmatrix}0&-\omega_{z}&\omega_{y}\\ \omega_{z}&0&-\omega_{x}\\ -\omega_{y}&\omega_{x}&0\end{bmatrix},\]  
\[M=\begin{bmatrix}M_{x}\\ M_{y}\\ M_{z}\end{bmatrix}=\begin{bmatrix}C_{mx}^{\sigma(t)}(Ma,\alpha,\beta,\delta) qSl\\ C_{my}^{\sigma(t)}(Ma,\alpha,\beta,\delta)qSl\\ C_{mz}^{\sigma(t)}(Ma,\alpha,\beta,\delta)qSl\\ C_{mz}^{\sigma(t)}(Ma,\alpha,\beta,\delta)qSl\end{bmatrix}=\begin{bmatrix} \Big{(}C_{mx}^{\sigma(t)}(Ma,\alpha,\beta)+C_{mx}^{\sigma(t)}(Ma,\alpha, \beta,\delta)\Big{)}qSl\\ \Big{(}C_{mx}^{\sigma(t)}(Ma,\alpha,\beta)+C_{mx}^{\sigma(t)}(Ma,\alpha,\beta, \delta)\Big{)}qSl\end{bmatrix}\]  
where \(\sigma(t)\) describes different morphing configurations of the air vehicle; \(\theta\) is the trajectory inclination angle; \(F_{y}\) is the normal force and \(F_{z}\) is the lateral force; \(I^{\sigma(t)}\) is the moment of inertia matrix; \(q=\rho\upsilon^{2}/2\) denotes the dynamic pressure; \(S\) and \(l\) are the reference area and reference aerodynamic chord, respectively. \(C_{m*\_basic}^{\sigma(t)}(Ma,\alpha,\beta)\) is the aerodynamic moment coefficient, and \(C_{m*\_\delta}^{\sigma(t)}(Ma,\alpha,\beta,\delta)\) is the control moment coefficient induced by the control surface; \(Ma\) is the Mach number and \(\delta\) is the control surface vector.  
Remark: _the research object is a morphing air vehicle, and the moment of inertia \(\overline{I}^{\sigma(t)}\) and the aerodynamic coefficient \(C_{m*}^{\sigma(t)}\) change with different configurations, which can be derived by linear interpolation._  
However, uncertainties always present for the nominal parameters during flight. Therefore, to ensure the robustness of the air vehicle's flight control, the uncertain parameters in systems (1) and (2) cannot be neglected, described as:  
\[\left\{\begin{array}{c}I=\overline{I}^{\sigma(t)}(1+\Delta I)\\ m=\overline{m}(1+\Delta m)\\ \rho=\overline{p}(1+\Delta\rho)\\ C_{m*}^{\sigma(t)}=\overline{C}_{m*}^{\sigma(t)}(1+\Delta C_{m})\end{array}\right. \tag{3}\]  
where the expressions \((\overline{\bullet})\) are the nominal value of the key parameters, and the parametric uncertainties are assumed to be bounded. Uncertain parameters can affect the system modeling and control effect. This uncertainty model will be applied in chapter 4 to verify the effectiveness and robustness of ED-DHP.