# Implementation of Fault-Tolerant Control for
## 5 Simulation Results
### Simulation 2  
For comparison, a passive fault tolerant control with conventional sliding mode control (PFTC-SMC) and active fault-tolerant control with conventional sliding mode control (AFTC-SMC) were considered, in addition to the proposed active fault-tolerant control with synchronous sliding mode control (AFTC-SSMC).  
The parameters of the observer were chosen as in Section 5.1. The AFTC-SMC is given as  
\[\tau_{AFTC-SMC}=\tau_{0}+\tau_{smc}+\tau_{ob} \tag{46}\]  
where \(\tau_{0}=\mathbf{M}(q)(\tilde{q}_{d}+c\dot{e})+\mathbf{H}(q,\dot{q})\), \(\tau_{smc}=k_{1}\text{sgn}(s)+k_{2}s\) and \(\tau_{ob}=-\mathbf{M}(q)\widehat{\phi}\), in which the sliding mode surface is selected as  
\[s=\dot{e}+ce \tag{47}\]  
The parameters in AFTC-SMC were suitably chosen as \(c=diag(7;7;7)\), \(k_{1}=diag(220;220;220)\), and \(k_{2}=diag(250;250;250)\). The PFTC-SMC is given as  
\[\tau_{PFTC-SMC}=\mathbf{M}(q)(\tilde{q}_{d}+c\dot{e})+\mathbf{H}(q,\dot{q})+ k_{1}\text{sgn}(s)+k_{2}s \tag{48}\]  
The parameters in PFTC-SMC were suitably chosen as \(c=diag(7;7;7)\), \(k_{1}=diag(220;220)\) and \(k_{2}=diag(250;250;250)\). The parameters of AFTC-SSMC were suitably chosen as \(c=diag(7;7;7)\)  
Figure 2: Fault estimation results with a single fault at Joint 2 with the different values of \(\varepsilon\). (**a**) Joint 1; (**b**) Joint 2; (**c**) Joint 3.  
\(\alpha=diag(20;20;20)\), \(\kappa=diag(0.5;0.5;0.5)\),\(k_{1}=diag(220;220;220)\), \(k_{2}=diag(250;250;250)\), and \(k_{3}=diag(30,30,30)\).  
To avoid chattering, the signum function in Equations (25), (46), and (48) are replaced with the saturation function,  
\[sat(s)=\left\{\begin{array}{cc}sgn(s)&if|s|\geq\lambda\\ \frac{s}{\lambda}&if|s|<\lambda\end{array}\right. \tag{49}\]  
where \(\lambda=1.7\).  
In this case, a failure occurs only at a single joint. The total torque function at each joint is assumed to be  
\[\left\{\begin{array}{l}\tau_{1}^{t}=\tau_{1}\\ \tau_{2}^{t}=(1-\rho_{2}(t))\tau_{2}+f_{2}(t)\quad t>5\\ \tau_{3}^{t}=\tau_{3}\end{array}\right. \tag{50}\]  
where \(\rho_{2}(t)=0.4\sin(\pi t)\) and \(f_{2}(t)=60\sin(\pi t/2)\).  
In Figure 3b, the single fault occurs at Joint 2 after five seconds. Figure 3 shows the fault estimation algorithm given in Equation (10) seems to be working well even though its estimation error still exists on the order of 1/100 of the fault magnitude. In Figure 4, without fault estimation, PFTC-SMC cannot guarantee the performance after the fault occurs. Unlike PFTC, the joint position errors of AFTC-SMC and proposed AFTC-SSMC look very different, but they were all on the order of \(10^{-3}\), so that the overall trajectory tracking performance of the two control algorithms can be said to be acceptable in this simulation. However, it can be seen that the proposed AFTC-SSMC has very high accuracy after a fault occurs. This fault-tolerant capability can be said to come from the synchronous SMC. Each joint error is coupled and constrained due to the synchronization errors and the newly defined synchronous sliding surface.  
Figure 4: Tracking error at each joint in the simulation with a single fault at Joint 2. (a) Joint 1; (b) Joint 2; (c) Joint 3.  
Figure 3: Fault estimation results with a single fault at Joint 2. (a) Joint 1; (b) Joint 2; (c) Joint 3.