You are on page 1of 6

Proceedings of International Conference on Engineering and Information Technology ICEIT2012

Sep. 17-18, 2012, Toronto, Canada


ISBN: 978-1-77136-064-7

REAL-TIME TRACKING CONTROLLERS FOR SCARA ROBOT


a

Marwan A., bFarrukh Nagi, cKSM Sahari, dHanim S.

a,b,c,d

Universiti Tenaga Nasional, Jalan IKRAM-UNITEN, Kajang, 43000, Selangor, Malaysia


Email:marusm@live.com.my

Abstract
In this paper, real-time experimental results of different controllers performance comparison for SCARA robot is
reported. The study focused on tracking of trajectories. Four controllers are tested in this paper: a classic PID controller; a
Slide Mode Controller (SMC); a classic Fuzzy Logic Controller (FLC) and a new on-line adaptive MIMO Fuzzy Switching
Controller (FSC). The adaptive MIMO FSC is based on the Takagi-Sugenos type fuzzy architecture model with on-line
self-tuning to achieve both desired transient and steady state responses at different operation conditions. The online realtime self-tuning is based on the gradient steepest descent method, which tunes the inputs and outputs scaling factors of
the proposed fuzzy controller. The new controller simplifies the real-time control implementation and improves the control
performance. Controllers are implemented in Matlabs xPC Real-time workshop environment. SCARA robot system
identification was accomplished by using Auto Regression with external input method (ARX) to determine the discrete
time transfer function necessary for the controller design. The comparison is based on the tracking ability subjected to
large payload. Based on the real time results the performance of new fuzzy switching controller with this tuning strategy
was found to be superior at different operating conditions.
Keywords: Two-link manipulators, fuzzy switching control, on-line self-tuning, SCARA robot.

1. Introduction
A SCARA robot manipulator is multivariable
nonlinear coupling dynamic system with uncertain
elements such as friction. The manipulators are usually
used to perform high-precision tasks and by controlling
the motion of a robot effectively and accurately [1]. Efforts
have been made in developing control schemes to
achieve the precise control of SCARA robot
manipulators. Fuzzy Switching Controller (FSC) has been
successfully applied in various areas for nearly two
decades [2]. Some of these are in spacecraft satellite
attitude control systems [3], the servo systems [4], control
of water tank system [5], the elevator control [6] and in
process control valves operation [7]. FSC has become a
popular tool after these successful applications. Recently,
many analysis results and design methodologies for
fuzzy control have been reported. However, most of
these reported research only focused on single-inputsingle-output (SISO) systems. The main difference
between Multiple-Input Multiple-Output (MIMO) control
systems and SISO control systems is in the means of
estimating and compensating for the interaction between
higher degrees of freedom systems. MIMO systems
usually posses complicated dynamics coupling. Its
dynamic model estimate and decoupling for design
purposes are difficult. Hence the traditional model-based
SISO control scheme is hard to implement on complex
MIMO systems because of high computational burden.
*

Corresponding author. Tel.: +6014 6070202 ext. 1172


Fax: :+60-3-8921-2116; E-mail: marusm@live.com.my

ICEIT-2012

Therefore, the model-free fuzzy control strategy is


gradually attracting more attention [8]. However, the
number of control rules and controller computational
burden grow exponentially with the number of input
variables considered. Clearly, the difficulty in controlling
MIMO systems is to solve multi degree freedom coupling
effects. Thus, an appropriate coupling fuzzy controller is
incorporated into a Takagi-Sugenos fuzzy architecture to
control these systems.
The controlling technique described in the proposed
controller is different. Firstly, the fuzzy model based on
Takagi-Sugenos model, uses different tuning of output
gains function. Secondly, the self-tuning technique
applied is based on a simple gradient descent method for
MIMO fuzzy switching controller. Thirdly, the tuned
controller design is based on compensation of steady
state error and reduction of cross coupling effects and as
well as on the improvement of settling time. In most
tuning applications isosceles triangular membership
functions are used with TSK or Mamdani model.
Commonly, centre of area (COA) defuzzification for
Mamdani model is used for tuning.
In this paper, a different defuzzification, largest of
maxima (LOM) is used to arrange the output function in a
certain way to rend switching output from the controller. A
major practical advantage of LOM switching controls is
that they can be implemented with simple on-off action.
The control output takes on either minimum or maximum
value to yield minimum-time control of the system.
Finally, for low cost and reliable solutions with high levels
of flexibility, the design controller is implemented in real-

time workshop. The proposed fuzzy controller consists of


sets of linguistic rules. The consequent part of the fuzzy
rules has only two linguistic values, while the premise
parts are freely chosen. It is structurally simple due to
two member functions in its fuzzy output set and rule
matrix.
The rest of the paper is organized as follows. In
section 2, System identification is studied to demonstrate
the SCARA robot control system. The structure of the
proposed controller and the other compared controllers
are presented in section 3. Section 4, shows the
experimental setup and controllers performances
discussion. Finally, conclusion is presented in section 5.
2.

System Identification

System
or
process
identification
renders
mathematical structure of systems (processes) from
experimental data. The input-output data obtained from
experiment contains information about the system
properties that are of interest to the user. In this work we
tested the open loop response of SCARA robot link1 and
link2 under square wave input signal, 45 Degrees and
frequency of the input signal 0.175Hz. The links response
for the square wave input is shown in Figure1.

controllers use the same input fuzzy sets. However, the


output fuzzy sets are different. The on-line adaptive
MIMO FSC uses Takagi-Sugenos maxima (LOM)
defuzzification technique to yield ON-OFF output. The
FLC uses two SISO with Memdani centroid
defuzzification technique for two link SCARA robot
manipulator. Beside the two types of fuzzy controllers a
simple PID controller and a Slide Mode Controller (SMC)
are described in appendix A and B respectively. The four
controllers are designed in this paper for SCARA robots
control performance comparison.
3.1 Fuzzy Controllers Structure
The MIMO fuzzy switching controller is reviewed in
this section. The input and output range variables are
necessary for any fuzzy controller, which are considered
to be a reasonable representation of situations that a
controller may face and yield to the stability of the
controller, the structure of proposed controller with the
self-tuning scheme shown in Figure 2.

Figure2. The structure of fuzzy switching controller


with the on line self-tuning scheme.
Figure1.

Open Loop Response Link1& Link2 of


SCARA Robot

Among different kind of MATLAB System Identification


Toolbox models validation the Auto Regression with
external input method (ARX) is chosen to identify the
dynamics of real SCARA robot manipulators. It is
necessary to know the position output of each joint and
the robots actuation signal. Discrete Transfer function G1
from input for link1 presented in Equation (1) where, z =
0.001Hz..
0.00024 z 0.003799

(1)
z ^ 2 0.9009 z 0.09921
Transfer function G2 from input for link2 presented in
Equation (2).
9.641 e 005 z 0.002362
(2)
G1
z ^ 2 0.9502 z 0.04981
G1

3.

SCARA Robot Controllers Design

Two types of fuzzy controllers are described in this


section. First, the new proposed controller, which
combines the fuzzy logic with a hard limiter relay in one
entity, is presented. This controller is defined as on-line
adaptive MIMO Fuzzy Switching Controller (FSC). This
controller takes advantage of the Takagi-Sugenos
Largest of Maxima defuzzification (LOM) technique as
well as, the Online Self-Tuning strategy to yield a tuned
switching output. Second, the conventional fuzzy logic
controller (FLC) is presented for comparison. Both

ICEIT-2012

3.2

Linguistic Description

The input and output parameters, as well as the partitions


and spread of fuzzy controllers membership functions
are initially selected to match the dynamic response of a
robotics manipulator system. The conventional fuzzy
logic controller (FLC) is presented for comparison. Both
controllers use the same input fuzzy sets. The proposed
controller has four inputs and two outputs as shown in
Figure2. The inputs xi X i , where i 1,2,3,4 is the
input index of the controllers and X i is the universe of
discourse of the four inputs. For inputs variable, x1 =
error angle for link 1, x2 =error angle for link 2, the
universe of discourse, X i 1,2 = [-2000, 2000] deg, which
represents the range of perturbation angle about the zero
reference. For input variable x3 =error angle rate for
link 1, and x4 =error angle rate for link 2, the universe
of discourse X i 3,4 = [-1.333e+e004, 1.333e+004] deg.
The output universe of the Takagi-Sugenos discourse
u j = [-1, 1] represents the bang-bang output where
j 1,2 is the output index of FSC, the two levels
switching outputs shown in Figure3.

- 42 -

The symmetry of the rules matrix is expected as


it arises from the symmetry of the system dynamics.
Minimum decomposition of linguistic rules from the fuzzy
switching controllers inputs to the outputs is described in
the following equation.

(6)
(y )
(x )
(x
)
Bi

Figure3. Two levels switching output.


. The FLC outputs use Memdani type memberships and
centroid defuzzification technique. The linguistic output
~
variable Aik is the membership function of the
antecedent part defined as:

Aik [ Ai1 LN , Ai2 SN , Ai3 Zero, Ai4 SP, Ai5 LP]

(3)

where, index k is assigned to tally the linguistic input


membership functions and index i is assigned to tally the
input variables. Similar values are selected for
inputs xi 1,2 ,3,4 . FLC outputs membership functions

A ik, j

A ik 1, j

i 1

where i=1,2,3,4 is the input index of the controller and j=


1, 2, 3, 4,.N is the index of N matching rules, which are
applicable from inferences of inputs. n=1, 2 is the output
index of the system, xi is the inputs variable, yn is the
output variable,
is the inputs memberships.

Ai

3.4 Fuzzy Set Membership Functions


For comparison purpose the same set of input variables
and values are assigned to fuzzy set membership
functions in both controllers as shown in Figure5.

are shown in Figure4. These linguistic values defined as


LN = Large Negative, NS= Negative Sign, OFF= Zero,
PS=Positive Sign and PL = Positive Large.

Figure5. The input variables and values assigned to


fuzzy set membership functions
Figure4. FLC Outputs Memberships Functions
3.3 Fuzzy Rules

Triangular shape membership functions are used in this


work. These membership functions are sensitive to small
changes that occur in the vicinity of their centers. A small
2

The fuzzy switching linguistic rules assembled in


this work drives/set the robot manipulators to the desired
position. These rules are based on four inputs variables
for FSC and two inputs variables FLC, each with three
linguistic values defined as LN, Z, and LP. LN = Large
Negative, LP = Large Positive, and there are at most N=
69 possible rules for FSC. The tuning rules-partitions are
heuristically chosen to set the links smoothly over the
universe of discourse. These rules are described in
matrix form in Tables 1 and 2. The shaded diagonal entry
in Table 1 is not used because, the proposed controller
use a different defuzzification, largest of maxima (LOM).
The control output takes on either minimum or maximum
value to yield minimum-time control of the system.
Table 1. Fuzzy Rules of the Switching Controller
E
E

LN

LN

+J

+J

+J

LP

LP

-J
-J

-J

change across the central membership function A i ,


located at the origin, can produce abrupt switching of
control command u j between the +ve and ve halves of
the universe of discourse, resulting in chattering. The
membership functions dont have to overlap but one of
the great strength of FL is that membership can be made
to overlap. This expresses the fact that the glass can be
partially full and partially empty at the same time [9]. In
this way we are able to distribute our decisions over more
than one input class, which helps to make FL systems
robust. The overlapping of the central membership
function membership function A i2 with the neighboring
membership functions A i1 and A i3 reduce the sensitivity
of the switching control action where, i=1,2,3,4 is the
input index of the controllers. Triangular membership
functions in Figure5 are based on mathematical
characteristics
given
in
Table
3.
In
Table
3, a i and bi are the parameters for range and central
location of membership functions respectively, where i=1,
2, 3, 4 is the input index of the controllers as shown in
Fig.5. Smooth transition between the adjacent
membership functions is achieved by having a higher
percentage of overlap, which is commonly set to 50%.

Table 2. Fuzzy Rules for Standard FLC


E
E

LN

LP

LN

PL

PS

OFF

PS

OFF

NS

LP

OFF

NS

NL

ICEIT-2012

Table 3. Mathematical Characterization of Triangular


Membership Functions
Linguistic value Triangular Membership functions

- 43 -

Aik 1

Aik 2

Aik 3

i Ai1( xi

) 2 x ai
1
bi

2 xi ai
1
bi
1 2 xi ai

bi

i Ai2 ( xi )

2 xi ai
1
bi
1

i Ai3 ( xi )

x bi
bi xi ai
ai xi 0
0 xi ai

k = scaling the step size.


g (k ) = step size in direction of f .
g (k ) = change in step size in direction of f .
The steepest descent methods advantage is it simple,
easy to apply and each iteration is fast. Is it also very
stable; if the minimum points exist, the method is
guaranteed to locate the suitable gains values after a few
number of iterations [1].

ai x bi
xi b i

4.

Implementation and Results

4.1 Experimental Setup


3.5

On-line Self-Tuning

The difference between the FLC and the proposed FSC


is that the later takes advantage of the using On-line SelfTuning strategy which is described in this section. The
proposed tuning method in this paper adjusts the heading
reference command of the controller instead of directly
adjusting the FSC, FLC and SMC gains. The tuning
method uses the gradient descent method to tune the
fuzzy gains values. The originality on this proposed
method is its utilization in fuzzy bang-bang controller with
the online self-tuning to control the direction of the robot
manipulators. It is an adaptive control, since with the
change in robot dynamics, the control system tunes itself
and adapts to the changes in the systems dynamics. The
block diagram of the online self-tuning is shown in Figure
6.The steepest descent gradient method is the simplest
example of a gradient based method for minimizing a
function of several variables.

In order to evaluate the performance of the


controllers, a two-link SCARA robot is used. The
overview of the system set-up is shown in Figure7. The
controllers are implemented digitally on a personal
computer and are operated with 0.001ms sampling time.
The MathWorks MATLAB/Simulink is used for real-time
controllers implementation through RTW and xPC
Target. The RTW environment provides a real-time
operation using personal computers and multifunction I/O
boards. However, the use of RTW still requires the
development of custom interface, and due to this xPC
Target is included in the software configuration. The xPC
Target software supports and provides built-in drivers for
many industry standard DAQ card including the PCI6024E DAQ card by National Instrument which is used in
the prototype of the SCARA robot system. A personal
computer is used as host computer. Windows 7 operating
system and other required software are running in the
host computer. Simple on-off control requires low cost
switch motor drivers which receive commands from xPC
controller.

Figure6. Block Diagram of the Online Self-Tuning


The online self-tuning block shown in Figure6 used is
illustrated mechanism heading error, e (k), and change of
heading error, e(k) , are determined as follows:
(7)
e(k ) yr (k ) y (k )
(8)
e(k ) e(k ) e(k 1)
where y r (k ) is the command reference and y(k ) is the
actual output response. The self-tuning method of the
proposed controller applies double gradient descent
block technique where each parameter tunes one of the
controllers outputs. The change in g (k ) to minimize the
error slope f is given as
e(k )
(9)
g (k 1) g (k )
k
g (k )
e(k )
f
(10)
g (k )
Where f directional derivative and ve sign seeks
the minimum value of f 0 .

e(k ) , e(k 1) = values of the error variables in the k and


k 1 iteration.

ICEIT-2012

Figure7. Overview of system set-up


Experimental studies were carried out to evaluate
the performance of the three controllers and a new MIMO
adaptive fuzzy controller. The test is to evaluate the
trajectory tracking capability of the controllers with
different payload and the tuning effect on the
performance of the proposed controller under different
conditions.
4.2 Controllers Performances
The performance of the controllers and proposed
fuzzy switching controller was compared experimentally.
The detailed performance comparison is shown in Table
4 with referred figures indicated in the table. Here, the
performance of tracking control system was evaluated

- 44 -

based on raising time, settling time, overshoot and steady


state error. The analyses were carried out on tracking
step inputs. The control outputs in the Figures.8 to 10
show the changes made in gains to adjust the response
for minimum overshoot and steady state error.
Table 4. Comparison of the proposed controller
MIMO
FSC
with
FLC,
PID,
SMC
tracking90 Input Signal.

0.26

2.35

1.4

0.32

Type
s

Figure
No

FSC

Steady
State
Error
Degree

0.5

FLC

Overshoot
Degree

0.5

PID

Settling
time
(Sec)

0.5
1

0.84

4.21

4.89

32.89

13

SMC

Rising
time
(Sec)

Load
(Kg)

0.5

0.35

2.22

2.31

8.42

14

0.48

2.21

2.39

8.81

15

0.34

2.4

2.1

1.03

0.92

4.1

29

39.4

10

0.97

4.6

21

31.2

11

0.43

4.15

4.8

31.4

12

The table manifests the robustness of the adaptive


capabilities of the proposed FSC by minimizing the
overshoot and steady state error. The fixed un-tuned
controllers have constant unit output as shown in
Figure10 to Figure15. In comparison, the adaptive FSC
for links in Figure8 and Figure9 shows greater switching
ability to compensate for higher loads and desired
performance. In general, it can be concluded that the
proposed adaptive fuzzy switching controller successfully
controlled the systems links and it is better than the
classical fuzzy controller, PID controller, and slide mode
controller in tracking the desired signal with different
payloads.

Figure10. Classical fuzzy Controller with 0.5kg


payload Output response of Link1 and Link2.

Figure11. Classical fuzzy Controller with 1kg payload


Output response of Link1 and Link2.

Figure12. PID Controller with 0.5kg payload Output


response of Link1 and Link2.

Figure13. SMC Controller with 0kg payload Output


response of Link1 and Link2.

Figure8. Tuned Fuzzy Switching Controller with 0.5kg


payload Output response of Link1 and Link2.

Figure14. SMC Controller with 0.5kg payload Output


response of Link1 and Link2.

Figure9. Tuned Fuzzy Switching Controller with 1kg


payload Output response of Link1 and Link2.

ICEIT-2012

- 45 -

Figure15. SMC Controller with 1kg payload Output


response of Link1 and Link2.

Appendix A
A Simple PID Controller

5.

The PID controller is a common form of feedback. In


process control today, more than 95% of the controls
loops are of PID type. There are several methods for
tuning a PID loop. The most effective methods generally
involve the development of some form of process model,
and then choosing P, I, and D based on the dynamic
model parameters. The ZieglerNichols method is used
in this work, via Matlab Optimization Toolbox software to
model the dynamics of a process, to calculate PID
controller parameters. Values of Kp, Ki and Kd are
calculated by utilizing the system identification transfer
function as presented in Equation (4) and Equation (5) for
link1 and link2 respectively. The approximated values of
PID controller parameters are presented in Table A.1.

CONCLUSION

A MIMO fuzzy switching controller suitable for realtime industrial applications has been successfully
designed, developed and implemented in this paper. The
approach of xPC target was adopted to shorten the
development time, thus reducing the cost of
development. Experimental results show that the
proposed controller is capable of controlling the dynamics
of the SCARA robot quickly and with reduced tracking
error. SCARA robot system identification was
accomplished by using Auto Regression with external
input method (ARX) and discrete time transfer function
was used when designing the new controller. The
performance of the MIMO fuzzy switching controller was
found to be good and robust in the presence of high
payload and it matches favorably with experimental
response. Besides, input and output scale factor
parameters could be modied in real time via gradient
steepest descent method. The links trajectories are easily
monitored via xPC target which facilitates the testing of
controllers under different input conditions. The tuned
proposed controller shows promising result and should
be useful in other real-time industrial applications.

Table A.1 PID Controller Parameters


Parameters

link1

link2

Kp

5.3089

5.1045

Ki

0.9514

0.9773

Kd

1.6250

1.7104

References

Appendix B
Classical Sliding Mode Control (SMC)

[1] Marius C. P., Ilie B., Onisifor O., Luminia P.,


Florin G., The Simulation Hybrid Fuzzy Control Of
SCARA Robot, WSEAS Transactions On Systems
And Control, Issue 2, Vol. 3, 2008, pp.105-114.

A general discrete nonlinear single-input-single-output


(SISO) control system could be described for two link
SCARA robot as [8]:
x( z )link1,2 f ( x )link1,2 B( x )link1,2 u( z )link1,2 B.1

[2] Farrukh N., Aidil A., A. Talip, J. Nagi, Marwan


A., Tuning of a New Fuzzy Bang-bang Relay
Controller
for
Attitude
Control
System,
International Journal of Automation and Control,
Vol. 5, No.2, 2011, pp. 97 - 118.
[3] Thongchet S. and Kuntanapreeda S., A fuzzy
Neural Bang-Bang Controller for Satellite Attitude
Control, Proc. of SPIE, Application and Science of
computational intelligence IV, Vol. 4390, 2001.
[4] Chang S. Y., Huang T. L., Fuzzy Bang-Bang
Controller for servo Systems VIA Optimal Path
Estimation Method, IEEE Catalogue, 1995.
[5] Tanaka K., Sugeno M., Stability analysis and
design of fuzzy control systems, Fuzzy Set and
Systems, Vol.45, 1992, pp. 135-156.
[6] Fujitec F., Flex-8800 Series Elevator Group
Control System, Fujitec Co., Ltd., Osaka, Japan,
1988.
[7] Ushiyama R. and Walden H. Cold plate
temperature regulation using fuzzy logic control,
SAE Equation Society of Automotive Engineers
Trans., 1991, pp. 1790-1801.
[8] Eftekharian A. A. and Sayyadi H., Design of Mixed
Fuzzy-GA Controller for SCARA Type Robot,
Proceedings of the IEEE/RSJ International
Conference on Intelligent Robots and System, 2006,
pp. 2173 2178.
[9] Mendel, J., M., "Fuzzy logic systems for
engineering: a tutorial", in Proceedings of the
IEEE, VOL. 83, NO 3, 1995, pp.349-351.

where, the state space formula of the SCARA robot


system is as presented below:

ICEIT-2012

0.9009 0.0992
f ( x )lin k1

0
1

,C( x )link1 0.002 0.0038

1
, B( x )lin k1
0

, D( x )link1 0
1
, B( x )lin k2
0

0.9502 0.0498
f ( x )lin k2

0
1

,C( x )link2 0.001 0.0024

, D( x )link2 0

The control law that satisfies the Sliding mode conditions


can be obtained as:
B.2
u u eq u S

ueq( link1,2 ) B( x )link1,2 K sgn( s )

B.3

where, K 1
us K sgn( s )
1 , if s 0
sgn( s )
1 , if s 0
The saturation function sat(s) is

slink1,2 x1 x2
slink1,2 x1 x2
Substituting Equation B.3and Equation B.2 in Equation
B.1 yield:
slink1 1.9 x1 0.099x2 ulink1
B.4

slink2 1.95x1 0.0498x2 ulink2

- 46 -

B.5

You might also like