Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Advances in Engineering Software 31 (2000) 251–262

www.elsevier.com/locate/advengsoft

Optimization of fuzzy rules design using genetic algorithm


S.V. Wong, A.M.S. Hamouda*
Department of Mechanical and Manufacturing Engineering, Universiti Putra Malaysia, 43400 Serdang, Malaysia
Received 1 March 1999; received in revised form 11 May 1999; accepted 17 October 1999

Abstract
Fuzzy rules optimization is a crucial step in the development of a fuzzy model. A simple two inputs fuzzy model will have more than ten
thousand possible combinations of fuzzy rules. A fuzzy designer normally uses intuition and trial and error method for the rules assignment.
This paper is devoted to the development and implementation of genetic optimization library (GOL) to obtain the optimum set of fuzzy rules.
In this context, a fitness calculation to handle maximization and minimization problem is employed. A new fitness-scaling mechanism named
as Fitness Mapping is also developed. The developed GOL is applied to a case study involving fuzzy expert system for machinability data
selection (Wong SV, Hamouda AMS, Baradie M. Int J Flexi Automat Integr Manuf 1997;5(1/2):79–104). The main characteristics of genetic
optimization in fuzzy rule design are presented and discussed. The effect of constraint (rules violation) application is also presented and
discussed. Finally, the developed GOL replaces the tedious process of trial and error for better combination of fuzzy rules. q 2000 Elsevier
Science Ltd. All rights reserved.
Keywords: Fuzzy-rules optimization; Genetic algorithms; Genetic optimization; Fitness mapping

1. Introduction result being the development of the so-called fuzzy logic


and fuzzy rule-based control. Munakata and Jani reported in
Fuzzy logic, initially introduced in Zadeh’s pioneering Ref. [5] that over a thousand commercial and industrial
work in mid-1960s [2], and later explored by Mamdani to fuzzy systems have been successfully developed in the
control a simple laboratory steam engine [3], has established last few years. The main reason behind this lies on the
itself as a suitable solution to a range of challenging indus- unique characteristics of fuzzy logic. There are two general
trial problems [4]. Fuzzy logic is a mathematical theory of methodologies for generating fuzzy model. The first one
inexact reasoning that allows us to model the reasoning requires expert information to construct the model, whereas
process of humans in linguistic terms. It is suitable in defin- the second lets the system adjust the fuzzy components from
ing the relationship between the system inputs and the representative numerical samples. The first approach
desired system outputs. Fuzzy logic is one of the most requires a prior expert knowledge about the system. It has
successful of today’s technologies for developing sophisti- been a good form to collect expert information from experi-
cated control systems. It is also popular, as its capability for enced experts, as it is much nearer to human normal
developing rule-based expert systems. Fuzzy controllers and communication. The main drawbacks of this approach are
fuzzy reasoning have found particular applications in indus- subjectivity and dependence on expert’s knowledge, which
trial systems that are very complex and cannot be modeled might not be the best at most of the time.
precisely even under various assumptions and approxima- The second method has been applied to construct a fuzzy
tions [1]. The control of such systems by experienced model from the available input–output results. A lot of
human operators was proven to be in many cases more works has been carried out to adjust and/or to generate
successful and efficient than by classical automatic control- input membership functions, output membership functions,
lers. The human controllers employ experiential rules that and/or fuzzy rule sets [6–9]. Tang et al. suggested hierarch-
can be cast into the fuzzy logic framework. These observa- ical genetic algorithms to minimize the number of fuzzy
tions inspired many investigators to work in this area with memberships and fuzzy rules in Ref. [10]. The main draw-
back of this approach is that the representative data is not
really representative in an overall manner. Besides that,
* Corresponding author. Tel.: 1603-948-6101; fax: 1603-948-8939. almost all the systems in reality are non-linear and subjected
E-mail address: hamouda@eng.upm.edu.my (A.M.S. Hamouda). to many unknown variables, which are normally ignored
0965-9978/00/$ - see front matter q 2000 Elsevier Science Ltd. All rights reserved.
PII: S0965-997 8(99)00054-X
252 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

during idealization of the problem. Thus, the so-called of a population. The second class is called “Population”,
representative data is not always representative. consists of all individuals as its members.
Fuzzy rules design is never an easy task especially
subjected to complex real world problems. Fuzzy if-then 2.1. Chrom class
rules were derived from human experts in most fuzzy-
In microbiological world, chromosomes are composed of
based systems. Each fuzzy model described in Ref. [1]
genes, which may take on some number of values called
will have more than 2 × 1029 possible sets of fuzzy rules.
alleles. The Chrom class only stores a series of such coded
A simple two-inputs-one-output fuzzy model normally has
information, in reality. Designation of allele has to be
more than ten thousand possible combinations. Although
carried out before hand by the designer. In natural world,
applying common sense and expert knowledge would
the data or information mentioned is referring to the feature
normally narrow down the scope, but the selected fuzzy
carried with the particular value of the allele, such as brown
rules are normally not the best fitted.
eyes. The definition of the alleles is not provided in the
Recently, several approaches were suggested for generat-
Chrom class, as it is common for the entire population (simi-
ing the fuzzy rules from the numerical data automatically.
lar individual or member of the population). All the infor-
Wang and Mendel have described a general method to
mation carried by an individual is collected in the
generate fuzzy rules from the numerical data in Ref. [11].
chromosome in a standard sequence, which can be defined
Jang [12] and Berenji and Khedkar [13] have proposed self-
freely by the user of the GOL.
learning methods for adjusting membership functions of
All the information stored in the chromosome is in bit
fuzzy sets in fuzzy if-then rules. According to the authors’
form, means a series of ‘1’ and ‘0’ are used for representa-
opinion, automatically generating fuzzy rules will lose one
tion of an individual’s characteristics or features. The data
of the most important features in fuzzy logic. One of the
has been arranged in such a way as to cope up with different
main features of fuzzy logic is its ability of describing the
types of information representation. It could be a Boolean,
system in a linguistics term. This enables the design of such
an integer or even a real number. The user of the GOL has
system with more human-like reasoning, especially with the
all the flexibility to define his/her own definitions for every
fuzzy if-then rules.
single allele. In the present work, the authors have chosen
Genetic algorithm (GA) is now a very popular tool for
binary numbering, as it is the most fundamental in comput-
solving optimization problems. It has been used to effec-
ing world. It can represent any kind of information, ranging
tively find optimal solutions for a variety of problems (e.g.
from its own binary data to real number. In addition, it will
operations research, hybrid techniques, image processing,
gain more efficient computer resources utilization. The user
etc.). Genetic algorithms are based on the mechanics of
has to define the length of every single allele for the chro-
natural selection and natural genetics. With GA’s capabil-
mosome. The user has to bear in mind that, all the indivi-
ities, it has been extended to be a novel optimization algo-
duals in the population are similar, thus share similar
rithm. GA has been applied in solving mathematical
chromosome pattern. In addition, the user has to decide
problems, medical problems, engineering problems and
the length of every individual allele in advance. The calcu-
even political science problems [14–17]. Genetic algo-
lated fitness and penalty factors are stored as member vari-
rithms have been employed for generating and/or adjusting
ables in Chrom class as well. A series of member functions
membership functions of fuzzy sets. Karr [6] adjusted fuzzy
are created to abstract and to store allele information from
membership functions and Nomura et al. [18] determined
and into the chromosome. The implementation of these
fuzzy partition of input spaces by genetic algorithms.
functions requires providence of predetermined initial posi-
In this paper, the authors use the genetic algorithm
tion and ending position of the allele in a chromosome.
approach in fuzzy rules design. The genetic optimization
replaces the tedious process of trial and error for better 2.2. Population class
combination of fuzzy rules. Representative data are used
from real world or reliable resources for genetic optimiza- Population class consists of two generations, new genera-
tion. Studies are carried out based on fuzzy models from tion and present generation. Each generation consists of
Refs. [1,19]. Both newly suggested algorithms, chromo- corresponding individuals (chromosomes) of same kind
some-length independent mutation operation and Fitness and each individual carries a series of genes. New genera-
Mapping mechanism, are described and discussed. tion is breed from the present generation. All the chromo-
somes belong to Chrom class, thus carrying all the Chrom
class features and functions.
Population class carries a number of member variables.
2. Development of GOL They can be divided into two main groups, which are static
and dynamic, respectively. The static variables are pre-
There are two main classes in GOL. The first one is determined or calculated at the initialization stage and
named as Chrom, containing all the necessary information used for the rest of the following processes. While on the
about a chromosome that belongs to an individual member contrary, dynamic variables are altered in every generation.
S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262 253

Table 1
Important member variables of Population class

Static variable Description Dynamic variable Description

Imember Number of individuals / AvgFitness Average fitness of the present generation


chromosomes in a generation
Iallele Number of allele in a chromosome MaxFitness Maximum fitness of the present generation
LengthAllele Length of a particular allele in a FitChrom Chromosome which has the highest fitness
chromosome, in term of binary unit
pCross Probability of occurring cross over Ncross Number of cross over occurrence
pMutation Probability of occurring mutation NMutation Number of mutation occurrence

Table 1 shows crucial static and dynamic member variables of bit crossover is available. While for mutation operation, a
of the Population class. user can choose bit mutation or allele mutation, a single bit
Several member functions are included in the Population of the whole chromosome will be altered to its reverse in bit
class. These member functions are used to implement what mutation. While, the whole allele will be altered arbitrary to
is shown in Fig. 1. Some of them are standard and are used any possible value within the allele length in terms of bits in
within the GOL. The inheritance and polymorphism of OOP allele mutation. User of GOL can even override the opera-
enable overriding and customizing of the member functions tions to have his/her custom made genetic crossover and
to cope with different needs. Some of the common functions mutation operation.
are reproduction, select, mutation, crossover, fitness calcu- Fitness calculation is a problem-oriented process. It has to
lation, etc. be overridden by the user according to the requirement of
Common genetic operations are crossover and mutation. the system. Fitness of an individual is calculated in terms of
They are handled by crossover function and mutation func- real number. Fitness calculation is generally grouped into
tion in Population class. The user can select single bit point two main purposes, maximizing and minimizing the solu-
crossover or double bit point crossover. Whole allele instead tion. The nature of GOL is for maximization fitness, means,
the evolution of generations tends towards maximizing the
fitness of the entire population. Minimizing problems can be
solved with the following general equation
FitnessFinal ˆ K 2 FitnessTrial …1†
Fitness Trial is calculated before hand based on a minimiz-
ing problem consideration. The final fitness, Fitness Final,
is calculated with Eq. (1) with a constant value K. The
value of K must be greater than the worst predicted
value of Fitness Trial. In solving a maximizing problem,
Fitness Final is equal to Fitness Trial.
Constraints (or penalty for rules violation) can be applied
in the process of genetic optimization. Penalty factor of each
individual is stored in respective object, an instance of
Chrom class. When a constraint or a rule is violated, a
certain amount of penalty is applied towards the final fitness
calculation. Penalty treatments are carried out either with
single collection or accumulative collection. In single
collection, the penalty factor is applied once only, no matter
how many constraints is violated. Thus, penalty will be the
same regardless the violating degree. On the contrary, with
accumulative collection, each violation will cause a certain
amount of penalty. At the end, all the penalties are summed
up for the final fitness calculation. Eq. (2) shows the fitness
calculation for minimizing problem with accumulative
penalty collection.
X
FitnessFinal ˆ K 2 FitnessTrial 2 PFi …2†

PFi is the penalty factor of an individual i.


Fig. 1. Genetic optimization flow chart. Constraint(s) or rules violation implementation is useful
254 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

Table 2
Inputs fuzzy expression

First input (material hardness) Second input (depth of cut) Index representation
for both inputs
Abbreviation Expression Abbreviation Expression

VS Very soft VS Very shallow 0


S Soft S Shallow 1
MD Medium MD Medium 2
H Hard D Deep 3
VH Very hard VD Very deep 4

especially in fuzzy rules design. It incorporates expert means, the length of a particular allele is expressed in
knowledge into the optimization process. Penalty factor terms of bit. If an allele carries a possible value from 0 to
calculation should be overridden for customization purpose. 7 (or 8 possible features), the length of the allele is then
The penalty value must not be too small, which will not three. Calculations are then being carried out for some other
cause significant effect. It must not be too large as well, static variables, such as the length of a chromosome. Initial
which will cause the whole optimizationP process inefficient. individuals or chromosome of the members in a population
The summation of all penalty values ( PFi in Eq. (2)) must have to be defined. They can be generated randomly,
not be greater than the difference between the value of K and supplied by the user or partially generated randomly with
the mean of all absolute error percentages. To reduce the partial user input. Fitness of initial chromosomes is calcu-
unwanted effects from value K, Eq. (3) is suggested lated with the overridden fitness calculation function,
including the penalty factor calculation.
AdjFitnessi ˆ FitnessFinal
i 2 min…FitnessFinal
0 n21 †
…FitnessFinal
The Reproduction’s main function is to generate the new
…3† generation from the present generation. It consists of selec-
AdjFitnessi is the adjusted final fitness value for a parti- tion, mutation and crossover operations. With analogy to the
cular member i of the population. Fitnessi is the value calcu- biological world, stronger individual stands higher chance
lated from Eq. (2) for member i. in natural selection for breeding. Thus, individual with
min(FitnessFinal …FitnessFinal better fitness will stand higher chance to be selected in the
0 n21 ) is a function which will
selection operation. Stochastic sampling with replacement
yield the minimum value from FitnessFinal 0 n21 :
to FitnessFinal
The value n is the size of the population. method is used. Crossover and mutation may happen while
breeding. The success of crossover and mutation process is
2.3. Implementation of GOL depending on the pre-defined mutation probability and
crossover probability, respectively. The breeding of new
Fig. 1 shows a flow chart of a typical genetic optimization generation is continuing until the population size reaches
algorithm. It starts with static variable initialization. All the its limit. All the new generation will replace the present
static and dynamic variables are initialized in the GOL generation in the generation change process. Then the
constructor. The GOL uses bit-wise interpretation, which global population information is updated. The whole
processes are repeated for the desired number of generation.
Table 3
Output fuzzy expression for cutting speed fuzzy model (cutting speed)

Abbreviation Expression Index representation


3. GOL application
EVS Extremely very slow 0
ES Extremely slow 1
GOL has successfully optimized the fuzzy models used in
VVS Very very slow 2
VS Very slow 3 Refs. [1,19]. Tables 2 and 3 show the fuzzy expressions for
S Slow 4 the inputs and output memberships, respectively. While
QS Quite slow 5 Table 4 shows the minimum–maximum range of the
AS A bit slow 6 fuzzy membership functions for four different tool types.
MD Medium 7
The fuzzy models are common in inputs and output
AF A bit fast 8
QF Quite fast 9 membership pattern, but different in range. The inputs and
F Fast 10 output memberships are equal-sided triangle in shape and
VF Very fast 11 well distributed. Different set of fuzzy rule is assigned for
VVF Very very fast 12 each respective tool. Table 5 shows fuzzy rules for high-
EF Extremely fast 13
speed tool fuzzy model. The fuzzy rules design was based
EVF Extremely very fast 14
on intuition with trial and error for fine-tuning.
S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262 255

Table 4
Min–max range of fuzzy membership functions for cutting speed fuzzy model

Tool type First input Second input depth of cut (mm) Output cutting speed (m/min)
material hardness
(BHN)

Min Max Min Max Min Max

High-speed steel 85 275 0 16 16 59


Uncoated brazed carbide 85 275 0 16 60 172
Uncaoted indexable carbide 85 275 0 16 63 225
Coated carbide 85 275 0 16 105 336

3.1. Fuzzy set handling class probability are set as 0.6 and 0.009, respectively. Single bit
point crossover operation and allele mutation operation are
A simplified fuzzy set handling class (FSH class) has used. The fuzzy rules from Ref. [1] are assigned as one of
been developed and incorporated into the optimization the initial members. The rest of the rules are generated
process described in this paper. The FSH class is developed automatically and randomly. Basically, the size of a popula-
using C11 programming language. The members of the tion is fixed. Each individual has its own chromosome,
FSH store the properties of a fuzzy membership. The simpli- which consists of certain fixed-number of alleles. The
fied FSH class can only handle triangle and truncated trian- genetic optimization processes are repeated for 10 000
gle fuzzy shapes. Some common operations like truncation generations.
and truth degree calculation are also included.
All the calculations described in this paper are based on 3.3. Fitness calculation
Max–Min Inference Method. In order to save processing
time, Weighted Centroid Output Defuzzification method Calculation of an individual’s fitness involves extracting
has been used. The use of Weighted Centroid Output Defuz- data from the individual’s chromosome, translating the
zification compared to Union Centroid Output Defuzzificai- value of all the alleles and assigning the represented fuzzy
ton has proven to cause an insignificantly small difference as rules into the FSH class. Then fuzzy operations are
reported in Ref. [19]. performed with the predetermined inputs (work piece mate-
rial and depth of cut) to yield the output (cutting speed). The
number of predetermined sets of inputs is 80. Forty sets of
3.2. GOL initialization
representative data are extracted from Machining Data
The fuzzy models consist of five fuzzy memberships in Handbook [20]. Additional 40 sets for uncovered region
the input and fifteen in the output. The system required 25 are obtained through linear interpolation. Calculation of
fuzzy rules with 15 possibilities each. Thus, the total absolute error percentage compared to the result from the
number of possible fuzzy rules combination will be 1525 ˆ above mentioned 80 sets of data is carried out. The opera-
2:525 × 1029 : For initialization, 25 alleles were required and tions iterate until finished assessing all the predetermined
the length of each allele is 4 bits in order to cope with 15 sets of inputs. The mean of all the individual absolute error
possible values. Index representations in Tables 2 and 3 are percentage is calculated. The mean of absolute error percen-
used. In addition, the initialization of the alleles, the prob- tage is a suitable fitness representation of the particular
ability of crossover, the probability of mutation, and the size member (chromosome) in the population. Orientation of
of the population are needed. The proper size of the popula- fitness consideration in the developed GOL is, higher the
tion and probabilities will yield better optimization results. value of fitness the better. To cope with this scenario, the
In this study, the population consists of 80 individuals (sets fitness is obtained through Eq. (4)
of fuzzy rule), the crossover probability and the mutation X
n
…abs_error%†i
Table 5 iˆ0
X
Fitness ˆ K 2 2 penalty_factor …4†
Fuzzy rules for high-speed steel fuzzy model (with abbreviation indication) n11
Material hardness Depth of cut where 0 # i # n
VS S MD D VD
Penalty factor is for rules violation (or constraints). The
VS EVF MD AS QS VS value K is an arbitrary selected positive value. K is defined
S F QS S VS VVS as 1000 for the purpose of this application. Generally, lower
MD F S S VVS VVS mean absolute error percentage, higher fitness value and
H QF S VS VVS ES
nearer to K. For the final consideration of the fitness in the
VH MD ES ES ES EVS
competition of reproduction selection, Eq. (4) is employed.
256 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

Fig. 2. Mean absolute error percentage versus generation with power trend-lines.

3.4. Pattern violation (constraint) penalties 4. GOL characteristics and operations discussion

The genetic optimization class allows the control of fuzzy General characterization of fuzzy rules genetic optimiza-
rules pattern, means, the designer can provide his/her expert tion is carried out with the high-speed steel fuzzy model
knowledge in specifying the relationship between the inputs from literature [1] as test media. As a typical situation, a
and the outputs. For the purpose of this paper, the authors genetic model with relatively huge chromosome is involved.
have included four general constraints for the fuzzy rules, The example fuzzy model requires 25 alleles in a chromo-
which are: some, and each allele consists of 4 bits. As for characteriza-
tion tests, no constraint (penalty) is applied. Initial
• harder the workpiece material, faster cutting speed; individuals in the initial population are generated randomly.
• softer the workpiece material, slower cutting speed;
• shallower the depth of cut, faster cutting speed;
• deeper the depth of cut, slower cutting speed. 4.1. Efficiency and repeatability

Constraints are applied with accumulative penalty collec- Ten independent runs are carried out to verify genetic
tion. Each violation will cause a penalty value of 25 in the optimization’s performance in fuzzy rules design. The
summation of error factor in Eq. (4). Thus, more number of number of generation is set to be 200. All the runs share
violations will cause lower fitness. Pattern validation is the same genetic parameters, such as the number of indivi-
carried out during the assignment of fuzzy rules into the duals in the population and mutation probability, but have
FHS class from the value of alleles. The penalty value different random seeds. The random seed is used to generate
must not be too small, which will not cause any significant random number. Fig. 2 shows a chart P based on the mean
effect. It must not be too large as well, which will make the absolute error percentage, which is (abs_error%)/(n 1 1)
whole optimization process inefficient. The summation of in Eq. (4). Generation average, generation the best and over-
all penalty values must not be greater than the difference all the best are shown in terms of mean absolute error
between the value of K and the mean of all absolute error percentage. They are calculated as the mean value from
percentages. the ten independent runs. Trend-lines are inserted in Fig. 2
assuming negative power relationship between mean abso-
lute error percentage with the number of generation.
3.5. Results of GOL implementation Randomly generated initial fuzzy rules have an average
value of 40% in mean absolute error percentage with stan-
Better results from the trial and error fuzzy rules with dard deviation of 1.5. The algorithms have significantly
genetic optimization are achieved. Table 7 shows the narrowed down the search and led to a reduction in the
summary of validation results, comparing the genetic opti- average mean absolute error percentage to around 20% in
mized fuzzy model from the literature [1,19]. Note that all the first 10 generations. The performance of the genetic
the fuzzy models in the literatures were fine-tuned through optimization reduces when evolving for finer solution.
trial and error. Significantly improved fuzzy rules are The value only improved 1.26% in the second 100 genera-
suggested after genetic optimization for each fuzzy model. tions. Smaller improvement degree is experienced when the
S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262 257

Fig. 3. Performance comparison between random generated population and single strong individual.

whole population evolves further. This shows that genetic vidual in the initial population. The points shown in Fig. 3
optimization is performing with excellent phase initially, are the average value of mean absolute error in the respec-
and the improvement deteriorates from generation to tive generation. The optimization reduced in mean absolute
generation till it reaches its optimum point. error percentage from more than 40–8% in the first 10
generations, whilst comparing the randomly selected
model, only reduced to 20%. Fig. 3 shows that the single
4.2. Importance of initial population
individual-selected population starts staggering from the
A good initial population will improve the optimization 50th generation. In the 200th generation, random model
process. A strong individual in fitness is placed in the initial achieved 4.3% in mean absolute error percentage while
population, which consists of 79 other individuals that 3.2% with the other model.
generated randomly. The strong individual is selected
from the corresponding sets of fuzzy rules from Ref. [1]. 4.3. Crossover, mutation and population size
Averages of generation, average mean absolute error
percentage, and the best mean absolute error percentage Good genetic algorithm performance requires the choice
are calculated from three independent runs under the same of a high crossover probability, a low mutation probability
environment. Comparison has been made with 80 randomly (inversely proportional to the population size), and a moder-
generated individuals. Fig. 3 shows that there is a significant ate population size. De Jong [21] suggested crossover prob-
improvement in performance by having a single strong indi- ability of 0.6. Later, Grefenstette [22] proved that higher

Fig. 4. Performance comparison with different crossover probabilities.


258 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

Fig. 5. Performance comparison with different mutation probabilities.

crossover rates are better when the stochastic errors of Fig. 5 shows change in performances affected by different
sampling are reduced through the use of more accurate mutation rates. A mutation rate around 0.01 is recom-
selection procedures. Genetic optimization with large chro- mended.
mosome is having the same characteristic in selecting cross- The basic mutation operation is defined as number of
over probability especially at the initial evolutions. This is mutation over number of allele involved in reproduction
illustrated in Fig. 4. As for high crossover probability, the [16]. To solve the chromosome-length dependent mutation
chance of an individual surviving (with same chromosome operation, the authors suggest a new mutation operation.
pattern) for the next generation is low. Thus, maintaining Mutation rate is defined as the number of mutation over
the strong individual in evolution process is hard with the number of generated individuals. If a mutation is
stochastic sampling with replacement selection. In this ‘decided’ to take place on an individual, an allele of the
study, Elitist selection model is applied to overcome the individual is selected randomly. Thus, the mutation rate is
problem [17]. independent from the size of the chromosome. From the
Mutation probability controls the rate of mutation in the recommended mutation rate, 0.01 mutation per allele, prob-
process of reproduction. Chance of mutating allele is higher ability for an individual to experience a mutation is 0:01 ×
with huge chromosome. Thus, mutation probability should 25 ˆ 0:25: Thus, chromosome-length independent mutation
be lower in huge chromosome. Too low probability will rate is 0.25. This means, every reproduction of four indivi-
cause insufficient diversity for continued improvement. duals, one of them will get mutated in one of the alleles. The

Fig. 6. Performance comparison with different population sizes.


S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262 259

Fig. 7. Performance comparison with Fitness Mapping and random generated initial population.

new length-independent mutation operation prohibits more mechanism, named Fitness Mapping. There are three main
than one allele mutation of an individual at one time, which objectives to be achieved:
may occur with the conventional mutation operation. De
• No extraordinary individuals would take over a large
Jong [21] has shown the relationship between population
proportion of the finite population in a single generation,
size and optimization performance for off-line system. He
which may cause of premature convergence. With the
reported that bigger the population size, better the optimiza-
conventional (common) scaling method, this could
tion performance, however, more computation effort is
happened when an outfitted individual suddenly turn up
required. Fig. 6 shows the fuzzy rules genetic optimization
in the population at the beginning of the evolution, where
in particular and huge chromosome genetic optimization in
the average fitness is near to the lowest fitness.
general follows the pattern. Larger population size requires
• Minimize the effects from random walk when the
more computation efforts to reproduce a generation. In addi-
average fitness is near to the maximum fitness.
tion, too large a population will cause reduction in the opti-
• Eliminate the effects from huge fitness value.
mizing performance, as shown in Fig. 6 and Ref. [19].
In Fitness Mapping, fitness of an individual is mapped to
4.4. Fitness adjustment a range from 0 to1, where 0 will be the weakest representa-
tion and 1 will be the strongest representation. The average
Eq. (4) alone will lead to inefficiency selection operation fitness will be mapped to 0.5. Linear interpolation is used for
during reproductions. The fitness calculated is high in value mapping at present for simplicity purpose. Complex rela-
and difference between minimum fitness and maximum tionships such as quadratics can be used. Eq. (5) is
fitness is small compared to the fitness value. The value of suggested as follows:
K in Eq. (3) leads to such phenomena. In order to improve 8
> …Fitnessi 2 Fitnessmin †
the efficiency of the genetic optimization, the authors have >
> ; Fitnessi # Fitnessavg
< 2…Fitnessavg 2 Fitnessmin †
introduced Eq. (5) to eliminate the effect of K. MappedFitnessi ˆ
>
> …Fitnessmax 2 Fitnessi †
>
: 0:5 1 ; Fitnessi . Fitnessavg
The authors have also found that Eq. (4) is not efficient 2…Fitnessmax 2 Fitnessavg †
enough. The optimization process reaches the premature …5†
staggering region without any further improvement. While
the population evolves, the average generation fitness is Fitnessi is the individual final fitness calculated by using
moving closer to the best of generation fitness, as shown Eq. (3). Fitnessmin, Fitnessmax, and Fitnessavg are the genera-
in Fig. 2. Thus, no significant advantage of an individual tion weakest fitness, generation the best fitness and genera-
with maximum fitness compares to an average individual. tion average fitness, respectively. Figs. 7 and 8 are plotted to
As a result, selection for improvement becomes a random illustrate the effectiveness of linear fitness mapping algo-
walk among the mediocre. To overcome such a situation, a rithms. Fig. 7 shows the results using normal fitness calcu-
few methods have been suggested [17,18,21,22]. The lation and mapped fitness calculation with random
process is called fitness scaling. The common scaling generated initial population. It can be seen that there is a
mechanism is linear scaling. Sigma truncation and power significant improvement with Fitness Mapping. The Fitness
law scaling are among the others. Mapping mechanism enables the population to evolve
The authors have developed their own fitness scaling further compared to the conventional fitness scaling
260 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

Fig. 8. Performance comparison with Fitness Mapping and single strong individual in initial population.

Table 6
Results summary

Tool material Mean absolute error percentage

40 Checking points 80 Checking points

Union centroid [1] Weighted centroid [19] Weighted centroid Weighted centroid with
genetic optimization

High-speed steel 4.208 4.068 5.812 4.946


Uncoated brazed carbide 3.330 3.138 4.194 3.866
Uncoated indexable carbide 3.836 3.790 5.759 4.511
Coated carbide 2.950 2.971 3.081 2.946

calculations. With a strong individual in the initial popula- optimization with the constraints and optimization without
tion, the system will reach its optimum stage faster where constraint are carried out. The high-speed steel fuzzy model
the generation average fitness starts to stagger. Fig. 8 shows is selected for the comparison tests. Better fuzzy rules
the efficiency of Fitness Mapping compared to the conven- recommended after 100 generations, which improved the
tional fitness scaling with a single good individual in the mean absolute error percentage from 5.8 to 3.7%. A
initial population. The Fitness Mapping demonstrates 36.2% improvement was achieved and Table 7 shows the
improvements even in the region where normal fitness starts corresponding fuzzy rules. The bolded fuzzy rules do not
staggering. Fitness Mapping not only provides better obey the predetermined constraints. Fig. 9 shows the
genetic optimization result at the rough searching stage, relationship between the cutting speed and the depth of
also in the staggering region where significant improvement cut for high-speed steel. The bolded trend line is within
is hardly found with the conventional fitness scaling. Other
common scaling mechanisms such as linear scaling are not
Table 7
capable of handling huge size fitness with stochastic Optimized fuzzy rules for high-speed steel fuzzy model, without constraint
sampling (with replacement). Fitness Mapping efficiency application (with abbreviation indication)
compared to other scaling mechanisms is beyond the discus-
sion of this paper. Material hardness Depth of cut

VS S MD D VD
4.5. Fuzzy rules constraints (rules violations)
VS VF AF QS QS VS
The results shown in Table 6 are bound to the constraints S QF QS VVS VS ES
described in Section 3.4. Capability of constraint appli- MD AF MD S S VS
H AF VS VVS VVS EVS
cation in GOL is useful for a fuzzy designer. To show its
VH AS VS ES ES EVS
efficiency and effectiveness, comparison study between
S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262 261

Fig. 9. Cutting speed against depth of cut (data from Machining Data handbook) with polynomial trend-lines.

the bolded fuzzy rules’ region. The bolded trend line • the first four relationships are no longer valid for medium
shows a continuous increase from negative slope in 8- hardness materials with deep depth of cut.
mm depth of cut to positive in 16-mm depth of cut. The
The above mentioned relationships are purely based
rest of the trend lines do not show this pattern. The
on the genetic optimized fuzzy models. Further investi-
bolded trend line has crossed the 175–225 BHN trend
gation has to be carried out for verification of the
line, where the constraints mentioned in Section 3.4 are
relationships.
violated. The violation region in the graph (bolded trend
line, 8–16 mm depth of cut) is the same to the corre-
sponding violated region in the fuzzy rules (bolded 5. Conclusions
fuzzy rules in Table 6). This explained the reason that
raised the violation of the constraints in the fuzzy rules. An optimization method for fuzzy rules is presented. The
It shows the general ‘rules’, described in Section 3.4 method is called Genetic Optimization Library (GOL) and is
which lead to the development of the constraints, do incorporated into the fuzzy expert system previously
not work well in all regions. This also gives some idea developed by the authors [1]. The validity and versatility
to the fuzzy designer that his/her expert knowledge does of the developed GOL have been demonstrated by applica-
not work in a specific region. Better relationships or fuzzy tion to machinability data selection problem. Four improved
rules are suggested through the optimization processes. fuzzy models have been developed for four different types
This paper showed the possibility of developing new of cutting tools. The developed models are validated with
rules of thumb in cutting, which are as follows: data from the literature.
The effect of varying, checking point density, initial
• harder the workpiece material, faster cutting speed; population, crossover-rate, and mutation rate are examined
• softer the workpiece material, slower cutting speed; and discussed. A new mutation operation and a new fitness
• shallower the depth of cut, faster cutting speed; scaling mechanism (Fitness Mapping) are also presented
• deeper the depth of cut, slower cutting speed; and discussed. The developed fitness mapping was found
• the first four relationships are valid for very soft and very to be more superior compared to other conventional scaling
hard materials; methods.
• the first four relationships are valid for very shallow to Genetic optimization as a post-fuzzy rules design tool has
medium depth of cut; yielded better fuzzy rules combinations and succeeded in
• the first four relationships are valid for very deep depth of replacing the trial and error process. Both expert knowledge
cut; and representative data are included in the designing of the
262 S.V. Wong, A.M.S. Hamouda / Advances in Engineering Software 31 (2000) 251–262

fuzzy rules, which conventionally involves only expert rules using hierarchical genetic algorithms. IEEE Trans Ind Electron
knowledge. 1998;45(1):162–9.
[11] Wang LX, Mendel JM. Generating fuzzy rules by learning from
examples. IEEE Trans Systems, Man, Cybern 1992;22(6):1414–
27.
References [12] Jang JRS. Self-learning fuzzy controllers based on temporal back
propagation. IEEE Trans Neural Networks 1992;3(5):714–23.
[1] Wong SV, Hamouda AMS, El Baradie MA. Development of a fuzzy- [13] Berenji HR, Khedkar P. Learning and tuning fuzzy logic controllers
based expert system for metal cutting data selection. Int J Flexi through reinforcements. IEEE Trans on Neural Networks
Automat Integr Manuf 1997;5(1/2):79–104. 1992;3(5):724–40.
[2] Zadeh LA. Outline of a new approach to the analysis of complex [14] Barricelli NA. Numerical testing of evolution theories. ACTA
systems and decision processes. In: Yager RR, Ovchinnikov S, Biotheor 1962;16:69–126.
Tong RM, Nguyen HT, editors. IEEE transactions systems, man, [15] Fraser AS. Simulation of genetic systems. J Theor Biol 1962;2:329–
cybernetics. SMC-3. Fuzzy sets and applications, 1973. p. 28–44. 45.
[3] Mamdani EH. Applications of fuzzy algorithms for simple dynamic [16] Holland JH. Genetic algorithms and the optimal allocation of trials.
plants. Proc IEE 1974;121:1585–8. SIAM J Comput 1973;2(2):88–105.
[4] Bonissone PP, Badami V, Chiang KH, Khedkar PS, Marcelle KW, [17] Goldberg DE. Genetic algorithms in search, optimization, and
Schuten MJ. Industrial applications of fuzzy logic at general electric. machine learning, Reading, MA: Addison-Wesley, 1989.
Proc IEEE 1995;83(3):450–65. [18] Nomura H, Hayashi I, Wakami N. A self-tuning method of fuzzy
[5] Munakata T, Jani Y. Fuzzy systems: an overview. Commun ACM reasoning by genetic algorithms. Proc 1992 Int Fuzzy Systems Int
1994;37(3):69–76. Contr Conf, Louisville, 16–18 March 1992:236–45.
[6] Karr CL. Design of an adaptive fuzzy logic controller using a genetic [19] Wong SV, Hamouda AMS. A fuzzy logic based expert system for
algorithm. Proceedings of the Fourth International Conference on machinability data-on-demand on the Internet. In: Hamouda AMS,
Genetic Algorithms, San Diego, 13–16 July 1991:450–7. editor. Proceedings of the Fourth International Conference Advances
[7] Karr CL, Gentry EJ. Fuzzy control of pH using genetics algorithms. in Material Processing and Technology, Kuala Lumpur, Malaysia,
IEEE Trans Fuzzy Systems 1993;1(1):46–53. 24–28 August, 2. 1998. p. 1048–58.
[8] Ishibuchi H, Nozaki K, Yamamoto N, Tanaka H. Selecting fuzzy if- [20] Metcut Research Associates Inc. Machining Data Handbook, 3rd
then rules for classification problems using genetic algorithms. IEEE edition, vols 1 and 2, Cincinnate, 1980.
Trans Fuzzy Systems 1995;3(3):260–5. [21] De Jong KA. An analysis of the behavior of a class of genetic adaptive
[9] Pernel C, Themlin JM, Renders JM, Acheroy M. Optimization of systems, (Doctoral dissertation, University of Michigan) Dissertation
fuzzy expert systems using genetic algorithms and neural networks. Abstracts International, 1975;36(10):5140B.
IEEE Trans Fuzzy Systems 1995;3(3):300–12. [22] Grefenstette JJ. Optimization of control parameters for genetic
[10] Tang K, Man K, Liu Z, Kwong S. Minimal fuzzy memberships and algorithms. IEEE Trans Systems, Man, Cybern 1986;16(1):122–8.

You might also like