Questions about Static Optimization

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Questions about Static Optimization

Post by Maria Isabel Orselli » Thu Mar 01, 2012 7:56 am

Hi,

I'm still having some problems with Static Optimization and I think it's because I didn't understand it as I should. So I have some questions

One of the "Best Practice and Troubleshooting" tips for static optimization is: "Increase the maximun control value of a residual or reserve actuator, while lowering its maximum force. This allow the optimizer to generate a large force to match acceleration but large control values are penalized more heavily (...)".

In the reserve actuator the maximum force is the "optimal force" ? and what does it mean being penalized more heavily?

I'm trying to run static optimization with exponent 3 in the activation-based cost function, for a walking task (with other external forces than GRF), with gait2392 model. Using expoent 2 cost function it ran but i had to increase the reserve actuator control range (increase maximun and decrease minimun).

thanks
Maria Isabel

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Questions about Static Optimization

Post by Ayman Habib » Fri Mar 02, 2012 11:00 am

Hi Maria Isabel,

Basically the Static Optimization analysis tries to match the accelerations computed by inverse dynamics using muscles and residuals/reserves and the knobs it has (in the built in objective function) are the activations. For reserves and residuals, since these reflect errors/unmodeled behaviors, we'd like the optimizer to use them the least. By making max/optimal force small, we make it more expensive for the optimizer to use these rather than muscles.

Hope this explains and please let me know if you continue to have questions.

Best regards,
-Ayman

User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Re: Questions about Static Optimization

Post by Maria Isabel Orselli » Sat Mar 03, 2012 7:07 am

Thank you Ayman,

Now it is clear !

Best Regards
Maria Isabel

User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Re: Questions about Static Optimization

Post by Maria Isabel Orselli » Fri Apr 06, 2012 5:09 pm

Hi all,

I still have some questions on this topic .
Now Static optimization is running and I'm trying to evaluate the choice of the residual actuators that I have attached to the model.
I chose the minimal value of force for which the model ran and then I changed
the values for control in an logical manear. After, I kept the value of control and changed force.

I evaluated the results and It seems that for the smallest value of optimal force (1) and one of the largest value of control (10000), muscle forces and activations are less noisy in comparisson with the results produced by a residual actuator with the same force and smaller control values.
Another thing I observed was that if I increased the control value again (>10000) - yet, mantaining the same force - values became noisy again.

Is there an optimal value of control? And, are values such as 10000 and 100000 for control acceptable (meaningful)?

What parameters in my results I should evaluate for best choosing residuals actuators (performance and Constraint violation values?) ?


Any hint ?!
thanks

Maria Isabel

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Questions about Static Optimization

Post by Ayman Habib » Mon Apr 09, 2012 7:07 pm

Hi Maria,

You may be seeing the effects of bad scaling. Ideally you formulate the problem so that the controls are in the range 0-1 (as the optimizer/solver minimizes sum of squares of controls). If the only solution you can get is obtained by setting large values of controls, then those terms will dominate this computation (sum of squares) and will make muscle activations and forces noisy.

Hope this helps,
-Ayman

User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Re: Questions about Static Optimization

Post by Maria Isabel Orselli » Mon Apr 09, 2012 8:09 pm

Hi Ayman,

Thank you for your answer but I don't know if I explained well, sorry.

I've attached point and torque actuators only to the pelvis and I changed the following parameters: <optimal_force>, <min_control>, <max_control>,to investigate the effect of this choice in the final results - muscle forces and activations.
I followed the example for Gait2392 for which residual actuators parmeters were:

<optimal_force> 1 </optimal_force>
<min_control> -1000</min_control>
<max_control> 1000 </max_control>

for Fx, Fy, Fz and Mx,My,Mz.

Are you meaning this values for control shuld be between [0,1] ?
If so, i should choose a value for control between 0-1 and increase the optimal_force ?

Thanks
Maria Isabel

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Questions about Static Optimization

Post by Ayman Habib » Tue Apr 10, 2012 11:40 am

Hi Maria,

The scaling problem I mentioned is more of an issue with optimizers (rather than solvers as in Static Optimization). But I'd try the idea of increasing the optimal force and keeping the control bounds between -1 and 1 to see if you get different behavior. In theory you shouldn't get different answers altogether (this is true for residuals not reserves) so this experiment would help identify any numerical issues with the formulation, especially that solution tolerances are not exposed to users in Static Optimization.

Please let us know how it goes,
-Ayman

User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Re: Questions about Static Optimization

Post by Maria Isabel Orselli » Tue Apr 10, 2012 7:16 pm

Thank you Ayman,

things are getting more clear. But I have some last questions

You said before:
For reserves and residuals, since these reflect errors/unmodeled behaviors, we'd like the optimizer to use them the least. By making max/optimal force small, we make it more expensive for the optimizer to use these rather than muscles.
So I ran SO with different residual actuators (as I said before) varying <optimal_force> , <min_control> and <max_control> of the residual actuator in pelvisin order to understand what results would be improved by the choice of the smaller force.

I fixed <optimal_force> in 1 and varied control by multiplying by 10 (I started with 100 and varied until 100000). Than I fixed control in 100 and varied force by multiplying by 10 (I started with 1 and finished with 1000).

The results are similar, in agreement with what you said
In theory you shouldn't get different answers altogether
I compared muscle forces and activations resulting from SO with those different residual actuators. What I saw was that all results seemed noisy except for <optimal_force> 1 and [min_control max_control]= [-10000,10000].

I should choose this values (1, [-10000,10000] ) for the residual actuator when running SO or there is any other thing I should evaluate, like Performance and Constraint violation values that are displayed in the SO message, to assure that my results are ok?

And if whatever value of Res. Actuator I choose I obtain more or less the same results for forces and activation, what result is improved when I make the choice of the small force ?

(Sorry for repeating some things. I don't know if my doubts are clear )

Best whishes
Maria Isabel

POST REPLY