Page 1 of 1

DeGrooteFregly2016Muscle scaling problem

Posted: Fri Apr 30, 2021 8:27 am
by carlosoleto
Hello everyone,

I think I found a bug in the scaling of DeGrooteFregly2016Muscle. It is not updating the optimal fiber length and the tendon slack. :shock:

If someone could check it out, it would be fantastic. I'm using a version of the 2D_gait.osim available in the examples for OpenSim Moco.

My scaling sets a 1.18 factor for the new subject's tibia, but the soleus' optimal fiber length and the tendon slack remain the same as the original.

______________optimal fiber length | tendon slack
Previous scaling: 0.0481705511245028 x 0.240852755622514
After scaling: 0.0481705511245028 x 0.240852755622514

Best regards.

Re: DeGrooteFregly2016Muscle scaling problem

Posted: Tue May 04, 2021 10:15 am
by jiachengweng
Hi Carlos,

I realized the same issue with DeGrooteFregly2016Muscle. Do you happen to know any workaround?

Thanks,
Jiacheng

Re: DeGrooteFregly2016Muscle scaling problem

Posted: Tue May 04, 2021 3:59 pm
by jiachengweng
This issue has been submitted to the GitHub page: https://github.com/opensim-org/opensim-core/issues/2995

Nick commented that the DeGrooteFregly2016Muscle was missing the method for scaling the muscle related properties.

Sola

Re: DeGrooteFregly2016Muscle scaling problem

Posted: Tue May 04, 2021 4:09 pm
by jiachengweng
Based on the implementation of the Millard2012EquilibriumMuscle, a manual fix would be to record the scaling factor, and multiply them to the original optimal_fiber_length and tendon_slack_length. However, this is rather annoying. I guess one would take the code from Millard2012EquilibriumMuscle, put it under DeGrooteFregly2016Muscle, and compile from source.

Sola

Re: DeGrooteFregly2016Muscle scaling problem

Posted: Wed May 05, 2021 5:07 am
by carlosoleto
Hello Jiacheng,

What I've been doing is scaling everything with Thelen or Millard muscles, and prior to the Moco simulation, I'm replacing the muscle types. That at least updates the muscle lengths and tendons slack.

In despair ( :shock: ), I've also done something that worked (at least), which was: updating the muscle lengths and tendon slacks manually with a piece of code that used the scaling factors for pelvis, femur, and tibia.

One other thing that I'm doing is updating the muscles isometric forces with a factor depending on the subject's weight. That is also helping in the simulation interpretations.

I hope this could help everyone.

Good talk.

Best regards.

Carlos

Re: DeGrooteFregly2016Muscle scaling problem

Posted: Wed May 05, 2021 6:25 am
by jiachengweng
Hi Carlos,

Thanks for your comments. I am going to try the muscle replacement method for now :)

Cheers,
Jiacheng