Robotic digital twin as a training platform for rehabilitation health personnel Gemelo digital rob ´otico como plataforma de formaci ´on para personal sanitario de rehabilitaci ´on

—In the last twenty years, a trend towards the digitization of products and processes has been generated, so the new concept of health 4.0 promotes the use of simulators and digital twins for the training of health personnel, as well as for the personalized planning of patients rehabilitation treatments. This paper presents a virtual training tool for health personnel, which is based on the prototype of a digital twin of an exoskeleton for upper limb rehabilitation. The device was designed in Solidworks ® and later its equivalent model was obtained in Matlab/Simulink ® software. Through the latter, the functionality of the device is evaluated through the implementation of different therapeutic routines, which help the physiotherapist to plan and evaluate the performance of each patient’s treatment. In this case, the evaluation of the movements of the upper limb are generated through independent and combined movements of the shoulder, elbow and wrist joints and, as a result, graphs of the movements are obtained, , as well as a virtual representation of the digital twin and the values of the torques in each joint. Finally, a digital tool that allows the digital twin prototype to be configured to conditions similar to those of the real exoskeleton for automation and supervision tasks is obtained.

Robotic digital twin as a training platform for rehabilitation health personnel Gemelo digital robótico como plataforma de formación para personal sanitario de rehabilitación Sosa-Méndez, D. 1 , García-Cena, C.E. 2 Abstract-In the last twenty years, a trend towards the digitization of products and processes has been generated, so the new concept of health 4.0 promotes the use of simulators and digital twins for the training of health personnel, as well as for the personalized planning of patients rehabilitation treatments. This paper presents a virtual training tool for health personnel, which is based on the prototype of a digital twin of an exoskeleton for upper limb rehabilitation. The device was designed in Solidworks ® and later its equivalent model was obtained in Matlab/Simulink ® software. Through the latter, the functionality of the device is evaluated through the implementation of different therapeutic routines, which help the physiotherapist to plan and evaluate the performance of each patient's treatment. In this case, the evaluation of the movements of the upper limb are generated through independent and combined movements of the shoulder, elbow and wrist joints and, as a result, graphs of the movements are obtained, , as well as a virtual representation of the digital twin and the values of the torques in each joint. Finally, a digital tool that allows the digital twin prototype to be configured to conditions similar to those of the real exoskeleton for automation and supervision tasks is obtained.

I. INTRODUCTION
Nowadays, digital transformation is imminent, especially in industries where it is mainly sought to increase their productivity and, at the same time, reduces costs through the use of digital representations of their resources; a promising option is through the use of digital twins (DTs) that allow them to exploit them more efficiently, reducing times and avoiding errors, especially in supervision and control tasks. However, a challenge presented by DTs is the ability to model human skills since they are dynamic and changing over time (acquisition of experience over time and adaptable to unforeseen events).
Singh et al in [1] define DT as: "A Digital Twin is a dynamic and self-evolving digital/virtual model or simulation of a reallife subject or object (part, machine, process, human, etc.) representing the exact state of its physical twin at any given point of time via exchanging the real-time data as well as keeping the historical data. It is not just the Digital Twin which mimics its physical twin but any changes in the Digital Twin are mimicked by the physical twin too"; so two types of DT are distinguished, according to their creation time: 1) Digital Twin Prototype (DTP): it contains the essential information to create or manufacture a physical copy from a virtual version. It can undergo various test analyses to identify undesirable scenarios before creating its physical twin so the accuracy of the simulation/model determines the quality of the physical twin. 2) Digital Twin Instance (DTI): this digital twin is born during the production phase, and is connected to its physical counterpart during its life cycle, which allows the sending of bidirectional data between them; this means any change in one will be reflected in the other.
In the next paragraphs [2], some applicable principles of DTs from different dimensions are summarized: 1) Product: applicable to asset-intensive and high-end products with a high single value. Based on the multidimensional, multi-time, and multi-scale model. 2) Complexity: applicable to complex products, processes and demands. The DT allows its reconstruction, simulation, analysis, verification and performance prediction. 3) Operating environment: applicable to extreme operating environments because it supports independent perception of the operating environment, real-time visualization of operating state, multi-scale simulation of multigranularity and multi-scale, and real-time interaction between virtual and real. 4) Performance: applicable to instruments and systems with high precision, high stability and high reliability; it provides real-time performance evaluation, fault prediction, control and optimization decision-making for its installation, commissioning and operation. 5) Economic performance: applicable to industries that need to reduce the input-output ratio. It supports information sharing and enterprise collaboration in the industry.
In Zhang, et. al [2], four categories of tools and platforms are distinguished: modeling, simulation, operation and interaction, most commercial tools and/or platforms focus on one or a few specific functionalities; those that offer integral functions and strong integration are preferred.
Some of the main areas of application of DTs are: 1) Manufacturing: DTs are used in the product engineering process in combination with new technologies, such as: Industry 4.0 [3] and digital manufacturing with Internet of Things [4], achieving technically efficient and economical products for the manufacturer. Some advantages are: 1) they allow manufacturing processes to be automated and 2) they provide early estimates of the product. However, challenges can arise in virtual merging, synchronization, and system integration with multiple DT models. 2) Logistics and transport: the use of DT in platforms that control an organization or service is fundamental to improve its efficiency ( [5] and [6]). 3) Electrical energy: the main goal of energy digital twin technology is to optimize energy efficiency ( [7] and [8]). Some challenges present in the data infrastructure are: ensuring the reliability of the sensors, balancing the precision in the simulation and optimization of digital twins, limiting the complexity of the calculation and agglutinating the entire data infrastructure within the feasible investment costs. 4) Health related: DTs are applied from concept to practice, as a precision simulation technology, and provide more accurate and faster services for healthcare ([9], [10]). Its challenges are related to the management of personal health throughout the life cycle of patients, and the convergence between the physical world and the virtual world. 5) Urban management: the use of DT supports the sustainable design of smart cities ( [11], [12]). The main limitations are the lack of fine-grain data, which leads to less accurate simulations. 6) Agricultural: DT enables digitalization and provides an approach to overcome current limitations when making decisions and performing their automation ( [13], [14]). The challenges they face are due to modeling systems with uncertain factors (human participation). 7) Automotive: DTs contribute from the initial stages of design to the use of vehicles ( [15], [16]). The challenges they face are due to the technology with which they are developed, big data, and the loss of connectivity in the monitoring of their sensors. 8) Educational: DTs is essentially related to industry 4.0, used in learning due to the updating of curricula and the digital transformation of organizations ( [17], [18]). The main benefit was the acquisition of experience through its use, and the main barriers were related to the problems of information technologies and the lack of resources. In the case of the health field, the interactions between patients, medical institutions and insurance organizations are often complex, which makes it difficult to investigate their behavior in real scenarios, which means the use of simulators is a potential field, since their use can help to improve flexibility, reduce medical risks and save costs for medical research; specifically in healthcare, medical surgery training and medical auxiliary equipment design simulation [9].
Therefore, this paper proposes the use of an upper limb robotic exoskeleton through its DTP as a training platform for health personnel focused on rehabilitation. This paper is organized in four sections, as follows: in section 2, a brief literature review of the use of DT as simulation platforms will be disclosed; the development and implementation of the functional performance of the device will be shown in section 3; and, finally, the conclusions and future work in section 4.

II. DIGITAL TWIN AND ITS APPLICATIONS
An important pillar in all training is the perform of experimental tests for a correct understanding of theoretical notions. However, this requires specific equipment and tools that are usually expensive, which makes the experimental tests limited in number and based on a budget. Nonetheless, there are other options such as the use of virtual technologies that can be applied, such as the flipped classroom, combined experimental teaching and online teaching models [19], which allow the possibility of practicing in simulated environments, giving learners the chance of correcting and repeating experimental tests, helping to improve traditional learning methods.
From a training perspective, the use of DTs allows their implementation in virtual laboratories, promoting continuous learning in an individual, group, organizational and social way, thus designs should focus on users. Berisha-Gawlowski, et. al [18] describe the potential of DTs to support human learning and highlights it should be able to work with learning factors, such as autonomy, beliefs, cognitive processes, emotions and social interaction. On the other hand, the duplication of machines and technical systems' DTs will be more accurate if the greatest amount of physical data is available.
In Liljaniemi and Paavilainen [17] the benefits and barriers of DT technology in engineering education were analyzed; the results showed that students increased their motivation, were self-responsible and improved their learning ( [19]). On the other hand, the main barriers are due to the inherent problems of information technologies, lack of resources and inadequate experience of teachers. The introduction of DTs in teaching is due to the updating of curricula, and emerging technologies; for example, for Viola and Chen [20] the concept of intelligent control engineering is introduced, implementing the classic process control through the DTs of a thermal and a mechatronic system.
Madni et. al [21] used DTs as key enablers and complements in model-based systems engineering, due to the advantages they present (real-time monitoring, optimization, control, and so on), and analyze their different sophistication levels as well as the integration with systems simulation and the Internet of Things. Five digital technologies are presented by Berisha-Gawlowski, et. al [19], including DT and virtual and augmented reality, which were developed for digital pedagogy practices.
In Kaarlela, et. al [22], a novel robotic teleoperation platform is presented, compatible with industry 5.0 and based on DTs, which presents functional requirements related to its functionality (teleoperation and robots supervision), and nonfunctional requirements related to its quality (number of users and availability). Its use allows to reduce inequality, supports remote learning regardless of time and location, which demonstrates its feasibility in online education and training.
A generic framework for healthcare applications is illustrated in Asad, et. al [30], where analysis and forecast data based on DT can help healthcare professionals in their training and improvement of their profession. In the particular case of rehabilitation, Human Digital Twin technology has been accepted, and the concept of Medical Digital Twin (MDT) stands out in areas such as Pulmonology, Orthopedics, and Hepatology. According to the same authors, it is highly useful for the training of users that a DT is centered on the human, and also satisfies the following characteristics: 1) the data from the sensors are direct input, and 2) the sensors have a visual and motion representation for design and validation; in addition to this, in the case of health and well-being, it is highly useful that feedback and interfaces are visual and tactile.
In healthcare in particular, and specially in Medicine, it seeks to provide adaptable therapies to each patient, maximizing their effectiveness and efficiency. To reach this, the optimal therapeutic options require a mechanistic understanding that links genetics and pathophysiology, lifestyle, and the patient's environment. Therefore, the DT is a comprehensive and virtual tool that integrates, coherently and dynamically, clinical data using mechanistic and statistical models [31]; for example, G. Coorey, et. al [32] proposed that DTs increase the diagnosis and prognosis of diseases, estimation and stratification of risks, forecast progression, choose intervention and predict its outcome through the transmitted and integrated data. And Hua Huang, et. al, [33] established a DT for personalized healthcare services will be able to incorporate deep learning and machine learning into the data analysis phase; however, its reliability can be compromised if the data sets used do not adequately reflect the environment in which this data must navigate.
According to Elayan, et. al [9], the combination of DT and healthcare can be a new and efficient way to provide more accurate and faster services for people's healthcare. Thus, nowadays healthcare simulation research is mainly focused on virtual reality simulation, healthcare mechanical simulation, resource allocation optimization and business process simulation, simulation of clinical trials, and so on. In addition, the Digital Twin Healthcare concept is presented as a new medical simulation approach to provide fast, accurate, and efficient medical services using DT technology with multiscience, multiphysics, and multiscale models.
The creation of DTs can refer to patients (physical characteristics and changes in the environment) and/or medical devices (innovative solutions for the diagnosis and monitoring of treatments) [34]. This means some companies use patient-based simulation models for personalized treatments such as: Sim&Cure, Philips, SIEMENS and Dassault Systèmes, demonstrating its acceptance in the medical field to improve patient care.

III. METHODOLOGY AND RESULTS
In this work, the DTP of an exoskeleton for upper limb rehabilitation is used as a health mechanical simulation tool for the evaluation of movement of the device through the Matlab/Simulink ® software. This model allows health personnel to introduce the therapeutic routines that the device must execute to assist the patient, the tests carried out consider conditions close to the real ones such as: anthropometric measurements and patient weight.
The DTP design was made in SolidWorks ® for adults (maximum weight 120 kg) with limited mobility in the upper limb; it allows ergonomic adaptation to patients due to its anthropometry (arm (0.40 meters) and forearm (0.39 meters)) and physiology.
The device allows 3 rotational movements for the shoulder (internal/external rotation (q 1 ), abduction/adduction (q 2 ) and flexion/extension (q 3 )), one rotational movement for the elbow (flexion-extension, q 4 ) and one for the wrist (abduction/adduction, q 5 ). In addition to this, it presents a modular design considering mainly additive manufacturing (3D printing).
To evaluate the functional performance of DTP, an equivalent model was obtained in Matlab/Simulink ® , which presents 5 degrees of freedom with rotational joints in its entirety, where each complies independently with the movements of the shoulder (S), elbow (E) and wrist (W), respectively. The model obtained is a serial model, and allows adjusting the mechanical properties of the pieces, adjustment of patient weight, and each of the joints allows to adjust parameters such as: internal mechanical (equilibrium position, spring stiffness and damping coefficient), limits (lower and upper), actuation method (torque or motion), sensing (position, speed, acceleration, actuator torque, and lower and upper torque limits), among others. Therefore, it allows independent and combined joints movements, receiving the positions to be reached, as input parameters and evaluating them by means of graphic simulations.
Virtual simulations assume that the patient's arm is attached parallel to the exoskeleton, so the movement executed by the latter will be that performed by the patient's upper limb. The total weight of the DTP is 9.74 kg and considers two types of pieces: a) commercial pieces of carbon fiber and ductile iron, and b) pieces made in 3D printing of acrylonitrile butadiene styrene with 10% fiber carbon. In addition to considering the mechanical properties of the exoskeleton parts, the weight of a patient of 60 kg is also taken into account; which is distributed in the arm and forearm segments with a mass of 1.56 [kg] and 1.38 [kg], respectively. Each rotational joint lacks friction and acts independently through movement, which is indicated through equations (input parameters), and the positions and torques generated in each of the joints are measured at the output (output parameters). The initial position for all movements is when the upper limb is hanging next to the body with the palm of the hand facing inside it and the patient is seated; the simulations show two types of movements executed by the DTP: independent (see Table I) and combined (see Table IV), in each of which the DTP executes two cycles of the input equations expressed in [rad].
In addition to being implemented, the input equations for each movement in the DTP also implemented their first two derivatives respectively; the q ′ n s that are not indicated in each movement are equal to zero and the movements are described below: 1) Shoulder internal-external rotation: the implemented equation were for q 1 and q 3 (see Table I) therefore q 2 =q 4 =q 5 =0, the resulting motions as well as the virtual DTP can be seen in Figs. 1a and 1b, where joint 1 has a maximum of 0.35 [rad], joint 3 remains constant at 1.57 rad and the rest does not show movement.
2) Shoulder Abduction-adduction: the implemented equation was for q 2 (see Table I), therefore q 1 =q 3 =q 4 =q 5 =0, the resulting motion as well as virtual DTP can be seen in Figs. 1c and 1d, where joint 2 has a maximum of 1.57 rad and the rest has no movement.
3) Shoulder flexion-extension: the implemented equation was for q 3 (see Table I), therefore q 1 =q 2 =q 4 =q 5 =0, the resulting motion as well as the virtual DTP can be seen in Figs. 1e and 1f, where joint 3 has a maximum of 1.57 rad and the rest has no movement.

4)
Elbow flexion-extension: the implemented equation was for q 4 (see Table I), therefore q 1 =q 2 =q 3 =q 5 =0, the resulting motion as well as the virtual DTP can be seen in Figs. 1g and 1h, where joint 4 has a maximum of 1.57 rad and the rest has no movement.

5)
Wrist abduction-adduction: the implemented equation was for q 5 (see Table I), therefore q 1 =q 2 =q 3 =q 4 =0, the resulting motion as well as the virtual DTP can be seen in Figs. 1i and 1j, where joint 5 presents a repetitive motion with a maximum value of 0.35 rad and the rest S Int-ext rotation q 1 = 0.35 sin 10t does not present movement.
The movements described above show independent movements; however, it is possible to perform combined movements in the device through sequences of movements in each of its joints; to exemplify it, the equations of two sequences implemented in the DTP are shown in Table IV. The description of these sequences is reported below (the q ′ n s that are not indicated in each movement are equal to zero): 1) Sequence 1: the implemented equations were for q 3 and q 4 , therefore q 1 =q 2 =q 5 =0 (see Table IV), this sequence executes a shoulder flexion reaching a maximum value equal to 1.57 rad, then it is maintained at the same value during the middle of the cycle while performing an elbow flexion with a maximum value of 1.57 rad; the elbow is held in this position for a 1 4 of the cycle and then performs an extension with a final value equal to zero. Once the elbow is in this position a shoulder extension with a final value equal to zero is performed (the rest of the joints show no movement). The graphs obtained are shown in Figure 2a and the Figure 2b shows the final position of a cycle of the programmed sequence in the virtual DTP.
2) Sequence 2: the equations implemented were for q 1 and q 2 , therefore q 3 =q 4 =q 5 =0 (see Table IV), these equations simultaneously execute an abduction (1.57 rad) and an internal rotation (0.52 rad) of the shoulder. The graphs obtained are shown in Figure 2c and Figure 2d present the final position of a cycle of the programmed sequence in the virtual DTP.
Other parameters obtained in each independent movement with the same conditions were the joint torques generated at the exit of each one; the values of these torques in the maximum positions of each movement are shown in Table II.    The torques value obtained in the maximum positions of the combined movements described above are shown in Table III. In the virtual DTP you can see each device component: base in gray color, link 1 in blue color (it allows shoulder internal-external rotation movement), link 2 in pink color (it allows shoulder abduction-adduction movement), link 3 in green color (allows shoulder flexion-extension movement and its adaptation to the exoskeleton arm segment), link 4 in cyan color (allows elbow flexion-extension movement and its adaptation to the exoskeleton forearm segment), link 5 in red color (allows wrist abduction-adduction movement) and, finally, the patient's arm and forearm are shown in yellow color.
It should be noted that the maximum values of joint torques over time are not the same as those indicated in Tables II and  III; this is due to the instantaneous conditions to which the DTP is subjected in each movement. The use of DTP allows to change actuation movements and methods depending on the desired requirements (personalized treatments of patients); it also allows to change the weight of the patient, which makes the simulations and results obtained more realistic. The equations used in this work are only considered to show the performance of each joint through movement, i.e. the implementation of control strategies are not considered in this study.  IV. DISCUSSION The use of robotic devices has shown encouraging and efficient results in clinical rehabilitation treatments [35]. In addition, their interfaces allow to generate personalized therapies in a simple way between patients and medical staff, which makes possible the automation of training routines [36]. A simple and quick way to access this type of device to plan, monitor and automate the main parameters in medical rehabilitation treatments is through its digital twins.
The need to perform personalized and precise rehabilitation therapies, makes it necessary to configure the parameters of the DT to the requirements of the users (anthropometry, physiology and health conditions); therefore, the devices must be functional and efficient for a quick recovery of patients. This, consequently, make medical services also fast [9], [10], [32], [33].
According to the tests carried out in this work: it was demonstrated that the use of joint position variables are a direct way to execute rehabilitation trajectories. Additionally, with the help of the DTP the health personnel can virtually observe the execution of these. The main contribution of this work is to provide the DTP with an upper limb exoskeleton for physical rehabilitation that allows the training of health personnel; therefore, its design was based on the users (physiotherapist and patient) and on the task to be executed (passive rehabilitation), satisfying the characteristics mentioned in Asad, et. al [30], Corral-Acero, et. al [31] and Zhang, et. al [35]. In addition, to minimize the challenges faced by the DTs mentioned in the works of Wagner, et. al [3], Bi [10] and Purcell and Neubauer [14]: the DT developed only contemplates controlling the fundamental parameters of physical rehabilitation, in such a way that the interaction between them and the users is simple, and the date management is only as necessary.
Although most of the DTs implemented in health are focused on the biomechanics of the human being, their models are developed independently (on the one hand, the models of the patients or a part of them, and on the other, the devices); therefore, the interaction between them is achieved through the sensors installed in the devices. In this case, the interaction between the device and the patient is simultaneous through the weight of the latter (variable parameter), which is present during the functional evaluation of the device in a simplified and direct way, without the need for additional sensors, thus representing an advantage of the developed DT.
Although the scope of this work does not address the implementation of DTI, the following safety measures are considered for patient safety, in order of priority: 1) the maximum speeds and displacements that are programmed in the DT depend on the physical rehabilitation treatment defined by the physiotherapist; 2) the joint ranges of motion of the DT are limited to 80% of the workspace considered for a healthy person; and 3) the use of inertial measurement units in the robot to monitor its position during the execution of therapeutic routines is contemplated. For the interaction between the physiotherapist and the device: a graphic interface will be developed, through which the therapist will program the therapeutic routines to subsequently send the control signals to the device.

V. CONCLUSIONS
In general terms, medical health personnel can evaluate the effect of their treatments until they are executed; however, recently, a trend has emerged to use digital tools to evaluate the performance of devices, and have the opportunity to provide feasible and unrestricted training to the personnel who use them: through simulating environments with medical auxiliary equipment and/or patients. An example is the use of DTs that can predict the possible problems that patients may suffer during their treatments before carrying them out, because it allows medical staff to plan and evaluate them before their implementation in patients, reducing risks and saving costs. Some other advantages of DTs are: allows simultaneous use to multiple users, and various tests can be performed due to flexible use and the wide range of approaches that can be implemented; however, one aspect to keep in mind is that medical institutions must have adequate computer resources (trained personnel, equipment, software, simulators and so on). In turn, DTs have the challenge of the high computational work required (high costs to create highly reliable models); nevertheless, it's a tool for human-machine relationships and allow medical personnel to gain experience with the use of cutting-edge technologies in different areas.
This work proposes the use of a DTP as an experimental platform designed for the training of rehabilitation health personnel, focused on a robotic device for upper limb rehabilitation; in the study, the functional performance of the equivalent DTP model was evaluated in Matlab/Simulink ® ; the results showed its feasibility in the proposed application, since it allows to reduce costs associated with the acquisition of physical devices in early stages of product development; therefore, there is a tool for carrying out different evaluation and security tests of the device. The implementation of the DT through a graphical interface it's proposed in future works, as well as the perform of various kinematic and dynamic analyses, the develop of control strategies, and the implementation of the DT in pilot tests to health personnel to later evaluate the results obtained in its DTI.

ACKNOWLEDGMENTS
The first author thanks the National Council of Science and Technology (CONACYT) of Mexico for the scholarship for doctoral studies awarded under CVU No. 642069.