Page 1 of 1
Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Wed Jul 26, 2017 12:39 pm
by danielpina
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](./download/file.php?id=1482&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- which_kinematics.png (8.5 KiB) Viewed 860 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](./download/file.php?id=1484&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- IK_in_external_loads.png (21.94 KiB) Viewed 860 times
And if I use the RRA_kinematics_q.sto:
![RRA_in_external_loads.png](./download/file.php?id=1483&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- RRA_in_external_loads.png (27.96 KiB) Viewed 860 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.
Re: Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Wed Jul 26, 2017 10:03 pm
by tkuchida
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."
Re: Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Thu Jul 27, 2017 4:04 am
by danielpina
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](./download/file.php?id=1488&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- SO_main_settings.png (35.34 KiB) Viewed 829 times
It's using the kinematics results from running RRA.
And this is my actuators and external actuators window:
![actuators_external_loads.png](./download/file.php?id=1489&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- actuators_external_loads.png (18.06 KiB) Viewed 829 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](./download/file.php?id=1490&sid=ee1f4b0ec3e9c13ec4ad9c638940a5da)
- which_kinematics2.png (13.72 KiB) Viewed 829 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.
Re: Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Thu Jul 27, 2017 11:49 am
by tkuchida
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.
Re: Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Fri Jul 28, 2017 10:05 am
by danielpina
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!
Re: Which kinematics file to use for external loads in SO/CMC after running RRA?
Posted: Fri Jul 28, 2017 2:33 pm
by tkuchida
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.