## 5 Simulation Results  
In this section, the simulation results for a conventional terminal sliding mode control combined with an extended state observer([23]+ESO) and the two proposed AFTCs on a 3-DOF robot manipulator are shown and discussed. The mechanical model of the 3-DOF robot manipulator was built on the SolidWorks (Dassault Systems, Waltham, MA, USA) with the geometry parameters from the catalog of the SAMSUNG FARA-AT2 (Samsung, Namdong-gu, Incheon, Korea). Then, a robot manipulator model was exported to Matlab (MathWorks, Natick, MA, USA) simulation environment by Simmechanics toolbox. It can be seen in Figure 3, and the parameters of the robot manipulator are shown in Table 1.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Links** & **Length (m)** & **Weight (kg)** & **Center of Mass (m)** & **Inertia (kg.m\({}^{2}\))** \\ \hline Link 1 & 0.15 & 56.5 & \([-98.3\times 10^{-3}\)\(-2.9\times 10^{-8}\)\(-85.4\times 10^{-3}]\) & [Ixx=0.39 Jyy=0.59 Izz=0.56] \\ Link 2 & 0.255 & 35.6 & \([-5.5\times 10^{-3}0.001\times 10^{-3}\)\(-156.9\times 10^{-3}]\) & [Ixx=0.76 Jyy=0.44 Izz=0.39 \\ Link 3 & 0.41 & 58.9 & \([54.6\times 10^{-3}\)\(-0.01\times 10^{-3}\)\(80.5\times 10^{-3}]\) & [Ixx=0.22 Jyz=1.2 Izz=1.2] \\ \hline \end{tabular}
\end{table}
Table 1: Parameters of 3-DOF robot manipulator in Matlab simulation.  
Figure 2: The block diagram of the proposed controller active fault-tolerant control with synchronous terminal sliding mode control 1 (AFTC-S-TSMC2).  
For this trajectory tracking simulation, the desired trajectories at each joint are given as:  
\[\left\{\begin{array}{l}q_{1d}=0.5\cos(t/2)-0.5\\ q_{2d}=0.3\cos(t)-0.3\\ q_{3d}=0.2\cos(t)-0.2\end{array}\right. \tag{32}\]  
where \(\dot{q}_{d}\) and \(\ddot{q}_{d}\) are the first order and second order derivatives of the desired position, respectively.  
The friction at each joint was assumed to be:  
\[\left\{\begin{array}{l}F_{1f}=0.2 sgn(\dot{q}_{1})+0.3\dot{q}_{1}\\ F_{2f}=0.2 sgn(\dot{q}_{2})+0.3\dot{q}_{2}\\ F_{3f}=0.2 sgn(\dot{q}_{3})+0.3\dot{q}_{3}\end{array}\right. \tag{33}\]  
The total torque function at each joint was assumed to be:  
\[\left\{\begin{array}{l}\tau_{1}^{t}=\tau_{1}\\ \tau_{2}^{t}=(1-\rho_{2}(t))\tau_{2}+f_{2}(t)\;t>5\\ \tau_{3}^{t}=\tau_{3}\end{array}\right. \tag{34}\]  
where \(\rho_{2}(t)=0.4\sin(\pi t)\) and \(f_{2}(t)=-80\sin(\pi t/2)\).  
The related parameters for the ESO were chosen to be \(\alpha_{1}=8,\alpha_{2}=28,\alpha_{3}=7\), and \(\varepsilon=0.01\). The controller ([23]+ESO) is given as:  
\[\tau_{[23]+ESO}=\tau_{0}+\tau_{smc}+\tau_{ob} \tag{35}\]  
where \(\tau_{cq}=\mathbf{M}(q)(\ddot{q}_{d}+c\Lambda[e]^{\Lambda-l}\cdot\dot{e})+ \mathbf{H}(q,\dot{q})\), \(\tau_{o}=\mathbf{M}(q)K_{1}sign(S)\) and \(\tau_{ob}=-\mathbf{M}(q)\dot{\phi}\), where \(K_{1}=diag(k_{1i})\in\Re^{n\times n}\). The sliding mode surface was selected as:  
\[S=\dot{e}+c[e]^{\Lambda} \tag{36}\]  
The parameters for the [23]+ESO were chosen as \(c=diag(7;7;7),K_{1}=diag(80;80;110)\), \(u_{s}=20\), and \(\Lambda=diag(0.58;0.58;0.58)\). The parameters for the AFTC S-TSMC1 were chosen as \(\psi_{1}=\psi_{2}=\psi_{3}=2\), \(\alpha=diag(1;1;1)\), \(\beta=diag(0.5;0.5;0.5)\), \(\Lambda=diag(0.6;0.6;0.6)\), \(u_{s}=20\), \(\Gamma=diag(7;7;7)\) and \(K_{1}=diag(80;80;110)\). The parameters for theAFTCS-TSMC2 were chosen as \(\psi_{1}=\psi_{2}=\psi_{3}=2\), \(\Lambda=diag(0.6;0.6;0.6)\), \(c=diag(7;7;7)\), \(u_{s}=20\) and \(K_{1}=diag(80;80;110)\).  
To avoid a singularity, the terms containing power \(\Lambda-l\) in Equations (16),(27) and (35) are replaced with the saturation function.  
\[sat(u_{f},u_{s})=\left\{\begin{array}{l}u_{s}\;\;\;if\;u_{f}\geq u_{s}\\ u_{f}\;\;\;if\;u_{f}<u_{s}\end{array}\right. \tag{37}\]  
where \(u_{s}=20\) is a positive constant, and \(u_{f}=\Lambda|x|^{\Lambda-l}\cdot\dot{x}\) with \(x=e,\varepsilon\) and E.  
Figure 3: A 3-degree-of-freedom (DOF) robot manipulator in Matlab/Simulink.