Joint reaction analysis

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Michele Baldoni
Posts: 18
Joined: Sat Sep 19, 2015 10:53 am

Joint reaction analysis

Post by Michele Baldoni » Thu Jun 02, 2016 11:27 am

Hi,

Is it possible to perform a Joint reaction analysis including the forces exerted by ligaments?

Thanks,

Michele

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Joint reaction analysis

Post by Dimitar Stanev » Thu Jun 02, 2016 11:53 pm

Hi,

The joint reaction analysis uses a force storage, which usually contains the forces applied to the bodies at each time step. These forces are used along with the kinematics in the solution of the 6D Newton-Euler equations to compute the joint reaction forces beginning with the most distal body and propagating to the most proximal. If you supply the force file that contains forces applied by the ligaments, then they should be accounted in the joint reaction analysis. Although, I am not sure if, during Static Optimization ligament forces are ignored.

Best

User avatar
Michele Baldoni
Posts: 18
Joined: Sat Sep 19, 2015 10:53 am

Re: Joint reaction analysis

Post by Michele Baldoni » Fri Jun 03, 2016 8:31 am

Hello Jim,

thank you for your reply. Actually I was asking because I run the Static Optimization on a model with ligaments, the results include ligaments forces, and their value is coherent with what I expected based on the properties I have defined. The problem is that when I input the force file resulting from Static Optimization to the Joint reaction analysis, I get this warning:

"WARNING: The forces file contains actuators that are not in the model's actuator set."

And then the results from Joint Reaction are not consistent with what expected; it looks to me as though the analysis ignores the muscle forces. In fact, I made some tests: if I set a PCSA force for all ligaments equal to 0, they produce 0 force in Static Optimization, so I expected the results of Joint reaction to be equal to the case in which I completely disable the ligaments. Instead, with ligaments disabled, I get reasonable Joint reaction forces, and no warning during the analysis, while when I enable the ligaments setting a PCSA force of 0, I get inconsistent joint forces (for example, for the same joint I get 1040 N without ligaments and 200 N with ligaments having PCSA=0).
Also, I manually modified the force file output by Static Optimization: the original one included one column for each muscle and ligament, with ligaments listed first. If I edit the column putting the muscles first, and then input the modified file into Joint Reaction analysis, I get completely different results (close to the 1040 N caused by muscle forces). My conclusion is that the analysis recognizes that the model includes only 4 actuators (4 muscles), while the force file includes 4 muscles + 5 ligaments = 9 actuators. Therefore it prints the warning and then only considers the first 4 columns of the force file.

Could it be the case? Do you have any idea on how to proceed, like making OpenSim recognize the ligaments as actuators, or force the Joint Reaction analysis to consider all the forces in the file? I may also expose the problem to the developers...

Many thanks!

Best,

Michele

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Joint reaction analysis

Post by Dimitar Stanev » Sat Jun 04, 2016 5:36 am

Hi,
"WARNING: The forces file contains actuators that are not in the model's actuator set."
Did you use reserve actuators in your SO analysis?

Instead, with ligaments disabled, I get reasonable Joint reaction forces, and no warning during the analysis, while when I enable the ligaments setting a PCSA force of 0, I get inconsistent joint forces (for example, for the same joint I get 1040 N without ligaments and 200 N with ligaments having PCSA=0).
The current ligament model need revision, maybe you need to adapt the behavior of the ligament that you use. You can try implement your custom ligament. I had this done some time ago.

https://simtk.org/frs/?group_id=1036
My conclusion is that the analysis recognizes that the model includes only 4 actuators (4 muscles), while the force file includes 4 muscles + 5 ligaments = 9 actuators. Therefore it prints the warning and then only considers the first 4 columns of the force file.

Could it be the case? Do you have any idea on how to proceed, like making OpenSim recognize the ligaments as actuators, or force the Joint Reaction analysis to consider all the forces in the file? I may also expose the problem to the developers...
If the ligaments are not recognized, then I would suggest you to add muscles instead and used them as passive elements in your analysis and adjust their passive force properties to match the ligaments.

Best

User avatar
Michele Baldoni
Posts: 18
Joined: Sat Sep 19, 2015 10:53 am

Re: Joint reaction analysis

Post by Michele Baldoni » Sat Jun 04, 2016 9:12 pm

Hello Jim,

No, I did not use any reserve actuator.
Thank you for the reference to your work with ligaments; I think, though, that the problem is that OpenSim does not categorize ligaments as actuators, and therefore does not recognize them in the Joint Reaction analysis. The use of passive muscles that you suggest may be an effective workaround, indeed. But I am not able to define a custom passive muscle. Do you happen to know any step by step guide or any model implementing that from which I can extract what I need, by any chance?

Thank you again!

Best regards,

Michele

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Joint reaction analysis

Post by Dimitar Stanev » Sun Jun 05, 2016 8:36 am

Hi,

I think that ligaments are accounted during Joint Reaction Force, because internal the model is realized through acceleration, so probably the forces of the ligaments are computed and applied. To validate this, you can try and make your ligaments very strong and see if the reaction forces are altered. If this is the case then you would need to find a way to specify the parameters of your ligaments and to find what caused the problem in your result.

If you want to try using muscles I would suggest you to model the ligaments as Millard2012EquilibriumMuscle, and then adjust the parameters of the different Curves through xml. Although, you must be careful with the active force curve (which is never zero) and the default activation is also not zero because there are some singularities otherwise. So you will inherit some active force.

https://simtk.org/api_docs/opensim/api_ ... ml#details
https://simtk.org/api_docs/opensim/api_ ... ml#details

If you solve your problem let us know how you did it.

Best

User avatar
Michele Baldoni
Posts: 18
Joined: Sat Sep 19, 2015 10:53 am

Re: Joint reaction analysis

Post by Michele Baldoni » Sun Jun 05, 2016 9:22 pm

Hi Jim,

I confirm that ligaments are included in Static Optimization (and therefore in its output force file) but are not considered during Joint Reaction Analysis. I tried to manually change the force file output of Static Optimization (StaticOptimization_force.sto) that is given as input in Joint Reaction Analysis, modifying the ligament forces magnitudes, with no changes in the joint reactions. If I'm right, I would suggest the developers (if anyone's reading) to add them to the analysis, if possible.

It looks like my only option is to change the ligaments into muscles, as you suggested. I will try to find an .osim model with a Millard2012EquilibriumMuscle and then copying and modifying the definition with an .xml editor.

Thank you for the advice, I'll let you know if I can make it work.

Best regards,

Michele

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Joint reaction analysis

Post by Dimitar Stanev » Mon Jun 06, 2016 1:37 am

Hi,
I tried to manually change the force file output of Static Optimization (StaticOptimization_force.sto) that is given as input in Joint Reaction Analysis, modifying the ligament forces magnitudes, with no changes in the joint reactions.
Ignore the force.sto, and try to alter the model parameters of the ligaments. The ligament forces can be estimated internally, without the need to specify their forces in the force.sto file. I think that they are accounted because as I told you the model is realized through acceleration. Can you verify this by changing the ligament parameters (.osim) and not the ligament forces in the .sto file and see if there are any differences in the joint reaction forces?

Best

User avatar
Michele Baldoni
Posts: 18
Joined: Sat Sep 19, 2015 10:53 am

Re: Joint reaction analysis

Post by Michele Baldoni » Mon Jun 06, 2016 9:15 am

Hi,

originally I was working on a static pose, so there were no accelerations involved. Now I tried with a flexion motion and with various PCSA forces for the ligaments. When I change the value of PCSA I see, indeed, changing magnitudes in both Static Optimization forces and Joint Reactions, so it seems the ligaments are considered.

Anyway, I still have the problem that to compute the correct reaction at joints I would need the analysis to consider all the forces, the ligaments and the muscles ones. If only some are considered I have underestimated joint loads. And I still think OpenSim does not include all of the forces. Just like with the static pose, I performed two Joint Reaction Analysis, after executing Static Optimization. The two analysis had the same motion input (the same flexion motion used for Static Optimization), and same settings.
They only differed in the force file: the first analysis had the force file output from Static Optimization as it was (first 5 columns for ligaments, last 4 columns for muscles), the second analysis had the same file, but with the order of the column modified (first 4 columns muscles, last 5 columns ligaments). So basically the names and magnitudes of the forces on the files were the same, only arranged in a different order. Therefore I expected exactly the same reactions at joints.
Instead, results were significantly different: for the same joint 450 N with the first file, 1400 N with the second.

I still think that is due to the fact that the analysis only considers a number of columns correspondent to the number of actuators in the model, ignoring the remaining columns. Since I have 4 muscles (categorized as actuators) and 5 ligaments (not categorized as actuators), it considers only the first 4 columns, regardless of what force they represent. Therefore I lose the contribution of the last five columns of the file, and so of 5 forces.

I don't have the necessary programming skills to know, maybe it would be an easy fix for the Joint Reaction analysis code to include all of the forces of the file, and that would solve my problem. But with this current analysis it seems like I have to use muscles instead of ligaments, so that all of the forces are taken into account.

Best,

Michele

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Joint reaction analysis

Post by Dimitar Stanev » Mon Jun 06, 2016 11:22 am

Hi
originally I was working on a static pose, so there were no accelerations involved.
No I mean that the model is realized through acceleration meaning that you know the acceleration caused by any force acting on the model. The ligament force can be computed by knowing the length and velocity of the ligament which is know at velocity level. The highest state realization is acceleration, so all farces are applied and the model can be integrated. The integration is not carried by JointReactionAnalysis but the fact that the state/model is realized means that all forces are considered.

https://github.com/opensim-org/opensim- ... n.cpp#L528

The ligament strain, tension is computed at velocity stage and applied by computeForce:

https://github.com/opensim-org/opensim- ... t.cpp#L127
https://github.com/opensim-org/opensim- ... t.cpp#L262

In your case you don't need to supply any external force except muscle forces.
So basically the names and magnitudes of the forces on the files were the same, only arranged in a different order. Therefore I expected exactly the same reactions at joints.
Instead, results were significantly different: for the same joint 450 N with the first file, 1400 N with the second.
The muscle forces are found by name, so if you change the order of the label names then you have a problem, otherwise its ok.

https://github.com/opensim-org/opensim- ... n.cpp#L536

Best

POST REPLY