Skip to content

Calibrates the passive muscle forces in an OpenSim model based on experimentally-collected passive joint moments from Silder et al. 2007.

License

Notifications You must be signed in to change notification settings

stanfordnmbl/PassiveMuscleForceCalibration

Repository files navigation

Calibration of Passive Muscle Force Curves in OpenSim Musculoskeletal Models

Calibrates the passive muscle forces in an OpenSim model based on experimentally-collected passive joint moments from Silder et al. 2007. This procedure is detailed in the Supplemental Materials of Uhlrich et al., 2022.

Publications

Please cite:
Uhlrich SD, Jackson RW, Seth A, Kolesar JA, Delp SL, 2022. Muscle coordination retraining inspired by musculoskeletal simulations reduces knee contact force. Scientific Reports 12, 9842. https://doi.org/10.1038/s41598-022-13386-9.

The muscles in the Rajagopal2015 Full Body Model in OpenSim generate large passive forces at large hip flexion and knee flexion angles. This code calibrates the passive force length curves for the Millard2012EquillibriumMuscle muscles in this model. The curve is described by five parameters. In the current code, we only shift the strainAtZeroForce and strainAtOneNormForce parameters, effectively shifting and/or stretching the curve along the x-axis. Note: this code should work for other models that use Millard2012EquilibriumMuscles, but will likely not work for models (like gait2392.osim) that use the Thelen2003Muscle muscle class, due to an issue with using the equilibrateMuscles algorithm with the ThelenMuscles. There may be workarounds for this, but they have not been implemented in this code.

passiveCurveGeneric

Running the Code

Clone the repository and run PassiveCalibration.m. Below is a description of some of the options in the code:

  • Use an initial guess (initialGuessFile variable) for the optimization. Several examples are included in the PreviousResults folder.
  • Change the joint angle ranges over which to calibrate the muscle parameters (silderCoordRanges variable). You may want to tune these towards the activity of interest in your simulation. The current settings are for walking.
  • Change which of the five parameters in the Millard2012EquilibriumMuscle model to modify (paramsToModify variable).
  • Change the upper and lower bounds for the parameters (paramRange variable).
  • Calibrate only specific muscles (calibrateAllMuscles and muscles2Calibrate variables).
  • Account for tendon compliance (ignoreTendonCompliance variable). Using rigid tendons speeds up the optimization substantially, so running an optimization with rigid tendons may be good for generating an initial guess for an optimization that uses compliant tendons.
  • Different weights for passive torque error vs. a parameter regularization term (L2 penalty on changes in parameters, normalized to initial value).
  • To only plot results, can change the justPlotSolution flag to true, which will skip the optimization.


Example Results

Three example results are included. We include a solution that converged using rigid tendons, the results of an optimization with compliant tendons that did not converge after 100 iterations (this used the rigid tendon solution as an initial guess), and a solution with compliant tendons that converged with another 72 iterations (using the 100-iteration solution as an initial guess, stored in folder PreviousResults/CalibratedModelForPaper). The changes in passive joint moments and muscle parameters are shown below, from Uhlrich et al. 2020.

passiveCurves
Sagittal plane passive joint moment curves for the hip, knee, and ankle. Calibration improved the agreement in passive joint moments between the Rajagopal et al. model and experimentally-measured moments from Silder et al.55. Each joint was moved over the shown range of motion with other joints fixed at various angles (see Silder et al.). For example, the hip was moved from 15° of extension to 37° of flexion (left) with the knee fixed at 15° (blue) and 60° (red).

groupMuscleUpdates
Calibrated normalized muscle fiber lengths that parameterize the passive muscle force curve for sagittal plane muscle groups. At F^m=0, the default l^m⁄(l_o^m )=1, F^m=F_o^m, the default l^m⁄(l_o^m )=1.7. Muscle groupings are defined in Table S1. With the exception of the hip flexors, most muscle groups begin generating passive force at a longer fiber length after calibration.



Calibrated muscle fiber lengths that parameterize the passive muscle force curve for each muscle in the Rajagopal et al. model.
indivMuscleUpdateTable

About

Calibrates the passive muscle forces in an OpenSim model based on experimentally-collected passive joint moments from Silder et al. 2007.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published