*4.3. Procedures*

Before the experiment, the drivers were asked to participate in a practice round for approximately 10 min to familiarize themselves with the driving simulator and testing process. Next, the test staff introduced the experimental objectives and notes. After the beginning of the experiment, the participants performed the obstacle avoidance operation as required, and relevant data would be recorded in real time. After each experiment, the participants were free to manipulate the driving simulator until the beginning of the next experiment. To alleviate driving fatigue, the participants could rest for 5 min after every testing period. During the test, the driver was required to strictly abide by the traffic rules. In case of emergency, such as the abnormal operation of the driving simulator or equipment, the unsatisfactory condition of the participants, and so on, the test would be stopped immediately and the test vehicle would be safely parked in the emergency parking zone. Participants were paid ¥100 for their participation after they had finished all the experiments.

## *4.4. Collected Data*

The data collected during the obstacle avoidance experiments mainly included the longitudinal and lateral coordinates of the vehicle in the road coordinate system, vehicle speed, and acceleration. The sampling frequency was 100 Hz. After the test, a total of 180 groups of effective obstacle avoidance data were obtained. Then, Matlab was used to fit the collected trajectories, with the results presented in Figures 9–11.

**Figure 9.** Obstacle avoidance trajectories under a vehicle speed of 40 km/h.

**Figure 10.** Obstacle avoidance trajectories under a vehicle speed of 60 km/h.

**Figure 11.** Obstacle avoidance trajectories under a vehicle speed of 80 km/h.

It can be seen from Figures 9–11 that the drivers in each group of tests successfully completed the obstacle avoidance operation and the obstacle avoidance trajectory was smooth, so the data collected in the test were valid data. The longitudinal distance at the beginning of obstacle avoidance and the maximum lateral distance during the obstacle avoidance were statistically analyzed under different vehicle speeds.

The coordinate point when the vehicle generated continuous lateral displacement was determined as the starting position of the obstacle avoidance operation, and the distance between the starting point and the centroid of the obstacle was defined as the longitudinal distance at the beginning of obstacle avoidance. This value can provide a basis for the determination of the A value in the elliptical repulsive potential field (shown in Figure 4). The box diagram of longitudinal distance at the beginning of obstacle avoidance under different vehicle speeds is presented in Figure 12.

**Figure 12.** Box diagram of the longitudinal distance at the beginning of avoidance under different speeds.

It can be seen from Figure 12 that the average longitudinal distance at the beginning of obstacle avoidance under the speeds of 40 km/h, 60 km/h, and 80 km/h were 33.4 m, 37.5 m, and 40.6 m, respectively, and the medians were 32.7 m, 37.0 m, and 38.1 m. The longitudinal distance increased with the promotion of the vehicle speed. The results of the one-way analysis of variance indicated that the vehicle speed possessed a significant effect on the longitudinal distance at the beginning of obstacle avoidance (p = 0.000 < 0.05, F(2, 177) = 9.320). Therefore, in this paper, the vehicle speed and the longitudinal distance were determined as reference factors, and the least square method was used for linear regression fitting. The expression is as follows:

$$a = 0.1725v\_p + 26.517\tag{34}$$

where *a* is the longitudinal distance at the beginning obstacle avoidance, and *vp* is the vehicle speed.

The maximum lateral distance was defined as the maximum lateral distance between the vehicle and the obstacle during the obstacle avoidance process. This value can provide a basis for the determination of the B value in the elliptical repulsive potential field (shown in Figure 4). The box diagram of the maximum lateral distance under different vehicle speeds is presented in Figure 13.

It can be seen from Figure 13 that the average maximum lateral distance during the process of obstacle avoidance under the speeds of 40 km/h, 60 km/h, and 80 km/h were 3.44 m, 3.57 m, and 3.65 m, respectively, and the medians were 3.51 m, 3.63 m, and 3.71 m. The maximum lateral distance increased slightly with the promotion of the vehicle speed. The results of the one-way analysis of variance indicated that the vehicle speed possessed no significant effect on the maximum lateral distance during the process of obstacle avoidance (p = 0.254 > 0.05, F(2, 177) = 1.380). Therefore, in this paper, the average of the maximum lateral distance of all data was determined as the final value of maximum lateral distance:

$$b = 3.46 \, m \tag{35}$$

where *b* is the maximum lateral distance.

**Figure 13.** Box diagram of the maximum lateral distance under different speeds.

#### **5. Co-Simulation Results Analysis**

#### *5.1. Co-Simulation Model Establishment*

To verify the obstacle avoidance trajectory planning controller and the MPC trajectory tracking controller designed in this study, a co-simulation model based on CarSim and Simulink was established for simulation testing. The co-simulation model is illustrated in Figure 14.

**Figure 14.** CarSim/Simulink co-simulation model.

As shown in Figure 14, .*x* is the vehicle longitudinal speed, .*y* is the vehicle lateral speed, ϕ is the vehicle heading angle, .ϕ is the vehicle yaw rate, and *x* and *y* are the vehicle coordinate information in the geodetic coordinate system. CarSim was responsible for building the vehicle dynamics model, as the Vehicle Code: i\_i module shown in the figure, and outputting the coordinate information, the longitudinal and lateral speeds, the heading angle and the yaw rate to the trajectory planning controller and the trajectory tracking controller, respectively. Simulink was responsible for constructing the trajectory planning model based on the modified APF algorithm and the trajectory tracking model based on the MPC algorithm. The trajectory planning controller provided a reference trajectory for the trajectory tracking controller, and the tracking module outputted the final calculated front wheel angle to the vehicle dynamics module in CarSim. Then, the updated vehicle state parameters were employed for calculation in the next control period.

The B-Class Hatchback with front-wheel drive was selected as the vehicle dynamics simulation model in CarSim, and the main parameters are shown in Table 1.


**Table 1.** Basic parameters of the vehicle dynamics model.

The specific simulation conditions were set as follows: the global reference trajectory was a straight path; the road adhesion coe fficient was set as 0.8; the obstacle coordinate was set as (105, 0), and the obstacle was 4710 × 1820 × 1500 mm, and the vehicle speeds were 40 km/h, 60 km/h, and 80 km/h respectively.

The specific parameters of the trajectory planning controller and trajectory tracking controller in Simulink were set as follows: the prediction step size and control step size of the trajectory planning controller were determined as *Npp* = 15, and *Npc* = 5; the weight matrixes of the trajectory planning controller were determined as *Qp* = ⎡ ⎢⎢⎢⎢⎢⎢⎢⎢⎣ 100 0 0 0 100 0 0 0 100 ⎤ ⎥⎥⎥⎥⎥⎥⎥⎥⎦ , *Rp* = 10; the prediction step size and control

step size of the trajectory tracking controller were determined as *Ncp* = 20 and *Ncc* = 10; and the weight matrixes of the trajectory planning controller were determined as *Qp* = ⎡ ⎢⎢⎢⎢⎢⎢⎢⎢⎣ 2000 0 0 0 1000 0 0 0 1000 ⎤ ⎥⎥⎥⎥⎥⎥⎥⎥⎦ ,

*Rp* = 1.5 × 105. The control period of both controllers was 0.01 s.
