## 6 Trajectory Tracking Control  
The goal of trajectory tracking control can be chosen to make the joints track the planned trajectory within an explicit convergence time. The principle can be explained using Figure 7.  
In response to the dynamic model of a continuum space robot proposed in Equation (55), the objective of the controller design is to ensure that the actual joint angles \(\mathbf{q}=[q_{1},\dots,q_{n}]^{\text{T}}\) track the desired joint angles \(\mathbf{q}_{d}=[q_{1d},\dots,q_{nd}]^{\text{T}}\). The angle error is defined as \(\mathbf{e}_{s}=\mathbf{q}-\mathbf{q}_{d}=[e_{1},\dots,e_{n}]\).  
Design a terminal sliding mode switching function based on Lemma 1 as follows:  
\[\mathbf{s}=\dot{\mathbf{e}}_{s}+\frac{\mathbf{e}_{sc}^{m}}{mT_{c}}\frac{\mathbf{e}_{s}}{|\mathbf{e }_{s}|^{m}} \tag{63}\]  
where \(\mathbf{e}_{sc}\) is the error boundary.  
Design a sliding mode convergence law as  
\[\dot{\mathbf{s}}=-\frac{\mathbf{s}_{c}^{m}}{mT_{c}}\frac{\mathbf{s}}{|\mathbf{s}|^{m}} \tag{64}\]  
where \(\mathbf{s}_{c}\) is the boundary calculated according to (63).  
According (55), (63), and (64), an explicit time terminal sliding mode controller can be designed as  
\[\mathbf{u}=\mathbf{B}-\mathbf{A}\left(-\ddot{\mathbf{q}}_{d}+\frac{\mathbf{e}_{sc}^{m}}{mT_{c}} \frac{(1-m)\dot{\mathbf{e}}_{s}}{|\mathbf{e}_{s}|^{m}}+\frac{\mathbf{s}_{c}^{m}}{mT_{c}} \frac{\mathbf{s}}{|\mathbf{s}|^{m}}\right) \tag{65}\]  
**Proposition 2**.: _System (55) can achieve stability over time \(2T_{c}\) under the control of the controller (65)._  
Proof.: Considering a candidate Lyapunov function as  
\[V_{1}=\frac{1}{2}\mathbf{s}^{T}\mathbf{s} \tag{66}\]  
Figure 7: Structure of the tracking system.  
The time derivative of Equation (66) can be given by  
\[\dot{V}_{1} =\mathbf{s}^{\rm T}\dot{\mathbf{s}} \tag{67}\] \[=-\mathbf{s}^{\rm T}\frac{\mathbf{s}_{c}^{m}}{mT_{c}}\frac{\mathbf{s}}{|\mathbf{s} |^{m}}\] \[=-\frac{\mathbf{s}_{c}^{m}}{mT_{c}}(2V_{1})^{1-\frac{m}{2}}\]  
According to Lemma 1, the time upper bound of the system in the approaching stage of sliding mode control is \(T_{c}\).  
When the system reaches the sliding surface, \(\mathbf{s}=0\), according to (73), there are  
\[\dot{\mathbf{e}}_{s}=-\frac{\mathbf{e}_{sc}^{m}}{mT_{c}}\frac{\mathbf{e}_{s}}{|\mathbf{e}_{s}| ^{m}} \tag{68}\]  
Considering a candidate Lyapunov function as  
\[V_{2}=\frac{1}{2}\mathbf{e}_{s}^{T}\mathbf{e}_{s} \tag{69}\]  
The time derivative of Equation (69) can be given by  
\[\dot{V}_{2} =\mathbf{e}_{s}^{\rm T}\dot{\mathbf{e}}_{s} \tag{70}\] \[=-\mathbf{e}_{s}^{\rm T}\frac{\mathbf{e}_{sc}^{m}}{mT_{c}}\frac{\mathbf{e}_{s }}{|\mathbf{e}_{s}|^{m}}\] \[=-\frac{\mathbf{e}_{sc}^{m}}{mT_{c}}(2V_{2})^{1-\frac{m}{2}}\]  
According to Lemma 1, the time upper bound of the system in the sliding stage of sliding mode control is \(T_{c}\).  
The total upper bound on the stability time of the system is \(2T_{c}\). The proof is complete.  
If considering the uncertainty of the system, system (55) is modified to  
\[\left\{\begin{array}{l}\dot{\mathbf{x}}_{1}=\mathbf{x}_{2}\\ \dot{\mathbf{x}}_{2}=\mathbf{A}^{-1}(\mathbf{u}-\mathbf{B})+\mathbf{D}\end{array}\right. \tag{71}\]  
In order to improve the robustness of the system, the controller (65) needs to be modified to  
\[\mathbf{u}=\mathbf{B}-\mathbf{A}\bigg{(}-\ddot{\mathbf{q}}_{d}+\frac{\mathbf{e}_{sc}^{m}}{mT_{c}} \frac{(1-m)\mathbf{e}_{s}}{|\mathbf{e}_{s}|^{m}}+\frac{\mathbf{s}_{c}^{m}}{mT_{c}}\frac{ \mathbf{s}}{|\mathbf{s}|^{m}}+k\operatorname{sat}(\mathbf{s}\mathbf{\phi})\bigg{)} \tag{72}\]  
where \(k>\|\mathbf{D}\|\).