## 3 Proposed Control Methodology
### Fault Detection-Based Virtual Energy Tank
In this paper, the lower bound is set at 0.1, and the parameter \(\alpha\) is consequently equal to 1._  
The energy stored in the virtual tank \(T_{t}\) is calculated as  
\[T_{t}=\frac{1}{2}\mathbf{x}_{t}^{T}\mathbf{x}_{t} \tag{38}\]Finally, extended dynamics of the impedance with contact-loss consideration is rewritten as the following:  
\[\mathbf{D}_{m}\Delta\ddot{\mathbf{x}}+\mathbf{B}_{m}\Delta\dot{\mathbf{x}}+ \mathbf{K}_{m}\Delta\mathbf{x}=\mathbf{u}_{imp-cl} \tag{39}\]  
where \(\mathbf{u}_{imp-cl}\) is the modified control input signal of impedance/contact-loss as  
\[\mathbf{u}_{imp-cl}=\beta\gamma\mathbf{u}_{imp}+\beta\mathbf{u}_{fi} \tag{40}\]  
As can be seen in Equation (40), the additive term \(\mathbf{u}_{fi}\) and switching parameters \(\beta\) and \(\gamma\) are supplemented to the force tracking control to decouple the signal from the force regulation when contact-loss happens. To demonstrate the stability of the closed-loop control system, the following candidate Lyapunov function is introduced [50]. \[V=\frac{1}{2}\Delta\dot{\mathbf{x}}^{T}\mathbf{D}_{m}(\mathbf{x})\Delta\dot{ \mathbf{x}}+\frac{1}{2}\Delta\mathbf{x}^{T}\mathbf{K}_{m}(t)\Delta\mathbf{x}+ \frac{1}{2}\mathbf{x}_{t}^{T}\mathbf{x}_{t} \tag{41}\]  
Taking the derivative of the Lyapunov function, one obtains:  
\[\dot{V}=\Delta\dot{\mathbf{x}}^{T}\mathbf{D}_{m}\Delta\ddot{\mathbf{x}}+ \Delta\mathbf{x}^{T}\mathbf{K}_{m}\Delta\dot{\mathbf{x}}+\mathbf{x}_{t}^{T} \dot{\mathbf{x}}_{t} \tag{42}\]  
Substituting Equation (30) into Equation (42) yields:  
\[\dot{V}=\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}-\Delta\dot{\mathbf{x}}^{T} \mathbf{B}_{m}\Delta\dot{\mathbf{x}}+\left(\beta\big{(}\Delta\dot{\mathbf{x}}^ {T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}-\gamma\Delta\dot{\mathbf{x}}^{T} \mathbf{u}_{imp}\big{)}\right)-\Delta\dot{\mathbf{x}}^{T}\alpha(1-\gamma) \mathbf{u}_{imp} \tag{43}\]  
\[\Leftrightarrow\dot{V}=\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}-\Delta\dot{ \mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}\ +\left(\beta\big{(}\Delta\dot{\mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{ \mathbf{x}}-\gamma\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}\big{)}-\Delta \dot{\mathbf{x}}^{T}\kappa\mathbf{x}_{t}\right) \tag{44}\]  
Substituting Equation (34) into Equation (44) results in:  
\[\dot{V}=\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}-\Delta\dot{\mathbf{x}}^{T} \mathbf{B}_{m}\Delta\dot{\mathbf{x}}+\left(\beta\big{(}\Delta\dot{\mathbf{x}} ^{T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}-\gamma\Delta\dot{\mathbf{x}}^{T} \mathbf{u}_{f}\big{)}\right)-\Delta\dot{\mathbf{x}}^{T}\alpha(1-\gamma) \mathbf{u}_{imp} \tag{45}\]  
As introduced in Equation (35), to avoid the singularity, the lower limitation \(T_{l}\) should be set to be greater than zero and then, the switching \(\alpha\) should be kept at 1 at all times. Therefore, the Equation (24) is equivalent to:  
\[ \begin{array}{rl}\dot{V}&=\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}-\Delta \dot{\mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}+\left(\beta\big{(} \Delta\dot{\mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}-\gamma\Delta \dot{\mathbf{x}}^{T}\mathbf{u}_{imp}\big{)}\right)-\Delta\dot{\mathbf{x}}^{T} (1-\gamma)\mathbf{u}_{imp}\\ &=-(1-\beta)\Big{(}\Delta\dot{\mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{ \mathbf{x}}-\gamma\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}\Big{)}\end{array}  \tag{46}\]  
Combining with the condition (37), then Equation (46) becomes:  
\[\dot{V}=\left\{ \begin{array}{rl}-(1-\beta)\Big{(}\Delta\dot{\mathbf{x}}^{T} \mathbf{B}_{m}\Delta\dot{\mathbf{x}}-\gamma\Delta\dot{\mathbf{x}}^{T}\mathbf{u} _{imp}\Big{)}\leq 0,&if\Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}\leq 0\\ -(1-\beta)\Delta\dot{\mathbf{x}}^{T}\mathbf{B}_{m}\Delta\dot{\mathbf{x}}\leq 0,&if \Delta\dot{\mathbf{x}}^{T}\mathbf{u}_{imp}>0\end{array} \right. \tag{47}\]  
Thus, the closed-loop control system with energy tank is passive stable.