# A Strategy for Integrated Multi-Demands High-Performance Motion Planning Based on Nonlinear MPC
## 3 Hierarchical and Multi-Domains Strategy Based on Driving Demands
### Evaluation Functions of Driving Demands  
#### 3.2.1 Dynamic Stability  
The evaluation function of whether a vehicle has risks of losing dynamic stability is constructed based on the sideslip limit of tires. The final function is defined by Equation (6).  
[PERSON] et al. [22] established the vehicle dynamics stability boundary based on the sideslip limit of tires in the front axle and rear axle. The stability condition can be shown in the following form:  
\[\begin{cases}a_{y}-\frac{F_{y_{max}}\left(1+L/L_{f}\right)}{m}\leq 0\\ a_{y}-\frac{F_{y_{max}}\left(1+L_{f}/L_{r}\right)}{m}\leq 0\end{cases} \tag{2}\]  
where \(a_{y}\) is the centroid lateral acceleration. \(m\) is SV mass. \(L_{f}\), \(L_{r}\) are the distances from the centroid to the front and rear axles, respectively (See Figure 5). \(F_{y_{max}}\), \(F_{y_{max}}\) are the maximum lateral forces in the front and rear tires, respectively [22].  
Figure 4: Hierarchical and multi-domains strategy.  
Figure 5: Schematic of forces in dynamic bicycle model.  
When the SV is accelerating, considering the weight transfer in the longitudinal direction of the vehicle, and the tire lateral-longitudinal force coupling, there are the following relations:  
\[\begin{cases}F_{y_{max}}=E(\sqrt{(\frac{im(-a_{x}z+gL_{r})}{L})^{2}-F^{2}})\\ F_{y_{max}}=\frac{\mu Em\left(\frac{a_{x}z+gL_{r}}{L}\right)}{L}\end{cases} \tag{3}\]  
where \(F_{y_{max}},\ F_{y_{max}}\), are the maximum front and rear axle lateral force, respectively. \(F\) is driving force in front tire. \(a_{x}\) is the longitudinal acceleration of the centroid. \(z\) is the centroid height. \(E\) is the ratio of the sliding friction coefficient to the peak coefficient. \(g\) is gravity acceleration. \(L\) is wheelbase. \(\mu\) is the friction ground friction coefficient.  
When SV is decelerating, suppose all the tires could lock at the same time. There is the following relation:  
\[ma_{y_{max}}=E\sqrt{(\mu mg)^{2}-(ma_{x})^{2}} \tag{4}\]  
where \(a_{y_{max}}\) is the maximum centroid lateral acceleration. Suppose \(L_{f}<L_{r}\). Plug Equation (3) into (2) and combine Equation (4), we can obtain the stability condition in both the acceleration and deceleration situation:  
\[\begin{cases}\left(\frac{a_{y}}{\mu E}\right)^{2}-\left(g-\frac{a_{x}}{L_{r}} \right)^{2}+\left(\frac{a_{y}L}{\mu L_{r}}\right)^{2}\leq 0,\ a_{x}>0\\ \left(\frac{a_{y}}{\mu E}\right)^{2}-g^{2}+\left(\frac{a_{x}}{\mu}\right)^{2} \leq 0,\ a_{x}\leq 0\end{cases} \tag{5}\]  
Based on Equation (5) and the first-order Euler formula, the evaluation function of dynamic stability is defined as:  
\[L_{dyna}=\begin{cases}\left(\frac{a_{y}^{\prime}}{\mu E}\right)^{2}-\left(g- \frac{za_{x}^{\prime}}{L_{r}}\right)^{2}+\left(\frac{a_{y}^{\prime}L}{\mu L_{ r}}\right)^{2},\ a_{x}>0\\ \left(\frac{a_{y}^{\prime}}{\mu E}\right)^{2}-g^{2}+\left(\frac{a_{y}^{\prime }}{\mu}\right)^{2},\ a_{x}\leq 0\end{cases} \tag{6}\]  
where \(L_{dyna}\) is the evaluation function of whether the vehicle has risks of losing dynamic stability. \(\left(a_{x}^{\prime},a_{y}^{\prime}\right)=\left(a_{x}+\dot{a}_{x}T_{r},a_{y} +\dot{a}_{y}T_{r}\right)\), in which \(\dot{a}_{x},\dot{a}_{y}\) are the longitudinal and lateral jerk, respectively. \(T_{r}\) is a time constant.