Вы находитесь на странице: 1из 6

Fuzzy + PID Controller for Robot Manipulator

S. G. Anavatti and S. A. Salman


School of Aerospace, Civil &
Mechanical Engineering
Australian Defence Force Academy
UNSW@ADFA, Canberra, ACT 2600
AUSTRALIA
{a.sreenatha,s.salman}@adfa.edu.au
Abstract
Design and stability analysis for a hybrid fuzzy
logic controller is presented in the present work for a
robot manipulator. The PD-type fuzzy controller is
combined with a conventional PID controller to
enhance the performance and robustness of the
controller. A simple stability analysis is presented for
the hybrid controller. Numerical simulation results
are presented to validate the controller design.

1. Introduction
In the last two decades, the problem of controlling
robot manipulators has attracted and challenged many
researchers [1-4]. Generally, Robot manipulator
dynamics is characterized by nonlinearity and
parameter variations due to variations in load, friction
and external disturbances, etc [2, 3]. The conventional
controllers for such a system may not give desirable
results [4]. On the other hand the conventional
controllers such as PID are very widely used in the
industry due to their reliability and ease of
implementation. Although these controllers are very
effective and easy to use with linear system, they are
not highly suitable for nonlinear, complex, time variant
systems with delay. The fuzzy logic controllers are
shown to be efficient tools for control of nonlinear and
uncertain parameters systems. A combination of the
fuzzy logic and conventional controller (hybrid) will be
a far more appropriate solution for controlling the
robot manipulators. In recent years hybrid fuzzy and
conventional controllers are combined to design a
controller such as fuzzy P+ID [5, 6]. This is shown to
improve the transient as well as steady state response.
In the present work, a conventional PID controller
is tuned in parallel with the fuzzy PD type controller.
Numerical simulation results to demonstrate the

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

J. Y. Choi
School of Electrical Engineering
Seoul National University
Kwanak, P.O. Box 34 (#048)
Seoul, 151600
SOUTH KOREA
jychoi@snu.ac.kr
effectiveness of this hybrid controller are presented. A
simple stability analysis is also investigated.
Section 2 gives a brief description of the fuzzy
logic controller whereas section 3 gives a brief
description of robot manipulator dynamics. In section
4, fuzzy PD controller for the system is described and
numerical simulation for the system is shown in
section 5. In section 6 and 7 stability analysis and
concluding remarks are presented respectively.

2. Fuzzy logic controller


The basic configuration of fuzzy system is shown in
Figure 1. There are four components in a fuzzy system:
1) Fuzzifier which maps crisp points in the input
space into fuzzy sets.
2) Fuzzy inference
engine
which
uses
techniques in approximate reasoning to determine a
mapping from the fuzzy sets in the input space

U R n to the fuzzy sets in the output space


V Rm .

3) Fuzzy rule base which comprises fuzzy rules


describing how the fuzzy system performs; it is the
heart of the whole system in the sense that other three
components are used to interpret and combine these
rules to form the final system.
4) Defuzzifier which maps fuzzy sets in the output
space into crisp points.
There are several forms for fuzzy controller P-like
fuzzy controller, PD-like fuzzy controller, PI-like
fuzzy controller and PID-like fuzzy controller.
In the present work, PD-like fuzzy controller is
applied. In the fuzzy PD controller the control
variables are the error (e) and the change of the error
(e). The rule base is;

if e is (property symbol) and


symbol) then u is (property symbol)

e is (property

Fuzzy
Rule Base
Crisp

Fuzzifier

Defuzzifier

In the present work, the fuzzy PD controller was


designed as follows: the inputs to fuzzy PD controller
are the position of encoder 1 (Pos_ENC1) and velocity
of the encoder 1 (Vel_ENC1). The output from the
controller is the motor torque.
Figure 2, 3 and 4 represent the fuzzy memberships
for the system. Three memberships are used (Negative,
Zero, Positive).
Zero

Negative

Fuzzy
Inference
Engine

Positive

Fuzzy sets in V

-10

-5

10

Figure 2. Fuzzy memberships for Pos_ENC1.


C ontrol variable s
(e, e)

Plant

Control
input (u)

Zero
Negative

Positive

Figure 1. Basic configuration of fuzzy system.

3. Robot manipulator dynamics

-10

The linear robot manipulator dynamics for a 6-axis


industrial robot modeled as the following fourth order
SISO is given by [8];
1
0
0
0
0

K
K
1
1

0

J1 J1 J1

x =
x + J1 u,
0
0
1

0
0
K
K C2
0
0

J2 J2
J2
y =[ 0 0 1 0] x,

controller

10

Figure 3. Fuzzy memberships for Vel_ENC1.


Zero
Negative

-40

Positive

-30

30

40

Figure 4. Fuzzy memberships for output.

where J1 and J 2 are the inertia of the mass


connected to the motor and the link respectively, K is
the torsional spring constant, and C1 and C2 are the
rotary damping constants for the motor and the link
respectively. Table 1 shows the system parameters. nn1
and nn2 are the fractions of the variations in moment
of inertia for the model and the link respectively.
Figure 5 represents the block diagram for the
system under study where the coulomb frictions for the
motor and the link are taken into the account and this
makes the system under study nonlinear.

4. Fuzzy PD
manipulator

-8

for

robot

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

J1

Table 1
System parameters
0.0108 + nn1*0.0108

J2

0.0108 + nn2*0.0108

C1

0.007

0.001
C2 .
1.37
K
A rule base consisting of nine rules is written to
provide the control input. The rule base is given by;
If e is Negative and e is Negative then u is
Negative
If e is Negative and e is Zero then u is Negative

V e l _E N C3

J1.s+ c1

P o s_ E NC1
K

M o to r T orq u e

Sum 4

motor

Sum 3

G a in 4

V e l _ E NC3

J2.s+c2

P o s_ E NC3
l ink

S um 5
C ou l o m b &
V i sco u s Fri c ti on 1

Co ul o m b &
V i sco u s Fri cti o n

Figure 5. Simulink block diagram for the system.


If e is Negative and e is Positive then u is Zero
If e is Zero and e is Negative then u is Negative
If e is Zero and e is Zero then u is Zero
If e is Zero and e is Positive then u is Positive
If e is Positive and e is Negative then u is Zero
If e is Positive and e is Zero then u is Positive
If e is Positive and e is Positive then u is Positive
In the present work, the product inference rule and
singleton fuzzifier with center average defuzzifier are
used where e represents the error between the reference
position and Pos_ENC1 and e represents the
difference between the derivative of the reference
position and Vel_ENC1.

12

10

-2
0

5. Numerical simulations
Figure 6 shows that the position output (red)
follows the reference input (blue). Figure 7 shows the
control input to the motor.
The results indicate that the Fuzzy PD controller is
a reasonably good option for controlling the robot
manipulator.
In order to improve the controller both in terms of
performance as well as robustness, the structure of the
controller was altered to include a conventional PID
controller in parallel with the Fuzzy PD controller.
Some studies in this direction are available in the
literature and are shown to be better in terms of both
transient as well as steady state performances [1].
Thus, PID controller with a Fuzzy PD controller has
been employed. The gains of the PID controller are
tuned by trial and error.
The simulink block diagram with the fuzzy
controller and the PID controller is shown in figure 8.
As shown in figure 9 and figure10 the output
follows the reference input very well and the control
input is small and well behaved when no variations in
the parameters are presented.

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

Figure 6. Position output

0.4

0.3

0.2

0.1

-0.1

-0.2

-0.3

Figure 7. The control input to the motor


To validate the robustness of the controller with
respect to parameter variations, the following
simulations were carried out.
Figure 11 and figure 12 show the output of the
system with +25% and -25 % variations in J1
respectively.

P os _EN C 1
Vel_EN C 1
Mot or Torq ue
P os _EN C 3

Ze ro-Ord er
Ho l d1

Vel_EN C 3

S co pe 1

M o tor_l i n k d yn am i cs
Zero -O rde r
Hol d

Scop e2

Fuzzy L og i c
Co ntrol l e r

KD

1
1
s

KI

S co pe3
Ga i n2

In teg rat or
du /dt
KP
Deri vat i ve

S co pe5

P osi ti on
I np ut2

Figure 8. Simulink block diagram including the controller

20
20
20

18
18

18

16
16
16

14
14

14

12
12

12
10

10
10

2
0

2
0

55

10
10

15
15

20
20

25
25

10

15

20

25

Figure 11. Position output with +25% in J

Figure 9. Position output


0.4

20

0.3

18

0.2
16
14

0.1

12

0
10
8

-0.1

-0.2
4

-0.3

10

15

20

25
0

Figure 10. The control input to the motor

10

15

20

25

Figure 12. Position output with -25% in J


Figure 13 shows the output response for +25%
variations in J2 while a +25% combined variations in
J1 and J2 are shown in figure 14.

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

4 + (C2 /J2 + C1/J1) 3 + {(K/J2 + C1C2/(J1J2 ) + K/J1

20

- (1/J1 )( C2 /J2 )( u/x2 ) - (1/ J1 ) ( u/x1 )} 2 +


{C1K/(J1J2 )+KC2 /(J1J2 ) - K/(J1J 2 )u/x 2

18
16
14
12
10
8
6
4
2
0

10

15

20

25

Figure 13. Position output with +25% in J2

-\ C2 /(J1J2 ) u/x1 }-K/J2 J1 u/x1 = 0


For stability of the system, it is necessary that (using
Rouths criterion);
u/x1 < 0
and the condition on u/x 2
If u/x 2 < 0 , then definitely the coefficients are all
positive (this can be relaxed if necessary) since all the
other system parameters are positive.
The control response for a disturbance from the
equilibrium is shown in figure 15.

25

-3

x 10
20

4
2

15

0
10

-2
-4

-6
0.02
0

10

15

20

25

0.01

4
2

Figure 14. Position output with +25% in J1 and J2


rate of encoder 1 output

From the above results, it can be seen that the


proposed controller is very good in terms of
performance as well as robustness against parameter
variations. Friction parameter also doesnt have major
effect and a nominal friction value is employed for all
simulations

6. Stability analysis
The model of the given system is linear. Hence,
stability analysis by using Lyapunovs method
(linearising the non-linear control input) is performed
to demonstrate that the system is stable [7]. Numerical
simulation results justify the stability analysis.
The control input, u is a non-linear function of the
encoder 1 output (Pos_ENC1) and the rate of change of
encoder 1 output (Vel_ENC1).
u = f( x1 , x 1 ) = f( x1 , x 2 )
The characteristic equation for the closed loop
system can be written as;

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

-0.01
-4

-3

x 10

-2
-0.02

encoder 1 output

Figure 15. Control response for a disturbance


A curve fit is tried to get the polynomial to
represent the control input. This function is given by;
Y= a+b*x1+c*x12 +d*x13+e*x14+f*x15
+g*x2+h*x22 +i*x23+j*x24+k*x25

where x1 = encoder 1 output and x 2 = rate of


encoder 1 output and the coefficients are given by;

a = -5.97700108433458E-06;
b = -0.86151661686934;
c = 571.498300151155;
d = 257960.114819243;
e = -103249624.697929;
f = -18603530712.7527;
g = -6.88170038023972E-02;
h = -23.586323116819;
i = 2738.12829231871;
j = 185532.806248592;
k = -14266369.8792436
If b and g are negative, the necessary condition for
Rouths stability is definitely satisfied. In addition, the
eigenvalues for the linearised closed loop system are
given by;
-2.1991 +16.9465i

-2.1991 -16.9465i
-1.3595 + 5.8724i
-1.3595 - 5.8724i
These are in the left half of the s-plane and hence
the system is stable. The numerical simulations
indicate the same.

7. Concluding remarks
The present work provides the numerical results for
robot manipulator system with the fuzzy controller
along with a conventional PID/PD controller. This is
seen to enhance the performance of the controller. The
numerical simulation results show that the present
structure does a very good job. Experiments are
planned to validate the controller on a laboratory
scaled model.

International Conference on Computational Intelligence for Modelling


Control and Automation,and International Conference on
Intelligent Agents,Web Technologies and Internet Commerce (CIMCA-IAWTIC'06)
0-7695-2731-0/06 $20.00 2006

10. References
[1] Wai, R.J and Hsieh, K.Y, Tracking Control Design for
Robot Manipulator via Fuzzy Neural Network Proceeding
of the 2002 IEEE International Conference in Fuzzy
Systems, Volume 2, 2002, pp: 1422 1427.
[2] Huang, S. J., and Lee, J. S.,A stable self organizing
fuzzy controller for robotic motion control IEEE Trans. Ind.
Electro., vol. 47, no. 2, 2000, pp. 421-428.
[3] Yoo, B. K, and Ham, W. C., Adaptive control of robot
manipulator using fuzzy compensator IEEE Trans. Fuzzy
Systems, vol. 8, no. 2, 2000, pp. 186-199.
[4] Lewis, F. L., Yesildirek, A., and Liu, K., Multilayer
neural-net robot controller guaranteed tracking performance,
IEEE Trans. Neural networks, vol. 7, no. 2, 1996, pp. 388398.
[5] Wei Li, Design of a Hybrid Fuzzy Logic Proportional
Plus Conventional Integral-Derivative Controller, IEEE
trans. on Fuzzy Systems, Vol. 6, No. 4. 1998, pp. 449-63.
[6] Li, W. et al, Tracking Control of a Manipulator under
Uncertainty by FUZZY P + ID Controller, Fuzzy Sets and
Systems, vol. 122, 2001, pp. 125-137.
[7] Jenkins D., Passino K.M., An introduction to Nonlinear
Analysis of Fuzzy Control Systems, Journal of Intelligent
and Fuzzy Systems, Vol. 7, No. 1, 1999, pp. 75-103.
[8] Yeon J.S., Lee S.H. and Park J.H., Development of an
Inverse Dynamics Controller for Industrial robots with
HyRoHILS system, Proceedings of International
Conference on Control, Automation and Systems (ICCAS
2005), Korea, Kyeonggi-Do, June 2-5, 2005.