## 4 Yaw Stability Control Method for the Liquid Tank Semi-Trailer and Its Implementation  
### General Architecture of Yaw Stability Control Method for the Liquid Tank Semi-Trailer  
The general architecture of the yaw stability control method for the liquid tank semi-trailer is shown in Figure 7. The TP model calculates the force and torque generated by liquid sloshing, the TruckSim software provides the real-time state parameters of the vehicle, and the reference model provides the expected values of state parameters of the vehicle. The difference between the real-time state parameters and the stable state parameters is controlled by the tractor yaw rate fuzzy PID controller, the semi-trailer yaw rate fuzzy PID controller, and the articulation angle fuzzy PID controller, and the final additional yaw moment required by the tractor and semi-trailer is obtained after the weighted control of the above three. The additional yaw moment of the vehicle is provided by the braking torque of the wheels. Through the braking torque distribution and the wheel slip rate control, the braking torque of each wheel of the tractor and the semi-trailer is fed back to the TruckSim software to correct the state of the vehicle in real-time, to achieve the yaw stability control of the liquid tank semi-trailer. Calculation of the Additional Yaw Moment of Yaw Stability Control Method for the Liquid Tank Semi-Trailer  
Considering the high nonlinearity of the liquid tank semi-trailer model, the fuzzy PID controller with a simple structure and strong robustness is taken to calculate the additional  
Figure 7: The general architecture of the multi-object PID differential braking-control method. The control parameters of the fuzzy PID controller are  
\[\left\{ \begin{array}{l}K_{P}=K_{P0}+\Delta K_{P}\cdot k_{uP}\\ K_{I}=K_{I0}+\Delta K_{I}\cdot k_{uI}\\ K_{D}=K_{D0}+\Delta K_{D}\cdot k_{uD}\end{array} \right. \tag{20}\]  
where \(K_{P0},\ K_{I0},\ K_{D0}\) are the initial values of the parameters of the fuzzy PID controller; \(\Delta K_{P},\ \Delta K_{I},\ \Delta K_{D}\) are the outputs of the fuzzy controller; \(k_{uP},\ k_{uI},\ k_{uD}\) are the scale factors of the fuzzy PID controller; and \(K_{P},\ K_{I},\ K_{D}\) are the actual control values of the controller. The parameters of the fuzzy PID controller are set as follows: deviation \(e\), deviation change rate \(e_{c}\), and PID parameter variation \(\Delta K_{P},\ \Delta K_{I},\ \Delta K_{D}\) all adopt the Gaussian membership function. After fuzzification, the fuzzy values of deviation \(e\) and deviation change rate \(e_{c}\) are \([-6,6]\), while those of the PID parameters \(\Delta K_{P},\ \Delta K_{I},\ \Delta K_{D}\) are \([-1,1]\). The language variables are negative big (NB), negative middle (NM), negative small (NS), zero (ZO), positive small (PS), positive middle (PM), and positive big (PB), and the corresponding fuzzy subsets are [NB, NM, NS, ZO, PS, PM, PB]. Finally, the input and output of the fuzzy PID controller are shown in Figure 9. The surface relationships between the input value and the output value are shown in Figure 10. The fuzzy rules of parameters \(\Delta K_{P},\ \Delta K_{I},\ \Delta K_{D}\) are shown in Tables 3-5. Through the above analysis, the additional yaw moment provided by the tractor yaw rate fuzzy PID controller \(M_{\omega_{1}}\), the additional yaw moment provided by the fuzzy PID controller for the yaw rate of the semi-trailer \(M_{\omega_{2}}\), and the additional yaw moment provided by the articulation angle fuzzy PID controller \(M_{\theta}\) can be obtained by Equation (21).