You are on page 1of 27

A Sliding Mode Control for Robot

Manipulator
Auralius Manurung
RIS-Lab
May, 2010
Introduction
At certain condition, precise modeling is not
possible.
Unmodeled external forces, frictions, etc may
effect the stability.
Robust and adaptive control can deal with
modeling inaccuracies and suitable for
nonlinear systems.
Sliding mode control is a simple approach for
robust control technique.

SMC Derivation
A system with dynamics f and we are giving
control input u.

Considering our system is a 2
nd
order system:

For position and velocity control, we define
sliding surface s as:

) ( ) , ( ) (
) (
t u t x f t x
n
+ =
x x x
dt
d
s
~ ~ ~
+ =
|
.
|

\
|
+ =

u f x + =
Setting and substituting :



Since our dynamic model f is just an
approximation, approximated control law that
would achieve can be expressed as:



0 = s
x x f u
x x u f
x x x
s
d
d
d

~
0
~
0
~
0

+ =
= + +
= +
=
u f x + =
x x f u
d

+ =
0 = s
Graphical interpretation where system is
pushed to slide in sliding surface with slope .
x
x
0 = s
Slope =

Switching Action
Introducing switching action that will
maintain system work in sliding surface:



Overall control law can be expressed as:

>
=
<
=
0 , 1
0 , 0
0 , 1
) (
) (
s
s
s
s sign
s sign K u
sw
) (
~

s sign K x x f u u u
d sw
+ = + =


Low frequency
Control
High frequency
Control
Chattering as a result of control switching
x
x
0 = s
Slope =

Smoothing
Smoothing out discontinuities by introducing
boundary layer thickness:

<
<
<
=
1 , 1
1 , 0
0 , 1
) (
) (
|
|
|
s
s
s
s sat
s sat K u
sw
x
x
0 = s
Slope =
Boundary layer

Simulation Example
Two-link robot manipulator model:




Lagrange-Euler dynamic model:

t u u u u u u = + + ) ( ) , ( ) ( G F M
r r

Dynamic equation:


M11 = (m1 + m2) * r1^2 + m2 * r2^2 + 2 * m2 * r1 * r2 * cos(2);
M12 = m2 * r2 ^2 + m2 * r1 * r2 * cos(2);
M22 = m2 * r2 ^2;
F12 = m2 * r1 * r2 * sin(2);
g1 = (m1 + m2) * r1 * cos(theta2) + m2 * r2 * cos(1 + 2);
g2 = m2 * r2 * cos(1 + 2);
(

=
(

+
(

+
+
(

2
1
2
1
2
1
1 12
2 1 12 2 12
2
1
22 12
12 11
0
) (
u
u
g G
g G
F
F F
M M
M M
u
u
u
u u u
u
u




Experiment 1:
No Boundary Layer
Input trajectory for each joint (i):

i
(t) = -90+52.5(1-cos(1.26t))
Initial condition:

1
(0) = -80 deg,
2
(0) = -70 deg
m
1
=0.5kg, m
2
= 0.5kg
r
1
= 1.0m, r
2
= 0.8m
T
s
= 1kHz, fixed-step, ode5
Joint 1: K = 16, = 4, = 0;
Joint 2: K = 10, = 4, = 0;


0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-0.18
-0.16
-0.14
-0.12
-0.1
-0.08
-0.06
-0.04
-0.02
0
0.02
Tracking error of joint-1
Time (Seconds)
T
r
a
c
k
i
n
g

e
r
r
o
r

(
r
a
d
)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
Tracking error of joint-2
Time (Seconds)
T
r
a
c
k
i
n
g

e
r
r
o
r

(
r
a
d
)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-30
-20
-10
0
10
20
30
40
Torque at joint-1
Time (Seconds)
T
o
r
q
u
e

(
N
m
)
Chattering
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-15
-10
-5
0
5
10
15
20
Torque at joint-2
Time (Seconds)
T
o
r
q
u
e

(
N
m
)
Switching
-0.18 -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
Phase potrait of joint-1
e(t)
d
(
e
(
t
)
)
/
d
t
Switching
-0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Phase potrait of joint-2
e(t)
d
(
e
(
t
)
)
/
d
t
Switching
Experiment 2:
Introducing Boundary Layer
Joint 1: K = 16, = 4, = 0.01;
Joint 2: K = 10, = 4, = 0.01;

High frequency switching at joint torque does
no longer exist (see next figures).

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-25
-20
-15
-10
-5
0
5
10
15
20
Torque at joint-1
Time (Seconds)
T
o
r
q
u
e

(
N
m
)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-15
-10
-5
0
5
10
Torque at joint-2
Time (Seconds)
T
o
r
q
u
e

(
N
m
)
-0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Phase potrait of joint-2
e(t)
d
(
e
(
t
)
)
/
d
t
-0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Phase potrait of joint-2
e(t)
d
(
e
(
t
)
)
/
d
t
Chattering reduced
Chattering reduced
Experiment III:
Robustness Test
Joint 1: K = 8, = 5, = 0.01;
Joint 2: K = 8, = 5, = 0.01;
m
1
=0.5kg, m
2
= 1.0kg
We added extra mass 0.5 kg to joint 2.
Switching re-appears to maintain the trajectory in
the sliding surface.
It is possible to do tracking with more load by
reducing the boundary layer to allow more
switching to occur.
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
Tracking error of joint-2
Time (Seconds)
T
r
a
c
k
i
n
g

e
r
r
o
r

(
r
a
d
)
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-0.18
-0.16
-0.14
-0.12
-0.1
-0.08
-0.06
-0.04
-0.02
0
0.02
Tracking error of joint-1
Time (Seconds)
T
r
a
c
k
i
n
g

e
r
r
o
r

(
r
a
d
)
-0.18 -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
Phase potrait of joint-1
e(t)
d
(
e
(
t
)
)
/
d
t
-0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Phase potrait of joint-2
e(t)
d
(
e
(
t
)
)
/
d
t
Conclusions
Sliding mode control shows good
performances for nonlinear system with
parameter uncertainties and unmodeled
disturbances.
SMC is good control method for practical
problems.
References
C. Su, T. Leung, A Sliding Mode Control with Bound
Estimation for Robot Manipulators, IEEE Trans. On.
Robotics and Automation, vol. 9, pp. 208-213, 1993
J.E. Slotline, W. Li, Appled Nonlinear Control, Prentice
Hall
S. Tokat, I. Eksin, M. Guzelkaya, M. T. Soylemez, Design
of A Sliding Mode Controller with A Nonlinear Time-
varying Sliding Surface, SAGE Trans. of The Institute
Measurement and Control, vol. 25, pp. 145-162, 2003
C. Edwards, S. Spurgeon, Sliding Mode Control Theory
and Applications, Taylor & Francis


You can download the Matlab file in:
http://sites.google.com/site/auraliusproject/a-sliding-mode-control-for-robot-manipulator

You might also like