Multiple Constraint Violations at One Time Step using Static Optimization

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Colin Holtkamp
Posts: 10
Joined: Tue Jan 22, 2019 10:44 am

Multiple Constraint Violations at One Time Step using Static Optimization

Post by Colin Holtkamp » Wed Oct 09, 2019 9:19 pm

Hi, I have been trying to run the static optimization tool on the gait2392 model in opensim. My inputs ie scaling, inverse kinematics, and ground reaction forces data all came from the files that came with the 4.0 software download. The static optimization tool seems to have multiple constraint violations at the pelvis_tile coordinate at nearly all the time steps. I have done some extensive reading in the opensim documentation as well as troubleshooting and have tried the following with no improvement. I have appended my own actuators file to the model to hopefully strengthen the model at the pelvis_tilt coordinate. No improvement. My actuator files consists of one torques actuator applied to the pelvis body, OptimalForce=100. I have also tried filtering my kinematic data as i noticed that had a lot of noise. I smoothed the kinematic data for the pelvis tilt coordinate in matlab using the Fit(x,y,'smoothingspline') function. The data seemed to be much more smooth and continuous at all time steps. I then ran the SO tool again. No improvement.

My question is twofold.

First, I find the the SO tool having multiple constraint violations at one time step to be very odd. I have not seen this issue in other forum posts. Why so many constraint violations at one time step? what would cause this be happening?

Second, How would I go about resolving the issue? I have run out of trouble shooting options. :(

Below is the error message displayed in my Opensim Messages Window. Note, what you are seeing is for one timestep only, but I am getting the same error message at nearly all the time steps.



"SimTK Exception thrown at InteriorPointOptimizer.cpp:264:
Optimizer failed: Ipopt: Maximum iterations exceeded (status -1)
OPTIMIZATION FAILED...

StaticOptimization.record: WARN- The optimizer could not find a solution at time = 0.95

The model appears unsuitable for static optimization.
Try appending the model with additional force(s) or locking joint(s) to reduce the following acceleration constraint violation(s):
pelvis_tilt: constraint violation = -3.0928
pelvis_tilt: constraint violation = -2.06994
pelvis_tilt: constraint violation = -9.44128
pelvis_tilt: constraint violation = 0.01346
pelvis_tilt: constraint violation = 0.0203893
pelvis_tilt: constraint violation = -0.072296
pelvis_tilt: constraint violation = -4.04315
pelvis_tilt: constraint violation = -0.362868
pelvis_tilt: constraint violation = -0.334183
pelvis_tilt: constraint violation = 7.85205
pelvis_tilt: constraint violation = 0.122539
pelvis_tilt: constraint violation = 1.02935
pelvis_tilt: constraint violation = -6.33601
pelvis_tilt: constraint violation = -1.23671
pelvis_tilt: constraint violation = -4.43567
pelvis_tilt: constraint violation = -3.69437
pelvis_tilt: constraint violation = 1.02789
pelvis_tilt: constraint violation = 5.74681
pelvis_tilt: constraint violation = 93.5095
pelvis_tilt: constraint violation = -6.5003
pelvis_tilt: constraint violation = -7.23235
pelvis_tilt: constraint violation = -4.56863
pelvis_tilt: constraint violation = 19.8178


time = 0.95 Performance = 1.06024 Constraint violation = 97.6914"

Also, attached are the plots of the initial raw kinematic data and the smoothed kinematic data. please take a look at the attached files. It appears to me that the smoothing spline function in matlab did a good job of addressing the noise in the data. Does the smoothed data look sufficient for the SO tool? Do you think the kinematic data could still be the issue?

Thanks in advance for the help!

Colin Holtkamp
Attachments
Acutuators.xml
(1.24 KiB) Downloaded 40 times
Smoothed_Data.png
Smoothed_Data.png (20.33 KiB) Viewed 685 times
Raw_Data.png
Raw_Data.png (23.44 KiB) Viewed 685 times

Tags:

User avatar
Colin Holtkamp
Posts: 10
Joined: Tue Jan 22, 2019 10:44 am

Re: Multiple Constraint Violations at One Time Step using Static Optimization

Post by Colin Holtkamp » Mon Oct 21, 2019 7:55 am

I'm not sure if anyone had the chance to see this post, but does anyone have any suggestions of what I should do moving forward? Should I filter the marker data along with the kinematic data? Any help is greatly appreciated. Thanks in advance!

Colin Holkamp

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

Re: Multiple Constraint Violations at One Time Step using Static Optimization

Post by jimmy d » Sat Nov 09, 2019 4:52 pm

My actuator files consists of one torques actuator applied to the pelvis body
You have to use an actuator for every coordinate. Not just one for the entire body. Have you tried using the RRA or CMC actuator files that are distributed with the example model and data?

There is also an example that deals with this type of issue, here;
https://simtk-confluence.stanford.edu:8 ... timization

-J

POST REPLY