# A Tube Linear Model Predictive Control Approach for Autonomous Vehicles Subjected to Disturbances
## 3 Vehicle Dynamics Model
### Lateral Dynamics and Tracking Error Model  
As shown in Figure 3, the following set of differential equations were employed to describe the vehicle motion [32]:  
\[\ddot{y}=m^{-1}\Big{(}F_{yr}+F_{xf}\sin\delta+F_{yf}\cos\delta\Big{)}-\dot{\psi }\dot{y}, \tag{18}\]  
\[\ddot{\psi}=I_{z}\ ^{-1}\Big{(}l_{f}F_{xf}\sin\delta+l_{r}F_{yf}\cos\delta-l_{ r}F_{yr}\Big{)}, \tag{19}\]  
where \(m\) and \(I_{z}\) are the vehicle mass and inertia moment of vehicle, respectively. \(F_{xf}\) and \(F_{xr}\) express the force of the front and rear axles along the longitudinal directions, respectively. \(F_{yf}\) and \(F_{yr}\) represent the force of the front and rear axles along the lateral directions, respectively. \(\delta\) expresses the steering angle of the front tire, \(\psi\) represents the heading angle, and \(\dot{x}\) and \(\dot{y}\) represent the velocity of the center mass along the longitudinal \(X_{l}\) and lateral \(Y_{l}\) direction of vehicle coordinate, respectively. \(l_{f}\) and \(l_{r}\) express the longitudinal distance from the center mass to the front and rear axles, respectively.  
The state equations of the bicycle model can be described as follows [32]:  
\[\dot{\mathbf{x}}=A_{k}\mathbf{x}+B_{k}\delta, \tag{20}\]  
where \(\mathbf{x}=\left[\dot{y},y,\dot{\psi},\psi\right]^{T}B_{k}=\left[\left(C_{af}T \right)/m,0,\left(l_{f}C_{af}T\right)/l_{z},0\right]^{T}T\) is the sample time.  
\[A_{k}=\left[\begin{array}{llll}-\frac{\left(C_{af}+C_{ar}\right)T}{mv_{x}}&0& \frac{\left(l_{r}C_{ar}-l_{f}C_{af}\right)T}{mv_{x}}&0\\ 1&0&0\\ \frac{\left(l_{r}C_{ar}-l_{f}C_{af}\right)T}{l_{z}v_{x}}&0&\frac{\left(l_{r} \,^{2}C_{ar}-l_{f}\,^{2}C_{af}\right)T}{l_{z}v_{x}}&0\\ 0&1&0\end{array}\right]\.\]  
Equation (20) can be expressed as  
\[\dot{\mathbf{x}}=f(\mathbf{x},\delta). \tag{21}\]  
The point on the reference trajectory should satisfy Equation (21) as follows:  
\[\dot{\mathbf{x}}_{r}=f(\mathbf{x}_{r},\delta_{r}), \tag{22}\]  
where \(\mathbf{x}_{r}=\left[\dot{y}_{r},y_{r},\dot{\psi}_{r},\psi_{r}\right]^{T}\) and \(\delta_{r}\) are the reference state and steering angle, respectively.  
When one expands Equation (21) at one point of reference trajectory by a Taylor series expansion, then--when only keeping the first-order terms--we can obtain  
\[\dot{\mathbf{x}}=f(\mathbf{x}_{r},\delta_{r})+\frac{\partial f(\mathbf{x}, \delta)}{\mathbf{x}}|_{\begin{array}{l}\mathbf{x}=\mathbf{x}_{r}\\ \delta=\delta_{r}\end{array}}\left.(\mathbf{x}-\mathbf{x}_{r})+\frac{ \partial f(\mathbf{x},\delta)}{\delta}\right|_{\begin{array}{l}\mathbf{x}= \mathbf{x}_{r}\\ \delta=\delta_{r}\end{array}}\left.(\delta-\delta_{r}). \tag{23}\]  
When subtracting Equation (22) from Equation (23) and discretizing it with the Forward Euler method, we can obtain  
\[\mathbf{\tilde{x}}(k+1)=A_{k}\mathbf{\tilde{x}}(k)+B_{k}\widetilde{\delta}(k), \tag{24}\]  
where \(\widetilde{\delta}=\delta-\delta_{r}\) and  
\[\mathbf{\tilde{x}}=\left[(\dot{y}-\dot{y}_{r}),(y-y_{r}),\left(\dot{y}-\dot{ \psi}_{r}\right),(\psi-\psi_{r})\right]^{T}. \tag{25}\]  
Figure 3: Schematic of the bicycle model.