## 5 Conclusions  
A highly recommended feature in rehabilitation robots is that the control system has access to a real time estimate of force in muscles and ligaments. Having this capacity significantly increases patient safety, and it allows the practitioner to obtain precise data on the evolution of the rehabilitation process. For this reason, it is essential to have musculoskeletal models which are adaptable to the characteristics of the patient, offering valid estimates and operating in real time. Advances in recent years have been directed towards the development of very complex models that use a large number of parameters, and are computationally expensive. Furthermore, there are important problems for the experimental validation of such models.  
The simplification of the models without losing predictive capability should be oriented fundamentally in two directions: on the one hand, personalizing the joint kinematics to obtain a good representation of the individual movement and, on the other, eliminating those actions that do not contribute significantly to the movement.  
In this research, a simple model is proposed, which allows a sufficient level of individual adaptation and simple calculations that can be performed in real time. For this, a kinematic calibration is carried out, and a rescaling model based on anatomical markers is used, which allows a good adaptation to the anatomical characteristics and the movement pattern of each patient. Furthermore, dynamic calculations are simplified by eliminating inertial actions, which have no appreciable effect on joint torques. Finally, an offline optimization procedure is used, which allows for uncoupling the calculations from the biomechanical model during robot operation. This procedure uses the concept of functional degree of freedom, which makes it possible to reduce the dimensionality in the optimization process, constraining the calculations to a band of combinations of kinematic variables of reduced dimensionality.  
The validity of the hypotheses, the coherence between the estimates of the model and the levels of muscle activity measured with surface electromyography have been verified. In addition, estimates of joint forces have been compared with those measured directly using an instrumented knee prosthesis, based on data published in the Grand Challenge Competition to Predict In Vivo Knee Loads.  
In summary, the proposed model incorporates the essential characteristics that allow an excellent personalization to obtain reasonable estimates of the internal forces through a simple model and with a low computational cost. These are the fundamental characteristics for the use of MSM models for real-time control of rehabilitation robots.  
Conceptualization, N.F., D.R. and A.P.; methodology, N.F., D.R. and A.P.; software, P.Z., N.F., D.R. and A.V.; validation, P.Z., N.F. and A.V.; formal analysis, N.F., P.Z. and V.M.; investigation, V.M. and A.P.; resources, P.Z. and D.R.; data curation, N.F., P.Z. and D.R.; writing--original draft preparation, N.F., V.M. and A.P.; writing--review and editing, V.M. and A.V.; visualization, V.M.; supervision, A.P.; project administration, A.P. and V.M.; funding acquisition, A.V. All authors have read and agreed to the published version of the manuscript.  
This research was partially funded by EU FEDER (predoctoral grant PRE2018-083847 and grand project \"Sistema robotico paralelo con control basado en modelo musculo-esqueletico para la monitorizacion y entrenamiento del sistema propioceptivo\", reference PID2021-125694 OB-100), and cofounded by Vicerrectorado de Investigacion de la Universitat Politecnica de Valencia (PAID-11-21).  
The study was conducted in accordance with the Declaration of Helsinki, and approved by the Ethics Committee of the Universitat Politecnica de Valencia protocol code P2_27_09_17, 27 th September 2017, for studies involving humans.  
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.  
Not applicable.  
The authors declare no conflict of interest.