A python version of inverted pendulum control code from control boot camp.
Python 3
- numpy
- taichi (0.6.8)
- control
- matplotlib
- scipy
Maxima
- wxmaxima (for gui)
Use wxmaxima for lagrange euqation computation. Please refer to pyVersion/cartpend.wxmx
cd pyVersion # for run all script
python sim_cartpend.py
python poleplace_cartpend.py
- To visualize how linearizad model perfroms at place away from linearized point, run:
python linearize_cartpend.py
Here I add a periodical force to the cart to for more visual impact.
python lqr_cartpend.py
- To play with observability, run:
python obsv_cartpend.py
python kf_cartpend.py
Here the controller is move the cart-pend system from initial state (x, x_dot, theta, theta_dot): [0.0, 0.0, 0.0, 0.1] to [0.3, 0.0, 0.0, 0.0]
python lqg_cartpend.py