*5.2. Co-Simulation Results*

The comparison results of the co-simulation of the obstacle avoidance trajectory planning with di fferent algorithms under di fferent vehicle speeds are exhibited in Figures 15–17.

**Figure 15.** Co-simulation results of obstacle avoidance trajectory planning under 40 km/h.

**Figure 16.** Co-simulation results of obstacle avoidance trajectory planning under 60 km/h.

**Figure 17.** Co-simulation results of obstacle avoidance trajectory planning under 80 km/h.

It can be observed from Figures 15–17 that under different vehicle speeds, the obstacle avoidance controllers based on the APF with MPC model derived from previous study [41] and the APF(MPC) with MPC model proposed in this study can effectively plan and track the local obstacle avoidance trajectory that satisfies the obstacle and road boundary constraints in real time in the predicted time domain, and the trajectory tracking controllers based on the linear time-varying MPC algorithm can promptly and accurately track the first two reference points of the local planned trajectory from the trajectory planning controllers in real time. The vehicles avoided obstacles smoothly under different speeds, which indicated that the trajectory planning and tracking controllers were both feasible and effective. However, under different vehicle speeds, the longitudinal distance at the beginning of the obstacle avoidance derived from the controller proposed in this study were larger than that of resulting from the other controller (APF with MPC). The longitudinal distance from the proposed model in this study under the vehicle speeds of 40 km/h, 60 km/h, and 80 km/h were 34 m, 38 m, and 41 m, respectively; while the values from the previous model were 29 m, 34 m, and 37 m, respectively. With the increase of vehicle speed, the obstacle avoidance trajectory planning was advanced and the longitudinal distance was promoted. In addition, the maximum lateral distance during the obstacle avoidance process remained basically unchanged, and the value under the different vehicle speeds from the proposed model in this study were 3.48 m, 3.50 m, and 3.51 m, respectively, while the values from the previous model were 3.69 m, 3.77 m, and 3.87 m, respectively. The specific results during the process of the obstacle avoidance control are exhibited in Table 2 and Figure 18.


**Table 2.** Comparison results of performance parameters.

**Figure 18.** Co-simulation results of vehicle states during the obstacle avoidance process under di fferent speeds.

As shown in Table 2, under di fferent vehicle speeds, the maximum values of the front wheel angle, heading angle, yaw rate, lateral acceleration, and lateral jerk during the obstacle avoidance trajectory tracking process derived from the previous study model (APF+MPC) were obviously greater than that of derived from the proposed model in this study and human drivers. Since the prediction time domain cannot be designed too large in the APF with MPC model, the obstacle avoidance trajectory would possess a smaller longitudinal distance and a larger lateral distance, which would affect the smoothness of the trajectory tracking process. Similarly, larger maximum values of the lateral acceleration and lateral jerk would also reduce the passenger's comfort. Since the APF(MPC) with MPC model proposed in this study combined the APF and MPC in the trajectory planning layer, the trajectory planning controller would take into account the vehicle kinematics constraints in advance, and the additional MPC was equivalent to further improving the model prediction time domain, so that the controller can better simulate the driver's preview behavior. Moreover, too many complex constraints often made it impossible for MPC controller to obtain the optimal solution. The additional MPC in the planning layer could relieve the computational pressure of the MPC algorithm in the trajectory tracking layer. The kinematics and other constraints of the vehicle had been taken into account during the trajectory planning process, and the MPC in the tracking layer can focus on solving the vehicle dynamics constraints, which can improve the e ffectiveness of the controller in solving the optimal value. Therefore, on the one hand, the results of the longitudinal distance and maximum lateral distance derived from the controller designed in this study were more in accordance with human driver's obstacle avoidance trajectory characteristics in Section 4, and on the other hand, the results of the front wheel angle, heading angle, yaw rate, lateral acceleration, and lateral jerk during the trajectory tracking process derived from the proposed model in this study were more smooth and more human-like, which can e ffectively improve the acceptance of the autonomous driving system or the intelligent driving system.

The comparison results of the relative distance between the vehicle and obstacle, front wheel angle, heading angle, yaw rate, lateral acceleration, and lateral jerk derived from the APF with MPC model, APF(MPC) with MPC model, and human drivers during the obstacle avoidance process are presented in Figure 18.

As shown in Figure 18a, the minimum distance between vehicle and obstacle derived from the APF(MPC) with MPC model under the speeds of 40 km/h, 60 km/h, and 80 km/h were 3.37 m, 3.22 m, and 3.11 m, respectively; the value from the APF with MPC model were 3.34 m, 3.18 m, and 3.10 m, respectively; the value from the human driver were 3.36 m, 3.21 m, and 3.11 m, respectively. The minimum distances from di fferent models under di fferent speeds were all greater than the safe distance of 2.8 m (the distance of vehicle mass center to the right front corner added the distance of obstacle mass center to the left rear corner), which indicated that the vehicle would keep a reasonably safe distance from the obstacle during the obstacle avoidance process. As shown in Figure 18b–d, the front wheel angle derived from the APF(MPC) with MPC model under all of the di fferent speeds did not exceed 6◦, which satisfied the kinematic constraints of the vehicle. The front wheel angle and heading angle decreased with the increase of the vehicle speed, which ensured the smoothness and comfort of the obstacle avoidance process during high speed driving. The range of yaw rate was basically consistent under di fferent speeds, and all of them satisfied the requirements of comfort. However, during the process of changing back to the middle lane, the front wheel angle and yaw rate derived from the APF with MPC model would produce slight vibrations, which would a ffect the smoothness of the obstacle avoidance trajectory. As shown in Figure 18e,f, the lateral acceleration and lateral jerk improved with the increase of the vehicle speed. Since the longitudinal distance at the beginning of the obstacle avoidance derived from the APF with MPC model was the smallest, the maximum acceleration was the largest and the acceleration changed dramatically, which would affect the smoothness and comfort. In summary, the trajectory planning and tracking controllers designed in this work can satisfy the static obstacle avoidance requirements at di fferent speeds. The variations of the relevant parameters during the obstacle avoidance process were more human-like, and the avoidance operation was completed on the premise of ensuring smoothness and comfort.

The simulation results with multiple obstacles are presented in Figure 19. The coordinates of the obstacles are (100, 0), (160, 4), (170, −3.75), and (200, 1.8), respectively.

**Figure 19.** Co-simulation results of obstacle avoidance trajectory tracking under different speeds.

As shown in Figure 19, under different vehicle speeds, the proposed obstacle avoidance controller successfully achieved the goal of avoiding multiple obstacles, and the actual trajectories were smooth and continuous. In addition, there was no phenomenon that the vehicle fell into a local minimum point and the target was unreachable. Therefore, the co-simulation results demonstrated that the proposed trajectory planning controller and the trajectory tracking controller can effectively ensure the safety of obstacle avoidance operations.
