## 4 Simulations and Experiments Results and Discussion  
### Simulations Results and Discussion  
The parameters of the sliding mode controller (SMC) are selected as \(\mathbf{C}\) = diag(20, 30), \(\varepsilon\) = diag(10, 20), and K = diag(20, 60). Set the disturbing torques of Joints 1 and 2, respectively, as \(\tau_{d1}\ =\ 0.5\sin(10\pi t)\) and \(\tau_{d2}\ =\ 0.5\cos(10\pi t)\). The parameters of the Stribeck friction model are selected as listed in Table 2.  
The simulation results of the control law of sliding mode controller expressed by Equation (38) with the above parameters on step input are shown in Figures 4 and 5 and on sinusoid input are shown in Figures 6 and 7. A classical PID (proportional-integral-derivative) controller was also designed for comparison. The values of proportional, integral, and derivative gains of Joint 1 were \(P_{1}\) = 102, \(I_{1}\) = 1.2, and \(D_{1}\) = 21.5, and the control parameters of Joint 2 were \(P_{2}\) = 87, \(I_{2}\) = 0.7, and \(D_{2}\) = 15. These values have been optimally tuned using a modified Ziegler-Nichols' (Z-N) tuning methods [31]. trajectory diagram of the SMC. Figure 4c,d shows the tracking error with PID controller and the SMC, respectively. Figure 5 shows the step responses of Joint 2. For step input, the adjusting times of both joints with the proposed SMC and the PID controller are only 0.2 s. However, the position steady state error of each joint with the SMC is far less than that with the PID controller. As shown in Figures 4c,d and 5c,d, the tracking errors generated by the PID controller oscillate more intensely than that by the SMC. This phenomenon implies that the SMC possess better control accuracy and stronger robustness under disturbances than the PID. The phase trajectory of the SMC rapidly reaches the sliding mode surface from the initial point and quickly converges along the sliding mode surface to the equilibrium point. This illustrates that the designed SMC has good dynamic quality and uniform stability. Figure 6 shows the sinusoidal responses of Joint 1 with the proposed SMC and the PID controller. Figure 6a shows the position tracking with PID controller and the SMC. Figure 6b shows the phase trajectory diagram of the SMC. Figure 6c,d shows the tracking error with PID controller and the SMC, respectively. Figure 7 shows the sinusoidal responses of Joint 2. Figure 4: Simulation of step response of Joint 1: (**a**) Position tracking; (**b**) Phases trajectory diagram of SMC; (**c**) Tracking error of PID (proportional-integral-derivative); and (**d**) Tracking error of SMC (sliding mode controller). Figure 5: Simulation of step response of Joint 2: (**a**) Position tracking; (**b**) Phases trajectory diagram of SMC; (**c**) Tracking error of PID; and (**d**) Tracking error of SMC. For sinusoidal input, as show in Figures 6 and 7, an obvious lag or steady error is presented in the trajectory produced by the PID controller, which suffers from some difficulties in obtaining accurate tracking. The position tracking error of each joint with the PID controller oscillates more greatly than that with the SMC. The existence of this phenomenon suggests again that the SMC has better dynamic and static characteristic than the PID, and has high accuracy and stronger robustness. As shown in Figures 6b and 7b, the phase trajectory rapidly reaches the sliding mode surface and quickly tends along the sliding mode surface to a tiny stable limit cycles around the equilibrium point. This illustrates that the designed sliding mode variable control has bounded stability. And the existence of the limit cycle implicates that the system has small steady state error. The simulation results show that the influences of the friction torque and disturbances of the load torque and inertia are effectively suppressed by sliding mode variable structure control which has a strong adaptive ability to input signals.