Questions in RRA, CMC and Analyze Tool

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Satya Sri Mummidivarapu
Posts: 1
Joined: Sat Jan 24, 2015 1:55 pm

Questions in RRA, CMC and Analyze Tool

Post by Satya Sri Mummidivarapu » Sat Jan 24, 2015 2:40 pm

Hello,

I'm a new user to OpenSim and I have few questions on how to reduce residual forces. I have done CMC for half squat.

1. Although, the position errors from CMC are less than 1 cm or 2 deg, I doubt them because of following issue
2. The average residuals obtained from RRA (reported below) are greater than the ones given for walking task on OpenSim website. Can I just ignore them because this is a different task?
Average Residuals:
FX average = -24.9047
FY average = 59.7067
FZ average = -17.8895
MX average = 0.728877
MY average = -0.0308096
MZ average = -2.61508
I could also see pelvis drifting for a very short time initially and I think this has contributed to large Fy residual. I know I can change the location of the residual force actuators in my RRA actuators file to correspond to scaled pelvis COM. But, I donno how to change it/refer to scaled pelvis COM in the xml.
3. In which file can I check for Residual forces and Moments before RRA? and What does pelvis_list mean?
4. I have used Analyze tool after CMC and could see data in all the .sto files except for states/Positions (e.g. hip_flexion, ankle_angle, etc). Is there any mistake in how I have used the tool? However, I could see this states/positions data in .mot file hoping they are not going to be different.

​Thank you so much for your reply.
Satya

User avatar
Satya Sri Mummidivarapu
Posts: 13
Joined: Sun Sep 07, 2014 7:20 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by Satya Sri Mummidivarapu » Fri Feb 06, 2015 8:31 am

I have figured out few of the questions above and I post them for those of you who didn't know them yet.

1. It is always a good practice to make the force residuals fall at least in that "OK" range given in OpenSim tutorials. So, I have changed the Actuators to act at the scaled pelvis COM. Here is how you change it,
~Go to Navigator window- Bodies-Pelvis-Click on Pelvis
~Check the COM in the Properties window. Note it down.
~Open the original RRA_Actuators.xml file
~For FX,FY,FZ point actuators change pelvis <point> to the corresponding scaled Pelvis COM

2. Another way to reduce the RRA residuals is to change the mass of individual bodies (eg. torso, pelvis, subtalar etc..) to the desired mass values suggested by OpenSim given after the initial RRA run. You may check these suggested values in the Messages section and change them in the properties section of individual bodies.

I have tried this and this has reduced my FY residuals to 0.0019 however, the Fx and Fy residuals remained approximately the same as previous. Can anyone comment the other methods I can try?

3. Also, did anyone try filtering the motion capture data and the force plate data? If so, please comment the filter type and frequency you have used along with the methods.

Thanks alot

User avatar
Bruce de Jongh
Posts: 12
Joined: Wed Feb 05, 2014 3:14 am

Re: Questions in RRA, CMC and Analyze Tool

Post by Bruce de Jongh » Tue May 26, 2015 7:55 am

Hi Satya

I am also using the RRA and CMC tool for my own data with the gait2393 model supplied by Opensim. I am analysing data for one step on a force plate. I only run the analysis for the duration of the stance phase on the force plate.

I have scaled my model, performed an IK and an ID and am now attempting to run the RRA while keeping the residuals in the range specified by opensim. I have the correct pelvis COM in my xmls and have applied the weight changes to the body segments. This has decreased my avg residual forces to within the specified range, but the rms and max residual forces are still too high for Fy and nothing else. There is also a bit of pelvis drift.

Did you manage to get all your rms and max residual forces within the specified range, and if so how?
My maximum Fy is roughly the same as yours.

Kind regards

Bruce de Jongh

User avatar
Satya Sri Mummidivarapu
Posts: 13
Joined: Sun Sep 07, 2014 7:20 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by Satya Sri Mummidivarapu » Wed May 27, 2015 10:51 am

Hello Bruce de Jongh,

I wanted to make sure if you are simulating gait motion and running the simulation just for stance. I have got the residuals reported above for a badly scaled model, which I have later modified to recommended values of Opensim. So, make sure the maximum and rms marker error during scale and Inverse kinematics are within those recommended values. While performing IK you may want to change the weights of the markers to reduce marker errors. Filtering your data would also help if you have lot of noise.

Best regards

Satya

User avatar
Bruce de Jongh
Posts: 12
Joined: Wed Feb 05, 2014 3:14 am

Re: Questions in RRA, CMC and Analyze Tool

Post by Bruce de Jongh » Thu May 28, 2015 4:06 am

Hi Satya

Yes I am doing the simulation for above ground walking for just the left foot stance. I have performed the scaling and got the errors within the required range, but my IK errors are o.5 cm too high. Could that be fixed by filtering the marker trajectory data? If so what filter did you use?

I am still unable to get the residual force into the required range. Is there anything else I could try? Thank you for your help.

Kind regards,

Bruce

User avatar
Satya Sri Mummidivarapu
Posts: 13
Joined: Sun Sep 07, 2014 7:20 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by Satya Sri Mummidivarapu » Thu May 28, 2015 12:39 pm

You are Welcome Bruce! Try to alter the weights on the markers while you run your IK to get the max marker error below 4cm and rms below 2cm. You may try to uncheck the markers (to give a default weight of zero) which you are not confident of, to reduce the error. Opensim doesn't filter the force data however, it filters the marker data. So, I have filtered my force plate data externally using a fourth order butterworth filter and the optimal cut off frequency is found using Residual Analysis. If none of these things help to reduce RRA residuals, I guess you'll have to check if the force plates are calibrated properly and set to zero before your run (And this happened to me! during my initial tests :lol: )
Good luck with your research!

Regards
Satya

User avatar
Bruce de Jongh
Posts: 12
Joined: Wed Feb 05, 2014 3:14 am

Re: Questions in RRA, CMC and Analyze Tool

Post by Bruce de Jongh » Fri May 29, 2015 12:23 am

Thank you very much Satya you have been a great help. I have weighted markers but will try unchecking markers that I am uncertain of, this sounds like a good plan. OK good idea about filtering the force data. I will apply the same method and see if it produces better results.

Lets hope the force plate is calibrated correctly! :lol: Thank you for your time.

Kind regards,

Bruce

User avatar
ajinkya patil
Posts: 33
Joined: Wed Jun 10, 2015 11:09 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by ajinkya patil » Sat Sep 19, 2015 12:09 am

When I run the RRA tool, if i tick the adjust model option error comes as inverse dynamics error:Need atleast as many forces as degrees of freedom. When I untick the adjust model option RRA executes and Fx,Fz,Mx,My,Mz are in permissible limit but Fy is large and also my scaling and IK gave permissible error and after RRA execution when I play the simulaton, skeleton keeps on going down while walking.
Please Help

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by jimmy d » Sat Sep 19, 2015 8:15 am

Going through and studying this tutorial will help.

User avatar
ajinkya patil
Posts: 33
Joined: Wed Jun 10, 2015 11:09 pm

Re: Questions in RRA, CMC and Analyze Tool

Post by ajinkya patil » Tue Sep 22, 2015 8:19 am

Hi sir, I referred those examples and executed CMC tool but it stops abruptly at a particular instant of time giving an error
SimTK Exception thrown at InteriorPointOptimizer.cpp:261:
Optimizer failed: Ipopt: Restoration failed (status -2)
OPTIMIZATION FAILED...


CMC.computeControls: ERROR- Optimizer could not find a solution.
Unable to find a feasible solution at time = 0.22.
Model cannot generate the forces necessary to achieve the target acceleration.
Possible issues: 1. not all model degrees-of-freedom are actuated,
2. there are tracking tasks for locked coordinates, and/or
3. there are unnecessary control constraints on reserve/residual actuators


How to eliminate this error.

POST REPLY