A double inverted pendulum is a non linear control complexity. The aim of the system is to balance a pendulum hinged to another pendulum, which in turn is attached to an arm which is driven by a motor. Here I have made use of an LQR, full state feedback to stabilize the system. The animation of the system is also displayed. Using this approach even triple and higher stages of inverted pendulums can be developed. The system is animated also.
Hi man just one question... After you linearize your model with linmod and use lqr to discover the K matrix how you include it in simulink? I mean you will actually get from LQR the full matrix K and you just can't copy and past it over simulink lqr block