Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement analytic specification of the cost function. #30

Open
1 task
moorepants opened this issue May 22, 2015 · 3 comments
Open
1 task

Implement analytic specification of the cost function. #30

moorepants opened this issue May 22, 2015 · 3 comments

Comments

@moorepants
Copy link
Member

  • Support the integral a general function of the states and inputs.
@moorepants moorepants added this to the Initial Release: 0.1.0 milestone May 22, 2015
@moorepants
Copy link
Member Author

@tvdbogert I'm going to try to implement functionality that lets you pass in an analytic cost function. I'm basically going to support integrals (or combinations of integrals) that get converted to the proper numerical code underneath. The cost function will allow integrals of functions of the state, exogenous inputs, extra values (like the measurement of the states for tracking), and the system parameters. My main example case would be something like the sum of two integrals: an effort term and a tracking term, where the tracking could be a complicated function of the states (like tracking GRFs in walking). Do you have other examples of cost functions that may be good to support?

@tvdbogert
Copy link
Member

Other cost functions that can be useful:

"minus speed" (for sprint optimization). This is simply the horizontal position of the body at the final node, divided by movement duration

"metabolic energy" which is the integral of energy rate, which is a function of muscle state variables and controls. The model that is most commonly used (Umberger 2010) has some "if" statements though and some discontinuities. This will need some work. Even if made continuous, it may be hard to code as an analytical function. Maybe allow for numerical functions too? With user-provided derivatives?

@tvdbogert
Copy link
Member

Oh, and various formulations of effort can be possible.

Instead of squared muscle controls, using cubed.

Or first take the mean of each muscle control over time, then square or cube them, and add them up. This is (theoretically) closer to a minimum fatigue function than when you cube it first and then integrate. This is no longer an integral of a function of states and controls, so this one also may require a user-supplied piece of code rather than an analytical function.

Let's focus on the cost function you need now (which is just tracking cost) but it is good to have the possibility of adding others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants