Hi all,
I was inspired by Oliver's thread about mocoParameters, but decided to start this separate thread because I don't think they're fully related.
I've been interested in doing parameter optimizations for the musculotendon parameters for a while now. However, as I understand it, it is currently not possible to couple parameters to each other. E.g., you could optimize F_max and L0 for each muscle, but you can't keep F_max * L0 = constant. The logical conclusion will be that the optimal solution maximizes both F_max and L0, adding free mass muscle mass to the model (possibly limited by some arbitrary weighting).
Nick - I was wondering how best to submit this as a feature request? Should I add it onto the Github issue for parameter regulization? Or should I add this separately? In my head, it would work something like a constraint on the parameters (perhaps "mocoParameterProductConstraint" or "mocoParameterProductFunction"?). In this case, I'd like to be able to define two parameters whose product must always remain constant - this would enable the user to optimize force-generating parameters without adding muscle mass (e.g., MocoParameterProductConstraint(par1, par2)). If it would help this cause, I can try to workshop something in Matlab. I think this is also somewhat related to Oliver's request, e.g., in his example he could use this to try coupling the contact sphere radius to the plain strain modulus (since in the contact model, these are both combined to get an effective stiffness, although they aren't both linearly proportional in the same way that F_max & L0 are to muscle mass).
I saw a Github issue that combined functions of outputs are being tested as a goal in Moco (which is very exciting, I can think of at least one project where I'd like to try this out). This seems to be somewhat related to function-based parameter optimizations.
Cheers,
Pasha
Function based parameter optimization (for musculotendon parameters)
- Pasha van Bijlert
- Posts: 226
- Joined: Sun May 10, 2020 3:15 am
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Function based parameter optimization (for musculotendon parameters)
Hi Pasha,
I think it's possible to have one solution for both use cases. I'm wondering if something like a "MocoExpressionBasedParameterGoal" would make sense here. You could point to a parameter in the model/problem, and write an expression (similar to classes like ExpressionBasedCoordinateForce) to dictate how it's minimized or constrained.
-Nick
I think it's possible to have one solution for both use cases. I'm wondering if something like a "MocoExpressionBasedParameterGoal" would make sense here. You could point to a parameter in the model/problem, and write an expression (similar to classes like ExpressionBasedCoordinateForce) to dictate how it's minimized or constrained.
-Nick
- Pasha van Bijlert
- Posts: 226
- Joined: Sun May 10, 2020 3:15 am
Re: Function based parameter optimization (for musculotendon parameters)
Hi Nick
That type of implementation would be super useful, I think! I guess for it to work for a musculotendon parameter optimization, it would have to be possible to write an expression using 2 (or more) parameters, although I don't know how challenging that would be to implement.
Best wishes,
Pasha
That type of implementation would be super useful, I think! I guess for it to work for a musculotendon parameter optimization, it would have to be possible to write an expression using 2 (or more) parameters, although I don't know how challenging that would be to implement.
Best wishes,
Pasha
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Function based parameter optimization (for musculotendon parameters)
We've created the following issue to track this feature request: https://github.com/opensim-org/opensim-core/issues/3860.
It shouldn't be too difficult to implement.
It shouldn't be too difficult to implement.
- Pasha van Bijlert
- Posts: 226
- Joined: Sun May 10, 2020 3:15 am
Re: Function based parameter optimization (for musculotendon parameters)
Hi Nick,
Cool, thank you! I'll keep an eye on that GH issue! Presumably even though the Issue title says "minimizing" of parameter values, it also includes constraining them instead of minimizing them?
Cheers,
Pasha
Cool, thank you! I'll keep an eye on that GH issue! Presumably even though the Issue title says "minimizing" of parameter values, it also includes constraining them instead of minimizing them?
Cheers,
Pasha
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Function based parameter optimization (for musculotendon parameters)
Hi Pasha,
Yes, we will make it a MocoGoal, with options to use it as a cost term or endpoint constraint.
Best,
Nick
Yes, we will make it a MocoGoal, with options to use it as a cost term or endpoint constraint.
Best,
Nick
- Pasha van Bijlert
- Posts: 226
- Joined: Sun May 10, 2020 3:15 am
Re: Function based parameter optimization (for musculotendon parameters)
Hi Nick,
I'll be excited to try it out! I think in situations where we're not too sure about the muscle architecture (but are confident about the muscle mass), this would be a cool feature to have. There are also many other applications of such a customizable goal.
Best wishes,
Pasha
I'll be excited to try it out! I think in situations where we're not too sure about the muscle architecture (but are confident about the muscle mass), this would be a cool feature to have. There are also many other applications of such a customizable goal.
Best wishes,
Pasha