Sliding Mode Control of Rotary Inverted Pendulum
Sliding Mode Control of Rotary Inverted Pendulum
Akshay Khadse
Roll No. 153079011
1. Problem Description
Design a nonlinear controller for upright balancing of Rotary Inverted Pendulum System.
Model Parameters:
1. Length of Pendulum (L) = 0.153 m
2. Length of Arm (r ) = 0.08260 m
3. Equivalent Inertia of Arm and Motor ( J ¿¿ arm)¿ = 1.23 ×10−4 Kg m2
4. Inertia of Pendulum ( J ¿¿ pendulum)¿ = 1.1 ×10−4 Kg m2
5. Viscous Damping Coefficient at motor shaft Joint ( B¿¿ eq) ¿ = 0.0015 Nm/(rad/sec)
6. Viscous Damping Coefficient at Pendulum Arm Joint (B¿¿ pen) ¿ = 0.0005
Nm/(rad/sec).
Provided model takes torque as input and has two angles as output. So, a suitable
motor needs to be considered while modelling as motor parameters are not provided. Let the
motor parameters as follows [2]:
1. Torque Constant ( K ¿¿ t)¿ = 0.02797 Nm/A
2. Back EMF Constant (K ¿¿ m)¿ = 0.02797 V/(rad/sec)
3. Armature Resistance (Rm) = 3.3 Ohm
4. Voltage Rating = 10 V
2. Modelling:
T
Let the state vector be x=[ α α̇ θ θ̇ ]
Let
2
a=J eq + mr
b=mLr
4
c= m L2
3
d=mgL
K t K m + Beq R m
G=
Rm
ẋ 2=f 1 ( x ) + g1 ( x ) u
ẋ 3=x 4
ẋ 4 =f 2 ( x )+ g 2 ( x ) u
Where
2
−b 2
s in ( 2 x 1 ) x 2−Gb x 4 cos ( x 1) + aⅆ sin ( x 1 )
2
f 1 ( x )=
ac−b2 cos2 ( x 1)
K t b cos ( x 1)
g1 ( x ) =
R m ( ac−b cos ( x 1 ) )
2 2
c f 1 ( x ) −ⅆ sin ( x1 )
f 2 ( x )=
b cos ( x 1 )
Kt c
g2 ( x ) =
R m ( ac−b cos ( x 1 ) )
2 2
s2=x 4 + λ3 x3
V̇ =−κ sat ( Vϕ )
where
sat ( Vϕ )= Vϕ if ϕ <|V |
¿ sgn (V ), otherwise
If input is chosen as
u=
−κ sat ( Vϕ )−( λ x + f ( x ) ) sgn (s )− λ ( λ x +f ( x ) ) sgn ( s )
1 2 1 1 2 3 4 2 2
g1 ( x ) sgn ( s 1 ) + g2 ( x ) sgn ( s2 )
4. Tuning
κ , λ 1, λ 2, λ 3 and ϕ are the tuning parameters in this case. Following intuition was
applied for tuning:
1. For both the angles to be stable λ 1 and λ 3 must be greater than zero. Higher the
values of these parameters, lesser would be the respective settling times. Also, λ 1
should be much higher than λ 2 because, for upright balancing of pendulum,
control of α is more emphasised than that of θ .
2. λ 2 serves as trade off between the two manifolds, and therefore should be in
between 0 and 1.
3. κ is indicative of rate at which V approaches 0. So, this cannot be less than zero.
Using this intuition, suitable values of these parameters turned out to be
κ=2
λ 1=0. 2
λ 2=0.0 1
λ 3=5
ϕ =0.5
5. Results
6. Conclusions:
1. A nonlinear sliding mode controller was designed for rotary inverted pendulum
system provided.
2. Controller can stabilize initial pendulum angle disturbances up to 25 degrees.
3. For larger disturbances, up to 30 degrees, some performance starts degrading.
References:
1. Sliding Mode Control of Rotary Inverted Pendulm, M. A. Khanesar, M. Teshnehlab,
M. A. Shoorehdeli, Proceedings of the 15th Mediterranean Conference on Control &
Automation, 2007
2. QNET Experiment #04: Inverted Pendulum Control reference manual, Pages [5-6]