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

Fuzzy + PID Controller for Robot Manipulator

S. G. Anavatti and S. A. Salman J. Y. Choi


School of Aerospace, Civil & School of Electrical Engineering
Mechanical Engineering Seoul National University
Australian Defence Force Academy Kwanak, P.O. Box 34 (#048)
UNSW@ADFA, Canberra, ACT 2600 Seoul, 151600
AUSTRALIA SOUTH KOREA
{a.sreenatha,s.salman}@adfa.edu.au jychoi@snu.ac.kr

Abstract effectiveness of this hybrid controller are presented. A


simple stability analysis is also investigated.
Design and stability analysis for a hybrid fuzzy Section 2 gives a brief description of the fuzzy
logic controller is presented in the present work for a logic controller whereas section 3 gives a brief
robot manipulator. The PD-type fuzzy controller is description of robot manipulator dynamics. In section
combined with a conventional PID controller to 4, fuzzy PD controller for the system is described and
enhance the performance and robustness of the numerical simulation for the system is shown in
controller. A simple stability analysis is presented for section 5. In section 6 and 7 stability analysis and
the hybrid controller. Numerical simulation results concluding remarks are presented respectively.
are presented to validate the controller design.
2. Fuzzy logic controller
1. Introduction
The basic configuration of fuzzy system is shown in
In the last two decades, the problem of controlling Figure 1. There are four components in a fuzzy system:
robot manipulators has attracted and challenged many 1) Fuzzifier which maps crisp points in the input
researchers [1-4]. Generally, Robot manipulator space into fuzzy sets.
dynamics is characterized by nonlinearity and 2) Fuzzy inference engine which uses
parameter variations due to variations in load, friction techniques in approximate reasoning to determine a
and external disturbances, etc [2, 3]. The conventional mapping from the fuzzy sets in the input space
controllers for such a system may not give desirable U ⊂ R n to the fuzzy sets in the output space
results [4]. On the other hand the conventional
controllers such as PID are very widely used in the
V ⊂ Rm .
industry due to their reliability and ease of 3) Fuzzy rule base which comprises fuzzy rules
implementation. Although these controllers are very describing how the fuzzy system performs; it is the
effective and easy to use with linear system, they are heart of the whole system in the sense that other three
not highly suitable for nonlinear, complex, time variant components are used to interpret and combine these
systems with delay. The fuzzy logic controllers are rules to form the final system.
shown to be efficient tools for control of nonlinear and 4) Defuzzifier which maps fuzzy sets in the output
uncertain parameters systems. A combination of the space into crisp points.
fuzzy logic and conventional controller (hybrid) will be There are several forms for fuzzy controller P-like
a far more appropriate solution for controlling the fuzzy controller, PD-like fuzzy controller, PI-like
robot manipulators. In recent years hybrid fuzzy and fuzzy controller and PID-like fuzzy controller.
conventional controllers are combined to design a In the present work, PD-like fuzzy controller is
controller such as fuzzy P+ID [5, 6]. This is shown to applied. In the fuzzy PD controller the control
improve the transient as well as steady state response. variables are the error (e) and the change of the error
In the present work, a conventional PID controller (∆e). The rule base is;
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
if e is (property symbol) and ∆e is (property In the present work, the fuzzy PD controller was
symbol) then u is (property symbol) 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.
Fuzzy Figure 2, 3 and 4 represent the fuzzy memberships
Rule Base
for the system. Three memberships are used (Negative,
Crisp
Zero, Positive).
Fuzzifier Defuzzifier
Uє Zero
Negative Positive
1

Fuzzy
Inference Fuzzy sets in V
Engine

-10 -5 0 5 10

Figure 2. Fuzzy memberships for Pos_ENC1.


C ontrol variable s Control Zero
(e, ∆ e) input (u)
Plant Negative
1
Positive

Figure 1. Basic configuration of fuzzy system.

3. Robot manipulator dynamics -10 -8 0 8 10

Figure 3. Fuzzy memberships for Vel_ENC1.


The linear robot manipulator dynamics for a 6-axis
Zero
industrial robot modeled as the following fourth order Negative Positive
SISO is given by [8]; 1

0 1 0 0 
  0
 −K −C 1 K  1
0
 J1 J1 J1    -40 -30 0 30 40

x =   x +  J1  u, Figure 4. Fuzzy memberships for output.


0 0 0 1   
K −K −C2  0
 0   0 
 J2 J2 J2  Table 1
y =[ 0 0 1 0] x, System parameters
J1 0.0108 + nn1*0.0108
where J1 and J 2 are the inertia of the mass
J2 0.0108 + nn2*0.0108
connected to the motor and the link respectively, K is
the torsional spring constant, and C1 and C2 are the C1 0.007
rotary damping constants for the motor and the link C2 . 0.001
respectively. Table 1 shows the system parameters. nn1 K 1.37
and nn2 are the fractions of the variations in moment A rule base consisting of nine rules is written to
of inertia for the model and the link respectively. provide the control input. The rule base is given by;
Figure 5 represents the block diagram for the If e is Negative and ∆e is Negative then u is
system under study where the coulomb frictions for the Negative
motor and the link are taken into the account and this If e is Negative and ∆e is Zero then u is Negative
makes the system under study nonlinear.

4. Fuzzy PD controller for robot


manipulator

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
1 V e l _E N C3 1 P o s_ E NC1
1
J1.s+ c1 s K
M o to r T orq u e 1 V e l _ E NC3 1
motor 1
Sum 4 Sum 3 G a in 4 J2.s+c2 s
P o s_ E NC3
S um 5 l ink

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 12

If e is Zero and ∆e is Positive then u is Positive


10
If e is Positive and ∆e is Negative then u is Zero
If e is Positive and ∆e is Zero then u is Positive 8

If e is Positive and ∆e is Positive then u is Positive


6
In the present work, the product inference rule and
singleton fuzzifier with center average defuzzifier are 4

used where e represents the error between the reference


position and Pos_ENC1 and ∆e represents the 2

difference between the derivative of the reference 0


position and Vel_ENC1.
-2
0 1 2 3 4 5 6

5. Numerical simulations
Figure 6. Position output
Figure 6 shows that the position output (red)
follows the reference input (blue). Figure 7 shows the 0.4

control input to the motor. 0.3


The results indicate that the Fuzzy PD controller is
a reasonably good option for controlling the robot 0.2

manipulator. 0.1

In order to improve the controller both in terms of 0

performance as well as robustness, the structure of the -0.1


controller was altered to include a conventional PID
controller in parallel with the Fuzzy PD controller. -0.2

Some studies in this direction are available in the -0.3


0 1 2 3 4 5 6

literature and are shown to be better in terms of both


transient as well as steady state performances [1]. Figure 7. The control input to the motor
Thus, PID controller with a Fuzzy PD controller has
been employed. The gains of the PID controller are To validate the robustness of the controller with
tuned by trial and error. respect to parameter variations, the following
The simulink block diagram with the fuzzy simulations were carried out.
controller and the PID controller is shown in figure 8. Figure 11 and figure 12 show the output of the
As shown in figure 9 and figure10 the output system with +25% and -25 % variations in J1
follows the reference input very well and the control respectively.
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
P os _EN C 1

Vel_EN C 1
Mot or Torq ue
P os _EN C 3
Ze ro-Ord er Vel_EN C 3
S co pe 1
Ho l d1
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 co pe3
KI Ga i n2
s
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
8
8
6

6 4

4 2

0
2 0 5 10 15 20 25

0
0 55 10
10 15
15 20
20 25
25
Figure 11. Position output with +25% in J
Figure 9. Position output

0.4

0.3 20

18
0.2
16

0.1 14

12
0
10

-0.1 8

6
-0.2
4

-0.3 2
0 5 10 15 20 25
0
0 5 10 15 20 25

Figure 10. The control input to the motor


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
20 λ4 + (C2 /J2 + C1/J1) λ3 + {(K/J2 + C1C2/(J1J2 ) + K/J1
18
- (1/J1 )( C2 /J2 )( ðu/ðx2 ) - (1/ J1 ) ( ðu/ðx1 )} λ 2 +
16
{C1K/(J1J2 )+KC2 /(J1J2 ) - K/(J1J 2 )ðu/ðx 2
14
-\ C2 /(J1J2 ) ðu/ðx1 }λ-K/J2 J1 ðu/ðx1 = 0
12
For stability of the system, it is necessary that (using
10
Routh’s criterion);
8
ðu/ðx1 < 0
6
and the condition on ðu/ðx 2
4

2
If ðu/ðx 2 < 0 , then definitely the coefficients are all
0
positive (this can be relaxed if necessary) since all the
0 5 10 15 20 25
other system parameters are positive.
The control response for a disturbance from the
Figure 13. Position output with +25% in J2 equilibrium is shown in figure 15.

25

-3
x 10
20
4

15 2

0
10
-2

5 -4

-6
0.02
0
0 5 10 15 20 25 0.01 4
0 2
0 -3
Figure 14. Position output with +25% in J1 and J2 -0.01 -2 x 10
rate of encoder 1 output -0.02 -4
encoder 1 output

From the above results, it can be seen that the


proposed controller is very good in terms of Figure 15. Control response for a disturbance
performance as well as robustness against parameter A curve fit is tried to get the polynomial to
variations. Friction parameter also doesn’t have major represent the control input. This function is given by;
effect and a nominal friction value is employed for all
Y= a+b*x1+c*x12 +d*x13+e*x14+f*x15
simulations
+g*x2+h*x22 +i*x23+j*x24+k*x25
6. Stability analysis where x1 = encoder 1 output and x 2 = rate of
encoder 1 output and the coefficients are given by;
The model of the given system is linear. Hence,
stability analysis by using Lyapunov’s 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
a = -5.97700108433458E-06;
b = -0.86151661686934; 10. References
c = 571.498300151155;
[1] Wai, R.J and Hsieh, K.Y, “Tracking Control Design for
d = 257960.114819243; Robot Manipulator via Fuzzy Neural Network” Proceeding
e = -103249624.697929; of the 2002 IEEE International Conference in Fuzzy
Systems, Volume 2, 2002, pp: 1422 – 1427.
f = -18603530712.7527;
g = -6.88170038023972E-02; [2] Huang, S. J., and Lee, J. S.,”A stable self organizing
fuzzy controller for robotic motion control” IEEE Trans. Ind.
h = -23.586323116819; Electro., vol. 47, no. 2, 2000, pp. 421-428.
i = 2738.12829231871;
[3] Yoo, B. K, and Ham, W. C.,” Adaptive control of robot
j = 185532.806248592; manipulator using fuzzy compensator” IEEE Trans. Fuzzy
k = -14266369.8792436 Systems, vol. 8, no. 2, 2000, pp. 186-199.
If b and g are negative, the necessary condition for
[4] Lewis, F. L., Yesildirek, A., and Liu, K., “Multilayer
Routh’s stability is definitely satisfied. In addition, the neural-net robot controller guaranteed tracking performance,”
eigenvalues for the linearised closed loop system are IEEE Trans. Neural networks, vol. 7, no. 2, 1996, pp. 388-
given by; 398.
-2.1991 +16.9465i
-2.1991 -16.9465i [5] Wei Li, “Design of a Hybrid Fuzzy Logic Proportional
Plus Conventional Integral-Derivative Controller”, IEEE
-1.3595 + 5.8724i trans. on Fuzzy Systems, Vol. 6, No. 4. 1998, pp. 449-63.
-1.3595 - 5.8724i
[6] Li, W. et al, “Tracking Control of a Manipulator under
These are in the left half of the s-plane and hence
Uncertainty by FUZZY P + ID Controller”, Fuzzy Sets and
the system is stable. The numerical simulations Systems, vol. 122, 2001, pp. 125-137.
indicate the same.
[7] Jenkins D., Passino K.M., “An introduction to Nonlinear
7. Concluding remarks Analysis of Fuzzy Control Systems”, Journal of Intelligent
and Fuzzy Systems, Vol. 7, No. 1, 1999, pp. 75-103.
The present work provides the numerical results for
[8] Yeon J.S., Lee S.H. and Park J.H., “Development of an
robot manipulator system with the fuzzy controller
Inverse Dynamics Controller for Industrial robots with
along with a conventional PID/PD controller. This is HyRoHILS system”, Proceedings of International
seen to enhance the performance of the controller. The Conference on Control, Automation and Systems (ICCAS
numerical simulation results show that the present 2005), Korea, Kyeonggi-Do, June 2-5, 2005.
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

You might also like