## 4 Sliding Mode Control  
Recall the control-affine nonlinear model in terms of the neural networks in Equation (5). We have  
\[\ddot{\mathbf{x}}=\mathbf{\hat{f}}(\mathbf{x},\dot{\mathbf{x}})+ \mathbf{\hat{g}}(\mathbf{x},\dot{\mathbf{x}})\mathbf{u} \tag{7}\]  
Assume that the Delta robot will track the desired trajectory \(\mathbf{x}_{d}(t)\). The tracking error and its derivative are given as  
\[\mathbf{e}(t)=\mathbf{x}_{d}(t)-\mathbf{x}(t),\ \ \dot{\mathbf{e}}(t)=\dot{ \mathbf{x}}_{d}(t)-\dot{\mathbf{x}}(t) \tag{8}\]  
We select a sliding surface as  
\[\mathbf{s}(t)=\mathbf{C}\mathbf{e}(t)+\dot{\mathbf{e}}(t) \tag{9}\]  
where \(\mathbf{C}\in\mathbb{R}^{3\times 3}\) is positive-definite and satisfies the Hurwitz stability condition. Thus, the sliding mode control can be designed as [23]  
\[\mathbf{u}(t)=\mathbf{\hat{g}}^{-1}\Big{(}\gamma\tanh\Big{(} \frac{\mathbf{s}}{\epsilon}\Big{)}+\alpha\mathbf{s}+\mathbf{C}(\dot{\mathbf{x }}_{d}-\dot{\mathbf{x}})+\bar{\mathbf{x}}_{d}-\mathbf{\hat{f}}\Big{)} \tag{10}\]  
where \(\gamma>0\) and \(\alpha>0\) are constant gains, and \(\epsilon>0\). Chattering is a prevalent concern associated with sliding mode controllers with switching term \(sgn(\mathbf{s})\). To reduce the chattering in the sliding mode control, the switching terms for the control law and the sliding surface have to be carefully chosen [24]. In this paper, the continuous function \(\tanh(\cdot)\) is adopted to replace the discontinuous sign function [25]. \(\epsilon\) determines the steepness of \(\tanh(\cdot)\) as an approximation of the sign function. To prove the stability of the sliding mode control, we shall need the following lemma. Lemma 1: _Let \(f,V:[0:\infty)\in R\), then \(\dot{V}\leq-\alpha V+f\), \(\forall t\geq t_{0}\geq 0\) implies that [26]_  
\[V(t)\leq e^{-\alpha(t-t_{0})}V(t_{0})+\int_{t_{0}}^{t}e^{-\alpha (t-\tau)}f(\tau)d\tau \tag{11}\]  
Figure 6: Random sampled points in the 3D workspace of the Delta robot. Define a Lyapunov function as  
\[V=\frac{1}{2}\mathbf{s}^{T}\mathbf{s} \tag{12}\]  
Then, we have  
\[\dot{V}=\mathbf{s}^{T}\mathbf{s} \tag{13}\]  
Since  
\[\dot{\mathbf{s}} =\mathbf{C}\dot{\mathbf{e}}(t)+\ddot{\mathbf{e}}(t) \tag{14}\] \[=\mathbf{C}(\dot{\mathbf{x}}_{d}-\dot{\mathbf{x}})+(\ddot{\mathbf{ x}}_{d}-\ddot{\mathbf{x}})\] \[\mathbf{e}(t)=\mathbf{x}_{d}(t)-\mathbf{x}(t),\ \ \dot{\mathbf{e}}(t)=\dot{ \mathbf{x}}_{d}(t)-\dot{\mathbf{x}}(t) \tag{8}\]0 \[\mathbf{e}(t)=\mathbf{x}_{d}(t)-\mathbf{x}(t),\ \ \dot{\mathbf{e}}(t)=\dot{ \mathbf{x}}_{d}(t)-\dot{\mathbf{x}}(t) \tag{8}\]1  
therefore, we obtain  
\[\mathbf{e}(t)=\mathbf{x}_{d}(t)-\mathbf{x}(t),\ \ \dot{\mathbf{e}}(t)=\dot{ \mathbf{x}}_{d}(t)-\dot{\mathbf{x}}(t) \tag{8}\]2 \[\mathbf{e}(t)=\mathbf{x}_{d}(t)-\mathbf{x}(t),\ \ \dot{\mathbf{e}}(t)=\dot{ \mathbf{x}}_{d}(t)-\dot{\mathbf{x}}(t) \tag{8}\]3  
Hence, the closed-loop system is stable. Furthermore, we have  
\[\dot{V}(t)=\left\{ \begin{array}{ll}-2(\alpha+\gamma/\epsilon)V(t)&s_{i}\leq \epsilon\text{ for all }i\\ -2\alpha V(t)&s_{i}>\epsilon\text{ for all }i\end{array} \right. \tag{16}\]  
According to Lemma 1, we conclude that \(V(t)\) exponentially decreases at the rate \(2(\alpha+\gamma/\epsilon)\) when \(\mathbf{s}\) is outside the boundary layer defined by \(\epsilon\), and at the rate of \(2\alpha\) when \(\mathbf{s}\) is located inside the boundary layer. In both cases, we have  
\[\lim_{t\to\infty}V(t)\to 0 \tag{17}\]  
Hence, the tracking error of the sliding mode control for the system in Equation (7) converges asymptotically to zero at the exponential rate. On the other hand, when the neural network model of the Delta robot has a sufficiently small error, it can be expected that the sliding mode control will deliver similar tracking performance in experiments. This is a subject of on-going work.