# Design of a Morphing Aircraft Based on Model Predictive Control
## 2 Mathematical Model of a Morphing Aircraft
### LPV Description of Nonlinear Systems  
LPV systems are a class of linear systems whose models depend on measurable varying parameters and can describe the global behavior of the system along the varying parameter trajectory [24]. From Equation (5), it can be seen that, compared to conventional aircraft, the nonlinear dynamic model of the variable-span aircraft introduces the wingspan morphing ratio as an additional factor. To facilitate understanding and subsequent analysis, this nonlinear dynamic model is reformulated into the following affine nonlinear system form:  
\[\left\{ \begin{array}{l}\dot{\mathbf{x}}(t)=f(\mathbf{x}(t),\xi_{b})+g(\mathbf{x}(t),\xi _{b})\,\mathbf{u}(t)\\ \mathbf{y}(t)=\mathbf{x}(t)\end{array} \right. \tag{6}\]  
where \(\mathbf{x}(t)=\left[ \begin{array}{cccc}V&\alpha&\theta&q&h\\ \end{array} \right]^{\text{T}}\), which is the state vector; and \(\mathbf{u}(t)=\left[ \begin{array}{cccc}\delta_{e}&\delta_{t}\\ \end{array} \right]^{\text{T}}\), which is the input vector. The Jacobian linearization method is employed to construct the LPV model of the longitudinal nonlinear dynamics of the variable-span aircraft, with the wingspan morphing ratio selected as the scheduling parameter. Neglecting compound disturbances, the modeling process proceeds as follows. First, a steady-level flight condition at an altitude of 5000 m and a velocity of 40 m/s is selected. Eleven reference equilibrium points are determined, corresponding to wingspan morphing ratios varying from 0 to 1 in increments of 0.1, and the trim states are computed. Next, the relationships between the angle of attack, elevator deflection, and thrust with respect to the wingspan morphing ratio are fitted using the least squares method to obtain analytical expressions. Finally, at each reference equilibrium point, the small-perturbation linearization matrices are computed using MATLAB R2023a and fitted as functions of the wingspan morphing ratio, establishing the nominal LPV model for the longitudinal dynamics of the aircraft. \[\left\{ \begin{array}{l}\Delta\dot{\mathbf{x}}(t)=(\mathbf{A}_{0}+\mathbf{A}_{1}\xi_{b}) \Delta\mathbf{x}(t)+B\Delta\mathbf{u}(t)\\ \Delta\mathbf{y}(t)=\Delta\mathbf{x}(t)\end{array} \right. \tag{7}\]  
where \(\Delta\mathbf{x}(t)=\left[\Delta V\quad\Delta\alpha\quad\Delta\theta\quad\Delta q \quad\Delta t\right]^{\mathsf{T}}\), which is the state vector; and \(\Delta\mathbf{u}(t)=\left[\Delta\delta_{e}\quad\Delta\delta_{t}\right]^{\mathsf{ T}}\), which is the input vector. Let \(\mathbf{A}_{0}\) be the nominal system matrix, \(\mathbf{A}_{1}\) the parameter - dependent term, and \(\mathbf{B}\) the control input matrix. \(\Delta\mathbf{x}(t),\Delta\mathbf{u}(t)\), and \(\Delta\mathbf{y}(t)\) are expressed in incremental form, as follows:  
\[\left\{ \begin{array}{l}\Delta\mathbf{x}(t)=\mathbf{x}(t)-\mathbf{x}_{\text{e}}(t)\\ \Delta\mathbf{u}(t)=\mathbf{u}(t)-\mathbf{u}_{\text{e}}(t)\\ \Delta\mathbf{y}(t)=\mathbf{y}(t)-\mathbf{y}_{\text{e}}(t)\end{array} \right. \tag{8}\]  
where \(\mathbf{x}(t),\mathbf{u}(t)\), and \(\mathbf{y}(t)\) represent the actual values, and \(\mathbf{x}_{\text{e}}(t),\mathbf{u}_{\text{e}}(t)\), and \(\mathbf{y}_{\text{e}}(t)\) represent the trimmed values. \[\mathbf{x}_{\text{e}}(t)=\left[ \begin{array}{c}V_{\epsilon}\\ \alpha_{e}(\xi_{b})\\ \theta_{e}(\xi_{b})\\ q_{e}\end{array} \right]=\left[ \begin{array}{c}40\\ -0.0546\xi_{b}^{3}+0.1626\xi_{b}^{2}-0.2282\xi_{b}+0.1655\\ -0.0546\xi_{b}^{3}+0.1626\xi_{b}^{2}-0.2282\xi_{b}^{2}+0.1655\\ 0\\ 5000\end{array} \right] \tag{9}\]  
\[\mathbf{u}_{\text{e}}(t)=\left[ \begin{array}{c}\delta_{e_{e}}(\xi_{b})\\ \delta_{e_{e}}(\xi_{b})\\ \delta_{e_{e}}(\xi_{b})\end{array} \right]=\left[ \begin{array}{c}0.0071\xi_{b }^{3}-0.0254\xi_{b}^{2}-0.096\xi_{b}-0.2687\\ -31.4718\xi_{b}^{3}+79.9797\xi_{b}^{2}-75.5495\xi_{b}+54.9813\end{array} \right] \tag{10}\]  
Neglecting composite disturbances, the longitudinal LPV model for the stable flight of the morphing - wing aircraft is formulated as follows:  
\[\left\{