OpenSim::Schutte1993Muscle Class Reference

A class implementing a SIMM muscle. More...

#include <Schutte1993Muscle.h>

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

List of all members.

Public Member Functions

 Schutte1993Muscle ()
 Default constructor.
 Schutte1993Muscle (const std::string &aName, double aMaxIsometricForce, double aOptimalFiberLength, double aTendonSlackLength, double aPennationAngle)
 Constructor.
 Schutte1993Muscle (const Schutte1993Muscle &aMuscle)
 Copy constructor.
virtual ~Schutte1993Muscle ()
 Destructor.
virtual Objectcopy () const
 Copy this muscle point and return a pointer to the copy.
Schutte1993Muscleoperator= (const Schutte1993Muscle &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 Schutte1993Muscle &aMuscle)
 Copy data members from one Schutte1993Muscle to another.
virtual void copyPropertyValues (Actuator &aActuator)
 Copy the property values from another actuator, which may not be a Schutte1993Muscle.
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 getDamping () 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 setDamping (double aDamping)
 Set the damping factor related to maximum contraction velocity.
virtual double getDamping ()
virtual double getPennationAngle (const SimTK::State &s) const
 Get the current pennation angle of the muscle fiber(s).
virtual double getNormalizedFiberLength (const SimTK::State &s) const
 Get the normalized length of the muscle fiber(s).
virtual double getPassiveFiberForce (const SimTK::State &s) 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 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)
 Get the passive force-length curve.
virtual FunctiongetTendonForceLengthCurve () const
 Get the tendon force-length curve.
virtual bool setTendonForceLengthCurve (Function *aTendonForceLengthCurve)
 Get the tendon force-length curve.
virtual FunctiongetForceVelocityCurve () const
 Get the force-velocity curve.
virtual bool setForceVelocityCurve (Function *aForceVelocityCurve)
 Get the force-velocity curve.
 OPENSIM_DECLARE_DERIVED (Schutte1993Muscle, 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 _dampingProp
 Damping factor related to maximum contraction velocity.
double & _damping
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

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

Schutte1993Muscle::Schutte1993Muscle (  ) 

Default constructor.

Schutte1993Muscle::Schutte1993Muscle ( const std::string &  aName,
double  aMaxIsometricForce,
double  aOptimalFiberLength,
double  aTendonSlackLength,
double  aPennationAngle 
)

Constructor.

Schutte1993Muscle::Schutte1993Muscle ( const Schutte1993Muscle aMuscle  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

double Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::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, _fiberLength, _activeForce, and _passiveForce.

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

Implements OpenSim::Muscle.

void Schutte1993Muscle::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 * Schutte1993Muscle::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 Schutte1993Muscle.

Implements OpenSim::Muscle.

void Schutte1993Muscle::copyData ( const Schutte1993Muscle aMuscle  ) 

Copy data members from one Schutte1993Muscle to another.

Parameters:
aMuscle Schutte1993Muscle to be copied.

Reimplemented from OpenSim::Muscle.

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

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

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

Reimplemented from OpenSim::Muscle.

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

Implements OpenSim::Muscle.

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

Get the active force-length curve.

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

Implements OpenSim::Muscle.

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

Get the force-velocity curve.

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

getMaxIsometricForce needs to be overridden by derived classes to be usable

Reimplemented from OpenSim::Muscle.

double Schutte1993Muscle::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::Schutte1993Muscle::getOptimalFiberLength (  )  const [inline, virtual]
double Schutte1993Muscle::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 Schutte1993Muscle::getPassiveForce ( const SimTK::State &  s  )  const [virtual]
Function * Schutte1993Muscle::getPassiveForceLengthCurve (  )  const [virtual]

Get the passive force-length curve.

Returns:
Pointer to the passive force-length curve (Function).
double Schutte1993Muscle::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::Schutte1993Muscle::getPennationAngleAtOptimalFiberLength (  )  const [inline, virtual]

Implements OpenSim::Muscle.

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

Compute stress.

Reimplemented from OpenSim::Actuator.

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

Get the tendon force-length curve.

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

allocate and initialize the SimTK state for this acuator.

Reimplemented from OpenSim::Muscle.

OpenSim::Schutte1993Muscle::OPENSIM_DECLARE_DERIVED ( Schutte1993Muscle  ,
Actuator   
)

Reimplemented from OpenSim::CustomActuator.

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

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Muscle.

void Schutte1993Muscle::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 Schutte1993Muscle::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::Schutte1993Muscle::setActivation ( SimTK::State &  s,
double  activation 
) const [inline, virtual]

Implements OpenSim::Muscle.

bool Schutte1993Muscle::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 Schutte1993Muscle::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::Schutte1993Muscle::setActivationDeriv ( const SimTK::State &  s,
double  activationDeriv 
) const [inline, virtual]
void Schutte1993Muscle::setActiveForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Schutte1993Muscle::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.
bool Schutte1993Muscle::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.
virtual void OpenSim::Schutte1993Muscle::setFiberLength ( SimTK::State &  s,
double  fiberLength 
) const [inline, virtual]

Implements OpenSim::Muscle.

virtual void OpenSim::Schutte1993Muscle::setFiberLengthDeriv ( const SimTK::State &  s,
double  fiberLengthDeriv 
) const [inline, virtual]
bool Schutte1993Muscle::setForceVelocityCurve ( Function aForceVelocityCurve  )  [virtual]

Get the force-velocity curve.

Parameters:
aForceVelocityCurve Pointer to a force-velocity curve (Function).
Returns:
Whether force-velocity curve was successfully changed.
bool Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::setPassiveForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Schutte1993Muscle::setPassiveForceLengthCurve ( Function aPassiveForceLengthCurve  )  [virtual]

Get 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 Schutte1993Muscle::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 Schutte1993Muscle::setTendonForce ( const SimTK::State &  s,
double  aForce 
) const [virtual]
bool Schutte1993Muscle::setTendonForceLengthCurve ( Function aTendonForceLengthCurve  )  [virtual]

Get 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 Schutte1993Muscle::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 Schutte1993Muscle::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 Schutte1993Muscle::setup ( Model aModel  )  [virtual]

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

Parameters:
aModel model containing this Schutte1993Muscle.

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::Schutte1993Muscle::_activeForceIndex [protected]

Damping factor related to maximum contraction velocity.

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::Schutte1993Muscle::_passiveForceIndex [protected]

Angle between tendon and fibers at optimal fiber length.

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

Resting length of the tendon.

Scale factor for normalizing time.

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

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