In order to run the simulation, simply run main.py
In order to save animations ImageMagick is required. It can be installed from here: https://imagemagick.org/script/download.php
The equations of motion that are presented below. Here the pendulum and cart viscous damping is set to zero. I.e.
Cart equation:
Pendulum equation:
In order to swing the pendulum up, an energy pumping method is used.
Where
The linearized equations of motion, in state space representation, is presented below. The model is applied when calculating the state feedback gain matrix.


