double pendulum, added variable bounds#541
Conversation
|
You state the goal is to get the pendulum "approximately upright" but I'm not sure that gives an optimal control problem with a global minimum, i.e. there is no unique solution to the problem. |
|
By "approximately upright" I meant the final state must be anywhere within the bounds preset by the variable bounds. Of course just gut feeling, no proof. |
|
Would a simpler demonstration of these variables bounds be something like bounds on the single applied force to different values throughout time? This would then surely have a global optima. The change to this example would likely be a one line change then. BTW, the thumbnail gif seems to be broken in the rendering. |
|
The solution to this problem is a bang-bang if the torque is not minimized.
If you add or delete figures it will break the thumbnail. The rendered version is visible on every PR. I have the PR renderings set up on this repo. |
So, you think instead of minimizing the time to get the pendulum up I should minimize the torque, e.g.
I must admit I did not look at this this time. NB: I still do not really see why limiting variables should prevent a (local) minimum to be achieved. |
|
I am confused. I thought you added such a example yesterday, but now I see you changed something else on ``swing up variable duration''. |
|
I have not added variable bounds to any example. |
|
I will do it - and very simple! :-) |


As suggested I took the existing double pendulum and added variable bounds.
Interesting:
It is best to start with the final position upright at rest, and use its solution as initial guess for the problem with variable bounds.
Using a solution with variable bounds to find a solution with different variable bounds make iterate for an hour or more.