OpenSim::Thelen2003Muscle Class Reference

A class implementing a SIMM muscle. More...

#include <Thelen2003Muscle.h>

Inheritance diagram for OpenSim::Thelen2003Muscle:
OpenSim::ActivationFiberLengthMuscle OpenSim::Muscle OpenSim::PathActuator OpenSim::Actuator OpenSim::Actuator_ OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

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 Objectcopy () const
 Copy this muscle point and return a pointer to the copy.
Thelen2003Muscleoperator= (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

Detailed Description

A class implementing a SIMM muscle.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

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.

Parameters:
aMuscle Thelen2003Muscle to be copied.
Thelen2003Muscle::~Thelen2003Muscle (  )  [virtual]

Destructor.


Member Function Documentation

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 *

Parameters:
aNormFiberLength Normalized length of the muscle fiber.
Returns:
The active force in the muscle fibers.
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

Parameters:
aActivation Activation of the muscle.
aActiveForce Active force in the muscle fibers.
aVelocityDependentForce Force value that depends on fiber velocity.
Returns:
The velocity of the muscle fibers.
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)

Parameters:
aNormFiberLength Normalized length of the muscle fiber.
Returns:
The passive force in the muscle fibers.
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

Parameters:
aNormTendonLength Normalized length of the tendon.
Returns:
The force in 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.

Parameters:
aActivation Activation of the muscle.
Returns:
The isometric force in the muscle.

Implements OpenSim::ActivationFiberLengthMuscle.

SimTK::Vector Thelen2003Muscle::computeStateVariableDerivatives ( const SimTK::State &  s  )  const [protected, virtual]

Compute the derivatives of the muscle states.

Parameters:
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.

Returns:
Pointer to a copy of this Thelen2003Muscle.

Implements OpenSim::ActivationFiberLengthMuscle.

void Thelen2003Muscle::copyData ( const Thelen2003Muscle aMuscle  ) 

Copy data members from one Thelen2003Muscle to another.

Parameters:
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.

Parameters:
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.

Returns:
Reference to this object.

Reimplemented from OpenSim::ActivationFiberLengthMuscle.

bool Thelen2003Muscle::setActivationTimeConstant ( double  aActivationTimeConstant  )  [virtual]

Set the time constant for ramping up of muscle force.

Parameters:
aActivationTimeConstant The time constant for ramping up of muscle force.
Returns:
Whether the time constant was successfully changed.
bool Thelen2003Muscle::setAf ( double  aAf  )  [virtual]

Set the force-velocity shape factor.

Parameters:
aAf The force-velocity shape factor.
Returns:
Whether the shape factor was successfully changed.
bool Thelen2003Muscle::setDamping ( double  aDamping  )  [virtual]

Set the damping factor related to maximum contraction velocity.

Parameters:
aDamping The damping factor related to maximum contraction velocity.
Returns:
Whether the damping factor was successfully changed.
bool Thelen2003Muscle::setDeactivationTimeConstant ( double  aDeactivationTimeConstant  )  [virtual]

Set the time constant for ramping down of muscle force.

Parameters:
aDeactivationTimeConstant The time constant for ramping down of muscle force.
Returns:
Whether the time constant was successfully changed.
bool Thelen2003Muscle::setFlen ( double  aFlen  )  [virtual]

Set the maximum normalized lengthening force.

Parameters:
aFlen The maximum normalized lengthening force.
Returns:
Whether the maximum normalized lengthening force was successfully changed.
bool Thelen2003Muscle::setFmaxMuscleStrain ( double  aFmaxMuscleStrain  )  [virtual]

Set the passive muscle strain due to maximum isometric muscle force.

Parameters:
aFmaxMuscleStrain The passive muscle strain due to maximum isometric muscle force.
Returns:
Whether the passive muscle strain was successfully changed.
bool Thelen2003Muscle::setFmaxTendonStrain ( double  aFmaxTendonStrain  )  [virtual]

Set the tendon strain due to maximum isometric muscle force.

Parameters:
aFmaxTendonStrain The tendon strain due to maximum isometric muscle force.
Returns:
Whether the tendon strain was successfully changed.
bool Thelen2003Muscle::setKshapeActive ( double  aKShapeActive  )  [virtual]

Set the shape factor for Gaussian active muscle force-length relationship.

Parameters:
aKShapeActive The shape factor for Gaussian active muscle force-length relationship.
Returns:
Whether the shape factor was successfully changed.
bool Thelen2003Muscle::setKshapePassive ( double  aKshapePassive  )  [virtual]

Set the shape factor for Gaussian passive muscle force-length relationship.

Parameters:
aKshapePassive The shape factor for Gaussian passive muscle force-length relationship.
Returns:
Whether the shape factor was successfully changed.
void Thelen2003Muscle::setup ( Model aModel  )  [protected, virtual]

Perform some set up functions that happen after the object has been deserialized or copied.

Parameters:
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.

Parameters:
aVmax The maximum contraction velocity of the fibers, in optimal fiber lengths per second.
Returns:
Whether the maximum contraction velocity was successfully changed.
bool Thelen2003Muscle::setVmax0 ( double  aVmax0  )  [virtual]

Set the maximum contraction velocity at low activation of the fibers, in optimal fiber lengths per second.

Parameters:
aVmax The maximum contraction velocity at low activation of the fibers, in optimal fiber lengths per second.
Returns:
Whether the maximum contraction velocity was successfully changed.

Member Data Documentation

Activation time constant.

double& OpenSim::Thelen2003Muscle::_af [protected]

Force-velocity shape factor.

Passive damping included in the force-velocity relationship.

Deactivation time constant.

double& OpenSim::Thelen2003Muscle::_flen [protected]

Maximum normalized lengthening force.

Passive muscle strain due to maximum isometric muscle force.

Tendon strain due to maximum isometric muscle force.

Shape factor for Gaussian active muscle force-length relationship.

Exponential shape factor for passive force-length relationship.

double& OpenSim::Thelen2003Muscle::_vmax [protected]
double& OpenSim::Thelen2003Muscle::_vmax0 [protected]

Max contraction velocity at low activation.

Max contraction velocity full activation in fiber lengths per second.

const int Thelen2003Muscle::STATE_ACTIVATION = 0 [static, protected]
const int Thelen2003Muscle::STATE_FIBER_LENGTH = 1 [static, protected]

The documentation for this class was generated from the following files:

Generated on Sun Sep 25 00:19:45 2011 for OpenSim by  doxygen 1.6.1