Page 1 of 1
Muscle forces computation
Posted: Fri Sep 21, 2018 7:54 am
by joannebecker
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
Re: Muscle forces computation
Posted: Fri Sep 21, 2018 8:19 am
by tkuchida
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.
Re: Muscle forces computation
Posted: Mon Sep 24, 2018 12:37 am
by joannebecker
Thank you Thomas!
Re: Muscle forces computation
Posted: Fri Nov 23, 2018 9:45 am
by figueredo
Thomas, please apologize for my ignorance on the matter, my background is control/robotics
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?
Re: Muscle forces computation
Posted: Fri Nov 23, 2018 11:58 am
by tkuchida
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).
Re: Muscle forces computation
Posted: Fri Nov 23, 2018 1:55 pm
by figueredo
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!
Re: Muscle forces computation
Posted: Wed Nov 28, 2018 3:55 am
by tkuchida
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
Re: Muscle forces computation
Posted: Wed Nov 28, 2018 9:30 am
by figueredo
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!
Re: Muscle forces computation
Posted: Sun Feb 16, 2020 1:47 pm
by wishlock99
Thanks for discussing it.