Page 1 of 1

Opensim Muscles Moment Extraction & Expression

Posted: Tue Apr 30, 2019 10:22 am
by alik
To whom it may concern,

I add a torque actuator to my model with tibia as a body A and femur as a body B. I am running RRA and then CMC to get torque that has been used by this actuator. I have some questions about this torque expression:
1) What is the reference frame for this TorqueActuator's expressed torque? What I know based on OpenSim API, it is expressed on femur's body coordinate called generalized coordinate of the knee joint. Is this correct or not?

2) To validate my results, I am getting joint moment from RRA and from AnalyzeTool, I am getting the MusclesMoment around the Knee Joint. Then we have: JointMoment [Knee Coordinate] = MusclesMoment[Knee Coordinate] + TorqueActuator_Moment[Knee Coordinate]
and since I have Joint Moment and muscles moment, I can easily derive the actuator's moment:
2.1) when we are extracting the MusclesMoment by Analyzetool, Are the muscle moment expressed on local coordinates like knee joint
coordinates or it is expressed based on global coordinates?

2.2) I was expecting the same TorqueActuator's moment which was derived by CMC directly, However, they have considerable differences.
I could not explain these differences between two torques which were expected to be the same. Could you please give me a
reasonable explanation on this difference?

I am looking forward to hearing from you as soon as possible,
Many thanks,
Ali.

Re: Opensim Muscles Moment Extraction & Expression

Posted: Wed May 01, 2019 2:54 pm
by alik
Dear All,
Since it is a little bit urgent for me, I would be very grateful if one of the OpenSim developers or someone who knows the OpenSim in advance can help me or guide to get the answer.
Sincerely,
Ali.

Re: Opensim Muscles Moment Extraction & Expression

Posted: Thu May 02, 2019 12:14 pm
by apoorvar
Hi Ali,

Thanks for your message. It seems you are aiming to compare the muscle-generated joint moments + your added torque-actuator-generated moments to the inverse dynamics moments for the same motion. I did something similar for a previous project. There are some scripts here that might be a good starting place for you. Check out the "ModelWithSampleSimulations" download; there is a 'scripts' folder that includes Matlab scripts to load results from a CMC or MuscleAnalysis, compute quantities like those you are interested in, and plot results. The README.pdf can help you navigate the various files.

Cheers,
Apoorva

Re: Opensim Muscles Moment Extraction & Expression

Posted: Mon May 06, 2019 5:03 am
by rodmateus
Hi Apoorva,

In your project, you call functions such as "setMassOfBodiesUsingRRAMassChange", or "setMaxContractionVelocityAllMuscles", but I cannot seem to find where they are defined. Are they available in the "ModelWithSampleSimulations" download ?

Thank you in advance,

Rodrigo Mateus