# Sliding Mode Control Algorithms for Anti-Lock Braking Systems with Performance Comparisons
## 3 Sliding Mode Control Design
### Reaching Law Sliding Mode Control Design with Partial Process Model Uncertainty  
For the non-linear second-order process model (3), the feedback error between the desired slip and the actual one is captured by the following variable:  
\[g(t)=\lambda(t)-\lambda_{d}(t), \tag{9}\]  
that also acts as a switching variable for the RSMC design, as seen next. The derivative of the slip variable is:  
\[\dot{\lambda}(t)=\frac{x_{1}(t)(f_{2}(t)+g_{2}(t)u(t))-(f_{1}(t)+g_{1}(t)u(t))x _{2}(t)}{x_{2}^{2}(t)}, \tag{10}\]  
and by separating the terms of the expression for obtaining an expression affine with respect to the control input, we have:  
\[\dot{\lambda}(t)=\frac{f_{2}(t)x_{1}(t)-f_{1}(t)x_{2}(t)}{x_{2}^{2}(t)}+\frac {x_{1}(t)g_{2}(t)-g_{1}(t)x_{2}(t)}{x_{2}^{2}(t)}u(t), \tag{11}\]  
which simply can be compactly written as:  
\[\dot{\lambda}(t)=f(t)+b(t)u(t). \tag{12}\]  
Let the control law be chosen as:  
\[u=b^{-1}(t)[-f(t)+\dot{\lambda}_{d}-k\text{sgn}(g)]. \tag{13}\]  
By replacing the command law from (13) into (12), the dynamic of the switching variable is obtained as in:  
\[\dot{g}=-k\text{sgn}(g),\text{ where }\dot{g}=\dot{\lambda}-\dot{\lambda}_{d}. \tag{14}\]  
Depending on the slip derivative \(\dot{\lambda}\), the two analyzed cases are:  
1. \(g>0\) involves \(\dot{g}=-k\cdot 1\Rightarrow\dot{g}<0\), meaning that \(g\) is decreasing to zero. 2. \(g<0\) involves \(\dot{g}=k\Rightarrow\quad\dot{g}>0\), meaning that \(g\) is increasing to zero. Figure 3: The dependence \(k_{1}(\lambda_{d})\) for the reaching-law-based sliding mode controller (RSMC) stability analysis case. The most relevant advantage of the RSMC design is that a finite time of reaching the switching surface \(g=0\) is guaranteed, calculated as \(t_{a}=|g(0)|/k\). It is unlikely that in practice, the model \(\dot{\lambda}(t)=f(t)+b(t)u(t)\) is a true representation of the reality. Hence, for the subsequent control design, this model is considered as partially uncertain, the true model being of the form \(\dot{\lambda}(t)=\hat{f}(t)+b(t)u(t)\) in which the assumed bounded uncertainty \(\left|\hat{f}-f\right|\leq U_{F}\) includes unmodeled dynamics, parametric uncertainties and external disturbances, with \(U_{F}\) an user-selectable upper bound to account for the worst case disturbance scenario. In this case, for the control law having the expression (13), the switching variable dynamic of the true model becomes \(\dot{g}=\hat{f}-f-k\mathrm{sgn}(g)\). In order to guarantee a finite reaching time in the presence of modeling uncertainties, two cases are again identified:  
1. The case \(g>0\). For a finite reaching time, it is necessary that \(\dot{g}<-\eta\), with \(\eta>0\) as a positive constant. In this case, it is necessary that \(\hat{f}-f-k\leq-\eta\Leftrightarrow k\geq\hat{f}-f+\eta\). Since \(\left|\hat{f}-f+\eta\right|\leq\left|\hat{f}-f\right|+\eta\leq U_{F}+\eta\), a value \(k\geq U_{F}+\eta\) ensures a finite reaching time at most equal to \(|g(0)|/\eta\). 2. The case \(g<0\). In similar reasoning, a value as \(k\geq U_{F}+\eta\) ensures \(\dot{g}>\eta\) which involves that the attainment of the finite reaching time is \(|g(0)|/\eta\) at most. The steps of the RSMC algorithm (Algorithm 2) at the current numerical integration step are summarized next. **Algorithm 2. ** The RSMC Algorithm  
The stability of the control system under the RSMC control law is next asserted. **Theorem 2**. : _The ABS system (3), (4) with the RSMC control law (13) is asymptotically stable._  
Proof of Theorem 2.: Let a Lyapunov function candidate be \(V(g(\mathbf{x}))=0.5g^{2}(\mathbf{x})\). We observe that the control law (13) leads to the dynamic of the switching variable being \(\dot{g}=-k\mathrm{sgn}(g)\). These dynamics ensures that \(\dot{V}(\mathbf{x})=g(\mathbf{x})\dot{g}(\mathbf{x})\) is negative and bounded away from 0 by a suitable selection of a larger \(k\). Which in turn ensures that \(V(g(\mathbf{x}))\to 0\) over time.