## 4 Sliding Mode Control
In this paper, we applied neural network model-based sliding mode control to the physics- and geometry-based model of the Delta robot, and carried out numerical simulations to observe and evaluate the validity of the proposed neural network modeling and control design approach. In the following examples, we take \(\mathbf{C}\) as \(10\times\mathbf{I}\) where \(\mathbf{I}\) is the identity matrix, \(\alpha=0.1\), \(\gamma=0.1\), and \(\epsilon=1\). Three different paths are adopted to test the performance of the proposed sliding mode control. The mathematical expressions of three paths, namely heart curve, logarithmic spiral, and spiral, are given as follows. \[\text{Heart curve:} \begin{cases}x=0.01(16\sin^{3}(2.1\pi t/t_{e}))\\ y=0.01(13\cos(2.1\pi t/t_{e})-5\cos(4.1\pi t/t_{e})\\ \qquad-2\cos(6.1\pi t/t_{e})-\cos(8.1\pi t/t_{e}))\\ z=-0.6\end{cases}  \tag{18}\]\[\text{Logarithmic spiral:} \begin{cases}a=0.2e^{(-0.48\pi t/t_{e})}\\ x=a\cos(8\pi t/t_{e})\\ y=-a\sin(8\pi t/t_{e})\\ z=0.1\sin(0.5\pi t/t_{e})-0.55\end{cases}  \tag{19}\]  
\[\text{Spiral:} \begin{cases}x=0.05\sin(5\pi t/t_{e})\\ y=0.22\cos(5\pi t/t_{e})\\ z=-0.25t/t_{e}-0.35\end{cases}  \tag{20}\]  
where \(t_{e}\) is the end of the time. The 3D tracking results and part of the control inputs \(\theta_{i}\) for different paths are shown in Figures 7-12. The neural network model-based sliding mode control demonstrates remarkable performance in trajectory tracking of various paths while maintaining bounded control inputs. This indicates that the trained neural network model successfully captures the Delta robot's nonlinear property with an acceptable magnitude of tracking error. The trajectory tracking errors of the sliding mode control \(\mathbf{e}(t)=[e_{p_{x}},e_{p_{y}},e_{p_{z}}]^{T}\) for different curves are shown in Figure 13. The initial conditions for the tracking of all trajectories are chosen as \([\mathbf{x};\hat{\mathbf{x}}]=[\mathbf{x}_{d};\hat{\mathbf{x}}_{d}]-[0.1;0.1; 0.1;0.1;0.1]\). Figure 7: Three-dimensional trajectory tracking of heart curve using the sliding mode control with the neural network control-affine model. Figure 8: Magnitude of the sliding mode control with the neural network control-affine model for heart curve trajectory tracking. Figure 9: Three-dimensional trajectory tracking of logarithmic spiral curve using the sliding mode control with the neural network control-affine model. Figure 11: Three-dimensional trajectory tracking of spiral curve using the sliding mode control with the neural network control-affine model. Figure 10: Magnitude of the sliding mode control with the neural network control-affine model for logarithmic spiral curve trajectory tracking. A detailed summary of the trajectory tracking errors are shown in Table 3. By evaluating these results, it is found that the maximum value of tracking error for different curves are the same, and the trajectory tracking errors all converge to zero in a finite time. Figure 12: Magnitude of the sliding mode control with the neural network control-affine model for spiral curve trajectory tracking. Figure 13: Tracking error of the sliding mode control in Equation (8) for different curves. Up: the error for spiral trajectory tracking. Middle: the error for logarithmic spiral trajectory tracking. Bottom: the error for heart curve trajectory tracking.