CMU RI 16-711: KDC: Assignment 5

This assignment explores designing a controller and a global policy for an unstable system (cart-pole).

Here is a simulation of an inverted pendulum balanced on a cart. Your goal is to develop controllers for this system that get and keep the pole pointed upwards. Use the useful and lib directories from a previous assignment.

Part 1: Try to design a controller by hand for this system. The point of this part of the assignment is to make you appreciate automatic controller design methods. If you think this is too easy, manually design a controller for a jointed pole on a cart, a flexible pole, two unequal length poles on the same cart, or a system with a 0.2 second delay in responding to commands.

Part 2: Design an LQR-based controller for this system. You must choose the optimization criterion. Find the LQR-based controller with the biggest volume of initial conditions in state space for which it works. You can model the volume with a grid, or try to estimate the volume with an ellipsoid. Test what happens when the optimization criterion has a very small penalty on the pole angle vs. a very small penalty on the cart position. Why is there a difference.

Part 3: Design a global policy that can swing the pendulum up to the top using dynamic programming. The criterion you should use is a pure quadratic criterion x'*Q*x + u'*R*u where x is the state vector, u is the action vector, and Q and R are identity matrices. What volume of intial conditions in state space where the LQR controller for the same criterion has a value function that is less than twice the value function of the optimal policy?

Part 4: Just for fun: Let's measure how humans do this task, and try to identify what the human controller is. Software to be provided.

Things to think about: Does a longer or shorter pole make this easier or harder? Does viscous friction help? Does Coulomb friction help? How handle static friction?

Another thing to think about: How do you get LQR control design to generate an integral gain?


What to turn in?

Generate a web page describing what you did. Include links to your source and compiled code in either .zip, .tar, or .tar.gz format. Be sure to list the names of all the members of your group. Mail the URL of your web page to and cc [You complete the address, we are trying to avoid spam.] The writeup is more important than the code. What did you do? Why did it work? What didn't work?

You can use any type of computer/OS/language you want. You can work in groups or alone.