## 2 Methodology
### Phase 2  
Phase 2 is the engineering part of the methodology, it requires technical, mathematical and physical skills, the success of this phase lies in the functionality expectations, to reach them, the design processes are detailed in a concurrent way and it is supported by technological advances in the manufacture of prototyping and a simulation based on digital twin [14; 15] for rehabilitation devices. This phase is composed of 5 stages and the final product is the experimental physical model (EPM) and the dynamic modeling synthesis (DMS). Stage 5. Systems Definition: For this stage is raised the design trough the creation of sets according to the function and interconnection inside the system for instance the mechanical, electronic and the interface. If it is necessary make from a set some subsets its expressed in this stage. All these sets are showed in a the structural diagram each part has an alphanumeric own identification and is showed how all the parts are connected each others. These connections sometimes represents mechanical joint or unions electrical and electronics in order to guide the design of the control and human machine interface of the device. Stage 6. Detailed engineering: Each set is given to a different team of engineers. The information ways are planed between each team in order to maintain a communication flux. This would be done through to the database. The master guide is the structural diagram. The real dimensions, the materials for each part and each mechanical element of the system are specified even whether it is complementary as:  
* Screws or mechanical connections. * Material selection. * Types of actuators. * The hardware for control and the interface. * Wiring system. The methodology proposed enables the parallel develop of the next steps, the first step is create all the elements in the structural diagram in a digital environment making use of tools for dynamic modeling synthesis, it calculates the kinematics and dynamics both direct and inverse also computed the speed, joint position, torque and forces. Each set finally becomes in a block with all the dynamic behavior described waiting to interact with the rest of them. The next step consist in the construction \begin{table}
\begin{tabular}{c c} \hline \hline
**Clinical Documentation** & **Technical Documentation** \\ \hline Anatomical definitions & The state of the art (search in scientific publications) \\ \hline Biomechanics & The state of the technique (search in patents) \\ \hline Analysis the rehabilitation sessions & The standardization as IEC 80601-2-78:2019 [12], ISO 13485 [13], etc. \\ \hline Interviews to users and patients & Analysis the commercial devices \\ \hline Rehabilitation goals & The normative and legal area that applies (the geographical area) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Documentation clinical and technical. of each component with rapid prototyping techniques that allow their assembly and feedback for the CAD and the DMS. It has been shown that working in this way brings about a faster convergence, reducing time and costs [16]. For the interface set is necessary to select the software and firmware to work into:  
* Low Level Control (Programming the drivers). * High Level Control (Programming the trajectory control, movement coordination strategies, security and the interface). Stage 7. Integration: The sets are integrated according to the information of the structural diagram to have the total DMS and the EPM, it means that are two platforms totally functional one virtual and one physical able to do experimentation in order to probe the functional principle, the requirements and restrictions. Besides is considered the assembly of actuators and sensors into the EPM. Stage 8.