You are on page 1of 4

MATHEMATICAL MODELLING

A. Dynamics of the System


According to system dynamics, the control input is the voltage to provides the force to
the system and the outputs are cart position and pendulum angle. Since the system has two
degrees of freedom, there will also be two dynamic equations. Fig.1. shows the pictorial
representation of the inverted pendulum.

Fig.1. Pictorial Representation of Inverted Pendulum System


The parameters and their symbols are as follows:
F – Force applied to the cart
M – Mass of the cart
m – Mass of the pendulum
l – Length to pedulum center of mass
I – Moment of inertia of the pendulum
x – Cart position
θ – Pendulum Position
g – Acceleration due to gravity
V – Potential Energy of the system
T – Kinetic Energy of the system

Firstly, the kinematics of the system is considered:


Xm = x + l sin θ , and Ẋ m = ẋ +l θ̇ cos θ
Ym = l cos θ , and Ẏ m = −l θ̇ sinθ
After having the velocities of the pendulum, the Potential Energy and the Kinetic Energy of
the system are formulated.
Potential Energy: There is only pendulum's potential energy because cart's potential energy is
zero.
V = mgl cos θ
Kinetic Energy: There are three kinetic energies. They are cart's kinetic energy, pendulum's
kinetic energy and rotational kinetic energy.
1 1 1
T= M ẋ 2 + m ( Ẋ m2 + Ẏ m2 ) + I θ̇ 2
2 2 2
1 2 1 1 2
M ẋ + m ( ẋ +2 l ẋ θ̇ cos θ+l θ̇ (co s θ+ si n θ) ) + I θ̇
2 2 2 2 2
=
2 2 2
1 2 1 2 2
= ( M + m ) ẋ + ml ẋ θ̇ cos θ + (I + ml ) θ̇
2 2
After that , the Lagrangian of the system can be formulated by the difference between total
kinetic energy and total potential energy.
L = T -V
1 1
= ( M + m ) ẋ 2+ ml ẋ θ̇ cos θ + (I + ml 2) θ̇2 - mgl cos θ
2 2
The two generalized coordinates are x and θ . So the Euler-Lagrange equations for the
Inverted Pendulum system are

( )( )
d ∂L
dt ∂ ẋ

∂L
∂x
=F (*Neglect the coefficient of friction)

(
d ∂L
dt ∂ θ̇ )−(
∂θ )
∂L
=0

After solving the above Euler-Lagrange equations, the two dynamic equations of the system
are obtained.
(M + m) ẍ + mlθ̈ cos θ−ml θ̇2 sin θ= F (1)

( I + ml 2 ¿ θ̈−mglsinθ +ml ẍ cos θ=0 (2)


The system under condiseration is a non-linear system. So it needs to be linearized by making
a small approximation to the system as follows:
Assuming the pendulum will not deviate more than 10 degrees from the vertically upward
position, which means θ is relatively small to 1 Rad ( θ << 1), and substituting ' u ' for the
input ' F '.
Then the following approximation can be obtained:
cos θ ≈ 1
sin θ ≈ θ

θ̇ ≈ 0
2

Substituting the above approximation into our nonlinear dynamic equations and substituting u
for the input F, the linearized dynamics equations are obtained.
( M + m ) ẍ +ml θ̈ = u (3)
( I + ml2 ) θ̈+ ml ẍ = mgl θ (4)

B. Transfer Function of the System


In control theory, transfer functions are used to characterize the input-output
relationships of components or systems that can be described by linear, time-invariant,
differential equations. The transfer function of the system is the ratio of the Laplace
transformed output to the Laplace transformed input when all initial conditions are zero.
Therofore, to obtain the transfer functions of the system, we must first take the
Laplace transform of the dynamics equations assuming zero initial conditions.

Laplace transform of equation(3)


( M + m ) X ( s ) s 2 + mlθ ( s ) s 2 = U(s) (5)
Laplace transform of equation(4)

( I +ml2 )θ ( s ) s 2+ mlX ( s ) s2=mglθ ( s ) (6)


Solving equation(6) for X(s)

X ( s )=
[ −(I + ml 2) g
ml ]
+ 2 θ ( s ) (7)
s

Substituting equation(7) into equation(5)

[ ]
2
−( I + ml ) g
(M+m) + 2 θ ( s ) s 2 + mlθ ( s ) s 2 = U(s) (8)
ml s

The values of parameters are given as follow;


M = 0.2275 kg , m = 0.0923 kg , l = 0.185m , I = 0.004212 kg.m2

You might also like