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
Questions about Static Optimization
- Maria Isabel Orselli
- Posts: 39
- Joined: Wed Mar 17, 2010 5:30 pm
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Questions about Static Optimization
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
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
- Maria Isabel Orselli
- Posts: 39
- Joined: Wed Mar 17, 2010 5:30 pm
Re: Questions about Static Optimization
Thank you Ayman,
Now it is clear !
Best Regards
Maria Isabel
Now it is clear !
Best Regards
Maria Isabel
- Maria Isabel Orselli
- Posts: 39
- Joined: Wed Mar 17, 2010 5:30 pm
Re: Questions about Static Optimization
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
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
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Questions about Static Optimization
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
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
- Maria Isabel Orselli
- Posts: 39
- Joined: Wed Mar 17, 2010 5:30 pm
Re: Questions about Static Optimization
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
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
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Questions about Static Optimization
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
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
- Maria Isabel Orselli
- Posts: 39
- Joined: Wed Mar 17, 2010 5:30 pm
Re: Questions about Static Optimization
Thank you Ayman,
things are getting more clear. But I have some last questions
You said before:
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
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
things are getting more clear. But I have some last questions
You said before:
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.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.
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
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].In theory you shouldn't get different answers altogether
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