Moment arm calculation of OpenSim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Junnan Li
Posts: 7
Joined: Thu Apr 22, 2021 3:38 am

Moment arm calculation of OpenSim

Post by Junnan Li » Sun Sep 01, 2024 8:17 am

Hi community,

I am curious about how the OpenSim calculates the moment arm of muscles with wrapping surfaces. I somehow can not find the code or specific paper that mentioned a bit more details.
Could someone guide me to the code or paper that may help me find it out?

Thanks

Best regard,
Junnan Li

Tags:

User avatar
Mohammadreza Rezaie
Posts: 401
Joined: Fri Nov 24, 2017 12:48 am

Re: Moment arm calculation of OpenSim

Post by Mohammadreza Rezaie » Tue Sep 03, 2024 5:18 am

Hi, the following paper and the MATLAB example might help:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4404026/
https://github.com/opensim-org/opensim- ... FLCurves.m
You can also search for MomentArmSolver and the relevant methods in the source code (https://github.com/opensim-org/opensim-core).
Hope this helps.

User avatar
Ton van den Bogert
Posts: 166
Joined: Thu Apr 27, 2006 11:37 am

Re: Moment arm calculation of OpenSim

Post by Ton van den Bogert » Tue Sep 03, 2024 7:43 am

The paper cited by Mohammadreza is very good, but there is one error in the paper that I would like to point out (in case it causes confusion). When a model has moving muscle points, the paper says that equation (1) should be used instead of equation (3). This is, however, not correct. Equation (3) is ALWAYS the correct moment arm: moment arm for degree of freedom k is the partial derivative of muscle path length L with respect to the generalized coordinate k: r = dL/dq_k.

This came to light after the paper was written, when someone compared quadriceps moment arm between two versions of the same leg model. One version had a patella that moved as a function of knee flexion (as in Delp's original leg model), and the other had no patella but a moving insertion point with exactly the same motion as a function of knee flexion. The moment arms should be the same, but they were not. I believe this was in OpenSim 3.2.

See viewtopicPhpbb.php?f=91&t=4479 for details.

In November 2013, I had a long email correspondence with Ajay Seth and Michael Sherman on this. They agreed, the moment arm calculation code was corrected and subsequent versions of OpenSim now have a correct moment arm calculation using equation (3) for all types of muscle path, including models with moving muscle points.

I attach my original email, in case anyone wants to read a more detailed explanation.
moment arms and moving muscle points.pdf
(143.86 KiB) Downloaded 20 times
.

Ton van den Bogert

User avatar
Mohammadreza Rezaie
Posts: 401
Joined: Fri Nov 24, 2017 12:48 am

Re: Moment arm calculation of OpenSim

Post by Mohammadreza Rezaie » Tue Sep 03, 2024 8:02 am

Thanks a lot for the correction. I wonder why there is no corrigendum for that paper.

User avatar
Junnan Li
Posts: 7
Joined: Thu Apr 22, 2021 3:38 am

Re: Moment arm calculation of OpenSim

Post by Junnan Li » Thu Sep 05, 2024 1:37 am

Hi Mohammadreza,

Thanks for the recommendation of the paper. I have also checked the paper, and I agree with Ton van den Bogert's point that according to the virtual work principle, equation 3 should be correct.

I also notice that they have mentioned the analytical expression of the dl/dq is hard to derive, therefore, they use generalized force method to calculate moment arm and stated that they can easily calculate T matrix (transferring muscle tension to spatial force).
As I understood, for a straight-line muscle path, it is easy to calculate the matrix T. When it comes to a geodesic path over the obstacle, I don't see the formulation or proof that the matrix T can be derived easily.

Please tell me if I miss something.

Junnan

POST REPLY