## 2 Materials and Methods
### Upper-Stability Controller Design  
#### 2.4.1 Design of ASR-Driven Anti-Slip Controller  
The anti-slip drive controller utilizes a fuzzy PID control method. Its primary control objective is to reduce the slip rate of the wheels when the controller detects that it exceeds a threshold, keeping it near the target slip rate. Generally, the optimal slip rate of the wheels ranges from 10% to 20%, ensuring sufficient friction between the wheels and the ground to provide effective traction and braking performance [27; 28]. In this study, the optimal slip rate was set at 0.15, ensuring that both longitudinal and lateral adhesion coefficients of the wheels remained high. When the calculated slip rate of the wheels exceeded the threshold of 0.15, the deviation from the target value and its rate of change were computed. The control algorithm then determined the correction value \(\Delta T\) for the anti-slip torque of each wheel, ensuring that the wheel slip rate remained within an appropriate range. Calculation of the Wheel Slip Rate  
The slip rates of the wheels, denoted as \(\lambda_{\text{wij}}\), are determined as follows:  
\[\lambda_{\text{wij}}=\frac{\omega_{\text{wij}}R-v_{\text{xij}}}{\max(\omega_{ \text{wij}}R,v_{\text{xij}})} \tag{7}\]  
In Equation (7), \(v_{\text{xij}}\) represents the velocity of each wheel in the longitudinal axis direction, where \(i=f\), \(r\); \(j=l\), \(r\); when the slip rate \(\lambda_{\text{wij}}>0\), the wheel is in a slip condition; when the slip rate \(\lambda_{\text{wij}}<0\), the wheel is in a skidding condition. Design of Fuzzy PID Controller  
The fuzzy PID control algorithm employs the principles of fuzzy mathematics to formulate fuzzy rules, which, along with the initial PID control parameters, are stored in a knowledge base. The controller responds to actual parameter changes, offering robust, and widely applicable characteristics [29]. Fuzzy PID was used for active control of the ASR drive anti-slip system. In order to ensure that the slip rate of each wheel would fall in a stable region, the fuzzy domain was divided into \([-3,-2,-1,0,1,2,3]\) based on the actual range of slip rate deviation and its change rate and combined with the accuracy requirements of the control system. At the same time, in order to describe the different degrees of slip rate deviation and the change rate more carefully, so as to improve the sensitivity and accuracy of the control system, seven fuzzy subsets were defined. These subsets were negative big (NB), negative medium (NM), \begin{table}
\begin{tabular}{c c c} \hline \hline
**The Value of the Road Adhesion Coefficient \(\mu\) Is Taken** & \(B_{1}\) & \(B_{2}\) \\ \hline
0–0.2 & 0.284 & 2.577 \\
0.2–0.4 & 0.297 & 3.345 \\
0.4–0.6 & 0.303 & 4.228 \\
0.6–0.8 & 0.357 & 4.654 \\
0.8–1 & 0.357 & 5.573 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Stability determination parameters. \begin{table}
\begin{tabular}{c c} \hline \hline
**Speed (km/h)** & **Critical Value of the Lateral Angular Speed Deviation K for the Unstable Zone** \\ \hline
5 & 0.0195 \\
10 & 0.0200 \\
15 & 0.0205 \\
20 & 0.0210 \\
25 & 0.0215 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The critical value of yaw rate deviation \(K\) in the instability zone. negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive big (PB). The output was the torque adjustment for the wheels, with its fuzzy domain and subsets aligned with the input quantities. The membership functions were triangular in the middle and Gaussian on the sides. This ensures the control smoothness, and the responseability of the system is enhanced under extreme conditions. The membership functions for the input and output quantities are shown in Figure 5.  
Based on the principles of fuzzy rule establishment, fuzzy rules were formulated according to the changes in wheel slip rates. The final fuzzy control rules are shown in Table 4.  
The controller model was established in MATLAB/Simulink.