## 3 Design of an Adaptive Compound Controller for Reference Model
### Upper-Layer Controller  
In this section, the MPC is used to determine the required yaw moment for steering. The predictive model is a critical component of MPC, as it accurately captures the dynamic characteristics of the controlled system and enables real-time problem-solving. The predictive model in this section is a nonlinear 2-DOF model that accounts for the external yaw  
Figure 5: 2-DOF vehicle dynamics model. moment. As presented in Equation (22), the external yaw moment \(M_{z}\) is incorporated into Equation (15) as follows:  
\[I_{z}\dot{\gamma}=F_{y,f}\cos\delta_{f}I_{f}-F_{y,f}I_{r}+M_{z} \tag{22}\]  
Based on the linear relationship between the tire slip angle and the lateral force, the system's nonlinear state-space representation can be linearized as follows:  
\[\dot{\textbf{x}}=f(\textbf{x},u)\triangleq\textbf{A}\textbf{x}+\textbf{B}u+ \textbf{C}\delta_{f} \tag{23}\]  
where  
\[\textbf{x}= \begin{cases}\beta\\ \gamma\end{cases} ,\ u=M_{z},\ \textbf{A}= \begin{bmatrix}\frac{K_{f}+K_{r}}{m \upsilon_{x}}&-1+\frac{l_{f}K_{f}-l,K_{r}}{m\upsilon_{x}^{2}}\\ \frac{l_{f}K_{f}-l_{r}K_{r}}{l_{z}}&\frac{l_{f}^{2}K_{f}+l^{2}K_{r}}{l_{z} \upsilon_{x}}\end{bmatrix} ,\ \textbf{B}= \begin{bmatrix}0\\ \frac{1}{l_{z}}\end{bmatrix} ,\ \textbf{C}= \begin{bmatrix}-\frac{K_{f}}{m \upsilon_{x}}\\ -\frac{l_{f}K_{f}}{l_{z}}\end{bmatrix}  \tag{24}\]  
The predictive model is discretized with an equal step size of \(\Delta\tau\), retaining only the first-order terms. At each discrete step, the steering angle \(\delta_{f}\) is treated as a constant value, \(d\). Taking into accounting that \(\Delta u(t_{k})=u(t_{k})-u(t_{k}-\Delta\tau)\), the incremental state-space representation is thus obtained as follows:  
\[\zeta(t_{k}+\Delta\tau)=\hat{\textbf{A}}\zeta(t_{k})+\hat{\textbf{B}}\Delta u (t_{k})+\hat{\textbf{C}}d \tag{25}\]  
\[\textbf{x}^{T}(\,t_{k}+j\Delta\tau|t_{k})=\boldsymbol{\Phi}\hat{\textbf{A}}^ {j}\zeta(t_{k})+\boldsymbol{\phi}\sum_{i=0}^{j-1}\hat{\textbf{A}}^{j-i-1} \big{[}\hat{\textbf{B}}\Delta u(t_{k}+i\Delta\tau)+\hat{\textbf{C}}d\big{]}, \quad i\in[0,c],j\in[1,p] \tag{26}\]  
where  
\[\zeta(t_{k})= \begin{cases}\textbf{x}(t_{k})\\ u(t_{k}-\Delta\tau)\end{cases} ,\ \hat{\textbf{A}}= \begin{bmatrix}\textbf{A} \Delta\tau+\textbf{I}&\textbf{B}\Delta\tau\\ \textbf{0}&\textbf{I}\end{bmatrix} ,\ \hat{\textbf{B}}= \begin{bmatrix}\textbf{B} \Delta\tau\\ \textbf{I}\end{bmatrix} ,\ \hat{\textbf{C}}= \begin{bmatrix}\textbf{C}\Delta\tau\\ \textbf{0}\end{bmatrix}  \tag{27}\]  
The predictive equation, with a prediction horizon of \(p\) steps and a control horizon of \(c\) steps, is defined as follows:  
\[\textbf{X}_{k,p} =\big{[}\textbf{x}^{T}(\,t_{k}+\Delta\tau|t_{k}),\textbf{x}^{T}( \,t_{k}+2\Delta\tau|t_{k}),\dots,\textbf{x}^{T}(\,t_{k}+p\Delta\tau|t_{k}) \big{]}^{T} \tag{28}\] \[=\textbf{S}_{c}[\zeta(t_{k})]+\textbf{S}_{u}\Delta u(t_{k})+ \textbf{S}_{d}d\]  
where  
\[\textbf{S}_{c}[\zeta(t_{k})]=\Big{[}\boldsymbol{\[PERSON]}\hat{\textbf{A}}\quad \boldsymbol{\[PERSON]}\hat{\textbf{A}}^{2}\quad\cdots\quad\boldsymbol{\[PERSON]}\hat{ \textbf{A}}^{c}\quad\cdots\quad\boldsymbol{\[PERSON]}\hat{\textbf{A}}^{p}\Big{]}^{T} \tag{29}\]  
\[\textbf{S}_{u}= \begin{bmatrix}\boldsymbol{\[PERSON]}\hat{\textbf{B}}&0&\cdots&0\\ \boldsymbol{\Phi}\hat{\textbf{A}}\hat{\textbf{B}}&\boldsymbol{\Phi}\hat{ \textbf{B}}&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ \boldsymbol{\Phi}\hat{\textbf{A}}^{c}\hat{\textbf{B}}&\boldsymbol{\Phi}\hat{ \textbf{A}}^{c-1}\hat{\textbf{B}}&\cdots&\boldsymbol{\Phi}\hat{\textbf{A}} \hat{\textbf{B}}\\ \vdots&\vdots&\ddots&\vdots\\ \boldsymbol{\Phi}\hat{\textbf{A}}^{p-1}\hat{\textbf{B}}&\boldsymbol{\Phi}\hat{ \textbf{A}}^{p-2}\hat{\textbf{B}}&\cdots&\boldsymbol{\Phi}\hat{\textbf{A}}^{p -c}\hat{\textbf{B}}\end{bmatrix}  \tag{30}\]  
\[\textbf{S}_{d}=