More Related Content
Similar to Iaetsd modelling and controller design of cart inverted pendulum system using mrac scheme
Similar to Iaetsd modelling and controller design of cart inverted pendulum system using mrac scheme (20)
More from Iaetsd Iaetsd (20)
Iaetsd modelling and controller design of cart inverted pendulum system using mrac scheme
- 1. Modelling and Controller Design Of Cart Inverted
Pendulum System Using MRAC Scheme
Rathu Krishna N
M.Tech Student, Electronics and
Communication Department
College of Engineering, Trivandrum
Dr. Bindhu K. R.
Professor, Civil Department
College of Engineering, Trivandrum
Vinod B.R
Assosciate Professor, Elecronics and
Communication Department
College of Engineering, Trivandrum
Abstract—The 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, non-
minimum 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 pen-
dulum’s 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 con-
trollers, 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
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.
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
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 201622
- 2. Fig. 1. Model Reference Adaptive Control
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.
dV
dt
=
∂V T
∂x
dx
dt
=
∂V T
∂x
f (x) = −W (x) (1)
II. MODELLING OF INVERTED PENDULUM SYSTEM
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
Fig. 2. Model Of A Cart Pole System
pendulum, x is the displacement of the cart and F is the control
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 + b ˙x + ml¨θcosθ − ml ˙θ2
sinθ = u (2)
J + ml2 ¨θ − mglsinθ + ml¨xcosθ + d ˙θ = 0 (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 + b ˙x + ml¨θ = u (4)
J + ml2 ¨θ − mglθ + ml¨x + d ˙θ = 0 (5)
The linear ISO (input state output) model of the inverted
pendulum is represnted as
˙x1 = x2
˙x2 = g
4
3 l− ml
m+M
x1 − l
(m+M)(4
3 l− ml
m+M )
u
y = x1
(6)
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. DESIGN OF MRAC CONTROLLER
The MRAC structure consists of four main parts: the plant,
the controller, the reference model and the adjustment mech-
anism.
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
¨ym = −2ξωn − ω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 out-
put from the desired course. The adjustment mechanism uses
this adaptation error to adjust the controllers parameters.The
control law is described as
u = k1r − k2y − k3 ˙y (8)
where k1, k2, k3 represnts the parameters of feedback con-
troller 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 (9)
where x = y ˙y
T
and A =
0 1
0.66k2+9.9
0.5
0.66
0.5 k3
B =
0
−0.66
0.5 k1
The reference model is given by the following ISO system
˙xm = Amxm + Bmr (10)
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 201623
- 3. where xm = ym ˙ym
T
and Am =
0 1
−ωn2 −2ξωn2
Bm =
0
ωn2
T
The differential equation that describes the adaptation error
may be expressed as
˙xe = Amxe + (Am − A)x + (Bm − B)r (11)
where xe = ye ˙ye
T
The adaptation laws for the controller’s parameters are deter-
mined using Lyapunov’s theory of stability.The main aim was
to choose the proper Lyapunov Function,V (t, xe)
V = xT
e Pxe + 2tr (Am − A)
T
γA.P.xe.xT
− ˙A (t)
+ 2tr (Bm − B)
T
γB.P.xe.xT
− ˙B (t) (12)
The equilibrium point xeis 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.
AT
mP + PAM = −Q < 0 (13)
P =
1
ωn
ξ +
1+ω2
n
4ξ
1
2ω2
n
1
2ω2
n
1
4ξωn
1 + 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(t) = γA.P.xe.xT
˙B(t) = γB.P.xe.rT
(15)
Solving equations (15), the adaptation laws for the controller’s
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. SIMULATION RESULTS AND ANALYSIS
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.
Fig. 3. Simulink model of cart inverted pendulum system
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.
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 equi-
librium point, i.e. in the upright position in the case of cart-
inverted 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
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 201624
- 4. Parameter Value
g-gravity 9.81m/s2
l-length of pole 0.38m
M-cart mass 2.4Kg
m-pole mass 0.23Kg
J-moment of interia 0.009Kg-m2
b-cart friction coefficient 0.05Ns/m
d-damping coefficient 0.005Nms/rad
TABLE I
SYSTEM PARAMETERS OF CART POLE PENDULUM
order system represnted as in equation (7).The parameters used
for implementing the model are shown in Table 1
Fig. 6. Simulink model of cart inverted pendulum system with controller
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.
Fig. 8. Position of the Cart
Fig. 9. Adaptive Error Signal
V. CONCLUSION
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 sta-
bilization 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
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 201625
- 5. 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.
REFERENCES
[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 Con-
ference 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. 1439-
1444, IEEE 2010.
[4] A. Ghosh and T. R. K. B. Subudhi, “Robust proportional-integral-
derivativecompensation of an inverted cart-pendulum system: an experi-
mental study,” IET Control Theory and Applications, vol. 6, pp. 1145-
1152, 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 con-
trol for underactuated systems: Swing-up and stabilization of the cart-
pendulum 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. 2004-
2016, 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 Instrument’s, “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
ISBN-13: 978-1535448697
www.iaetsd.in
Proceedings of ICRMET-2016
©IAETSD 201626