I created a controller for the classic Cart-Pole system. The controller was created programmatically by:
- Deriving the equations of motion using Lagrangian Mechanics
- Linearizing the equations of motion about the point where the cart is stationary with the pole balanced upright
- Creating a PD controller using the linear quadratic regulator algorithm
- Testing the controller on the original (non-linear) system under various initial conditions
You can read the full paper here.
The following graphs show some of the results: