state variables vs. unknown input trajectories #449
Replies: 3 comments
-
You should be able to set instance constraints on unknown input trajectories now.
The differentiation in a state and an input (or "control") in a dynamical system is clear. One is specified apriori in time (inputs) and the other evolves in time based on the definition of the derivative. The distinctions are present in opty because it is a tool to solve optimal control problems of dynamical systems. But the tool converts this problem to an NLP problem which does not have distinction between these two things, at least not in a mathematical sense. So, as you've discovered, you don't have to stick to this distinction. I think we should keep the concepts in opty because we are often seeking the inputs/controls that cause the evolution of the states to behave in a certain way. We can change opty to support all needed functionality, for example supply delta and deltadot as controls (as in the bicycle countersteering example) without breaking the conceptual divisions. If you want such functionality, I suggest you provide concrete examples of what you desire in an issue (just like what we have done for all feature requests) and then we can try to implement it. The more specific the proposal, the easier it is to evaluate it and possibly implement it. |
Beta Was this translation helpful? Give feedback.
-
|
I made a comparison between using state variables to enforce a terminal instance constraint and using unknown input trajectories to do it. backed='cython'
backed='cython' I guess, minimally one can say, that using unknown trajectories instead of state variables speeds up the calculation quite a bit. The simulation was this: |
Beta Was this translation helpful? Give feedback.
-
|
I ran more tests, and consistently convergence was much faster with unknown input trajectories. In some cases the time differential is needed. Up to now, one has to use state variables for this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The main difference between them seems to be:
In my practical simulations this made no difference, I simply converted an unknown trajectory to be a state variable when I needed these features.
In a 'formal' way it may look 'better' to keep state variables and unknown input trajectories separate.
Would it be possible to endow these trajectories with the same features as state variables?
Beta Was this translation helpful? Give feedback.
All reactions