# Trajectory Tracking Control Strategy of 20-Ton Heavy-Duty AGV Considering Load Transfer
## 5 Trajectory Tracking Co-Simulation Analysis Based on Simulink and CarSim
### Establishment of a Simulation Model  
The basic parameters of the heavy-duty AGV are shown in Table 1.  
After setting the various parameters of AGV, as shown in Table 1 in CarSim, it is imported into Simulink, and a joint simulation model of the control strategy is established in Simulink, as shown in Figure 9.  
Figure 9 demonstrates the following:  
1. The IMPC controller receives the state reference quantities (\(\alpha_{r}\), \(y_{r}\), \(\theta_{r}\)) output by the reference trajectory, the control reference quantities (\(v_{r}\), \(\delta_{fr}\), \(\delta_{rr}\)), and the actual pose (\(x\), \(y\), \(\theta\)) of the AGV from CarSim. By solving the constrained objective function described above, the front and rear wheel angles and the desired velocity are calculated;
2. The PID velocity controller computes and outputs the total driving torque \(T_{d}\) of the AGV based on the error between the actual velocity and the desired velocity;
3. The torque distribution controller receives the total driving torque \(T_{d}\) calculated by the PID velocity controller and allocates it into the driving torques \(T_{df}\) and \(T_{dr}\) of the front and rear drive motors according to the vertical load proportion allocation method, which is then output to the CarSim module;
4. The CarSim module receives the front and rear wheel driving torques from the torque distribution controller and the front and rear wheel angles from the IMPC controller to control the vehicle's driving and steering and feeds back the vehicle's state information.  
In order to effectively test the effect of the control strategy designed above, a U-shaped reference trajectory is constructed as the AGV driving trajectory for simulation analysis. The reference trajectory consists of five paths, including flat pavement, turning, and slope pavement, where \(l_{p1}\), \(l_{p2}\), \(l_{p3}\), and \(l_{p4}\) are straight flat pavements; \(l_{p1}\) and \(l_{p2}\) are connected by a semi-circular flat pavement with a radius of 8 m; and \(l_{p3}\) is a straight slope with a slope of 10%. The length of each path is shown in Figure 10. The designed reference path  
\begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Unit** & **Value** \\ \hline Overall size & m & 5/2.4/0.6 \\ (length/width/height) & m & 3 \\ wheel track & m & 2.1 \\ dead weight & t & 5 \\ load & t & 20 \\ reference speed & m/s & 0.5 \\ \hline \end{tabular}
\end{table}
Table 1: Basic parameters of heavy-duty AGV.  
Figure 9: Simulink and CarSim co-simulation model.  
covers straight driving, turning driving, and slope driving, which can test the effect of the control strategy.  
Because the adhesion conditions of the outdoor pavement in the factory area are affected by various factors, the adhesion coefficient varies greatly. Therefore, two kinds of pavements with different adhesion coefficients are set up for simulation analysis, and the control effects under five different control strategies are analyzed. Different control strategies are shown in Table 2.  
The speed controllers of the five different control strategies are all PID speed controllers, and the difference lies in the trajectory tracking method and the torque distribution method. As shown in Table 2, PID-TED control adopts the control strategy combining the PID controller and Torque Equal Distribution (TED) controller. MPC-TED control adopts the control strategy combining the MPC controller and TED controller. IMPC-TED control adopts the control strategy combining IMPC controller and TED controller. The MPC-TPD control adopts the control strategy of combining the MPC controller with the torque proportional distribution (TPD) controller, and the IMPC-TPD control adopts the control strategy of combining the IMPC controller with the TPD controller.