A Practical Neuro-Fuzzy Mapping and Control For A 2 DOF Robotic Arm System
A Practical Neuro-Fuzzy Mapping and Control For A 2 DOF Robotic Arm System
A Practical Neuro-Fuzzy Mapping and Control For A 2 DOF Robotic Arm System
3, 109-121 (2013)
109
has been given a substantial attention by number of researches. Arm inverse kinematic, is a nonlinear relation, and a
closed form solution is not a straight forward, or does not even always exist. This research is presenting a practical use
of Neuro-Fuzzy system to solve inverse kinematics problem that used for a two links robotic arm. The concept here is
to learn kinematics relations for a robotic arm system. This is to learn and map its environment and remembers what it
learnt. For learning the inverse kinematics, Neuro-fuzzy needs information about coordinates, joint angles and actuator
position. Information flow needed for the training for a Neuro-fuzzy network is slow and difficult to get by measuring
the real structure. Desired Cartesian coordinates are given as input to a Neuro-fuzzy that returns actuator positions.
Hence to express them as linguistics fuzzy rules. Neuro-fuzzy system is to generalize and produce an appropriate
output. The assembled system has been equipped with C++ interface routines, as being executed from a MATLAB
environment, in addition to high-speed low-level communication with the robotic arm sensing devices.
Keywords: UOB Robotic Arm; Inverse Dynamics; Computed Torque Law;
I.
INTRODUCTION
Neuro-fuzzy mapping.
110
Artificial
Neural Network
Adaptation
Mechanism
PD
Joint-Space
Controller
Nonlinear
Robotic Arm
Artificial
Neural Network
Kp
Kp
Nonlinear
Robotic Arm
Kp
PD
Joint-Space
Controller
Nonlinear
Robotic Arm
111
measuring the robot arm responses for given inputs to
capture the actual dynamics in the presence of all
uncertainties. The employed approach was used for the
design and implementation of an ANFIS controller which
has shown to work with satisfactorily performance.
A NeuroFuzzy Controller synthesis for position
control of robotic arm was also presented by Tavoosi et.
al. [6]. In their approach, they stated that, robot
manipulators have become increasingly important in the
field of flexible automation. So modeling and control of
robots in automation will be very important. But Robots,
as complex systems, must detect and isolate faults with
high probabilities while doing their tasks with humans or
other robots with high precision and they should tolerate
the fault with the controller. In this respect and
background, they introduced a Neuro-Fuzzy Controller
(NFC) for position control of robot arm. Hence, they
proposed a five layer ANN to adjust input and output
parameters of membership function in a fuzzy logic
controller. For training purposes, a hybrid learning
algorithm was also used for training of such 5-layres
ANN network. While using such a learning algorithm,
the least square estimation method is applied for the
tuning of linear output membership function parameters
and the error backpropagation method is used to tune the
nonlinear input membership function parameters. To
validate the proposed NFC algorithm, the obtained
simulation results show that Neuro fuzzy controller is
better and more robust than the PID controller for robot
trajectory control.
In [7], both Pham and Fahmy have introduced a
Neuro-Fuzzy Modelling and Control technique for
Robotics Manipulators Trajectory Tracking system. In
their research efforts, they presented a novel Neurofuzzy controller synthesis for robotic manipulators
control. First, an inductive learning technique is applied
to generate the required modelling rules from
input/output measurements recorded in the off-line
structure learning phase. Second, a fully differentiable
fuzzy neural network is developed to construct the
inverse dynamics part of the controller for the on-line
parameter learning phase. Finally, a fuzzy-PID-like
incremental controller was used and employed as
feedback servo-controller. For validation purposes, the
suggested control system was also tested using dynamic
model of a six-axis industrial robot (6-DOF) arm. The
control system showed good results compared to the
conventional-PID individual joint controller.
Furthermore, Lazarevska [8] have introduced a Neurofuzzy modeling network for the issue of inverse
kinematics problem of a 4 DOF robotic arm. In this
context, the manuscript presented a detailed structure of
Neuro-fuzzy model of the inverse kinematics of 4 DOF
robotic arm employing the relevance vector learning
algorithm. Lazarevska [8] has stated that, although the
112
113
M N , C in
(1)
(3)
M 11
m
m
22
21
m11 m1 m 2 21 m 2 22 2m 2 1 2 cos 1
m12 m 2 22 m 2 1 2 cos 2
(4)
M
m 21 m 2 22 m 2 1 2 cos 2
m 22 m 2 22
m2 1 21 sin 2
n2
c m m2 g 1 cos 1 m2 g 2 cos 1 2
(6)
C 1 1
m2 g 2 cos 1 2
c2
(i)
z
Arm Gripper
m2
M N , C in
x J J
x J and
1
J x J
L2
Joint 2
2
m1
UOB Arm
Kinematics
Model
L1
M J 1 x J N C in
y
Join 1
Inertial Frame
in J F
M J x J N C J T F
J T 1 M J 1 x J N C F
T
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(ii)
114
P x ,y ,z
P x , y ,z
Px
Px
Py 1 , 2 Py
P
P
z
z
P x , y ,z
Py
Px
1
P
x
2
1
Py
2
Pz
1
Pz
2
then
(14)
K d e K p e
K d e M 1 K p e M 1 M N C f
(17)
e K
1
d
Kp
C
Adaptation
Mechanism
Kd
(J-1)T M (J-1)
Two Links
Nonlinear
Robotic Arm
J-1
A leaning ANN
K e K e M x N F
*
*
f
(20)
(15)
e M
K p e K d1 Me K d1 M N C f 0 (18)
(21)
K e K e N
, C
in M
d
d
p
Finally, simulating the computer torque method, will
generate a set of input-output patterns, that can be used
for learning purposes.
The learning mechanisms is based on using the
architecture of Neuro-fuzzy system. This is additional
enlightened within SECTION (III).
III.
115
Inputs
Memberships
Joints
Motion
N Outputs
Fourth Layer
First Layer
Second Layer
Fifth Layer
Third Layer
v.
116
Power Amplifiers
PC interfacing
Cards
PCL-714
PC
High Level
Commands
C++
Codes
Matlab
Codes
Power Supply
117
where therefore gathered and tabulated.
The simulation has taken all arm dynamics
and other effects in consideration. Such
resulting movements are shown in Fig. (10).
Gathered training patterns are also listed in
Table (1). Smoothness can be seen among
the collected data, i.e. indicating how the
arm was moving in periodic sinusoidal
fashion.
[X1,XP1,tr1,tr2,tr3,tr4,tr5,tr6,y1,y2,y3]=rotine3(X1,XP1,Qd,Qdp,Qdpp,
k);
for I =1:NX;
XP(I)=XP(I)+2*XP1(I);
X1(I)=X(I) +Ts*XP1(I);
end;
t=t+0.5*Ts;
[X1,XP1,tr1,tr2,tr3,tr4,tr5,tr6,y1,y2,y3]=rotine3(X1,XP1,Qd,Qdp,Qdpp,
k);
for I =1:NX;
X(I)=X(I)+Ts*(XP(I)+XP1(I))/6;
end;
% To do train
for i=1:791
ndx1(i) = data1((i),1); ndx2(i) = data1((i),2);
ndx3(i) = data1((i),3); nx1(i) = data1((i),4);
ndx12(i) = data2((i),1); ndx22(i) = data2((i),2);
ndx23(i) = data2((i),3); nx2(i) = data2((i),4);
end
trndata =[ndx1' ndx2' ndx3'];
trnout = [nx1 ];
trndata2 =[ndx12' ndx22' ndx23'];
trnout2 = [nx2 ];
Kin_Comp_1=[ndx1' ndx2' ndx3' nx1'];
Kin_Comp_2=[ndx12' ndx22' ndx23' nx2'];
numMFs=4;
mfType='gbellmf';
epoch_n=5;
in_fismat =genfis1(Kin_Comp_1,
mfType);
numMFs,
%
End
V.
ii.
iv.
iii.
postures.
Table 1. Part of generated training patterns.
X
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.2744
-0.2744
-0.2744
-0.1889
-0.1033
-0.0178
0.0678
0.1533
0.2389
0.3244
0.4100
-0.3600
-0.2744
-1.8503
-1.8503
-1.8503
-1.8503
-1.8503
-1.8503
-1.8503
-1.8503
-1.8503
-1.9309
-1.9309
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.3600
-0.2744
-0.2744
-0.2744
-0.1889
-0.1033
-0.0178
0.0678
0.1533
0.2389
0.3244
0.4100
-0.3600
-0.2744
-0.1889
-0.4827
-0.2792
-0.0493
0.1859
0.4022
0.5853
0.7329
0.8496
-0.9184
-0.7844
-0.6018
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.1889
-0.1889
-0.1889
-0.1889
-0.1889
-0.1889
-0.1033
-0.0178
0.0678
0.1533
0.2389
0.3244
0.4100
-0.3600
-0.2744
-0.1889
-0.1033
-0.0178
-1.9309
-1.9309
-1.9309
-1.9309
-1.9309
-1.9309
-1.9309
-1.9309
-2.0714
-2.0714
-2.0714
-2.0714
-2.0714
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.0178
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.2744
-0.1889
-0.1889
-0.1889
-0.1889
-0.1889
-0.1889
-0.1033
-0.0178
0.0678
0.1533
0.2389
0.3244
0.4100
-0.3600
-0.2744
-0.1889
-0.1033
-0.0178
0.0678
-0.3594
-0.0646
0.2416
0.5086
0.7152
0.8677
0.9800
-1.0858
-0.9659
-0.7832
-0.4987
-0.0934
0.3431
in1mf2
in1mf2
-ve large
in1mf3
in1mf3
-ve small
in1mf4
+ve large
+ve small
0.8
Degree of membership
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
-0.1033
0.6
0.4
0.2
-0.3
-0.2
-0.1
0
input1
0.1
0.2
0.3
in2mf2
in2mf2
in2mf3
in2mf3
in2mf4
in2mf4
+ve small
-ve small
+ve large
-ve large
0.8
Degree of membership
118
0.6
0.4
0.2
-0.3
-0.2
-0.1
0
input2
0.1
0.2
0.3
0.4
d 1 Am sin0.5 t , d 1 Am cos 0.5 t (24)
2
(i)
(ii)
(iii)
Fig. 12. 3-D plots of relations between various fuzzy inputs, and
fuzzy outputs. i.e. 1 , 2 .
5
4
3
2
1
0
-1
-2
-3
-4
-5
5
0
5
0
-5
-5
119
Adaptation
Mechanism
4
Training Data
ANFIS Output
3
Forward Kinematics
Real
(X, Y, Z)
Arm posture
d
d
A Learned
Neuro-Fuzzy System
Arm Motor
Sensing devices
-1
-2
Desired
X,Y,Z Arm Posture
Operators Command
-3
-4
100
200
300
400
500
600
700
800
Inverse
Forward
Kinematics
PD
Control Law
Two Links
Nonlinear
Robotic Arm
900
2
Training Data
ANFIS Output
1.5
0.5
-0.5
-1
-1.5
-2
100
200
300
400
500
600
700
800
900
Kp
J-1
Two Links
Nonlinear
Robotic Arm
Xa
Kd
..
Xa
120
CONCLUSION
121