100% found this document useful (1 vote)
38 views11 pages

Inverted Pendulum

Uploaded by

Venkateshwaran A
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
38 views11 pages

Inverted Pendulum

Uploaded by

Venkateshwaran A
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg.

310-320

Available Online at [Link]

International Journal of Computer Science and Mobile Computing


A Monthly Journal of Computer Science and Information Technology

ISSN 2320–088X

IJCSMC, Vol. 3, Issue. 5, May 2014, pg.310 – 320

RESEARCH ARTICLE

Stability Analysis and State Feedback


Stabilization of Inverted Pendulum
Nithya.R1, Dr. Vivekanandan.C2
1
PG scholar, SNS College of Engineering, India
2
Vice principal, SNS College of Engineering, India
1
nithyablackrose7@[Link], 2 [Link]@[Link]

ABSTRACT - An inverted pendulum fitted on the moving cart (IPMC) represents a class of nonlinear system and
is inherently unstable. Stabilizing such nonlinear systems is still a challenging objective for control engineers. It
is very difficult to keep the pendulum always in upright position as it is highly sensitive to even a small
disturbance and tend to fall down. Hence, the objective of the control mechanism is to maintain the pendulum up
right position always by moving the cart back and forth, as long as the angle of deviation from upright position is
within the admissible range. Several strategies such as Model Reference Control, Adaptive control, Sliding mode
control, state feedback control etc., have already been proposed with reasonable accuracy for the control of
IPMC problem. In the first part the mathematical model has been derived using fundamental principles, the
controller has been designed using state feedback control technique and the entire system has been simulated
using MATLAB-Simulink. The simulated results show that the performance of IPMC is satisfactory with state
feedback control.
Keywords- Inverted pendulum, state feedback, nonlinear systems

1. INTRODUCTION
The inverted pendulum is a simple classic nonlinear mechanical device which models many physical
systems. For example in Balancing a broomstick on our index finger or palm the position of our hand is
constantly adjusted in order to keep the object at upright position . An inverted pendulum does basically
the same thing. But it is limited in that it only moves in one dimension. The force must be applied to keep
the system intact. The real life examples of inverted pendulum are Rockets and Missiles, Heavy Cranes
lifting containers in shipyards, Self balancing Robots, and Future Transport Systems like Segways, Jetpack
etc.... Some of the applications of 1. Inverted pendulum system are Simulation of dynamics of a robotic
ARM, [Link] of a human standing still. In the first example the inverted pendulum problem resembles
the control systems that exist in robotic arms. The dynamic of Inverted Pendulum simulates the dynamics
of robotic arm in the condition when the center of pressure lies below the center of gravity for the arm so

© 2014, IJCSMC All Rights Reserved 310


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

that system is also unstable. Robotic arm behaves very much like inverted pendulum under this condition.
In the second example a standing human looks like an inverted pendulum with the gravity center well
above the ground. The feet of a standing human have plate like soles, rather than simple pivots. These
plate-like soles are essential to stabilizing a standing posture. As an extreme counter example is the cruel
three thousand years practice of foot wrapping of females in china until beginning of the 20th century that
made a woman tooter while walking.

Fig 1: Schematic of an inverted pendulum on a moving cart

The IPMC is made up of a cart and a pendulum as shown in Fig (1). The goal of the controller is to
move the cart to its commanded position without causing the pendulum to tip over. In open loop this
system is unstable. The cart is driven by a DC motor or any other driving mechanism, and a pendulum is
attached to the cart. The cart can move along a horizontal track, and the pendulum is able to rotate freely
with respect to vertical in the vertical plane parallel to the track. By moving the cart front and back the
pendulum can be kept at upright position. In this work the permanent magnet D.C motor is used for the
cart movement. In the Figure.1.2 the mass of the cart and the pendulum are represented as M, m
respectively. Several methods have been proposed to control the IPMC, such as traditional PID control,
fuzzy control, genetic algorithm optimizing control, linear quadratic regulator etc. For higher order
systems the PID control method is not suitable and it cannot directly be used in several more complicated
cases, especially in MIMO (Multi Input Multi Output) systems. As the PID controller can control only one
variable and the inverted pendulum system is one input-two output system and requires double PID
controllers, the control strategy is complex. This article presents a state feedback control technique for
stabilization of the inverted pendulum on a moving cart.
2. SYSTEM DESCRIPTION AND MODELLING
2.1 System Description
The IPMC has simple architecture as shown in the Fig 2. The physical system consists of cart, driven by a
DC motor, and a pendulum attached to the cart. The cart can move along a horizontal track, and the
pendulum is able to rotate freely with respect to vertical in the vertical plane parallel to the track. There is
no direct control applied to the pendulum. In the Fig (2) the mass of the cart and the pendulum are
represented as „M‟ and „m‟ respectively.
The objective is to maintain the pendulum at upright position, i.e. θ = 0 with respect to perpendicular axis,
by moving the cart forth and back. Since the equilibrium at θ=0 is unstable, such control objective has to
be achieved while maintaining the stability of the system. The IPMC system inherently has two
equilibrium points, one of which is stable while the other is unstable. The asymptotically stable

© 2014, IJCSMC All Rights Reserved 311


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

equilibrium is when the pendulum is pointing downwards and in the absence of any control force the
system naturally tends to return to this state. The unstable equilibrium however, is when the pendulum is
standing exactly upwards and so a control force is needed to keep it in this position. The movement of the
cart can be achieved by an ironless permanent magnet linear motor. Linear motor is a new type of driving
device which can directly transform electric energy to mechanical linear motion. A control force exerted
by the linear motor is required on the cart to maintain the pendulum in its upright equilibrium.

θ
Pendulum (m)

cart Error
i
M

VRe
f

Power
amplifier
Torque
motor

Fig 2: Schematic of an IPMC driven by the linear D.C motor

2.2 Nonlinear differential equations of system motion


A schematic of the inverted pendulum is shown in Fig. 3. In this paper, the simulation is based on a
direct driven inverted pendulum system, in which a pendulum is mounted on a stage driven by an ironless
permanent magnet linear motor.

Fig 3: Schematic of IPMC driven by permanent magnet linear motor


The motion equations of the cart and pendulum in Fig (3) can be obtained using Hamilton‟s principle, shown in (1), (2):

(1) (2)

where x is the position of the cart, θ is the pendulum angle, measuring from the upright position, F is the
force applied to the cart, Ffric(t) is the friction force between cart and the track, and ffric(t) is the friction
force between the pendulum and the pivot, which is very small thus ignored. In this section, since we

© 2014, IJCSMC All Rights Reserved 312


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

concern the design of the inverted pendulum controllers, especially the dynamic performance of the
controllers, the friction forces are simplified as viscous frictions, as in (3).
(3)

In (3) is coefficient of viscous friction.


Table 1. Parameters in the inverted pendulum system

Parameter Description Value


Mass of the cart 1.336kg

Mass of the pendulum 0.083kg

Distance from the pivot to mass center of


0.1685m
the pendulum

Gravitational constant 9.8m/s2

Current to force conversion factor

Coefficient of viscous friction 0.1N/m/sec

2.3 Mathematical model of system input force


The effective electromagnetic thrust applies by the linear motor to the cart is given by (4)

(4)

where λPM is flux linkage generated by permanent magnet, Ld and Lq is flux linkage of d-axis and q-axis
respectively. The linear motor adopts the zero d-axis current control method, thus the applied force can be
simplified as (5).
(5)

In equation (5) iq is the q-axis current after coordinate conversion from the external current supplied to the
linear motor, and Kf is current to force conversion factor.
2.4 Mathematical model of inverted pendulum
Combine the equations (1), (2) and the input force equation (5), solve for and from the differential
equations, and introduce the variable then after linearization the first-
order mathematical model of the inverted pendulum system can be obtained as described in (6).

(6)

© 2014, IJCSMC All Rights Reserved 313


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

3. APPLICATION OF STATE FEEDBACK TECHNIQUE TO IPMC

3.1. State feedback pole placement problem formulation:


The delay free completely controllable Linear time in variant system can be described as follows

, (7)

n
Where is the state vector and is the control input.
and are the system matrix and the control gain vector, respectively. is constant
matrix. From A , the characteristic polynomial can be written as

where a=[a0 a1……an] , a0=det(-A) and an-1=-trace(-A). The eigen values of the matrix
determines the stability of the system. The control signal u can be chosen such that

(t) (9)

Where is the designed feedback gain matrix. Therefore the control signal u is determined by
instantaneous states. Such a scheme is called state feedback. The block diagram representation is shown in
the below Fig (4). This closed loop system has no input. It objective is to maintain the zero input. Because
of the disturbances that the output will deviate from zero. The nonzero output will be returned to the zero
reference input because of the state feedback scheme of the system. Such a system where the reference
input is always zero is called a regulator system.

3.2. Pole placement


If the system considered is completely state controllable, and if all the state variables are measurable then
poles of the closed loop system can be placed at any desired locations by means of state feedback through
an appropriate state feedback gain matrix. Let the desired closed loop poles are s=µ1, s=µ2, s=µ3…….
s=µn. By choosing appropriate gain matrix for state feedback, it is possible to force the system to have
closed-loop poles at desired locations, provided that the original system is completely state controllable.
From equation (7) the closed loop system can be represented as follows
(10)

Then the solution of this equation is given by

Where x(0) is the initial state caused by external disturbances. The stability and transient response
characteristics are determined by the eigen values(also called as regulator poles) of matrix . The
problem of placing the regulator poles at The desired location is called as pole placement.

© 2014, IJCSMC All Rights Reserved 314


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

X y
B C
u

-K

Fig 4: Schematic of regulator system

3.3. Determination of gain matrix k using ackermann’s formula


The K can be determined by the following formula, (11)

Where is given by as follows

(12)

3.4 Design of Type-1 Sservo system with plant has an integrator


Many control systems, require the system output to track an external reference input. In such cases, this necessitates modifying the design
equation of the pole placement and the state observer. These types of systems are known as servo systems and as shown in the Fig (5). In this
figure the integrator, together with state feedback scheme, is used to stabilize the system and asymptotically track step reference inputs with
zero steady-state error. If the plant is defined by equation (7) with D=0, then the type 1 servo system can be designed by as follows.
X
r u Y=x1
kI y=CX

K2

K3

Xn
Kn

Fig 5: Block diagram of Type-1 servo system

© 2014, IJCSMC All Rights Reserved 315


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

The control signal u is given by

(13)

(14)

Where and r is the reference signal

Then equation (7) becomes

(15)

And the error dynamics can be given by

(16)

4. SIMULATION ANALYSIS OF IPMC


The developed mathematical model of state feedback (Type 1 servo system) based IPMC is
simulated using MATLAB-Simulink. The disturbance to the system is given as unit step. State signal z1
represents the position of the cart and z2 represents the velocity of the cart. State signal z3 represents the
angle of the pendulum and z4 represents the angular speed. The output which is the deflection of
pendulum with respect to vertical axis is assumed as one the state variables. Typical values assume for
different components of the proposed inverted pendulum model is given in Table 1.
The state matrices A, B can be calculated using equation (6),

And the output matrix is given by

The matrix C can be calculate using the above equation

The settling time assumed is 3 seconds with a maximum peak overshoot of 15%.
Therefore, ts= 3 sec and Mp=15%.

(17)

(18)

From equations (17) and (18) ζ=0.5 , ωn=2.6667 rad/sec. Desired closed loop poles are given by the
following equation, (22)

© 2014, IJCSMC All Rights Reserved 316


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

µ1=-1.3+j2.25, µ1=-1.3-j2.25, µ1=-6.5, µ1=-6.5.


The characteristics polynomial of the system matrix of the desired system is given by

The gain matrix can be calculated using the Ackermann‟s formula and is given by

Where is obtained by substituting the system matrix in the characteristic equation of the desired
system as follows

And is controllability matrix and hence given by

Therefore the feedback gain matrix is evaluated


as

5.1. Response of state signals:

Fig 6: Response of the state signal -position of the cart

From Fig (6) to Fig (9) it is observed that the system is initially in stable state with pendulum in upright
position. At time the disturbance in the form of step is exerted at the reference input. This results in
moving the cart from left to right i.e. in the negative direction as shown in the initial phase of Fig (6).

© 2014, IJCSMC All Rights Reserved 317


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

Fig 7: Response of the state signal - velocity of the cart

The velocity at which the cart moves and the angular velocity of the pendulum are given in Fig (7) and Fig
(9) respectively and they follow the same pattern of response for obvious reasons. At time t=1 the speed of
the cart is gradually increases up to 0.7 m/s and it is gradually decreases to zero in 3 sec.

Fig 8: Response of the state signal – Angle ( )

Fig (8) shows the plot of during the stabilization when the unit step disturbance is applied. The angle
deviates from 0.02 to -0.02 radians in the time interval of 1 to 3 sec. The pendulum angle is stabilized in
the 3 sec i.e., . Due to the movement of the cart from left to right it is obvious that the pendulum,
because of its inertia, moves in the opposite direction to that of the cart movement and due its unstable
nature the amount of deflection is relatively larger as shown in Fig (9). The error generated due to the
deflection of the pendulum is fed to the state feedback controller and controller in turn generates the
control signal to bring back the pendulum to upright position by applying force to the cart in the
appropriate direction as shown in Fig (6) which makes the pendulum to move opposite direction and this
process continues with forced required fall gradually. As per the design the settling time is found to be
around 3 seconds as observed from Fig (9).

© 2014, IJCSMC All Rights Reserved 318


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

Fig 9: Response of the state signal – Angular velocity

The velocity of the angle deviates from 0.1 to -0.1 radians/sec in the time interval of to 3 sec. And it
is settled down to zero in 3 sec.
The pattern of control signal generated by the state feedback controller is given in Fig(10). It is noticed its
magnitude is high when the error is more and gradually falls down to zero with oscillation in line with the
magnitude and sign of error.

Fig 10: Response of control signal u

5. CONCLUSION AND FUTURE WORK


5.1. Conclusion
A complete analysis and design of state feedback controller to stabilize IPMC is presented in this work..
The IPMC problem is highly nonlinear and unstable and hence, the linear mathematical model of it is
developed after linearizing the nonlinearities using Taylor series method and Type-I servo system based
state feedback technique has been designed to stabilize IPMC. The designed controller is simulated in
MATLAB-Simlink and results obtained show satisfactory performance as long as the disturbance is
limited. To control cart movement a permanent magnet DC motor is proposed.

© 2014, IJCSMC All Rights Reserved 319


Nithya.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014, pg. 310-320

5.2. Future work


The state feedback methods proposed in this work is applied to the linearized model and without
considering parameter uncertainties. A relatively new technique Quantitative Feedback Theory may be
applied as it includes parameter uncertainties. IPMC is regulator problem and its stability is mainly
influenced by parameter uncertainties that may arise due to model approximations and uncertainties and
QFT addresses these issues effectively, QFT based controllers may yield better results than that of those
offered by other controllers. However, estimating plant uncertainty and modeling environmental
disturbances are challenging issues for a control engineer.

REFERENCES

[1] Adrian-Vasile Duka, Stelian Emilian Oltean, Mircea Dulau, (2007) “Model Reference Adaptive Vs. Learning Control For The
Inverted Pendulum. A Comparative Case Study”, Department of Electrical Engineering “Petru Maior” University 4300 Tg. Mures,
N. Iorga St. No.1, Romania.

[2] Amr A. Roshdy, Yu zheng Lin, (2012) “Stabilization of Real Inverted Pendulum Using Pole Separation Factor”, International
Conference on Mechanical Engineering and Material Science.

[3] Colin Gauld, “Pendulums in Physics Education”, University of New South Wales, 9 Michael Crescent, Kiama Downs, NSW, 2533.

[4] Danbing Seto, and Lui Sha, (November 1999) “A Case Study on Analytical Analysis of the Inverted Pendulum Real-Time Control
System”.

[5] Eugene I. Butikov, (19 January 2001), “On The Dynamic Stabilization Of An Inverted Pendulum”. St. Petersburg State University,
St. Petersburg, Russia.

[6] Furuta, K., and Iwase, M.,(2004) “ Swing-Up Time Analysis Of Pendulum”, Department of Computers and Systems Engineering,
Tokyo Denki University Hatoyama-cho, Hiki-gun, Saitama 350-0394, Japan.

[7] Jirí Marholt, and Frantisek Gazdos, (2010) “Modelling, identification and simulation of the inverted pendulum PS600”, Department
of Process Control, Faculty of Applied Informatics, Tomas Bata University in Zlín, Zlín, Czech Republic.

[8] Kaveh Razzaghi , and Ali Akbar Jalali, (2011) “A New Approach on Stabilization Control of an Inverted Pendulum, Using PID
Controller” , International Conference on Control, Robotics and Cybernetics.

[9] Khalil Sultan, “Inverted Pendulum Analysis, Design and Implementation”.

[10] Krishnan Pandalai, Manav Kataria “Inverted Pendulum Control System”.

[11] Rakesh Krishnan, T. and Prof. Bidyadhar Subudhi, (2012) “On Stabilization of Cart-Inverted Pendulum System: An Experimental
Study”.

[12] Tihomir ilic, Danijel Pavkovic, Davor Zorc , (2009) “Modeling and control of a pneumatically actuated inverted pendulum”, ISA
Transactions 48 (2009) 327-335.

[13] Tushar Jain, Member, IACSIT, IAENG, M.J. Nigam, (2012) “Tuning of Type-1 Servo System Using Swarm Intelligence for SIMO
Process”, International Journal of Computer and Electrical Engineering.

[14] Wende Li, Hui Ding, and Kai Cheng, (2011) “An Investigation on the Design and Performance Assessment of double-PID and LQR
Controllers for the Inverted Pendulum”, UKACC International Conference on Control.

[15] Weiwen Wang and Zhiqiang Gao, “A Comparison Study of Advanced State Observer Design Techniques”, The Applied Control
Research Laboratory Department of Electrical and Computer Engineering Cleveland State University, Cleveland OH 44114.

[16] Witchupong Wiboonjaroen, and Sarawut Sujitjorn, (2011) “Stabilization of an Inverted Pendulum System via State-PI Feedback”,
International Journal Of Mathematical Models And Methods In Applied Sciences.

© 2014, IJCSMC All Rights Reserved 320

You might also like