# A Strategy for Integrated Multi-Demands High-Performance Motion Planning Based on Nonlinear MPC
## 3 Hierarchical and Multi-Domains Strategy Based on Driving Demands
### HMD Strategy  
Before designing the scheduling strategy, the priority of driving demands needs to be determined first. Driving requirements can be categorized into safety, traffic rules, and entertainment classes (See Figure 3). Their priority classification is as follows.  
Safety requirements take the highest priority, encompassing both dynamic stability and obstacle avoidance safety. The boundary of dynamic stability represents the working limits of the tires. If the vehicle control exceeds this boundary, it implies severe tire sliding, leading to a loss of control capabilities. As the loss of control compromises safety and other demands, the priority of dynamic stability is higher than obstacle avoidance safety.  
Traffic rules include no crossing of road boundaries, no running red lights, and no speeding. Adhering to traffic rules is prioritized below safety demands and above entertainment demands. Running red lights or crossing a road boundary can easily lead to collisions; hence, they own the highest priority. Speeding owns the lowest priority.  
Entertainment demands include tracking, fuel economy, and comfort. Tracking determines the direction and speed of vehicle, thus is the fundamental demand and holds the highest priority. Comfort, achieved by limiting acceleration and jerk, indirectly contributes to reduced energy, making comfort a higher priority than fuel economy.  
As shown in Figure 4, the HMD strategy evaluates the driving demands according to the priority (See Figure 3). The HMD strategy initiates the evaluation process by first assessing safety-related demands; namely, dynamic stability. If the SV is at risk of losing dynamic stability, the HMD strategy temporarily sets aside considerations such as driving comfort, fuel economy, or adherence to traffic rules. Meanwhile, the collision avoidance demand is formulated as a penalization function instead of constraint, because conflict between two constraints may lead to the infeasibility of optimization. In cases where there is no risk to dynamic un-stability, the dynamic stability constraint is excluded from the NMPC planner so as to improve solution efficiency. When the SV faces a collision risk, the desired states for tracking demands are adjusted to avoid a collision. The specific process is described in Section 3.3. The comfort and fuel efficiency demands are kept in objective function to ensure the smooth changing of state trajectory.  
Figure 3: Priority of driving demands.  
When safety concerns are resolved, the HMD proceeds to evaluate demands related to traffic rules. No crossing of road boundaries and no running red lights share the same priority; thus, the HMD evaluates them concurrently (as depicted in Figure 4). If either of them may not be satisfied, the corresponding constraint will be added into the NMPC controller. Only when both of them can be guaranteed, the HMD will proceed to evaluate the no speed demand.  
For the entertainment demands, they only exist in the objective function because of being the lowest priority. When there exist safety concerns, some of them could be removed to avoid conflict between demands. Among the three entertainment demands, their weights in objective function are determined based on their relative priority.