## 4 Simulation Results  
To verify the effectiveness of the obstacle avoidance strategy which is based on PET and two-layer MPC, CarSim-MATLAB co-simulation is conducted. The vehicle used in the simulation is based on the front wheel driving C-class hatchback model in Carsim software. The sample time is 0.01 s. The three cases are based on different PET, which is established in Section 2, should be discussed in this section. Therefore, to get different PET, we assume that the distance between the ego vehicle and parked vehicle is a constant while the initial position of the oncoming vehicle is variable. At the same time, the initial speed of the ego vehicle is set as \(11\) m/s in all three simulations. In case 1, the calculated \(PET_{s2}\) is larger than the set \(PET_{safe}\), so the ego vehicle keeps the initial speed unchanged in the whole avoidance process. The acceleration, the steering wheel angle and vehicle longitudinal speed under case 1 are shown in Figure 12. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **A** & \\ \hline
**Symbol** & **Value** & **Unit** \\ \hline \(N_{p,1}\) & 60 & (none) \\ \(N_{c,1}\) & 2 & (none) \\ \(Q_{1}\) & \(100\times I_{N_{p,1}}\) & (none) \\ \(R_{1}\) & \(10\times I_{N_{e,1}}\) & (none) \\ \(T_{s,1}\) & 0.02 & s \\ \(S_{1}\) & \(900+k_{1}\times v_{a}\) & (none) \\ \(S_{2}\) & \(2000+k_{2}\times v_{a}\) & (none) \\ \(S_{3}\) & \(900+k_{3}\times(v_{a}+v_{OnC})\) & (none) \\ \hline \hline
**B** & & \\ \hline
**Symbol** & **Value** & **Unit** \\ \hline \(N_{p,2}\) & 30 & (none) \\ \(N_{c,2}\) & 3 & (none) \\ \(Q_{2}\) & \(\left[\begin{array}{cc}2000&0\\ 0&10,000\end{array}\right]\) & (none) \\ \(R_{2}\) & \(5\times 10^{5}\times I_{N_{e,2}}\) & (none) \\ \(\rho\) & 1000 & (none) \\ \(T_{s,2}\) & 0.01 & s \\ \hline \hline \end{tabular} Where \(I_{s}\) is an identity matrix of dimension \(*\). \(k_{1}=k_{3}=3\) and \(k_{2}=1\) are the weights of speed. \(S_{1}\), \(S_{2}\) and \(S_{3}\) are the weight coefficients of avoiding the parked vehicle, road bounds and the oncoming vehicle, respectively. They are velocity dependent due to the demands of ensuring the safety and lateral stability of driving. Therefore, cost of collision avoidance will increase as the speed of the car increases especially in relatively high speed conditions.  
\end{table} 
Table 1: Controller parameters and weights. **A**. MPC parameters in motion re-planning layer; **B**. MPC parameters in the motion tracking layer. Figure 13 shows the CA process of ego vehicle under case 1. The CA process is simulated by Simulink/Matlab, and items among CA process, i.e., the parking vehicle, the oncoming vehicle, the re-planned local reference and so on, are marked in Figure 13c. The local reference path, which is shown as a short gray curve out of actual trajectory (green curve), is generated by MPC controller 1 in decision making layer (refer to Figure 4) in this time step to indicate the reference trajectory in the next time step. Figure 12: (a) Longitudinal and lateral acceleration, (b) Steer wheel angle and (c) longitudinal speed of ego vehicle in case 1 (ego car just keeps speed unchanged when overtaking obstacles). In case 2, the calculated \(PET_{s1}\) is larger than \(PET_{safe}\), so the ego vehicle will then be required to accelerate. The acceleration, the steering wheel angle and vehicle longitudinal speed under case 2 are shown as Figure 14.  
Figure 14: (**a**) Longitudinal and lateral acceleration, (**b**) Steer wheel angle and (**c**) longitudinal speed of ego vehicle in case 2 (ego car needs to accelerate for a safe overtaking). Figure 13: Collision avoidance process of ego vehicle under case 1. (**a**) Relative positions between vehicles at t = 1 s; (**b**) Relative positions between vehicles at t = 4.7 s; (**c**) Relative positions between vehicles at t = 7.5 s; (**d**) Relative positions between vehicles at t = 20 s.  
Figure 15 shows the CA process of the ego vehicle under case 2.