OpenSim::Delp1990Muscle Class Reference

A class implementing a SIMM muscle. More...

#include <Delp1990Muscle.h>

Inheritance diagram for OpenSim::Delp1990Muscle:
OpenSim::Muscle OpenSim::CustomActuator OpenSim::Actuator OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 Delp1990Muscle ()
 Default constructor.
 Delp1990Muscle (const Delp1990Muscle &aMuscle)
 Copy constructor.
virtual ~Delp1990Muscle ()
 Destructor.
virtual Objectcopy () const
 Copy this muscle point and return a pointer to the copy.
Delp1990Muscleoperator= (const Delp1990Muscle &aMuscle)
 Assignment operator.
virtual void initStateCache (SimTK::State &s, SimTK::SubsystemIndex subsystemIndex, Model &model)
 allocate and initialize the SimTK state for this acuator.
virtual void equilibrate (SimTK::State &state) const
void copyData (const Delp1990Muscle &aMuscle)
 Copy data members from one Delp1990Muscle to another.
virtual void copyPropertyValues (Actuator &aActuator)
 Copy the property values from another actuator, which may not be a Delp1990Muscle.
virtual double getMaxIsometricForce () const
 getMaxIsometricForce needs to be overridden by derived classes to be usable
virtual double getOptimalFiberLength () const
virtual double getTendonSlackLength () const
virtual double getPennationAngleAtOptimalFiberLength () const
virtual double getMaxContractionVelocity () const
virtual double getTimeScale () const
virtual double getMass () const
virtual bool setTimeScale (double aTimeScale)
 Set the scale factor for normalizing time.
virtual bool setActivation1 (double aActivation1)
 Set the time constant of ramping up of muscle force.
virtual bool setActivation2 (double aActivation2)
 Set the time constant of ramping up and ramping down of muscle force.
virtual bool setMaxIsometricForce (double aMaxIsometricForce)
 Set the maximum isometric force that the fibers can generate.
virtual bool setOptimalFiberLength (double aOptimalFiberLength)
 Set the optimal length of the muscle fibers.
virtual bool setTendonSlackLength (double aTendonSlackLength)
 Set the resting length of the tendon.
virtual bool setPennationAngle (double aPennationAngle)
 Set the angle between tendon and fibers at optimal fiber length.
virtual bool setMaxContractionVelocity (double aMaxContractionVelocity)
 Set the maximum contraction velocity of the fibers, in optimal fiber lengths per second.
virtual bool setMass (double aMass)
 Set the mass of the muscle.
virtual double getPennationAngle (const SimTK::State &) const
 Get the current pennation angle of the muscle fiber(s).
virtual double getNormalizedFiberLength (const SimTK::State &) const
 Get the normalized length of the muscle fiber(s).
virtual double getPassiveFiberForce (const SimTK::State &) const
 Get the passive force generated by the muscle fibers.
double getStress (const SimTK::State &s) const
 Compute stress.
virtual double getActivation (const SimTK::State &s) const
virtual void setActivation (SimTK::State &s, double activation) const
virtual double getActivationDeriv (const SimTK::State &s) const
virtual void setActivationDeriv (const SimTK::State &s, double activationDeriv) const
virtual double getFiberLength (const SimTK::State &s) const
virtual void setFiberLength (SimTK::State &s, double fiberLength) const
virtual double getFiberLengthDeriv (const SimTK::State &s) const
virtual void setFiberLengthDeriv (const SimTK::State &s, double fiberLengthDeriv) const
virtual double getFiberVelocity (const SimTK::State &s) const
virtual void setFiberVelocity (SimTK::State &s, double fiberVelocity) const
virtual double getFiberVelocityDeriv (const SimTK::State &s) const
virtual void setFiberVelocityDeriv (const SimTK::State &s, double fiberVelocityDeriv) const
virtual void setTendonForce (const SimTK::State &s, double aForce) const
virtual double getTendonForce (const SimTK::State &s) const
virtual void setActiveForce (const SimTK::State &s, double aForce) const
virtual double getActiveForce (const SimTK::State &s) const
virtual void setPassiveForce (const SimTK::State &s, double aForce) const
virtual double getPassiveForce (const SimTK::State &s) const
virtual void computeStateDerivatives (const SimTK::State &s)
 Compute the derivatives of the muscle states.
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.
virtual double computeIsometricForce (SimTK::State &s, double activation) const
 computeIsometricForce: this function finds the force in a muscle, assuming static equilibrium.
virtual double computeIsokineticForceAssumingInfinitelyStiffTendon (SimTK::State &s, double aActivation)
 Find the force produced by muscle under isokinetic conditions assuming an infinitely stiff tendon.
virtual void postScale (const SimTK::State &s, const ScaleSet &aScaleSet)
 Perform computations that need to happen after the muscle is scaled.
virtual void scale (const SimTK::State &s, const ScaleSet &aScaleSet)
 Scale the muscle.
virtual void setup (Model &aModel)
 Perform some set up functions that happen after the object has been deserialized or copied.
virtual FunctiongetActiveForceLengthCurve () const
 Get the active force-length curve.
virtual bool setActiveForceLengthCurve (Function *aActiveForceLengthCurve)
 Set the active force-length curve.
virtual FunctiongetPassiveForceLengthCurve () const
 Get the passive force-length curve.
virtual bool setPassiveForceLengthCurve (Function *aPassiveForceLengthCurve)
 Set the passive force-length curve.
virtual FunctiongetTendonForceLengthCurve () const
 Get the tendon force-length curve.
virtual bool setTendonForceLengthCurve (Function *aTendonForceLengthCurve)
 Set the tendon force-length curve.
virtual FunctiongetForceVelocityCurve () const
 Get the force-velocity curve.
virtual bool setForceVelocityCurve (Function *aForceVelocityCurve)
 Set the force-velocity curve.
 OPENSIM_DECLARE_DERIVED (Delp1990Muscle, Actuator)

Protected Attributes

PropertyDbl _timeScaleProp
 Scale factor for normalizing time.
double & _timeScale
PropertyDbl _activation1Prop
 Parameter used in time constant of ramping up of muscle force.
double & _activation1
PropertyDbl _activation2Prop
 Parameter used in time constant of ramping up and ramping down of muscle force.
double & _activation2
PropertyDbl _maxIsometricForceProp
 Maximum isometric force that the fibers can generate.
double & _maxIsometricForce
PropertyDbl _optimalFiberLengthProp
 Optimal length of the muscle fibers.
double & _optimalFiberLength
PropertyDbl _tendonSlackLengthProp
 Resting length of the tendon.
double & _tendonSlackLength
PropertyDbl _pennationAngleProp
 Angle between tendon and fibers at optimal fiber length.
double & _pennationAngle
PropertyDbl _maxContractionVelocityProp
 Maximum contraction velocity of the fibers, in optimal fiberlengths per second.
double & _maxContractionVelocity
PropertyDbl _massProp
 Mass between the tendon and muscle fibers.
double & _mass
PropertyObjPtr< Function_tendonForceLengthCurveProp
Function *& _tendonForceLengthCurve
PropertyObjPtr< Function_activeForceLengthCurveProp
Function *& _activeForceLengthCurve
PropertyObjPtr< Function_passiveForceLengthCurveProp
Function *& _passiveForceLengthCurve
PropertyObjPtr< Function_forceVelocityCurveProp
Function *& _forceVelocityCurve
SimTK::CacheEntryIndex _tendonForceIndex
SimTK::CacheEntryIndex _activeForceIndex
SimTK::CacheEntryIndex _passiveForceIndex

Detailed Description

A class implementing a SIMM muscle.

This implementation is based on muscle model 2 from the Dynamics Pipeline, but is modified slightly so that when fiber_velocity = 0.0, this model calculates lengths and forces that match SIMM's isometric calculations.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

Delp1990Muscle::Delp1990Muscle (  ) 

Default constructor.

Delp1990Muscle::Delp1990Muscle ( const Delp1990Muscle aMuscle  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

double Delp1990Muscle::computeActuation ( const SimTK::State &  s  )  const [virtual]

Compute the actuation for the muscle.

This function assumes that computeDerivatives has already been called.

Reimplemented from OpenSim::Muscle.

void Delp1990Muscle::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 Delp1990Muscle::computeIsokineticForceAssumingInfinitelyStiffTendon ( SimTK::State &  s,
double  aActivation 
) [virtual]

Find the force produced by muscle under isokinetic conditions assuming an infinitely stiff tendon.

That is, all the shortening velocity of the actuator (the musculotendon unit) is assumed to be due to the shortening of the muscle fibers alone. This methods calls computeIsometricForce and so alters the internal member variables of this muscle.

Note that the current implementation approximates the effect of the force-velocity curve. It does not account for the shortening velocity when it is solving for the equilibrium length of the muscle fibers. And, a generic representation of the force-velocity curve is used (as opposed to the implicit force-velocity curve assumed by this model.

Parameters:
aActivation Activation of the muscle.
Returns:
Isokinetic force generated by the actuator.

Implements OpenSim::Muscle.

double Delp1990Muscle::computeIsometricForce ( SimTK::State &  s,
double  aActivation 
) const [virtual]

computeIsometricForce: this function finds the force in a muscle, 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, fiber length, active force, and passive force.

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

Implements OpenSim::Muscle.

void Delp1990Muscle::computeStateDerivatives ( const SimTK::State &  s  )  [virtual]

Compute the derivatives of the muscle states.

Parameters:
rDYDT the state derivatives are returned here.

Reimplemented from OpenSim::Actuator.

Object * Delp1990Muscle::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 Delp1990Muscle.

Implements OpenSim::Muscle.

void Delp1990Muscle::copyData ( const Delp1990Muscle aMuscle  ) 

Copy data members from one Delp1990Muscle to another.

Parameters:
aMuscle Delp1990Muscle to be copied.

Reimplemented from OpenSim::Muscle.

void Delp1990Muscle::copyPropertyValues ( Actuator aActuator  )  [virtual]

Copy the property values from another actuator, which may not be a Delp1990Muscle.

Parameters:
aActuator Actuator to copy property values from.
void Delp1990Muscle::equilibrate ( SimTK::State &  state  )  const [virtual]

Reimplemented from OpenSim::Muscle.

virtual double OpenSim::Delp1990Muscle::getActivation ( const SimTK::State &  s  )  const [inline, virtual]

Implements OpenSim::Muscle.

virtual double OpenSim::Delp1990Muscle::getActivationDeriv ( const SimTK::State &  s  )  const [inline, virtual]
double Delp1990Muscle::getActiveForce ( const SimTK::State &  s  )  const [virtual]
Function * Delp1990Muscle::getActiveForceLengthCurve (  )  const [virtual]

Get the active force-length curve.

Returns:
Pointer to the active force-length curve (Function).
virtual double OpenSim::Delp1990Muscle::getFiberLength ( const SimTK::State &  s  )  const [inline, virtual]

Implements OpenSim::Muscle.

virtual double OpenSim::Delp1990Muscle::getFiberLengthDeriv ( const SimTK::State &  s  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getFiberVelocity ( const SimTK::State &  s  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getFiberVelocityDeriv ( const SimTK::State &  s  )  const [inline, virtual]
Function * Delp1990Muscle::getForceVelocityCurve (  )  const [virtual]

Get the force-velocity curve.

Returns:
Pointer to the force-velocity curve (Function).
virtual double OpenSim::Delp1990Muscle::getMass (  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getMaxContractionVelocity (  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getMaxIsometricForce (  )  const [inline, virtual]

getMaxIsometricForce needs to be overridden by derived classes to be usable

Reimplemented from OpenSim::Muscle.

double Delp1990Muscle::getNormalizedFiberLength ( const SimTK::State &  s  )  const [virtual]

Get the normalized length of the muscle fiber(s).

This is the current fiber length(s) divided by the optimal fiber length.

Parameters:
Current length of the muscle fiber(s).

Implements OpenSim::Muscle.

virtual double OpenSim::Delp1990Muscle::getOptimalFiberLength (  )  const [inline, virtual]
double Delp1990Muscle::getPassiveFiberForce ( const SimTK::State &  s  )  const [virtual]

Get the passive force generated by the muscle fibers.

Parameters:
Current active force of the muscle fiber(s).

Implements OpenSim::Muscle.

double Delp1990Muscle::getPassiveForce ( const SimTK::State &  s  )  const [virtual]
Function * Delp1990Muscle::getPassiveForceLengthCurve (  )  const [virtual]

Get the passive force-length curve.

Returns:
Pointer to the passive force-length curve (Function).
double Delp1990Muscle::getPennationAngle ( const SimTK::State &  s  )  const [virtual]

Get the current pennation angle of the muscle fiber(s).

Parameters:
Pennation angle.

Implements OpenSim::Muscle.

virtual double OpenSim::Delp1990Muscle::getPennationAngleAtOptimalFiberLength (  )  const [inline, virtual]

Implements OpenSim::Muscle.

double Delp1990Muscle::getStress ( const SimTK::State &  s  )  const [virtual]

Compute stress.

Reimplemented from OpenSim::Actuator.

double Delp1990Muscle::getTendonForce ( const SimTK::State &  s  )  const [virtual]
Function * Delp1990Muscle::getTendonForceLengthCurve (  )  const [virtual]

Get the tendon force-length curve.

Returns:
Pointer to the tendon force-length curve (Function).
virtual double OpenSim::Delp1990Muscle::getTendonSlackLength (  )  const [inline, virtual]
virtual double OpenSim::Delp1990Muscle::getTimeScale (  )  const [inline, virtual]
void Delp1990Muscle::initStateCache ( SimTK::State &  s,
SimTK::SubsystemIndex  subsystemIndex,
Model model 
) [virtual]

allocate and initialize the SimTK state for this acuator.

Reimplemented from OpenSim::Muscle.

OpenSim::Delp1990Muscle::OPENSIM_DECLARE_DERIVED ( Delp1990Muscle  ,
Actuator   
)

Reimplemented from OpenSim::CustomActuator.

Delp1990Muscle & Delp1990Muscle::operator= ( const Delp1990Muscle aMuscle  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Muscle.

void Delp1990Muscle::postScale ( const SimTK::State &  s,
const ScaleSet aScaleSet 
) [virtual]

Perform computations that need to happen after the muscle is scaled.

For this object, that entails comparing the musculotendon length before and after scaling, and scaling some of the force-generating properties a proportional amount.

Parameters:
aScaleSet XYZ scale factors for the bodies.

Reimplemented from OpenSim::Muscle.

void Delp1990Muscle::scale ( const SimTK::State &  s,
const ScaleSet aScaleSet 
) [virtual]

Scale the muscle.

Parameters:
aScaleSet XYZ scale factors for the bodies
Returns:
Whether or not the muscle was scaled successfully

Reimplemented from OpenSim::Muscle.

virtual void OpenSim::Delp1990Muscle::setActivation ( SimTK::State &  s,
double  activation 
) const [inline, virtual]

Implements OpenSim::Muscle.

bool Delp1990Muscle::setActivation1 ( double  aActivation1  )  [virtual]

Set the time constant of ramping up of muscle force.

Parameters:
aActivation1 The time constant of ramping up of muscle force.
Returns:
Whether the time constant was successfully changed.
bool Delp1990Muscle::setActivation2 ( double  aActivation2  )  [virtual]

Set the time constant of ramping up and ramping down of muscle force.

Parameters:
aActivation1 The time constant of ramping up and ramping down of muscle force.
Returns:
Whether the time constant was successfully changed.
virtual void OpenSim::Delp1990Muscle::setActivationDeriv ( const SimTK::State &  s,
double  activationDeriv 
) const [inline, virtual]
void Delp1990Muscle::setActiveForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Delp1990Muscle::setActiveForceLengthCurve ( Function aActiveForceLengthCurve  )  [virtual]

Set the active force-length curve.

Parameters:
aActiveForceLengthCurve Pointer to an active force-length curve (Function).
Returns:
Whether active force-length curve was successfully changed.
virtual void OpenSim::Delp1990Muscle::setFiberLength ( SimTK::State &  s,
double  fiberLength 
) const [inline, virtual]

Implements OpenSim::Muscle.

virtual void OpenSim::Delp1990Muscle::setFiberLengthDeriv ( const SimTK::State &  s,
double  fiberLengthDeriv 
) const [inline, virtual]
virtual void OpenSim::Delp1990Muscle::setFiberVelocity ( SimTK::State &  s,
double  fiberVelocity 
) const [inline, virtual]
virtual void OpenSim::Delp1990Muscle::setFiberVelocityDeriv ( const SimTK::State &  s,
double  fiberVelocityDeriv 
) const [inline, virtual]
bool Delp1990Muscle::setForceVelocityCurve ( Function aForceVelocityCurve  )  [virtual]

Set the force-velocity curve.

Parameters:
aForceVelocityCurve Pointer to a force-velocity curve (Function).
Returns:
Whether force-velocity curve was successfully changed.
bool Delp1990Muscle::setMass ( double  aMass  )  [virtual]

Set the mass of the muscle.

Parameters:
aMass The mass of the muscle.
Returns:
Whether the mass was successfully changed.
bool Delp1990Muscle::setMaxContractionVelocity ( double  aMaxContractionVelocity  )  [virtual]

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

Parameters:
aMaxContractionVelocity The maximum contraction velocity of the fibers, in optimal fiber lengths per second.
Returns:
Whether the maximum contraction velocity was successfully changed.
bool Delp1990Muscle::setMaxIsometricForce ( double  aMaxIsometricForce  )  [virtual]

Set the maximum isometric force that the fibers can generate.

Parameters:
aMaxIsometricForce The maximum isometric force that the fibers can generate.
Returns:
Whether the maximum isometric force was successfully changed.
bool Delp1990Muscle::setOptimalFiberLength ( double  aOptimalFiberLength  )  [virtual]

Set the optimal length of the muscle fibers.

Parameters:
aOptimalFiberLength The optimal length of the muscle fibers.
Returns:
Whether the optimal length was successfully changed.
void Delp1990Muscle::setPassiveForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Delp1990Muscle::setPassiveForceLengthCurve ( Function aPassiveForceLengthCurve  )  [virtual]

Set the passive force-length curve.

Parameters:
aPassiveForceLengthCurve Pointer to a passive force-length curve (Function).
Returns:
Whether passive force-length curve was successfully changed.
bool Delp1990Muscle::setPennationAngle ( double  aPennationAngle  )  [virtual]

Set the angle between tendon and fibers at optimal fiber length.

Parameters:
aPennationAngle The angle between tendon and fibers at optimal fiber length.
Returns:
Whether the angle was successfully changed.
void Delp1990Muscle::setTendonForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Delp1990Muscle::setTendonForceLengthCurve ( Function aTendonForceLengthCurve  )  [virtual]

Set the tendon force-length curve.

Parameters:
aTendonForceLengthCurve Pointer to a tendon force-length curve (Function).
Returns:
Whether tendon force-length curve was successfully changed.
bool Delp1990Muscle::setTendonSlackLength ( double  aTendonSlackLength  )  [virtual]

Set the resting length of the tendon.

Parameters:
aTendonSlackLength The resting length of the tendon.
Returns:
Whether the resting length was successfully changed.
bool Delp1990Muscle::setTimeScale ( double  aTimeScale  )  [virtual]

Set the scale factor for normalizing time.

Parameters:
aTimeScale The scale factor for normalizing time.
Returns:
Whether the scale factor was successfully changed.
void Delp1990Muscle::setup ( Model aModel  )  [virtual]

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

Parameters:
aModel model containing this Delp1990Muscle.

Reimplemented from OpenSim::Muscle.


Member Data Documentation

Parameter used in time constant of ramping up of muscle force.

Parameter used in time constant of ramping up and ramping down of muscle force.

SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_activeForceIndex [protected]
double& OpenSim::Delp1990Muscle::_mass [protected]

Mass between the tendon and muscle fibers.

Maximum contraction velocity of the fibers, in optimal fiberlengths per second.

Maximum isometric force that the fibers can generate.

Optimal length of the muscle fibers.

SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_passiveForceIndex [protected]

Angle between tendon and fibers at optimal fiber length.

SimTK::CacheEntryIndex OpenSim::Delp1990Muscle::_tendonForceIndex [protected]

Resting length of the tendon.

Scale factor for normalizing time.


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

Generated on Wed Dec 16 15:03:38 2009 for OpenSim by  doxygen 1.6.1