This muscle model was published in De Groote et al.
2016. The parameters of the active force-length and force-velocity curves have been slightly modified from what was published to ensure the curves go through key points:
- Active force-length curve goes through (1, 1).
- Force-velocity curve goes through (-1, 0) and (0, 1). The default tendon force curve parameters are modified from that in De Groote et al., 2016: the curve is parameterized by the strain at 1 norm force (rather than "kT"), and the default value for this parameter is 0.049 (same as in TendonForceLengthCurve) rather than 0.0474.
The fiber damping helps with numerically solving for fiber velocity at low activations or with low force-length multipliers, and is likely to be more useful with explicit fiber dynamics than implicit fiber dynamics (when support for fiber dynamics is added).
This class supports tendon compliance dynamics in both explicit and implicit form. Both forms of the dynamics use normalized tendon force as the state variable (rather than the typical fiber length state). The explicit form is handled through the usual Component dynamics interface. The implicit form introduces an additional discrete and cache SimTK::State variable for the derivative of normalized tendon force and muscle-tendon equilibrium residual respectively. The implicit form is only for use with solvers that support implicit dynamics (i.e. Moco) and cannot be used to perform a time-stepping forward simulation with Manager; use explicit mode for time-stepping.
- Note
- Normalized tendon force is bounded in the range [0, 5] in this class. The methods getMinNormalizedTendonForce() and getMaxNormalizedTendonForce() are available to access these bounds for use in custom solvers.
-
This class is still under active development and should be used with caution.
Departures from the Muscle base class
The documentation for Muscle::MuscleLengthInfo states that the optimalFiberLength of a muscle is also its resting length, but this is not true for this muscle: there is a non-zero passive fiber force at the optimal fiber length.
In the Muscle class, setIgnoreTendonCompliance() and setIngoreActivationDynamics() control modeling options, meaning these settings could theoretically be changed. However, for this class, the modeling option is ignored and the values of the ignore_tendon_compliance and ignore_activation_dynamics properties are used directly.
De Groote, F., Kinney, A. L., Rao, A. V., & Fregly, B. J. (2016). Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem. Annals of Biomedical Engineering, 44(10), 1–15. http://doi.org/10.1007/s10439-016-1591-9
|
| OpenSim_DECLARE_PROPERTY (activation_time_constant, double, "Smaller value means activation can change more rapidly (units: " "seconds).") |
|
| OpenSim_DECLARE_PROPERTY (deactivation_time_constant, double, "Smaller value means activation can decrease more rapidly " "(units: seconds).") |
|
| OpenSim_DECLARE_PROPERTY (default_activation, double, "Value of activation in the default state returned by " "initSystem().") |
|
| OpenSim_DECLARE_PROPERTY (default_normalized_tendon_force, double, "Value of normalized tendon force in the default state returned by " "initSystem().") |
|
| OpenSim_DECLARE_PROPERTY (active_force_width_scale, double, "Scale factor for the width of the active force-length curve. " "Larger values make the curve wider. Default: 1.0.") |
|
| OpenSim_DECLARE_PROPERTY (fiber_damping, double, "The linear damping of the fiber. Default: 0.") |
|
| OpenSim_DECLARE_PROPERTY (ignore_passive_fiber_force, bool, "Make the passive fiber force 0. Default: false.") |
|
| OpenSim_DECLARE_PROPERTY (passive_fiber_strain_at_one_norm_force, double, "Fiber strain when the passive fiber force is 1 normalized force. " "Default: 0.6.") |
|
| OpenSim_DECLARE_PROPERTY (tendon_strain_at_one_norm_force, double, "Tendon strain at a tension of 1 normalized force. " "Default: 0.049.") |
|
| OpenSim_DECLARE_PROPERTY (tendon_compliance_dynamics_mode, std::string, "The dynamics method used to enforce tendon compliance dynamics. " "Options: 'explicit' or 'implicit'. Default: 'explicit'. ") |
|
| OpenSim_DECLARE_OUTPUT (implicitresidual_normalized_tendon_force, double, getImplicitResidualNormalizedTendonForce, SimTK::Stage::Dynamics) |
|
| OpenSim_DECLARE_OUTPUT (implicitenabled_normalized_tendon_force, bool, getImplicitEnabledNormalizedTendonForce, SimTK::Stage::Model) |
|
| OpenSim_DECLARE_OUTPUT (statebounds_normalized_tendon_force, SimTK::Vec2, getBoundsNormalizedTendonForce, SimTK::Stage::Model) |
|
|
If ignore_tendon_compliance is true, this sets nothing.
|
void | setNormalizedTendonForce (SimTK::State &s, double normTendonForce) const |
|
|
double | getActivation (const SimTK::State &s) const override |
| If ignore_activation_dynamics is true, this gets excitation instead.
|
|
void | setActivation (SimTK::State &s, double activation) const override |
| If ignore_activation_dynamics is true, this sets excitation instead.
|
|
void | computeInitialFiberEquilibrium (SimTK::State &s) const override |
| Fiber velocity is assumed to be 0.
|
|
double | calcInextensibleTendonActiveFiberForce (SimTK::State &, double) const override |
|
void | calcMuscleLengthInfo (const SimTK::State &s, MuscleLengthInfo &mli) const override |
|
void | calcFiberVelocityInfo (const SimTK::State &s, FiberVelocityInfo &fvi) const override |
|
void | calcMuscleDynamicsInfo (const SimTK::State &s, MuscleDynamicsInfo &mdi) const override |
|
void | calcMusclePotentialEnergyInfo (const SimTK::State &s, MusclePotentialEnergyInfo &mpei) const override |
|
|
bool | getImplicitEnabledNormalizedTendonForce (const SimTK::State &) const |
| We don't need the state, but the state parameter is a requirement of Output functions. More...
|
|
double | getImplicitResidualNormalizedTendonForce (const SimTK::State &s) const |
| Compute the muscle-tendon force equilibrium residual value when using implicit contraction dynamics with normalized tendon force as the state. More...
|
|
double | getNormalizedTendonForce (const SimTK::State &s) const |
| If ignore_tendon_compliance is true, this gets normalized fiber force along the tendon instead. More...
|
|
double | getNormalizedTendonForceDerivative (const SimTK::State &s) const |
| If integration_mode is 'implicit', this gets the discrete variable tendon force derivative value. More...
|
|
double | getEquilibriumResidual (const SimTK::State &s) const |
| The residual (i.e. More...
|
|
double | getLinearizedEquilibriumResidualDerivative (const SimTK::State &s) const |
| The residual (i.e. More...
|
|
SimTK::Vec2 | getBoundsNormalizedTendonForce (const SimTK::State &) const |
| The first element of the Vec2 is the lower bound, and the second is the upper bound. More...
|
|
static std::string | getActivationStateName () |
|
static std::string | getNormalizedTendonForceStateName () |
|
static std::string | getImplicitDynamicsDerivativeName () |
|
static std::string | getImplicitDynamicsResidualName () |
|
static double | getMinNormalizedTendonForce () |
|
static double | getMaxNormalizedTendonForce () |
|
|
These functions compute the values of normalized/dimensionless curves, their derivatives and integrals, and other quantities of the muscle.
These do not depend on a SimTK::State.
|
SimTK::Real | calcActiveForceLengthMultiplier (const SimTK::Real &normFiberLength) const |
| The active force-length curve is the sum of 3 Gaussian-like curves. More...
|
|
SimTK::Real | calcActiveForceLengthMultiplierDerivative (const SimTK::Real &normFiberLength) const |
| The derivative of the active force-length curve with respect to normalized fiber length. More...
|
|
SimTK::Real | calcPassiveForceMultiplier (const SimTK::Real &normFiberLength) const |
| This is the passive force-length curve. More...
|
|
SimTK::Real | calcPassiveForceMultiplierDerivative (const SimTK::Real &normFiberLength) const |
| This is the derivative of the passive force-length curve with respect to the normalized fiber length. More...
|
|
SimTK::Real | calcPassiveForceMultiplierIntegral (const SimTK::Real &normFiberLength) const |
| This is the integral of the passive force-length curve with respect to the normalized fiber length. More...
|
|
SimTK::Real | calcTendonForceMultiplier (const SimTK::Real &normTendonLength) const |
| The normalized tendon force as a function of normalized tendon length. More...
|
|
SimTK::Real | calcTendonForceMultiplierDerivative (const SimTK::Real &normTendonLength) const |
| This is the derivative of the tendon-force length curve with respect to normalized tendon length. More...
|
|
SimTK::Real | calcTendonForceMultiplierIntegral (const SimTK::Real &normTendonLength) const |
| This is the integral of the tendon-force length curve with respect to normalized tendon length. More...
|
|
SimTK::Real | calcTendonForceLengthInverseCurve (const SimTK::Real &normTendonForce) const |
| This is the inverse of the tendon force-length curve, and returns the normalized tendon length as a function of the normalized tendon force. More...
|
|
SimTK::Real | calcTendonForceLengthInverseCurveDerivative (const SimTK::Real &derivNormTendonForce, const SimTK::Real &normTendonLength) const |
| This is the derivative of the inverse tendon-force length. More...
|
|
void | calcFiberForce (const SimTK::Real &activation, const SimTK::Real &activeForceLengthMultiplier, const SimTK::Real &forceVelocityMultiplier, const SimTK::Real &normPassiveFiberForce, const SimTK::Real &normFiberVelocity, SimTK::Real &activeFiberForce, SimTK::Real &conPassiveFiberForce, SimTK::Real &nonConPassiveFiberForce, SimTK::Real &totalFiberForce) const |
| This computes both the total fiber force and the individual components of fiber force (active, conservative passive, and non-conservative passive). More...
|
|
SimTK::Real | calcFiberStiffness (const SimTK::Real &activation, const SimTK::Real &normFiberLength, const SimTK::Real &fiberVelocityMultiplier) const |
| The stiffness of the fiber in the direction of the fiber. More...
|
|
SimTK::Real | calcTendonStiffness (const SimTK::Real &normTendonLength) const |
| The stiffness of the tendon in the direction of the tendon. More...
|
|
SimTK::Real | calcMuscleStiffness (const SimTK::Real &tendonStiffness, const SimTK::Real &fiberStiffnessAlongTendon) const |
| The stiffness of the whole musculotendon unit in the direction of the tendon. More...
|
|
SimTK::Real | calcPartialPennationAnglePartialFiberLength (const SimTK::Real &fiberLength) const |
| The derivative of pennation angle with respect to fiber length. More...
|
|
SimTK::Real | calcPartialFiberForceAlongTendonPartialFiberLength (const SimTK::Real &fiberForce, const SimTK::Real &fiberStiffness, const SimTK::Real &sinPennationAngle, const SimTK::Real &cosPennationAngle, const SimTK::Real &partialPennationAnglePartialFiberLength) const |
| The derivative of the fiber force along the tendon with respect to fiber length. More...
|
|
SimTK::Real | calcFiberStiffnessAlongTendon (const SimTK::Real &fiberLength, const SimTK::Real &partialFiberForceAlongTendonPartialFiberLength, const SimTK::Real &sinPennationAngle, const SimTK::Real &cosPennationAngle, const SimTK::Real &partialPennationAnglePartialFiberLength) const |
| The derivative of the fiber force along the tendon with respect to the fiber length along the tendon. More...
|
|
SimTK::Real | calcPartialTendonLengthPartialFiberLength (const SimTK::Real &fiberLength, const SimTK::Real &sinPennationAngle, const SimTK::Real &cosPennationAngle, const SimTK::Real &partialPennationAnglePartialFiberLength) const |
|
SimTK::Real | calcPartialTendonForcePartialFiberLength (const SimTK::Real &tendonStiffness, const SimTK::Real &fiberLength, const SimTK::Real &sinPennationAngle, const SimTK::Real &cosPennationAngle) const |
|
SimTK::Real | calcEquilibriumResidual (const SimTK::Real &tendonForce, const SimTK::Real &fiberForceAlongTendon) const |
| The residual (i.e. More...
|
|
SimTK::Real | calcLinearizedEquilibriumResidualDerivative (const SimTK::Real muscleTendonVelocity, const SimTK::Real &fiberVelocityAlongTendon, const SimTK::Real &tendonStiffness, const SimTK::Real &fiberStiffnessAlongTendon) const |
| The residual (i.e. More...
|
|
static SimTK::Real | calcForceVelocityMultiplier (const SimTK::Real &normFiberVelocity) |
| The parameters of this curve are not modifiable, so this function is static. More...
|
|
static SimTK::Real | calcForceVelocityInverseCurve (const SimTK::Real &forceVelocityMult) |
| This is the inverse of the force-velocity multiplier function, and returns the normalized fiber velocity (in [-1, 1]) as a function of the force-velocity multiplier. More...
|
|