# Integrated Adaptive Cruise Control with Weight Coefficient Self-Tuning Strategy
## 2 Modeling of Integrated Car-Following System
### Lateral Dynamics Model  
As shown in Equation (6), a 2-DOF model is always used for the lateral stability controller design [19; 12]. Additionally, the matrix representation of Equation (6) is described as  
\[\dot{\mathbf{x}}_{2}=\mathbf{\Psi}\mathbf{x}_{2}+\mathbf{\Pi}\mathbf{u}_{2}+\mathbf{\Gamma}\mathbf{w}_{2} \tag{12}\]  
where \(\mathbf{x}_{2}=[\beta,\,\omega_{r}]^{T}\), \(u_{2}=M_{z,des}\), \(\mathbf{w}_{2}=\delta\), \(\mathbf{\Psi}\), \(\mathbf{\Pi}\) and \(\mathbf{\Gamma}\) are the state matrices, mathematically expressed as  
\[\mathbf{\Psi} =\left[\begin{array}{cc}-\frac{k_{f}+k_{r}}{mv_{x}}&\frac{kk_{r} -ak_{f}}{mv_{x}^{2}}-1\\ \frac{kk_{r}-ak_{f}}{T_{z}}&-\frac{a^{2}k_{f}+b^{2}k_{r}}{T_{z}v_{x}}\\ \end{array}\right]\] \[\mathbf{\Pi} =\left[0,\,\,\frac{1}{T_{z}}\right]^{T}\] \[\mathbf{\Gamma} =\left[\frac{k_{f}}{mv_{x}},\,\,\frac{ak_{f}}{T_{z}}\right]^{T}\]  
Unlike the longitudinal dynamics model, the lateral dynamics model, whose state matrices change with the longitudinal speed \(v_{x}\), is time-varying. This means that the discretization of the state matrices should be carried out in every control cycle, with \(p\) (the length of the predictive horizon) times increased on this basis if the receding horizon control (e.g., MPC) method is employed. Additionally, the main problem this causes is that the system's real-time performance will be greatly worsened. To reduce the considerable computational burden, a linear parameter-varying (LPV) method [20] is applied, changing the nonlinear model into a linear parameter-varying one.  
Firstly, the state matrix \(\mathbf{\Psi}\) can be described as  
\[\mathbf{\Psi} =\left[\begin{array}{cc}0&-1\\ \frac{kk_{r}-ak_{f}}{l_{z}}&0\\ \end{array}\right]+\left[\begin{array}{cc}-\frac{k_{f}+k_{r}}{m}&0\\ 0&-\frac{a^{2}k_{f}+b^{2}k_{r}}{l_{z}}\\ \end{array}\right]\frac{1}{v_{x}}+\left[\begin{array}{cc}0&\frac{kk_{r}-ak_{ f}}{m}\\ 0&0\\ \end{array}\right]\frac{1}{v_{x}^{2}}\] \[=  
Secondly, two boundary vectors can be obtained because \(p_{1}\) and \(p_{2}\) achieve maximum / minimum values at the same time.  
\[\mathbf{P}_{1}=[p_{1,\max}\;,\;p_{2,\max}],\mathbf{P}_{2}=[p_{1,\min}\;,\;p_{2,\min}] \tag{14}\]  
Then, the local linearization of Equation (13) in the boundaries can be expressed as  
\[\mathbf{\Psi}_{b,j}=\mathbf{\
abla}_{0}+\sum\limits_{i=1}^{2}\mathbf{\
abla}_{i}\mathbf{P}_{j }(i),\;j=1,\;2. \tag{15}\]  
Thirdly, employing the zero-order hold (ZOH) method [5] with a sample time \(T_{s}\), the discretization of the state matrices in the boundaries can be expressed as  
\[\begin{array}{l}\mathbf{A}_{b,j}=\sum\limits_{i=0}^{\infty}\frac{\mathbf{\
abla}_{b, j}^{i}\;T_{s}^{i}}{i!}\\ \mathbf{B}_{b,j}=\sum\limits_{i=1}^{\infty}\frac{\mathbf{\
abla}_{b,j}^{i-1}\;T_{s}^{ i}}{i!}\mathbf{\Pi},\;j=1,\;2.\\ \mathbf{G}_{b,j}=\sum\limits_{i=1}^{\infty}\frac{\mathbf{\
abla}_{b,j}^{i-1}\;T_{s}^{ i}}{i!}\mathbf{\Gamma}\end{array} \tag{16}\]  
Finally, a two state space model for the lateral dynamics can be formulated as  
\[\mathbf{x}_{2}(k+1|k)=\mathbf{A}_{2}\mathbf{x}_{2}(k)+\mathbf{B}_{2}\mathbf{u}_{2}(k)+\mathbf{G}_{2} \mathbf{w}_{2}(k) \tag{17}\]  
where \(\mathbf{x}_{2}(k)=[\beta(k),\,\omega_{r}(k)]^{T}\), \(\mathbf{u}_{2}(k)=M_{z,des}(k)\), \(\mathbf{w}_{2}(k)=\delta(k)\), \(\mathbf{A}_{2}=\sum\limits_{j=1}^{2}w_{b,j}\mathbf{A}_{b,j}\), \(\mathbf{B}_{2}=\sum\limits_{j=1}^{2}w_{b,j}\mathbf{B}_{b,j}\), \(\mathbf{G}_{2}=\sum\limits_{j=1}^{2}w_{b,j}\mathbf{G}_{b,j}\), \(w_{b,j}\) is weight coefficient, and \(\sum\limits_{j=1}^{2}w_{b,j}=1\), \(w_{b,j}>0\).  
During the MPC control process, the discretization of the state matrices, shown as Equation (16), is just carried out once. Additionally, in each control cycle, only the weight coefficient \(w_{b,j}\) needs to be adjusted. Therefore, the LPV method has its merits in solving the problem earlier mentioned.