RRA adjustment

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Fabian Bayerlein
Posts: 18
Joined: Fri Apr 05, 2013 2:12 pm

RRA adjustment

Post by Fabian Bayerlein » Thu Jul 18, 2013 12:18 pm

Hi,

I'm currently trying to run RRA with my own data, but I encounter difficulties adjusting the parameters in the ControlConstraints, Tasks and Actuator so that my values stay in the boundaries suggested by the RRA Best Practices.
Appended you find 3 plots of the residual moments (both from ID and RRA) and the position Error as reported by RRA. (1,2) are generated for two independent subjects with the default settings copied from the Gait2392 Model (I'm using the Hamner Model with arms). As you can see, the results are not satisfying.
The reason I appended the plots from two subjects is to show, that I think, that the encountered problems (like y,z drift) seem to be systematic.
Does anyone have any suggestions what to do about these errors in general?
I'm thinking that the z drift is probably due to a wrong adjustment of the walking direction and the y drift due to wrong total mass?

To fight these errors, I tried different perturbations of the original files.
Higher tracking weights on the residual tasks (3) or
Lower optimal forces and looser constraints for the residuals or
relaxing tracking weights on coordinates with low error or
setting optimal force to the maximum value of the residuals found by ID.
At the end of the day, the results are still not satisfying (I can only append 3 attachments, so no plots for those cases.)
Any suggestions towards a systematic approach? Or maybe my data at that point is too corrupted to begin with? (If someone wants to take the time to reproduce the results, I can also supply the used files and settings...)

[Edit1: I ran RRA multiple times following the proposed mass adjustments until the total mass change was smaller than 0.01 kg for all cases.]

Thank you for your time,
Fabian
Attachments
rra1.jpg
Default settings sub. 01
rra2.jpg
Default settings sub.02
rra3.jpg
higher tracking weight sub. 01

User avatar
Fabian Bayerlein
Posts: 18
Joined: Fri Apr 05, 2013 2:12 pm

Re: RRA adjustment

Post by Fabian Bayerlein » Mon Sep 16, 2013 5:25 am

Hi,

as the issue is still unresolved, it'd be great, if anyone has suggestions.

Thank you,
Fabian

User avatar
Ryan Bakker
Posts: 16
Joined: Wed Aug 08, 2012 10:08 am

Re: RRA adjustment

Post by Ryan Bakker » Mon Sep 16, 2013 1:27 pm

Fabian

How does your scaling and inverse kinematics look? Are they giving satisfactory results? Have you tried running inverse dynamics? Do the values look reasonable for the motion you are studying? The source of your error could be from an incorrect scale, poor IK or incorrectly applied GRF.

In my experience it can take many many iterations to get the correct combination of RRA parameters. My approach uses the following philosophy implemented in matlab

0. set my maximum acceptable threshold values for pErr and residuals (this is typically the maximum values for the "ok" range listed on the help site) 5 degrees rotation, 2cm translation, 75Nm and 25N.
1. Run RRA
2. view pErr file. If pErr > threshold, increase the tracking weight by 2X. I also relax tracking weight if pErr is very close to zero.
- repeat steps 1-2 until all pErrs are below the threshold
3. check residual values. If residual > threshold, decrease the optimal force on that actuator by 25%.
- repeat steps 1-3 until all pErrs and residuals are below the threshold values
4. reduce your threshold values by 10%.
- repeat steps 1-4 until you have reached a solution that is satisfactory.

I have found very good results using this technique. This approach can take a couple hundred iterations before hitting its limit. It may be worth fiddling around with the multipliers to find what works best for you.

This is an iterative approach. It is unlikely that it will find the optimal solution in the solution space, however it will help find a better solution.

I hope this helps.

-Ryan

User avatar
Fabian Bayerlein
Posts: 18
Joined: Fri Apr 05, 2013 2:12 pm

Re: RRA adjustment

Post by Fabian Bayerlein » Tue Sep 17, 2013 8:21 am

Hi Ryan,

thank you very much for your response.
As it turns out, the GRF were indeed incorrectly applied, as two force plates were switched.
To correct that OpenSim had to move the model quite a bit to still make sense of the movement.
I thought, I had checked that already, but as it turns out, I didn't. Thank you for the tip.

After adjusting that, it still doesn't yield perfect result, but they're a lot more reasonable.
I will try to realize your rationale to squeeze out the rest of the errors.

Once again, thank you.

Fabian

User avatar
Fabian Bayerlein
Posts: 18
Joined: Fri Apr 05, 2013 2:12 pm

Re: RRA adjustment

Post by Fabian Bayerlein » Thu Sep 26, 2013 8:02 am

Hi,

I wanted to share the "solution" to my problems and get some feedback on my theory behind it, which is thought to be a working hypothesis.
Thank you for any input.

After adjusting the point of application for the grf's, I still had similar problems to my original post.
The problem (imho) was that I picked the wrong initial point in time:
We had a (I guess) very common lab setup with just two force plates. Looking at the leg stepping on the first plate, it is obvious that for the first ~12% of the gait cycle (heel strike till opposite toe-off) we have ground interaction without measuring it (opposite foot is still on the ground). While this does not corrupt the results of Inverse dynamics too much, because the grf on the opposite foot are not dominant, it poses a huge source of error for rra.
(speculation:) With using CMC to track the desired kinematics, rra also relies on a PD-controller, which can not compensate for errors in the initial conditions. This leads to the observed piling of errors in the rra results.

Picking the initial point at a time where all ground interaction is with force plates, resolved this issue and produces valid rra results.

Thank you for your time, I'd appreciate additional information, confirmation or counter proposals to my hypothesis.

Fabian

POST REPLY