## 2 Control Strategies
### Sliding Mode Lateral Stability Control
#### 2.2.1 Modeling Approach: High-Level Layer  
This control layer relies on ideal and simplified vehicle equations to define the control objectives [8]. It combines information from sensors and estimators, thereby generating reference control signals. As already pointed out, the SMC aims at the direct control of the vehicle's side-slip angle and yaw rate. It is important to highlight that target states rely on ideal kinematic vehicle behavior, while the _High-Level layer_ is based on dynamic relations. A four-wheel vehicle model with 3-DoF is considered (Figure 3). \(F_{xij}\) and \(F_{yij}\) are the longitudinal and lateral forces; \(\delta_{j}\) is the front wheel steering angles; \(t_{i}\) is the tracks.  
Left and right wheel steer angles are supposed to equal \(\delta_{l}=\delta_{r}=\delta\). For further improvements, this assumption can be removed by considering different steering angles for right and left front tires. This leads to the increased dimension of the state space model.  
Rearranging (6) and making explicit the external yaw moment as in (37) allows us to obtain the state space model (38) of the controlled variable \(x=[\beta;r]^{T}\), with \(u=[\delta;M_{zz}]^{T}\).  
\[M_{zz}=-\frac{t_{f}}{2}(F_{xfl}-F_{xfr})cos(\delta)-\frac{t_{r}}{2}(F_{xfl}-F_ {xrr})+a(F_{xfl}+F_{xfr})sin(\delta) \tag{37}\]  
\[\hat{x}=\begin{bmatrix}\hat{\beta}\\ \hat{r}\end{bmatrix}=\begin{bmatrix}-2\frac{C_{af}+C_{ar}}{mV_{x}}&-1-2\frac{aC_ {af}-bC_{ar}}{mV_{x}^{2}}\\ 2\frac{bC_{ar}-aC_{af}}{l_{z}}&-2\frac{a^{2}C_{af}+b^{2}C_{ar}}{l_{z}V_{x}} \end{bmatrix}x+\begin{bmatrix}2\frac{C_{af}}{mV_{x}}&0\\ 2\frac{aC_{af}}{l_{z}}&\frac{1}{l_{z}}\end{bmatrix}u=Ax+Bu \tag{38}\]  
This modeling approach could also be applied to a front and rear wheels steering vehicle by increasing the dimension of matrix \(B\) to 3 \(\times\) 2 in (38), with control input \(u=[\delta_{f};\delta_{r};M_{zz}]^{T}\).  
Figure 2: Block diagram of the SMC controller.  
Considering the vector \(x_{des}=[\beta_{des};r_{des}]^{T}\) and the assumption (39), with \(k\) the \(k\)-th sampling step at a rate of \(T_{s}\), the model of (40) is valid and corresponds to the state space model of the desired side-slip angle and yaw rate, obtained by differentiation of the kinematic Equations (7) and (8).  
\[\hat{x}_{des}=\frac{d}{dt}x_{des}=\frac{x_{des}(k)-x_{des}(k-1)}{T_{s}} \tag{39}\]  
\[\hat{x}_{des}=\frac{1}{T_{s}}\begin{bmatrix}\beta_{des}(k)-\beta_{des}(k-1)\\ r_{des}(k)-r_{des}(k-1)\end{bmatrix}=\begin{bmatrix}\frac{k_{g}}{T_{s}}&0\\ \frac{k_{g}}{T_{s}}&0\end{bmatrix}u-\frac{1}{T_{s}}\begin{bmatrix}\beta_{des}( k-1)\\ r_{des}(k-1)\end{bmatrix}=B_{des}\cdot u+g \tag{40}\]  
A second order transfer function (41) is used both for the target side-slip angle and yaw rate to include the real dynamic behavior of the vehicle, which exhibits smoother conduct with respect to the one calculated in (7) and (8).  
\[\frac{x_{tar}*}{x_{tar}}=\frac{w_{n}^{2}}{s^{2}+2w_{n}s+w_{n}^{2}} \tag{41}\]  
To ensure \(x\) asymptotically converge to \(x_{tar}*\), the modeling approach described in this section is fundamental. Indeed, optimal control effort calculated by the **Intermediate-level layer** using SMC requires the knowledge of actual and target-controlled states. The control objectives are calculated at each time step, fixed in this case at 0.001 s to update the current desired path behavior. This allows the calculation of optimal control efforts.