Thelen muscle model understanding : fiber and tendon length

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
David André Gomez Romero
Posts: 6
Joined: Wed Mar 06, 2019 2:47 am

Thelen muscle model understanding : fiber and tendon length

Post by David André Gomez Romero » Wed Jun 26, 2019 3:00 am

Hello,

I try to understand the Muscle structure used in OpenSim. After some research I found that the Thelen 2003 Muscle Model is used. In this model, the length of the Tendon or of the Fiber-muscle need to be known. My problem is to understand how this two values are calculated ?

I did some research on the code : https://github.com/opensim-org/opensim- ... e.cpp#L251


And we can see that the fiber muscle is then calculated based on the total length of the muscle( muscleLength) and the tendon slack length (tendonSlackLength). So it is assumed that the tendon length will never change, if it is the case the tendon is then assumed infinitely rigid. and the Thelen Model is not used correctly.

Thanks for the help.

Tags:

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by Thomas Uchida » Wed Jun 26, 2019 8:05 am

The line of code you are pointing to is in the Thelen2003Muscle::calcInextensibleTendonActiveFiberForce() method which, as its name suggests, is used when the tendon is rigid. You are probably looking for Thelen2003Muscle::calcMuscleLengthInfo(), which calls calcTendonLength() (a method in the pennation model) on line 402: https://github.com/opensim-org/opensim- ... e.cpp#L402. Here's the implementation of MuscleFixedWidthPennationModel::calcTendonLength(): https://github.com/opensim-org/opensim- ... l.cpp#L145. The "Muscle Model Theory and Publications" pages in the Confluence documentation and the papers they reference may also be helpful: https://simtk-confluence.stanford.edu:8 ... blications.

User avatar
David André Gomez Romero
Posts: 6
Joined: Wed Mar 06, 2019 2:47 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by David André Gomez Romero » Wed Jun 26, 2019 9:44 am

Thanks a lot for the answer.

You are right, I was considering the wrong line. But still, I don't understand how the length of the Tendon or of the Fiber-muscle are calculated. If I consider this line:
https://github.com/opensim-org/opensim- ... e.cpp#L402. The function calcTendonLength need the parameter fiberLength. It remains then only this parameter as unknown for me.

If I understand well the publication, using Newton's third law (Force at tendon is equal to the Force in the fiber projected by the pennation angle), maybe I can obtain this information of the fiber length ? It would be very interesting to see where in the code and how they take this information.

Please correct me if I'm wrong.

Thanks again.

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by Thomas Uchida » Wed Jun 26, 2019 12:59 pm

But still, I don't understand how the length of the Tendon or of the Fiber-muscle are calculated.
Fiber length is a state (see line 390: https://github.com/opensim-org/opensim- ... e.cpp#L390). You can find more information in the relevant documentation and papers, including the following:
- Millard, M., Uchida, T., Seth, A., Delp, S.L. Flexing computational muscle: modeling and simulation of musculotendon dynamics. ASME Journal of Biomechanical Engineering 135(2):021005, 2013. https://nmbl.stanford.edu/publications/ ... rd2013.pdf
- The API Guide in the developer documentation: https://simtk.org/api_docs/opensim/api_ ... Guide.html

User avatar
David André Gomez Romero
Posts: 6
Joined: Wed Mar 06, 2019 2:47 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by David André Gomez Romero » Thu Jun 27, 2019 6:45 am

Fiber length is a state
Fiber length is a state if we derive the activation term (a) from an Activation Dynamics. Once found 'a', we can then compute the fiber length (lm) (see https://nmbl.stanford.edu/publications/ ... rd2013.pdf.

In my case I'm trying to use a Static Opimization instead of Activation Dynamics to find 'a' and we can read the following remark (here https://simtk-confluence.stanford.edu:8 ... tion+Works):
Note that for static optimization f(F0m,lm,vm) computes the active fiber force along the tendon assuming an inextensible tendon and does not include contribution from muscles' parallel elastic element.
.

Then if the tendon is inextensible, the fiber length at every time step is found easily (Lengt fiber = Total Length - TendonSlackLength). Now If I try to respect the Hills-model :
  • Is it possible now to consider the Tendon as extensible in the StaticOpimization ?
  • If yes, how the length of the fiber could then be calculated if the fiber length himself depends also of the activation term ? If you know where it is implemented it would be very helpfull

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by Thomas Uchida » Thu Jun 27, 2019 7:38 am

In my case I'm trying to use a Static Opimization
Thank you for providing this information. Static assumes the tendon is inextensible. There are other ways of solving the problem -- two strategies you might want to investigate are writing your own solver (in C++, Matlab, or Python) and using the CMC Tool.

User avatar
David André Gomez Romero
Posts: 6
Joined: Wed Mar 06, 2019 2:47 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by David André Gomez Romero » Thu Jun 27, 2019 8:51 am

So in the StaticOptimization, according to this :
Note that for static optimizationf(F0m,lm,vm) computes the active fiber force along the tendon assuming an inextensible tendon and does not include contribution from muscles' parallel elastic element.
.

The tendon is consider inextensible and the parallel element is not consider. Only active force is considered so now I'm quite confused, for two reasons :

1) I'm doing a static optimization using the model
and this model do a flexion motion. Based on the XML-file (.osim) of the model, the class name use for the muscles is << Thelen2003Muscle >> . In the section -->help -->xml broswer of OpenSim, we can read :

[/code]<!--Compute muscle dynamics ignoring tendon compliance. Tendon is assumed to be rigid.-->
<ignore_tendon_compliance>false</ignore_tendon_compliance>
[/code]

So if it is false the stiffness is considered but on StaticOpimization page they say that the tendon is rigid... isn't it a contraddiction?

2) I also changed the masses of the model to see what happend. I put for each body a very low mass (0.00001kg) and for such a low value I was expecting practically no JRFs for L5/S1 until T12/L1. Instead, I obtained JRF values that are quite high (between 200N to 400N). First I thought that was coming from the passive force of the muscle but in the page of the StaticOpimization they claime to not include the passive element. So it is not clear where these high JRFs come from... do you have any suggestions???

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Thelen muscle model understanding : fiber and tendon length

Post by Thomas Uchida » Thu Jun 27, 2019 9:39 am

So if it is false the stiffness is considered but on StaticOpimization page they say that the tendon is rigid... isn't it a contraddiction?
The ignore_tendon_compliance flag in the muscle model makes the tendon rigid regardless of which Tool you are using. As explained on the "How Static Optimization Works" page (https://simtk-confluence.stanford.edu:8 ... tion+Works), in the "Working with Static Optimization" example (https://simtk-confluence.stanford.edu:8 ... timization), etc., the SO Tool ignores tendon compliance for all muscles. The description "Compute muscle dynamics ignoring tendon compliance" is not contradictory because the SO Tool is not computing muscle dynamics (hence, static optimization).

POST REPLY