I want to set the minimum activation of muscles in Hyfydy model.
Default value is 0.01, but I want to set lower value.
Are there any parameters that can achieve this in hyfydy?
How to set the minimum activation of muscles in Hyfydy
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: How to set the minimum activation of muscles in Hyfydy
You can set the minimum activation for all muscles:
Documentation of this and other ModelHfd features has now also been added here:
https://scone.software/doku.php?id=ref:model_hfd
Code: Select all
ModelHfd {
...
min_muscle_activation = 0
}
https://scone.software/doku.php?id=ref:model_hfd
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: How to set the minimum activation of muscles in Hyfydy
I could set the minimum activation using this parameters. Thank you for the reply!
- Yuichiro Omura
- Posts: 44
- Joined: Thu Apr 04, 2019 10:03 pm
Re: How to set the minimum activation of muscles in Hyfydy
I found that changing the minimum muscle activity changed the initial muscle length depending on the value.
The length changes between the initial value of 0.01 and 0.001, as shown in the figure.
It appears (at least in visualize) that the length does not change any more when the value is set above 0.01 or below 0.001.
At 0.001, the length of the muscle fibers shrinks significantly at the beginning of the simulation.
Is there any way to prevent this?
If not, I will run the simulation at 0.01.
The length changes between the initial value of 0.01 and 0.001, as shown in the figure.
It appears (at least in visualize) that the length does not change any more when the value is set above 0.01 or below 0.001.
At 0.001, the length of the muscle fibers shrinks significantly at the beginning of the simulation.
Is there any way to prevent this?
If not, I will run the simulation at 0.01.
- Attachments
-
- min_act=0.001.png (127.18 KiB) Viewed 145 times
-
- min_act=0.01.png (123.12 KiB) Viewed 145 times
- Thomas Geijtenbeek
- Posts: 432
- Joined: Wed Mar 12, 2014 8:08 am
Re: How to set the minimum activation of muscles in Hyfydy
The initial fiber length of all muscles is based on the initial muscle activations, through equilibration. The initial muscle activations, in turn, are based on the muscle excitations set by your controller during the first time your script's update() function is called. If a muscle excitation set in your initial update() is zero (or a small value), it will be corrected to min_muscle_activation, and this will affect the initial fiber length for that muscle.
If this is undesirable, you have the following options:
If this is undesirable, you have the following options:
- You can add "initialize_activations_from_controller = 0" to the Model section of your scenario; this will prevent the initial activations being taken from the controller and always use the same constant (determined by initial_equilibration_activation).
- You can make sure the muscle excitation computed in your controller's initial update() function is higher (i.e. > 0.01). You can check if it is the first call via model:time() == 0.
- You can increase min_muscle_activation (as you suggest).