## 4 Simulations
### Simulation Results
Additionally, from Figure 12, since all lines reach the upper bound at the same time, the switching parameter \(\beta\) changes its state at the time of approximately 7.63 s, the same as the first case study despite different force control gains. In the third case study, we consider friction exerting in the Z-direction. This friction force is supposed to be proportional to external force exerting at the end-effector in the X-direction as  
\[F_{ft3}=\mu F_{ext-imp} \tag{52}\]  
Figure 11: Response of the end-effector in the X-direction under different force control gains. Figure 12: Response of the energy variable under different force control gains. where \(\mu=0.001\) is ratio parameters. Similar to the second case study, green lines, blue lines, and red lines denote tracking efforts when the force proportional gain is set as \(K_{pf}=1,K_{pf}=1.75,K_{pf}=2\), respectively. Among that, dashed line, dashed-dot lines, and continuous lines present the system behaviors when the force integral gains are \(K_{lf}=1,K_{lf}=2,K_{lf}=3\), respectively. As can be seen in Figure 13, at the time of contact-loss, different values of force control gains result in different responses of the end-effector. Among the two control gains, the proportional gain \(K_{pf}\) dominates the tracking performance. Small gains result in slow response but less overshoot at the beginning. On the contrary, large values of proportional gain generally lead to fast response and smoother movement when contact-loss happens. The integral gains can help to enhance tracking performance; however, these gains cannot be arbitrarily set to large values. Figure 14 shows that responses of the energy variable also vary under the rippled framework and different values of the force control gains. Thereby, one can easily deduce that different times for switching the parameter \(\beta\) are obtained due to different times for reaching the upper bound of the energy variable as shown in Figure 15 (the parameter \(\beta\) switches if and only if the energy variable reaches the upper bound). Therefore, the control gains should be carefully designed in the case of friction as one considerable factor to achieve better performance. Figure 14: Response of the energy variable in the case of friction under different force control gains. Figure 13: Response of the end-effector in the X-direction in the case of friction under different force control gains. Furthermore, it is noteworthy that at the beginning, when the motion of the manipulator is switched from free-motion to constrained-motion, the free motion of the end-effector is also considered as contact-loss. If the initial point is too far from the constrained framework, more energy is required to drive the end-effector to the target and, thus, the energy may reach the limitation before the system is in constrained-framework and execute undesirable motions. Thereby, the initial point should be set as not far from the contact point. This problem can also be solved by increasing a large value of the upper bound \(T^{\mu}\); however, smooth movement may not be executed because more time is required for the energy variable to reach the upper bound. Hence, one should refer step by step to solve this problem by designing adaptive laws to decouple the force control in free motion, or adaptive upper boundary to satisfy different working conditions.