## 5 Experimental Test and Real Time Results
#### Tracking Results  
In order to show the tracking simulation results, the following reference signals were applied:  
\[\begin{split} q^{1d}(k)=\chi^{1d}(k)=x^{1d}(k)=[\sin(\omega_{1}t)+2] \text{ rad},\\ q^{2d}(k)=\chi^{2d}(k)=x^{2d}(k)=[\sin(\omega_{2}t)+3]\text{ rad}. \end{split} \tag{24}\]  
with \(\omega_{1}=(3.5\,t+1)\ \text{ rad}/\text{s}\) and \(\omega_{2}=(3\,t+3)\ \text{ rad}/\text{s}\). These reference signals were chosen arbitrarily to demonstrate a very good approximation. A sample time of \(k=0.001\ \text{s}\) is used, and if we then insert them into Equation (17), we obtain the following supply torques:  
\[\begin{split}|\tau_{1}|\leq\tau_{1}^{max}(k)=100\ \text{Nm},\\ |\tau_{2}|\leq\tau_{2}^{max}(k)=50\ \text{Nm}.\end{split} \tag{25}\]  
The closed-loop simulation results using the FPGA hardware-in-loop architecture are presented in Figure 6.  
Figure 5: (a) Identification results and (b) identification error for the first state of joint \(1\ x_{1}^{1}(k)\).  
The results for this real-time implementation are limited to the robot's physical parameters. The applied torque in Figure 6 has the maximum value calculated for this controller and it is applied with limitations. An example of this can be if the applied disturbance reaches the limit of the physical resistance of the 2 DOF construction material for the present 2 DOF robot. It can be pushed to an uncontrolled dynamic behavior. However, the non-modeled dynamics can be tolerated until the 2 DOF and the torque applied to the 2 DOF resist the external involved perturbances if not reaching the SMC design parameters presented in this paper (Equation (17)).  
The system works in open-loop during the interval from 0-0.5 s, and this in order to let the RHONN estimate the state space variables. After this setup period, the system is set in closed-loop. An external disturbance is applied in the interval of time from the fifth to sixth second in a step-wise way. The tracking results for joints 1 and 2 are displayed in Figure 6, and their corresponding tracking errors are shown in Figure 7.  
Additionally, in Figure 8 the applied torques are shown. As can be seen in Figure 8a, the applied torques \(\mathsf{T}_{1}(k)\) and \(\mathsf{T}_{1}(k)\) reached the maximum value \(\tau_{1}^{max}(k)\) specified in Equation (25) after approximately 3.4 s of simulation. This is the time in which the system proceeds to the sliding manifold \(\mathsf{s}_{0}^{1}(k)\) (\(\left\|\vec{a}_{eq}^{1}(k)\right\|\leq u_{0}^{1}(k)\)). After these 3.4 s, the control law \(u^{1}(k)\) is a smooth function, which means that the sliding manifold \(s^{1}_{D}(k)\) has been reached \(\left(\left\|\tilde{u}^{1}_{eq}(k)\right\|>u^{1}_{0}(k)\right)\). After that the disturbance is applied at 5 s, and in consequence the applied torques goes to the maximum value. This point can be observed in the tracking results shown in Figure 6a and the applied torques \(\mathrm{T}_{2}(k)\) and \(\mathrm{\tau}_{2}(k)\) are shown in Figure 8b. In other words, after the 0.5 s, the value specified in Equation (25) means that the sliding manifold \(s^{2}_{D}(k)\) has been reached immediately thanks to the controller in \(\left(\left\|\tilde{u}^{2}_{eq}(k)\right\|>u^{2}_{0}(k)\right)\).  
Table 1 contributes with the hardware resource utilization of logic circuits used in the hardware-in-loop architecture for the complete control system, which has the SMC controller and the RHONN neural identifier. This table shows the quantity of DSP48s circuits that were used as arithmetic blocks with floating point variables. It also allows integration of other kind of structures in a training device with an FPGA. The proposed design saves a great deal of resources that can be used for improved versions of the algorithms presented herein, to increase the applicability of this method.  
Figure 7: Tracking error results (**a**) for \(z^{1}_{1}(k)\) and (**b**) for \(z^{1}_{2}(k)\).