## 3 Controller Design
### Adaptive Robust Term  
The neural network causes neural network estimation error during the learning process. The neural network estimation error decreases to a small value when training is complete; however, during learning, the neural network estimation error has valid values and can affect transient states. Network estimation errors usually occur during initial weight learning or when the large signal changes, which causes system errors. Compensating for the neural network estimation error is important in robotic system control using neural networks. Previous research has used an additional control input similar to the switching term called the robust term \(\psi\text{sgn}(e)\). \(\psi\) is a positive constant, \(\text{sgn}()\) is a sign function, and \(e\) is an error function; therefore, it is a controller that generates a control gain according to the sign of the error function. If tuning well, the robust term is effective and simple. Nevertheless, this method is not effective in some situations. For example, using a small control gain to reduce chattering has little improvement over large instantaneous signal changes. This can be improved by using a large control gain, but it causes chattering on the steady state output or control input; therefore, we need to increase the robustness of the system by adaptively compensating for the neural network estimation error. In other words, the adaptive robust term should be able to respond to large signal changes by generating control force according to the error. Finally, we need an output that does not chatter in a steady state [52]. In this section, we design an adaptive robust term using the Lyapunov function candidate to consider the stability of the controller. To remove the chattering, we use the reverse saturation function to eliminate chattering or residual control inputs in the steady state. \[D^{*}=d^{*}(\bullet)\cdot\Lambda+\epsilon^{*} \tag{24}\]  
\[u=M\cdot(\ddot{x}_{d}+\alpha\dot{\epsilon}/\lambda\dot{\epsilon}^{\lambda-1}- \hat{d}(\bullet)\Lambda+k\cdot\text{sgn}(s)-\hat{\epsilon})+(C+G) \tag{25}\]  
Due to the neural network estimation error, we redesign optimal disturbance approximation \(D^{*}\), such as in Equation (24). \(\epsilon^{*}\) is the optimal neural network estimation error, and \(\hat{\epsilon}\) is the adaptive robust term output. Equation (25) is the proposed control input with the adaptive robust term. To ensure system stability and design the adaptive law, we consider Lyapunov function candidate such as Equation (27)  
\[V_{3}=s^{2}/2+\widetilde{W}^{T}\widetilde{W}/2\gamma+\widetilde{\epsilon}^{T} \widetilde{\epsilon}/2\beta \tag{26}\]  
Its time derivative is  
\[\dot{V}_{3}=\dot{s}\dot{s}+\widetilde{W}^{T}\dot{\widetilde{W}}/\gamma+ \widetilde{\epsilon}^{T}\hat{\epsilon}/\beta \tag{27}\]  
where \(\widetilde{\epsilon}=\hat{\epsilon}-\epsilon^{*}\), \(\beta\) is the positive adaptive control gain. Equations (7) and (25) are substituted into Equation (27). We can obtain Equations (28) and (29). \[\dot{V}_{3}=s\Big{\{}-\lambda\dot{\epsilon}^{\lambda-1}\cdot k\cdot\text{sgn} (s)+\lambda\dot{\epsilon}^{\lambda-1}\cdot\Lambda(\widetilde{W}^{T}H)+ \widetilde{\epsilon}^{T})\Big{\}}+\widetilde{W}^{T}\dot{\widetilde{W}}/\gamma+ \widetilde{\epsilon}^{T}\hat{\hat{\epsilon}}/\beta \tag{28}\]  
\[\dot{V}_{3}=-\lambda\dot{\epsilon}^{\lambda-1}\cdot k\cdot s\cdot\text{sgn}(s )+\widetilde{W}^{T}(\lambda\dot{\epsilon}^{\lambda-1}\cdot s\cdot\Lambda H+ \dot{\widetilde{W}}/\gamma)+\widetilde{\epsilon}^{T}(\lambda\dot{\epsilon}^{ \lambda-1}\cdot s+\dot{\epsilon}/\beta) \tag{29}\]  
To realize asymptotic stability \(\dot{V}_{3}<0\), we can obtain the adaptive robust term update law Equation (30).