Help understanding muscle model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Marc Carmichael
Posts: 45
Joined: Thu Jul 16, 2009 2:50 am

Help understanding muscle model

Post by Marc Carmichael » Tue Aug 02, 2011 7:08 pm

Hello,

I am currently trying to replicate the calculations that OpenSim performs when computing muscle actuator force. My issue is that I keep getting results that differ from OpenSim, particularly at low levels of activation.

The model uses the Schutte1993Muscle actuator.

Firstly I put the model into a specific state and set muscle activations through the following API functions:

osimModel.getCoordinateSet().get(iGenCoords).setValue(si,Q); // set coordinate value
osimModel.getCoordinateSet().get(iGenCoords).setSpeedValue(si,Qd); // set coordinate speed
osimModel.getSimbodyEngine().projectConfigurationToSatisfyConstraints(si,0.01); // satisfy constraints
osimModel.getSystem().realize(si,SimTK::Stage::Velocity); // realize state
osimModel.computeEquilibriumForAuxiliaryStates(si); // compute equilibrium
osimModel.getMuscles().get(iMuscles[m]).setActivation(si,a[m]); // set muscle activations
osimModel.getMuscles().get(iMuscles[m]).computeEquilibrium(si); // equilibriate muscle

Next I calculate the actuator forces as follows:

OpenSim::Schutte1993Muscle& muscle = dynamic_cast<OpenSim::Schutte1993Muscle&>(osimModel.getMuscles().get(iMuscles[m])); // create reference to muscle

F[m] = muscle.getForce(si); // calculate force of muscle actuator

Lastly I get the internal state of the actuator using the following:

muscle.getLength(si);
muscle.getFiberLength(si);
muscle.getTendonLength(si);
muscle.getNormalizedFiberLength(si);
muscle.getPennationAngle(si);
muscle.getActiveForceLengthCurve()->calcValue(lnom);
muscle.getPassiveForceLengthCurve()->calcValue(lnom);
muscle.getTendonForceLengthCurve()->calcValue(ltnom);
muscle.evaluateForceLengthVelocityCurve(muscle.getActivation(si),muscle.getNormalizedFiberLength(si),0);
muscle.getActivation(si);
muscle.getForce(si);
muscle.getPassiveForce(si);
muscle.getFiberForce(si);
muscle.getActiveFiberForce(si);
muscle.getPassiveFiberForce(si);
muscle.getActiveFiberForceAlongTendon(si);
muscle.getPassiveFiberForceAlongTendon(si);
muscle.getAppliedForce(si);
muscle.getDamping();
muscle.getMaxContractionVelocity();
muscle.getMaxControl();
muscle.getMinControl();
muscle.getTendonForce(si);
muscle.getExcitation(si);




When I tried to replicate the calculate outside of OpenSim I was getting different results. That's when I started analysing the actuator parameters OpenSim returned and now I am confused. What I find is that OpenSim's tendon force does not equal its computed muscle fibre force.


For example, I compute the following

TendonForce = TendonForceLengthValue(from opensim) * MaxIsometricForce(from opensim)
ActiveFibreForce = ActiveForceLengthValue(from opensim) * activation(from opensim) * MaxIsometricForce(from opensim)
PassiveFibreForce = PassiveForceLengthValue(from opensim) * MaxIsometricForce(from opensim)

But then I find TendonForce != (ActiveFibreForce+PassiveFibreForce). TendonForce matches the OpenSim result. But the fibre forces do not. Can anyone shed some light on what might be happening. I have considered pennation but the muscle has none. I have considered velocity effects but the result should be isometric. I am stumped.

Sorry for the long question, thanks in advance

Marc

POST REPLY