## 4 Simulations  
### Configuration of Testing Environments  
In this simulation, we verify the proposed methodology on a 6-DOF serial hydraulic KIRO robot. The robot designed is structured with the five first links driven by cylinders and the last link driven by  
Figure 4: The flowchart of fading function for smoothing trajectory. the rotary actuator as shown in Figure 1. The parameters of the 6-DOF KIRO robot is described in Appendix A. The simulation is constructed using MATLAB/Simulink program. The parameters of the hydraulic specification and hydraulic actuators are described in Tables 1 and 2, respectively. The controller parameters for contact-loss impedance control are described in Table 3. For the position control, the sliding surface is designed with \(\mathbf{K}_{1}=100\times eye(6)\), \(\mathbf{\lambda}_{1}=10\times diag(1,1,1,1,1,2)\), and \(\mathbf{\eta}_{1}=0.1\times eye(6)\). For the torque control, the controller gains are utilized with \(\mathbf{K}_{2}=100\times eye(6)\), and \(\mathbf{\eta}_{2}=0.1\times eye(6)\). Since the function \"_tanh_(. )\" in Equations (16) and (24) takes place of the use of \"_sign_(. )\" function, then the values of all \(\sigma_{ij}\) are selected small. In this work, these parameters are set equal to \(10^{-3}\). The sampling time for simulation is set as ts = 0.001s, and the simulation is implemented in the period of \(T_{period}=12(s)\). **Remark 10**. : _In our simulation, the environment stiffness and impedance behavior matrix \(\mathbf{D}_{m}\), \(\mathbf{B}_{m}\), \(\mathbf{K}_{m}\) are supposed to be known and set with fixed constants. We aim to demonstrate the response of the system when applying the impedance contact-loss algorithm. Practically, the impedance dynamics directly relates to the design of impedance control gains. Therefore, adaptive gains can be further investigated in future work._  
**Remark 11**. : _The gains \(\mathbf{K}_{pf},\mathbf{K}_{lf}\) are firstly initialized based on system characteristic and trial-and-error method. The technique for identifying the initial value and adaptive laws to adopt with working operation will be developed in future works._ \begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbol** & **Description** & **Value** \\ \hline \(\beta\) & Bulk modulus & 1.5 (Gpa) \\ \(C_{d}\) & Drag coefficient & 0.62 \\ \(\rho\) & Fluid density & 861 (kg/m\({}^{3}\)) \\ \(P_{s}\) & Supply pressure & 200 (bar) \\ \(P_{t}\) & Tank pressure & 3 (bar) \\ \(\omega\) & Valve orifice area gradient & 0.0024 \\ \(K_{vi}\) & Valve gain & \(0.333\times 10^{-3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters of the hydraulic specification. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Actuator \(i\)th** & **Bore Diameter** & **Rod Diameter** & **Stroke** \\ \hline \multirow{4}{*}{Cylinder} & 1 & 70 (mm) & 45 (mm) & 192 (mm) \\  & 2 & 80 (mm) & 50 (mm) & 180 (mm) \\ \cline{1-1}  & 3 & 80 (mm) & 50 (mm) & 200 (mm) \\ \cline{1-1}  & 4 & 70 (mm) & 45 (mm) & 175 (mm) \\ \cline{1-1}  & 5 & 63 (mm) & 40 (mm) & 100 (mm) \\ \hline Rotary actuator & 6 & \(1.023\times 10^{-4}\) (m\({}^{3}\)/rad) & \(1.023\times 10^{-4}\) (m\({}^{3}\)/rad) & \(280\times\frac{2\pi}{360}\) (rad) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of hydraulic actuators. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Symbols** & **Value** & **Symbols** & **Value** \\ \hline \(K_{e}\) & 2000 (N/m) & \(T^{u}\) & 32 (J) \\ \(\mathbf{D}_{m}\) & \(10^{-3}\times eye(3)\) & \(T_{l}\) & 0.1 (J) \\ \(\mathbf{B}_{m}\) & \(0.1\times eye(3)\) & \(d_{\text{max}}\) & 0.1 (mm) \\ \(\mathbf{K}_{nt}\) & \(0.2\times eye(3)\) & \(\Delta x_{s}\) & 0.01 (mm) \\ \(\mathbf{K}_{pf}\) & \(2\times eye(3)\) & & \\ \(\mathbf{K}_{lf}\) & \(3\times eye(3)\) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters of the contact-loss impedance control. **Remark 12**. : _The value of upper bound \(T^{u}\) is chosen based on system characteristics and designer knowledge. Different systems and working conditions may result in different values.