## 3 Identification of the Engine Dynamics  
The recursive least squares (RLS) algorithm is well known for tracking dynamic systems. [PERSON] et al. [33] attempted to identify the dynamics of the gas turbine engine offline, mainly at steady states with stochastic signals. [PERSON] et al. [34] focused on real-time identification for transient operations and concluded that an engine system could be averaged to a time-invariant first- or second-order transfer function by the extended RLS. The tracking speed and accuracy for the RLS could be improved with a different design of forgetting factors. The effect of using a forgetting factor is to shift the estimating average toward the most recent data, such as that in the work by [PERSON] et al. [35]. In this paper, a modified RLS algorithm (RLS with a varying stabilizing factor (RLS-SV)) is investigated for the online dynamic identification of gas turbine engines. The method is capable of updating itself to adapt to the change of engine dynamics due to the variation of engine transient levels and operating conditions. The main structure of the model and controller is shown in Figure 2. The modified RLS model is developed to track the detailed gas turbine engine model, and the ICV method is used to predict the transient behavior. The output of the model is imported to the MPC controller, where reference inputs and constraints are analyzed as well. The MPC controller calculates the optimized fuel flow at any instantaneous time for the engine. This control input will satisfy all engine control modes and \begin{table}
\begin{tabular}{l c c} \hline Ambient condition & ISA SLS & [-] \\ Intake Mach number & 0 & [-] \\ Intake mass flow & 44.8 & kg/s \\ Low-pressure compressor pressure ratio (LPC-PR) & 1.70 & [-] \\ Low-pressure compressor isentropic efficiency & 88 & \% \\ High-pressure compressor pressure ratio (HPC-PR) & 5.60 & [-] \\ High-pressure compressor isentropic efficiency & 88 & \% \\ Bypass ratio & 0.69 & [-] \\ Fuel flow & 0.2466 & kg/s \\ High-pressure turbine isentropic efficiency & 89 & \% \\ Low-pressure turbine isentropic efficiency & 89 & \% \\ Moment of inertia for low-pressure shaft & 10 & Nm\({}^{2}\) \\ Moment of inertia for high-pressure shaft & 8.4 & Nm\({}^{2}\) \\ Percentage of low-pressure shaft corrected rotational speed at 170 RPS & 100 & \% \\ Percentage of high-pressure shaft corrected rotational speed at 177 RPS & 100 & \% \\ Volume 1 & 1.50 & m\({}^{3}\) \\ Volume 2 & 0.50 & m\({}^{3}\) \\ Volume 3 & 0.38 & m\({}^{3}\) \\ Volume 4 & 0.50 & m\({}^{3}\) \\ \hline \end{tabular}
\end{table} 
Table 1: Design point of the twin-spool turbofan engine. constraints simultaneously while guaranteeing the optimized operation for the engine based on a predefined objective function. A general format of the discrete state-space model is shown in Equation (1). The state matrix (X) contains state variables that are from engine parameters relative to the output variable including shaft speed, compressor pressure ratio, and thrust. The output matrix (Y) is a subset of the state matrix. The input matrix (U) contains the control inputs and fuel flow, which controls the engine to fulfill the desired output. Moreover, A, B, and C are the system, input, and output matrices, respectively. \[ \begin{array}{c}\mathrm{X(k+1)=AX(k)+BU(k)}\\ \mathrm{Y_{m}(k)=CX(k)}\end{array}  \tag{1}\]  
The coefficient matrices (A, B) in the state-space model are being identified and updated at each time step for adapting the nonlinear engine dynamics. If there are \"m\" number of engine state variables, and \"n\" number of engine input parameters, \"A\" is a square matrix with the dimensions of \(\mathrm{m}\times\mathrm{m}\), and \"B\" has the dimensions of \(\mathrm{m}\times\mathrm{m}\). The coefficient \"C\" is fixed because of the recursive requirement, and the output must be a subset of the states. The parametric matrix and the objective matrix become:  
\[\varphi=\left[ \begin{array}{cc}\mathrm{X}^{T}&\mathrm{U}^{T}\end{array}  \right]^{T};\theta(t)=\left[