# Sliding Mode Control Algorithms for Anti-Lock Braking Systems with Performance Comparisons
## 3 Sliding Mode Control Design
### Lyapunov-Based Sliding Mode Control Design with Included Uncertainties in the Process Model  
A convenient artificial construction of a Lyapunov type function is used indirectly in determining a control law that ensures at the same time the stability of the entire control system. The resulting controller is called the LSMC controller in the following. Let the state-space model of the ABS system be rewritten from (3) as  
\[ \begin{array}{c}\dot{x}_{1}=f_{1}(\mathbf{x}(t))+g_{1}(\mathbf{x}(t))u(t)+v_ {1}(t)\,\ \ \mathbf{x}=[x_{1}\ \ \ x_{2}]^{T},\\ \dot{x}_{2}=f_{2}(\mathbf{x}(t))+g_{2}(\mathbf{x}(t))u(t)+v_{2}(t)\,\end{array}  \tag{5}\]  
where \(v_{1}\) and \(v_{2}\) are additive terms accounting for unmodeled dynamics, external disturbances and parametric uncertainties. A switching variable is defined as \(g(t)=\lambda(t)-\lambda_{d}(t)\), with \(\lambda_{d}(t)\) the desired slip. We notice that since the simplified slip in (2) is \(\lambda=1-x_{1}/x_{2}\), then \(g(t)=\lambda-\lambda_{d}=1-x_{1}/x_{2}-\lambda_{d}=0\) is equivalent to the sliding surface line equation \(x_{1}-(1-\lambda_{d})x_{2}=0\) which is consistent with the more familiar definition of the sliding surface in the form \(g(\mathbf{x},t)=0\). Let \(V\big{(}g(\mathbf{x}=[x_{1}\ x_{2}]^{T})\big{)}=0.5g^{2}(\mathbf{x})\geq 0\) be a Lyapunov function depending on \(g(\mathbf{x})\). Then \(\dot{V}(g(\mathbf{x}))=g(\mathbf{x})\dot{g}(\mathbf{x})\), and furthermore, to ensure the reaching condition of the sliding surface \(g(\mathbf{x})=0\), it is sufficient to have \(\dot{V}<0\), or, for reaching \(g(\mathbf{x})=0\) in finite time  
Then, to ensure the reaching condition \(\dot{V}<0\), the following two cases, each with two subcases are developed as:  
\[ \begin{split} g(t)>0\text{, }\dot{g}<0\text{ }\Leftrightarrow G(t)u(t)<\tau(t)- \widetilde{v}(t)\text{ }\text{where }:\\ (\text{a})\text{ }G(t)>0\text{ }\rightarrow\text{ }u(t)<\frac{\tau(t)- \widetilde{v}(t)}{G(t)}\text{ };\text{ }(\text{b})\text{ }G(t)<0\text{ }\rightarrow\text{ }u(t)>\frac{\tau(t)- \widetilde{v}(t)}{G(t)}.\end{split} \]  
\[ \begin{split} g(t)<0\text{, }\dot{g}>0\text{ }\Leftrightarrow G(t)u(t)>\tau(t)- \widetilde{v}(t)\text{ }\text{where }:\\ (\text{a})\text{ }G(t)>0\text{ }\rightarrow\text{ }u(t)>\frac{\tau(t)- \widetilde{v}(t)}{G(t)}\text{ };\text{ }(\text{b})\text{ }G(t)<0\text{ }\rightarrow\text{ }u(t)<\frac{\tau(t)- \widetilde{v}(t)}{G(t)}.\end{split} \]  
Finally, the control law that ensures the fulfillment of the reaching condition \(\dot{V}<0\) in all four subcases is captured by the LSMC control law:  
\[ \begin{split} u(t)=-\Big{(}\frac{|\tau(t)|+\text{max}}{|G(t)|}+ \delta\Big{)}\text{sgn}_{\Delta}(g(t)G(t)),\\ \text{sgn}_{\Delta}(\bullet)\overset{def}{=}\frac{\bullet}{| \bullet|+\Delta},\end{split}  \tag{8}\]  
with \(\Delta>0\) ensuring a smooth implementation of the mathematical _sign_ function denoted \(\text{sgn}_{\Delta}(\bullet)\) and prevents the division by zero in calculations. \(\delta>0\) ensures conservative fulfilment of the inequalities in the four subcases above [6]. The steps of the LSMC algorithm (Algorithm 1) at the current numerical integration step are given next. **Algorithm 1. ** The LSMC Algorithm  
For an insight into the derivation of the LSMC control law (8), please consult the Appendix A. The stability of the control system under the LSMC control law is next asserted. **Theorem 1**. : _The ABS system (3), (4) with the LSMC control law (8) is asymptotically stable._  
**Proof of Theorem 1. ** The control law (8) is selected to ensure the reaching condition \(\dot{V}(\mathbf{x})=g(\mathbf{x})\dot{g}(\mathbf{x})<0\). By an increased value of \(\delta>0\), the value of \(\dot{V}(\mathbf{x})\) is bounded away from \(0\) (see also Appendix A). Which in turn ensures that the Lyapunov function \(V(g(\mathbf{x}))=0.5g^{2}(\mathbf{x})\to 0\) over time implying reaching for the sliding surface in finite time.