This is a big project I've been thinking about in some form for a couple of years but only really started on in earnest a few months ago, after taking the MIT/edX Underactuated Robotics course. After taking that course (well, most of it - I ran out of time to finish, but it's on my to-do list!) I realised that the techniques I'd learnt about should allow me to build a controller for a double pendulum cart.

Incidentally as an aside, if you're interested in robotics and control, and are looking to go beyond the classical control material that you learn on an undergraduate engineering degree, then I really recommend that course. For years MIT has been putting a lot of the content from its courses online for free, but unfortunately it's a bit of a mixed bag. Occasionally you'll find a complete course - videos of lectures, notes, problem sets and answers etc, but most of the time it'll only be the notes or some lectures. Even if everything is there it takes quite a lot of self discipline to work through it all to the end. The edX version of the Underactuated Robotics course is incredibly impressive. The lectures are released to a schedule with accompanying (autograded) problem sets and a forum where all enrollees can discuss the course. It's actually pretty amazing that this content is available at all without actually being a student, but this way of delivering the material takes it to the next step - it's probably the closest thing to doing the course in person.

Anyway, back to the pendulums. I've actually written an overview of the project with some videos, but in short, a double pendulum cart consists of a cart free to travel along a linear rail, with two pendulums in series dangling from the cart. The only actuator is a force input into the cart parallel to the rail - the pendulums are completely unactuated (hence it's an underactuated system, in this case one actuator, three degrees of freedom). The challenge is to design a controller that can swing the pendulums into the vertical position, or some other stable pose, e.g. one pendulum hanging down and one up, and to keep them stable in that configuration in response to disturbances.

Right now the project consists of a small trajectory optimization library that implements a technique called direct collocation, plus various supporting functions for closed loop control, animation, derivation of equations of motion etc, all implemented in Matlab. Using this I've successfully generated swing up trajectories, and the closed loop controller seems robust enough to cope with quite large perturbations of the system initial conditions etc. I think I've got almost as far as I can in software, and I need to start thinking about how to actually build the system for real. More on that next time...

Incidentally as an aside, if you're interested in robotics and control, and are looking to go beyond the classical control material that you learn on an undergraduate engineering degree, then I really recommend that course. For years MIT has been putting a lot of the content from its courses online for free, but unfortunately it's a bit of a mixed bag. Occasionally you'll find a complete course - videos of lectures, notes, problem sets and answers etc, but most of the time it'll only be the notes or some lectures. Even if everything is there it takes quite a lot of self discipline to work through it all to the end. The edX version of the Underactuated Robotics course is incredibly impressive. The lectures are released to a schedule with accompanying (autograded) problem sets and a forum where all enrollees can discuss the course. It's actually pretty amazing that this content is available at all without actually being a student, but this way of delivering the material takes it to the next step - it's probably the closest thing to doing the course in person.

Anyway, back to the pendulums. I've actually written an overview of the project with some videos, but in short, a double pendulum cart consists of a cart free to travel along a linear rail, with two pendulums in series dangling from the cart. The only actuator is a force input into the cart parallel to the rail - the pendulums are completely unactuated (hence it's an underactuated system, in this case one actuator, three degrees of freedom). The challenge is to design a controller that can swing the pendulums into the vertical position, or some other stable pose, e.g. one pendulum hanging down and one up, and to keep them stable in that configuration in response to disturbances.

Right now the project consists of a small trajectory optimization library that implements a technique called direct collocation, plus various supporting functions for closed loop control, animation, derivation of equations of motion etc, all implemented in Matlab. Using this I've successfully generated swing up trajectories, and the closed loop controller seems robust enough to cope with quite large perturbations of the system initial conditions etc. I think I've got almost as far as I can in software, and I need to start thinking about how to actually build the system for real. More on that next time...