You are on page 1of 5

Journal for Research| Volume 01| Issue 12 | February 2016

ISSN: 2395-7549

Modelling and Simulation of Inverted Pendulum


using Internal Model Control
Dimple J. Vora
PG student
Department of Instrumentation & control
L.D. Collage of Engineering ,Ahmedabad, Gujarat, India

Ms. Nabanita Basu


Assistant Professor
Department of Instrumentation & control
L.D. Collage of Engineering ,Ahmedabad, Gujarat, India

Abstract
The internal model control (IMC) philosophy relies on the internal model principle, which states that control can be achieved
only if the control system encapsulates, either implicitly or explicitly, some representation of the process to be controlled. In
particular, if the control scheme is developed based on an exact model of the process, then perfect control is theoretically
possible. Transfer function of Inverted Pendulum is selected as the base of design, which examines IMC controller.
Matlab/simulink is used to simulate the procedures and validate the performance. The results shows robustness of the IMC and
got graded responses when compared with PID. Furthermore, a comparison between the PID and IMC was shows that IMC gives
better response specifications.
Keywords: IMC, Inverted Pendulum, MATLAB/simulink
_______________________________________________________________________________________________________

I. INTRODUCTION
Every feedback controller is designed by employing some form of a model for the process that is to be controlled and/or the
dynamics of the exogenous signal affecting the process. Consequently, the term "model-based" is often used here. 30-years ago,
a new model-based controller design algorithm named "Internal Model Control" (IMC) has been presented by Garcia and
Morari, which is developed upon the internal model principle to combine the process model and external signal dynamics.[7]
In the control theorem, the control systems design is fundamentally determined by the steady state and dynamic behavior of the
process to be controlled. It is an important issue to know the way in which the process characteristics influence the controller
structure. The internal model control (IMC) viewpoint appeared as alternative to traditional feedback control algorithm, which
link the process model with the controller structure. [7]
The theory of IMC states that control can be achieved only if the control system encapsulates, either implicitly or explicitly,
some representation of the process to be controlled. The main objective is to design an IMC Controller for the proposed
pendulum system to reduce the effect of disturbance due to mismatching in modeling.

II. INTERNAL MODEL CONTROL


A schematic representation of the IMC structure is presented in Figure 1, in which G(s) represents the process itself. G d ( s )
~
The process transfer functions of the disturbance, G ( s ) the mathematical model (transfer function) of the process, and the
transfer function of the IMC controller. As may be observed from the block diagram of the IMC structure, there are two parallel
paths starting from the manipulated variables u(s): one passes through the real process G(s) and the other passing through the
~
~
model process G ( s ) . The role of the parallel containing the model G ( s ) is to make possible the generation of the difference
between the actual process output y(t) and an estimation predication of the manipulated variable effect on the process output.
~
Assuming that the process model is a perfect representation of the real process that is G ( s ) = G(s).

Fig. 1: Schematic diagram of IMC

All rights reserved by www.journalforresearch.org

41

Modelling and Simulation of Inverted Pendulum using Internal Model Control


(J4R/ Volume 01 / Issue 12 / 008)

IMC Design Procedure:


1) Factor the model into two parts:

~
~
~
(1)
G ( s ) G ( s ).G ( s )
To improve robustness, the effects of mismatch between the process, and process model should be minimized. Since the
differences between process and the process model usually occur at the systems high frequency response end, a low-pass filter
f(s) is usually added to attenuate this effect.[7] Thus, IMC is designed using the inverse of the process model in series with a
low-pass filter. A common filter choice that conforms to this requirement is

f (s)

1
( s 1)

(2)

The filter order n is selected large enough to make G ( s ) proper


2) In addition to this criterion, the filter time constant must satisfy
1

D ( s ) N (0)

( lim

)n

(3)

20 s N ( s ) D ( 0 )
3) Augment with a filter f(s) such that the final IMC controller is now,
~ 1
G imc ( s ) G ( s ). f ( s )

(4)

III. MODEL IDENTIFICATION OF INVERTED PENDULUM SYSTEM


The Inverted Pendulum is a single input multi output (SIMO) system with control voltage as input, cart position and pendulum
angle as outputs. [7] Even though the system is simple from construction point of view, but there lies a lot of control challenge
owing to following characteristics: Highly Unstable, Highly Non-linear, Non-minimum phase system, under actuated.

Fig. 2: Parametric representation of the Inverted Pendulum System

Following is the list of parameters used in the derivation of Inverted Pendulum dynamics
M Mass of cart in kg
m Mass of Pendulum in kg
J Moment of Inertia of pendulum in kg-m2
L Length of Pendulum in m
b Cart friction coefficient in Ns/m
g Acceleration due to gravity in m/s2
Only the horizontal forces are considered in the analysis as they only give information about the dynamics since the cart has only
linear motion. [1]
2

d x
dt

dx

N F

(5)

dt
d
2

rF J

dt

(6)

Component of force in direction N is Centripetal force

d
2

MJ

dt

cos

(7)

Centripetal force is

d
2

F MJ

(8)

dt
Summing forces of pendulum in horizontal and vertical direction we will get the equation for N:[1]
2

N m

d x
dt

d
2

dt

d
L cos
L sin
dt

(9)

All rights reserved by www.journalforresearch.org

42

Modelling and Simulation of Inverted Pendulum using Internal Model Control


(J4R/ Volume 01 / Issue 12 / 008)

Considering the FBD of the pendulum rod, the vertical reaction P is given by the weight of the pendulum on the cart. Let be
the displacement of pendulum from the pivot. Then, P is given by [1]

d
2

P sin N cos mg sin mJ

d x

cos
2
2
dt
dt
To get rid of P ad N terms, Sum the moments across the center of pendulum, we get[1]
m

(10)

d
2

NL cos PL sin J

dt

(11)

Substitution of (11) in (10) yields

d x

cos mJ J

dt
After substituting (5) in (1) we get,
2

d x
dt

d
2

mL

dt

mg sin

L dt 2

cos m

d x
dt

(12)

d
mL
c sin F
dt
dt

dx

(13)

By simplifying we get,

X (s)

dx

d
(M m)
b
mL
cos mL
sin F
2
2
dt
dt
dt
dt
Equation (12) and (14) are nonlinear and need to be linearized for the operating range
Since pendulum is being stabilized at an unstable equilibrium position,[1]
Assume that , where phi is small angle from vertical upward direction.
So,
By linearizing we get,
(s)
mLs

2
2
F ( s ) qs b ( J mJL ) s mgl ( M m ) bmgJ
2

d x

( mJL J ) s mgL

(14)

(15)

F ( s ) qs bs ( mJL J ) mgL (1 b )
Putting real time values in the equation we can get the transfer function of inverted pendulum. [1]
2

(16)

IV. SIMULATION AND RESULT


Here PID Controllers is used in feedback mechanisms of the pendulum system. Only angle variable is controlled with PID
Controllers, as Angle and position cannot be controlled by PID controller simultaneously. In Simulation, PID controllers are
optimized for stabilizing the result.

Fig. 3: Simulink model for PID control

Fig. 5: Position of cart controlled by PID

Fig. 4: Simulink model for IMC

Fig. 6: Angle of pendulum Controlled by PID

All rights reserved by www.journalforresearch.org

43

Modelling and Simulation of Inverted Pendulum using Internal Model Control


(J4R/ Volume 01 / Issue 12 / 008)

Fig.5. shows position of inverted pendulum for X Axis Subsystem and Y Axis Subsystem together. Steady state time for
Inverted Pendulum is 3 seconds. Fig.6. shows angle of the Inverted Pendulum for X Axis Subsystem and Y Axis Subsystem
together. Inverted Pendulum makes an oscillation and after that it become stable, using PID Controller.
The following test signals or disturbances are given to monitor the performance of controller:
Impulse Disturbance Input:
A simulation of the system using this controller was firstly conducted with no plant model mismatches, and no delay and as per
IMC theory, it was determined to achieve a near ideal response. Then filter of order 2 is selected to obtain a proper transfer
function. [7]
Step Disturbance Input:

Fig. 7: Discrete impulse disturbance IMC response

Fig. 8: Step disturbance IMC response

Band Limited White Noise Disturbance at the Plant Output:


Very often the plant may suffer from random disturbances, which may not be easily identifiable, which means that a simple
transfer function to model the disturbance may not be adequate. [7]
The output of the random disturbance is shown in Figure 9. It comprises a sinusoid with variable amplitude and frequency. They
closely follow the noise, there was no instability, and oscillates about the correct set point of zero.
Systems with a Plant/Model Mismatch
The plant/model mismatch can appear in the parameter due to measuring error or in another form as dealing with high order
systems as low order ones that increase the gap between them. Besides that, the pendulum system is a nonlinear system and the
transfer function of it, is a result of the linearization operation so the mismatch is present in all cases. [7]

Fig.9: Band limited white noise IMC response

Fig. 10: Comparison of plant model matching and plant model mismatching

V. CONCLUSION
Inverted Pendulum System is modeled and simulated in Simulink. System model works perfectly and stable with exact PID
Controller coefficient. Also, System model shows efficient results by the use of IMC. But, limitation of IMC is that it can only
work efficiently if plant and model matched exactly.

REFERENCES
[1]
[2]
[3]
[4]
[5]

M. Arda, H.Kuscu, Modeling of the 2 dimentional Inverted Pendulum in MATLAB/simulink Proceeding of 5th International Mechanical Engineering
Forum 2012.
Li Hong, Xiong Shibo. Fuzzy internal Model Control for Electro-Hydraulic Servo System Proceeding of the 27th Chienese control conference.
Juan Chen. Lu Wang and Bin Du. Modified Internal Model control for Chemical Unstable Processes with Time-delay Proceeding of the 7th World
congress on intelligent control and Automation June 25-27, 2008, Chongqing, China.
Zheng-Qi WANG, Xue-liang HUANG Nonlineal Internal Model Control for Bearingless induction motor Based on inverse System TheoryAdvance
Matrials Research vol 1037 (2014) pp258-263.
Xianxing Liu, Mingyi Chen, Xiaoyan Shao, Zhengqi wang Study on control system of Bearinlgess Induction Motor Based on Modified Internal Model
Control.

All rights reserved by www.journalforresearch.org

44

Modelling and Simulation of Inverted Pendulum using Internal Model Control


(J4R/ Volume 01 / Issue 12 / 008)
[6]
[7]
[8]

Naoto Abe, Kenji Seki, Hindeaki Kanoh Two Degree of freedom Internal Model Control for Single Tubular Heat Exchanger SystemDepartment of
Precision Engineering , Meili University.
Walid R. Issa A New Approach of Robust Internal Model Control for Nonlinear Pendulum System This thesis is submitted in Partial Fulfillment of the
Requirements for the Degree of Master of Science in Electrical Engineering Islamic University of Gaza, Palestine
Andrej Rybovic, Martin Priecinsky, Marek Paskala Control of the Inverted Pendulum Using State Feedback Control Department of mechatronics and
electonics, Zilina, Slovakia.

All rights reserved by www.journalforresearch.org

45

You might also like