CCC 2008 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Sliding Mode PID-Controller Design for Robot Manipulators by Using

Fuzzy Tuning Approach


Mohammad Ataei1, S. Ehsan Shafiei2
1. Electronic Department- Engineering Faculty, University of Isfahan, Isfahan, Iran
E-mail: mataei1971@yahoo.com
2. Electrical and Robotic Engineering Faculty, Shahrood University of Technology, Shahrood, Iran
E-mail: sehshf@yahoo.com

Abstract: In this paper, a chattering free sliding mode control (SMC) for a robot manipulator including PID part with a
fuzzy tunable gain is designed. The main idea is that the robustness property of SMC and good response characteristics
of PID are combined with fuzzy tuning gain approach to achieve more acceptable performance. For this purpose, in the
first stage, a PID sliding surface is considered such that the robot dynamic equations can be rewritten in terms of sliding
surface and its derivative and the related control law of the SMC design will contain a PID part. The stability guarantee
of this sliding mode PID-controller is proved by a lemma using direct Lyapunov method. Then, in the second stage, in
order to decrease the reaching time to the sliding surface and deleting the oscillations of the response, a fuzzy tuning
system is used for adjusting both controller gains including sliding controller gain parameter and PID coefficient.
Finally, the proposed methodology is applied to a two-link robot manipulator including model uncertainty and external
disturbances as a case study. The simulation results show the improvements of the results in the case of using the
proposed method in comparison with the conventional SMC.
Key Words: Sliding Mode Control, Robot manipulator, PID control, Fuzzy control, Lyapunov theory.

1 INTRODUCTION and boundary layer has been presented to achieve more


improvements.
A robot manipulator is a nonlinear system with high
In this paper, in addition to using the integral term in the
coupling term whose dynamics consists of uncertainty and
sliding surface, [17, 18], at first, the SMC witch is including
encountered with payload changes, friction and disturbance
PID part is designed and its stability guarantee is proved in a
[1]. On the other hand, sliding mode control (SMC) as a
lemma. Then, in order to improve the controller
nonlinear technique with the capabilities of robustness
performance, a fuzzy system is used to tune the gain of
against the model uncertainties and ability of the disturbance
reaching phase and also PID part gain. Thus, a chattering
rejection has been considered in many researches [2-4].
free SMC is achieved in which the tracking error and
Although the robustness of the SMC is one of its main
reaching time to sliding surface has been reduced without
characteristics, this is achieved only in the sliding phase and
need to variable sliding surface.
the system is sensitive to the structured uncertainties and
external disturbances in the reaching phase to the sliding The reminder of the paper is organized as follows. In the
surface. Therefore, different approaches for improving the section 2, the mathematical model of the robot manipulator
performance of the SMC has been proposed which one of is given. The SMC including the PID loop to which is
them is intelligent control method such as fuzzy control denoted as SMC-PID is presented in section 3. The design
system [5-7]. Because of the relations between SMC and of fuzzy SMC-PID is described in section 4. In section 5, the
fuzzy control, [8], the combination of these two approaches simulation results are provided and finally, summary and
has been considered as a research topic in last years [9-13] some conclusions are presented.
such that the advantages of both approaches can be used.
2 THE SYSTEM MATHEMATICAL MODEL
One simple way to decrease the sensitivity of sliding mode
controller to the parametric uncertainties and external The dynamical equation of an n-link robot manipulator in
disturbances is using of high control gain which decrease the standard form is as follows [1]:
also the reaching time and tracking error. However, high M ( q ) q + C ( q, q ) q + G ( q ) + τ d = τ (1)
control gain increases the oscillations in the control signal
that may lead to the excitation of high frequency unmodeled where M (q) ∈ R n×n is a symmetry and bounded positive
dynamics which is an undesired phenomenon. To overcome definite matrix which is called inertial matrix. Moreover,
this drawback, the fuzzy logic can be used for tuning of this
gain. In this regard, in [14], a nonlinear sliding surface and q, q, q ∈ Rn are the position, velocity, and angular
fuzzy logic have been used in the design of a fuzzy terminal acceleration of the robot joint, respectively. The matrix
SMC for a robot manipulator. Also, a fuzzy variable sliding C (q, q) ∈ R n×n is the matrix of Coriolis and centrifugal
surface based method has been proposed in [15] in order to
improve the tracking performance. In [16], in addition to forces such that the matrix H ( q ) − 2C ( q, q ) is asymmetry,
using variable sliding surface, the idea of fuzzy gain tuning i.e., for a nonzero n × 1 vector x we will have:
x T [ H (q) − 2C ( q, q )]x = 0 . Also, G (q ) ∈ R n is the law should be designed such that the following sliding
condition is satisfied [2]:
gravity vector, τ d ∈ R n is the bounded disturbance vector
such that τ d ≤ TD and τ ∈ R n
is the control input vector.
1 d T
2 dt
[ ]
s Ms < −η ( s T s )1 / 2 for s≠0 (10)

In the following, H (q ) , C (q, q ) and G (q ) are shown by This subject is proved in the following lemma.
H, C, and G, respectively. Lemma- In the SMC design of a system with dynamic
equation (1) and sliding surface (3), if the control input τ is
3 SLIDING MODE CONTROL WITH PID selected as (6), by considering F as (9) and
The objective of tracking control is design a control law for K = diag ( K11 , K 22 , , K nn ) with the following
obtaining the suitable input torque τ such the position components:
vector q can track the desired trajectory q d . In this regard, K ii = [F + K v s + TD + η ]i , i = 1,2, , n (11)
the tracking error vector is defined as follows: Then, the sliding condition (10) is satisfied by equation (4).
e = qd − q (2) Proof: Consider the following Lyapunov function
In order to apply the SMC, the sliding surface is considered candidate:
as the relation (3) which contains the integral part in 1 T
addition to the derivative term: V=s Ms (12)
2
t
s = e + λ1e + λ 2 edt (3) Since M is positive definite, for s ≠ 0 we have V > 0 and
0 by differentiating of the relation (12) and regarding the
where λi is diagonal positive definite matrix. Therefore, symmetric property of M, it can be written:
s = 0 is a stable sliding surface and e → 0 as t → ∞ . The 1 T
V= s Ms + s T Ms (13)
robot dynamic equations can be rewritten based on the 2
sliding surface (in term of filtered error) as follows: By substituting (4) in (13) and considering that
Ms = −Cs + f + τ d − τ (4)
s T ( M − 2C ) s = 0 , we have:
Where
1 T
t V= s Ms − s T Cs + s T ( f + τ d − τ )
f = M (q d + λ1e + λ 2 e) + C (q d + λ1e + λ 2 edt ) + G 2 (14)
0
T
(5) = s ( f +τ d −τ )
Now, the control input can be considered as follows: By replacing the relation (6) in (14), V can be rewritten as:
τ = fˆ + K v s + K sgn( s ) (6) V = s T ( f + τ d − fˆ − K v s − K sgn( s ))
Where n
~ (15)
t = s T ( f + τ d − K v s) − K ii s i
fˆ = Mˆ (q d + λ1e + λ 2 e) + Cˆ (q d + λ1e + λ 2 edt ) + Gˆ
0 i =1
(7) Since the following inequality (16) is valid and regarding
is an estimation of f and the relation (11), we have:
t ~
K v s = K v e + K v λe + K v λ edt is the outer PID F + K v s + TD ≥ f + τ d − K v s (16)
0
tracking loop, and K v , K are diagonal positive definite ~
K ii ≥ [ f + τ d − K v s ] i + η i (17)
matrices and are defined such that the stability conditions
are guaranteed. The sgn(s) is also the sign function. Finally, it can be concluded that:
We have also: n

~ ~ ~ t ~
V ≤− η i si (18)
f = M (q d + λ1e + λ 2 e) + C (q d + λ1e + λ 2 edt ) + G ≤ F i =1
0
This indicates that V is a Lyapunov function and the sliding
(8)
condition (10) has been satisfied.
~ ~ ~
where f = f − fˆ , M = M − Mˆ , C = C − Cˆ ,and The use of sign function in the control law leads to high
~ oscillations in control torque which is undesired
G = G − Gˆ . F can also be selected as the following
phenomenon and is called chattering. To overcome this
relation:
drawback, there are some solutions which one of them is
~ ~ t ~ using the following saturation function instead of sign
F = M (q d + λ1e + λ 2 e) + C (q d + λ1e + λ 2 edt + G
0 function in the discontinuous part of the control law:
(9)
In order to reach the system states (e, e) to the sliding
surface s = 0 in a limited time and remain there, the control
1 s ≥ϕ N Z P
1
s s
sat = −ϕ < s < ϕ (19)
ϕ ϕ 0.8

Degree of membership
−1 s ≤ −ϕ
0.6

By this, there is a boundary layer ϕ around the sliding


0.4
surface such that when the state trajectory reach to this layer
will be remaining there. 0.2

4 THE DESIGN OF FUZZY SMC-PID 0

-1 -0.5 0 0.5 1
As it was mentioned before, by using a high gain in SMC inpu variable sd
(K), the sensitivity of the controller to the model (b)
uncertainties and external disturbances can be reduced.
Continue Fig. 1: The membership functions for b) input s
Moreover, a high gain in PID part of the control system
( K v ) can reduce the reaching time to sliding surface and
tracking error. However, increasing the gain causes the 1
S M B

increment of the oscillations in the input torque around the


sliding surface. Therefore, if this gain can be tuned based on 0.8

Degree of membership
the distance of the states to the sliding surface, a more
0.6
acceptable performance can be achieved. In other words, the
value of gain should be selected high when the state 0.4

trajectory is far from the sliding surface and when the


0.2
distance is decreasing, its value should be decreased. This
idea can be accomplished by using fuzzy logic in 0
combination with SMC to tune the gain adaptively.
0 0.2 0.4 0.6 0.8 1
For this purpose, two-input one-output fuzzy system is output variable K

designed whose inputs are s and s which are the distances


of the state trajectories to the sliding surface and its Fig. 2: The membership functions of the output K fuzz
derivative, respectively. The membership functions of these
two inputs are shown in figure (1). The output of the fuzzy Tab. 1: The fuzzy rule base for tuning K fuzz
system is denoted by K fuzz and has been shown in figure
s
(2). For applying these gains to the control input, the NB NS Z PS PB
s
normalization factors N and N v as the following relations
are used: N B B M S B
Z B M S M B
K = N ⋅ K fuzz (20)
P B S M B B
K v = N v ⋅ K fuzz (21)
These factors can be selected by trial and error such that the The maximum values of K and Kv are limited according to
stability condition (17) is satisfied. the system actuators power, and the minimum value of K
should not be less than the provided amount in relation (17).
NB NSZEPS PB
The fuzzy base rule has been given in table (1) in which the
1 following abbreviations have been used: NB: Negative Big;
0.8
NS: Negative Small; Z: Zero; PS: Positive Small; PB:
Degree of membership

Positive Big; M: Medium. For example, when s is negative


0.6 small (NS) and s is positive (P), then K fuzz is small (S).
0.4
5 THE CASE STUDY AND SIMULATION
0.2 RESULTS
0 In order to show the effectiveness of the proposed control
-1 -0.5 0 0.5 1 law, it is applied to two-links robot with the following
input variable "s" parameters:
(a)
α + β + 2γ cos q 2 β + γ cos q 2
Fig. 1: The membership functions for a) input s M (q) = (22)
β + γ cos q 2 β
− γq 2 sin q 2 − γ (q1 + q 2 ) sin q 2
C ( q, q ) = (23)
γq1 sin q 2 0
αδ 1 cos q1 + γδ 1 cos(q1 + q 2)
G (q) = (24)
γδ 1 cos(q1 + q 2 ) 150

input1(N.m)
100
where α = (m1 + m2 )a12 , β = m 2 a 22 , γ = m 2 a1 a 2 , 50

δ = g a 1 , and m1 , m 2 , a1 = .7 , a 2 = .5 are the masses 0

and lengths of the first and second links, respectively. The -50
0 2 4 6 8 10
masses are assumed to be in the end of the arms and the time(sec)
gravity acceleration is considered g = 9.8 . Moreover, the 100
masses are considered with 10% uncertainty as follow:

input2(N.m)
50
m1 = m10 + ∆m1 , ∆m1 ≤ .4
(25) 0
m 2 = m 20 + ∆m 2 , ∆m 2 ≤ .2
-50
0 2 4 6 8 10
where m10 = 4 and m 20 = 2 , and M̂ , Ĉ , and Ĝ are time(sec)
estimated. The desired state trajectory is:
1 − cos π t Fig. 4: The control inputs in the case of using conventional SMC
qd = (26)
2 cos π t
0.15
and the disturbance torque is considered as follows:
0.1

Error1(rad)
0.5 sin 2πt 0.05
τd = (27)
0.5 sin 2πt 0

0.5 -0.05
0 2 4 6 8 10
which leads to TD = .
0.5 time(sec)
2
The design parameters are determined as follow: 1.5
Error2 (rad)

15 0 40 0 1
λ1 = , λ2 = (28) 0.5
0 15 0 40 0
The values of the ϕ and η are selected as -0.5
0 2 4 6 8 10

ϕ = 0.167 and η = [0.1 0.1]T . Moreover, the factors N time(sec)

and N v are selected as follow: Fig. 5: The tracking errors in the case of using Fuzzy SMC-PID
50 0 5 0
N= , Nv = (29) 200
0 5 0 10
input1 (N.m)

In order to show the improvement due to the proposed 100

method of this paper (Fuzzy SMC-PID), the simulation 0


results of applying this method are compared with the
related results of the conventional SMC. The tracking error -100
0 2 4 6 8 10
and control law in the case of conventional SMC have been time(sec)
shown in figures (3) and (4), respectively. The 100
corresponding graphs for the case of applying fuzzy
input2 (N.m)

50
SMC-PID are also provided in figures (5), and (6).
0
-50
0.15
Error1(rad)

0.1 -100
0 2 4 6 8 10
0.05
time(sec)
0
-0.05
0 2 4 6 8 10
time(sec) Fig. 6: The control inputs in the case of using Fuzzy SMC-PID
2
1.5 As it is seen in these figures, the proposed fuzzy SMC-PID
Error2(rad)

1 has faster response and less tracking error in comparison


0.5 with conventional SMC. In order to show more clearly the
0
-0.5
difference between the tracking errors in two cases, the
0 2 4 6 8 10 enlarged graphs have been provided in figures (7) and (8).
time(sec)

Fig. 3: The tracking errors in the case of using conventional SMC


[4] J. Y. Hung, W. Gao, and J. C. Huang, Variable Structure
0.01 Control: A Survey, IEEE Trans. Ind. Elec., Vol. 40, No. 1,
2-22, 1993.
Error1(rad)

0.005

0
[5] L. X. Wang, A Course in Fuzzy Systems and Control,
Prentice Hall, NJ, 1997.
-0.005
[6] C. C. Lee, Fuzzy Logic in Control Systems: Fuzzy Logic
-0.01
0 2 4 6 8 10 Controller-Part I, IEEE Trans. Sys. Man. and Cyb. Vol. 20,
time(sec) No. 2, 404-418, 1990.
-3
5
x 10 [7] C. C. Lee, Fuzzy Logic in Control Systems: Fuzzy Logic
Controller-Part II, IEEE Trans. Sys. Man. and Cyb. Vol. 20,
Error2(rad)

No. 2, 419-435, 1990.


0
[8] R. Palm, D. Driankov, and H. Hellendoorn, Model Based
Fuzzy Control: Fuzzy Gain Schedulers and Sliding mode
-5 Fuzzy Controllers. Springer-Verlag Berlin Heidelberg, 1997.
0 2 4 6 8 10
time(sec)
[9] J. C. Lo, and Ya. H. Kuo, Decoupled Fuzzy Sliding Mode
Control, IEEE Trans on Fuzzy systems, Vol. 6, No. 3,
426-435, 1998.
Fig. 7: The enlargement of the tracking errors in the case of using
[10] L. K. Wang, H. F. Leung, and K. S. Tam, A Fuzzy Sliding
conventional SMC
Controllers for Nonlinear Systems, IEEE Trans. Ind. Elec.,
Vol. 48, No. 1, 32-37, 2001.
-4
x 10 [11] Q. P. Ha, Q. H. Nguyen, D. C. Rye, and H. F. Durrant-Whyte,
5
Fuzzy Sliding Mode Controllers with Applications, IEEE
Error1 (rad)

Trans. Ind. Elec., Vol. 48, No. 1, 38-46, 2001.


0
[12] Z. Lin, Q. Zhu, and Y. Yan, Variable Structure Control Based
on Fuzzy Law for Underactuated Robot Manipulators, IEEE
-5 Int. Conf. on Mechatronics and Automation, 1908-1913,
0 2 4 6 8 10
2006.
time(sec)
x 10
-3 [13] C. M. Lin, and Y. J. Mon, Decoupling Control by Hierarchical
1 Fuzzy Sliding Mode Controller, IEEE Trans. Cont. Sys.
Technology, Vol. 13, No. 4, 593-598, 2005.
Error2 (rad)

0.5
0 [14] Y. C. Huang, and T. H. S. Li, Fuzzy Terminal Sliding Mode
Controller for Robotic Manipulators, IEEE Int. Conf. on
-0.5
Mechatronics, 858-863, 2005.
-1
0 2 4 6 8 10 [15] Q. P. Ha, D. C. Rye, and H. F. Durrant-Whyte, Fuzzy Moving
time(sec) Sliding Mode Control with Application to Robotic
Manipulators, Automatica, Vol. 35, 607-616, 1999.
Fig. 8: The enlargement of the tracking errors in the case of using [16] H. Javaheri, and G. R. Vossoughi, Sliding Mode Control with
Fuzzy SMC-PID Online Fuzzy Tuning: Application to a Robot Manipulator,
IEEE Int. Conf. on Mechatronics & Automation, 1357-1362,
2005.
6 CONCLUSION [17] T. C. Kuo, Y. J. Huang, A Sliding mode PID-Controller
In this paper, design of a sliding mode control with a PID Design for Robot Mnipulator, IEEE Conf. On Computational
Intelligence in Robotics and Automation, 625-629, 2005.
loop for robot manipulator was presented in which the gain
of both SMC and PID was tuned on-line by using fuzzy [18] I. Eker, Sliding mode control with PID sliding surface and
experimental application to an electromechanical plant, ISA.
approach. Then the stability guarantee of the system was
Trans. Vol. 45, No. 1, 109-118, 2006.
proved by direct Lyapunov method. The proposed
methodology in fact tries to use the advantages of the SMC,
PID and Fuzzy controllers simultaneously, i. e., the
robustness against the model uncertainty and external
disturbances, quick response, and on-line automatic gain
tuning, respectively. Finally, the simulation results of
applying the proposed methodology to a two-link robot
were provided and compared with corresponding results of
the conventional SMC which show the improvements of
results in the case of using the proposed method.

REFERENCES
[1] M. W. Spong, and M. Vidiasagar, Robot Dynamics and
Control, Wiley, New York, 1989.
[2] J. J. Slotine, and W. Li, Applied Nonlinear Control,
Englewood Cliffs, NJ: Prentice Hall, 1991.
[3] W. Perruquetti, and J. P. Barbot, Sliding Mode Control in
Engineering. Marcel Dekker, Inc. New York, 2002.

You might also like