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

International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.

3 1317

actuators-dc servomotors for each joint. Actuator é1 0 0 0 ù


characteristics; dc servo motors were studied in detail. It ê0 1 0 0 úú
T3 = A3 = ê
develops through Virtual Reality Modeling Language 2
(3)
(VRML) a 4-axis SCARA system for handling. The ê0 0 1 - d3 ú
structure to be built depends on the principles of solid-body ê ú
modeling with VR technology. Simulation on ë0 0 0 1 û
MATLAB/Simulink software will reinforce the results
obtained by SD program. The results of both will be
éc4 - s4 0 0 ù
presented and discussed. The paper is organized as follows:
Section 2 introduces robotics and robot kinematics, Section
ês c4 0 0 úú
3 presents the robot‟s inverse kinematics, Section 4, the T4 = A4 = ê 4
3
(4)
dynamics, Sections 5 and 6, the robot‟s actuators and
ê0 0 1 - d4 ú
ê ú
transmission elements, Section 7 a review of ANFIS, ë0 0 0 1 û
Section 8 the VRML design of the model, Section 9 the
ANFIS controller, and Section 10 the simulation, results, After the multiplication and use of addition matrices, one
and conclusions. gets the total transformation matrix:

2. ROBOT KINEMATICS éc124 - s124 0 L2 c1 + L1c1 ù


Table 1 defines the Denavit-Hartenberg (D-H) parameters ês c124 0 L2 s12 + L1s1 úú
specifying the SCARA robot. T4 = ê 124
0
(5)
ê 0 0 1 - d3 - d 4 ú
Table.1 D-H parameters of the robot ê ú
ë 0 0 0 1 û
i i di ai i
3. INVERSE KINEMATICS OF THE ROBOT
1 1 0 L1 0
3.1. Inverse Solution for Position:
2 2 0 L2 0
Desired location of the SCARA robot
3 0 d3 0 0 énx ox ax px ù
ên oy ay p y úú
TH = ê y
4 4 d4 0 0 R
(6)
ê nz oz az pz ú
ê ú
By using (D-H) convention [11], the transformation ë0 0 0 1û
matrices result in:
The final equation representing the robot is [12-16]:
éc1 - s1 0 L1c1 ù
ês c1 0 L úú THR = A1 A2 A3 A4 = T40 (7)
T1 = A1 = ê 1
0
(1)
ê0 0 1 0 ú To solve for the angle 4, both sides of equation (7) are
ê ú successively pre-multiplied with A3-1 A2-1 A1-1 matrices,
ë0 0 0 1 û
such that:
éc2 - s2 0 L2 c2 ù
ês A3-1 A2-1 A1-1THR = A4
0 L2 s2 úú
(8)
c2
T2 = A2 = ê 2
1
(2)
ê0 0 1 0 ú The left side of the equation (8) ( A3-1 A2-1 A1-1THR ) is:
ê ú
ë0 0 0 1 û
(9)

(9)

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*
International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.3 1318

é1 0 0 0 ù é c2 s 2 0 - L2 ù é c1 - s1 0 - L1 ù én x o x ax px ù ü Dc1 (L1 + L2 c2 ) px - L2 s2 p y (L1 + L2 c2 ) px - L2 s2 p y


c1 = = = (21)
ê0 1 0 0 úú êê- s 2 c2 0 0 úú êê- s1 c1 0 0 úú êên y o y a y p y úú ï
ï D (L1 + L2 c2 )2 + (L2 s2 )2 px2 + p y2
ê ´ ´ ´ =
ê0 0 1 - d 3 ú ê 0 0 1 0 ú ê 0 0 1 - d1 ú ê n z o z a z pz ú ï
ê
ë0 0
ú ê
0 1 û ë 0 0 0 1 û ë 0 0 0 1 û ë0 0
ú ê ú ê
0 1û ï
ú ï s1 (L1 + L2 c2 ) p y - L2 s2 px
q1 = tan -1 = tan -1 (22)
é nx c12 + n y s12 o x c12 + o y s12 a x c12 + a y s12 p x c12 + p y s12 - L1c2 - L2 ù
ý
ï c1 (L1 + L2 c2 ) px - L2 s2 p y
ê- n s + n c o s + o c - a s + a c - p x s12 + p y c12 - L1 s2 úú ï
ê x 12 y 12 x 12 y 12 x 12 y 12
ï From 4,4 elements of the equation (5) and (6):
ê nz oz az pz + d3 ú ï
ê ú ï
ë 0 0 0 1 û þ d 3 = - pz - d 4 (23)
(9)
We have
From 1,4 and 2,4 elements of the equations (5) and (6):

px = L1c1 + L2c12 (10)


q3 = 0 (24)

From 1,1 and 2,1 elements of the equation (4) and (9):
p y = L1s1 + L2 s12
(11)
c4 = n x c12 + n y s12 (25)
From equation 10 and equation 11,
s4 = -n x s12 + n y c12 (26)
c2 =
1
(
p x2 + p y2 - L12 - L22 ) (12)
2L1 L2 - n x sin (q1 + q 2 ) + n y cos(q1 + q 2 )
q 4 = tan -1 (27)
nx cos(q1 + q 2 ) + n y sin (q1 + q 2 )
s 2 = ± 1 - c 22 (13)

s2
q 2 = tan -1 (14)
3.2. Inverse Solution for Velocity
c2
From equation (11) and equation (12)
Rearranging equation (10) and equation (11) yields:

px = (L1 + L2 c2 )c1 - L2 s2 s1 (15)


p& x = - L1 s1q&1 - L2 s12 q&1 + q&2( ) (28)

p y = L2 s 2 c1 + (L1 + L2 c2 )s1 (16) p& y = + L1c1q&1 - L2 c12 q&1 + q&2 ( ) (29)

Solving equations (15) and (16) by kramer‟s rule: So,

éL + L c - L2 s2 ù p& x = -(L1 s1 + L2 )q&1 - L2 s12q&2 (30)


D=ê 1 2 2 = (L1 + L2 c2 ) + (L2 c2 )
2 2
ú
L1 + L2 c2 û
(17)
ë L2 s2 p& y = -(L1 s1 + L2 c12 )q&1 + L2 c12q&2 (31)

é L1 + L2 c2 - p x ù
Ds1 = ê = (L1 + L2 c2 ) p y - (L2 s2 ) p x Using Kramer‟s rule to solve equation (31) and equation
- p y úû
(18)
(32)
ë L2 s2
p& x c12 + p& y s12
é p x - L2 s2 ù q&1 =
ú = (L1 + L2 c2 ) p x + (L2 s2 ) p y
(32)
Dc1 = ê (19) L1 s 2
ë p y L1 + L2 c2 û
- p& y (L1 s1 + L2 s12 ) - - p& x (L1c1 + L2 c12 )
Ds (L1 + L2 c2 ) p y - L2 s2 p x (L1 + L2 c2 ) p y - L2 s2 p x q&2 = (33)
s1 = 1 = = (20)
L1 L2 s2
D (L1 + L2 c2 )2 + (L2 s2 )2 p x2 + p 2y

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*
International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.3 1319

Translational velocity: ( ) ( )
b12 = r22 + L1r2 c2 m2 + j 2 + g r 2 j m2 + L12 + L1 L2 c2 (m3 + mm3 ) + j3 + jm2

d&3 = - p& z (34)


b13 = g r 3 jm3 ; b14 = 2L1s2 [m2 r2 + (m3 + mm3 )L2 ]

By differentiating the equation (27): b15 = L1s2 [m2 r2 + (m3 + mm3 )L2 ] ;
c4 dq 4 = -[dnx s12 (dq1 + dq 2 )] + d ny c12 - n y s12 (dq1 + dq 2 ) (35) b15 = L1s2 [m2 r2 + (m3 + mm3 )L2 ]

So, b21 = m2 (r22 + L1r2 c2 ) + j2 + g r 2 j m2 + (L12 + L1 L2 c2 )(m3 + mm3 ) + j3 + j m3


b22 = r22 m2 + j 2 + g r22 j m 2 + L22 (m3 + mm3 ) + j3 + jm3
dq1 + dq 2
dq 4 = -
c4
(nx c12 + n y s12 ) - 12 dnx + 12 dny
s
c4
c
c4
(36) b23 = g r 3 jm3 ;
b24 = L1s2 [m2 r2 (m3 + mm3 )L2 ] b31 = b32 = g r 3 jm3 ;
And finally:
b33 = m3 + g r 3 jm3 b34 = m3 g
dq c12 n& - s12 n& x - (nx c12 + n y s12 )q&12
;
q&4 = = (37) 5. ACTUATOR EQUATIONS (ACTUATOR
dt c4
MODELING)
3.3 Inverse Solution for Acceleration Actuator is the device moving a robot. The device types

( & & ) & (&& && ) & &


include pistons (pneumatic, hydraulic) and motors (DC,
&q& = - p x s12 + p y c12 q12 + p x c12 + p y s12 - L1c2q1q 2 (38)
stepper). Most robots use DC motors, so a detailed model
for this actuator type will be derived for use throughout this
1
L1 s1 research. To control the voltage supply, the motor drive will
use PWM control, which use microcontrollers for these
q&&2 =
[
( &p&x s1 - &p&x c1 )L1 + ( &p&x s12 - &p&xc12 )L2 + (p& y c1 - p& x s1 )L1q&1 + (p& y c12 + p& x s12 )L2q&12 + L1L2q&22 ] advantages [18-20]:
L1L2 s2
(39) 1) their size and lightness
2) the fewer inputs and outputs, and
d&&3 = - &p& x (40) 3) remote operation using

n&&y c12 - n&&x s12 -(2n& y s12 + 2n& x c12 )q&&12 - (n y c12 - nx s12 )q&122 - (nx c12 + n y s12 )q&&12 + s4q&42
4) changeable with minimum loss of the armature voltage
q&&4 =
c4 Equations governing permanent-magnet operation with
(41) separate-wound or shunt-wound DC motors (see Figure 4)
when the flux is constant are [12]:
4. Dynamics of the Robot dia
Va = Ria + ea + L (45)
For SCARA robot figure 3, torques exerted on the robot dt
joints are [17]:
ea = kefwm = kwwm (46)
T1 = b11q&&1 - b12q&&1 - b13 d 3 - b14q&1q&2 + b15q&22 (42)
T = kefia = kT iw (47)

T2 = b21q&&1 + b22q&&2 + b23d&&3 + b24q&22 (43)


dwm
T = TL + jm + bw m (48)
T3 = -b31q&&1 + b32q&&2 + b33d&&3 - b34 (44) dt
6. TRANSMISSION EQUATIONS
Where:

(
b11 = r12 m1 + j1 + g r21 jm1 + L12 + r22 + 2L1r2 c2 m2 + L12 mm2 + j2 + j m2 + ) The many types of transmission elements in a robot convey
mechanical power from the actuator to the load. Gear is the
(L 2
1 + L22 + 2L1 L2 c2 )(m 3 + mm 3 ) + j 3 + j m 3 most common transmission element. A common robotic

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*
International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.3 1320

revolute-joint transmission element is harmonic drive [13] - networks‟ [23]. ANFIS design starts with a pre-structured
compact in-line parallel shafts with very high transmission system; DOF for learning is thus limited, i.e., the MF of the
ratio. The torque transmitted to the motor shaft (T) can be input variables and the output variables contain more
calculated from Figure 5 as: information that NN has to drive from sampled data sets.
Knowledge on the systems being designed can be used
wm q straightaway. Part of the system can be excluded from
T = TL / g rh Þ T h = T m h = TL (49) training. ANFIS is thus more effective. The rules are
wL qL linguistic, easing analysis and interpretation of intermediate
results. Rules can be modified during training and
Also, the transmitted inertia is optimization can be manual. ANFIS also supports TS-based
systems. To start ANFIS learning, a training data set
J = j m + J L / g r2 (50) containing the desired input/output data pairs of the target
systems to be modelled it. The design parameters to any
For the third joint, the translational variable (linear velocity) ANFIS controller are viz., number of data pairs, training
can be derived as: data set, checking data sets, fuzzy inference systems for
training, number of epochs to be chosen to start the training,
D & learning results to be verified after mentioning the step size
wm = = d3 (51) [24-28].
2
In this work, the following is the general ANFIS control
7. ADAPTIVE NEURO FUZZY INFERENCE structure for the control of any plant. The structure contains
SCHEME (ANFIS) the same components as does FIS, except for the NN block.
The network structure is a set of units (and connections)
This section reviews the ANFIS concepts used in arranged into five connected network layers, viz., l1 to l5.
controlling a plant‟s system parameters. Neural network
Layer 1: This layer consists of input variables (MFs), viz.,
(NN) concepts began as an attempt at transliterating human
inputs 1 and 2. Triangular or bell-shaped MF can be used
thought. NNs have had successful application in speech
here. This layer just supplies the input values i x to the next
recognition, image analysis, and adaptive control,
layer, where I = 1 to n.
constructing software agents or autonomous robots and
controlling machines. ANNs are a family of intelligent Layer 2: This layer (the membership layer) checks the
algorithms that can be used for time-series prediction, weight of each MF. It receives the input values i x from the
classification, and control and identification. NNs have the 1st layer and acts as MF to represent the fuzzy sets of the
ability to train with induction motor‟s various parameters. input variables. It also computes the membership values
As a non-linear function, they can identify extremely specifying the degree to which the input value i x belongs to
nonlinear system parameters with high accuracy. Use of the fuzzy set, inputting the next layer.
NNs to identify and control nonlinear dynamic systems has
been proposed because they can approximate a wide range Layer 3: Called the rule layer, each node (neuron) in it pre-
of non-linear functions to any desired accuracy. They also condition matches the fuzzy rules, i.e., computing the
have extremely fast parallel computation and high fault activation level of each rule, the number of layers equalling
tolerance characteristics. NNs in power electronics and AC the number of fuzzy rules. Each node calculates the
drives have been investigated, including in speed estimation. normalized weights.
NN technique estimates speed fairly well and is robust to Layer 4: Called the defuzzification layer, it provides the
parameter variation. For better performance, an NN speed output values y resulting from rule inference. Connections
estimator should be trained sufficiently with various between layers l3 and l4 are weighted by the fuzzy
patterns. Fuzzy logic (FL) can control various parameters of singletons that represent another set of parameters for the
real-time systems. Its combination with NNs gives neuro fuzzy network.
significant results. NNs can learn from data but
understanding that knowledge is difficult, especially in Layer 5: Called the output layer, it sums up all the inputs
giving meaning to each neuron and each weight [21-23]. from layer 4 and transforms fuzzy-classified results into
crisps (binary).
Fuzzy-rule models are easier to understand because they use
linguistic terms and the IF-THEN rule structure, but FL The ANFIS structure is tuned automatically by least-square
cannot learn on its own. Its learning and identification adopt estimation and back propagation algorithm. The algorithm
techniques from fields such as statistics and system shown above is used in the next section to develop the
identification. NNs can learn; merging it with FL is only ANFIS controller to control the various parameters of the
natural. Merging NN‟s learning with FL‟s knowledge induction motor. ANFIS‟s flexibility enables its use in many
representation is a hybrid technique called „neuro fuzzy control applications.

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*
International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.3 1321

8. THE MODEL in VIRTUAL REALITY small), may be represented by fuzzy sets. Fuzzy set is an
extension of a „crisp‟ set where an element belongs to either
The requirements for design in VRML are explained in a set (full membership) or to none (no membership). Fuzzy
finite processing allocations, autonomy, consistent self- sets allow partial membership, i.e., membership to more
registration and calculability. Design in VRML depends on than one set.
the designer‟s information and his imagination of the object.
VR design choices are standard configurations (sphere,
cone, cylinder, etc.) and free-form (the indexed face set
button is selected, to get many configurations with points
that can be rearranged). Every real-form design is
considered free-form designing, which starts with building
parts one by one and checking the shape against a related,
real manipulator part. That robot part cannot be simulated in
VR when the standard shape from the VR library is used, Fig. 2: The ANFIS control scheme for speed control of
where they are not uniform shape. The design uses the the IM
indexed face set in VR. The next design step is connecting
all the parts to produce the object and to limit the object‟s A fuzzy set A of a universe of discourse X is represented by
point of origin. This job was made by setting the first shape a collection of ordered pairs of generic element and its
(e.g. the base) and then connecting the next shape (joint membership function : X [ 0 1], which associates a
two) in the “children” button; the same procedure is number A(x) : X [ 0 1] to each element x of X. An FLC
repeated with other parts. Fig. 1 is the design, in full VR, of uses a set of control rules called fuzzy rules,
a SCARA robot with vacuum handling wrist [29-31].
Table 2
The rule base for speed control

E\E NB NM NS ZE PS PM PB

NB NB NB NB NB NM NS ZE

NM NB NB NM NM NS ZE PS

NS NB NM NS NS ZE PS PM

ZE NB NM NS ZE PS PM PB

PS NM NS ZE PS PS PM PB

Fig. 1. A SCARA robot left arm, in VR view through


PM NS ZE PS PM PM PB PB
Matlab

9. ANFIS CONTROLLER DESIGN PB ZE PS PM PB PB PB PB


A controller is a device controlling each and every system
operation through the decisions it makes. A control system
brings stability during disturbances, safeguarding from
equipment damages. It may be hardware-based, software- expressed among the linguistic variables as conditional
based, or both. This section develops an ANFIS control statements. The basic structure of this work‟s ANFIS
scheme (see Fig. 2) for SCARA robot parameters such as controller comprises 4 blocks: fuzzification, knowledge
speed, accuracy, envelop and high performance. Fuzzy base, neural network, and de-fuzzification; each will be
logic is one of the successful applications of fuzzy set in explained briefly in the next paragraphs. The inputs to the
which the variables are linguistic rather than the numeric ANFIS controller, i.e., the error and the change in error, are
variables. Linguistic variables, defined as variables whose modelled through Eqn. (51) as
values are sentences in a natural language (such as large or

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*
International Journal of Advanced Computing, ISSN:2051-0845, Vol.46, Issue.3 1322

e(k ) = w ref - w r ü final output and is the weighted average of the proper rule-
based outputs selected by the back-propagation algorithm.
ý
De(k ) = e(k ) - e(k - 1)þ (51)

Where wref is the reference speed, wr the actual rotor speed,


e(k) the error, and e(k) the change in error. The
fuzzification unit converts the crisp data into linguistic
variables, given as inputs to the rule-based block. The set of
49 rules are based on past knowledge/experiences in the
rule-based block, which connects to the NN block. Back
propagation algorithm trains the NN to select the proper set
of rule base. In developing the control signal, the training is
very important for selection of the proper rule base. - -b-
Selection, and then firing of the proper rules, generates the
control signal needed for optimal outputs. The output of the
NN unit is given as input to the de-fuzzification unit and the
linguistic variables are re-converted into numeric data, as
crisps. In fuzzification, the crisp variables, the speed error,
and the change in error are converted into fuzzy variables or
linguistics variables. The fuzzification maps the 2 input
variables to linguistic labels of the fuzzy sets. The fuzzy
coordinated controller uses the linguistic labels. Each fuzzy -d-
--
label has an associated MF. Triangular MF was used here
(see Fig. 3-a,b). The inputs are fuzzified through the fuzzy
sets and given as input to the ANFIS controller. Table II
lists the rule base for selection of the proper rules through
back propagation algorithm.
æ R i i ö R
çç å m a1 x1 ÷÷ + L + å m i aqi xq
y = è i =1 ø i =1
(52)
R

åm
i =1
i
-e- -
The control decisions are based on the fuzzified variables in Fig. 3. Learning and analysis of the ANFIS controller
Table 2. The inference uses a set of rules in determining the
output decisions. As there are 2 input variables and 7 10.SIMULATION RESULTS & DISCUSSION
fuzzified variables, the controller has a set of 49 rules for Fig. 4 is the Matlab Simulink R2012a VR model for the
the ANFIS controller. From the 49 rules [Fig. 4-c,d], the neuro-fuzzy controller tracking the SCARA trajectory.
proper rules are selected by NN training helped by back- Starting off the simulations is the invoking of the 49-fuzzy-
propagation algorithm, before the selected rules are fired. rule set from the Matlab command window; the fuzzy file
Further, it has to be converted into numerical output, i.e., where the rules are written with T-S control strategy
they have to be de-fuzzified. This process is defuzzification, incorporated is opened, then the fuzzy editor (FIS) dialogue
which produces a quantifiable result in FL. box opens (see Fig. 3). The .fis file (yousif_FZ_Des) is
Defuzzification transforms fuzzy set information into imported through the command window from the source,
numeric data information. Methods of defuzzification and then opened (through file-open command) in the fuzzy
include centre of gravity, centre of singleton, maximum, editor dialog box. Figs. 4 a-f shows opening of the file
marginal properties of centroid, etc. This work used the activating the TS fuzzy-rule file. The data is exported to the
centre-of-gravity method. The output of the defuzzification workspace, and the simulations are run for e.g., 60s.
unit generates the control commands that are given as input
The fuzzy MF editor is next obtained from the menu bar,
(crisp input), through the inverter, to the plant. Any
through view membership command (see Figs. 3 a-b). The
deviation in the controlled output is feedback and compared
rule-view command enables viewing of the TS-fuzzy rules
with the set value and the error signal generated, and given
written. It is the pictorial rule viewer for the 2 inputs and 1
as input to the ANFIS controller, which restores the output
output. Post preliminary operations, the VR model is called
to the normal value, maintaining system stability. Eqn. (52)
up through the interface block between it and Matlab. Fig.
gives the controlled output signal y, which is the controller‟s
4e shows the ANFIS editor opening in the command

© RECENT SCIENCE PUBLICATIONS ARCHIVES| June 2013|$25.00 | 27702482 |


*This article is authorized for use only by Recent Science Journal Authors, Subscribers and Partnering Institutions*

You might also like