Available online at www.sciencedirect.com

Engineering

Procedía

ELSEVIER

Procedía Engineering 41 (2012) 700 - 709

www.elsevier.com/locate/procedia

International Symposium on Robotics and Intelligent Sensors 2012 (IRIS 2012)

ANFIS-Inverse-Controlled PUMA 560 Workspace Robot with

Spherical Wrist

Yousif I. Al Mashhadany (MIEEE, IIE)

Electrical Engineering Department, Engineering College, University of Anbar, Baghdad, Iraq. yousif_phd@hotmail.com.

Abstract

Cognitive architecture is used here to create a portfolio of movement in a spherical-wristed PUMA 560 robot. Adaptive Neuro-Fuzzy Inference System (ANFIS) was used, and the robot's postures and trajectories were executed in Virtual Reality (VR). The design aims to enable complex movements through use of the dual phases of ANFIS: one, solution by Inverse Kinematic Problem (IKP) with ANFIS identifier, for the end-effector's position and orientation as allowed by the 3-DOF wrist (the identifier offers high computation and accuracy of the IKP solution), two, implementing an inverse-ANFIS controller for all the robot's joint angles. VR implemented the robot's movements through the controller's use of forward dynamics. The IKP of determining a set of joint angles to achieve a given command for the manipulator's postures is addressed. The design's simulation was enabled by connecting the VR environment wit h Simulink/MATLAB Ver. 2012a. Forward and inverse kinematics implemented the manipulator's movements. Results va lidated the robot's range of possible postures and trajectories.

© 2012 The Authors. Published by Elsevier Ltd. Selection and/or peer-review under responsibility of the Centre of Humanoid Robots and Bio-Sensor (HuRoBs), Faculty of Mechanical Engineering, Universiti Teknologi MARA.

Keywords: Adaptive Neuro-Fuzzy Inference System (ANFIS), Virtual Reality (VR), PUMA 560.

Nomenclature

ai ,bi,ci wi

Pi ,qi , ri pth

nai? ^bi, ^ci

A, * * *

u(j,k) yd / k) y (/- k) e (/- k )_

AEIKp Oji

Error signal

the rate of change of the error

the output of the ith node in layer-jth

the input to nodes

the parameter set

the normalized firing

the node's parameter set

target output vector

the NN's learning rates

the DH parameters

the transformation matrix

the sampling time.

the learning step.

the input at k-th trial

the desired output

the plant's actual output

the system's overall error_

* Corresponding author. Tel.: +6-010-421-7541; E-mail address: yousif_phd@hotmail.com

1877-7058 © 2012 Published by Elsevier Ltd. doi:10.1016/j.proeng.2012.07.232

1. Introduction

A robot has a series of rigid links joined by revolute or prismatic joints. A revolute joint rotates about, whereas a prismatic joint slides along, a motion axis. The location of any of the joints is usually relative to a neighbouring joint. Linking of successive joints is described by 4x4 homogeneous transformation matrices containing the manipulator's orientation and position. The manipulator's degree of freedom (DOF) is set by the number of transformation matrices; multiplying the matrices gives the manipulator's final position and orientation. Joint coordinates contain the control actions, whereas Cartesian coordinates specify the manipulator motions. Converting the manipulator's end-effector position and orientation from Cartesian space to joint space is an inverse kinematics problem and fundamental to calculating the desired joint angles in manipulator design and control [1-3].

For a manipulator with n-DOF, at any instant, the joint variables are denoted by (0; = 9i(t), i = 1;2;3;....N) and position variables (xj = x(t), j = 1;2;3;... .M). End-effector position x(t) and joint angle 0(t) relate through forward kinematic equation: x(t) = f (8(t)), with f being nonlinear, continuous, and differentiable. Given a desired end-effector position, however, finding values of the joint variables is an inverse-kinematics problem solvable by 0(t) = f(x(t)). The governing equations are nonlinear, uncertain, and time-varying, so the solution to (6(t)) is not unique. Fig. 1 gives the forward, and the inverse, kinematics. For other solution techniques to inverse kinematics, read Kottege [2], who simulated a Six-axis Virtual Robot arm (SVR) program for a real robot manipulator [4,5].

Some works have discussed the problem of visually recognizing VR-animated hand postures. Exemplifying such animation is a 5-DOF robot arm. Intelligent control systems increase the effectiveness of control strategies and overcome limits of classical and adaptive controllers. They are expected to have in-built adaptation/learning and decision-making capabilities that handle uncertainties towards achieving the desired performance. To overcome traditional computing paradigm limits, researchers look for new computational approaches to partial modeling of neural system functionality and effective solving of real-world problems [6,7].

Novel computational models have emerged, collectively called soft computing. Incorporating intelligence into soft computing are ANN (artificial neural network), FL (fuzzy logic), ANFIS, GA (genetic algorithm), and knowledge-based expert systems. Intelligent self-learning or self-organizing control of expert systems, AI (artificial intelligence), FL, NN (neural networks), hybrid networks, etc. are the new performance-improving tools of industrial power-electronics-based drive systems. Control that combines intelligence and adaptation is the most promising in research into implementation and control of electrical drives [8].

FL, introduced by Zadeh in 1965 [9], processes data via partial, not crisp, set membership. As with NN, it can generate definite conclusions from vague, ambiguous, imprecise, and missing input information. A proper FIS is essential to correcting fuzzy membership functions (MFs) and rules but constructing it takes time and needs profound expertise. Converting domain knowledge into if-then fuzzy rules is another difficulty, even to domain experts [10].

ANFIS combines FL and NN in a hybrid intelligent system that enhances automatic learning and adaptation. Researchers have used it in various engineering systems to predict and model. Basic to neuro-adaptive learning techniques is a fuzzy modeling procedure that learns the data set and automatically computes the MF parameters that best allow the associated FIS to track the given input/output data [10].

The MF parameters are tuned by a combination of least-squares estimation and back-propagation algorithm for MF parameter estimation. MF parameters change through a learning process akin to NN's. They are adjusted by a gradient vector that measures how well a FIS models the input/output data of a given set of parameters. Once the gradient vector is obtained, any of several optimization routines can adjust the parameters to reduce the error between the actual and the desired outputs. The fuzzy system then learns from the data it is modeling. Adjustment of the MF boundaries does not need a human operator; this is an advantage over pure-fuzzy paradigm [11].

Continuous and repetitive tasks of production lines are tiring, and fatigue can cause accident/injury or long-term health problems. A robot manipulator arm can repeatedly carry huge and heavy parts from one production line to another, so is nowadays extensively used in factories to increase efficiency and handle repetitive/hazardous/delicate tasks (e.g., producing semiconductor wafers). Redundancy of a robot manipulator can be advantageous when the DOF of a given task is less than that of the manipulator. When a joint failure occurs, the robot manipulator is still able to perform its task reliably. Singular configuration of the robot manipulator can be avoided by controlling redundancy through robust inverse Jacobian singularity [12,13].

2. Adaptive neuro fuzzy identifier

Find This incorporates FL algorithm into a five-layer ANN structure (see Fig. 1) [14,15]. A tuning block adjusts the fourth-layer parameters to correct any angle-joint deviation. The inputs to a neuro-fuzzy identifier are the error between a robot IKP's analytical solution (EIKP) and the rate of change of that error (AEIKP).

Inputi Eikp yAIKP yANFIS

input 2 = AEIKP =

Eikp (n) - EKP (n ~ 1)

x 100%

The proposed identifier uses Sugeno fuzzy model with five-layer ANN structure. The first layer is the input layer, the second the fuzzification layer, the third and the fourth the fuzzy-rule-evaluation layers, and the fifth the defuzzification layer. Fig. 2 is a 2-input first-order Sugeno fuzzy model with two rules. Every node i in layer-1 is an adaptive node with the function:

OI ,i = Vm (x)

Oi , i = Mm-2 ( y )

for i = 1,2 or 1 for i = 3, 4

Layer 1 Layer 2 Layer 3 Layer 4 Layer 5

Fig. 1: Architecture of 2-input Sugeno-fuzzy ANFIS identifier [4]

Ojj denotes the output of the ith node in layer-1, with x (or y) the input to nodes i and Ai (or Bi-2) and is a linguistic label such as 'small' or 'large' associated with the node. The MF for A can be any appropriate parameterized MF. The proposed scheme uses as MF the generalized bell function as given by Eqn. (3) [16-18]:

HA ( X) =

f 2bi \

1/ (1+ x - c i )

with {ai ,bi ,ci} being the parameter set. As the values of the parameters change, various forms of bell-shaped MFs can be obtained for fuzzy set A. Parameters in this layer are referred to as premise parameters. Every node in layer-2 is a fixed node labeled n, with the output the product of all the incoming signals.

O2,i = W= VM (X)^Bi (y) . i = 1,2

Each node output represents the firing strength of a rule. Every node in layer-3 is a fixed node labeled N. The outputs of this layer are normalized firing strengths as given by Eqn. (5):

°s,i = w i = "

w, + w.

i = 1,2

Every /-node in layer-4 is an adaptive node with a function as that given by Eqn. (6).

O4 = w f = wi ( p x+q y+r )

wt is the normalized firing strength from layer-3 and {p ,qt, r,} the node's parameter set. Parameters in this layer are referred to as consequent parameters. Layer-5 is the single node layer with a fixed node and labeled Z; it sums up all the incoming signals to produce the overall output.

o5 . = y w.f. = Xw f

5,i / v i J i

The hybrid approach converges much faster as it reduces the search-space dimension of the original pure back-propagation. In hybrid learning, for back propagation, the objective function to be minimized is defined by Eqn. (8) [19, 20].

E = y (T - O )2

p / t v m,p m,p '

with Tmp being the mth component of the pth target output vector and Omp the mth component of the actual output vector produced by presenting thepth input vector. Eqn. (9) gives the overall error measure [21]..

The learning rules are:

E = ^P =1Ep

at (n + 1) = at (n) -ri^Eda,) bt (n + 1) = bt (n) -r,bi(dy8bi) ct (n + 1) = ct (n) -Vci (8yec_)

3. Case study

The spherical-wristed PUMA 560 robot exemplifies application of both the analytical solution and the ANFIS technique (see Fig. 2) [22].

Fig. 2: The spherical-wristed PUMA 560 robot

An offset in the manipulator's shoulder joint slightly complicates both the forward and the inverse kinematics [7]. Coordinate frames for the joints are first established through DH convention (Table 1 lists the DH parameters). Computation of matrices Ai is straightforward as below [5].

Table 1. DH parameters for the PUMA 560 robot ( =Joint varaiable)

Link di ai ai e i

1 d1 0 n/2 e*

2 0 a2 0 e*

3 0 a3 0 e*

4 0 0 -n/2 e*

5 0 0 n/2 e*

6 d6 0 0 e*

c1 0 s1 0" c2 0 s2 a2

A = s1 0 0 1 " c1 0 0 d1 A2 = S2 0 0 1 - c 2 0 0 0

0 0 0 1 0 0 0 1

c3 0 " s3 a3 c4 0 - S4 0"

A3 = S3 0 0 1 c 3 0 0 0 ; A4 = S4 0 0 - c 4 0 0 0

0 0 0 1 0 0 0 1

c5 0 S5 0" c6 0 - s6 0 "

a5 = S5 0 0 - 1 c5 0 0 0 ; A6 = s6 0 0 1 c6 0 0 d6

_ 0 0 0 1_ _ 0 0 0 1 _

The forward kinematics as represented by A60 is. A0 = A,.. .A 6

r11 r12 r13 tx'

AO = R3x 3 t1x 3 = r r '21 '22 r31 r32 r23 ty r t '33 lz

0 0 0 1 0 0 0 1

o is the manipulator's end-effector at the point with coordinates, whereas R=(rtj) is the orientation of the end-effector.

Coordinates of the wrist center oc are:

oO = o - d6 R

R is the orientation of the frame o6x6y6z6 relative to the base. If ox,oy,oz denotes the components of the end-effector position (o), xc,yc,zc denotes the components of the wrist center oco , giving Eqn. (16):

_ zc _

ox - d6r13 °y - d6r23 °z " d6r33

The inverse kinematics is achieved by a closed solution of the above equation. General solutions for the rotation angles are:

0i = a tan2( xc, yc) 63 = a tan(D+-v/ 1 - D2)

xc + yc + (zc - di) - a2 - a

x 2 + 2 where : D = Xc y

02 = a tan2(^/xl + yl,zc - a tan(a2 + a3c3 + a3s3)

04 = a tan 2 ( ci c2 3ri3 + si c23r2 3 + s 2 3r3 3 ,

_ cis23ri 3 _ sis23r23 + c23r33)

05 = a tan2(siri3 - <^23+^/i - (siri3 - cir23)2 )

e6 = a tan2(-sirn + cir2i, siri2 - cir22) where :

ct = cos(0j), and st = sin(0f)

4. Modelling the design in VR

Virtual Reality Modeling Language (VRML) design requirements are contained in finite processing allocations, autonomy, consistent self-registration, and calculability [2]; they are necessary considerations to the designer, whose imagination of the object and available information determines his VRML design. VR design can be standard configuration (sphere, cone, cylinder, etc.) or free design (through selection of the indexed set face button to get many configurations whose points can be freely rearranged). Every real-form design is thus free design [23].

Free design starts with building the parts one by one and checking their shape against the real manipulator part, which cannot be simulated in VR when the standard shape in the VR library had been used. Next, all parts of the design must be connected to produce the final object (whose point of origin must, incidentally, be limited). This is done by first setting the shape (i.e., the base) and then connecting the next shape (joint two) in the "children" button. The procedure is repeated wit h the other parts. Fig. 3 is one such design in VR, i.e., the spherical-wristed elbow manipulator.

Fig. 3: The PUMA 560 robot in VR

5. The Inverse ANFIS controller design

The inverse-ANFIS control system has mainly the ANFIS inverse network acting as system controller and placed in series with the plant. Fig. 4 shows the training obtaining the plant's inverse ANFIS model. The input-output data set used reflects the plant's input-output characteristics.

PUMA 560

X(k+1)

anfis..

Identifier

The training data set is

Fig. 4: Training of the inverse ANFIS model

( XN (k ), X(k + 1)N ;UN )

With N being the number of training data. To minimize the error cost function E, the ANFIS network can be trained by least-square estimation:

E = Z (Um - OL )2

Um is the control input signal and Om the corresponding actual output of the ANFIS identifier of the m-th component. The iterative learning tuner is designed to improve the tracking performance of inverse-ANFIS control which repeats the desired task over a finite interval. The system's inputs, outputs, and states are propagated along two sets, one describing the variables in terms of time history, the other reflecting the learning iteration. Fig. 5 is a basic block diagram of the proposed structure.

Input position and orientation U(k)

ANÊIS Controller

S(k) 1x6~

PUMA 560

Desired position and orientation y<Ki+i.k)(lx6)

Y (J+1,k)

(1x61 J

memory

X(k) (1x6)

Fig. 5 : The proposed controller

The learning law adjusts the control input continuously:

0,k+i)-U(j,k)

& e(j,k)-yd(jrk) + y(j , k)

y(j, k) ^ ydj, k) as k -

(20) (21)

At each trial, the inverse-ANFIS controller is updated according to the controlled plant's actual output. This manages the model's error and uncertainties through minimized system error. ILC improves the control system iteratively; higher performance and precision. Assumptions made to ensure the proposed method's stability and convergence include repeatability of the desired output signal (j, k) yd over a finite time interval, system stability through the inverse-ANFIS control before introduction of the iterative learning, and bounded control input signal (j, k) value u.

The simulation used Sugeno fuzzy model for the inverse-ANFIS network so the consequent part of the fuzzy rules is a linear equation. The inputs were Triangular membership function (TRIMF); seven MFs to each input. Initialization of the prime parameters of the ANFIS network was such that the centers of the MFs were equally spaced throughout the entire

range of the input variable, with the initial value of the consequent parameter set assumed zero. P-type learning law with 0.i5 learning step was used. The collected input-output data of the coupled tank trained the ANFIS to do the inverse of the tank system. The training data included the target point's position and orientation, and the level corresponded with that of the delayed signal. Fig. 5 is the trained model as the inverse controller. Fig. 6 gives the inverse-ANFIS controller design with surface error and FL rules.

Fig. 6: The inverse-ANFIS controller for the PUMA 560 robot

Fig. 7 compares the analytical solution by IKP and the solution by ANFIS identifier. Figs. 7 and 8 are the NN identification for inverse kinematics calculation with maximum normalized values for the angles of the joints. This work finds the IKP solution by using the LRNNs as forward direction, post-collection of the neuro-identifier database for use by the NN (of dimensions 6-i9-6 and with LMBP learning algorithm).

Fig. 9 is the implementation of various movements of the PUMA 560 robot as controlled by the inverse-ANFIS controller. The results show use of the inverse-ANFIS to be effective for 6-DOF. The IKP is first calculated, then the forward kinematics, to produce the commands for the VR movement.

The method's accuracy depends on the envelope range and the accuracy of the identification process. Highly accurate data is needed for calculation of the IKP when the data is used in forward NN. Fig. 7 compares the results; the angles do not differ (the same values were used in the identification process). An accurate identifier in the ANFIS controller will reduce the end-effector's straying from target point. The identification values must range widely. Values of the end-effector must be in the manipulator's envelope of movements.

f theta1=0.55; theta2=0.7; theta3=1.3;

06 " J theta4=-0.2; theta5=2.5; theta6=0.9;

±0.5- I

■I I

^ 0.4- !

« I rV._

"S 0.3 0.2 h" .'

20 30 40 50

No. of Itteration of NN(ANFIS)

Fig. 7: The IKP analytical solution vs. the ANFIS-identifier solution

Error signal for identification of the angles joints value

f 0.01 ! 0.005

0.02 F

^ 0.01-s

0 5 10 15 20 25 30

0 5 10 15 20 25 30

0 5 10 15 20 25 30

0 10 20 30 40 50

50.2 f

0.04 F

I 0.02[

0 10 20 30 40 50

0 10 20 30 40 50

Fig. 8: The values of error for the joint angles identified by ANFIS

Fig. 9: Various VR postures of the PUMA 560 robot with the inverse-ANFIS controller

6. Conclusions

ANFIS has been shown as able to identify and solve IKP highly accurately and simply. NN can identify any-size envelope for the manipulator's movement, and with shorter computation than is afforded by closed-form analytical solution. NN calculation is sensitive to sampling band identification. This can be overcome by training the network for every point and by many tries, for optimal results. Any additional movement constraints to the IKP may be easily resolved by the proposed NN approach rather than by analytical solution.

Increased identification accuracy increases controller facility. For control of the joint angles, the inverse-ANFIS controller uses the same amount of value sets, each iteration. VR implementation of the manipulator's movements effectively realized various postures and trajectories of the PUMA 560 robot through commands produced from connecting the VR environment with MATLAB/Simulink. The spherical-wristed PUMA 560 robot can benefit many industrial applications. A future work may fully implement the VR-simulated robot in a physical model.

References

[1] Alavandar S., Nigam M.J., 2008. Inverse Kinematics Solution of 3DOF Planar Robot using ANFIS, Int. J. of Computers, Communications & Control, ISSN 1841-9836, E-ISSN 1841-9844. Vol. III, Suppl. issue: Proceedings of ICCCC 2008, p. 150-155

[2] Kottege D., 2003." Virtual Robot Arm Control Model", Ph.D thesis, University of Colombo, Srilanka.

[3] Izadbakhsh A., 209. "Closed-Form Dynamic Model of PUMA 560 Robot Arm", IEEE Proceedings of the 4th International Conference on Autonomous Robots and Agents, Feb 10-12, p. 675-680

[4] Chen X., Xiong C., Xiong Y., 2009. "Kinematics Modeling and Simulation of a Passive Four Bar Linkage", IEEE International Conference on Mechatronics and Automation, Changchun, China, p. 4139-4144.

[5] Spong M. W., Hutchinson S., Vidyasagar M., 2004. Robot Dynamics and Control, Second Edition.

[6] Carey R., Bell G., Marrin, C., 2008. "ISO/IEC 14772-1:1997 Virtual Reality Modeling Language (VRML97)," At ttp://www.vrml.org.

[7] Leottau L., Melgarejo M., 2011. "An Embedded Type-2 Fuzzy Controller for a Mobile Robot Application", chapter 18, Recent Advances in Mobile Robotics, p.365-384

[8] Mahmoud M. S., Saif A. A., 2012. Robust Quantized Approach to Fuzzy Networked Control Systems, Intelligent Control and Automation journal, Vol.3, No.1, p. 59-70.

[9] Ibrahim A.M., 2004. "Fuzzy Logic for embedded system application ", ISBN 0-7506-7699-X, copyright by Elsevier science.

[10] Piltan F., Sulaiman N., Ferdosali P. , Rashidi M. & Tajpeikar Z., 2011. Adaptive MIMO Fuzzy Compensate Fuzzy Sliding Mode Algorithm: Applied to Second Order Nonlinear System, International Journal of Engineering (IJE), Volume (5) : Issue (5), p: 380-398

[11] Mazhari S. A., Kumar S., 2008. Heuristic Search Algorithms for Tuning PUMA 560 Fuzzy PID Controller, International Journal of Electrical and Computer Engineering, Vol, 3:4, p: 286-277

[12] Benitez A., Huitzil I., Ramos C., Medina A, 2011. " A 3D simulation environment for kinematic task of the PUMA 560 robot", 21st IEEE International Conference on Electrical, Communications, and Computers, Cholula, Puebla, Mexico. pages 260-265.

[13] Corke P. I., 2012. "Robotics Toolbox for ATLAB", http://petercorke.com/Robotics_Toolbox.html, the last visit at 13/03/2012.

[14] Ibrahim A. M., 2004. Fuzzy Logic for embedded system application, ISBN 0-7506-7699-X, copyright by Elsevier Science.

[15] Subramaniam M., Manju A., Nigamc J, 2011. A Study of parameter tuning of weighted fuzzy rulebas using genetic algorthim for trajectory control of PUMA 560, International Journal of Engineering Science and Technology (IJEST), ISSN : 0975-5462 Vol. 3 No. 9, p, 7016-7028

[16] Al-Mashhadany Y. I., 2012. "A Posture of 6-DOF Manipulator By Locally Recurrent Neural Networks (LRNNs) Implement in Virtual Reality", IEEE Symposium on Industrial Electronics and Applications (ISIEA), Penang, Malaysia, p. 573-578.

[17] Aghajarian M., Kiani K. 2011. "Inverse Kinematics Solution of PUMA 560 Robot Arm Using ANFIS, IEEE The 8th International Conference on Ubiquitous Robots and Ambient Intelligence, p 574-578

[18] Omar F. L.,Samsul M. N., Mohammad H. M, 2011. "A Genetically Trained Simplified ANFIS Controller to Control Nonlinear MIMO Systems", International Conference on Electrical, Control and Computer Engineering Pahang, Malaysia, p. 349-354

[19] Yajun Z., Tianyou C., Hong W., 2011. A Nonlinear Control Method Based on ANFIS and Multiple Models for a Class of SISO Nonlinear Systems and Its Application, IEEE TRANSACTIONS ON NEURAL NETWORKS, VOL. 22, NO. 11,p. 1783-1795

[20] Widodo B., Achmad J., Djoko P,2010." Indoor Navigation using Adaptive Neuro Fuzzy Controller for Servant Robot", IEEE Second International Conference on Computer Engineering and Applications, p. 582-586

[21] Shahri M. R. A., Khoshravan H ., Naebi A .,2011. " Design ping-pong player robot controller with ANFIS", IEEE Third International Conference on Computational Intelligence, Modelling & Simulation, p. 165-189

[22] Ouamri B., Ahmed Z., 2012. Adaptive Neuro-fuzzy Inference System Based Control of Puma 600 Robot Manipulator, International Journal of Electrical and Computer Engineering (IJECE) Vol.2, No.1, ISSN: 2088-8708, p. 90-97

[23] Patton J. L., Dawe G ., Scharver C., Kenyon R ., 2012 "Robotics and Virtual Reality: The Development of a Life-Sized 3-D System for the Rehabilitation of Motor Function" Supported by NIDRR RERC. 0330411Z, NIH 1 R24 HD39627-0, NIH 1 R01- NS35673-01