Which kinematics file to use for external loads in SO/CMC after running RRA?

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Daniel Pina
Posts: 32
Joined: Wed Jun 19, 2013 12:08 pm

Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Daniel Pina » Wed Jul 26, 2017 12:39 pm

Hello,

I have a motion file originated from inverse kinematics (say "IK.mot"). I then run RRA and get "RRA_kinematics_q.sto", to use later in SO or CMC.
Afterwards, I'm supposed to run SO using the "RRA_Kinematics_q.sto" in order to reduce the activation of residual actuators.
However, when I'm editing the external loads for either CMC or SO, we're supposed to choose a force data file (in the case of a gait test, a file with ground reaction forces) and a kinematics file to accompany that force data file:
which_kinematics.png
which_kinematics.png (8.5 KiB) Viewed 902 times
At this point, which kinematics file should I use to get the correct muscle force results, IK.mot or RRA_kinematics_q.sto ?
I tried a SO test run with both alternatives and I get very different results.

If I use the original IK.mot:
IK_in_external_loads.png
IK_in_external_loads.png (21.94 KiB) Viewed 902 times

And if I use the RRA_kinematics_q.sto:
RRA_in_external_loads.png
RRA_in_external_loads.png (27.96 KiB) Viewed 902 times

In this second case, the glut_med2_l is actually pulling almost 95% of its maximum strength, which seems odd for a simple gait test.

Thank you very much.

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

Re: Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Thomas Uchida » Wed Jul 26, 2017 10:03 pm

which kinematics file should I use to get the correct muscle force results, IK.mot or RRA_kinematics_q.sto ?
There is a statement in the Confluence documentation that might be helpful (see the "Getting Started with Static Optimization" page at http://simtk-confluence.stanford.edu:80 ... timization):

"You can use IK or RRA results as input kinematics. If using IK results, you usually need to filter them, either externally or using the OpenSim analyze/static optimization field; if using RRA results, you usually do not have to filter."

User avatar
Daniel Pina
Posts: 32
Joined: Wed Jun 19, 2013 12:08 pm

Re: Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Daniel Pina » Thu Jul 27, 2017 4:04 am

Thank you Tom.

I'm aware of that part of the documentation and I'm following it by using RRA to retrieve the kinematics for the SO run (i.e. in the SO's main settings window).
My question here is what kinematics I should use in the external loads configuration, not the SO run itself.

So to further explain, this is my SO main settings window:
SO_main_settings.png
SO_main_settings.png (35.34 KiB) Viewed 871 times
It's using the kinematics results from running RRA.

And this is my actuators and external actuators window:

actuators_external_loads.png
actuators_external_loads.png (18.06 KiB) Viewed 871 times

And when pressing the button highlighted above, I'm supposed to choose a kinematics file that supports the GRF forces file:
which_kinematics2.png
which_kinematics2.png (13.72 KiB) Viewed 871 times

My question is if I should use the original IK kinematics here (that have the same 200Hz sample rate) or the RRA kinematics results that I use in the main settings (with different sample rates: RRA kinematics is 1000Hz and GRF Force is 200Hz).



I thought the difference between the two would be minimal because RRA makes very small adjustments to the kinematics. But as I've shown in the first post the results are very different, which is why this question seems important.
I can't find anything in the documentation referring to which kinematics file we should use in the external loads configuration.

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

Re: Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Thomas Uchida » Thu Jul 27, 2017 11:49 am

Thank you for clarifying. I would start by looking at how much the kinematics are changing after RRA: if they are changing substantially, there may be an issue upstream. I searched the Forum for "rra external loads" and found this very relevant thread with a reply from Ajay that should be helpful: viewtopicPhpbb.php?f=91&t=4547.

User avatar
Daniel Pina
Posts: 32
Joined: Wed Jun 19, 2013 12:08 pm

Re: Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Daniel Pina » Fri Jul 28, 2017 10:05 am

That's precisely the info I was looking for, thank you!
I'd never guess there was a recommendation to not use any kinematics file, because that sentence in the documentation is only present in the Inverse Dynamics' chapter.
Since the field was there and it got red if I didn't choose any kinematics file for the GRF file, I never even thought it was possible to just not point to any kinematics file in that field.

In a future OpenSIM version, perhaps it would be worthwhile to have a tick-box before the kinematics-for-external-forces field?
Just like you have with the actuator constraints in the CMC main settings window, for example.

Not only this cleared my doubts, but it seems that using IK kinematics for GRF while running SO with RRA kinematics was one of the main sources for the high-frequency noise I was getting in my SO results. They are much clearer now.

Again, thanks for the help!

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

Re: Which kinematics file to use for external loads in SO/CMC after running RRA?

Post by Thomas Uchida » Fri Jul 28, 2017 2:33 pm

Great! Glad you have it working. And thank you for providing these details; I've opened an Issue in the GUI code repository to improve the interface.

POST REPLY