## 3 Emergency Trajectory Planning Algorithm
### New Emergency Mode  
Although the model used in the virtual Co-Pilot (referred to as \"the Vanholme's model\" thereafter [64]) is able to provide efficient strategies for different autonomous driving scenarios and different autopilot styles, its decision-making abilities are limited in certain specific situations:  
* In this model, the only option proposed in case of emergencies (no collision-free solution found) is an emergency braking to mitigate the collision. Although this answer can work in certain low-speed driving situations, we cannot expect the vehicle to have sufficient braking distance to avoid a collision when entering emergency mode even at medium speed. Meanwhile, a different decision, such as steering rapidly to avoid an obstacle instead of braking, may allow to avoid collisions altogether. It follows that this single option (safe braking) makes the [PERSON]'s model less adaptable in emergency situations.
* The [PERSON]'s model was designed to react to emergency situations while driving in autonomous mode. The ego vehicle takes the corresponding actions based on certain rules, and all the decisions are made in a fully autonomous driving environment. However, when the emergency mode is force switched from manual mode because of unsafe behavior or visual constraints of the driver (e.g., following with high speed and close distance, invisible obstacles), preconditions in emergency mode will be uncertain for the vehicle and namely lead to [PERSON]'s model going to an unknown state, then fails in reducing the risk of collision.  
In our new decision-support framework, a new trajectory planning algorithm was proposed specifically for these emergency situations, when the [PERSON]'s model cannot find a collision-free trajectory. This new algorithm is based on Elastic Bands theory. Having as inputs the road environment and the obstacles state together with the normally planned trajectory (from the previous section), the emergency planner adapts the initially planned trajectory to avoid any collision with the detected obstacles while keeping the vehicle on a safe road. This module then outputs potential candidates to be activated in a decision module. The basic principle of this relies on the EBs which seek minimal deformation of the original trajectory. This algorithm has been improved in 2003 by the team of [PERSON] et al. [51]. The module proposed in this ADS is mainly based on the works from [PERSON] et al. in 2005 [70] (see Figure 5). Our new algorithm in this paper combines an improved internal force based on the classic EB method and external force provided by the common artificial potential method. When the vehicle goes into emergency mode, the trajectory can be computed based on the physically acting of these two types of forces, which results in the mode being able to provide multiple solutions based on the different obstacles and road information. In addition, the previous state(speed and orientation) of the vehicle will be also considered in the computation of internal forces in order to simulate a more realistic dynamic process of collision avoidance. Based on these improvements, whether the emergency mode is switched from autonomous mode or manual mode, themodel can quickly generate an optimal trajectory with mechanical feasibility to react to current situations.  
Thus, it can be seen that the decision-making model combing [PERSON]'s model for autonomous mode and the new improved trajectory planning for emergency mode is able to provide more efficient and feasible solutions based on the different scenarios of autonomous driving (even combining with manual driving), especially for some uncertain emergency situations.