0% found this document useful (0 votes)
12 views11 pages

Season

Filled

Uploaded by

absadalimuhd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

Season

Filled

Uploaded by

absadalimuhd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

94

RESEARCH JOURNAL OF FISHERIES AND


HYDROBIOLOGY
http://www.aensiweb.com/JASA
© 2015 AENSI Publisher All rights reserved
ISSN:1816-9112
Open Access Journal

A Fuzzy Logic Controller tuned with


Imperialist competitive algorithm for
2 DOF robot trajectory control with
help Scaling factor
1Morteza Bagheri and 2Hasan Fatehi Marj

1
Department of electrical and ABSTRACT
Control, Kerman Science and
Using from optimization technologies in a 2 DOF planar robot controlling is a new idea. Until
Research Branch, Islamic Azad
now, different techniques are used for controlling and optimization methods, is designating
University, sirjan, iran
2 decision variable values for minimizing or maximizing of bests function and this is
Assistant professor of control
insupportably when the number of memberships functions increased or system of dynamic be
engineering Department of
slow. In this Paper by Imperialist Competitive Algorithm and Imperialist and Fuzzy logic,
electrical engineering Faculty of
functions of optimization output membership for controlling a 2 DOF planar robot are
engineering Vali-e-Asr University
designated . In this way, we used of Imperialist Competitive algorithm for attaining to best
of Rafsanjan.
parameters in Fuzzy logic Sugeno method . bests function in this aspect is like a set of different
bests for controlling robot. The main best in this article is using from Imperialist Competitive
Address For Correspondence:
algorithm as a method for automating planning and reaching to the functions regulation . Even
Hasan Fatehi Marj, Assistant
though scientific observations in this algorithm and its regulation by scaling factor with Fuzzy
professor of control engineering
control is used for a robot trajectory control.
Department of electrical
engineering Faculty of engineering
Vali-e-Asr University of Keyword: Fuzzy logic control, degrees of freedom, Robot trajectory control, ICA
Rafsanjan.
E-mail: [email protected]

Received: 22 November 2014


Accepted: 28 March 2015
Published: 12 April 2015

INTRODUCTION

The system of robot arm is always used in industry. And it has many usages , for example: using robots in
automatic production lines, leading and discharging load in transportation industry like airplane and ships,
automatic painting, displacing of radioactive materials , exploring the depth of sea, space trips and military
using from this aspect the system of robot arm is completely complex and nonlinear. This system doesnt have
any fixed structure because of many reasons like: changing load or friction between junctions. And is always
unsure. This uncertainly is always seen in its model.
This uncertainty in the system of robot arm cause unstable operation and makes its controlling hard.
Because of this matter different controllers are planned. Among controlling methods, Fuzzy control is efficient
and practicable. Logic Fuzzy that is based on Fuzzy sets, invented by Lotfizadeh professor for investigating
uncertainty and carelessly in knowledge (Zadeh, L.A., 1975). A Fuzzy system use of Fuzzy sets for describing
chart (mapping) relationship between output and input Fuzzy of sets permit that output interpolate from between
many rules. Evolutionary algorithms are function optimizations / Population algorithm. And can used in a wide
range that has function. But decision variables that optimize function, are unknown. And contain engineering
optimizations, timing planning, Evolutionary hardware and even though art.
The title of this paper (article) is brought in the 2 Section based on dynamic model. In the 3 Section main
concepts and definitions of Fuzzy logic investigated in the control field. In the 4 Section, we talk a bout
Imperialist Competitive algorithm. And experimental results in Section 5 and conclusion in Section 6.

2- Dynamic model of the planar robot:

RESEARCH JOURNAL OF FISHERIES AND HYDROBIOLOGY, 10(9) May 2015, Pages: 94-104
Morteza Bagheri and Hasan Fatehi Marj, 2015
95

The dynamic equations of a robot arm with n degree(s) of freedom can be stated using the Lagrangian
method or Newton- Oiler method in the form of the degree two nonlinear equation (Zafer Bingül, Og˘uzhan
Karahan, 2011):
  M (q )q  C (q , q ) q  G (q ) W (q , q, q)
In the above equation, W (q , q , q) is a known function of robot dynamics and  is a vector including
unknown parameters of robot dynamics. q  [q1 ,..., q n ] is the position vector of the robot joints and
T

q  [q 1 ,..., q n ]T and q


  [q
1 ,..., 
q n ]T are velocity and acceleration vectors, respectively. M (q) is the
matrix of inertial n*n and C (q , q ) is the matrix of n*n of the coriolis and centrifugal forces and G (q) is the
vector of gravity. The M (q) matrix is an asymmetric and definite positive matrix.
The two joint robot have been indicated in the Figure 1. As seen in the Figure, q 1 is the position of the first
joint with respect to the horizontal plane and q2 is the position of the second joint with respect to the first joint.

Fig. 1: Model of a two axis robot.

The dynamic equation of the two joint robot which has been brought in many references and articles is
expressed as follows:
 1  m 2 l 22 (q1  q2 )  m 2 l1l 2c 2 (2q1  q2 )  (m1  m 2 ) l12 q1
(1)
 m 2 l1l 2 s 2q22  2 m 2 l1l 2 s 2q1q2  m2 l 2 gc12  (m1  m2 )l1 gc1
 2  m2 l1l 2c 2q1  m2 l1l 2s 2q12  m2 l1 gc12  m 2l 22 (q1  q2 )
The above equations are in the general form according the equation (1) which the M (q), C(q, q .) and G (q)
matrixes for it are as follows:
(m  m 2 )l12  m 2l 22  2m 2l1l 2c 2 m 2l 22  m 2l1l 2c 2 
M (q )   1 
 m 2l 22  m 2l1l 2c 2 m 2l 22 
 m l l q s m 2l1l1q2s 2 
C (q , q )   2 1 1 2 2 
 m 2l1l1q2s 2 0 
(m  m 2 ) gl1c1  m 2 gl 2c12 
G (q )   1 
 m 2 gl 2c12 
In the above equations c1  cos(q1 ), c 2  cos(q 2 ), s1  sin(q1 ), s 2  sin(q 2 ), c12  cos(q1  q 2 ) and
m1 and m2 are the mass of the arm and l1 and l2 are the length of the arm and g is the gravity of the earth. Also, if
m3is considered as the revulsive load on the second arm and focused on the end point of the second arm, then
the system model will be introduced as the equation (1) with the following matrixes (Ahmadi, Mohammad Ali,
2011):
M M 12 
M (q )   11 
 M 21 M 22 
C C 12 
C (q , q )   11 
C 21 0 
96

G 
G (q )   1 
G 2 
That in it,
M 11  (m1  m 2  m 3 )l12  (m 2  m 3 )l 22  2(m 2  m 3 )l1l 2c 2
M 12  (m 2  m 3 )l 22  (m 2  m 3 )l1l 2c 2
M 12  M 21
M 22  (m 2  m 3 )l 22
C 11  2(m 2  m 3 )l1l 2q2s 2
C 12  (m 2  m 3 )l1l 2q2s 2
C 21  (m 2  m 3 )l1l 2q1s 2
G1  (m1  m 2  m 3 ) gl1c1  (m 2  m 3 ) gl 2c12
G 2  (m 2  m 3 ) gl 2c12

3. Fuzzy control:
Lotfizadeh introduce Fuzzy sets for overcoming to the certainty in knowledge in 1965. That possible using
of logic forms, by the way that “true” and “false” shows a degree of fact. He extend Fuzzy sets for modeling
uncertainty that seen in the planning 1 type Fuzzy sets to the known Fuzzy sets (2 type) 10year (Zadeh, L.A.,
1965; Mendel, J.M. and R.I.B. John, 2002).
Hater. In last decade, logic Fuzzy used in different aspects line regression, systems modeling, control, for
classifying patterns. Among them control field is one of the best (more related).

Fig. 2: The structure of a Fuzzy Logic Controller.

FLC contains 3 main components: Fuzzifier, induction motor and Defuzzification. Blocking graph (FLC) is
shown in the 2 Figure. (Lughofer, E., 2011) blocks define for output and input variables in the Fuzzy part.
In most cases, output error means the difference between output of process and reference signal. And its
changes contain systems` inputs. The center of knowledge is its heart. And has many rules that controller is able
to reach to ideal bests by using them. Most of the time these rules are if. And act as a chart from input Fuzzy
variables to the output Fuzzy variables. Induction motor is as a brain of a Fuzzy controller that able to copy
human decision making based on Fuzzy concepts. This part is made by using data base rules, Fuzzy output and
Fuzzy input. In Defuzzification, we obtain the real amount at output. There are different methods for
Defuzzification, and the center of graceity method is the most usable one. By using Fuzzy logic from one Fuzzy
system that has 2 inputs and output use for controlling every arm. Systems inputs means the real difference
between the angle and amount and real amount and derivation error, too. Output is based on input momentum to
the joint. For facilitating Fuzzy system, we used Sugeno Fuzzy system (zero level) this kind of system is so
similar to the moment Fuzzy system and just instead of considering membership functions in output, we use
individual values.
Membership functions that consider for input variables to the both Fuzzy controller are from Gaussian from
in the range [-1.1] have been that normalized.
97

Fig. 3: Membership function for error(Joint-1).

Fig. 4: Membership function for error derivation(Joint-1).

Fig. 5: fuzzy control surfaces(Joint-1).


98

Fig. 6: Membership function for error (Joint-2).

Fig. 7: Membership function for derivation(Joint-2).

Fig. 8: Fuzzy control surfaces(Joint-2).

Membership functions on the output as well as Singular values Uniformly In the interval [-1.1] Figure 6 is
intended
99

Fig. 9: Membership functions for output variables(Joint-1 and Joint-2).

At first, Fuzzy system inputs make Fuzzy by the membership functions that considered for them and then
based on rule sets that considered for Fuzzy system, approximative reasoning done on the inputs and produce
considered output Fuzzy system.
Because controllers contain 2 inputs and 5 membership functions then a rule base considered for them that
has 25 rules.
Rule base that we consider is a standard rule base and in many papers consider as a controller and is shown
in table 1 (Hoffmann, F. and G. Pfister, 2013).

Table 1: Fuzzy rule base.


e
NB NO SS PO PB
NB NB NB NO NO SS
e NO NB NO NO SS PO
SS NO NO SS PO PO
PO NO SS PO PO PB
PB SS PO PO PB PB

A general schematic of controlling system in matlab software simulink is seen below.

Fig. 10: Simulink model of the FLC for robot control.

using from scale factor is an important point in this schematic, that cause e,e . variables put in [-1,1] interval and
is considered for inputs to the Fuzzy system. Another important point is using from MATLAB Fcn that benefits
from mfile (dyn.m) and robot equation is used in it.
100

Table 2: Robot parameters in simulation.


Parameter Values
0.8m
0.4m
0.1kg
0.1kg

9.8

We regulate (set) simulation time on 5 seconds and step time on 0001. You see the simulation result below.

Fig. 11: Tracing the first arm reference.

As you see in the above Figures, controller cant control arm system and follows specified reference. This
problem is arised because Fuzzy controller parameters as membership functions and scale factors dont regulate
good. And regulating and optimizing these parameters is time consuming, insupportably and sometimes
impossible and for solving this problem, we can use Evolutionary algorithms as Imperialist Competitive
(Bonarini, A., 2012).

4- Imperialist Competitive algorithm(ICA):


Figure 13 shows Imperialist Competitive algorithm (Atashpaz-Gargari, C., 2007). As other Evolutionary
algorithms, this algorithm begin by many random population, that every of them called a country a number the
best population elements choose as imperialist. Other population considered as colony. colonial people based on
their power, take, these colonies toward themselves with special process. General power of every emperor
depend on both part: imperialist country (a main center) and it`s colonies. In math, this dependency is modeled
by defining emperor`s power and plus colonies power. Atashpaz and his colleagues imperialist Competitive
begin as the first emperor formed. Every emperor can`t act successfully and increase his power, will delete from
this score (Jalalizadeh, 2011).
So permanence of an empire depends an it`s power to absorb emperors colonies from another group. As a
result in imperialist Competitive process, the power of bigger empire increased and waked empire will deleted.
Emperors should improve their colonies to increase their power (Lian, K. Chaoyong Zhang, 2011).
As time passed, colonies close to emperors and a kind of convergence formed between them. It`s final
boundary is when that there be a unit emperor in world. And it`s colonies that are close to his country.
101

5. Experimental results:
Optimization results for Fuzzy controller of robot arm in this Section, we pay attention to the controller
optimization by Imperialist Competitive algorithms by using scale factors and give results.
In this paper, we use from Imperialist Competitive algorithm for optimizing centers and extending
membership functions on inputs and Fuzzy rules and scale factors. For optimizing controller we can use from
different criterions.
In this paper we use of error square average criterion as best function. As told each Fuzzy system has 5
membership functions on each input aspect (finally 20 free parameters for optimization) and 5 on the output (5
parameters) then 25 free parameters are assigned for each Fuzzy system. More than this we use 3 scale factors
and 2 free Fuzzy systems because robot arm is from its 2 DOF, (kind) we use of 2 free Fuzzy system. There are
56 optimization parameters. And as a result, countries contain 56 aspects (Imperialist Competitive algorithm)
To compare algorithm, we assign the number and repeated process = 60 and the number of population = 15

Fig. 12: Tracing the Second arm reference.

As you see in the Figure, Imperialist Competitive algorithm contain better final value. And another
important point is that Imperialist Competitive algorithm get slowly at first and after 15 repeatation, has better
process. Now, in bellow Figure bring, obtained results from reference tracing of both robot joint by 2 controller:
controller FLC and FIC- ICA.
Controller has acceptable answers from reference tracing point of view.
At last for comparing exact operation of controls, we used from ITAE(Integral Time Absolute Error) and
IAE(Integral Absolute Error) criterions what are for tracing error and report them in the below tables. Reported
values in the table shows that optimized controller by Imperialist competition algorithm (ITAE, IAE) are better
than other controllers.

Table 3: Comparing controlled criterion for the first joint.


Joint 1 FLC ICA-FLC
ITAE 0.853 0.215
IAE 0.392 0.112

Table 4: Comparing controlled criterion for the second joint.


Joint 2 FLC ICA-FLC
ITAE 1.806 0.045
IAE 2.806 0.066
102

Fig. 13: The flowchart of the proposed algorithm.

Fig. 14: Graph of the target function algorithms.


103

Fig. 15: Comparing controller reference tracing (first joint).

Fig. 16: Comparing controller reference (two joint).

6) Conclusion:
In this research we study about fuzzy systems and in other Section discuss about systems and talk about its
advantage and its disadvantage. Fuzzy systems lack of one matter that is need to an expert for planning fuzzy
systems for special operation. As told, regulation fuzzy controllers as membership functions for controlling.
Special system is time consuming. For solving this problem, there are many different ways. One of this ways
(methods) is using of complementary algorithms for regulating and optimizing fuzzy controllers and in the 4 th
part we discuss about Evolutionary algorithms and Imperialist Competitive algorithm.. Finally, equations of
robot arm with 2 DOF show in MATLAB software condition and we study about regulating and optimizing
fuzzy system for robot arm system by using Imperialist Competitive algorithm. The results were acceptable and
optimized fuzzy controller do tracing of reference joints well. And show that optimized control by Imperialist
Competitive algorithm has better result.
104

REFERENCES

Ahmadi, Mohammad Ali, 2011. “Prediction of Asphaltene Precipitation using Artificial Neural network
Optimized by Imperialist Competitive Algorithm” journal of petroleum Exploration and Production
technologies, 1(1).
Atashpaz-Gargari, C., Esmaeil and Lucas, 2007. “Imperialist competitive algorithm: an algorithm for
optimization inspired by imperialistic Competitive,” in Evolutionary Computation, IEEE Congress on, pp. 4661-
4667. CEC 2007.
Bonarini, A., 2012. “Evolutionary learning of fuzzy rules: Competitive and cooperation,” Fuzzy Model.
Paradig. Pract., pp. 265-284.
Hoffmann, F. and G. Pfister, 2013. “Evolutionary design of a fuzzy knowledge base for a mobile robot,”
Int. J. Approx. Reason., 17(4): 447-469.
Jalalizadeh, Saeed, Saeed Behzadpoor and Mohmmad Hashemi, 2011. PID Design for AVR system by PSO
and Imperialist Campetitive Algorithms” first international Conference on Computer Science, Engineering and
information Technology (CCSEIT-2011).
Lian, K. Chaoyong Zhang, Liang Gao and Xinyu Li, 2011. “Integrated process Planning and Scheduling
using an imperialist Competitive Algorithm, International journal of production research.
Lughofer, E., 2011. Evolving Fuzzy Systems - Methodologies, Advanced Concepts and Applications.
Springer.
Mendel, J.M. and R.I.B. John, 2002. “Type-2 fuzzy sets made simple,” Trans. Fuz Sys., 10(2): 117-127.
Zadeh, L.A., 1965. “Fuzzy sets,” Inf. Control, 8(3): 338-353.
Zadeh, L.A., 1975. “The concept of a linguistic variable and its application to approximate reasoning—I,”
Inf. Sci. (Ny)., 8(3): 199-249.
Zafer Bingül, Og˘uzhan Karahan, 2011. “A Fuzzy Logic Controller tuned with PSO for 2 DOF robot
trajectory control” Expert Systems with Applications, 38: 1017-1031.

You might also like