a two-layer robot controller design using evolutionary algorithms

22
Journal of Intelligent and Robotic Systems 30: 73–94, 2001. © 2001 Kluwer Academic Publishers. Printed in the Netherlands. 73 A Two-Layer Robot Controller Design Using Evolutionary Algorithms F. ABDESSEMED Université de Batna, Institut d’Electronique, Rue Chahid Boukhlouf, Batna, Algérie; e-mail: [email protected] K. BENMAHAMMED Université de Sétif, Institut d’Electronique, Sétif, Algérie (Received: 20 October 1999; in final form: 11 April 2000) Abstract. The results obtained by a rule-based proportional, integral, derivative (PID) precom- pensator controller applied to a two-joint manipulator are discussed. The end effector is made to follow a specified trajectory obtained from the inverse kinematics by an appropriate design of a fuzzy control law. The desired trajectory is determined by the values of the joint variables and the structural kinematics parameters of the manipulator. The performance of the PID controller is exploited here to build a fuzzy precompensator that will enhance the conventional PID and to obtain better performances and results. The fuzzy rule base of the precompensator designed is found by associating two evolutionary algorithms that search for the optimal solution. Key words: evolutionary programming, genetic algorithm, PID, precompensator, robot manipulator. 1. Introduction Robot manipulators are complex nonlinear systems with variant parameters. Con- siderable effort has been devoted to developing algorithms to control such systems dating from the late 1960’s to the mid 1970’s [6, 43]. Many different control laws have been proposed, with a plethora of different control methodologies founded on fundamental properties which have to be taken into consideration in each step design. For example, Seraji, H., among others, proposed a multivariable PID con- troller to achieve command tracking. It was designed on the basis of a linearized model of the robot dynamics [35]. Other techniques have been investigated to achieve asymptotic stability using rigid body nonlinear robot dynamics [18]. Adap- tive control schemes for direct control of robot end effectors to achieve trajectory tracking were also developed over the past decade. Two important classes of adap- tive control have been applied to obtain suitable control laws; namely, self tuning control [21, 25], and model reference adaptive control [10, 27, 31, 36]. Important results for rigid robot manipulators can be found in [3, 8, 39], where the concept of adaptive inverse dynamics is applied. The control objective is a closed loop system which is linear and decoupled. Another important result obtained is the preserva-

Upload: independent

Post on 03-Dec-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Journal of Intelligent and Robotic Systems30: 73–94, 2001.© 2001Kluwer Academic Publishers. Printed in the Netherlands.

73

A Two-Layer Robot Controller Design UsingEvolutionary Algorithms

F. ABDESSEMEDUniversité de Batna, Institut d’Electronique, Rue Chahid Boukhlouf, Batna, Algérie;e-mail: [email protected]

K. BENMAHAMMEDUniversité de Sétif, Institut d’Electronique, Sétif, Algérie

(Received: 20 October 1999; in final form: 11 April 2000)

Abstract. The results obtained by a rule-based proportional, integral, derivative (PID) precom-pensator controller applied to a two-joint manipulator are discussed. The end effector is made tofollow a specified trajectory obtained from the inverse kinematics by an appropriate design of afuzzy control law. The desired trajectory is determined by the values of the joint variables andthe structural kinematics parameters of the manipulator. The performance of the PID controller isexploited here to build a fuzzy precompensator that will enhance the conventional PID and to obtainbetter performances and results. The fuzzy rule base of the precompensator designed is found byassociating two evolutionary algorithms that search for the optimal solution.

Key words: evolutionary programming, genetic algorithm, PID, precompensator, robot manipulator.

1. Introduction

Robot manipulators are complex nonlinear systems with variant parameters. Con-siderable effort has been devoted to developing algorithms to control such systemsdating from the late 1960’s to the mid 1970’s [6, 43]. Many different control lawshave been proposed, with a plethora of different control methodologies foundedon fundamental properties which have to be taken into consideration in each stepdesign. For example, Seraji, H., among others, proposed a multivariable PID con-troller to achieve command tracking. It was designed on the basis of a linearizedmodel of the robot dynamics [35]. Other techniques have been investigated toachieve asymptotic stability using rigid body nonlinear robot dynamics [18]. Adap-tive control schemes for direct control of robot end effectors to achieve trajectorytracking were also developed over the past decade. Two important classes of adap-tive control have been applied to obtain suitable control laws; namely, self tuningcontrol [21, 25], and model reference adaptive control [10, 27, 31, 36]. Importantresults for rigid robot manipulators can be found in [3, 8, 39], where the concept ofadaptive inverse dynamics is applied. The control objective is a closed loop systemwhich is linear and decoupled. Another important result obtained is the preserva-

74 F. ABDESSEMED AND K. BENMAHAMMED

tion of the passivity properties of a rigid robot [22, 23, 34, 38]. Kelly [17] combinedthese two approaches and obtained good results. Also, adaptive approaches basedon the theory of variable control structure can be found in [5, 13, 37].

Intelligent control technique has also proved successful. Researchers soughtrobotic control laws based on formal mathematical analyses, others have chosen al-ternate approaches that exclude the complicated formulas. For instance, intelligentcontrol theory (fuzzy, neural, genetic, etc.) attracted many researchers. In 1974,Mamdani et al. [28] motivated by the paper written by Zadeh [44], succeeded inestablishing the first link between fuzzy theory and system control. This successlead King and Mamdani to the control of a chemical reactor [20]. However, thefirst practical application of fuzzy control came near the end of 1980, and involvedcontrol of a cement kiln of F. L. Smidth & Co A/S in Denmark. There followed asignificant increase in industrial application of fuzzy control, e.g., [40]. Togetherwith the remarkable development in electronics, engineers began to construct newdevices that employed fuzzy reasoning (e.g., washing machines, cameras, etc.).

In robotics, the model-based computer torque method is the basic approach torobot control. However, since there are uncertainties in the robot dynamic model,the ideal error response cannot be achieved and the performance could be welldegraded. Thus, beside other techniques, artificial neural networks were used toderive the adequate control laws for robotic manipulators because of their learn-ing ability and universal approximating capability [16, 32]. On the other hand,basing on the controller proposed by Procyk and Mamdani [33], Mandic and hiscolleagues [29] succeeded in developing a two-joint robot manipulator using self-organizing control techniques. The results obtained were very satisfactory as com-pared to those obtained with a PID controller operating under the same conditions.The work done in the frame of dynamic modeling and control of robot manipula-tors using fuzzy techniques was considered in the last decade, e.g., in [7, 30]. In[30], the author used fuzzy systems to approximate a dynamic model and a set ofgains for a PID controller. Recently, Jin [14] developed a decentralized adaptivefuzzy control scheme for a robot manipulator where a combination of the geneticalgorithm and the gradient method was used. In practice, however, the performanceof the adaptive control scheme is limited.

In a related work, Kim et al. [19] proposed a fuzzy logic-based precompensationscheme for PID controllers experimented on a dc servomotor position control. Thefuzzy rules underlying the mapF was constructed by trial and error. Thus, onecannot conclude that the proposed rules were optimal, especially when some rulesdo not exist for certain inputs. Such undefined situations may lower the efficiencyof the fuzzy controller. Motivated by their article, we have designed a two-layerfuzzy controller for a planar manipulator [1]. Our objective was to incorporateintelligent control that leads to a robust controller for high nonlinear systems.A complete procedure design is proposed in this paper. The control objective is toallow the end effector of a robot manipulator to follow a specific trajectory in the(x, y)-plane. The first layer consists of a conventional PID controller, whose gains

A TWO-LAYER ROBOT CONTROLLER DESIGN 75

are tuned assuming the system to be presented by a linearized, decoupled, dynamicequation. To improve the performance of the conventional PID, a second layer isadded. Its design is based on decision making rules extracted from a fuzzy logic.This present interest is largely due to the successful applications of the fuzzy logiccontroller to a variety of industrial systems. Its main components are an inferenceengine and a set of linguisticIf–Thenrules that encode its behavior. However, themain difficulty in designing a fuzzy logic controller is the efficient formulationof the fuzzyIf–Thenrules. It is well known that it is easy to produce antecedentparts of the fuzzy control rules, but it is very difficult to produce the consequentparts without expert knowledge. The derivation of such rules is often based on theexperience of skilled operators, or using heuristic thinking [28, 44], or modelingan expert’s action [40]. Other researchers [41, 42] have investigated the problemby suggesting an adaptive fuzzy control to estimate and adjust the parameters ofthe fuzzy controller. Clustering algorithms could be another approach to be ap-plied in automatic generating of the fuzzy rules [2]. In recent years and due to theavailability of a powerful computer platform, the theory of evolutionary algorithmsstarted to become popular in the problem of parameter optimization; although itsorigin can be traced back to the 1960’s. It is regarded as a parallel global searchtechnique evaluating many points in the parameter space and it is more likely toconverge towards the global solution. The genetic algorithm as one approach to theimplementation of evolutionary algorithms was used in [15] for generating the rulesof the cart-pole balancing fuzzy logic controller. Here, however, two evolutionaryalgorithms play the role of an expert system and obtain a solution that gives theoptimum rule base for the precompensator.

The remainder of the paper is organized as follows. Section 2 briefly introducesthe system under consideration and poses the control problem. In Section 3, thedesign of the PID controller and the precompensator is presented. The basic prin-ciples of fuzzy controller design and the associated two evolutionary algorithmsfor rule base extraction are described. Simulations showing the performance ofthe proposed scheme are carried out in Section 4, and the discussion in Section 5.Section 6 summarizes and concludes the paper.

2. Problem Formulation

The well-known dynamic model of a rigid robot havingn revolute joints resultingfrom the Newton–Euler formalism can be expressed as:

τ = J (q)q+ f(q)+ V (qiqj )+ g(q); i = 1,2, . . . , j = 1,2, . . . , (1)

whereq, q, q are vectors ofRn representing, the link displacements, velocities, andaccelerations, respectively.J (q) is then×n positive definite inertia matrix,V (q, q)represents the Coriolis and centrifugal forces,g(q) is the gravity vector,f(q) thefriction forces andτ is the applied torque vector. Such a system exhibits greatnonlinearities and coupling between the controlled variables. Thus, it is practically

76 F. ABDESSEMED AND K. BENMAHAMMED

Figure 1. Diagram simulation of one link robot control.

impossible to control this system using conventional controllers, particularly whenit is desired to track a prespecified trajectory with a relatively accelerated motion.In this application, the design of a two-layered controller with a performance com-parable to or better than that possible with the controllers listed in the referencesis sought. The first layer is that of a conventional PID controller whose gains areadjusted to meet the requirements of the dynamic control of the robot when itmoves at low speed. The second layer is a fuzzy-based precompensator createdto reinforce the PID controller, which alone is unable to track the prespecifiedtrajectory at high speed.

3. Implementation

The controller structure is shown in Figure 1, where one can see the fuzzy precom-pensator, the conventional PID controller, and mechanical structure of the robot.The output of the precompensator is considered as a new reference input to thePID-plant system.

A TWO-LAYER ROBOT CONTROLLER DESIGN 77

3.1. IMPLEMENTATION OF THE PID CONTROLLER

Classical PID control is wide used in control processes. The procedure used hereconsiders the robot as a linear and decoupled multivariable system. Hence, theCoriolis and centrifugal forces are neglected as are the gravitational forces. It isfurther assumed that there is no interaction between the controlled variables. Thus,the dynamic equation (1) reduces to:

τ = J θ, (2)

whereJ is the 2×2 regular, symmetric inertial matrix. To set the values of differentgains of the primary controller, it is assumed, at the first stage of the design, thatthe output m of the precompensator is equal to zero. Thus, the control law appliedto each link is given by

τ = KP(θd− θ)+KD(θ

d− θ )+KI

∫ (θd− θ) dt, (3)

whereKP, KD andKI are 2× 2 diagonal matrices containing the gainskPi, kDi

andkIi associated with each link. Considering Equations (2) and (3), the followingtransfer function is obtained:

θi

θdi

= kDi s2+ kPi s + kIi

Jis3+ kDis2+ kPi s + kIi. (4)

Thus, the characteristic equation is written as

1(s) = s3 + kDi

Jis2 + kPi

Jis + KIi

Ji= 0. (5)

Ji is taken to be a fixed term of theJii element of the inertial matrixJ . In roboticcontrol, the gains are typically chosen so that the two poles are double and realnegative. This gives a damping coefficient of one, and as a consequence, a fastresponse without oscillations. The remaining pole is then placed on the real axisfar away from the first two. Thus,

1(s) = (s + β)2(s + nβ). (6)

The desired gains are given by the following relationships:

kPi = Ji.(2n+ 1)β2,

kDi = Ji(2+ n)β,kIi = Jinβ3

with β > 0, n > 1. The choice ofβ depends on the sampling frequency as well ason possible saturation effects.

78 F. ABDESSEMED AND K. BENMAHAMMED

3.2. IMPLEMENTATION OF THE PRECOMPENSATOR

The precompensator is a fuzzy controller. Its main goal is to enter into action when-ever it is needed to reinforce the conventional controller to provide the necessarycommands that allow the end effector to track the desired trajectory with mini-mum error. Fuzzy control finds its origin in the control of complex and ill-definedsystems. The measured values are usually represented by imprecise concepts ofobjects such as big, small, fast, tall, etc. It is the unknown behavior of complexsystems that leads to such a reasoning. A fuzzy controller is a system which usesa rule based expert in the form ofIf–Thenstatements. The input state with respectto a certain universe of discourse constitutes the premise of the rule, whereas theoutput state constitutes the consequence of the rule. We can distinguish among thesteps of the rule treatment the following procedures.

3.2.1. Fuzzification

The fuzzificationmaps crisp numbers into fuzzy sets. Theinference enginemapsfuzzy sets into fuzzy sets. It handles the way the rules are combined, and allowsone to tell how much a rule is true. Theaggregationof the rules is established withtriangular conorms which are employed for defining disjunction. The last stagein a design procedure of a fuzzy controller is the defuzzification. The role of adefuzzifier is mapping output sets into crisp numbers; such a number correspondsto the control action. The reader is referred to [24], for further details. Here therules of the fuzzy system are extracted by applying two evolutionary approaches,namely, the genetic algorithms and the evolutionary programming. Genetic Algo-rithms (GAs) introduced by Holland [12], and subsequently studied by DeJong[9], Goldberg [11] and others, are based on natural selection. They search forthe global optima, and can, therefore, avoid being trapped in local minima. GAshave been successfully applied to a variety of optimization problems. They havebeen also employed for generating fuzzyIf–Thenrules and adjusting membershipfunctions of fuzzy sets [15, 26]. Here, a GA is implemented as an expert systemfor the derivation of fuzzy rules. In fact, by working with a population of possiblesolutions, the algorithm can search many local minima and thereby increase thelikelihood of finding the global one.

In what follows, a brief description demonstrates how the precompensatorworks, and how the rules are extracted. Referring to Figure 1, one sees the twoinputs to the controller, namely,e(k) and1(e(k)). The controller outputm(k) isgenerated by a nonlinear mapping functionF , implemented using a fuzzy logicsuch that

m(k) = F [e(k),1e(k)]. (7)

Fuzzification, decision making, and defuzzification are the three steps followed inthe realization of this fuzzy function. The following linguistic variables and their

A TWO-LAYER ROBOT CONTROLLER DESIGN 79

associated membership functions are used:

Le = {NL,NM,NP,ZE,PP,PM,PL},L1e = {NL,NM,NP,ZE,PP,PM,PL},Lm = {NL,NM,NP,ZE,PP,PM,PL},µe = {µNL, µNM, µNP, µZE, µPP, µPM, µPL},µ1e = {µNL, µNM, µNP, µZE, µPP, µPM, µPL},µm = {µNL, µNM, µNP, µZE, µPP, µPM, µPL},

where the meaning of each linguistic variable should be clear from its mnemonic;for instance, NL stands for “Negative Large”; NS stands for “Negative Small”;ZE stands for “Zero”; and likewise for the positive linguistic variable. Each mem-bership function is a map from the universe of discourse to the interval[0,1].Figure 2 shows the selected triangular-shaped membership function. Bell-shapedand trapezoidal-shaped may work as well. The dynamics of the precompensator-PID controller is explained as follows: the two inputs to the PID controller aree′i (k)andei (k), where

e′i (k) = θci (k)− θi(k)

and

ei (k) = θdi (k)− θ (k), i = 1,2 and refers to theith link.

Note that the desired angular position is not directly compared to the measured one,but passes first through the precompensator to be transformed to a new referenceangular value for the PID-plant system. Thus, one writes

θci (k) = θd

i (k)+mi(k), i = 1,2, (8)

where

mi = Fi(ei,1ei), i = 1,2. (9)

e(k) and1e(k) are inputs to the mapF , andm(k) is the output such that:

ei(k) = θdi (k)− θi(k), i = 1,2 (10)

1ei(k) = ei(k)− ei(k − 1), i = 1,2. (11)

Figure 2. Membership function.

80 F. ABDESSEMED AND K. BENMAHAMMED

The control law is given by the following equation:

ui(k) = kPie′i (k)+ kIi

∫e′i(k)dt + kDi

de(k)

dt, i = 1,2. (12)

3.2.2. Derivation of the If–Then Rules Using Genetic Algorithm

In this section, a method based on genetic algorithms for derivation of rules isdescribed. Assuming that the error and its derivative are partitioned intoK subsets{Ae1, Ae2, Ae3, . . . , AeK} andL subsets{A1e1 , A

1e2 , A1e3 , . . . , A1eL } successively, the

number of possible combinations isL × K which is the same as the number ofthe rules needed to specify a single output. In this work, triangular membershipfunctions are employed to describe each input by seven attributes. The number ofrules per output is then equal to 49. A single rule is defined as:

Rule Rij : If e is Aei and1 e is A1e

j

Then mij is Amp , i = 1,2, . . . ,7, j = 1,2, . . . ,7, p= 1,2, . . . ,7.

Rij is the label of the fuzzyIf–Thenrule,Aei andA1ej are triangular fuzzy subsets inthe interval[−1,1], andAmp is the consequent fuzzy subset. The aim is to sort outthe appropriate optimized rules adequate for the system by employing an evolvinggenetic algorithm. The system being evolved is encoded into a long valued stringcalled a chromosome. Initially a random population of these strings is generated.Each string is then evaluated according to a given performance criterion and as-signed a fitness score. The strings with the best score are used in the reproductionphase to give the next generation. Here, the genetic algorithm is presented as aseven-tuple entity and is abstracted in the following encapsulated form:

GA = {M(t), l,D,8F , sel,pcross,pmut},where

M(t) = {m0, . . . , m6}l encoding chromosome(−16 mi ∈ R 6 1),

l ∈ N length of chromosome,

D ∈ N population size,

8F : M → R fitness function,

sel: CromD → Crom parent selection operation,

pcross: Crom2→ Crom2 crossover operation,

pmut: Crom→ Crom mutation operation.

Each individual chromosome represents a complete rule base solution formu-lated as a setM of the generatedK × L fuzzy If–Thenrules such that:

Mi = {mji | i = 1, . . . ,D; j = 1, . . . , `}.

A TWO-LAYER ROBOT CONTROLLER DESIGN 81

Table I. Symbolic fuzzy logic rule base of the precompensator

The set of all the individuals represents a population. If we denote byP(t) apopulation at a timet , then we can write

P(t) = {M1(t),M2(t), . . . ,MD(t)},

wheremji ∈ Sm ∈ R, are thej th consequent parts of the fuzzy rules of theith indi-vidual. It takes its value from the setSm = {−1,−0.66,−0.33,0.0,0.33,0.66,1}.These values correspond to the projection of the peaks of the membership functionson the normalized universe of discourse of the action. The rules for the fuzzy pre-compensator are given in Table I. The two controllers have two input variables andsingletons as outputs. Each variable has seven linguistic values which are describedby linear membership functions.

(a) Initialization. The construction of the GA is begun by creating a populationofD trial solutions. Therefore, denoting bySD the set of all fuzzyIf–Thenrules ofthe population at any time, one writes:

SD(t) = M1(t) ∪M2(t) ∪M3(t) ∪ · · · ∪Mi(t) ∪ · · · ∪MD(t).

(b) Parent selection. The selection of parent chromosomes is based on the ob-jective function called fitness, which governs the extent to which an individual caninfluence future generations. For theIf–Thenrule selection, the fitness founded tobe the most successful to our application is:

8F = 109

PE× TE, (13)

82 F. ABDESSEMED AND K. BENMAHAMMED

where

PE=∑t

2∑i=1

(θdi (t)− θi(t))2,

is the sum of the squared position errors for the two arms over all the simulationtime.

TE=∑t

2∑i=1

∣∣τi(t)− τi(t − 1)∣∣

is the sum of the absolute values of the difference between torques for two jointsat consecutive sampling instants over all the simulation time.

(c) Crossover. Among theD parents, potential pairs are randomly selected forgenerating two new offspring. This is done first by randomly assigning a splicepoint and then making the string exchange.

(d) Mutation. Mutation is another genetic operator introduced here as an occa-sional perturbation to the foundedIf–Then rules, to ensure that all points in thesearch space are reached. It is in fact an occasional alternation at a particular stringposition, needed to enhance the ability of GAs to find near optimal solution and toguard against premature convergence. In order to increase the convergence of theGA, the following self-adaptive probability mutation was adopted since a muchgreater mutation decreasing over the course of evolution is helpful with respect tothe convergence reliability, thus,

pmutation= max

(1

gen(i) × pop(j),

1

popsize

), (14)

wheregen(i), stands for theith generation, andpop(j) for thej th population.

3.2.3. Derivation of the If–Then Rules Using Evolutionary Programming

In this subsection, we propose another evolutionary algorithm to evaluate the samefitness function, used by the GA, by sorting out the appropriate rules for the fuzzyprecompensator. The approach is to evolve the system to predict better events onthe basis of former observations. In fact, it is required to find a set of rulesr ∈ Ssuch that the fitness function be maximized.

Evolutionary programming (EP), is a stochastic optimization method in whichan initial population of randomly selected individuals evolves towards a betterregion of search space. A(µ + λ)-evolutionary programming is described by anoctuple entity defined by the following format:

EP= {I (t), L,µ, λ, sel,pmut,8F , g}

A TWO-LAYER ROBOT CONTROLLER DESIGN 83

for which the components are defined as follows:

I = [a1, a2, . . . , a2L] encoding chromosome,

2L ∈ N length of chromosome,

µ ∈ N population size,

λ ∈ N number of offsprings= µ,

Pmut: I → I mutation operator,

8F : I → R fitness function,

g: RL→ R set of constraints.

The design of the EP is based mainly on the following three mechanisms:• The representation of individuals,• Implication of the variation operators,• The generation procedure.

(a) Representation. Each individual chromosome represents a complete rule basesolution. The components:(a1 = m1, a2 = m2, . . . , aL = mL) determine the con-sequent part of the fuzzy rules, and the remaining components,(aL+1 = σ1, aL+2 =σ2, . . . , a2L = σL) contain standard deviation which controls the mutation process.A complete string of chromosomes could be written in the following way:a1a2 . . .

aLaL+1aL+2 . . . a2L, representing one individual. The set of all the individuals rep-resents a population. If we denote byP(t) a population at a timet , then we canwrite

P(t) = {I 1(t), I 2(t), . . . , Iµ(t)},

where

I i = {aij : i = 1, . . . , µ; j = 1, . . . ,2L}.

I i designating theith individual in whichaj describes thej th consequent partand the standard deviations as defined above. The algorithm seeks many localoptima and increases the likelihood of finding the global optimum representingthe problem target.

(b) Initialization. The algorithm is initiated by designating an initial populationformed of 20 identical individuals. Number 20 is only an experimental number.Each solution is taken as a pair of real-valued vectors (Emi , Eσi), such that dim( Emi) =dim(Eσi) = number of rules.Emi is the consequent part vector of the fuzzyIf–Thenrules, andEσi is an adaptable standard deviation vector. As an initial point, thecomponents of the vectorEmi are those found for the best global individual whenusing the genetic algorithm as shown in Table II. The adaptable standard deviationsσi have been assigned an ad hoc choice ofσi = 0.05; i = 1, . . . ,49.

(c) Evaluation. The fitness function is evaluated for each set of rules; and it isbased on the same function given by Equation (13).

84 F. ABDESSEMED AND K. BENMAHAMMED

Table II. The extracted fuzzy rule base obtained by the GA

(d) Generation. Generation in EP differs from that in GAs. The variation opera-tors such as crossover and mutation, perform differently. In fact one child from oneparent is generated by adding a normally distributed random value with expectationzero and a unity standard deviation [4] as

Eminew(j) = Emi

old(j)+ Eσ iold(j)Nj(0,1). (15)

Nj(0,1) indicates that the random variable is sampled anew for each value of thecounterj . The step sizeσ is controlled by the following equation:

σ inew(j) = σ iold(j)exp[τ ′N(0,1) + τNj (0,1)

]. (16)

The parametersτ andτ ′ are the learning rates which adopt the conventional valuesof (√

2n)−1 and(√

2√n)−1, respectively, wheren is the total number of rules to be

evolved (in our casen = 49). To help the system, operating in a convergence anda stable region, certain constraints are utilized that are derived when the followingassumptions are made:

ASSUMPTION 1. The action values within the upper triangle of Table I, denotedbymU, are constrained to take negative values; here:mU(j, k) ∈ [−2,0].

ASSUMPTION 2. The action values within the lower triangle of Table 1 denotedbymL, are constrained to take positive values; heremL(j, k) ∈ [0,2].

A TWO-LAYER ROBOT CONTROLLER DESIGN 85

ASSUMPTION 3. The action values within the off-diagonal of the lower triangleof Table I, denoted bymU/L, are free to take either positive values or negative valueswith the one in the middle of the table constrained to take a zero value; i.e.,{

mU/L(j, k) ∈ [−2,2], j 6= k,mU/L(j, k) = 0.0, j = k. (17)

The values−2 and 2 are chosen as upper limits. To explain their natural mean-ing, it is necessary to establish the link that gives input and output values based onexperience, or the system step response, or the phase plane trajectory so as to formthe rule base. For example, if the reference signal is kept constant while the erroris positive, and the error change is negative, it means that the output is increasingtowards an overshoot. Therefore, the input to the system should correspond to anegative value. Likewise, if the error is positive, and the error change is positive,then the output is decreasing and as a compensation we need to input a positivevalue. The cells in Table I, belonging to the off-diagonal which correspond to afrontier between the two sides, are allowed to take either positive or negative valuesto compensate for the rules of lower efficiency.

(e) Evaluation. After having the new generation, a fitness score is evaluated foreach new memberEmi.

(f) Selection. Unlike the genetic algorithm, the next generation is selected bas-ing solely on the fitness values of the individuals. The selection is conducted bytaking a random uniform sample of individuals of size equal to half the populationsize among that of all parents and offspring. Each solution from offspring andparent individuals is evaluated against aq randomly chosen individuals. For eachcomparison a win is assigned if the individual score is better or equal to that of itsopponent, and the 20 new individuals with the greatest number of wins are retainedas parents for the next generation. Their associated adaptable standard deviationsare included.

3.2.4. Defuzzification

There are many ways for performing defuzzification. The strategy adopted here isthe height defuzzification method given by:

m(k) = CF

∑49i=1µ(ui)ui∑49i=1µ(ui)

, (18)

whereui is the support value at which the membership function reaches the maxi-mum value.CF is the scaling factor, defined for the three universes of discourse asfollows:

Cfe = 3.15, CF1e = 5, CFu = 10.0.

86 F. ABDESSEMED AND K. BENMAHAMMED

4. Simulation Results

The efficiency of the proposed method is evaluated by simulating a two-axis robotsystem. The parameters of the first two links of a PUMA 560 were adopted. Eachlink is driven by a DC motor via a transmission gear system. The control inputsare obtained in terms of voltage by multiplying the calculated torques byN−1K−1

m ,whereN is the gear ratio, andKm is the torque constant such that:

N1 = 120 for the first DC motor,

N2 = 50 for the second DC motor,

Km1 = Km2 = 0.18N m/Volt torque constant.Torque limiters are used to prevent excess input values. The performances forthe GA scheme and the evolutionary programming scheme are tested for positioncontrol and trajectory tracking control, with fixed PID coefficients. The desiredangular trajectoriesθd

1 andθd2 are generated by the inverse kinematics. The robot is

supposed to be executing a certain task in the(x, y)-plane, as shown in Figure 3.Each segment of the path is considered as a sequence of points and from eachpointX(x, y) in the (x, y)-plane one can easily compute the corresponding angularvaluesθd

1 andθd2 from the following inverse kinematic relationshipθd = f −1(X).

The whole task is executed in 4 seconds.The simulation results for the GA scheme are shown in Figure 4. These results

were obtained using a crossover probability equal to 0.66, and a self-adaptive prob-ability mutation as suggested by Equation (14). The GA was run with a populationof 100 individuals and was found to converge within about 1000 generations to anexcellent set of rules for control, and no improvement was noticed beyond that.The global individual showing the best score is retained as the best chromosome.Its alleles are plugged in Table II. To test the position control, a medium maneuveris considered to move the first joint from 0 to(π/2), and the second joint from 0 to(−π/2). The error responses are depicted in Figure 4(a), where we can see a fast

Figure 3. (x, y)-plane trajectory.

A TWO-LAYER ROBOT CONTROLLER DESIGN 87

Figure 4. Performance of the GA scheme controller for position control (a), trajectory control(b–d).

steady state response and a near zero static errors. On the other hand, Figure 4(b)shows a successful tracking trajectory. The corresponding trajectory tracking erroris represented in Figure 4(c), and the control signals are represented in Figure 4(d).

In simulating the EP, the algorithm was run with a population of 20 for about500 generations by taking, as an initial start, those rules sorted out by the GA. Theresulted rule base is depicted in Table III, where we can see the output membership

88 F. ABDESSEMED AND K. BENMAHAMMED

Table III. The extracted fuzzy rule base obtained by the EP

functions founded by the GA as if they have been slid either to the left or to the rightof their corresponding positions on their universe of discourse. The performancesare tested in this case, and the error responses depicted in Figure 5(a) show anovershoot improvement. On the other hand, a successful tracking trajectory is alsoachieved as can be seen from Figure 5(b). The resulting trajectory error is shownin Figure 5(c) and the control inputs in Figure 5(d).

In order to test the robustness of the proposed schemes, the disturbance rejectionabilities of the controller developed has been considered. The mass of the secondlink is suddenly increased by 100% att = 2 s, while the end effector is in motion.Figure 6 shows the results obtained when using the GA approach. We can noticethat, in spite of a sudden change in massm2, the fuzzy controller performs verywell. This abrupt perturbation demands only an increase in energy as it is obviousfrom Figure 6(c) when compared with Figure 4(d).

The behavior of the robot manipulator for the same conditions and for the sametype of disturbance is tested when the fuzzy controller works under the EP rulebase. The simulation results shown in Figure 7 reveal the rejection ability of thisfuzzy controller. The comparison between Figures 7 and 5 shows that the controllerhas compensated for the mass disturbance by an increase demand in energy.

When comparing with the two types of evolutionary algorithms used, we cansay that the fuzzy rule base extracted by EP resulted in a slight improvement ofthat found by the GA, when one compares the overshoot resulted and the demandin energy.

A TWO-LAYER ROBOT CONTROLLER DESIGN 89

Figure 5. Performance of the EP scheme controller for position control (a), trajectory control(b–d).

5. Discussion

This paper proposed two evolutionary algorithms to extract the optimum rule basefor a two-link manipulator with computer simulation using a mathematical modelof the plant. However, experimental studies, conducted on-line on a physical sys-tem, can be applied if the system is kept operating in a stable region. On the otherhand, the analysis is confined to a two-degree of freedom robot manipulator. The

90 F. ABDESSEMED AND K. BENMAHAMMED

Figure 6. Performance of the GA scheme controller under mass disturbance.

extracted rules were the optimal ones. They do have an interesting property to begeneral. In fact, we have simulated the system for different other trajectories, andused the obtained rules for a system of a three-degree of freedom robot manipulator.The results were as good as those presented in this paper. To interpret this propertythe generalization of the precompensator, one can state that its output acts like aninput reinforcement having the amount that must be added to the process-input tocompensate for the current poor performance.

A TWO-LAYER ROBOT CONTROLLER DESIGN 91

Figure 7. Performance of the EP scheme controller under mass disturbance.

6. Conclusions

In this paper, hybrid robotic controllers are created based on the linear systemapproach and the fuzzy logic control approach. The design goal was to providesatisfactory tracking of a robot end effector. The controller built around this systemconsists of two layers. The first layer is the PID controller. Its design is based on theassumption that nonlinear terms in the dynamics of the robot can be neglected. The

92 F. ABDESSEMED AND K. BENMAHAMMED

second layer is a fuzzy precompensator, designed on the basis of decision makingrules and tuned to minimize the output error when the conventional controllerexhibits significant steady-state errors and a loss in control. The fuzzy rule baseis created using two evolutionary algorithms. The genetic algorithms were used toevolve a randomly chosen initial rule base towards a better region of convergence.The set of rules, founded by this method, gives satisfactory results for both theposition and trajectory tracking control. On using the evolutionary programmingapproach we have thought to tune this near optimum fuzzy rule base towards abetter global optimum solution. And indeed, with this alternative, we arrived at sat-isfactory results which show a slight improvement of the previous results obtainedupon applying GA. The simulation results also proved the robustness of the twoproposed schemes. The performance of this scheme demonstrates its superiorityto be insensitive to various uncertainties; since it can be easily implemented foranother high order degree of freedom manipulator, as well as for various desiredtrajectories without modifying the rule base.

References

1. Abdessemed, F. and Benmahammed, K.: A two-layer robot controller design, in:WorldCongress WCCI’98 on Computational Intelligence, Anchorage Alaska,Proc. of the 1998 IEEEInternat. Conf. on Fuzzy Systems, Vol. 1, May 4–9, 1998, pp. 522–527.

2. Abe, S. and Lan, M. S.: A method for fuzzy rules extraction directly from numerical data andits application to pattern classification,IEEE Trans. Fuzzy Systems3 (1995), 18–28.

3. Amestegui, M., Ortega, R., and Ibarra, J. M.: Adaptive linearizing decoupling robot control:A comparative study of different parametrizations, in:Proc. of the 5th Yale Workshop onApplications of Adaptive Systems Theory, New Haven, CT, 1987.

4. Bach, T., Hammel, U., and Shwefel, H. P.: Evolutionary computation: Comments on the historyand current state,IEEE Trans. Evolutionary Comput.1(1) (1997).

5. Balestrino, A., De Maria, G., and Sciavicco, L.: An adaptive model following control for roboticmanipulators,J. Dyn. Systems Measm. Control105(1983), 143–151.

6. Bejczy, A. K.: Robot arm dynamics and control, Technical Memorandum 33-669, JETpropulsion laboratory, 1974.

7. Cela, A., Hammam, Y., and Carrière, A.: Robust fuzzy logic controller for trajectory tracking ofrobotic systems, in:IEEE Internat. Conf. on Systems Man and Cybernetics, 1994, pp. 459–464.

8. Craig, J. J., Hsu, P. I., and Sastry, S.: Adaptive control of mechanical manipulators, in:IEEEInternat. Conf. on Robotics and Automation, San Francisco, CA, 1986.

9. DeJong, K. A.: An analysis of the behavior of a class of genetic adaptive systems, PhDDissertation, University of Michigan, Ann Arbors, 1975.

10. Dubowsky, S. and Desforges, D. T.: The application of model reference adaptive control forrobotic manipulators,ASME J. Dyn. Systems Measm. Control101(1979), 193–208.

11. Goldberg, D. E.:Genetic Algorithm in Search, Optimization and Machine Learning, Adison-Wesley, Reading, MA, 1989.

12. Holland, J. H.: Outline for a logical theory of adaptive systems,J. Assoc. Comput. Mach.3(1962), 277–314.

13. Hsia, T. C.: Adaptive control of robot manipulators: A review, in:IEEE Internat. Conf. onRobotics and Automation, San Francisco, CA, 1986.

14. Jin, Y.: Decentralized adaptive fuzzy control of robot manipulator,IEEE. Trans. Systems ManCybernet.28(1) (1998), 47–57.

A TWO-LAYER ROBOT CONTROLLER DESIGN 93

15. Karr, C. L.: Design of an adaptive fuzzy logic controller using a genetic algorithm, in:Proc. ofthe 4th Internat. Conf. on Genetic Algorithms, San Diego, July 13–16, 1991, pp. 450–457.

16. Kawato, M., Uno, Y., Isobe, M., and Suzuki, R.: Hierarchical neural network model forvoluntary movement with application to robotics,IEEE Control Systems Mag.(1998), 8–16.

17. Kelly, R. and Carelli, R.: Input-output analysis of an adaptive computed torque plus compen-sation control for manipulators, in:27th IEEE Conf. on Decision and Control, Austin, TX,1988.

18. Khalil, W.: Contribution á la commande automatique des manipulateurs avec l’aide d’unmodèle mathématique des mécanismes, Thèse d’État USTL Montpelier, 1978.

19. Kim, H., Kim, K-C., and Chong, E. K. P.: Fuzzy precompensated PID controllers,IEEE Trans.Control Systems Techn.2(4) (1994).

20. King, P. J. and Mamdani, E. H.: The application of fuzzy control systems to industrialprocesses,Automatica13 (1976), 235–242.

21. Koivo, A. J. and Guo, T. H.: Control of robotic manipulator with adaptive controller, in:20thIEEE Conf. on Decision and Control, San Diego, CA, December 1981, pp. 271–276.

22. Landau, I. D. and Horowitz, R.: Synthesis of adaptive controller for robot manipulators us-ing a passive feedback systems approach, in:Proc IEEE Conf. on Robotics and Automation,Philadelphia, 1988.

23. Landau, I. D. and Horowitz, R.: Application of the passive systems approach to the stabilityanalysis of adaptive controllers for robot manipulators,Internat. J. Adaptive Control SignalProcessing3 (1989).

24. Lee, C. C.: Fuzzy logic in control systems: Fuzzy logic controller: Part I–II,IEEE Trans.Systems Man Cybernet.20(2) (1990).

25. Lee, C. S. G. and Chung, M. J.: An adaptive control strategy for computer-based manipulators,IEEE (1982).

26. Lee, M. A. and Takagi, H.: Integrating design stages of fuzzy systems using genetic algorithms,in: Proc. of the 2nd IEEE Internat. Conf. on Fuzzy Systems, New York, 1993, pp. 612–617.

27. Lozano, R. and Brogliato, B.: Adaptive control of robot manipulators with flexible joints,IEEE(1989).

28. Mamdani, E. H.: Application of fuzzy algorithms in control of simple dynamic plant,Proc. IEE121(12) (1974), 1585–1588.

29. Mandic, N. J., Scharf, E. M., and Mamdani, E. H.: Rule-based controller to the dynamic controlof a robot arm,IEE Proc.132(4) (1985).

30. Meslin, J. M., Zhou, J., and Coiffet, P.: Fuzzy dynamic control of manipulators: A schedulingapproach, in:Internat. Conf. on Systems, Man and Cybernetics(IEEE SMC’93), 1993.

31. M’saad, M. and Sanchez, G.: Partial state reference model adaptive control of multivariablesystems,Automatica28(6) 1189–1197.

32. Ozaki, T., Suzuki, T. Furuhashi, T., Okuma, S., and Ushikawa, Y.: Trajectory control of roboticmanipulators using neural networks,IEEE Trans. Industr. Electronics38(3) (1991), 195–202.

33. Procyk, T. J. and Mamdani, E. H.: A linguistic self-organizing process control,Automatica18(1979), 15–30.

34. Sadegh, N. and Horowitz, R.: Stability analysis of an adaptive controller for robotic manipula-tors, in:IEEE Internat. Conf. on Robotics and Automation, Raleigh, NC, 1987.

35. Seraji, H.: Linear multivariable control of two link robots,J. Robotic Systems3(4) (1986),349–365.

36. Seraji, H.: Direct adaptive control of manipulators in Cartesian space,J. Robotic Systems(1987).

37. Singh, S. N.: Adaptive model following control of nonlinear robotic systems,IEEE Trans.Automat. Control30(11) (1985), 1099–1100.

38. Slotine, J. and Li, W.: Adaptive robot control: A new perspective,Proc. IEEE J. RoboticsAutomat.3(4) (1987), 345–351.

94 F. ABDESSEMED AND K. BENMAHAMMED

39. Spong, M. W. and Ortega, R.: On adaptive inverse dynamics control of rigid robots,IEEETrans. Automat.(1988).

40. Sugeno, M.:Industrial Application of Fuzzy Control, Elsevier Science, Netherlands, 1985.41. Tay, T. T. and Tan, S. W.: Fuzzy systems as parameter estimator of nonlinear dynamic function,

IEEE Trans. Systems Man Cybernet.B 27(2) (1997).42. Wang, L. X.: Stable adaptive fuzzy control of nonlinear systems,IEEE Trans. Fuzzy Systems

1(2) (1993).43. Whiteney, D. E.: Resolved motion rate control of manipulators and human protheses,IEEE

Trans. Man Machine Systems10(2) (1969), 47–53.44. Zadeh, L. A.: Outline of a new approach to the analysis of complex systems and decisions,

IEEE Trans. SMG3 (1973), 28–44.