Page 1 of 1

Calculation of 3-D joint powers in OpenSim

Posted: Sun Sep 18, 2016 9:17 pm
by gavinl23
Hi All,

My goal is to determine 3-D joint powers for the ankle, knee, and hip using model 2392 and/or the recently released full body MSK model. After browsing through the forums (and biomch-l) I could not find any information on a conventional method to calculate 3-D lower-limb joint powers in OpenSim. I am aware of the method involving differentiation of joint angles from IK to get joint angular velocities and multiplying these with joint moments from ID, however I do not think this is the correct approach for analysis in 3-D. I am also aware of OpenSim probes, however we can only use inverse methods to drive the model.

If anyone has experience in this analysis with OpenSim then any advice/recommendations/papers would be greatly appreciated.

Regards,

Gavin.

Re: Calculation of 3-D joint powers in OpenSim

Posted: Mon Sep 19, 2016 12:48 am
by mitkof6
Hi,

You can add your probes through the GUI. There is a ActuatorPowerProbe and JointInternalPowerProbe.

http://simtk-confluence.stanford.edu:80 ... Sim/Probes

Then you can use the motion file generated through inverse kinematics along with the Analyze tool. Make sure to add a ProbeReporter in the Analyses tab.

Alternatively, you can use the Analyze tool, add Kinematics Analysis which will compute joint velocities. Then you have to post-process the simulation data.

Best

Re: Calculation of 3-D joint powers in OpenSim

Posted: Mon Sep 19, 2016 2:55 am
by bogert
Gavin,

That is indeed the correct approach in 3D. Opensim's joint moments are the generalized forces that drive the skeleton. These are the torques you would need on each joint axis to explain the observed motion. Therefore, work is by definition the joint moment times change in joint angle, and power is moment times angular velocity.

Interpretation if 3D joint moment and joint power is not as easy as in 2D, because you get power associated with each degree of freedom, and muscles span multiple degrees of freedom. That's one of the reasons why muscle force estimation is a good tool. Muscle force estimations depent on certain optimality assumptions, and joint moments don't.

There was a lengthy discussion on Biomch-L on how to define 3D joint torques in a Joint Coordinate System. Also a recent paper (http://www.ncbi.nlm.nih.gov/pubmed/24161796). I feel quite strongly that joint moments should be projected on the axes of the JCS (and not "decomposed". Opensim does the projection automatically.

Ton van den Bogert

Re: Calculation of 3-D joint powers in OpenSim

Posted: Sun Sep 25, 2016 4:35 pm
by gavinl23
Hi Dimitar and Ton,

Thank you both for your prompt and detailed responses. I will implement your suggestions in OpenSim.

Regards,

Gavin.

Re: Calculation of 3-D joint powers in OpenSim

Posted: Fri Oct 09, 2020 12:43 am
by sujash
Hi Ton,

I am trying to write my own code in MATLAB to know all the details how Opensim works. I have calculated joint angles using gait2354 model. As I am trying to calculate joint torques using inverse dynamics formulation, all flexion moments are matching well, but there seems to be a problem with adduction and rotation moment of hip joint. I found your reply in this thread, and then it struck me that I am calculating joint moments with respect to global frame. How can I convert these moments to Joint coordinate system? I have gone through the paper you suggested, but the definition of jcs is different from what opensim uses. Can you please suggest some tricks?

Thanks,
Sujash

Re: Calculation of 3-D joint powers in OpenSim

Posted: Wed Oct 14, 2020 7:58 am
by bogert
Sujash,

If you wrote your own Matlab code for inverse dynamics, the first issue is which coordinate system you used for the final 3D joint moments. Normally, if you solve the joint moments recursively (starting at the foot, then going up), you would normally get the joint moment as a 3D vector in the reference frame of the body segment below the joint.

Let's say you solved the ankle joint moment in a foot coordinate system. If you know the orientation of the subtalar joint axis in the foot coordinate system, you simply take the dot product of the 3D moment, and the 3D unit vector along the joint axis, to get the subtalar joint moment (a scalar). This is what I mean by "projection" of the joint moment on the joint axis.

In the Opensim model, you can find the orientation of the subtalar joint axis in the properties of "rotation1" in the subtalar joint: 0.78718 0.604747 -0.120949. This is the orientation of the subtalar axis in the calcaneus coordinate system (otherwise it would not be a constant).

The classic joint coordinate system (JCS) uses three axes in each joint, but Opensim does not do that (JCS does not represent muscle function very well). Between tibia and calcaneus, Opensim has two axes, the ankle joint rotation on an axis fixed in the tibia, and the subtalar joint rotation on an axis fixed in the calcaneus. To project the ankle torque on the ankle axis, you must first get the joint moment in the tibia coordinate system, which requires a coordinate transformation.

There are some other issues, but this should get you started in the right direction.

Ton