Page 1 of 6

(close to) minimizing metabolic cost

Posted: Sat Aug 15, 2020 11:20 am
by karthick_ganesan
Dear Moco Team,
I understand that it could be possible to minimize metabolic cost in some future release of Moco.
Mean while , I was suggested ( If I rightly recollect) to minimize (integral of)fiber power using MocoOutputGoal. Since fiber power could be either +ve or -ve, the integral will only give net energy whereas both +ve and -ve fiber power requires energy. Is there a way to handle this?
Any other ways to get closer to minimizing metabolic cost with what is available in Moco currently?

Thanks,
Karthick.

Re: (close to) minimizing metabolic cost

Posted: Sat Aug 15, 2020 10:31 pm
by chrisdembia
Karthick, you make a good point. There is currently no easy way to "clip"/"rectify" an output.

Antoine Falisse contributed a metabolics model that can be used as a goal. It's not in an official release of Moco, but you should be able to try it out with this build (you might need to be logged into GitHub to access it): https://github.com/opensim-org/opensim- ... s/11000622

Re: (close to) minimizing metabolic cost

Posted: Sun Aug 16, 2020 4:04 pm
by aafox
Hi Chris,

Good to see that this has made it's way into Moco's release. Is the 0.5 version fairly stable for the metabolics goal? Or what are the plans for an official 0.5 release?

Aaron

Re: (close to) minimizing metabolic cost

Posted: Sun Aug 16, 2020 5:22 pm
by chrisdembia

Code: Select all

Is the 0.5 version fairly stable for the metabolics goal?
Yes, I think so.

Code: Select all

Or what are the plans for an official 0.5 release?
We are in the process of merging Moco into the `opensim-core` repository. We may delay the next release until that merging process is complete.

Re: (close to) minimizing metabolic cost

Posted: Mon Aug 17, 2020 12:47 am
by karthick_ganesan
That is great! Thank you very much Chris. I will try it out.

Re: (close to) minimizing metabolic cost

Posted: Thu Oct 01, 2020 8:58 am
by carlosoleto
Hello everyone,

I'm in the group that is anxious for generating controls using metabolic costs.

I just got one idea and I would like to confirm it is wrong before doing it.

The MocoOutputGoal can use any "any (double, or scalar) Output in the model". The Umberger2010MetabolicsProbe can be used in the model and its values can be extracted from the study.analyze method because we can use any output in the model for it.

It is possible to use the probe output in the MocoOutputGoal?

I think the answer is no because of the way the probe works (I had seen it or read somewhere). But it would be nice to confirm since the probe takes ages to run into my machine.

Best regards.

Carlos

Re: (close to) minimizing metabolic cost

Posted: Thu Oct 01, 2020 4:16 pm
by nbianco
Hi Carlos,

You are correct. The only output for the Umberger probe is 'probe_outputs', which returns a SimTK::Vector.

Perhaps we'll add support for vector outputs in the future.

-Nick

Re: (close to) minimizing metabolic cost

Posted: Mon Oct 05, 2020 8:13 am
by carlosoleto
Thanks for the answer Nick.

For normal walking patterns, the available MocoGoals seem sufficient for my project, but I'm having a hard time creating a pathological gait. The model is always finding ways to optimize the muscle moments even when the model strength is low (huge metabolic cost).

If anyone has any tips, it would be very nice to talk about it. But I think that I need to let go of Python and work directly with the C++ library to tackle bigger problems.

Best regards.

Carlos

Re: (close to) minimizing metabolic cost

Posted: Mon Oct 05, 2020 11:14 am
by nbianco
Hi Carlos,

I'm happy to help with your simulations of pathological gait. Depending on what you're trying to do, you might not need to go to C++. Post here or in other thread your MocoProblem and optimizer settings and we can work through it.

-Nick

Re: (close to) minimizing metabolic cost

Posted: Tue Oct 06, 2020 4:54 am
by carlosoleto
Thanks a lot for the support Nick!

Unfortunately, the rehabilitation hospital in which I work has a very strict policy about sharing files (intellectual property). I started to write down the configurations that I used but it was getting extremely big ...

In summary, I used the example of 2D gait and made a Python version (I cannot use Matlab). I changed a little bit the ranges of the joints so it would be possible to create a "crouch gait". I kept the periodic constraints, control goals, and added a joint reaction goal in both tali (talus) to prevent hard heel strikes (control weight = 1.0, joint reaction weight = 0.00001).

The normal gait appeared right away. To create the pathological gait I decreased the isometric forces of the plantar flexors (20% of original) and knee extensors (30% of original), and also added specific control weights to plantar flexors and vasti (10.0). I could create something that looks impaired (greater dorsiflexion, short step length, bigger hip flexion), but the clinical team that I work with is not very convinced ( :| ).

Anyway, after using SAFOs in the impaired model the gait gets a lot better, which is a good sign for me and the project I'm working on.

Sorry about my work constraints and thanks again for this conversation. I'm currently studying more about the gait metabolic in order to find out other relationships/rules that will create the impaired gait without adding the energy expenditure rate in the optimum control's cost function.

In the future (next year) I will probably start a PhD. If this happens, it will be easier to contribute here.

Best regards.

Carlos