Page 1 of 1

1.#QNAN Error during Static Optimization

Posted: Thu Aug 01, 2013 12:33 pm
by elena1caruthers
Hello!

I am currently running static optimization for a sit to stand trial. However, I am getting the 1.#QNAN error for a couple frames (one seen below).

time = 0.346665 Performance =8.49846 Constraint violation = 2.85467e-013
time = 0.353332 Performance =8.54855 Constraint violation = 2.65058e-013
time = 0.359998 Performance =8.60453 Constraint violation = 2.76463e-013
time = 0.366665 Performance =0.00939998 Constraint violation = 1.#QNAN
time = 0.373332 Performance =8.76364 Constraint violation = 2.18879e-013
time = 0.379998 Performance =8.82455 Constraint violation = 2.55127e-013

I have looked at past forums and have seen that this error may be caused by noisy data or a sudden jump in accelerations in one frame. My data is filtered (6 Hz). I have also plotted the Inverse Dynamics solution in OpenSim and I do not see any jumps at the time points where I am getting the 1.#QNAN error. Is there anything else I should examine to see what is giving me this error? Thanks!

Elena

Re: 1.#QNAN Error during Static Optimization

Posted: Mon Aug 05, 2013 4:43 pm
by aseth
The constraint on the static optimization solution requires that the acceleration generated by the model's actuators matches the one estimated from experimental kinematics. A sudden jump in the experimental values may cause the optimizer to fail to meet the constraint tolerance but should not return a NaN. Something is returning a NaN while evaluating the model acceleration or the experimental (e.g. differentiating the spline). A couple things to check: 1) is the analysis starting at a time where you have valid motion data? 2) are kinematics for all coordinates supplied? 3) does the pose of the model make sense- e.g. do any muscles have fiber lengths approaching zero or << optimal_length? If that doesn't uncover a problem, please post your model and setup files so we can take a closer look. Thank you.