You are on page 1of 5

ISBN-13: 978-1535448697

Proceedings of ICRMET-2016

Modelling and Controller Design Of Cart Inverted


Pendulum System Using MRAC Scheme
Rathu Krishna N

Dr. Bindhu K. R.

Vinod B.R

M.Tech Student, Electronics and


Communication Department
College of Engineering, Trivandrum

Professor, Civil Department


College of Engineering, Trivandrum

Assosciate Professor, Elecronics and


Communication Department
College of Engineering, Trivandrum

widely used for control of under actuated systems, have the


potential problem of chattering, which is a high frequency
oscillation present during the control [6].A neural network
based motion control of cart inverted pendulum system is
proposed in [7].he controller is developed for wheeled inverted
pendulum models like SEGWAY, which is an example of
inverted pendulum system.The application of model reference
scheme and Linear quadratic regulation is also investigated
in this work.Using this indirect control trajectory (the desired
trajectory of forward movement) developed, the controller was
able to indirectly control the tilt angle such that it tracks
the desired trajectory asymptotically. The developed scheme
achieves dynamic balance and desired motion tracking.
In this paper model reference adaptive control algorithm based
controller is used to stabilize the pendulum.In MRAC,[2] the
technical demands and the desired input output behaviour
of the closed-loop system are given via the corresponding
dynamic of the reference model. Therefore, the basic task is
to design such a control, which will ensure the minimal error
between the reference model and the plant outputs despite the
uncertainties or variations in the plant parameters and working
conditions.The Main approach is to design a model reference
adaptive controller using the stability theory of Lyapunov.
This theory assures that the system at equilibrium point is
asymptotically stable and is preferred for a second order
system[8][9] as it yield better performance than MIT Rule.

AbstractThe Cart-Inverted Pendulum System (CIPS) is


a classical benchmark control problem.The control of this
system is challenging as it is highly unstable, highly non-linear,
non-minimum phase system and under actuated.The basic
control objective of the inverted pendulum is to maintain the
unstable equilibrium position, by controlling the force applied
to the mobile cart in the horizontal direction.In this paper a
controller is designed for the stabilization purpose based on
the stability theory of Lyapunov which is one of the model
reference adaptive control (MRAC) methods.The performance
of the proposed control algorithm is evaluated and shown by
means of digital simulation.
Keywords -Lyapunov, MIT rule, Model Reference Adaptive
Control, Cart Inverted Pendulum

I. INTRODUCTION
The International Federation of Automatic Control (IFAC)
Theory Committee in the year 1990 has determined a set
of practical design problems that are helpful in comparing
new and existing control methods and tools as benchmark
control problems.An Example of such a classical benchmark
control problem is a Cart-Inverted Pendulum System (CIPS).
Its dynamics resembles with that of many real world systems
of interest like missile launchers,pendubots, human walking
and segways and many more. The control of this system is
challenging as it is highly unstable, highly non-linear, nonminimum phase system and underactuated [1].
The system consists of a rigid mass connected to a cart,
which is constrained to move along a horizontal direction.The
inverted pendulum is balanced [10] by controlling the pendulums angle beneath the carts position..A force is applied
to this cart: if appropriate forces are applied the pole can be
kept in various positions from falling over.It is obvious that
under actuated systems have several advantages,so the control
theory of under actuated systems is analyzed and investigated
perspectively [3].
Several control algorithms are already implemented in the
field of stabilization of inverted pendulum. It is well known
that proportional integral derivative(PID) controllers [4]are
widely used in control systems. The design of these controllers, however, are generally carried out using some tuning
approaches such as Ziegler-Nichols method, which may not
ensure good looprobustness, and it is very difficult to meet
the design constraints [5].Sliding mode control, which is

www.iaetsd.in

A. Model Reference Adaptive Control


When the plant parameters and the disturbance are varying
slowly, or slower than the dynamic behavior of the plant,
then a MRAC control scheme can be used.In this scheme
desired specifications are given in the form of reference
model.The MRAC structure consists of four main parts:the
plant, the controller, the reference model and the adjustment
mechanism.The schematic diagram of such system is shown
in Fig 1
Basically it consist of two loops, first is for normal feedback
control and second loop for controller parameter adjustment.
The reference model tells how the process output should give
response to the command signal. The output of reference
model and plant is compared and error between them is
given as a feedback through parameter adjustment loop. The
parameters of the controller are updated such as to minimize

22

IAETSD 2016

ISBN-13: 978-1535448697

Proceedings of ICRMET-2016
force applied, parallel to the rail, to the cart. It may seem that
the inverted pendulum balance can be achieved by controlling
the angle of the pendulum.
The Dynamics of the pendulum is given by the equations

(M + m) x
+ bx + mlcos
ml2 sin = u

J + ml2 mglsin + ml
xcos + d = 0

(2)
(3)

Inorder to design a controller for this non-linear system we


will linearize these equations at the upright position where
=0,The linearized model of the pendulum is given by
(M + m) x
+ bx + ml = u

J + ml2 mgl + ml
x + d = 0

Fig. 1. Model Reference Adaptive Control

(4)
(5)

The linear ISO (input state output) model of the inverted


pendulum is represnted as

x1 = x2
(6)
x2 = 4 l g ml x1 (m+M ) 4l l ml u

( 3 m+M )

3
m+M

y = x1

the error till it becomes zero. There are mainly two approaches
to implement the MRAC, namely, MIT rule and Lyapunov
theory.
The drawback of MIT rule based MRAC design is that there
is no guarantee that the resulting closed loop system will
be stable. To overcome this difficulty, the Lyapunov theory
based MRAC can be designed, which ensures that the resulting
closed loop system is stable. The Lyapunov theorem states that
If there exits a function V: Rn R that is Positive definite
such that its derivative along the trajectories is neagtive semi
definite then the system is said to be stable,and the function
V is known as the Lyapunov function.

where x1 is the angle of the pendulum, x2 is the rotational


speed of the rod, u=F is the input to the system and y is the
systems output.
III. D ESIGN O F MRAC C ONTROLLER
The MRAC structure consists of four main parts: the plant,
the controller, the reference model and the adjustment mechanism.
The reference model is chosen to obtain the desired course for
the plant output to follow. A standard second order differential
equation was chosen as the reference model and the second
order linear model of the plant was determined

dV
V T dx
V T
=
=
f (x) = W (x)
(1)
dt
x dt
x
II. M ODELLING OF I NVERTED P ENDULUM S YSTEM
In the Cart-pole system the pendulum rod is free to oscillate
around a fixed pivot point attached to a cart which is controlled
by a motor and is constrained to move in the horizontal
direction. When the rod is placed in the upright vertical
position, it is in an unstable equilibrium point. The objective
of the controller is to apply a force to move the cart so that
the pendulum remains in the vertical unstable position. The
cart pole system is shown in Fig 2, where is the angle of

ym = 2n n2 ym + n2 r

(7)

n = 3 rad/sec and = 1 were chosen to providea critically


damped response.
The adaptation error represents the deviation of the plant output from the desired course. The adjustment mechanism uses
this adaptation error to adjust the controllers parameters.The
control law is described as
u = k1 r k2 y k3 y

(8)

where k1 , k2 , k3 represnts the parameters of feedback controller for the inverted pendulum. A controller was designed
to evaluvate these parameters. The ISO dynamic equation that
describes the closed-loop system, which contains both the
controller and the plant is represnted as
x = Ax + Br

T
0
y and A = 0.66k2 +9.9


1
where x = y
0.66
0.5
0.5 k3


0
B=
0.66
0.5 k1
The reference model is given by the following ISO system

Fig. 2. Model Of A Cart Pole System

xm = Am xm + Bm r

pendulum, x is the displacement of the cart and F is the control

www.iaetsd.in

(9)


23

(10)

IAETSD 2016

ISBN-13: 978-1535448697

Proceedings of ICRMET-2016



T
0
1
where xm = ym ym
and Am =
n2 2n2

T
0
Bm =
n2
The differential equation that describes the adaptation error
may be expressed as

xe = Am xe + (Am A)x + (Bm B)r


(11)

T
where xe = ye ye
The adaptation laws for the controllers parameters are determined using Lyapunovs theory of stability.The main aim was
to choose the proper Lyapunov Function,V (t, xe )
n

o
T
V = xTe P xe + 2tr (Am A) A .P.xe .xT A (t)
n

o
T
+ 2tr (Bm B) B .P.xe .xT B (t)
(12)
The equilibrium point xe is asymptotically stable if V is
positive definite ,V (0) = 0 and dV
dt is negative definite. Matrix
P (2x2) denotes the symmetric and positive definite solution of
the Lyapunov equation(13). We assume that Q is the identity
matrix.
ATm P + P AM = Q < 0
(13)

P =

1
n

2
1+n
4

1
2
2n


1
4n

1
2
2n

1+

Fig. 3. Simulink model of cart inverted pendulum system

1
2
n

(14)

The derivative of the Lyapunov function V is negative definite


if we choose the following adaptation laws for the variant
closed-loop system matrix
= A .P.xe .xT
A(t)
= B .P.xe .rT
B(t)

Fig. 4. Response of a cart inverted pendulum in the stable equilibrium

Where as in the unstable equilibrium, Figure 5, i.e. when


in the upright position the application of an external force
causes the system to leave its initial state and reach another
equilibrium point. The reason why it is called the unstable
equilibrium is clear from Figure 5 The application of a small
force caused the system to change its state.

(15)

Solving equations (15), the adaptation laws for the controllers


parameters is obtained as
k1 = 1 (p12 .ye + p22 .ye ) .r
k2 = 2 (p12 .ye + p22 .ye ) .y
k3 = 3 (p12 .ye + p22 .ye ) .y

(16)

where 1 , 2 , 3 denotes the adaption gain of the system.


IV. S IMULATION R ESULTS A ND A NALYSIS
The nonlinear model of the inverted pendulum implemented
in SIMULINK is shown in Fig 3 The model was implemented
using equations(2)and(3) The response of a cart-pendulum
system in the stable equilibrium is shown in Fig 4. The
upper graph shows the cart position with respect to the mean
position, i.e. x=0. And the lower graph shows the angle of the
pendulum , with respect to the vertical position. It is clear
from the figure that the application of external force causes
small disturbances in the system but the system eventually
settles down at the initial position. Thats why the downward
position is known as the stable equilibrium. Even though a
small disturbance causes small perturbations in the system, it
is temporary.

www.iaetsd.in

Fig. 5. Response of a cart inverted pendulum in the unstable equilibrium

The system can only be kept in the unstable equilibrium


point with the help of a controller.Thus the controller designed
must ensure that the system continues on the unstable equilibrium point, i.e. in the upright position in the case of cartinverted pendulum system.
The model of inverted pendulum with MRAC controller is
shown in Figure 6.The pendulum model is represnted by
equation (4) and (5).Reference model is a standarad second

24

IAETSD 2016

ISBN-13: 978-1535448697
Parameter
g-gravity
l-length of pole
M-cart mass
m-pole mass
J-moment of interia
b-cart friction coefficient
d-damping coefficient

Proceedings of ICRMET-2016
Value
9.81m/s2
0.38m
2.4Kg
0.23Kg
0.009Kg-m2
0.05Ns/m
0.005Nms/rad

TABLE I
S YSTEM PARAMETERS OF C ART P OLE P ENDULUM

Fig. 8. Position of the Cart

order system represnted as in equation (7).The parameters used


for implementing the model are shown in Table 1

Fig. 9. Adaptive Error Signal

V. C ONCLUSION
Fig. 6. Simulink model of cart inverted pendulum system with controller

The cart-pendulum system is an under actuated nonlinear


system. Systems having less number of actuators than the
degrees of freedom available are known as under actuated
systems. They are of high interest since their cost and
complexity are very low. Study of under actuated systems
gave insight into the structure and dynamics of higher order
systems like underwater vehicles and space ships etc. The
inverted pendulum cannot be balanced in the upright position
by the direct control of the angle . The angle is virtually
controlled by the movement of the cart in appropriate way. The
cart-pendulum system can be linearized around its unstable
equilibrium point in order to derive the controller. The Model
Reference adaptive control based controller is proposed in this
project. When the plant parameters and the disturbance are
varying slowly, or slower than the dynamic behavior of the
plant, then a MRAC control scheme can be used.
MRAC controller is efficient in controlling applications where
mismatched uncertainties are present. It is also efficient in
keeping the position tracking error very low.This technique
involve a number of algebraic process which involves the stabilization of systems using Lyapunov Functions. The controller
ensured the stability of the cart-inverted pendulum system in
the upright position also it ensured the stability of the internal
dynamics of the system, i.e. it considered controlling the cart
motion on the rail.
The dynamic model of the pendulum system is linearized in
this work. The ideas derived from the linearized controller
can be used for developing the nonlinear controller for swing
up and stabilization purposes. The most important point is
how to select an appropriate Lyapunov Function for MRAC

when the system is subjected to an external distrubance the


controller effectively balance the pendulum by stabilizing the
angle of the pendulum Figure 7 and by controlling the cart
position Figure 8 by genearting necessary control outputs.The
error signal generated to adjust the adaptive law mechanism
is shown in Figure 9.

Fig. 7. Angle of the Pendulum

In the normal case when there is no controller the pendulum


angle will be settled at rad,ie, in the stable equilibrium
point. But the developed controller effectively balances the
pendulum at the unstable equilibrium point. It can also be
observed from the simulation results that the cart reaches the
mean position after balancing the pendulum. This indicates
that controller developed helps to balance the cart and also
generates necessary control output in order to move the cart
into its stable position.

www.iaetsd.in

25

IAETSD 2016

ISBN-13: 978-1535448697

Proceedings of ICRMET-2016

design of the nonlinear controllers to balance and stabilize


the pendulum like systems in design process. It is clear that
the linear controller only can achieve our control goals in the
linearized stabilization zone.
R EFERENCES
[1] N.Muskinja and B.Tovornik, Swinging up and stabilization of a real
inverted pendulum, IEEE Transactions on Industrial electronics ,
vol.53,no.2, pp. 2004-2016,April 2006.
[2] R. J. Pawar, B.J. Parvat,, Design and Implementation of MRAC and
Modifed MRAC technique for Inverted Pendulum, International Conference on Pervasive Computing, February 2015.
[3] W.-S. Man and J.-S. Lin, Non linear control design for a class of under
actuated system, proc. IEEE Int. conf on Control Applications, pp. 14391444, IEEE 2010.
[4] A. Ghosh and T. R. K. B. Subudhi, Robust proportional-integralderivativecompensation of an inverted cart-pendulum system: an experimental study, IET Control Theory and Applications, vol. 6, pp. 11451152, 2011.
[5] J. Huang, Z.-H. Guan, T. Matsuno, T. Fukuda, and K. Sekiyama,
Sliding-mode velocity control of mobile-wheeled inverted-pendulum
systems,IEEE Transactions on, Robotics, vol. 26, no. 4, pp. 241-247,
August 2010.
[6] N. Adhikary and C. Mahanta,Integral backstepping sliding mode control for underactuated systems: Swing-up and stabilization of the cartpendulum system,ISA Transactions, vol. 52, pp. 870-880, Aug.2013.
[7] C. Yang, Z. Li, R. Cui, and B. Xu,Neural network-based motion control
of underactuated wheeled inverted pendulum models, IEEE Transactions
on, Neural Networks and Learning Systems , vol. 25, no. 11, pp. 20042016, November 2014.
[8] Rajiv Ranjan, Dr. Pankaj Rai, Performance Analysis of A Second Order
System Using MRAC, International Journal Of Electrical Engineering
and Technology, December 2012
[9] Swarnkar Pankaj,Jain Shailendra Kumar and Nema R.K., Comparative
Analysis of MIT Rule and Lyapunov Rule in Model Reference Adaptive
Control Scheme, Innovative Systems Design and Engineering, ISSN
2222-1727,Vol 2, No 4, 2011.
[10] Kaveh Razzaghi and Ali Akbar Jalali, A New Approach on Stabilization
Control of an Inverted Pendulum Using PID Controller, International
Conference on Control, Robotics and Cybernetics , March 2011.
[11] K.J. Astrom, K. Furuta, Swinging up a pendulum by energy control,
Automatica, vol. 36,
[12] T. Zilic, D. Pavkovic, and D. Zorc,, Modeling and control of a
pneumatically actuated inverted pendulum, ISA Transactions, vol. 48,
pp. 327-335, 2009.
[13] C. C. Hung, B. Fernandez, Comparative Analysis of Control Design
Techniques for a Cart-Inverted-Pendulum in Real-Time Implementation,
American Control Conference , pp.1870-1874, 2-4 June 1993.
[14] M.G. Henders, A.C. Soudack, Dynamics and stability state-space of
a controlled inverted pendulum , International Journal of Non-Linear
Mechanics , vol.31, no.2, pp. 215-227, March 1996
[15] Feedback Instruments, Digital pendulum user manual,2012
[16] Ahmad Nor Kasruddin Bin Nasir, Modelling and controller design
for an inverted pendulum system, Journal at Universiti Technology
Malaysia,, 2007

www.iaetsd.in

26

IAETSD 2016

You might also like