## 3 Obstacle Avoidance Motion Planning Framework  
The planning framework is shown in Figure 2. It consists of a model predictive controller and an APF-switching trigger. The compliance-oriented potential fields and the violation cost potential fields are integrated with the cost function of the MPC. TTC and obstructed delay time are quantified as the APF-switching triggers. In normal driving scenarios, the compliance-oriented potential fields are constructed based on environmental information for compliance motion planning. When obstacle avoidance becomes necessary, the system transitions from compliance-oriented potential fields to violation cost potential fields for obstacle avoidance motion planning.  
Collision risk arises from violations or aggressive driving behaviors of other vehicles. In this study, TTC is utilized as the indicator for assessing collision risk. The trajectories of the ego vehicle and surrounding vehicles are obtained from the predictive information. An obstacle avoidance is necessary when the TTC is smaller than a certain threshold. The judgment is based on:  
\[\text{TTC}<t_{\text{safe}} \tag{1}\]  
where \(t_{\text{safe}}\) denotes the minimum safe time and is set to 1.6 s according to [30].  
Figure 2: Obstacle avoidance motion planning framework.  
The accumulation of obstructed delay time begins when the vehicle decelerates due to interference from other traffic participants and continues until it resumes normal driving. The obstructed delay time is determined according to the pseudocode Algorithm 1 provided.  
```
Input: TrafficLight, Ego, Tgt\({}_{f}\), v\({}_{cgw}\), v\({}_{tgt}\), \(t_{taw}\), \(t_{tap}\) Output: \(t_{tobs}\)
1:\(t_{obs}=0\); \(t_{stop}=0\);
2: If (TrafficLight = G) then
3: If (\(v_{cgw}=0\)) then
4: If (exist \(Tgt_{f}\wedge v_{tgt}=0\)) then
5:\(t_{obs}=t_{tnow}-t_{stop}\);
6: end if
7: else
8:\(t_{obs}=t_{obs}\);
9: end if
10: else
11:\(t_{obs}=t_{obs}\);
12: end if
13: return \(t_{obs}\);
```  
**Algorithm 1** Determination of Obstructed Delay Time  
_The trafficLight_, _Ego_, _Tgt\({}_{f}\)_, _v\({}_{cgw}\)_, _v\({}_{tgt}\)_, _t\({}_{taw}\)_, _t\({}_{tap}\)_  
Output: \(t_{obs}\)  
1:\(t_{obs}=0\); \(t_{stop}=0\);
2: If (Traffic  
where \(u\) and \(v\) are the longitudinal velocity and lateral velocity. \(r\) is the yaw rate at the center of gravity (CG); \(X\) and \(Y\) are the longitudinal position and lateral position in the global coordinate; \(\theta\) is the heading angle of the vehicle; \(m\) is the mass of the vehicle; \(I_{z}\) is the moment of inertia of the vehicle around its vertical axis; \(I_{f}\) and \(I_{r}\) are the distances from the front axle to CG and from the rear axle to CG, respectively; \(F_{x_{T}}\) is the total longitudinal force of the tires; \(F_{y_{f}}\) and \(F_{y_{r}}\) are the total lateral force of the front and rear tires, which are defined as:  
\[F_{y_{f}}=C_{f}\alpha_{f}=C_{f}\Big{(}\delta-\frac{v+I_{f}r}{u}\Big{)} \tag{10}\]  
\[F_{y_{r}}=C_{r}\alpha_{r}=C_{r}\Big{(}\delta-\frac{v+I_{r}r}{u}\Big{)} \tag{11}\]  
where \(C_{f}\) and \(C_{r}\) are the cornering stiffness values of the front and rear tires; \(\alpha_{f}\) and \(\alpha_{r}\) are the sideslip angles of the front and rear tires; \(\delta\) is the front wheel steering angle.  
By linearizing Equations (4)-(9) around the vehicle's operating point, the vehicle linear dynamics can be written in state space form as follows:  
\[\dot{x}=Ax+Bu \tag{12}\]  
\[x=\Big{[}X\;u\;Y\;v\;\theta\;r]^{T} \tag{13}\]  
\[u_{c}=\Big{[}F_{x_{T}}\;\delta]^{T} \tag{14}\]  
where \(x\) is the state vector; \(u_{c}\) is the input vector; \(A\) and \(B\) are the state matrix and input matrix, respectively. The model is discretized by the zero-order hold method, to be utilized as the model of the model predictive path planning controller.