Real-Time Calibration-Free Musculotendon Kinematics for Neuromusculoskeletal Models

Neuromusculoskeletal (NMS) models enable non-invasive estimation of clinically important internal biomechanics. A critical part of NMS modelling is the estimation of musculotendon kinematics, which comprise musculotendon unit lengths, moment arms, and lines of action. Musculotendon kinematics, which are partially dependent on joint angles, define the non-linear mapping of muscle forces to joint moments and contact forces. Currently, real-time computation of musculotendon kinematics requires creation of a per-individual surrogate model. The computational speed and accuracy of these surrogates degrade with increasing number of coordinates. We developed a feed-forward neural network that completely encodes musculotendon kinematics of a target model across a wide anthropometric range, enabling accurate real-time estimates of musculotendon kinematics without need for a priori creation of a per-individual surrogate model. Compared to reference, the neural network had median normalized errors ~0.1% for musculotendon lengths, <0.4% for moment arms, and <0.10° for line of action orientations. The neural network was employed within an electromyogram-informed NMS model to calculate hip contact forces, demonstrating little difference (normalized root mean square error $1.23\pm 0.15$ %) compared to using reference musculotendon kinematics. Finally, execution time was <0.04 ms per frame and constant for increasing number of model coordinates. Our approach to musculoskeletal kinematics may facilitate deployment of complex real-time NMS modelling in computer vision or wearable sensors applications to realize biomechanics monitoring, rehabilitation, and disease management outside the research laboratory.


I. INTRODUCTION
N ON-INVASIVE biomechanical analysis of human motion is achieved via physics-based neuromusculoskeletal (NMS) models that enable study of kinematics, kinetics, muscle forces, and joint contact forces [1].Neuromusculoskeletal modelling has furthered our understanding of human biomechanics in general [2], diseased and injured [3], [4], and athletic [5] populations with numerous applications to rehabilitation [6], injury prevention [7], athletic performance [8], and wearable robotics [9].In recent years, there has been a push for real-time computation of biomarkers of disease and injury, such as joint forces [10] and tissue strains [11] that may be used for biofeedback informed training [6], [10].When operated in real-time, NMS models enable adaptive control systems in exoskeletons for rehabilitation [12], [13] and occupational settings [9], [12].To compute musculotendon (MTU) and joint forces, NMS models [1] require accurate estimates of MTU kinematics: lengths (lmt), moment arms (r), and muscle lines of action (mLOA).However, methods to compute MTU kinematics using physics-based approaches, as implemented in OpenSim [1], [14], do not support real-time applications.
To enable real-time operation, two surrogate methods have previously been developed that pre-calculate MTU kinematics off-line by sampling from complex NMS models [15], [16].The first method uses polynomial equations to estimate lmt and r as functions of generalized model coordinates (GC) (i.e., joint angles) [15], [17], but this method produces large fitting errors (>2 mm for r ), and requires selecting individual fitting equations (order and terms) for each lmt and r .The second method uses multi-dimensional cubic Bsplines (MCBS) [16], which can estimate both lmt and r from the same spline, have lower fitting errors than polynomials, and facilitate accurate real-time estimation of joint contact forces in the laboratory [10].However, both polynomials and MCBS necessitate a subject-specific reference model (e.g., OpenSim model) from which lmt and r are calculated for large number of equally spaced angle values across the complete range of motion (ROM) of all GC of joint(s) of interest.In practice, this requires scaling an NMS model and fitting polynomials/MCBS for each subject prior to being able to deploy the model for real-time use.The time taken to fit and evaluate MCBS is exponential to the number of considered GC, and real-time computation is not feasible for complex models with many GC per joint.A recent NMS modelling software, MyoSuite, uses a more restricted set of wrapping surfaces than OpenSim for real-time computation, but like MCBS, requires subject-specific model generation and fitting prior to real-time deployment [18].For mLOA, a plug-in toolbox allows straight-forward computation given an OpenSim model and joint angles [19] but does not operate in real-time.Overall, limitations of existing surrogate models for MTU kinematics are incompatible with the growing need of wearable sensors and computer vision applications [20], [21], which aim to minimize setup and calibration time to enable rapid assessment of key biomarkers relevant to NMS tissue health [22], [23], [24].
Artificial neural networks (NN) have been used previously to accurately estimate lmt and r, but did not account for body dimensions and used a simplified model of MTU kinematics to generate training data [25].Here, we trained artificial neural networks (NN) to compute lmt, r, and mLOA from GC, whilst also accounting for a wide physiological range of differences in body dimensions, thereby avoiding the need for computationally intensive creation of surrogate MTU models for each subject of study.We analysed NN fitting error and agreement with OpenSim derived values and compared predictions to subject-specific MCBS estimations.Downstream effects of using our proposed NN predictions for lmt and r were evaluated using an established electromyogram-(EMG) informed NMS model to calculate hip contact force during walking.Finally, we compared computation time of our NN to MCBS for models of varying complexity (i.e., number of degrees of freedom).

A. Data and Model Description
To train a NN for predicting muscle parameters from GC and scale factors (i.e., scalars applied to adjust model body dimensions), a dataset of scaled OpenSim models was generated to cover physiologically plausible body sizes.A fullbody model, with 40 MTU and 7 GC per leg and wrapping surfaces for hip and knee spanning muscles (Supp Table I), was used as a base model for generating data to train and evaluate NN models [26].The base model (Uhlrich2022 [26]) was modified from a previously developed lower-body model [27] and includes updates to hip abductor muscle paths.To assess the downstream effects on an EMG-informed simulation, we used the OpenSim gait2392 as a base model (43 MTU and 7GC per leg) to compare hip contact forces to a previously reported study [6].To assess computation time on models with many GC, an upper limb base model with 9 GC for shoulder spanning muscles was used (Table I) [28].

B. Data Generation 1) Model Scaling:
To account for inter-subject variability in body and segment sizes, the lower-body base model was scaled to generate datasets of scaled models with uniquely sized segments (i.e., pelvis, femur, tibia, foot).One thousand scaled models were generated by randomly generating scale factors ranging from 0.65 to 1.35 of default size and applying them to the base model.To avoid physiologically implausible pelvis shapes (e.g., pelvis depth scale factor of 1.25 combined with a pelvis height scale factor of 0.75), pelvis scale factors were constrained such that all axes (X, Y, Z) had absolute differences less than 0.3 with respect to each other.
2) Model Posing: Five hundred unique coordinate sets were randomly generated from a uniform distribution between upper and lower bounds for each model GC (Table II).Ranges of motion for the hip and knee were reduced to avoid angles that exhibited high incidence of MTU discontinuity (Supp Fig 1).Using the OpenSim API (version 4.4) and MATLAB version 2023a (Mathworks, MASS, USA), each of the 1000 scaled models were posed using the 500 coordinates, and subsequently lmt, r, and mLOA were determined using the muscle analysis tool [1] and line-ofaction toolbox [19].The resulting dataset contained 500,000 unique input vectors (scale factors and coordinate combinations) and corresponding output vectors (lmt, r, and mLOA).

C. Neural Network Description
Feed-forward neural networks were chosen for this study, as lmt, r, and mLOA can be derived from GC [16], [19], without consideration of dynamics or time dependency.Thus, more complex models optimized for time-varying data such as long short-term memory models or 1-dimensional convolutional neural networks were not considered.As linear combinations Fig. 1.A base model was scaled with 1000 unique scale factor combinations.Each of the 1000 scaled models was then posed in 500 unique coordinates sampled randomly from a uniform distribution within predefined upper and lower bounds.At each pose, the musculotendon unit moment arms, lengths, and lines of action with respect to both attaching bodies were computed using OpenSim (top).The 1000 scaled models were then randomly grouped into training (80%), validation (10%), and test (10%) sets.Input data (scale factors and coordinates) and output data (moment arms, lengths, lines of action) were used to iteratively train artificial neural networks and optimize model hyper-parameters (e.g., number of layers/neurons) (bottom left.).The trained and optimized models were then evaluated on the test dataset and outputs were compared to OpenSim values (bottom) right.

TABLE II MODEL COORDINATES AND RANGES OF MOTION
of polynomials have been shown to approximate lmt and r from joint angles [15], the tested NN ranged in complexity from a single hidden layer and linearly activated nodes to deep NN with up to three hidden layers and non-linear activation functions.To reduce overfitting and achieve smooth outputs, kernel weight regularization was included with both L1 and L2 penalties.The L1 and L2 penalties are scalars multiplied by the absolute or squared values, respectively, to reduce overfitting and smooth model predictions.L1 and L2 penalties are applied to the training loss according to: where, Error, is the loss function to be minimised (typically the mean absolute error or mean square error), y, are the known outputs, ŷ, are the predicted outputs, λ 1 , is the L1 penalty coefficient, λ 2 , is the L2 penalty coefficient, and, w, are the NN weights.The inclusion of a pre-processing layer was also tested, in which the value of each GC was squared and appended to the original input, and batchnormalization layers were added after each feed-forward layer.The number of layers, number of nodes in each layer, regularization penalty (L1 and L2 coefficients), activation functions, training batch size, and inclusion of an input augmentation layer were optimized for each NN model using hyperband optimization [29] (Table III).

D. Neural Network Training
Muscles were grouped into sets based on their shared GC.The NN models were trained to predict lmt, r, and mLOA for each muscle set and each body of interest (Table IV).Thus, inputs to a NN model were joint angles for all GC and scale factors for all body segments spanned by the muscle group.
For hyper-parameter tuning, the complete dataset was randomly grouped into training (90%) and validation (10%).For model training and assessment, the dataset was randomly grouped into training (80%), validation (10%), and testing (10%).Typically, NN models converge faster and are less prone to local optima when inputs are normalized.For this study, NN were trained on non-normalized input and output data to accommodate simple integration into larger NN models Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE III NEURAL NETWORK HYPER-PARAMETERS
that predict joint angles or require lmt, r, and mLOA in natural forms to compute, for example, contraction dynamics, joint moments, or joint contact forces.To ensure outputs with different ranges contributed equally to model training, loss weights were applied to the error of each output according to: where, y i , is an output (lmt, r, or mLOA), n, is the number of outputs, and, W i , is the weighting applied to y i during training.

E. Analysis 1)
Fitting Accuracy: For the 100 scaled models in the test set (base model Uhlrich2022), median and interquartile range (IQR) fitting error (MFE) and relative to range median fitting error and IQR (% MFE) were calculated between predicted and OpenSim-generated lmt and r from each muscle group.We report MFE and median (IQR) because the error residuals were not normally distributed.For mLOA, MFE was calculated for each body of interest (pelvis, femur, tibia, and calcaneus) as absolute angle between mLOA vectors from OpenSim and predicted by NN, according to: where θ , is the angle between vectors a and b, arctan2, is the four-quadrant inverse tangent, a, is the mLOA from OpenSim and, b, is the mLOA predicted by NN.For lmt and r from each GC, agreement between OpenSim and NN was compared using Bland-Altman analysis [22] and linear fit in Python v3.10.
2) Comparison to Multidimensional Cubic B-Splines: The NN predictions of lmt and r were compared to MCBS generated for five randomly selected scaled models, one from each quintile of scale factors to account for a range of body sizes.Unique MCBS were fit to each muscle group (e.g., Hip3GC, Knee1GC) using MTU kinematics generated from an evenly distributed coordinate grid spanning full ROM for each GC.For each MCBS, the total number of fitting points was 10^n, where n is the number of GC.To assess MCBS accuracy, each MCBS was evaluated at mid-points between fitting coordinates.Trained NN models were then used to estimate lmt and r for the same models using scale factors and joint coordinates as inputs.Both methods were then compared to OpenSim lmt and r.
3) Effects on EMG-Informed Simulation: To assess effects of NN estimated lmt and r on muscle-driven simulations, hip contact force was computed using a calibrated EMGinformed method (CEINMS) [30] and OpenSim joint reaction analysis [1] using the gait2392 model for 5 participants with hip osteoarthritis from a previous study (approved by Institutional Human Research Ethics Committee (GU#2019/103) [6]).Participants (83.8±15.7kg,1.63±0.12m,56.8±4.9 years) completed treadmill walking at self-selected pace, resulting in 29±12 stance phases per participant.When executed in EMG-assisted mode, CEINMS requires inputs of EMG linear envelopes, external joint moments, lmt, and r.For all trials, CEINMS was executed using lmt and r computed using OpenSim muscle analysis, NN, and MCBS.Stance phases were defined by heel-strike to toe-off and then time-normalized to 101 points.For each participant, hip contact force computed using NN and MCBS methods were compared to OpenSim using root-mean-square-error expressed as a percentage of peak hip contact force (%RMSE), and bias was assessed by comparing residuals at each time-point.
4) Computation Time: Computation time of the NN method was compared to MCBS for muscles spanning the glenohumeral joint.This was done to evaluate computation time for muscles spanning up to 9 GC, although it was limited to 7 GC, as MCBS greater than 7 GC are computationally impractical.For lower body models, the number of muscles varied for each group of muscles (e.g., Hip3GC, Ankle2GC).To remove potential effects of muscle number on computation time, the same 13 muscles spanning the glenohumeral joint of the upper limb model [28] were used for all computation time tests.The maximum number of GC that each muscle spanned varied from 3 to 7 and are detailed in Supp Table II.To assess the effects of model complexity on computation time, the base model was scaled 350 times following the same protocol as the lower body models, with random scale factors generated for thorax, clavicle, scapula, and humerus (range 0.65 to 1.35).For each evaluation (i.e., 2 to 7 GC), the number of GC affecting shoulder muscle lmt and r were successively unlocked from their default position.For each evaluation, a unique training dataset was generated with 200 unique coordinates per scaled model.
The NN model inference time was analysed in two modes: CPU processing in python using trained models in TensorFlow-Keras API (TF-Keras), and CPU processing using trained models converted to a 16-bit quantized TensorFlow-Lite model (TF-Lite).The OpenSim muscle analysis was evaluated in MATLAB using the available software API, MCBS in C++ [16], NN in Python v3.10 and TensorFlow v2.9 (TF-Keras and TF-lite).Computation was completed on a single machine with Intel i9-12900K CPU, 64GB RAM, and RTX3090 GPU (OpenSim, MCBS, TF-Keras, and TF-Lite).
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
When NN and MCBS predicted lmt and r were used in an EMG-informed simulation, resulting hip contact force errors during stance phase of walking had normalized RMSE ranging 1.11-1.46%(NN) and 0.94-1.13%(MCBS) (Fig 5 , column  1).using NN and predicted lmt and r , EMGinformed simulation underestimated hip contact force by an average of 0.011 BW and 0.006 BW, respectively (Fig 5 ,  column 2).
Time to compute all muscle lmt and r, given a single input of joint angles (and scale factors for NN), was <0.57ms (possible update rate >1700Hz) for NN, using the TF-Keras models in a python environment, regardless of the number of GC.When the NN model was quantized using TensorFlow-Lite, computation time was <0.04 ms (possible update rate 25,000Hz) for all models.For MCBS, computation time increased exponentially as number of GC increased and ranged 0.37 ms (2GC) to 7s (7GC) per frame.OpenSim muscle analysis time increased with the number of GC and ranged 3.7 ms to 17.9 ms per frame (Fig 6).

IV. DISCUSSION
We developed a novel method to accurately estimate MTU kinematics (lmt, r, and mLOA) as a function of GC and body Fig. 3. Bland-Altman (column 1) and regression plots (column 2) for musculotendon unit length (row 1) and moment arms (rows2 to 7) for neural network predictions compared to OpenSim.Bland-Altman limits of agreement are shown for 95% confidence intervals.Note: the lack of data with moment arms near 0 mm is due to the absence of muscles at the knee that can generate both flexion and extension moments (i.e., moment arm crosses zero).segment scale factors.Whereas previous methods such as MCBS must be fitted to each person's scaled model which is a computationally intensive procedure [16], the NN method presented here encodes the base model MTU kinematics and appropriately adapts lmt, r, and mLOA in response to varying skeletal dimensions.The NN demonstrated low computational cost and could be deployed in many practical applications where real-time NMS modelling is currently a Fitting error for neural network predicted (red) and multidimensional cubic B-splines estimated (green) musculotendon unit lengths and moment arms for five models from the test dataset.
The developed NN produced robust estimates of lowerlimb MTU kinematics by accounting for both body pose and geometry.The NN estimated lmt, r, and mLOA with low error (Table V) and excellent agreement ( .These errors were putatively caused by discontinuous MTU paths in OpenSim models used for reference, a known problem caused by via points and wrapping surfaces [32].At the discontinuities, the NN did not well predict step changes in lmt and r.Instead, it produced smooth curves with respect to changes in joint angles (Supp Fig 2 ), which is a desirable behaviour.The low fitting compared to OpenSim NN are suitable for estimation of lmt, r, and mLOA, whilst smoothing of MTU discontinuities may produce more physiologically plausible solutions than NMS models.
The NN demonstrated marginally lower accuracy than MCBS in estimating MTU kinematics (Fig 4 ); however, the NN removed the need for a priori fitting to individual subjects.Indeed, MCBS require scaling of a subject-specific NMS model, posing of scaled model through a grid spanning the entire ROM of all GC, and pre-calculation of lmt to compute spline coefficients.Depending on model complexity (i.e., number of MTU and wrapping surfaces) and number of GC, pre-calculation time of lmt can be considerable (>30 min).Removing need for fitting phase whilst delivering real-time computation means the NN may facilitate rapid deployment in practical applications and enable novel uses of NMS models, such as biofeedback informed retraining for hip osteoarthritis [6], [24].Hip contact force (mean ± standard deviation) during the stance phase of gait for five participants (27±12 trials) with hip osteoarthritis (rows 1 to 5) and ensemble (row 6), estimated using an EMG-informed NMS model with OpenSim derived (black solid), neural network predicted (red-dashed) and multidimensional cubic B-spline estimated (green-dashed) musculotendon unit lengths and moment arms (column 1).The resulting difference in hip contact force between methods is shown in column 2 (red = neural network method minus OpenSim method, green = multidimensional cubic B-spline method minus OpenSim).nRMSE = normalized root-mean-square-error (% of peak hip contact force).
Although the NN estimated MTU kinematics demonstrated larger errors than MCBS, the NN errors were sufficiently small (MFE<0.5%)and resulted in accurate estimation of clinically relevant biomarkers in downstream analysis.A practical application for real-time NMS modelling is biofeedback informed gait modification to alter joint contact forces in individuals with osteoarthritis [6].The NN and Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.MCBS estimated lmt and r resulted in negligible (∼1.2% and 1.0%, respectively) error in hip contact force estimation during walking compared to simulation using OpenSim to derive lmt and r.Differences in hip contact forces generated by NN and NMS estimated MTU lmt and r were well within uncertainty of hip contact forces due to model calibration [33] and personalization [34], and small enough to detect clinically meaningful changes to joint contact forces (∼5%) [6].Results suggest NN may be used for real-time estimation of MTU kinematics with little effect on accuracy of clinically relevant biomarkers such as joint contact forces.
The NN required minimal computation time, improving upon MCBS, and demonstrating real-time capabilities regardless of model complexity.When computing lmt and r for muscles dependent on more than 4 GC (e.g., glenohumeral and scapulothoracic motions), MCBS evaluation time increased exponentially with each additional input coordinate.For real-time applications, computation time should be less than sampling period.Using a high-end consumer personal computer, computation time of 5 GC MCBS model would enable at most 25 Hz, which is below requirement of most optical motion capture (100 to 500 Hz), inertial motion capture (60 to 200 Hz), and computer vision (30 to 250 Hz) applications.For the NN, computation time was dependent on depth (number of layers), width (number of neurons per layers), and resulting number of network parameters.Hyperparameter tuning resulted in optimized models between 2 and 3 hidden layers and between 18,000 and 94,000 parameters for lower body models (Supp Table IV).For shoulder, models ranged from 75,000 to 85,000 parameters and computation time for lmt and r for all glenohumeral muscles (n = 13) was sufficiently small for real-time applications on a desktop computer (<0.56 ms and <0.04 ms for TF-Keras and TF-Lite, respectively).
To assess effects of model complexity on computation time, a shoulder model was used that enabled increasing GC while holding constant the number of evaluated MTU.The number of MTU of the shoulder model ( 13) was fewer than is common in lower body models (∼40 per leg), for which computation time would likely be greater for OpenSim and MCBS.For NN, however, computation time of each lowerbody model (e.g., Hip, Hip-Knee) was similar to reported shoulder model computation time, and when combined (total parameters =248,000), computed MTU kinematics for all 36 MTU in <0.09ms (TF-Lite), enabling data capture rates >10,000Hz, far exceeding current motion capture technologies.When converted to 16-bit weights (TF-Lite), all lower-body and shoulder models were <1 MB.Importantly, TF-Lite models can be deployed on microcontrollers for use in embedded systems such as inertial motion capture [35], smart garments [36], and computer vision systems [37], facilitating real-time NMS modelling outside the laboratory.Kinematics can be solved in real-time via inertial measurement units [38] or computer vision [20], where the developed NN can then provide lmt, r, and mLOA estimates for NMS models.Alternatively, the developed NN may be embedded within increasingly prevalent combinations of wearable sensors and computer vision technologies with deep learning methods for estimating biomechanics [39], [40], [41].The speed of NN predictions may also be leveraged in optimisation of forward dynamics simulations which typically take several hours to converge.The NN estimated lmt, r, and mLOA may also be used to embed contraction dynamics and to allow equations of motions to be solved in novel physics-informed neural networks [42].
Limitations of this study should be considered.The developed NN used scale factors to learn relationships among subject dimensions, joint angles, MTU kinematics, and mLOA.Typically, scale factors are derived from markers placed atop anatomic landmarks during 3-dimensional optical motion capture [1].In practical applications and outside motion capture laboratories, scale factors could be computed from manual measurements (e.g., measured distance between landmarks), anatomical key points estimated using computer vision [37], or even estimated using standardized anthropometric tables based on population models as done historically [43].We used linearly scaled models to generate all training and testing data.Though commonly used, linearly scaled models may not fully capture subject specific skeletal geometry and muscle attachments that affect lmt, r, and mLOA [44], [45].Additionally, discontinuities of MTU in NMS models are a common problem that cause step changes in lmt, r, and mLOA [32].Although model joint ROM were constrained to avoid known discontinuities, it was impossible to guarantee absence of discontinuities in physics-modelled data due to the large number of uniquely scaled models (1000) and the lack of a robust test for discontinuities.Presence of discontinuities likely caused large errors in predictions when evaluating coordinates near discontinuities and explains the presence of outliers in reported errors (Fig 3).However, developed NN may produce more physiologically plausible lmt and r than NMS models affected by discontinuities (Supp Fig 2).The quantization of the NN can result in larger errors due to lost precision, although the differences between TF-Keras and TF-Lite predictions were <0.01%.We used a high-end consumer CPU (Intel i9-12900K) thus we expect computation time to be greater in mobile or laptop applications with typical consumer hardware.
Future studies may wish to generate training data that more accurately represent individual or population-specific geometry by sampling distributions from statistical shape models [44], or including the subject-specific data (e.g., femoral anteversion angles) necessary for model personalization as input, in place of scaling factors [46].MTU discontinuities may be reduced via optimization [32] or data imputation.Subject-specific NN models that require fewer parameters may also be trained for applications with low compute, such as micro-controllers.The proposed method may also be applied to statistical shape modelling by training NN using anatomical landmark locations or principal components as input.Finally, we provide the developed NN models, OpenSim data, and code to reproduce the results (https://github.com/BradleyCornish/Real-time_musculotendon_kinematics).

V. CONCLUSION
The developed NN accurately estimated musculotendon unit lengths, moment arms, and lines of action from joint angles and anthropometric scale factors.The NN provided rapid MTU kinematics for accurate estimation of biomarkers in downstream analyses.The NN maintained real-time inference for muscles with many degrees of freedom and can be converted to lightweight models for deployment in wearable sensors, inertial motion capture systems, or computer vision systems, unlocking key applications in the fields of rehabilitation.
An overview of data generation and NN model training is shown in Fig 1.

Fig. 2 .
Fig. 2. Musculotendon unit length (top row) and moment arm (rows 2 to 4) estimations from neural network compared to OpenSim for the gluteus maximus musculotendon unit at 3 rotation angles (columns).The mesh is the NN estimated values with the difference between methods (OpenSim -NN) indicated by colour (dark blue = −0.6mm,dark red = 0.6mm).
). Example of lmt and r predictions using NN for one hip spanning muscle (gluteus maximus) are shown (Fig 2).The NN computed mLOA vectors had lowest angle error compared to OpenSim values for muscle attachments onto calcaneus (0.03, 0.02-0.05• ),

Fig. 4 .
Fig. 4.Fitting error for neural network predicted (red) and multidimensional cubic B-splines estimated (green) musculotendon unit lengths and moment arms for five models from the test dataset.
Fig 3) compared to OpenSim values, suggesting the NN is a suitable alternative to OpenSim when rapid estimation of MTU kinematics is desired or necessary.The NN showed larger errors clustered around particular joint coordinates (Fig 2) and moment arm lengths (Fig 3)

Fig. 5 .
Fig. 5.Hip contact force (mean ± standard deviation) during the stance phase of gait for five participants (27±12 trials) with hip osteoarthritis (rows 1 to 5) and ensemble (row 6), estimated using an EMG-informed NMS model with OpenSim derived (black solid), neural network predicted (red-dashed) and multidimensional cubic B-spline estimated (green-dashed) musculotendon unit lengths and moment arms (column 1).The resulting difference in hip contact force between methods is shown in column 2 (red = neural network method minus OpenSim method, green = multidimensional cubic B-spline method minus OpenSim).nRMSE = normalized root-mean-square-error (% of peak hip contact force).