(close to) minimizing metabolic cost

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Karthick Ganesan
Posts: 119
Joined: Thu Oct 10, 2013 12:11 am

(close to) minimizing metabolic cost

Post by Karthick Ganesan » Sat Aug 15, 2020 11:20 am

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.

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: (close to) minimizing metabolic cost

Post by Christopher Dembia » Sat Aug 15, 2020 10:31 pm

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

User avatar
Aaron Fox
Posts: 289
Joined: Sun Aug 06, 2017 10:54 pm

Re: (close to) minimizing metabolic cost

Post by Aaron Fox » Sun Aug 16, 2020 4:04 pm

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

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: (close to) minimizing metabolic cost

Post by Christopher Dembia » Sun Aug 16, 2020 5:22 pm

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.

User avatar
Karthick Ganesan
Posts: 119
Joined: Thu Oct 10, 2013 12:11 am

Re: (close to) minimizing metabolic cost

Post by Karthick Ganesan » Mon Aug 17, 2020 12:47 am

That is great! Thank you very much Chris. I will try it out.

User avatar
Carlos Gonçalves
Posts: 136
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Thu Oct 01, 2020 8:58 am

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

User avatar
Nicholas Bianco
Posts: 1050
Joined: Thu Oct 04, 2012 8:09 pm

Re: (close to) minimizing metabolic cost

Post by Nicholas Bianco » Thu Oct 01, 2020 4:16 pm

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

User avatar
Carlos Gonçalves
Posts: 136
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Mon Oct 05, 2020 8:13 am

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

User avatar
Nicholas Bianco
Posts: 1050
Joined: Thu Oct 04, 2012 8:09 pm

Re: (close to) minimizing metabolic cost

Post by Nicholas Bianco » Mon Oct 05, 2020 11:14 am

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

User avatar
Carlos Gonçalves
Posts: 136
Joined: Wed Jun 08, 2016 4:56 am

Re: (close to) minimizing metabolic cost

Post by Carlos Gonçalves » Tue Oct 06, 2020 4:54 am

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

POST REPLY