Control Of Unstable Pendulums

DOI : 10.17577/IJERTV2IS60961

Download Full-Text PDF Cite this Publication

Text Only Version

Control Of Unstable Pendulums

R. Kavitha M.E., final year

Control and Instrumentation Engineering

J.J. College of Engineering and Technology

Dr. S. Sathyamoorthy M.E., Ph.D.,


J.J. College of Engineering and Technology


The standard control problem of the inverted pendulum refers to the task of stabilizing to its equilibrium configuration. Electrical actuators is being used to control. The control action is done by microcontroller called dsPIC. This is an artificial system which comes in the field of non-linear. The concept behind this is used in various fields, especially in robotics. Further the project is enhanced with double pendulums.

General Terms

Control system, nonlinear system.


Inverted pendulum, pendulum, double pendulum, unstable system.

  1. Introduction

    The inverted pendulum system is a standard problem in the area of control systems. They are often useful to show concepts in linear control such as the stabilization of unstable systems. The system is inherently nonlinear, it has also been useful in showing some of the ideas in nonlinear control system. In this system, an inverted pendulum is attached to a motor. Measurements are taken with an encoder fixed with motor and dsPIC. MATLAB/ Simulink are used to implement the controller and analyze the data.

    The inverted pendulum system inherently has two types, one of which is stable while the other is unstable. The downward position of the pendulum refers to the stable point. The system will naturally return to this state in the absence of control force. The stable equilibrium requires no control input to be achieved and thus is uninteresting from a control

    perspective. The upward position of the pendulum shows its equilibrium state and requires a control force to maintain this position. The problem of the inverted pendulum problem is to maintain the unstable equilibrium position when the pendulum initially starts in an upright position. The controobjective for this project will focus on starting from the stable equilibrium position (pendulum pointing down), swinging it up to the unstable equilibrium position (pendulum upright), and maintaining the state.

    The pendulum usually comes with a cart. But here the pendulum is attached to a motor which in turn is attached to an encoder and dsPIC.

    Both software and hardware details is being produced. It is divided into two parts. Simulation of software is done first and then hardware is designed. Software simulation is done by using MATLAB software.

  2. Modelling

    The angular displacement is being measured using encoder which is attached with the motor. Here the pendulum equation and motor equation is clubbed together from which state space equation is obtained.

    1. Pendulum equation

      T =I + mgl sin + K

      = T/I- mgl/I sin – K/I = T/I – mgl/I -K

      where, m is the mass of the pendulum, g is the gravity of the pendulum, l is the length of the pendulum, T is the torque, I is the inertia.

    2. Motor equation

      T = J d/dt + B T = Ki

      Ki = J d/dt + B

      where, T is the torque, J is the moment of inertia, kb is torque constant.

      By considering the pendulum and motor equations we get the following state space equations:

      = x

      = -K x – (mgl/I) x + Kb x – B x = -(R/L) x – (K/L) x + (V/L)

      = (Kb/J) x – (B/J) x

      With the help of this state space model is obtained.

    3. State Matrix

      The values of state matrix are got from considering various system values.

      l = 1m Kt = 1

      m = 0.25 kg Kb = 1

      I = K = 2

      V = 40 v R = 2

      J = 0.25 L = 0.1 mH B = 0.1

      The above values are substituted in state space matrix. X = Ax + Bu

      Y = Cx + Du

      Y =

  3. Block Diagram

    1. Explanation of the block diagram

      The hardware used here is approximated hardware, since hardware excecution is shown in next phase. The blocks used in hardware are scale (pendulum), motor,

      encoder, microcontroller (dsPIC), motor driver, power supply.

      The pendulum is hold in upright position. The value is then calculated by encoder and this value is send to dsPIC microcontroller which is being programmed with PID value. The PIC microcontroller commands the motor driver. According to that the pendulum is being stabilized.

      Shaft has an insulating disc which is connected to metal disc having concentric rings. The sliding contact fixed to the stationary has a contact wipes from a metal disc at a distance from the shaft.

      Shaft has a rotating disc in which some of the contact touch metal, while others fall in the metal gaps. Source of electric current is connected with metal sheets. Separate electrical sensor is connected to sensor.

      There is a unique code which is a energy code which shows the position of the axle in the metal pattern. Current sources are connected to contacts which is switched ON and the others are switched OFF. The main application is in radio receiver.

      The encoder is of two types. They are absolute encoders and relative (or incremental) encoder. The encoder used here is incremental encoder. Output of incremental encoder provides information about the motion of the shaft, which is typically further processed elsewhere into information such as speed distance and position.

      Shaft encoder is an electro mechanical encoder which is rotatory in type and gives analog or digital code.

  4. Experimental Result

    Software simulation is being done by using MATLAB software. The state space equation is taken in open loop and the following graph is obtained.

    Previous graph is open loop system graph. Now a controller called PID controller is used to control the system which is in closed loop. Thus the output graph is obtained by using a controller called PID controller. The graph is got by comparing the values of Zn-II tuning method. After that manual tuning is done and the output is obtained. The resulting output is shown below.

    In these graphs x-axis represents time and y-axis represents angular displacement .

  5. Conclusion

    Experiment is conducted by using a single pendulum. The experiment is further enhanced to double pendulums. In single beam two pendulums are attached

    which is controlled by a single motor encoder combination.

  6. Acknologement

    I wish to express my profound greatfulness to God Almighty and my parents for helping me procure such a challenging and an interesting project.

    Heartfelt thanks to our respected and beloved Chairman Prof .K. Ponnusamy, M.Sc., B.L., our Advisor, Dr.V.Shanmuganathan, B.E., M.Sc. (Engg.), Ph.D., and our Principal, Dr.S.Sathiyamoorthy, M.E., Ph.D., for their support in doing this work.

    I owe my immeasurable debt of gratitude to my guide Dr.S.Sathyamoorthy, Principal of J.J College of Engineering and Technology, who motivated me throughout the project to accomplish my task successfully with ease.

    I would like to express my sincere thanks to Mrs.M. Banusundareswari, M.Tech. Head of the department, and Department of Electronics and Instrumentation for her review of my thesis and her useful opinions.

    Finally I thank all for their constant encouragement, support and motivation throughout my post graduate career and for always being there for me.

  7. Reference

Astrom, K.J and K.Furuta, Swinging up a pendulum by Energy Control, Automatica, Vol. 36,2000

Smith, R.,ECE 147b/ECE 238 Course Webpages,

Eker. J and K.J. Astrom, A Nonlinear Observer for the inverted pendulum, 8th IEEE Conference on Control Application, 1996

K. Ogatta, Modern control Engineering, Fourth edition, Perason education 2002

M. Gopal, Modern Control System Theory, New age International Publishers, 2nd edition

Hasan Khalli, Nonlinear systems and control, Prentice Hall

Leave a Reply

Your email address will not be published.