Sie sind auf Seite 1von 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/320041584

Modeling, Analysis and Control of a Single Stage Linear Inverted Pendulum

Conference Paper · September 2017


DOI: 10.1109/ICPCSI.2017.8392216

CITATIONS READS
0 982

2 authors:

Gurminder Singh Ashish Singla


Indian Institute of Technology Delhi Thapar University
16 PUBLICATIONS   19 CITATIONS    60 PUBLICATIONS   114 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Development of rapid manufacturing process using 3D printing and ultrasonic assisted sintering View project

Underactuated Systems View project

All content following this page was uploaded by Gurminder Singh on 31 October 2018.

The user has requested enhancement of the downloaded file.


IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

Modeling, Analysis and Control of a Single


Stage Linear Inverted Pendulum
Gurminder Singh Ashish Singla
Dept.of Mechanical Engineering Dept.of Mechanical Engineering
Indian Institute of Technology Delhi Thapar University
Delhi, India Patiala, Punjab , India
e-mail- gurminder.singh@mech.iitd.ac.in *
e-mail- ashish.singla@thapar.edu
Abstract— In this paper, modeling, analysis and real-time of the various types of control theories. In real-time world,
stabilization of a cart pendulum system is performed. The cart stabilization of the cart pendulum system at upward position has
pendulum system is the typical benchmark example of the wide range of applications such as rockets propeller, tank
underactuated system and has been used for examine different
missile launcher, self-balancing robot, biped walking, etc.
control schemes. Cart pendulum system represents a wide range
of realistic systems like rocket propeller, tank missile launcher,
Stabilization of such a system is a linear problem, which is
self-balancing robot, biped walking, etc. The main aim of this work easier than the respective nonlinear problem, but still needs a
is to investigate the performance of controller in stabilizing the well-designed controller. Several controllers are available in
inverted pendulum at the unstable equilibrium point. The work is literature to address the stabilization problem of cart pendulum
done in both analytical and experimental manners for validation system. These are broadly classified into three types- classical
of results. LQR (Linear-Quadratic-Regulator) controller is control theory, modern control theory and artificial intelligent
developed to address the regulation problem of the cart pendulum control theory. The examples of controllers, based on these
system. The experimental work is done on Googoltech Linear theories, are listed in Table 1.
Inverted Pendulum (GLIP) setup. The analytical results are
performed using MATLAB and the results are found in the closed
agreement of the experimental results. Thus, the mathematical Table 1: Types of controllers.
model is validated on the basis of real-time experiment. Classical Root locus controller [2]
Experimental and analytical results are demonstrating that the control theory Frequency response controller [3]
LQR controller is able to effectively stabilize the cart pendulum PID (Proportional-Integrative-
system at its unstable equilibrium point. Derivative) controller [4]
Modern control Pole placement controller [5]
Keywords— Cart pendulum system, Googoltech, LQR controller,
theory LQR (Linear-Quadratic-Regulator)
stabilization, state-space representation.
controller [6]
I. INTRODUCTION H Robust Controller [7]
Artificial Fuzzy logic controller [8]
Underactuated mechanical systems typically possess lesser intelligent Neural network control [9]
number of less control inputs than their respective degrees of control theory Bang-Bang controller [10]
freedom (DOFs). In these systems, control inputs cannot
accelerate the system in every direction. Underactuated systems
are found several applications like marine engineering, flexible Other controllers of similar type [11] are also found in
systems, aerospace systems, mobile robots, etc. Different types literature like sliding mode controller, predictive controller, etc.
of underactuated systems [1] are found in the literature like cart The classical control theory is difficult to implement on the
pendulum system, pendubot, acrobat, rotating pendulum, beam- complex systems whereas, the modern control theory is easy to
and-ball system, etc. The development of underactuated apply, simple and less time consuming than artificial intelligent
mechanical systems is not limited to cost reduction, but possess control theory. Thus, modern control theory is preferred to
other benefits like, lower power consumption, improved solve the cart pendulum problem in this article.
dexterity, fault-tolerant design and lower environmental In this paper, LQR controller is presented both analytically
impact. As the underactuated systems has many merits, but they and experimentally for stabilization of cart pendulum system.
also have demerits. Due to less control inputs, these systems are Experimental work is performed on Googoltech Linear Inverted
difficult to control, which is the one of the major demerit of the Pendulum (GLIP). To get realistic results analytically,
underactuated systems. mathematical modeling of cart pendulum system is derived by
Cart pendulum system is a benchmark example of using Euler-Lagrange approach. The developed mathematical
underactuated mechanical systems, which is highly nonlinear in model is validated by superimposing the experimental and
nature. This system is chosen as a typical experimental device analytical results.
in control field. The cart pendulum setup is well used for testing

978-1-5386-0814-2/17/$31.00 ©2017 IEEE 2728


IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

This paper is organized as follows: In Section II, Googoltech


cart pendulum setup is presented, which is used for
experimental purpose. Mathematical modeling of cart
pendulum system is described in Section III using Euler-
Lagrange approach. In Section IV, controller design is
discussed, and results are shown while stabilizing the pendulum
at an unstable equilibrium point. The results and discussions of MATLAB and Motion controller
the controller are presented in section V. Finally, conclusions Simulink environment card
of this paper are drawn in Section VI.

II. REAL-TIME CART PENDULUM SYSTEM


Googoltech, Hong Kong (HK) company’s based cart
pendulum setup is used for the experimental purpose, which is
shown in Fig. 1. Googoltech Linear Inverted Pendulum (GLIP)
consists of a motor driven cart and a pendulum freely pivoted
above it, with feedback sensors and electric circuit. It is a two
DOF system with one control input, i.e. the sliding cart on the

GLIP AC motor drive


amplifier

Fig. 2: Modules of GLIP.

The motor has 200 W power and works on 10 V supply. The


incremental encoder of the motor is used to get the cart’s
position as feedback and rotary encoder (Nemicon Corporation,
Fig. 1: Googotech Linear Inverted Pendulum (GLIP) setup
Model- OVW2-06-2MD resolution 600 P/R) is also used to
measure the angular position of the pendulum. The whole
horizontal track. AC servo motor is used to control the cart
system works in a closed-loop structure.
movement with the help of a timing pulley and a synchronous
To convert the pulses signals to angular and linear
belt. The timing pulley helps to convert the angular motion of
measurements, conversion factors are used at both the encoders.
the motor to linear motion of the sliding cart. The different
The cart linear acceleration is used as an input to the motion
modules of the setup are shown in Fig. 2. The whole system
controller card and motor drive amplifier, which further
works as a closed-loop system as described in Fig. 3. The
converts this input to voltage signal for the motor. Parameter
system works in the MATLAB and SIMULINK environment.
values of the GLIP setup are listed in Table 2. The main
Googoltech toolbox is used in SIMULINK for developing
objective is to stabilize the cart pendulum system to unstable
block diagrams. Motion controller card (Googoltech SV-400)
equilibrium point (upward position). To compete this objective,
is used for connection between PC (personal computer) and
mathematical modeling and controller design is discussed in the
motor (Panasonic AC servo motor, Model-MSMJ022G1U),
next sections.
which convey signals in the form of pulses.

2729
IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

Fig. 3 Closed-loop system

Table 2: Parameters of Googoltech Cart Pendulum System. ̇ ̇ − ̇ cos


Parameter Units Symbol Value ̇( ) = = . (2)
̇ − ̇ sin
Cart mass 1.096
Pendulum mass 0.109
Coefficient of friction / 0.1
Pendulum rod inertia 0.0034
Pendulum length from 0.25
pivot to centre of mass
Acceleration due to / 9.8 ( )
gravity ( , )
III. DYNAMIC MODELING OF THE CART PENDULUM SYSTEM
The first step in design and control of any physical system is ( )
to establish the accurate mathematical model. In this section,
Euler-Lagrange approach is used to derive mathematical model
of the cart pendulum system. Thereafter, the state-space
representation of the system is calculated. Controllability of the
( )
system is discussed in the end of this section.
The schematic diagram of the cart pendulum system is shown
in Fig. 4, which is a two-DOF system with pivoted pendulum
on the moving cart. The cart movement is constrained in ℎ
horizontal direction only, whereas the pendulum can move in
both horizontal and vertical planes. Let, M and m represent the
mass of cart and pendulum respectively, l represents the
distance from the rod axis rotation center to the rod mass center, Fig. 4: Schematic diagram of the cart pendulum system.
b represents the coefficient of friction of the cart.
Moreover, ( ) represents the horizontal position of the cart Total kinetic energy of the system is given as the summation
from static equilibrium position, ( ) represents the angular of translational kinetic energy of cart and rotational kinetic
position of the inverted pendulum from the vertical axis, and energy of pendulum, given as
( ) is the horizontal force acting on the cart. The model is
derived with assumption that there is only coulomb friction. Air = +
friction and force on cart due to pendulum’s action are
1 1
considered as negligible. For brevity, time dependence of the = ̇ + ̇ + ̇ ,
relevant variables is shown at important steps only. 2 2
The state vector of the system is taken as 1 1
̇ − (3)
= ( + ) ̇ + cos ̇ ̇ .
− sin 2 2
( )= = , (1)
cos
and its derivative is

2730
IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

The potential energy contains two components generally, i.e. 0 1 0 0


the gravitational potential energy and elastic potential energy. ⎡ −( + ) ⎤
⎢0 0⎥
The first one accounts for relative position of the rigid body in ( + )+ ( + )+
space and the second one accounts for the strain energy stored =⎢ ⎥,
⎢0 0 0 1⎥
in the elastic member of the system due to its deformation. As ⎢0 − ( + )
the cart moves in horizontal direction only, thus the 0⎥
⎣ ( + )+ ( + )+ ⎦
contribution to potential energy comes from the pendulum only.
The total potential energy of the system is given as 0
⎡ ( + ) ⎤
= +
⎢ ⎥
( + )+ 1 0 0 0 0
= 0 + (− ( − cos )). (4) =⎢ ⎥, = , = .
⎢ 0 ⎥ 0 0 1 0 0
Lagrange ℒ of the system is given by subtraction of total ⎢ ⎥
kinetic energy and total potential energy of the system, given as ⎣ ( + )+ ⎦
ℒ = − Before designing the controller, the first and foremost
1 1 (5) requirement is to ensure the controllability of the plant.
= ( + ) ̇ + ̇ − cos ̇ ̇ Controllability is defined as the property by which it is possible
2 2
− ( − cos ). to take the system from any initial state to any final state in a
finite time by means of the input vector. Controllability of any
system can be checked easily by calculating the controllability
To drive damping force of the system due to frictional test matrix P, given as
effects, Rayleigh’s dissipation function is taken into account as
=[ ; ; ;………..; ]. (12)
= ̇ . (6)
If rank (P) == n, the system is controllable [12].
Due to two generalized coordinates, there are two equation
of motion of the system, which are given as IV. CONTROLLER DESIGN

ℒ ℒ
− + = , (7) In this section, design of LQR controller is discussed for the
̇ ̇
cart pendulum system. As the objective of the controller, is to
stabilize the plant at the unstable equilibrium point, the problem
ℒ ℒ can be treated as a regulation problem as
̇ − + ̇ = 0. (8)
( )= ( )− ( ) ,
By substituting the values of Lagrange and Rayleigh’s
dissipation function from (5) and (6) into in (7) and (8), the where ( ), ( ), ( ) and are control input vector, state
equations of motion are calculated as
vector, desired state vector and control gain vector. For the
̈+ ̇ + regulation problem, ( ) = 0, which leads to
( + ) ̈− cos sin ̇ = , (9)
( )= − ( ). (13)
( + ) ̈− cos ̈− sin = 0. (10)
Linear Quadratic Regulator is the optimal control used to
Equation (9) and (10) represent the nonlinear equations of
minimize the cost associated with generating control inputs.
motion of the cart pendulum system. For stabilization of the cart
The cost function consists of two matrices, Q and R, the state
pendulum system around upright equilibrium point, the
weighting matrix and control cost matrix. For a linearized plant,
nonlinear system can be linearized by neglecting the square
the objective of LQR controller is to minimize the integration
term and taking sin = , cos = 1. The design of controller
of sum of these two matrices by using a feedback regulator. The
requires the mathematical model of the system in state-space
objective function is given as:
form. Thus, state-space representation of the linear system is
given as
̇( ) = ( ) + ( ), (11) ( )= ∫ ( ( ) ( )+ ( ) ( ) , (14)
( )= ( )+ ( ).
and K is the optimal state feedback control matrix given as
where ( ) = [ ̇ ̇ ] , is called as the state-vector, ( ) = = , (15)
[ ] as the input vector, ( ) is known as the input vector where, is the solution of the following algebraic Riccati
and A, B, C and D are called as state-weighing coefficient equation
matrices, which are given as

2731
IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

+ − + = . (16) = 0, ̇ = 1.5, = −19.5°, ̇ =0

From the above equation, it can be observed that the optimal


gain matrix K, depends upon A, B, Q and R. Out of these four, A. LQR Controller
A and B are mainly involved in the structure and parameters of In this sub-section, the control gain matrix is calculated using
the plant. Thus, the optimal gain matrix K depends mainly on Q optimal control theory. Selection of Q and R matrices for LQR
and R. These matrices can be found by manual tuning, however controller is done by manual tuning, with the objective of
for optimal weight matrices, special types of algorithms are achieving the settling time within 2 seconds. For this Q and R
available. In the current section, the control gain matrix K is taken as
derived using LQR approach, which will be used in the next
section to find results. 1000 0 0 0
0 0 0 0
V. RESULTS AND DISCUSSIONS = , = 1.
0 0 200 0
In this section, efficacy of the LQR controller is 0 0 0 0
demonstrated with the help of simulation and experimental
results. At the first, controllability of the plant is examined. Using (14)-(16), the optimal control gain matrix for LQR
Then, gains for the LQR controller are found for simulation and controller is calculated = [-31.628, -20.1507, 72.718,
experimental work. Later on, the cart linear displacement, 13.152]. The selection of Q and R is justified by taking step
pendulum angular displacement and control input magnitude is response of the plant with resulted gains. The cart and
examined for stabilization of cart pendulum system. pendulum reaches the desired state within 2 seconds, as shown
Substituting the parameters of the plant, as given in Table 2 in Fig. 5.
into (11), the following state-space representation is obtained.

0 1 0 0 0
̇ 0 −0.09 0.63 0 ̇ 0.89
= + ,
0 0 0 1 0
̇ 0 −0.23 27.82 0 ̇ 2.35
(17)

1 0 0 0 ̇ 0
= + .
0 0 1 0 0
̇
The eigenvalues of the state dynamic matrix A are Fig. 5: Step response using LQR controller.
[0, −0.08, −5.27, 5.27]. One of the four eigenvalues, one lies
at the origin position, which signifies that the system is going In the first test run, the control objective is to stabilize the
to unstable. But system is unstable, as one of the eigenvalue of pendulum at upright position i.e. = 0, while the cart
the open-loop system lies in the right half plane. Thus, in order maintains the reference position on the horizontal track i.e. =
to stabilize the system at the inverted position, a controller 0. First, the experimental run needs to be executed, as it will
needs to be designed in order to shift the eigenvalues in the left
decide the initial condition of , where the linear controller
half plane.
starts operating. At that instant, the GLIP setup is in its home
The cart pendulum system has four state variables (n), i.e.
̇ ] , where is the linear displacement, ̇ is the position (stable equilibrium point) of the pendulum, i.e. = 0
=[ ̇
and = 0. Now, the pendulum is lifted manually in the
linear velocity of the cart, is the angular displacement and ̇
counter-clockwise direction, until it comes in the linear stage of
is the angular velocity of the pendulum. Thus, n = 4 for
operation i.e. = ±20°. As the pendulum is lifted, at =
controllability matrix, which is given as
−19.5°, the linear LQR controller becomes active and stabilize
the pendulum at its unstable equilibrium point with an
=[ ],
overshoot of 2°, shown in Fig. 6. It can be observed from Fig.
7 that in order to stabilize the pendulum, the cart executes an
0 0.88 −0.07 1.48
0.88 −0.07 1.48 −0.26 overshoot of 0.15 m from its reference position and the closed-
= . (18) loop system settles within 2 seconds, as expected due to the
0 2.35 −0.20 65.59
2.35 −0.21 65.59 −6.14 choice for state weighting and control cost matrices.
After getting the initial condition of from the experimental
The rank of the controllability matrix is calculated as four. run, we switch to the simulation run for validation the response
Hence, the cart pendulum system is controllable. For both of the closed-loop system. Similar trend is observed in the
analytical and experimental purposes, the initial conditions are analytical results, performed on the Matlab environment, as
taken as both the cart and pendulum position settle with 2 seconds. It can
be seen in Fig. 6 and 7. That the overshoot for the simulation

2732
IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI-2017)

run in the case of ( ) and ( ) is found as 12°and 0.18 m, as LQR controller is able to stabilize the cart pendulum system
compared to 2° and 0.15 m respectively in the experimental at its unstable equilibrium point (upward position). The
results. This discrepancy in the overshoot results is due to the pendulum angle’s trend at upward position is shown in Fig. 9.
activation of the linear controller in real time. From the figure, it is observed that the pendulum oscillates in
the range of -0.6° to 0.6°.

VI. CONCLUSIONS
In this paper, the real-time control of the cart pendulum
system is investigated, which is underactuated in nature. With
only one actuator used in the system i.e. to control cart
movement, it is difficult to stabilize the pendulum at unstable
equilibrium point. LQR controller has been used to address this
stabilizing problem. LQR controller has been designed to
stabilize the cart pendulum system in 2 seconds at its desired
Fig. 6: Angular displacement of the pendulum by LQR position. The dynamics of the system has been derived by using
controller. Euler-Lagrange approach to ensure the accuracy of the
analytical results, which is validated with the close agreement
of the simulation results with those obtained with real-time
setup. Thus, the derived mathematical model has been
validated, which was not validated for this setup in [3]. Control
input magnitude has been compared, both experimentally and
analytically, and results are found in close agreement.

REFERENCES
[1] Y. Liu, H. Yu, “A survey of underactuated mechanical systems”,
IET Control Theory & Applications, Vol. 7, pp. 921-935, 2013.
[2] M. W. Dunnigan, “Computer based control assignment- digital
control of an inverted pendulum”, International Journal of Electrical
Fig. 7: Linear displacement of the cart by LQR controller. Engineering Education, Vol. 35, pp. 162-174, 1998.
[3] Googol Technology (HK) Limited, “Inverted pendulum
experimental manual suitable for GLIP series”, second edition,
The comparison of control input is shown in Fig. 8, where 2016.
the magnitude of maximum control input is found as 20 units [4] W. D. Chang, R. C. Hwang, J. G. Hsieh, “A self-tuning PID control
for the simulation run, whereas it is observed as 25 units for the for a class of nonlinear systems based on the Lyapunov approach”
Journal of Process Control, Vol. 12, pp. 233-242, 2002.
experimental run. Thus, it is observed that the maximum control [5] K. Ogata, “Modern Control Engineering”, Prentice-Hall, New York,
input is of the same order in both the cases, which validates the 2000.
efficacy of the mathematical model. [6] V. Kumar, J. Jerome, “Robust LQR controller design for stabilizing
and trajectory tracking of inverted pendulum”, Procedia
Engineering, Vol. 64, pp. 169-178, 2013.
[7] G. W. Linden, P. F. Lambrechts, “H control of an experimental
inverted pendulum with dry friction”, IEEE Control Systems, Vol.
93, pp. 44-50, 1993.
[8] J. Yi, N. Yubazaki, K. Hirota, “Upswing and stabilization control of
inverted pendulum system based on the SIRMs dynamically
connected fuzzy inference model” Fuzzy Sets and Systems, Vol.
122, pp. 139-152, 2001.
[9] C. W. Anderson, “Learning to control an inverted pendulum using
neural network”, IEEE Control Systems Magazine, Vol. 9, pp. 31-
37, 1989.
[10] S. Mori, H. Nishihara, K. Furuta, “Control of unstable mechanical
Fig. 8: Input to cart pendulum system by LQR controller. system- control of pendulum” International Journal of Control, Vol.
23, pp. 673-692, 1976.
[11] O. Boubaker, “The inverted pendulum benchmark in nonlinear
control theory”, International Journal of Advanced Robotic
Systems, Vol. 10, pp. 1-9, 2013.
[12] A. Tewari, “Modern control design with MATLAB & SIMULINK”,
Chichester Wiley, 2002.

Fig. 9: Pendulum oscillations at upward position.

2733

View publication stats

Das könnte Ihnen auch gefallen