Neuro-Fuzzy Based Approach For Inverse Kinematics Solution of Industrial Robot Manipulators
Neuro-Fuzzy Based Approach For Inverse Kinematics Solution of Industrial Robot Manipulators
Neuro-Fuzzy Based Approach For Inverse Kinematics Solution of Industrial Robot Manipulators
Introduction
A robot manipulator is composed of a serial chain of rigid links connected to each other by revolute
or prismatic joints. A revolute joint rotates about a motion axis and a prismatic joint slide along a motion
axis. Each robot joint location is usually defined relative to neighboring joint. The relation between
successive joints is described by 4 4 homogeneous transformation matrices that have orientation and
position data of robots. The number of those transformation matrices determines the degrees of freedom
of robots. The product of these transformation matrices produces final orientation and position data of a
n degrees of freedom robot manipulator. Robot control actions are executed in the joint coordinates while
robot motions are specified in the Cartesian coordinates. Conversion of the position and orientation of a
robot manipulator end-effector from Cartesian space to joint space, called as inverse kinematics problem,
which is of fundamental importance in calculating desired joint angles for robot manipulator design and
control.
For a manipulator with n degree of freedom, at any instant of time joint variables is denoted by
i = (t), i = 1, 2, 3, ..., n and position variables x j = x(t), j = 1, 2, 3, ..., m. The relations between the
end-effector position x(t) and joint angle (t) can be represented by forward kinematic equation,
x(t) = f ( (t))
(1)
where f is a nonlinear, continuous and differentiable function. On the other hand, with the given desired
end effector position, the problem of finding the values of the joint variables is inverse kinematics, which
can be solved by,
(t) = f 0 (x(t))
(2)
Solution of (2) is not unique due to nonlinear, uncertain and time varying nature of the governing
equations. Figure 1 shows the schematic representation of forward and inverse kinematics. The different techniques used for solving inverse kinematics can be classified as algebraic [1], geometric [2]
and iterative [3]. The algebraic methods do not guarantee closed form solutions. In case of geometric
methods, closed form solutions for the first three joints of the manipulator must exist geometrically. The
iterative methods converge to only a single solution depending on the starting point and will not work
near singularities.
If the joints of the manipulator are more complex, the inverse kinematics solution by using these
traditional methods is a time consuming. In other words, for a more generalized m degrees of freedom
Copyright 2006-2008 by CCC Publications
225
manipulator, traditional methods will become prohibitive due to the high complexity of mathematical
structure of the formulation. To compound the problem further, robots have to work in the real world that
cannot be modeled concisely using mathematical expressions. In recent years, there have been increasing
Forward kinematics
Joint space
variables
Task space
variables
Inverse kinematics
ANFIS Architecture
This section introduces the basics of ANFIS network architecture and its hybrid learning rule. Inspired by the idea of basing the fuzzy logic inference procedure on a feedforward network structure,
Jang [16] proposed a fuzzy neural network model - the Adaptive Neural Fuzzy Inference System or semantically equivalently, Adaptive Network-based Fuzzy Inference System (ANFIS), whose architecture
is shown in Figure 2. He reported that the ANFIS architecture can be employed to model nonlinear
functions, identify nonlinear components on-line in a control system, and predict a chaotic time series. It
226
is a hybrid neuro-fuzzy technique that brings learning capabilities of neural networks to fuzzy inference
systems. The learning algorithm tunes the membership functions of a Sugeno-type Fuzzy Inference System using the training input-output data. A detailed coverage of ANFIS can be found in [7],[16]-[17].
The ANFIS is, from the topology point of view, an implementation of a representative fuzzy inference
tion, and nonlinear system identification, can be found in [Jan97, pp. 335-363, pp. 503-523].
Layer1
Layer2
Layer3
Layer4
1
2
3
M1
x1
Mq
1
2
Layer5
3
q
1
2
3
M1
xp
1
Mq
2
3
q
x
x1 , x2 ,
, xp
(3)
The role of the node functions M1 , M2 , ...Mq here is equal to that of the membership functions (x) used
in the regular fuzzy systems, and q is the number of nodes for each input. Gaussian shape functions
are the typical choices. The adjustable parameters that determine the positions and shapes of these node
functions are referred to as the premise parameters. The output of every node in layer 2 is the product of
all the incoming signals:
O2i = Ml (xl )ANDM j (x j )
(4)
Each node output represents the firing strength of the reasoning rule. In layer 3, each of these firing
strengths of the rules is compared with the sum of all the firing strengths. Therefore, the normalized
firing strengths are computed in this layer as:
O3i =
O2i
i O2i
(5)
Layer 4 implements the Sugeno-type inference system, i.e., a linear combination of the input variables
of ANFIS, x1 , x2 , ...x p plus a constant term, c1 , c2 , ...c p , form the output of each IF T HEN rule. The
227
(6)
j=1
where parameters P1 , P2 , ..., Pp and c1 , c2 , ..., c p , in this layer are referred to as the consequent parameters.The node in layer 5 produces the sum of its inputs, i.e., defuzzircation process of fuzzy system (using
weighted average method) is obtained:
O5i = O4i
(7)
i
The flowchart of ANFIS procedure is shown in Figure 3. ANFIS distinguishes itself from normal
fuzzy logic systems by the adaptive parameters, i.e., both the premise and consequent parameters are
adjustable. The most remarkable feature of the ANFIS is its hybrid learning algorithm. The adaptation
Validate
With independent data
228
algorithm that combines least square method with gradient descent method is used to adjust the parameter
of membership function.
Figure 4 and 5 shows the two degree of freedom (DOF) and three DOF planar manipulator arm which
is simulated in this work.
3.1
For a 2 DOF planar manipulator having l1 and l2 as their link lengths and 1 ,2 as joint angles with
x, y as task coordinates the forward kinematic equations are,
x = l1 cos(1 ) + l2 cos(1 + 2 )
(8)
y = l1 sin(1 ) + l2 sin(1 + 2 )
(9)
1 = atan2(y, x) atan2(k2 , k1 )
(10)
2 = atan2(sin2 , cos2 )
(11)
and sin2 =
p
(1 cos2 2 ).
Considering length of first arm l1 = 10 and length of second arm l2 = 7 along with joint angle
constraints 0 < 1 < 2 , 0 < 2 < , the x and y coordinates of the arm are calculated for two joints using
forward kinematics. Figure 6 shows the workspace for two link planar arm. The codes are written in
MATLAB 7 Release 14.
The coordinates and the angles are used as training data to train ANFIS network with Gaussian
membership function with hybrid learning algorithm. Figure 7 and Figure 8 shows the training data of
two ANFIS networks for two joint angles. Figure 9 shows the difference in theta deduced analytically
and the data predicted with ANFIS.
229
16
14
Y Coordinates
12
10
8
6
4
2
0
5
5
X Coordinates
10
15
400
0
100
300
output
200
300
200
400
100
500
600
700
800
100
900
15
15
10
10
input2
15
15
10
10
5
0
5
input1
0
input2
5
input1
230
x 10
THETA1Diff
2
0
2
4
6
50
100
150
200
250
300
350
400
450
300
350
400
450
x 10
THETA2iff
4
2
0
2
4
50
100
150
200
250
Figure 9: Difference in theta deduced and the data predicted with ANFIS trained for 2DOF manipulator
3.2
(12)
(13)
= 1 + 2 + 3
(14)
2 = atan2(sin2 , cos2 )
(15)
1 = atan2((k1 yn k2 xn ), (k1 xn k2 yn )
(16)
3 = (1 + 2 )
(17)
sin2 =
(1 cos2 2 ), xn = x l3 cos
For simulation, the length for three links are l1 = 10, l2 = 7 and l3 = 5 with joint angle constraints
0 < 1 < 3 , 0 < 2 < 2 , 0 < 3 < coordinates of the arm are calculated for two joints using forward
kinematics. Figure 10 shows the workspace for three link planar arm. The coordinates and the angles are
used as training data to train ANFIS network with Gaussian membership function with hybrid learning
algorithm. Figure 11, Figure 12 and Figure 13 shows the training data of three ANFIS networks for three
joint angles. Figure 14 shows the difference in theta deduced analytically and the data predicted with
ANFIS.
231
XY Coordinates generated for all joint angle combinations using Forward Kinematics
25
Y Coordinates
20
15
10
0
10
10
15
20
25
X coordinates
40
10
20
output
output
0
0
10
20
20
40
20
20
15
10
5
input2
10
15
20
15
10
5
input2
input1
40
output
10
15
20
input1
60
20
0
20
20
15
10
5
input2
10
15
20
input1
232
50
100
150
200
250
300
350
400
450
300
350
400
450
300
350
400
450
THETA2D THETA2P
50
100
150
200
250
50
100
150
200
250
Figure 14: Difference in theta deduced and the data predicted with ANFIS trained for 3 DOF manipulator
The difference in theta deduced and the data predicted with ANFIS trained for two and three degree of
freedom planar manipulator clearly depicts that the proposed method results in an acceptable error. Also
the ANFIS converges with a smaller number of iteration steps with the hybrid learning algorithm. Hence
trained ANFIS can be utilized to provide fast and acceptable solutions of the inverse kinematics thereby
making ANFIS as an alternate approach to map the inverse kinematic solutions. Other techniques like
input selection, tuning methods and alternate ways to model the problem may be explored for reducing
the error further.
Acknowlegements
The authors wish to thank the program committee of ICCCC 2008 for the recommendation of an
extended version for publication in the Journal.
Bibliography
[1] J. J. Craig, Introduction to Robotics: Mechanisms and Controls, Addison-Wesley, Reading, MA,
1989.
[2] G. C. S. Lee, Robot Arm Kinematics, Dynamics and Control, Computer, Vol. 15, Issue. 12, pp.
62-79, 1982.
[3] J. U. Korein, N. I. Balder, Techniques for generating the goal-directed motion of articulated structures, IEEE Computer Graphics and Applications, Vol. 2, Issue. 9, pp. 71-81, 1982.
233
[4] Wang, L. X., Adaptive Fuzzy Systems and Control, Design and Stability Analysis, PTR Prentice Hall,
1994.
[5] Wang, L. X., A Course in Fuzzy Systems and Control, PTR Prentice Hall, 1997.
[6] Takagi T., and M. Sugeno, Fuzzy Identification of Systems and Its Applications to Modeling and
Control, IEEE Transactions on Systems, Man, and Cybernetics, Vol. 5, No. 1, pp. 116-132, 1985.
[7] Jang, J. S. R., C. T. Sun, E. Mizutani, Neuro-Fuzzy and Soft Computing, PTR Prentice Hall, 1997.
[8] Nedungadi A, Application of fuzzy logic to solve the robot inverse kinematics problem, Proceeding
of 4th World Conference on Robotics Research, Vol. 13, pp. 1-14, 1991.
[9] David W. Howard and Ali Zilouchian, Application of Fuzzy Logic for the Solution of Inverse Kinematics and Hierarchical Controls of Robotic Manipulators, Journal of Intelligent and Robotic Systems, Vol. 23, pp. 217-247, 1998.
[10] Sreenivas Tejomurtula, Subhash Kak, Inverse kinematics in robotics using neural networks, Information Sciences, Vol. 116, pp. 147-164, 1999.
[11] Yang Ming Lu, Lu Guizhang, Li Jiangeng, An Inverse Kinematics Solution for Manipulators, Proceedings of IEEE, Vol. 4, pp. 400-404, 2001.
[12] Tiberiu Vesselenyi, Simona Dzitac, Ioan Dzitac, Misu-Jan Manolescu, Fuzzy and Neural Controllers for a Pneumatic Actuator, International Journal of Computers, Communications and Control,
Vol. 2, No. 4, pp. 375-387, 2007.
[13] Srinivasan Alavandar, M. J. Nigam, Inverse Kinematics Solution of 3 DOF Planar Robot Using
ANFIS, International Journal of Computers, Communications and Control, Supplementary Issue:
Proceedings of ICCCC 2008, Vol. 3, pp. 150-155, 2008.
[14] Li-Xin Wei, Hong-Rui Wang, Ying Li, A new solution for inverse kinematics of manipulator based
on neural network, Proceedings of the Second International Conference on Machine Learning and
Cybernetics, Xian, Vol. 3, No. 5, pp. 1201-1203, 2003.
[15] Rasit Koker, Cemil Oz, Tark Cakar, Huseyin Ekiz, A study of neural network based inverse kinematics solution for a three-joint robot, Robotics and Autonomous Systems, Vol. 49, pp. 227-234,
2004.
[16] J. S. R. Jang, ANFIS: Adaptive-Network-based Fuzzy Inference Systems, IEEE Transactions on
Systems, Man, and Cybernetics, Vol. 23, No. 03, pp. 665-685, 1993.
[17] H. Sadjadian, H. D. Taghirad, and A. Fatehi, Neural Networks Approaches for Computing the
Forward Kinematics of a Redundant Parallel Manipulator, International Journal of Computational
Intelligence, Vol. 2, No. 1, pp. 40-47, 2005.
Srinivasan Alavandar, M. J. Nigam
Indian Institute of Technology Roorkee
Department of Electronics and Computer Engineering
Roorkee - 2477667, Uttarkhand, INDIA
E-mail: seenu.phd@gmail.com, mkndnfec@iitr.ernet.in
Received: June 09, 2008
234