Double Inverted Pendulum Stabilizer

YeeChin, Chiam
Supervisor: Professor Stanislaw H. Zak
School of Electrical and Computer Engineering
Purdue University


Abstract

In this project, the behaviour and dynamics of DIPC (Double Inverted Pendulum on a Cart) was simulated, and animated in the 3D fashion. Modeling of the system dynamics was based on the Newton-Euler Mechanics, while the simulation was done by using MATLAB and Simulink. To control and stabilize the pendulum in the unstable upright equilibrium position, a LQR (Linear Quadratic Regulator) controller was used together along with a controller designed based on the Lyapunov theorem. The goal of the controller was to bring the pendulum from the stable equilibrium point up to the upright position, and stabilize it. Finally, animation of the system was shown.

Modeling

The first step to create the animation is to model the system. Modeling of the dynamics of the system can be found in the modeling page here. FBD (Free Body Diagram) and the Newton-Euler equations of different parts in the systems will also be shown in the page. On the other hand, the numerical values of the system parameters are also shown below of the page.

Controller Design

The goal of the controller is to swing the pendulums up into the unstable equilibrium state, and stabilize it. The procedure for designing the controller is shown in this page.To achieve this, the controller will be devided into two parts and switch between three different phases. When the pendulum is in the stable equilibrium point, phase one of the controller will be activated, and the controller will try to swing the first pendulum up. After the first pendulum reach an angle that is small enough for the stabilizer to work, the controller will then switch to phase two. The second phase of the controller will try to stabilize the first pendulum while swinging up the second pendulum. When the second pendulum is swung up onto a small angle, the controller will switch to the third phase, which will stabilize both of the pendulums.

Simulink Model

After developing the system equations and designing the controller, the system is then simulated by using MATLAB and Simulink. Block diagrams of the conplete system and controller can be found here. A non-linear model is used when building the block diagrams, since Simulink is able to handle non-linear calculations. The block diagrams are devided into a few subsystems as shown below:

  Disturbance         Read user input from the keyboard to create disturbance during the simulation
  PendulumsSimulate system dynamics, and providing measured variable to the controller
  ControllerControlelr of the system that can be replaced if the user whish to try other controllers.
  AnimationExporting the data into the Virtual Reality engine to create 3D animation

Animation

After building the system with the controller in Simlink, real time animation can be created by using the Virtual Reality toolbox. Users may also input disturbance at the middle of the simulation and see how the controller react.


More video clips of the animation can be found at the end of this page.

References

- Katsuhiko Ogata: Modern Control Engineering, 5th Edition, Pearson Prentice Hall, Upper Saddle River, New Jersey, 2008
- Alexander Bogdanov: Optimal Control of a Double Inverted Pendulum on a Cart, OHSU, 2004
- K. J. Astrom and K. Furuta: Swinging up a pendulum by energy control, Automica, Volume 36, Issue 2, ,pp. 287-295, 2000
- Tomohiro Henmi, Mingcong Deng, Akira Inoue Nobuyuki Ueki, and Yoichi Hirashima: Swing-up Control of a Serial Double Inverted Pendulum, 2004 American Control Conference, pp. 3992-3997, 2004.