## 3 Control Strategy for Direct Teaching of Remote Center Motion
### Motion Generation Algorithm  
When designing end-effector hand-guiding control algorithms for cooperative robots using force/torque sensors, the control model is considered a damper-mass mechanical system [18]. The torque due to the gravity force is compensated, and the robot is controlled in the velocity domain [19]. It is also important to define a proper dead zone and threshold for the values measured by the force/torque sensor [20]. Finally, the relation between the actuating variables of the input device and the robot velocity command value is designed by a motion generation algorithm [21]. The position vector from the sensor to the center of mass of the end-effector and the orientation difference between the robot base coordinate system and the sensor's coordinate are shown in Figure 4. The transformation matrix from the 6 th frame to the sensor frame allows us to obtain the transformation matrix from the base to the sensor as shown in Equations (7) and (8). Because the coordinate varies depending on the robot's posture, the measured values from the 6 degrees-of-freedom force/torque sensor are converted using an adjoint matrix as shown in Equation (9) [22]. \(\mathbf{f}\) and \(\boldsymbol{\tau}\) are force and torque vectors, and the subscript 0 and \(s\) means the robot base frame \(\{0\}\) and the sensor frame \(\{\mathbf{s}\}\), respectively. \(\mathbf{R}_{08}\) is the rotation matrix of the sensor frame in the base coordinate and \(\mathbf{P}_{08}\) is the skew-symmetric matrix which is generated by the position vector of the sensor frame in the base coordinate. \[\mathbf{T}_{68}=\left[ \begin{array}{cccc}-1&0&0&0\\ 0&-1&0&0\\ 0&0&1&r_{7}\\ 0&0&0&1\end{array} \right]. \tag{7}\]  
Figure 3: Block diagram of RCM control with motion generation algorithm. \[\mathbf{T}_{0s}=\mathbf{T}_{01}\mathbf{T}_{12}\mathbf{T}_{23}\mathbf{T}_{34} \mathbf{T}_{45}\mathbf{T}_{56}\mathbf{T}_{6s}=\bigg{[} \begin{array}{cc} \mathbf{R}_{0s}&\mathbf{p}_{0s}\\ 0&1\end{array} \bigg{]}. \tag{8}\]  
\[\bigg{[} \begin{array}{c}\mathbf{f}_{0}\\ \mathbf{\tau}_{0}\end{array} \bigg{]}=\bigg{[} \begin{array}{cc}\mathbf{R}_{0s }&0\\ \mathbf{\tau}_{0s}\end{array} \bigg{]}\bigg{[} \begin{array}{c}\mathbf{f}_{s}\\ \mathbf{\tau}_{s}\end{array} \bigg{]}. \tag{9}\]  
Gravity-induced torque is measured on the sensor as the position of the center of gravity changes depending on the posture. It can be obtained in the robot base coordinate as shown in Equation (10). The position vector, \(\mathbf{x}_{cm}\), from the sensor to the center of mass of the end-effector is [106 mm, 0 mm, \(-12\) mm]\({}^{T}\). The mass, \(m\), is 1.01 kg, and the gravitational acceleration, \(g\), is 9.8 m/s\({}^{2}\). Finally, the input torque is derived as shown in Equation (11) as a result of compensating the torque due to gravity. \[\mathbf{x}_{g}=\mathbf{R}_{0s}\mathbf{x}_{cm}, \tag{10}\]  
\[\mathbf{\tau}_{g}=\mathbf{x}_{g}\times\big{[} \begin{array}{cc}0&0&-mg\end{array}  \big{]}^{T}. \tag{11}\]  
The command generation function sets the dead band [\(-a\), \(a\)] of the appropriate area so that the robot is not too sensitive to small changes in input torque and generates command values by multiplying the input torque by the proportional constant, \(k_{1}\) and \(k_{2}\), as shown in Figure 5. In this study, proportional constants are designed asymmetrically for sophisticated tuning of direct teaching sensitivity. The amplitude limitation of the conversion value [\(-b\), \(b\)] is also defined so that the command is not suddenly changed by a large input torque. The command value is added to the current orientation of the end-effector calculated by the forward kinematics, and the motion change by direct teaching is applied in real-time. Adding the command value for each control period of 1 ms means that the command value is the velocity of the end-effector. Based on the damper-mass system model, the input of the command generation function is input torque, and the output is motion velocity.