Static Optimization for Dead Lift Exercise

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Alec David
Posts: 1
Joined: Thu Jun 04, 2015 5:19 am

Static Optimization for Dead Lift Exercise

Post by Alec David » Fri Jul 24, 2015 7:19 am

Hi,

I am currently working on modeling free weight versions of the squat, heel raise, and dead lift lifts. The squat and heel raise models work well, but I'm having trouble getting the dead lift model to run static optimization. Whenever I run SO, I end up with huge constraint violations and SO ends up pausing in the middle of the run and then not completing. An example of the constraint violations I am getting:


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 = -0.204767
pelvis_list: constraint violation = 0.0755459
pelvis_rotation: constraint violation = 0.627646
pelvis_tx: constraint violation = -0.0617994
pelvis_ty: constraint violation = 0.0333018
pelvis_tz: constraint violation = -0.0232778
back_tilt: constraint violation = 0.202653
back_list: constraint violation = 0.0285697
back_rotation: constraint violation = 0.168247
unrothum_r1: constraint violation = 3.03562e+016
unrothum_r3: constraint violation = 7.09172e+014
unrothum_r2: constraint violation = -3.10962e+016
elv_angle: constraint violation = -1.09368e+015
shoulder_elv: constraint violation = -8.18437e+015
shoulder1_r2: constraint violation = 7.2062e+016
shoulder_rot: constraint violation = -3.45705e+016
elbow_flexion: constraint violation = -1.59632
unrothum_r1_l: constraint violation = -8.97744e+014
unrothum_r3_l: constraint violation = -1.83573e+014
unrothum_r2_l: constraint violation = -1.30657e+015
elv_angle_l: constraint violation = 2.2248e+015
shoulder_elv_l: constraint violation = -2.01511e+014
shoulder1_r2_l: constraint violation = -8.62266e+014
shoulder_rot_l: constraint violation = -3.25646e+013
elbow_flexion_l: constraint violation = -5.6418
hip_flexion_r: constraint violation = 0.027284
hip_adduction_r: constraint violation = -0.0704151
hip_rotation_r: constraint violation = -0.0152011
knee_angle_r: constraint violation = 0.0404857
ankle_angle_r: constraint violation = 16.2315
subtalar_angle_r: constraint violation = 8.34196
mtp_angle_r: constraint violation = -525.732
hip_flexion_l: constraint violation = -0.111474
hip_adduction_l: constraint violation = 0.31994
hip_rotation_l: constraint violation = -0.500975
knee_angle_l: constraint violation = -0.697672
ankle_angle_l: constraint violation = 47.9629
subtalar_angle_l: constraint violation = -11.7635
mtp_angle_l: constraint violation = -314.757
bar_xRotation: constraint violation = 306.011
bar_yRotation: constraint violation = 13.232
bar_zRotation: constraint violation = -0.0378625
bar_xTranslation: constraint violation = 0.769336
bar_yTranslation: constraint violation = 4.07416
bar_zTranslation: constraint violation = -5.11775
deviation_l: constraint violation = -0.477607
flexion_l: constraint violation = -60.4342
deviation: constraint violation = -3.24392
flexion: constraint violation = 23.6764


time = 1.96 Performance =0.00033404 Constraint violation = 9.13974e+016


I am using a different model for the dead lift than the squat and heel raise since the upper body muscles and joints need to be included for the dead lift. When I ran IK for the dead lift, the scapula bones on the model were not locked in place and moving around so I locked those coordinates. However, these locked coordinates are the ones that are producing the large constraint violations. I've tried unlocking these coordinates and running the simulation but this does not change anything. I've also read through all similar issues that have been posted to this forum and tried all of the solutions and none of them have worked for me. The things I've tried to fix this issue include: strengthening the model by increasing the max_isometric_force; using very large reserve actuators; checking the coordinates from the motion capture data and making sure they match the model; making sure the ground reaction force data is in the correct units and has reasonable values.

I have attached my model and all relevant files to run SO.

Thank you.
Attachments
DL SO.zip
(421.24 KiB) Downloaded 73 times

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

Re: Static Optimization for Dead Lift Exercise

Post by jimmy d » Mon Aug 03, 2015 2:24 pm

Thanks for including a test model and data. The model and motion looks really cool. The model is complicated and so it would take weeks for anyone to assess all the things that may be causing you problems. I do have some general comments below:

- You have many wrapping surfaces that slow the computation down and also add uncertainty to the calculation of muscle moment arms. Its unclear why you need so many wrapping surfaces. It would very difficult to assess if all of these surfaces produce the correct muscle length and moment arm behaviour once scaled.

- Your scaling is incorrect. It's clear to me that the forearms, shank and thighs are incorrectly scaled. The geometry is way off.

- You aren't taking into account all the forces acting on the model. Where is the force of the bar acting on each hand? What happens when the weight touches the ground?

- There are many DoFs and many kinematic constraints. You will have to prioritise which constraints are important and which are not. If a constraint is causing you problems and it isn't important then you need to set the <is_free_to_satisfy_constraints>true</is_free_to_satisfy_constraints> tag. There are multiple forum threads that exist explaining this.

User avatar
B.J. Fregly
Posts: 51
Joined: Wed Mar 12, 2008 6:55 am

Re: Static Optimization for Dead Lift Exercise

Post by B.J. Fregly » Sun Nov 29, 2015 12:33 pm

Hi Alec,

Just saw this post while I was looking through the OpenSim Public Forum seeking help for the same problem you had.

I observed the same behavior - I have a reserve coordinate actuator on EVERY generalized coordinate in my model, so theoretically the optimizer should be able to find a solution, but in practice it could not.

I tried increasing <optimal_force> for ALL of my reserve actuators from 1 to 100, and voila! Every single time frame converged nicely.

My guess is that there are numerical scaling issues at play here that prevent the optimizer from converging if some of the reserve actuators are not strong enough. I will now play around with the strength values of all of my reserve actuators until I get a solution where muscles take up nearly all of the joint moments for joint spanned by muscles (I have other joints in the model that are not spanned by muscles).

Hope this suggestion is helpful.

B.J. Fregly

User avatar
B.J. Fregly
Posts: 51
Joined: Wed Mar 12, 2008 6:55 am

Re: Static Optimization for Dead Lift Exercise

Post by B.J. Fregly » Sun Nov 29, 2015 4:35 pm

P.S. Update on my previous post.

Making the <optimal_force> value big (like 1000) for all coordinates not controlled by muscles (e.g., the pelvis - which is my root segment - and the back and arms in my model) and small (like 1) for all coordinates controlled by muscles (e.g., the legs in my model) works great!

A small optimal force value means that the muscles should take up nearly all of the inverse dynamic force or moment for that coordinate, while a large optimal force value means that the reserve actuator should take up all of the inverse dynamic force or moment for that coordinate.

Somehow this change scaled the variables in the optimization problem better. Every time frame now converges with a constraint violation of less than 1e-10.

Give this approach a try, and hopefully it will work for you too.

User avatar
Erica Beaucage-Gauvreau
Posts: 49
Joined: Fri Apr 03, 2015 2:12 am

Re: Static Optimization for Dead Lift Exercise

Post by Erica Beaucage-Gauvreau » Mon Dec 07, 2015 8:11 pm

Hi,

I was going through the OpenSim Forum trying to find answers for a similar problem and found this thread! Thank you for your input and explanations. I am a fairly new OpenSim user so I am just trying out Static Optimization and I have had some difficulties. I am looking at simple gait data at the moment as it is a typical activity and somewhat "easier" than other activities to solve/analyze.

I have scaled my model to 2392 and tried SO, after running IK and ID. However, optimization fails and/or there are constraint violations at every frame. I based my actuator.xml file on the one available in the SO tutorial and added actuators for additional DOF when compared to the 10DOF18 model used for the SO example. One important point that I am not sure about is the value of the "point" to which the reserve actuators should be applied to: I put the location of application point of force at the COM of the pelvis of my Scaled model. However, I am not 100% sure that is correct because in the example Strong Actuator example.xml file, the point is not the COM of the pelvis. However, looking through the forum it seems to corresponds to the COM. Is that correct?

<PointActuator name="FZ">
<!--Flag indicating whether the force is disabled or not. Disabled means that the force is not active in subsequent dynamics realizations.-->
<isDisabled>false</isDisabled>
<!--Minimum allowed value for control signal. Used primarily when solving for control values.-->
<min_control>-Inf</min_control>
<!--Maximum allowed value for control signal. Used primarily when solving for control values.-->
<max_control>Inf</max_control>
<!--Name of Body to which this actuator is applied.-->
<body>pelvis</body>
<!--Location of application point; in body frame unless point_is_global=true-->
<point>-0.0800324 0.0 0</point>

<!--Interpret point in Ground frame if true; otherwise, body frame.-->
<point_is_global>false</point_is_global>
<!--Force application direction; in body frame unless force_is_global=true.-->
<direction>0 0 1</direction>
<!--Interpret direction in Ground frame if true; otherwise, body frame.-->
<force_is_global>true</force_is_global>
<!--The maximum force produced by this actuator when fully activated.-->
<optimal_force>100</optimal_force>
</PointActuator>

I have also tried increasing the optimal force to 100 for all the reserve actuators (as shown in the example) but the optimization still fails or at least results in constraint violations. Theoretically, a solution should be generated as there should be enough forces but it does not. I thought that when there were constraint violations, this meant that the solution generated was not good. However, reading the last reply, I understand that if the constraint violation is small enough then the solution can be ok? Could you please clarify?

I am still confused why a working solution is not being generated with high optimal forces values. I have also looked at my grf forces and they seem to be correct action on the model. I am not sure what to try anymore?

Thank you very much for your help. It is greatly appreciated.

Erica

POST REPLY