A class implementing a SIMM muscle. More...
#include <Thelen2003Muscle.h>
Public Member Functions | |
Thelen2003Muscle () | |
Default constructor. | |
Thelen2003Muscle (const std::string &aName, double aMaxIsometricForce, double aOptimalFiberLength, double aTendonSlackLength, double aPennationAngle) | |
Constructor. | |
Thelen2003Muscle (const Thelen2003Muscle &aMuscle) | |
Copy constructor. | |
virtual | ~Thelen2003Muscle () |
Destructor. | |
virtual Object * | copy () const |
Copy this muscle point and return a pointer to the copy. | |
Thelen2003Muscle & | operator= (const Thelen2003Muscle &aMuscle) |
Assignment operator. | |
void | copyData (const Thelen2003Muscle &aMuscle) |
Copy data members from one Thelen2003Muscle to another. | |
virtual double | getActivationTimeConstant () const |
virtual double | getDeactivationTimeConstant () const |
virtual double | getVmax () const |
virtual double | getVmax0 () const |
virtual double | getFmaxTendonStrain () const |
virtual double | getFmaxMuscleStrain () const |
virtual double | getKshapeActive () const |
virtual double | getKshapePassive () const |
virtual double | getDamping () const |
virtual double | getAf () const |
virtual double | getFlen () const |
virtual bool | setActivationTimeConstant (double aActivationTimeConstant) |
Set the time constant for ramping up of muscle force. | |
virtual bool | setDeactivationTimeConstant (double aDeactivationTimeConstant) |
Set the time constant for ramping down of muscle force. | |
virtual bool | setVmax (double aVmax) |
Set the maximum contraction velocity of the fibers, in optimal fiber lengths per second. | |
virtual bool | setVmax0 (double aVmax0) |
Set the maximum contraction velocity at low activation of the fibers, in optimal fiber lengths per second. | |
virtual bool | setFmaxTendonStrain (double aFmaxTendonStrain) |
Set the tendon strain due to maximum isometric muscle force. | |
virtual bool | setFmaxMuscleStrain (double aFmaxMuscleStrain) |
Set the passive muscle strain due to maximum isometric muscle force. | |
virtual bool | setKshapeActive (double aKShapeActive) |
Set the shape factor for Gaussian active muscle force-length relationship. | |
virtual bool | setKshapePassive (double aKshapePassive) |
Set the shape factor for Gaussian passive muscle force-length relationship. | |
virtual bool | setDamping (double aDamping) |
Set the damping factor related to maximum contraction velocity. | |
virtual bool | setAf (double aAf) |
Set the force-velocity shape factor. | |
virtual bool | setFlen (double aFlen) |
Set the maximum normalized lengthening force. | |
virtual void | computeEquilibrium (SimTK::State &s) const |
Compute the equilibrium states. | |
virtual double | computeActuation (const SimTK::State &s) const |
Compute the actuation for the muscle. | |
double | calcTendonForce (const SimTK::State &s, double aNormTendonLength) const |
From cmg_dt.c - calc_tendon_force_dt. | |
double | calcPassiveForce (const SimTK::State &s, double aNormFiberLength) const |
From gmc.dt.c - calc_passive_fiber_force_dt. | |
double | calcActiveForce (const SimTK::State &s, double aNormFiberLength) const |
From gmc.dt.c - calc_active_force_dt. | |
double | calcFiberVelocity (const SimTK::State &s, double aActivation, double aActiveForce, double aVelocityDependentForce) const |
From gmc_dt.c - calc_norm_fiber_velocity_dt. | |
virtual double | computeIsometricForce (SimTK::State &s, double activation) const |
Find the force produced by an actuator (the musculotendon unit), assuming static equilibrium. | |
virtual int | getStateVariableYIndex (int index) const |
Get the YIndex of a state variable allocated by this ModelComponent. | |
OPENSIM_DECLARE_DERIVED (Thelen2003Muscle, ActivationFiberLengthMuscle) | |
Protected Member Functions | |
virtual void | setup (Model &aModel) |
Perform some set up functions that happen after the object has been deserialized or copied. | |
virtual void | createSystem (SimTK::MultibodySystem &system) const |
allocate and initialize the SimTK state for this acuator. | |
virtual SimTK::Vector | computeStateVariableDerivatives (const SimTK::State &s) const |
Compute the derivatives of the muscle states. | |
Protected Attributes | |
PropertyDbl | _activationTimeConstantProp |
Activation time constant. | |
double & | _activationTimeConstant |
PropertyDbl | _deactivationTimeConstantProp |
Deactivation time constant. | |
double & | _deactivationTimeConstant |
PropertyDbl | _vmaxProp |
Max contraction velocity full activation in fiber lengths per second. | |
double & | _vmax |
PropertyDbl | _vmax0Prop |
Max contraction velocity at low activation. | |
double & | _vmax0 |
PropertyDbl | _fmaxTendonStrainProp |
Tendon strain due to maximum isometric muscle force. | |
double & | _fmaxTendonStrain |
PropertyDbl | _fmaxMuscleStrainProp |
Passive muscle strain due to maximum isometric muscle force. | |
double & | _fmaxMuscleStrain |
PropertyDbl | _kShapeActiveProp |
Shape factor for Gaussian active muscle force-length relationship. | |
double & | _kShapeActive |
PropertyDbl | _kShapePassiveProp |
Exponential shape factor for passive force-length relationship. | |
double & | _kShapePassive |
PropertyDbl | _dampingProp |
Passive damping included in the force-velocity relationship. | |
double & | _damping |
PropertyDbl | _afProp |
Force-velocity shape factor. | |
double & | _af |
PropertyDbl | _flenProp |
Maximum normalized lengthening force. | |
double & | _flen |
Static Protected Attributes | |
static const int | STATE_ACTIVATION = 0 |
static const int | STATE_FIBER_LENGTH = 1 |
A class implementing a SIMM muscle.
Thelen2003Muscle::Thelen2003Muscle | ( | ) |
Default constructor.
Thelen2003Muscle::Thelen2003Muscle | ( | const std::string & | aName, | |
double | aMaxIsometricForce, | |||
double | aOptimalFiberLength, | |||
double | aTendonSlackLength, | |||
double | aPennationAngle | |||
) |
Constructor.
Thelen2003Muscle::Thelen2003Muscle | ( | const Thelen2003Muscle & | aMuscle | ) |
Copy constructor.
aMuscle | Thelen2003Muscle to be copied. |
Thelen2003Muscle::~Thelen2003Muscle | ( | ) | [virtual] |
Destructor.
double Thelen2003Muscle::calcActiveForce | ( | const SimTK::State & | s, | |
double | aNormFiberLength | |||
) | const |
From gmc.dt.c - calc_active_force_dt.
CALC_ACTIVE_FORCE_DT: this routine calculates the active component of force in the muscle fibers. It uses the current fiber length to interpolate the active force-length curve - described by Gaussian curve as in Thelen, JBME 2003 *
aNormFiberLength | Normalized length of the muscle fiber. |
double Thelen2003Muscle::calcFiberVelocity | ( | const SimTK::State & | s, | |
double | aActivation, | |||
double | aActiveForce, | |||
double | aVelocityDependentForce | |||
) | const |
From gmc_dt.c - calc_norm_fiber_velocity_dt.
CALC_NORM_FIBER_VELOCITY_DT: written by Darryl Thelen this routine calculates the normalized fiber velocity (scaled to Vmax) by inverting the muscle force-velocity-activation relationship (Thelen, JBME 2003) This equation is parameterized using the following dynamic parameters which must be specified in the muscle file Dynamic Parameters: damping - normalized passive damping in parallel with contractile element Af - velocity shape factor from Hill's equation Flen - Maximum normalized force when muscle is lengthening
aActivation | Activation of the muscle. | |
aActiveForce | Active force in the muscle fibers. | |
aVelocityDependentForce | Force value that depends on fiber velocity. |
double Thelen2003Muscle::calcPassiveForce | ( | const SimTK::State & | s, | |
double | aNormFiberLength | |||
) | const |
From gmc.dt.c - calc_passive_fiber_force_dt.
CALC_PASSIVE_FIBER_FORCE_DT: written by Darryl Thelen this routine calculates the passive force in the muscle fibers using an exponential-linear function instead of cubic splines. It always returns a non-zero force for all muscle lengths This equation is parameterized using the following dynamic parameters which must be specified in the muscle file Dynamic Parameters: FmaxMuscleStrain - passive muscle strain due to the application of maximum isometric muscle force KshapePassive - exponential shape factor
The normalized force due to passive stretch is given by For L < (1+maxStrain)*Lo f/f0 = exp(ks*(L-1)/maxStrain) / exp(ks)
aNormFiberLength | Normalized length of the muscle fiber. |
double Thelen2003Muscle::calcTendonForce | ( | const SimTK::State & | s, | |
double | aNormTendonLength | |||
) | const |
From cmg_dt.c - calc_tendon_force_dt.
CALC_TENDON_FORCE_DT: this routine calculates the force in tendon by finding tendon strain and using it in an exponential function (JBME 2003 - Thelen) FmaxTendonStrain - Function is parameterized by the tendon strain due to maximum isometric muscle force This should be specified as a dynamic parameter in the muscle file
aNormTendonLength | Normalized length of the tendon. |
double Thelen2003Muscle::computeActuation | ( | const SimTK::State & | s | ) | const [virtual] |
Compute the actuation for the muscle.
This function assumes that computeDerivatives has already been called.
This function is based on muscle_deriv_func9 from derivs.c (old pipeline code)
Implements OpenSim::ActivationFiberLengthMuscle.
void Thelen2003Muscle::computeEquilibrium | ( | SimTK::State & | s | ) | const [virtual] |
Compute the equilibrium states.
This method computes a fiber length for the muscle that is consistent with the muscle's activation level.
Reimplemented from OpenSim::Actuator_.
double Thelen2003Muscle::computeIsometricForce | ( | SimTK::State & | s, | |
double | aActivation | |||
) | const [virtual] |
Find the force produced by an actuator (the musculotendon unit), assuming static equilibrium.
Using the total muscle-tendon length, it finds the fiber and tendon lengths so that the forces in each match. This routine takes pennation angle into account, so its definition of static equilibrium is when tendon_force = fiber_force * cos(pennation_angle). This funcion will modify the object's values for length, fiberLength, activeForce, and passiveForce.
aActivation | Activation of the muscle. |
Implements OpenSim::ActivationFiberLengthMuscle.
SimTK::Vector Thelen2003Muscle::computeStateVariableDerivatives | ( | const SimTK::State & | s | ) | const [protected, virtual] |
Compute the derivatives of the muscle states.
s | system state | |
index |
Reimplemented from OpenSim::ModelComponent.
Object * Thelen2003Muscle::copy | ( | ) | const [virtual] |
Copy this muscle point and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::ActivationFiberLengthMuscle.
void Thelen2003Muscle::copyData | ( | const Thelen2003Muscle & | aMuscle | ) |
Copy data members from one Thelen2003Muscle to another.
aMuscle | Thelen2003Muscle to be copied. |
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
void Thelen2003Muscle::createSystem | ( | SimTK::MultibodySystem & | system | ) | const [protected, virtual] |
allocate and initialize the SimTK state for this acuator.
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
virtual double OpenSim::Thelen2003Muscle::getActivationTimeConstant | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getAf | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getDamping | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getDeactivationTimeConstant | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getFlen | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getFmaxMuscleStrain | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getFmaxTendonStrain | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getKshapeActive | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getKshapePassive | ( | ) | const [inline, virtual] |
int Thelen2003Muscle::getStateVariableYIndex | ( | int | index | ) | const [virtual] |
Get the YIndex of a state variable allocated by this ModelComponent.
The default implementation throws an exception, so subclasses that allocate state variables must override it.
index | the index of the state variable (0 to getNumStateVariables()-1) |
Reimplemented from OpenSim::ModelComponent.
virtual double OpenSim::Thelen2003Muscle::getVmax | ( | ) | const [inline, virtual] |
virtual double OpenSim::Thelen2003Muscle::getVmax0 | ( | ) | const [inline, virtual] |
OpenSim::Thelen2003Muscle::OPENSIM_DECLARE_DERIVED | ( | Thelen2003Muscle | , | |
ActivationFiberLengthMuscle | ||||
) |
Thelen2003Muscle & Thelen2003Muscle::operator= | ( | const Thelen2003Muscle & | aMuscle | ) |
Assignment operator.
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
bool Thelen2003Muscle::setActivationTimeConstant | ( | double | aActivationTimeConstant | ) | [virtual] |
Set the time constant for ramping up of muscle force.
aActivationTimeConstant | The time constant for ramping up of muscle force. |
bool Thelen2003Muscle::setAf | ( | double | aAf | ) | [virtual] |
Set the force-velocity shape factor.
aAf | The force-velocity shape factor. |
bool Thelen2003Muscle::setDamping | ( | double | aDamping | ) | [virtual] |
Set the damping factor related to maximum contraction velocity.
aDamping | The damping factor related to maximum contraction velocity. |
bool Thelen2003Muscle::setDeactivationTimeConstant | ( | double | aDeactivationTimeConstant | ) | [virtual] |
Set the time constant for ramping down of muscle force.
aDeactivationTimeConstant | The time constant for ramping down of muscle force. |
bool Thelen2003Muscle::setFlen | ( | double | aFlen | ) | [virtual] |
Set the maximum normalized lengthening force.
aFlen | The maximum normalized lengthening force. |
bool Thelen2003Muscle::setFmaxMuscleStrain | ( | double | aFmaxMuscleStrain | ) | [virtual] |
Set the passive muscle strain due to maximum isometric muscle force.
aFmaxMuscleStrain | The passive muscle strain due to maximum isometric muscle force. |
bool Thelen2003Muscle::setFmaxTendonStrain | ( | double | aFmaxTendonStrain | ) | [virtual] |
Set the tendon strain due to maximum isometric muscle force.
aFmaxTendonStrain | The tendon strain due to maximum isometric muscle force. |
bool Thelen2003Muscle::setKshapeActive | ( | double | aKShapeActive | ) | [virtual] |
Set the shape factor for Gaussian active muscle force-length relationship.
aKShapeActive | The shape factor for Gaussian active muscle force-length relationship. |
bool Thelen2003Muscle::setKshapePassive | ( | double | aKshapePassive | ) | [virtual] |
Set the shape factor for Gaussian passive muscle force-length relationship.
aKshapePassive | The shape factor for Gaussian passive muscle force-length relationship. |
void Thelen2003Muscle::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | model containing this Thelen2003Muscle. |
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
bool Thelen2003Muscle::setVmax | ( | double | aVmax | ) | [virtual] |
Set the maximum contraction velocity of the fibers, in optimal fiber lengths per second.
aVmax | The maximum contraction velocity of the fibers, in optimal fiber lengths per second. |
bool Thelen2003Muscle::setVmax0 | ( | double | aVmax0 | ) | [virtual] |
Set the maximum contraction velocity at low activation of the fibers, in optimal fiber lengths per second.
aVmax | The maximum contraction velocity at low activation of the fibers, in optimal fiber lengths per second. |
double& OpenSim::Thelen2003Muscle::_activationTimeConstant [protected] |
Activation time constant.
double& OpenSim::Thelen2003Muscle::_af [protected] |
PropertyDbl OpenSim::Thelen2003Muscle::_afProp [protected] |
Force-velocity shape factor.
double& OpenSim::Thelen2003Muscle::_damping [protected] |
PropertyDbl OpenSim::Thelen2003Muscle::_dampingProp [protected] |
Passive damping included in the force-velocity relationship.
double& OpenSim::Thelen2003Muscle::_deactivationTimeConstant [protected] |
Deactivation time constant.
double& OpenSim::Thelen2003Muscle::_flen [protected] |
PropertyDbl OpenSim::Thelen2003Muscle::_flenProp [protected] |
Maximum normalized lengthening force.
double& OpenSim::Thelen2003Muscle::_fmaxMuscleStrain [protected] |
Passive muscle strain due to maximum isometric muscle force.
double& OpenSim::Thelen2003Muscle::_fmaxTendonStrain [protected] |
Tendon strain due to maximum isometric muscle force.
double& OpenSim::Thelen2003Muscle::_kShapeActive [protected] |
Shape factor for Gaussian active muscle force-length relationship.
double& OpenSim::Thelen2003Muscle::_kShapePassive [protected] |
Exponential shape factor for passive force-length relationship.
double& OpenSim::Thelen2003Muscle::_vmax [protected] |
double& OpenSim::Thelen2003Muscle::_vmax0 [protected] |
PropertyDbl OpenSim::Thelen2003Muscle::_vmax0Prop [protected] |
Max contraction velocity at low activation.
PropertyDbl OpenSim::Thelen2003Muscle::_vmaxProp [protected] |
Max contraction velocity full activation in fiber lengths per second.
const int Thelen2003Muscle::STATE_ACTIVATION = 0 [static, protected] |
Reimplemented from OpenSim::ActivationFiberLengthMuscle.
const int Thelen2003Muscle::STATE_FIBER_LENGTH = 1 [static, protected] |
Reimplemented from OpenSim::ActivationFiberLengthMuscle.