# Research on Obstacle Avoidance Replanning and Trajectory Tracking Control Driverless Ferry Vehicles
## 5 Simulation Analysis
### Longitudinal Motion Simulation Condition  
(1) Set the initial speed of the driverless ferry vehicle to 0, and the desired speed is constant at 35 km/h for the constant speed cruise simulation condition. The speed tracking of the driverless ferry vehicle is shown in Figure 19:  
As can be seen in Figure 19a, the longitudinal speed of the two longitudinal control strategies of the driverless ferry vehicle is compared in the process of trajectory tracking. In the case of longitudinal control without tolerance zones, although the ferry vehicle can finally stably track the desired trajectory, the longitudinal speed fluctuates greatly during the whole tracking process, resulting in the problem that the frequent switching between acceleration and braking modes of the ferry vehicle affects the comfort and stability of the speed control. When the longitudinal control with tolerance interval is adopted, the longitudinal speed fluctuation is significantly reduced, and the expected speed can be quickly tracked and stabilized, so that the driverless ferry vehicle accelerates in the braking mode, switching times are significantly reduced, and driving is smoother. As illustrated in Figure 19b, the longitudinal velocity error fluctuates greatly when there is no tolerance interval for longitudinal control, and the maximum longitudinal speed error is as high as 0.78 m. When the longitudinal control with tolerance interval is adopted, the maximum longitudinal speed error is about 0.44, the fluctuation of the longitudinal velocity error is significantly reduced, and the longitudinal velocity error tends to be stable faster, which is 43.59% lower than that of the intolerant interval. It can be seen that the stable speed and stability of the longitudinal motion controller designed in this study were significantly improved when tracking the expected speed, which effectively solves the problem that the  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Control Arguments (Units)** & **Numerical Value** \\ \hline Prediction time domain, \(N_{p}\) & 25 \\ Control time domain, \(N_{c}\) & 15 \\ Front wheel angle, \(\delta_{f}\) & \(-20^{\circ}\)-\(20^{\circ}\) \\ Weight matrix, \(R\) & \(1.1\times 10^{5}\) \\ Number of state quantities & 6 \\ Number of control quantities & 1 \\ Relaxation factor, \(\rho\) & 1000 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Tracking controller parameter setting.  
Figure 19: Speed tracking and speed tracking error diagram when the expected speed is 35 km/h: (**a**) speed tracking effect and (**b**) speed tracking error.  
driverless ferry vehicle switches between acceleration and braking modes too frequently, affecting the comfort and stability of speed control.  
(2) Set the desired speed to a variable speed range from 0 to 35 km/h and then to 0, so that the ferry vehicle starts tracking when the initial speed is zero. The speed tracking of the driverless ferry vehicle is shown in Figure 20.  
As can be seen from Figure 20a, the driverless ferry can track the desired speed well during the whole speed tracking process. As can be seen in Figure 20b, at about 4 s after the start, the error in the whole tracking process is the largest, but it is also lower than 0.15 km/h, which fully meets the requirements of the vehicle, and the occurrence of such a situation at about 4 s may be due to the fact that the actuator of the vehicle has a delayed reaction when it is just running, and after the vehicle is running normally the effect of such a delayed reaction on the whole vehicle becomes very small. Generally speaking, the driverless ferry vehicle can still track the desired speed steadily and quickly when tracking with variable speed. It shows that the longitudinal motion controller designed in this paper still has a good tracking effect when tracking the variable speed, and it also makes a good prerequisite for the coordinated control of Section 3.3.