## 3 Controller Design
### Vehicle Motion Control Layer
\begin{array}{c}e_{i}(0)+\dot{e}_{i}(0)t+\left[\frac{\lambda_ {00}}{T^{2}}e_{i}(0)+\frac{\lambda_{01}}{T}\dot{e}_{i}(0)\right]t^{2}+\left[ \frac{\lambda_{10}}{T^{3}}e_{i}(0)+\frac{\lambda_{11}}{T^{2}}\dot{e}_{i}(0) \right]t^{3}\\ 0\leq t\leq T\\ t>T\end{array} \right. \tag{53}\]  
\[\dot{\phi}_{i}(t)=\left\{ \begin{array}{c}\dot{e}_{i}(0)+2\left[\frac{\lambda _{00}}{T^{2}}e_{i}(0)+\frac{\lambda_{01}}{T}\dot{e}_{i}(0)\right]t+3\left[ \frac{\lambda_{10}}{T^{3}}e_{i}(0)+\frac{\lambda_{11}}{T^{2}}\dot{e}_{i}(0) \right]t^{2}\\ 0\leq t\leq T\\ t>T\end{array} \right. \tag{54}\]  
According to Assumption 1:  
If \(t=T\)\(\phi(t)=0\), \(\phi(T)=(1+\lambda_{00}+\lambda_{10})e_{i}(0)+(1+\lambda_{01}+\lambda_{11}) \dot{e}_{i}(0)T=0\)  
\[\left\{ \begin{array}{c}1+\lambda_{00}+\lambda_{10}=0\\ 1+\lambda_{01}+\lambda_{11}=0\end{array} \right. \tag{55}\]  
If \(t=T\), \(\dot{\phi}(t)=0\), \(\dot{\phi}(T)=\frac{1}{T}(2\lambda_{00}+3\lambda_{10})e_{i}(0)+(1+2\lambda_{0 1}+3\lambda_{11})\dot{e}_{i}(0)=0\)  
\[\left\{ \begin{array}{c}2\lambda_{00}+3\lambda_{10}=0\\ 1+2\lambda_{01}+3\lambda_{11}=0\end{array} \right. \tag{56}\]  
Combining Equations (55) and (56):  
\[\left\{ \begin{array}{c}\lambda_{10}=2\\ \lambda_{00}=-3\\ \lambda_{01}=-2\\ \lambda_{11}=1\end{array} \right. \tag{57}\]  
Designing the sliding mode controller:  
\[ \begin{array}{ll}\dot{\Gamma}(X,t)&=C\dot{E}-C\dot{\phi}(t)=C\Big{[}\dot{E} -\dot{\phi}(t)\Big{]}\\ &=C\Big{[}\dot{X}-\dot{X}_{d}-\dot{\phi}(t)\Big{]}\\ &=C\Big{[}f(X,t)+b(X,t)u+\Delta f(X,t)-\dot{X}_{d}-\dot{\phi}(t)\Big{]}\end{array}  \tag{58}\]  
The Lyapunov function can be designed as follows:  
\[V=\frac{1}{2}\Gamma^{T}\Gamma \tag{59}\]  
where  
\[ \begin{array}{ll}\dot{V}=\Gamma^{T}\dot{\Gamma}\\ \qquad=\ \Gamma^{T}C\Big{[}f(X,t)-\dot{X}_{d}-\dot{\phi}(t)\Big{]}+\Gamma^{T}Cb(X,t )u+\Gamma^{T}C\Delta f(X,t)\\ \qquad\leq\ \Gamma^{T}C\Big{[}f(X,t)-\dot{X}_{d}-\dot{\phi}(t)\Big{]}+\Gamma^{T}Cb(X,t )u+\|\Gamma^{T}C\|\|Af(X,t)\|\end{array}  \tag{60}\]  
The controller is designed as:  
\[u(t)=-b(X,t)^{-1}\Big{[}f(X,t)-\dot{X}_{d}-\dot{\phi}(t)\Big{]}-b(X,t)^{-1} \frac{\Gamma^{T}\Gamma}{\|C^{T}\Gamma\|}[F(X,t)+K] \tag{61}\]  
Substituting Equation (61) into Equation (60):  
\[\dot{V}\leq\|\Gamma^{T}C\|\|\Delta f(X,t)\|-\frac{\Gamma^{T}C\Gamma^{T}\Gamma} {\|C^{T}\Gamma\|}[F(X,t)+K] \tag{62}\]Since \(\Gamma^{T}CC^{T}\Gamma=\left\|C^{T}\Gamma\right\|^{2}\)  
\[ \begin{split}\dot{V}&\leq\|C^{T}\Gamma\|[\|\Delta f( X,t)\|-F(X,t)]-K\|C^{T}\Gamma\|\\ &\leq\ -K\|C^{T}\Gamma\|<0\ \ \ \ \ (|\Gamma|\
eq 0)\end{split}  \tag{63}\]  
According to Assumption 1 and Terminal sliding surface Equation:  
\[ \begin{split}\Gamma(X,0)&=C[E(0)-P(0)]\\ &=0\end{split}  \tag{64}\]  
The initial state of the system is already on the sliding surface. The arrival stage of synovial control is eliminated, and the global robustness and stability of the closed loop system are ensured. In order to reduce the chattering, the continuous function vector \(S_{\delta}\) is adopted to replace \(\frac{C^{T}\Gamma}{\|C^{T}\Gamma\|}\):  
\[S_{\delta} =\frac{C^{T}\Gamma}{\|C^{T}\Gamma\|+\delta} \tag{65}\] \[\delta =\delta_{0}+\delta_{1}\|e\| \tag{66}\]  
where \(\delta_{0}\), \(\delta_{1}\) are two positive constants. In summary, the control strategy of Terminal sliding mode controller is:  
\[ \begin{split} u(t)=-\left[\begin{array}{ccc}\frac{1}{m}&0&0\\ 0&\frac{1}{m}&0\\ 0&0&\frac{1}{z_{z}}\end{array}\right]^{-1}\left\{\left[\begin{array}{c}x_{2 }x_{3}-\frac{1}{2}C_{D}Ax_{1}{}^{2}-\mu mg\\ -x_{1}x_{3}\\ 0&0\end{array}\right]-\left[\begin{array}{c}\dot{x}_{1d}\\ \dot{x}_{2d}\\ \dot{x}_{3d}\end{array}\right]-\left[\begin{array}{c}\dot{\phi}_{1}(t)\\ \dot{\phi}_{2}(t)\\ \dot{\phi}_{3}(t)\end{array}\right]\right\}\\ -\left[\begin{array}{ccc}\frac{1}{m}&0&0\\ 0&\frac{1}{z_{z}}\end{array}\right]^{-1}\frac{C^{T}\Gamma}{\|C^{T}\Gamma\|+ \delta_{0}+\delta_{1}\|e\|}[F(X,t)+K]\end{split}  \tag{67}\]