## 3 Controller Design
### Proposed Controller Design
#### 3.2.1 Adaptive Radial Basis NN (ARBNN)  
The dynamic model of the dual-axis manipulator is established as follows:  
\[M_{0}(q)\ddot{q}+C_{0}\big{(}q,\dot{q}\big{)}\dot{q}+G_{0}(q)+\Xi\big{(}q,\dot{q},\ddot{q},t\big{)}+U_{p}=V(U_{DM}) \tag{25}\]  
where \(Y\) is set to a constant value of 1.0 for the sake of convenience and \(U_{DM}\) refers to the control torque of dual-axis manipulator. We can rewrite Equation (25) in state-space form divided into four parts, as follows:  
\[\ddot{q}=M_{0}^{-1}U_{DM}+M_{0}^{-1}\big{(}-C_{0}q-G_{0}\big{)}+M_{0}^{-1} \big{(}-U_{p}\big{)}+M_{0}^{-1}\big{(}-\Xi+\Gamma(U_{DM})\big{)} \tag{26}\]  
where \(M_{0}^{-1}U_{DM}\) refers to the control signal, \(M_{0}^{-1}(-C_{0}q-G_{0})\) is the known term, \(M_{0}^{-1}\big{(}-U_{p}\big{)}\) is the unknown payload term, and \(M_{0}^{-1}(-\Xi+\Gamma(U_{DM}))\) is the unknown interferences and uncertainties beyond the payload term. Equation (26) can then be replaced by the following:  
\[\ddot{q}=M_{0}^{-1}U_{DM}+F+\mathcal{N}+\Delta\big{(}q,\dot{q},U,t\big{)} \tag{27}\]  
where we define the following for convenience: \(F=M_{0}^{-1}(-C_{0}q-G_{0})\), \(\mathcal{N}=M_{0}^{-1}\big{(}-U_{p}\big{)}\), and \(\Delta\big{(}q,\dot{q},U,t\big{)}=M_{0}^{-1}(-\Xi+\Gamma(U_{DM}))\). The trajectory tracking error is defined as \(e\triangleq q-q_{d}\) and the actual and desired trajectories are indicated by \(q\) and \(q_{d}\), respectively. We select an NFTSMC surface that combines the advantages of the conventional sliding film and the terminal sliding mode, allowing the error to converge quickly to zero in a finite time [23]. The NFTSMC surface is as follows:  
\[s=e+c_{1}e^{\alpha}+c_{2}\dot{e}^{(\frac{p}{l})}=[s_{1}\ s_{2}]^{T} \tag{28}\]  
where \(c_{1}\), \(c_{2}\in R^{n\times n}\) are diagonal positive definite matrixes, and \(p\) and \(l\) are positive odd numbers satisfying the relation \(\ 1<p/l\ <\ 2\) and \(\alpha\ >\ p/l\), such that Equation (28) can be derived as  
\[\dot{s}=\dot{e}+c_{1}\alpha|e|^{\alpha-1}\otimes\dot{e}+c_{2}\Big{(}\frac{p}{ l}\Big{)}|\dot{e}|^{(\frac{p}{l}-1)}\otimes\ddot{e}=\big{[}\dot{s}_{1}\ \ \dot{s}_{2}\big{]}^{T} \tag{29}\]  
where \((\cdot)\otimes(\cdot)\) means that \(\mathcal{A}\otimes\mathcal{B}=[a_{1}b_{1}\ \ a_{2}b_{2}\dots\ a_{n}b_{n}]^{T}\) if \(\mathcal{A},\mathcal{B}\in R^{n\times 1}\). For the sake of simplicity, we stipulate that \(O_{1}\triangleq c_{1}\alpha|e|^{\alpha-1}\in R^{n\times 1}\), \(O_{2}\triangleq c_{2}\big{(}\frac{p}{l}\big{)}|\dot{e}|^{(\frac{p}{l}-1)}\in R ^{n\times 1}\), which are both positive. In accordance with the design procedures for sliding mode control, let \(\dot{s}=0\) and substitute Equation (27) into Equation (29) to obtain the following:  
\[\dot{s}=\dot{e}+O_{1}\otimes\dot{e}+O_{2}\otimes \begin{pmatrix}M_{0}^{-1}U_{ DM}+F+\mathcal{N}+\\ \Delta\big{(}q,\dot{q},U,t\big{)}-\ddot{q}_{d}\end{pmatrix} =0 \tag{30}\]  
Thus, if the control strategy based on NFTSMC satisfies \(|\Delta+\mathcal{N}|\leq\eta\in R^{n\times 1}\) (where \(\eta\) is a small positive vector), then the equivalent control signal \(U_{eq}\) of this system can be derived as follows:  
\[U_{eq}=O_{2}^{-1}\otimes\big{(}-\dot{e}-O_{1}\otimes\dot{e}\big{)}+M_{0}\ddot {q}_{d}-F=\big{[}u_{eq1}\ u_{eq2}\big{]}^{T} \tag{31}\]  
At the same time, the uncertainties and disturbances are dealt with using switching control signal \(U_{r}\), which ensures that the system continuously moves along the sliding surface:  
\[U_{r}=-(\eta+\delta)\otimes\text{sign}(s)=[u_{r1}\ \ \ u_{r2}]^{T} \tag{32}\]  
where \(\delta\ \in\ R^{n\times 1}\) is a small vector of positive constants. Thus, the overall control input can be expressed as follows:  
\[U_{DM1}=M_{0}U_{eq}+M_{0}U_{r} \tag{33}\]Based on the design of the control input signal, we selected a candidate Lyapunov function as \(V_{DM1}=\frac{1}{2}s^{T}s\), which, when differentiated, gives us \(\dot{V}_{DM1}=s^{T}\dot{s}\). When we combine Equations (30)-(33), the resulting function satisfies the inequality \(\dot{V}_{DM1}\leq-O_{2}^{T}\delta\otimes|s|\).