Cart Pole using Lyapunov and LQR control, OpenAI gym

We’re having a lot of trouble hacking together a reinforcement learning version of this, so we are taking an alternative approacg, inspired by wtaching the MIT underactuated robotics course.

It took some pen and paper to get the equations of motion (which are maybe right?).

openai gym has

We switch over to LQR when the y position of the pole is above a certain height

This scipy function solves the algebriac ricatti equation in the ocntinous time infite horizon section

Things that helped: Trying to balance pole first from upright position then from downright.

Tuning weights for theta and thetadot. Thetadot was too small made it unstable

Hacked in the LQR control by adjusting force_mag variable. Nasty.


Put it some slight compensation for a delayed observation, which reflects our actual sensor system






Leave a Reply

Your email address will not be published. Required fields are marked *