# Development of a Hardware-in-the-Loop Platform for a Teleoperation Flexibility Robotic System
## 1 Introduction  
Teleoperation systems help humans to remotely implement tasks in hazardous environments, such as ocean exploration, space exploration, and surgery [1; 2; 3]. A simple teleoperation system comprises a master at the local site and a slave at the remote site. Because of the different structures of the master and slave nodes, controlling the entire teleoperation system is challenging. The most common problems include time delay, information loss, and singularity [4; 5; 6; 7; 8; 9; 10]. It is difficult to conduct experiments in practice using algorithms because any implementation must be safe and stable during operation. Additionally, in industrial environments, slave robots are used as redundant robots to increase operational flexibility, rather than using a single robot to repeat a given task. In this manner, difficult tasks can be performed relatively easily, and collisions in the working environment can be avoided. However, the kinematics mathematics of the slave robot become complicated when it has multiple degrees of freedom [11; 12]. Therefore, the hardware-in-the-loop (HIL) method, which simulates a part of an entire system, has been studied and applied for simulating the behavior of various components of teleoperation systems based on the specification model. The computer executes the digital models whose parameters are identified from the physical models [13]. To compensate the velocity divergence on the motion simulator due to the time delay, a response error real-time feedback based force compensation approach [14] was proposed. In this study, a HIL docking simulator was used to describe the motion and dynamics of the system. In the field of electrical drive control, HIL simulation has been used to improve convenience and flexibility in an application involving space robots [15; 16], as well as for implementing tasks such as repair, upgrade, transportation, and recuse [14; 15]. Visteon Corp. applied HIL simulation to improve quality and reduce the cost of its testing systems [17]. HIL simulation systems can bypass the risks of models to eliminate unnecessary factors that increase the simulation cost and time, as well as the dangers associated with electronic systems [18; 19]. In the orthopedics field, the process of testing total hip dislocation under physiological conditions has been conducted using HIL simulation to improve the accuracy of diagnosis [20]. Specifications about the battery capacity, and balance circuits of the battery management system were tested carefully to ensure its effectiveness. The results of a comparison between the real battery and the HIL simulator are show in [18]. In universities, research on HIL simulation is encouraged for building low-cost hardware, supporting studies conducted by students working on automation systems [21], and supporting related industrial activities [22]. When a teleoperation system is fully simulated or set up in an experimental environment, it is difficult to deploy algorithms or train system operators. In such cases, HIL simulation is used to deploy the target process in Unity 3D to make sure that the environment feels realistic to the operator [13; 23]. In this paper, a control method for a cable-driven hyper-redundant (CDHR) robot used in a teleoperation system is proposed using the HIL method. To guarantee the safety and stability of the telerobotic system, the algorithms are implemented in an HIL simulation, in combination with the physical models, using MATLAB Simulink 2019a software. The method comprises the Jacobian method, position mapping, and the haptic algorithm. Because the inverse kinematics of the redundant robot cannot be calculated using the common method, the Jacobian method is used to calculate it. In addition, the size and structure of both robots in the teleoperation system are different, and, therefore, position mapping is used to unify their workspaces for controlling the teleoperation system.