Muscle forces computation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Joanne Becker
Posts: 4
Joined: Fri Jun 22, 2018 2:43 am

Muscle forces computation

Post by Joanne Becker » Fri Sep 21, 2018 7:54 am

Hi,
I am currently working on an opensim model and I was wondering how OPENSIM does calculate the muscle forces and activation? What are the formulas behind the results given by static optimization?

Thank you a lot

Tags:

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

Re: Muscle forces computation

Post by Thomas Uchida » Fri Sep 21, 2018 8:19 am

how OPENSIM does calculate the muscle forces and activation?
Please see the links and references on the "Muscle Model Theory and Publications" page in the Confluence documentation (https://simtk-confluence.stanford.edu/d ... blications).
What are the formulas behind the results given by static optimization?
Some information can be found here: "How Static Optimization Works", https://simtk-confluence.stanford.edu/d ... tion+Works.

User avatar
Joanne Becker
Posts: 4
Joined: Fri Jun 22, 2018 2:43 am

Re: Muscle forces computation

Post by Joanne Becker » Mon Sep 24, 2018 12:37 am

Thank you Thomas!

User avatar
Luis Figueredo
Posts: 5
Joined: Tue Nov 20, 2018 3:10 am

Re: Muscle forces computation

Post by Luis Figueredo » Fri Nov 23, 2018 9:45 am

Thomas, please apologize for my ignorance on the matter, my background is control/robotics :mrgreen:
But, I was looking at the static optimization equations and it does seem to me that it only depends on the (i) joint torque, (ii) max. isometric force of each muscle, and (iii) the moment arm between a muscle and a given joint. Does that make sense?
And,
1) Is the max. isometric force of each muscle constant (or does it depends on the joint position, or action (flexion or extension))?
2) Given a joint X, I assume that not all N-muscles are acting over that joint. Does the Static Optimization consider that (or it considers all N-muscles in the model for the optimization)? If so, how can I know which muscles are acting on a given joint?

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

Re: Muscle forces computation

Post by Thomas Uchida » Fri Nov 23, 2018 11:58 am

Is the max. isometric force of each muscle constant (or does it depends on the joint position, or action (flexion or extension))?
Maximum isometric force is a (constant) parameter (called a "property" in OpenSim; see the Muscle class https://simtk.org/api_docs/opensim/api_ ... uscle.html). The force generated by a muscle is a function of its (constant) properties as well as its (time-varying) activation, fiber length, and fiber velocity. Please see the following:
- Zajac, F.E. (1989) Muscle and tendon: properties, models, scaling, and application to biomechanics and motor control. Critical Reviews in Biomedical Engineering, 17(4):359-411. http://europepmc.org/abstract/MED/2676342
- Millard, M., Uchida, T., Seth, A., Delp, S.L. (2013) Flexing computational muscle: modeling and simulation of musculotendon dynamics. ASME Journal of Biomechanical Engineering, 135(2):021005. http://nmbl.stanford.edu/publications/p ... rd2013.pdf
how can I know which muscles are acting on a given joint?
It depends what you mean by "acting on". In general, muscles accelerate joints they do not span. See Zajac, "Muscle coordination of movement: a perspective" (https://simtk.org/docman/view.php/284/908/Zajac1993.pdf).

User avatar
Luis Figueredo
Posts: 5
Joined: Tue Nov 20, 2018 3:10 am

Re: Muscle forces computation

Post by Luis Figueredo » Fri Nov 23, 2018 1:55 pm

Hi Thomas,
Let me first thank you very much for the time, the help and the references! Particularly, Zajac (1989) help me a lot to understand a bit better the mechanism. :)

I have an initial application where the upper limb is statical (resisting an external force but without any motion).
From the joint config., I can get all the joint torques. Now, I was looking for to compute the muscles activations.

In this case, I believe the static optimization does not use the fiber length and fiber velocity information. Does that makes sense?
For instance, I could use lsqlin, in Matlab, to compute the activation since I have the (i) torque, (ii) max. force (constant) and (iii) the moment arm (that depends on the joint config.), is that right?
Finally, if I could isolate one joint torque to analyze (e.g., the "shoulder elevation" joint), I can see that some muscles have zero moment arm w.r.t. to the joint (e.g., "extensor pollicis longus") which implies that the muscle does not require activation. Is that a proper way to state the muscle is not directly acting on the joint (could I assume the same (zero moment arm) for instance for a leg muscle w.r.t. to shoulder elevation)?

Thank you!

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

Re: Muscle forces computation

Post by Thomas Uchida » Wed Nov 28, 2018 3:55 am

I could use lsqlin, in Matlab, to compute the activation since I have the (i) torque, (ii) max. force (constant) and (iii) the moment arm (that depends on the joint config.), is that right?
You could, but unless I'm misunderstanding your algorithm, it seems that you would be ignoring the dependence of muscle force on the length of the fibers. https://simtk.org/api_docs/opensim/api_ ... ml#details

User avatar
Luis Figueredo
Posts: 5
Joined: Tue Nov 20, 2018 3:10 am

Re: Muscle forces computation

Post by Luis Figueredo » Wed Nov 28, 2018 9:30 am

Hi Thomas,
Thank you for the feedback.
I think I was indeed neglecting the force-length-velocity dependency. Although having zero velocity, joint positions define different fiber-lengths and thus different tendon forces, is that right? The algorithm I wrote was using the ideal force generators from https://simtk-confluence.stanford.edu/d ... tion+Works, right?

Now, to consider the force-length-velocity dependency, is it suffice to use " getActuation(state); " instead of get_max_isometric_force?

Code: Select all

% for each muscle "x"
for all muscles x
   % Rough estimative of activation 
   muscles.get(x).setActivation(state, 1);
   %  To be honest, I don't know exactly the fct safeDownCast does
   afl = ActivationFiberLengthMuscle.safeDownCast(muscles.get(x));
   % Getting the fiber-length, and then resetting the group of muscles to equilibrium
   initfiber(x) = afl.getFiberLength(state);
end
model.equilibrateMuscles(state);
Then for each muscle, I am getting the

Code: Select all

% Moment arm
r(x) = muscles.get(x).computeMomentArm(state, joint_coordinate);
% Muscle Force given the equilibrium
f(x) = muscles.get(x).curmuscle.getActuation(state);
And then combine this information with the torque to compute the activation using lsqlin.
Does that make sense?
The curve looks extremely similar to the one obtained directly from opensim-gui using static optimization, but I wanted to be sure it is not just a coincidence or if I am missing something important here.

Again, thank you very very much for the time and help Thomas! :)

User avatar
wish lock
Posts: 2
Joined: Sun Feb 16, 2020 1:47 pm

Re: Muscle forces computation

Post by wish lock » Sun Feb 16, 2020 1:47 pm

Thanks for discussing it.

POST REPLY