# Sliding Mode Control Algorithms for Anti-Lock Braking Systems with Performance Comparisons
## 4 Validation Case Study
\begin{array}{c}M_{1}=\frac{I_{1}}{r_{1}}[-k_{0}I_{e_{v}}-k_{1}e_{v}+k( \lambda_{d})\theta\varphi(\lambda)-\frac{r_{1}}{f_{1}}(d_{1}x_{1}+M_{10})+(1- \lambda_{d})\frac{r_{2}}{f_{2}}(d_{2}x_{2}+M_{20})],\\ \dot{I}_{e_{v}}=e_{v},e_{v}=r_{2}x_{2}(\lambda-\lambda_{d}),\\ k(\lambda_{d})=r_{1}^{2}/f_{1}+r_{2}^{2}/f_{2}\cdot(1-\lambda_{d}),\end{array}  \tag{16}\]  
where the control design parameters are \(k_{0}=18,k_{1}=26\) selected as in [36], the constant parameters specific to the ABS system are \(J_{1}=7.528\times 10^{-3},J_{2}=25.603\times 10^{-3}\) corresponding to the inertial moments of the upper and lower wheels, respectively, and measured in [kg m\({}^{2}\)], the viscous frictions \(d_{1}=120\times 10^{-6},J_{2}=225\times 10^{-6}\) are measured in  
Figure 5: The slip feedback control system where the slip controller is replaceable with any of the following designed controllers. [kg m\({}^{2}\)/s], the static frictions in the upper and lower wheel are \(M_{10}=3\times 10^{-3},M_{20}=93\times 10^{-3}\) in [Nm]. The terms \(\varphi(\lambda)=\sin(C_{x}\text{arctan}(B_{x}\lambda)),\theta=\mu D_{x}\) are used to approximate the original term \(\mu F_{n}(\lambda)=\theta\varphi(\lambda)\) related to the normal force \(F_{n}\) from the original ABS equations [1], with the so-called Pacejka's magic formula, for the parameter's values \(C_{x}=1.68,B_{x}=28,D_{x}=22.9\), \(\mu=0.95\). A notable observation is that the control law (16) is directly expressed in the braking torque \(M_{1}\), thus neglecting the actuator dynamics. To make the controller (16) compatible with controllers (8) and (13), \(M_{1}\) is transformed back into control input \(u\) by using the simplified actuator model, that is \(u(t)=M_{1}(t)/\chi\). To be consistent with the control inputs calculated by the LSMC and RSMC laws (8) and (13), respectively, the braking torque \(M_{1}(t)\) is further saturated to [-9;9] after being calculated from (16). (2) _A reinforcement learning model-free controller_. Another controller used for comparisons is a neural network (NN)-based one that was learned under model-free (unknown dynamics) principle using reinforcement Q-learning. As presented in the third case study of the work [33], the reinforcement learning controller (further referred to as simply RL) is a feed-forward NN with 6 inputs, two hidden layers, each having ten neurons with hyperbolic tangent activation function and one output layer having one neuron with linear activation. This NN controller's input is a virtual state \(\mathbf{x}(k)=[x_{1}(k),x_{2}(k),x_{1}(k-1),x_{2}(k-1),\\ u(k-1),\lambda_{d}(k)]\) built from: the current sample values of the two wheels' speeds and their previous sample values, the previous control input and the current sample desired slip. The previous sample values account for the un-measurable state \(M_{1}(k)\) of the actuator to ensure that the reinforcement Q-learning deals with a fully observable Markov decision process. Although the controller was learned from transition samples collected in discrete-time by interacting with the process under the conditions presented in [33], this discrete-time is made compatible with the fixed time step-size of the continuous-time SMC controllers. The RL controller learned to brake for various initial speeds \(x_{1}(0),x_{2}(0)\) and for various slip set points. An additional NN was used (called the Q-function NN) to store the state-action cost function. From a functional perspective, the RL controller is a state-feedback one--it uses \(x_{1},x_{2}\) separately and not compacted in the slip equation--as opposed to the output-feedback SMC-based ones and to the output-feedback ADC one who use \(\lambda\) directly. The learning was performed in an episodic style: each braking scenario starting from a non-zero speed \(x_{1}(0)=x_{2}(0)\) under the current episode controller generates input-output transition samples that were used to build a virtual state of past input-output samples. The batch of transition samples were added to enrich a database that grows with each braking episode.