# Two-Phase Non-Singular Terminal Sliding Mode Control of Nonlinear Systems
## 5 Numerical Simulations
The sliding mode with double power rate is chosen as the comparator, where the results in [25; 33] are both considered, described, respectively, as  
\[{}^{S\text{double power rate1}} = e_{2}+o_{1}e_{1}^{\beta_{1}}+o_{2}e_{2}^{\alpha_{1}} \tag{30}\] \[{}^{S\text{double power rate2}} = e_{2}+o_{1}e_{1}^{\frac{1}{2}+\frac{\beta_{1}}{2}+(\frac{\beta_ {1}}{2}-\frac{1}{2})\text{sign}(|e_{1}|-1)}+o_{2}e_{1}^{\alpha_{1}} \tag{31}\]  
Applying these two sliding mode surfaces to the SIP problems, we design the non-singular TSM controllers with these two double power rate sliding mode surfaces as  
\[u_{\text{double power rate1}} = -\frac{1}{g}\bigg{(}f+\gamma\text{sign}(s)-\bar{x}_{d}+o_{1}\beta _{1}e_{1}^{\beta_{1}-1}+o_{2}\alpha_{1}\text{sat}(e_{1}^{\alpha_{1}-1}e_{2})+ \tag{32}\] \[\kappa_{1}s^{\beta_{2}}+\kappa_{2}s^{\alpha_{2}}\bigg{)}\] \[u_{\text{double power rate2}} = -\frac{1}{g}\bigg{[}f+\gamma\text{sign}(s)-\bar{x}_{d}+o_{1}( \frac{1}{2}+\frac{\beta_{1}}{2}+\] (33) \[(\frac{\beta_{1}}{2}-\frac{1}{2})\text{sign}(|e_{1}|-1))e_{1}^{ \frac{1}{2}+\frac{\beta_{1}}{2}+(\frac{\beta_{1}}{2}-\frac{1}{2})\text{sign}( |e_{1}|-1)-1}e_{2}+\] Figure 4:0  
The two-phase one is referred to in the design in Part i. According to the analysis in [25; 33], the bound of settling time of the two sliding mode surfaces with double power rate are further derived as  
Figure 4:1 Figure 4:2 Figure 4:3 (35) Figure 4:4 Figure 4:5  
The comparison result is depicted in Figure 4, which shows that the convergence of system states using the two-phase TSM controller has a few more advantages than the other two control schemes. More importantly, the bound of the settling time given by (19), (34) and (35) also indicates, respectively, where the two-phase sliding mode surface with finite-duration stability is plainly less conservative than the other two sliding mode surfaces, since the two-phase sliding mode surface is selected. Part iii. The application on the industrial manipulators  
The dynamics of the n-link manipulator is \(M(q)\ddot{q}+C(q,\dot{q})\dot{q}+G(q)=\tau\), where \(q,\dot{q},\ddot{q}\in\mathbb{R}^{n}\) are the vectors of angular position, velocity and acceleration, respectively, and \(M(q)=M_{0}(q)+\delta M(q),C(q,\dot{q})=C_{0}(q,\dot{q})+\delta C(q,\dot{q}),G(q )=G(q)+\delta G(q)\). The simulation example of the two-link rigid industrial manipulator is referred to in [18], written as  
\[\left[ \begin{array}{cc}a_{11}(q_{2})&a_{12}(q_{2})\\ a_{21}(q_{2})&a_{22}\end{array} \right]\left[ \begin{array}{c}\ddot{q}_{1}\\ \ddot{q}_{2}\end{array} \right]+\left[ \begin{array}{c}-b_{12}(q_{2})q_{1}^{2}-2 b_{12}(q_{2})q_{1}q_{2}\\ b_{12}(q_{2})q_{2}^{2}\end{array} \right]+\left[ \begin{array}{c}c_{1}(q_{1}, q_{2})g\\ c_{2}(q_{1},q_{2})g\end{array} \right]=\left[ \begin{array}{c}\tau_{1}\\ \tau_{2}\end{array} \right]\]  
where \(a_{11}(q_{2})=(m_{1}+m_{2})r_{1}^{2}+m_{2}r_{2}^{2}+2m_{2}r_{1}r_{2}cos(q_{2})+ l_{1},a_{12}(q_{2})=m_{2}r_{2}^{2}+m_{2}r_{1}r_{2}cos(q_{2})\), \(a_{22}=m_{2}r_{2}^{2}+l_{2}\), \(b_{12}(q_{2})=m_{2}r_{1}r_{2}sin(q_{2})\), \(c_{1}(q_{1},q_{2})=(m_{1}+m_{2})r_{1}cos(q_{2})+m_{2}r_{2}cos(q_{1}+q_{2})\), \(c_{2}(q_{1},q_{2})=m_{2}r_{2}cos(q_{1}+q_{2})\). The parameters are chosen as \(r_{1}=1\) m, \(r_{2}=0.8\) m, \(l_{1}=5\) kg m, \(m_{1}=0.5\) kg, \(m_{2}=1.5\) kg. The initial state is given as \(q_{1}(0)=1,q_{2}(0)=1.5,\dot{q}_{1}(0)=0,\dot{q}_{2}(0)=0\), and the nominal values are selected as \(\hat{m}_{1}=0.4\) kg, \(\hat{m}_{2}=1.2\) kg. The reference trajectory is given as \(q_{d1}=1.25-(7/5)e^{-l}+(7/20)e^{-4l},q_{d2}=1.25+e^{-l}-(1/4)e^{-4l}\). The two-phase sliding mode surface is designed as  
\[s=\left\{ \begin{array}{ll}\ddot{q}+k_{1}\ddot{q}^{\alpha_{1}}+k_{2}\ddot{q }^{2-\alpha_{1}},&|\ddot{q}|\geq q_{1t}\\ \ddot{q}+k_{1}\ddot{q}+k_{1}\ddot{q}^{\alpha_{1}},&|\ddot{q}|<q_{1t}\end{array} \right. \tag{36}\]  
where \(\ddot{q}=q-q_{d}\).