## 3 Controller Design
### Generalized Super-Twisting Backstepping Sliding Mode Controller  
Step 1: The desired trajectory is \(x_{1d}\), and the error is introduced as  
\[z_{1}=x_{1}-x_{1d} \tag{16}\]  
\[\dot{z}_{1}=x_{2}-\dot{x}_{1d} \tag{17}\]  
The Lyapunov function is defined as  
\[V_{1}=\frac{1}{2}z_{1}^{2} \tag{18}\]  
The derivative of \(V_{1}\) is given by  
\[\dot{V}_{1}=z_{1}\big{(}x_{2}-\dot{x}_{1d}\big{)} \tag{19}\]  
In order to make \(\dot{V}_{1}\leq 0\), define \(x_{2d}\) and introduce the error \(z_{2}\) as  
\[x_{2d}=\dot{x}_{1d}-c_{1}z_{1} \tag{20}\]  
\[z_{2}=x_{2}-x_{2d} \tag{21}\]where \(c_{1}\) is a positive constant. The derivative of \(V_{1}\) can be re-obtained as  
\[\dot{V}_{1}=z_{1}\dot{z}_{1}=z_{1}z_{2}-c_{1}z_{1}^{2} \tag{22}\]  
Step 2: The derivative of the virtual control term \(z_{2}\) is  
\[\dot{z}_{2}=x_{3}+f_{1}(x_{2})+d-\ddot{x}_{d}+c_{1}\dot{z}_{1} \tag{23}\]  
The Lyapunov function is defined as  
\[V_{2}=\frac{1}{2}z_{1}^{2}+\frac{1}{2}z_{2}^{2} \tag{24}\]  
The derivative of \(V_{2}\) is given by  
\[\dot{V}_{2}=z_{1}z_{2}-c_{1}z_{1}^{2}+z_{2}\big{(}x_{3}+f_{1}(x_{2})+d-\ddot{x }_{d}+c_{1}\dot{z}_{1}\big{)} \tag{25}\]  
In order to make \(\dot{V}_{2}\leq 0\), define \(x_{3d}\) and introduce the error \(z_{3}\) as  
\[x_{3d}=\ddot{x}_{1d}-f_{1}(x_{2})-d-c_{1}\dot{z}_{1}-c_{2}z_{2}-z_{1} \tag{26}\]  
\[z_{3}=x_{3}-x_{3d} \tag{27}\]  
where \(c_{2}\) is a positive constant. The derivative of \(V_{2}\) can be re-obtained as  
\[\dot{V}_{2}=-c_{1}z_{1}^{2}-c_{2}z_{2}^{2}+z_{2}z_{3} \tag{28}\]  
Step 3: The backstepping control is combined with the GSTA.  
The sliding mode surface is defined as  
\[s=k_{1}z_{1}+k_{2}z_{2}+z_{3} \tag{29}\]  
where \(k_{1}\) and \(k_{2}\) are the constants that satisfy [PERSON].  
The Lyapunov function is proposed as  
\[V_{3}=\frac{1}{2}z_{1}^{2}+\frac{1}{2}z_{2}^{2}+\frac{1}{2}s^{2} \tag{30}\]  
The derivative of \(V_{3}\) is given by  
\[\begin{array}{l}\ddot{V}_{3}=\dot{V}_{2}+s\dot{s}=-c_{1}z_{1}^{2}-c_{2}z_{2 }^{2}+z_{2}z_{3}\\ +s\left[\begin{array}{l}k_{1}(z_{2}-c_{1}z_{1})+k_{2}(z_{3}-z_{1}-c_{2}z_{2 })+g(u,x_{3})u+f_{2}(x_{2},x_{3})+q-\frac{\beta}{2}\dot{x}_{2}+\dot{d}\\ -\ddot{x}_{1d}+c_{1}(z_{3}-z_{1}-c_{2}z_{2}-c_{1}z_{2}+c_{1}^{2}z_{1})+c_{2}(z _{3}-z_{1}-c_{2}z_{2})+(z_{2}-c_{1}z_{1})\end{array}\right]\end{array} \tag{31}\]  
Introducing the GSTA combined with the above equation, the controller is designed as follows:  
\[u=g(u,\dot{x}_{3})^{-1}\left[\begin{array}{l}-k_{1}(\hat{z}_{2}-c_{1}z_{1})- k_{2}(\hat{z}_{3}-z_{1}-c_{2}\hat{z}_{2})-f_{2}(\hat{x}_{2},\hat{x}_{3})-\hat{q}- \hat{\hat{d}}+\ddot{x}_{1d}\\ +\frac{\beta}{2}\dot{x}_{2}-\beta_{1}\Phi_{1}(s)-\beta_{2}\int\Phi_{2}(\hat{s} )-c_{1}\big{(}\hat{z}_{3}-z_{1}-c_{2}\hat{z}_{2}-c_{1}\hat{z}_{2}+c_{1}^{2} \hat{z}_{1}\big{)}\\ -c_{2}(\hat{z}_{3}-z_{1}-c_{2}\hat{z}_{2})-(\hat{z}_{2}-c_{1}z_{1})\end{array}\right] \tag{32}\]  
where \(\beta_{1}\) and \(\beta_{2}\) are constants, and \(\Phi_{1}(s)\) and \(\Phi_{2}(s)\) are nonlinear stability terms, expressed as follows:  
\[\left\{\begin{array}{l}\Phi_{1}(s)=\mu_{1}|s|^{\frac{1}{2}}\text{sign}(s)+ \mu_{2}s\\ \Phi_{2}(s)=\frac{\mu_{1}^{2}}{2}\text{sign}(s)+\frac{3}{2}\mu_{1}\mu_{2}|s|^{ \frac{1}{2}}\text{sign}(s)+\mu_{2}^{2}s\end{array}\right. \tag{33}\]where \(\mu_{1}\) and \(\mu_{2}\) are non-negative constants and are not both zero. In the case of the constant \(\mu_{1}\mu_{2}\), the GSTA ensures faster convergence under increasing uncertainty.  
The overall block diagram of the designed controller is shown in Figure 2.