This repository contains the code for the following Youtube tutorial:
Run the script main.m to start the simulation and the script deriveOde.m
to symbolically calculate the system equations of motion.
References used in the Tutorial:
- https://en.wikipedia.org/wiki/Inverted_pendulum
- https://en.wikipedia.org/wiki/Optimal_control
- http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.622.6114
You will need GNU Octave and two additional packages, to run the scripts:
- https://www.gnu.org/software/octave/
- https://octave.sourceforge.io/control/
- https://octave.sourceforge.io/symbolic/
You can also use Matlab to run the scripts. You need to slightly modify them, however.
Delete "pkg load control" in main.m and "pkg load symbolic" in deriveOde.m,
since Matlab doesn't know these commands.
Patrick Suhm