HW6 -- how well should solutions match?

HW6 -- how well should solutions match?

autor Brož Petr -
Počet odpovědí: 2
Hi, after solving HW6, I get a solution that "kind of" matches the reference solution from lab files. However, there is clearly a difference: in figures below, the scatter plot is the reference solution while the continuous plot is my solution.prubeh vstupu - ref vs moje reseni
I've spent north of 20 minutes fiddling with the initial guess. I did manage to break it completely (to a trajectory which satisfies the boundaries but takes amplitude of several hundreads in the middle) but I never managed to get it to fit the reference solution perfectly. I guess I could try parametrizing the ref. solution exactly and using that as the guess, but that seems pointless.

Is this solution good enough or is this indicative of an error in my code somewhere else than in the choice of initial guess?

V odpovědi na Brož Petr

Re: HW6 -- how well should solutions match?

autor Gurtner Martin -
Hi Peter,

It seems like you may have made an error when determining the two-point boundary value problem. To check this, you can attempt to simulate the pendulum system's response using your optimal control input. If the response successfully moves the pendulum to the upright position, then you have a feasible solution, even if it might not be an optimal one. In this case, the solution would still be considered successful.

M.
V odpovědi na Gurtner Martin

Re: HW6 -- how well should solutions match?

autor Brož Petr -
Thanks for the reply -- I've checked my trajectory in simulation and it does successfully move the pendulum to the upright equilibrium.
-P