# Development of a Hardware-in-the-Loop Platform for a Teleoperation Flexibility Robotic System
## 2 Description of HIL Simulation System
### Kinematics of Simulator  
#### 2.3.1 Slave Device  
The forward kinematics is solved using the standard Denavit-Hartenberg (DH) method [24; 25; 26]. The coordinate system of the CDHR robot is illustrated in Figure 5. The DH parameters are listed in Table 1. Here, \(\theta_{1}\) is the joint angle of the slave robot, and L\({}_{1}\), L\({}_{2}\), L\({}_{3}\), and L\({}_{4}\) are the lengths of each of the links. Figure 1: Overview of HIL simulation system. Figure 2: Block diagram of HIL simulation. The position of the slave robot's end-effector can be calculated based on the forward kinematics using the parameters listed in Table 1, which highlight the relationship between the coordinate systems of the base and end-effector of this robot. The results are as follows: \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**i** & \(\mathbf{a_{i-1}}\) **(mm)** & \(\mathbf{\alpha_{i-1}}\) **(Degrees)** & \(\mathbf{d_{i}}\) **(mm)** & \(\mathbf{\theta_{i}}\) **(Degrees)** & **Joint Limit (Degrees)** \\ \hline
1 & L\({}_{1}\) & 90 & 0 & \(\mathbf{\theta_{1}}\) & \(-30\) to \(30\) \\ \hline
2 & 0 & \(-90\) & 0 & \(\mathbf{\theta_{2}}\) & \(-30\) to \(30\) \\ \hline
3 & L\({}_{2}\) & 90 & 0 & \(\mathbf{\theta_{3}}\) & \(-45\) to \(45\) \\ \hline
4 & 0 & \(-90\) & 0 & \(\mathbf{\theta_{4}}\) & \(-45\) to \(45\) \\ \hline
5 & L\({}_{3}\) & 90 & 0 & \(\mathbf{\theta_{5}}\) & \(-45\) to \(45\) \\ \hline
6 & 0 & \(-90\) & 0 & \(\mathbf{\theta_{6}}\) & \(-45\) to \(45\) \\ \hline
7 & L\({}_{4}\) & 0 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: DH parameters of slave robot. Figure 4: Model of CDHR robot: (**a**) cable-driven manipulator and (**b**) details of universal joint connection. Figure 5: Model of slave robot: (**a**) orientation view and (**b**) coordinate system of slave robot. Figure 3: General structure of CDHR robot, which consists of an actuation system and a cable-driven manipulator. \[ \begin{split}\text{P}_{\text{x}}=\text{L}_{1}-\text{L}_{3}(\text{c}_{4}( \text{s}_{1}\text{s}_{3}-\text{c}_{1}\text{c}_{2}\text{c}_{3})+\text{c}_{1} \text{s}_{2}\text{s}_{4})+\text{L}_{4}(\text{s}_{6}(\text{s}_{4}(\text{s}_{1} \text{s}_{3}-\text{c}_{1}\text{c}_{2}\text{c}_{3})-\text{c}_{1}\text{c}_{4} \text{s}_{2})-\text{c}_{6}(\text{c}_{5}(\text{c}_{4}(\text{s}_{1}\text{s}_{3}- \text{c}_{1}\text{c}_{2}\text{c}_{3})+\text{c}_{1}\text{s}_{2}\text{s}_{4})\\ +\text{s}_{5}(\text{c}_{3}\text{s}_{1}+\text{c}_{1}\text{c}_{2}\text{ s}_{3})))+\text{L}_{2}\text{c}_{1}\text{c}_{2}\end{split}  \tag{1}\]  
\[\text{P}_{\text{y}}=\text{L}_{4}(\text{c}_{6}(\text{c}_{5}(\text{c}_{2}\text{s }_{4}+\text{c}_{3}\text{c}_{4}\text{s}_{2})\ -\ \text{s}_{2}\text{s}_{3}\text{s}_{5})+\text{s}_{6}(\text{c}_{2}\text{c}_{4}\ -\ \text{c}_{3}\text{s}_{2}\text{s}_{4}))+\text{L}_{3}(\text{c}_{2}\text{s}_{4}+ \text{c}_{3}\text{c}_{4}\text{s}_{2})+\text{L}_{2}\text{s}_{2} \tag{2}\]  
\[ \begin{split}\text{P}_{\text{z}}=\text{L}_{3}(\text{c}_{4}(\text{ c}_{1}\text{s}_{3}+\text{c}_{2}\text{c}_{3}\text{s}_{1})\ -\ \text{s}_{1}\text{s}_{2}\text{s}_{4})\ -\ \text{L}_{ \text{f}}(\text{s}_{6}(\text{s}_{4}(\text{c}_{1}\text{s}_{3}+\text{c}_{2}\text{ c}_{3}\text{s}_{1})+\text{c}_{4}\text{s}_{1}\text{s}_{2})\ -\ \text{c}_{6}(\text{c}_{5}(\text{c}_{4}(\text{c}_{1}\text{s}_{3}+\text{c}_{2} \text{c}_{3}\text{s}_{1})\\ -\text{s}_{1}\text{s}_{2}\text{s}_{4})+\text{s}_{5}(\text{c}_{1}\text{ c}_{3}-\ \text{c}_{2}\text{s}_{1}\text{s}_{3})))+\text{L}_{2}\text{c}_{2}\text{s}_{1}\end{split}  \tag{3}\]  
where \(\text{P}_{\text{x}},\text{P}_{\text{y}}\), and \(\text{P}_{\text{z}}\) denote the position of the slave robot; \(\text{c}_{\text{i}}\) is the cosine of the \(i\)th joint angle; and \(\text{s}_{\text{i}}\) is the sine of the \(i\)th joint angle. As the flexibility of the cable robot increases, the number of degrees of freedom of the series manipulator increases. Therefore, computing its kinematics, especially inverse kinematics, becomes increasingly challenging. In this study, the Jacobian method is used to solve this problem.