\chapter*{Control Methodologies for Slip Regulation: PI and Traditional Sliding Mode Approaches}
\refstepcounter{chapter}
\label{chpt: comparative design of baseline}
\addcontentsline{toc}{chapter}{PI and Traditional Sliding Mode Controllers} % <--- AGGIUNGI QUESTA RIGA
\textit{To provide a rigorous basis for comparison, this chapter details the design process of the baseline control strategies that serve as the foundation for this thesis study. The primary objective is to establish a performance benchmark by implementing two distinct control philosophies: one based on classical error-correction and the other on robust nonlinear regulation. \\
The first section covers the implementation of a standard PI, while the second focuses on the formulation of a TSMC, detailing the mathematical derivation of the switching law and the Lyapunov stability criteria required to ensure global convergence.}
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section[Vehicle Architecture and Parameters]{Vehicle's Architecture and Parameters}
\label{sec: veh_architecture&parameters}
The vehicle platform under consideration employs a Rear-Wheel Drive (RWD) architecture, characterized by the integration of two independent direct-drive motors on the rear axle. Unlike traditional internal combustion powertrains, this configuration eliminates the compliance of differentials, allowing for a high-bandwidth response to torque commands.

The model under analysis involves either known or measurable quantities and unknown constant or varying parameters.
The table below reports the main vehicle characteristic parameters, independent of operating condition.
\begin{table}[htbp]
    \centering
    \caption{Main vehicle parameters.}
    \label{tab:vehicle_parameters}
    \begin{tabular}{l c c l}
        \toprule
        \textbf{Parameter} & \textbf{Symbol} & \textbf{Value} & \textbf{Unit} \\
        \midrule
        Vehicle Mass                         & $m$                & 1600  & kg           \\
        Wheelbase                            & $L$                & 2.68  & m            \\
        Distance from CG to Front Axle       & $l_f$              & 1.796  & m           \\
        Distance from CG to Rear Axle        & $l_r$              & 1.152  & m           \\
        Vehicle Front Area                   & $A$                & 2.156  & m$^2$           \\
        Yaw Inertia                          & $J_{yaw}$          & 2700 & $kgm^2$       \\
        \midrule
        Rear Wheel Radius                         & $R_r$                & 0.343  & m           \\
        Front Wheel Radius                        & $R_f$                & 0.331  & m           \\
        Rear i-th Wheel Moment of Inertia    & $J_{Ri}$           & 1.5  & kg$\cdot$m$^2$           \\
        Front i-th Wheel Moment of Inertia   & $J_{Fi}$           & 1.5  & kg$\cdot$m$^2$           \\
        \midrule
        Maximum Motor Torque                 & $T_{EM,max}$       & 240  & Nm           \\
        Maximum Motor Power                  & $P_{EM,max}$       & 170  & kW           \\
        Motor Build-up Time                  & $\tau_{EM}$        & $\frac{1}{2\pi \cdot 10}$  & s           \\
        Gear Ratio                     & $i_g$                & 9  & -           \\
        Efficiency                           & $\eta$             & 0.95  & -           \\
        \midrule
        Gravity Acceleration                 & $g$                & 9.81  & m/s$^2$      \\
        \bottomrule
    \end{tabular}
\end{table}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Problem Statement}
\label{sec: problem_statement}
The primary objective is to develop a robust slip control system for a RWD EV equipped with two independent motors. The controller must stabilize wheel slip at a precisely calculated optimal reference value, ensuring maximum longitudinal traction and preventing loss of control during high-torque acceleration or braking.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{General Control Architecture}
\label{sec: general architecture}
To ensure a rigorous and unbiased performance evaluation, the three control strategies proposed in this thesis are implemented within a unified, modular architecture composed of different \textit{building blocks}.
\begin{figure}[H]
    \centering
    \includegraphics[width=1\textwidth]{images/GeneralControlArchitecture.png}
    \caption{General control architecture.}
    \label{fig:general_control_architecture}
    
\end{figure}
\begin{description}[style=nextline]
    \item[Slip Observer] This block is responsible for calculating the real-time longitudinal slip ($\sigma_{ij}$) for each driving wheel by processing the front wheels rotational speed ($\omega_{Fj}$) and the driving wheels rotational speed ($\omega_{Rj}$). The slip is mathematically defined as in Eq.\eqref{eq: slip mathematical definition}.
        \begin{figure}[H]
            \centering
            \includegraphics[width=0.4\textwidth]{images/slip_observer.png}
            \caption{Slip observer.}
            \label{fig: slip_observer}
        \end{figure}
    \item[Utilized Friction Estimator] It provides the controller with a direct measure of how much of the available grip is being exploited, determining the ratio of longitudinal force to vertical load currently being exerted by the wheel.
        \begin{figure}[H]
            \centering
            \includegraphics[width=0.4\textwidth]{images/utilized_friction_estimator.png}
            \caption{Utilized friction estimator.}
            \label{fig: utilized_friction_estimator}  
        \end{figure}
    \item[Reference Slip Estimator]
    This serves as the target-setting module for the control system, computing the optimal slipping condition for the tire corresponding to the observed friction condition of the road.
\end{description}

This control loop originates with the real-time acquisition of state variables from the vehicle model, including wheels angular speed ($\omega$), traction forces ($F_x$), vertical loads ($F_z$) and gas and brake pedal inputs (\texttt{Gas}, \texttt{Brake}). These signals are processed by the observation layer to derive the actual slip and the current friction utilization condition.

During nominal driving conditions, driver’s commands are passed directly to the conventional powertrain control unit. The transition to active regulation is governed by the supervisory logic of a flag (\texttt{TCSON}), which triggers the intervention of the controller only when a predefined threshold, determined by the divergence between actual and reference slip, is surpassed, indicating the onset of unstable wheel spin. The condition for the onset of active regulation is defined by:
\begin{verbatim}
    TCSON = (abs(slip)>0.9*slip_target)
\end{verbatim}

Once activated, the specific control law, whether PI, TSMC, or CISMC, assumes command of the torque distribution to mitigate the detected slip error, returning a target torque ($T_{EM}^{trg}$) for the Electric Motor Control Unit (MCU).

To complete the operational overview of the general control architecture, it is necessary to detail the physical interpretation of the controller’s output and its interaction with the vehicle's braking system. Regardless of the core algorithmic strategy deployed, the final output of the loop is structurally defined as a net driving torque request at the wheel.\\
However, during active decelerating maneuvers where the system triggers traction control intervention under braking (e.g., maintaining optimal negative slip to maximize braking force on low-adherence surfaces), a specialized torque coordination strategy is required to maintain energy efficiency. Under such conditions, if the hydraulic braking systems are actively decelerating the wheel assembly, forcing the electric motor to independently combat the primary deceleration torque would result in significant parasitic energy dissipation and unuseful electromagnetic work.

To prevent this efficiency loss, the supervisory architecture introduces a torque subtraction layer such that, when a braking command is initiated by the driver or the high-level vehicle management unit, the torque actively exerted by the hydraulic friction brakes ($T_{brake}$) is algebraically subtracted from the overall driving torque request computed by the controller ($T_{driving}^{req}$).
\begin{equation}
    T_{EM}^{trg} = T_{driving}^{req} - T_{brake}
\end{equation}

By implementing this equilibrium, the control loop effectively offsets the torque demands. The friction brake system handles a portion of the negative workload, allowing the electric motor to scale down its active power consumption while maintaining the precise net wheel torque necessary to track $\sigma_{opt}$. This coordination guarantees that the anti-slip control framework remains energetically optimized, eliminating antagonistic work between the hydraulic and electromagnetic actuators.

Consequently, this shared configuration allows for a rigorous comparative analysis of how each mathematical approach manages the inherent nonlinearities and control challenges, within a controlled and  uniform environment. 

\subsection{Utilized Friction Estimator}
The calculation is fundamentally defined by the relationship:
\begin{equation}
    \mu_{ul} = \frac{F_x}{F_z}
\end{equation}
To ensure this estimation is robust enough for real-time control, the computation algorithm implements several signal-conditioning precautions to mitigate noise and physical inconsistencies:
\begin{itemize}
    \item The vertical force $F_z$ is constrained to a minimum value ($F_{z,min} = 300 \text{ Nm}$) to prevent numerical instability or division by zero during dynamic weight transfers computation.
    \item The calculated friction candidates are clamped between predefined minimum and maximum bounds ($\mu_{max} = - \mu_{min} = 1.5$, ) to keep the values within a physically plausible range.
    \item Confidence weights based on a threshold ratio ($k_{th} = \left(\tfrac{Fx}{Fz}\right)_{th} \approx 6$) are used to prioritize previous stable estimates when current data is deemed less reliable, such as during low-force scenarios.
\end{itemize}
This $\mu_{ul}$ value is a critical input for the subsequent \hyperref[subsec: reference slip estimator]{\textbf{Reference Slip Estimator}},  as it allows the system to map the current grip usage against the theoretical limits of the road surface.

\subsection{Reference Slip Estimator} \label{subsec: reference slip estimator}
To maximize the vehicle's longitudinal performance and stability across varying track environments, a high-level \textbf{Reference Slip Estimator} block is implemented within the general supervisory architecture. This module operates as a real-time state interpreter that evaluates the current maximum adhesion capabilities of the tire and continuously computes the optimal target longitudinal slip ($\sigma_{ref} = \sigma_{opt}$).

This tracking optimization uses the analytical Burckhardt Tire Friction Model exposed in Sec. \ref{subsec: burckhardt}, which mathematically establishes the non-linear relationship between the longitudinal slip ratio and the friction coefficient ($\mu(\sigma)$) through surface-dependent parameters ($c_1$, $c_2$, $c_3$).
To compute the optimal slip values corresponding to the seven different road conditions listed in Table \ref{tab:road_coefficients}, the first-order necessary condition for a maximum at the friction peak is exploited:
\begin{align}
    \sigma_{opt} = \arg\max_\sigma \mu(\sigma)
    \\
    \sigma_{opt} : \frac{\partial{\mu}}{\partial{\sigma_{opt}}} = 0 
\end{align}

Performing the partial derivative with respect to slip on Eq. \eqref{eq: burckhardt mu_sigma relationship}, it's possible to derive the formal definition of optimal slip as function of Buckhardt parameters:
\begin{equation}
    \sigma_{opt} = \frac{1}{c_2} \ln\left(\frac{c_1c_2}{c_3}\right)
\end{equation} 
From this, peak friction coefficient value can be retrieved as only function of  Buckhardt parameters:
\begin{equation}
    \mu_{max} = c_1-\frac{c_3}{c_2}\left(1+\ln\left(\frac{c_1c_2}{c_3}\right)\right)
\end{equation}

This allows to build a standardized dataset of peak friction coefficient and optimal slip values for the seven road conditions reported in  Table \ref{tab:road_coefficients}:
\begin{table}[H]
    \centering
    \caption{Burckhardt Tire Model Peak Friction and Optimal Slip Standardized Values}
    \label{tab: mu_sigma standard values}
    \begin{tabular}{lccc}
        \toprule
        & $\sigma_{opt,k}$ & $\mu_{max,k}$ & $k$\\
        \midrule
        Asphalt, dry     & 0.17 & 1.1700 & 1 \\
        Asphalt, wet     & 0.13  & 0.8013 & 2 \\
        Concrete, dry    & 0.16 & 1.0900 & 3 \\
        Cobblestone, dry & 0.40 & 1.0000 & 4 \\
        Cobblestone, wet & 0.14 & 0.3800 & 5 \\
        Snow             & 0.06 & 0.1900 & 6 \\
        Ice              & 0.04   & 0.0500 & 7 \\
        \bottomrule
    \end{tabular}
\end{table}
To determine which environmental condition (e.g., Dry Asphalt, Wet Asphalt, Snow, Ice, etc.) matches the physical terrain in real time, the module operates an active matching algotihm, where the instantaneous state pair ($\mu_{ul}$, $\sigma$) forms a dynamic operating point in the friction-slip plane. \\
For each standard road, a \textit{predicted fricion coefficient} as function of the measured slip ($sigma_{Rj}$):
\begin{equation}
    \mu_{Rj}(\sigma_{Rj}) = sign(\sigma_{Rj}) \cdot c_1 (1 - e^{-c_2 \sigma_{Rj}}) - c_3 \sigma_{Rj}
\end{equation}
At each time step, the algorithm evaluates the consistency between $\mu_{ul,Rj}$ and $\mu_{Rj}(\sigma_{Rj})$ and derives a set of weight coefficients $w_{k}$  that quantify the likelihood of each road model:
\begin{equation}
    w_{k,Rj} = \frac{1}{|\mu_{Rj}(\sigma_{Rj})-\mu_{ul,Rj}| + \varepsilon}
\end{equation}
where $k = 1,2,...,7$ identifies the road condition from the ones listed in Tab. \ref{tab: mu_sigma standard values}, and $\varepsilon$ is a tolerance introduced to avoid division by zero.

Finally, the optimal slip ratio ($\sigma_{opt,Rj}$) and maximum friction coefficient ($\mu_{max,Rj}$) corresponding to the real-time operation can be obtained:
\begin{align}
    \mu_{max,Rj} = \frac{\sum_{k=1}^7 w_{k,Rj} \ \mu_{max,k}}{\sum_{k=1}^7 w_{k,Rj}}
    \\
    \sigma_{opt,Rj} = \frac{\sum_{k=1}^7 w_{k,Rj} \ \sigma_{opt,k}}{\sum_{k=1}^7 w_{k,Rj}}
\end{align}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Design of PI Control Logic}
\label{sec: PID_design}
The first baseline control strategy proposed is a Proportional-Integral (PI) controller for slip regulation.
The input of the PI controller is the error between driving wheel's actual rotational speed and reference rotational speed corresponding to optimal slip condition for maximum traction. The output of the PI controller is a driving torque request at the wheel.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Reference Rotational Speed}
The PI control block directly reacts to the error $e_j$ between reference and actual rotational speed of the wheel:
\begin{equation}
    e_j = \omega_{ref,Rj} - \omega_{Rj}
\end{equation}
The reference rotational speed for the wheel is the one corresponding to the optimal slip ratio condition, derived from Eq.\eqref{eq: slip theoretical definition}:
\begin{equation}
    \omega_{ref,Rj} = \begin{cases}
     \frac{\omega_{driven_{Rj}}}{1-\sigma_{opt,Rj}}, \quad \quad \quad \quad \quad \quad \ \text{traction}
     \\
     \omega_{driven_{Rj}}(1+\sigma_{opt,Rj}), \quad \text{braking}
    \end{cases}
\end{equation}
\begin{figure}[H]
    \centering
    \includegraphics[width=0.4\textwidth]{images/reference_rotv.png}
    \caption{Reference rotational speed estimator.}
    \label{fig: reference_rotv}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Control Law} \label{subsec: pi_control_law}
The control law for the PI control strategy is derived from the rotational equilibrium equation at the wheel of Eq. \eqref{eq: driving trq}:
\begin{equation} \label{eq: T_drive PI}
    T_{drive, Rj} = I_w\dot{\omega}_{Rj}+F_{x,Rj}R_R
\end{equation}
Expressing the traction force as function of vehicle speed ($V$): 
\begin{equation}\label{eq: Fx of V}
    F_{x,Rj} = m\dot{V} R_R
\end{equation}
Differenziating according to the expression of the slip ratio as function of vehicle speed:
\begin{equation}
    \begin{cases}
    &\sigma_{Rj} = \frac{\omega_{Rj} R_R - V}{\omega_{Rj} R_R}
    \\
    &\dot{V} = \dot{\omega}_{Rj}R_R\ \ (1-\sigma_{Rj}) - \omega_{Rj} R_R \ \dot{\sigma}_{Rj} \label{eq: V_dot}
    \end{cases}
\end{equation}
We can substitute Eq. \eqref{eq: Fx of V} and \eqref{eq: V_dot} in Eq. \eqref{eq: T_drive PI} to obtain a new expression of driving torque request at the wheel:
\begin{equation} \label{eq: T_drive PI full mathematical expression}
    T_{drive, Rj} = [I_w + m\ (1-\sigma_{Rj})\ R_R^2] \ \dot{\omega}_{Rj} - m\omega_{Rj} R_R^2 \ \dot{\sigma}_{Rj}
\end{equation}
This definition allows for treating the driving torque request as the resultant of two main dynamics contributions:
\begin{align}
    &T_{drive, Rj} = T_{ctrl,Rj} + \Delta T_{Rj}
    \\
    &\begin{cases}
        &T_{ctrl, Rj} = [I_w + m\ (1-\sigma_{Rj})\ R_R^2] \ \dot{\omega}_{Rj}
        \\
        &\Delta T_{Rj} = -m\omega_{Rj} R_R^2 \ \dot{\sigma}_{Rj}
    \end{cases}
\end{align}

The \textbf{control torque} $T_{ctrl}$ is the output torque of the PI, retrieved from Eq. \eqref{eq: T_drive PI full mathematical expression} considering null rate for the slip ratio ($\dot{\sigma}_{Rj} = 0$). This term models the dynamics of the wheels, forcing the real-time wheel rotational speed to be the same as the reference rotational speed ($\omega_{ref}$) corresponding to optimal slip condition.
\begin{equation}
\begin{cases}
    T_{ctrl, Rj} = k_p\ e_j + k_i\ \int e_j(t) dt
    \\
    e_j = \omega_{ref,Rj} - \omega_{Rj}
\end{cases}
\end{equation}

The \textbf{torque error} $\Delta T$ between driving torque request and control torque is directly proportional to $\dot{\sigma}_{Rj}$ and is representative of the disturbances on the system and uncertainces of the parameters, related to slip dynamics.

A \textbf{compensation torque} $T_{cmps}$ is implemented in the control law to correct the error in torque, and it's saturated considering a maximum compensation capability equal to 20\% of maximum electric motor torque \cite{ASR_PID}:
\begin{equation}
    T_{cmps,Rj} =
    \begin{cases}
    0.2\cdot T_{EM}^{max}, &\quad \Delta T_{Rj}>0.2\cdot T_{EM}^{max} \\
    \Delta T_{Rj}, &\quad -0.2\cdot T_{EM}^{max}<\Delta T_{Rj}<0.2\cdot T_{EM}^{max} \\
    -0.2\cdot T_{EM}^{max}, &\quad \Delta T_{Rj}<-0.2\cdot T_{EM}^{max}
    \end{cases}
\end{equation}

Finally, the driving torque request at the wheel is obtained by sum of the two contributions:
\begin{equation}
    T_{drive, Rj} = T_{ctrl,Rj} + T_{cmps,Rj}
\end{equation}

In Fig. \ref{fig: PI_controller_scheme} a schematic representation of the control law implementation inside the control loop.

\begin{figure}[H]
    \centering
    \includegraphics[width=1\textwidth]{images/PI_controller_scheme.png}
    \caption{PI control scheme.}
    \label{fig: PI_controller_scheme}
\end{figure}
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Design of Traditional Sliding Mode Control Logic}
\label{sec: TSMC_design}
The second baseline control strategy proposed is a Traditional Sliding Mode (TSM) controller for slip regulation. TSMC works by applying a discontinuous, high-frequency switching command to force the system's state onto a predefined \textit{sliding surface}, representing the ideal stable trajectory in the system’s state-space, which forces the tracking error convergence to zero, and then maintain it there despite disturbances or model uncertainties.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Sliding Surface Definition}\label{subsec: SlidingSurface_TSMC}
The foundational step in the synthesis of a sliding mode control strategy involves the mathematical definition of an appropriate sliding surface within the system state space. Being the primary objective of slip regulation for traction control to force the actual wheel slip to asymptotically track the optimal target reference calculated by the upper-level observation layer, in the traditional form of a SMC, the sliding surface ($s$) is chosen as coincident with the error in slip ratio \cite{TraditionalSMC}:
\begin{equation}\label{eq: SlidingSurface_TSMC}
    s_j \equiv e_j = \sigma_j - \sigma_{opt_j}
\end{equation}
During the initial \textit{reaching phase}, the controller applies a high-frequency switching law to force the system state trajectories toward the surface in finite time. Once the surface is reached, the system enters the \textit{sliding phase}, where the state is strictly constrained to $s=0$. On this ideal trajectory, the tracking error is identically zero, and the system dynamics become completely decoupled from external matched disturbances, parameter uncertainties, and the severe nonlinearities inherent to the tire-road interface.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Control Law}\label{subsec: ControlLaw_TSMC}
A proper control law has been defined for the TSMC, in order to guarantee controller's ability of driving the system trajectories toward the sliding surface and maintaining them within it.

As illustrated in the structural layout of the controller in Fig. \ref{fig: TSMC_scheme}, the output of the control law, which is a driving torque request at the wheel, here referenced to as the \textbf{command torque} $T_{cmnd,Rj}$, is analytically decomposed into two distinct components:
\begin{align}
    T_{drive, Rj} &= T_{cmnd,Rj} \\
    &T_{cmnd_{Rj}} = T_{eq, Rj} + T_{sw, Rj}
\end{align}

This dual formulation decouples the control action into a \textit{continuous} model-based term and a \textit{discontinuous} robust term, each addressing a specific phase of the sliding mode execution.

The \textbf{equivalent torque} $T_{eq}$ is a continuous term enforcing the condition $s=0$ in the nominal model. It is derived under the ideal nominal condition where the derivative of the sliding surface is zero ($\dot{s} = 0$). By isolating the nominal wheel dynamics, which are governed by the wheel inertia and the longitudinal tire force acting at the tire radius, the equivalent torque is formulated as:
\begin{equation}
    T_{eq, Rj} = I_w \dot \omega_{Rj} + F_{x, Rj}R_R
\end{equation}
This component effectivelty establishes a baseline torque required to balance the rotational wheel acceleration with the active longitudinal tire-road forces.

The \textbf{switching torque} $T_{sw}$ is a robust discontinuous term designed to account for unmodeled dynamics, parametric variations, and the severe nonlinearities of the tire-road interface that deviate from the nominal model. It is mathematically defined as proportional to the sign of $s$ and is representative of slip dynamics ($\dot s$):
\begin{equation}\label{eq: Tsw_TSMC}
   T_{sw, Rj} = -K\cdot sign(s_j) 
\end{equation}
where $K$ is a constant positive \textit{switching gain}, calibrated to overcome the maximum bounded uncertainties of the system.

Because the signum function switches instantaneously between $\pm 1$ based on the polarity of the slip tracking error, the switching law introduces a strict bang-bang behavior within the actuator command. \\ While this aggressive discontinuous switching mathematically guarantees deterministic convergence and absolute robustness against matched disturbances, its high-frequency chattering nature presents severe physical limitations, which will be addressed in subsequent sections.

\subsubsection{Wheel's Dynamics}
To accurately bridge the kinematic state requirements with the physical limitations of the powertrain, a dedicated wheel's angular acceleration estimator is implemented. This evaluates the required wheel angular acceleration by differentiating the slip definition of Eq. \ref{eq: slip theoretical definition}:
\begin{equation}
    \dot \omega _{Rj} = \begin{cases}
        \frac{\dot \omega _{driven, j}\ (1-\sigma_j) + \omega _{driven, j} \ \dot \sigma_j}{(1-\sigma_j)^2}, &\quad \text{traction}
        \\
        \dot \omega _{driven, j} \ (1+\sigma_j) + \omega _{driven, j} \ \dot \sigma_j, &\quad \text{braking}
    \end{cases}
\end{equation}

In an unconstrained state model, rapid changes in surface friction conditions or high-frequency switching from the sliding mode controller can cause this calculated derivative to spike to physically impossible values. To prevent numerical instability and maintain absolute consistency with the vehicle's physical limits, an actuator-boundary guard is integrated into the block logic.

The maximum achievable angular acceleration is strictly bounded by the maximum electromagnetic torque available from the motor ($T_{EM}^{max}$) scaled through gear ratio and inertia:
\begin{equation}
    \dot \omega _{Rj}^{max} = \frac{T_{EM}^{max}\cdot i_g\cdot \eta_{EM}}{I_w}
\end{equation}

\begin{equation}
    \dot \omega _{Rj} =
    \begin{cases}
    \dot \omega _{Rj}, &\quad |\dot \omega _{Rj}|\le \dot \omega _{Rj}^{max}
    \\
    \dot \omega _{Rj}^{max} \cdot sign(\dot \omega _{Rj}), &\quad |\dot \omega _{Rj}| > \dot \omega _{Rj}^{max}
    \end{cases}
\end{equation}
\newline\newline

\begin{figure}[H]
    \centering
    \includegraphics[width=1\textwidth]{images/TSMC_scheme.png}
    \caption{TSM control scheme.}
    \label{fig: TSMC_scheme}
    
\end{figure}
\newpage
\subsection{Proof of Stability}\label{subsec: lyapunov_TSMC}
To guarantee that the system state trajectory converges to the sliding surface $s= 0$ in finite time and remains strictly restricted to it, a formal stability analysis must be conducted utilizing the \textbf{Lyapunov Direct Method}.\\
For an individual wheel assembly, a positive-definite scalar Lyapunov candidate function is formulated \cite{LyapunovTSMC}:
\begin{equation}
\begin{cases}
    V(s_j) = \frac{1}{2}s_j^2 >0,\quad \forall s_j \ne 0 
    \\
    V(0) = 0
\end{cases}
\end{equation}
According to Lyapunov stability criteria, the system is asymptotically stable if the time derivative of the chosen candidate function is strictly negative-definite ( $\dot V(s_j)<0$) outside the equilibrium. This condition enforces the classic sliding reaching condition:
\begin{equation}\label{eq: condition for lyapunov stability}
    \dot V(s_j) = \dot s_j s_j < 0, \quad \forall s_j \ne 0
\end{equation}
Recalling that the traditional sliding surface is defined to coincide directly with the slip tracking error (Eq. \eqref{eq: SlidingSurface_TSMC}) its time derivative corresponds to the tracking slip error dynamics:  
\begin{equation}
    \dot s_j = \dot \sigma_j - \dot \sigma_{opt_{j}}
\end{equation}
Applying nonlinear slip dynamics derived earlier with Eq. \eqref{eq: Tsw_TSMC}, we choose:
\begin{equation}\label{eq: dot_s_TSMC}
    \dot s_j = -K \cdot sign(s_j)
\end{equation}
This gives the following Lyapunov function derivative:
\begin{equation}
     \dot V(s_j) = -K \cdot sign(s_j) \ s_j = -K \cdot |s_j| \le 0
\end{equation}
Finally, choosing a constant positive gain ($K>0$) for the switching term ensures asymptotic stability for the system (Eq. \eqref{eq: condition for lyapunov stability}).
