CHAPTER 8 MATHEMATICAL MODEL AND GENETIC ALGORITHM...
Transcript of CHAPTER 8 MATHEMATICAL MODEL AND GENETIC ALGORITHM...
106
CHAPTER 8
MATHEMATICAL MODEL AND GENETIC ALGORITHM
8.1 INTRODUCTION
This chapter describes the development of mathematical model
between the input parameters and output function using SYSTAT software.
Models for all kinds of pistons are derived and the same is compared with
the respective experimental results. This chapter also deals with genetic
algorithm using MATLAB 7 to optimize the machining parameters for
various dipped in conditions. The optimized results by GA are compared
with the Taguchi’s robust design output values.
8.2 NEED FOR A MATHEMATICAL MODEL
Functional or empirically developed mathematical models
explicitly link a quantitative dependent variable to certain independent
variables. The test time approach to build such models from observed
quantitative data is known as regressions analysis. Empirical models are
developed to predict the cutting forces using SYSTAT software. Present
work uses regression analysis to develop a mathematical model using the
experimental results. Prediction of cutting forces is carried out using the
developed model. Typical comparison is presented in 8.5. From the
comparison it is understood that variation between the experimentally
observed values and the predicted values are minimum and it confirmed the
potential applicability of the mathematical model.
107
8.3 THE SYSTAT SOFTWARE
SYSTAT is a high value integrated desktop statistics and
graphics software package with features like Design of Experiments,
ANOVA, Multivariate Analysis (MANOVA, MANCOVA) Repeated
Measure Analysis, General Linear Models, Time series, Regression
(Linear, Non Linear and Logistic) Survival Analysis, Path Analysis and
Simulation techniques.
8.4 CREATION OF MODEL
In order to create the mathematical model, experimental results of
different time dipped in condition pistons are considered. The parameters
like speed, feed, and depth of cut are referred as independent function and
the cutting force is identified as dependent function. Regression analysis is
carried out on the obtained results. Separate mathematical model is created
for each case.
8.5 MODEL RESULTS
Using the SYSTAT, the regression model has been formulated
for all kinds of pistons (1½ minutes, 2minutes, 3 minutes, 4 minutes and 5
minutes dipped inserts). The model for each case is given separately.
108
8.5.1 Result on 1½ minutes dipped insert piston OLS Regression Dependent Variable CUTTINGFORCEN 9Multiple R 0.882Squared Multiple R 0.777Adjusted Squared Multiple R 0.644Standard Error of Estimate 9.865 Regression Coefficients B = (X'X)-1X'Y Effect CoefficientStandard ErrorStd.
CoefficientTolerance t p-value
CONSTANT 0.111 68.423 0.000 . 0.002 0.999 SPEED -0.020 0.040 -0.105 1.000 -0.4970.641 FEED 196.667 80.544 0.515 1.000 2.442 0.059 DEPTHOFCUT 270.000 80.544 0.708 1.000 3.352 0.020 Analysis of Variance Source SS df Mean Squares F-ratio p-valueRegression 1697.667 3 565.889 5.815 0.044Residual 486.556 5 97.311 WARNING Case 7 is an Outlier (Studentized Residual : -2.168) Durbin-Watson D Statistic 1.489First Order Autocorrelation0.205 Information CriteriaAIC 71.452AIC (Corrected)91.452Schwarz's BIC 72.438
Based on the given input model for 1½ minutes dipped insert is found as
CF = 0.111-0.020S+196.667F+270D Where
CF- Cutting Force; S- Speed; F- Feed; D –Depth of cut.
109
8.5.2 Result on 2 minutes dipped insert piston
OLS Regression
Dependent Variable CUTTINGFORCEN 9 Multiple R 0.941Squared Multiple R 0.885Adjusted Squared Multiple R0.816Standard Error of Estimate 10.096 Regression Coefficients B = (X'X)-1X'Y Effect CoefficientStandard ErrorStd.
CoefficientTolerance t p-value
CONSTANT 56.333 70.029 0.000 . 0.804 0.458 SPEED -0.072 0.041 -0.264 1.000 -1.7390.143 FEED 260.000 82.435 0.478 1.000 3.154 0.025 DEPTHOFCUT416.667 82.435 0.766 1.000 5.054 0.004 Analysis of Variance Source SS dfMean SquaresF-ratiop-valueRegression3926.3333 1308.778 12.840 0.009 Residual 509.667 5 101.933 WARNING Case 5 is an Outlier (Studentized Residual : -2.438) Case 9 is an Outlier (Studentized Residual : 2.093) Durbin-Watson D Statistic 2.318First Order Autocorrelation-0.311 Information CriteriaAIC 71.870AIC (Corrected)91.870Schwarz's BIC 72.856 Based on the input the model for 2 min dipped insert is found as CF = 56.333-0.072S+260F+416.667D
110
8.5.3 Result on 3 minutes dipped insert piston OLS Regression Dependent Variable CUTTINGFORCEN 9 Multiple R 0.966Squared Multiple R 0.933Adjusted Squared Multiple R0.892Standard Error of Estimate 6.998 Regression Coefficients B = (X'X)-1X'Y Effect CoefficientStandard ErrorStd.
CoefficientTolerance t p-value
CONSTANT 52.444 48.543 0.000 . 1.080 0.329 SPEED -0.070 0.029 -0.285 1.000 -2.4500.058 FEED 293.333 57.142 0.596 1.000 5.133 0.004 DEPTHOFCUT346.667 57.142 0.704 1.000 6.067 0.002 Analysis of Variance Source SS dfMean SquaresF-ratiop-valueRegression3387.3333 1129.111 23.054 0.002 Residual 244.889 5 48.978 WARNING Case 2 is an Outlier (Studentized Residual : -3.379) Durbin-Watson D Statistic 2.863First Order Autocorrelation-0.458 Information CriteriaAIC 65.273AIC (Corrected)85.273Schwarz's BIC 66.259 Based on the input the model for 3 min dipped insert is found as CF = 52.444-0.070S+293.333F+346.66D
111
8.5.4 Result on 4 minutes dipped insert piston OLS Regression Dependent Variable CUTTINGFORCEN 9 Multiple R 0.959Squared Multiple R 0.919Adjusted Squared Multiple R0.870Standard Error of Estimate 7.695 Regression Coefficients B = (X'X)-1X'Y Effect CoefficientStandard ErrorStd.
CoefficientTolerance t p-value
CONSTANT -73.889 53.373 0.000 . -1.3840.225 SPEED 0.013 0.031 0.054 1.000 0.424 0.689 FEED 170.000 62.828 0.345 1.000 2.706 0.042 DEPTHOFCUT440.000 62.828 0.893 1.000 7.003 0.001 Analysis of Variance Source SS dfMean SquaresF-ratiop-valueRegression3348.1673 1116.056 18.849 0.004 Residual 296.056 5 59.211 WARNING Case 5 is an Outlier (Studentized Residual : -2.041) Case 7 is an Outlier (Studentized Residual : 4.283) Durbin-Watson D Statistic 1.749First Order Autocorrelation0.111 Information CriteriaAIC 66.981AIC (Corrected)86.981Schwarz's BIC 67.967 Based on the input the model for 4 min dipped insert is found as
C.F = -73.889+0.013S+170F+440D
112
8.5.5 Result on 5 minutes dipped insert piston
OLS Regression Dependent Variable CUTTINGFORCEN 9 Multiple R 0.952Squared Multiple R 0.906Adjusted Squared Multiple R0.850Standard Error of Estimate 7.191 Regression Coefficients B = (X'X)-1X'Y Effect CoefficientStandard ErrorStd.
CoefficientTolerance t p-value
CONSTANT -17.778 49.879 0.000 . -0.3560.736 SPEED -0.017 0.029 -0.078 1.000 -0.5680.595 FEED 236.667 58.715 0.553 1.000 4.031 0.010 DEPTHOFCUT330.000 58.715 0.771 1.000 5.620 0.002 Analysis of Variance Source SS dfMean SquaresF-ratiop-valueRegression2490.3333 830.111 16.053 0.005 Residual 258.556 5 51.711 WARNING Case 7 is an Outlier (Studentized Residual : -3.831) Durbin-Watson D Statistic 1.999First Order Autocorrelation-0.031 Information CriteriaAIC 65.762AIC (Corrected)85.762Schwarz's BIC 66.748 Based on the input the model for 5 min dipped insert is found as
CF =-17.778-0.017S+236.667F+330D
113
8.6 COMPARISON BETWEEN EXPERIMENT AND
MATHEMATICAL MODEL
It is essential to know the applicability of the model. By
comparing the experimental result and the mathematical model value one
can understand it. Comparison is made for each case and is presented in
Figure. 8.1 to Figure. 8.5 for visible reference.
COMPARISON CHART - 90 sec
0
20
40
60
80
100
1 2 3 4 5 6 7 8 9
Experiment No
Experiment valueModel value
Figure 8.1 Comparison chart for 1½ minutes dipped insert piston
Comparison Chart - 2 min
020406080
100120
1 2 3 4 5 6 7 8 9
Experiment No
ExperimentModel
Figure 8.2 Comparison chart for 2 minutes dipped insert piston
114
Comparison chart - 3 min
0
50
100
150
1 2 3 4 5 6 7 8 9
Experiment No
ExperimentModel
Figure 8.3 Comparison chart for 3 minutes dipped insert piston
Comparison chart - 4 min
020406080
100
1 2 3 4 5 6 7 8 9
Experiment No
Experiment Model
Figure 8.4 Comparison chart for 4 minutes dipped insert piston
115
Comparison chart- 5min
020406080
100
1 2 3 4 5 6 7 8 9
Experiment No
Cut
ting
forc
e (N
) Experiment Model
Figure 8.5 Comparison chart for 5 minutes dipped insert piston
The close agreement with experiment and model values confirms
that the error associated with the developed model is minimal. Only minor
deviation is observed in Figure 8.4 for the first experimental run. This can
be attributed to experimental error. Also an experiment is carried out with
different parameters which are not in L9 matrix, and the experimental
results are verified with the mathematical model. It gives the satisfactory
result. The chart presented in Figure 8.6 reveals the applicability of the
developed model.
Comparsion chart
0
20
40
60
80
100
120
1 2 3 4 5 6 7 8 9Experim ental Run
Experiment valueModel value
Figure 8.6 Comparison between Experiment and model for a random
test
116
8.7 GENETIC ALGORITHM
8.7.1 Introduction
Genetic algorithms (GA) are computerized search procedures
based on the mechanics of natural genetics and natural selection that can be
used to obtain global and robust solutions to optimization problems. GAs
are computational optimization schemes with a nontraditional approach. It
was developed by John Holland and his colleagues at the University of
Michigan. The algorithm solves optimization problems imitating nature in
the way it has been working millions of years on the evolution of life. GA
combine the survival of the fittest among string structures, yet randomized
information exchange to form a search algorithm with some of the
innovative flair of human search. In every generation, a new set of artificial
strings are created using bits and pieces of the fittest of the world; an
occasional new part is tried for the good measure. This work concentrates
on simple GA with reproduction with crossover and mutation operators.
Though these operators look very simple at first sight, combined action is
much of GA’s power from a computer implementation point of view, they
involve only random number generation, string copying, partial string
swapping and bit conversion (Franci Cus et al 2003).
8.7.2 Genetic Algorithm Vs Traditional Methods
Genetic algorithms differ from conventional optimizations and
search procedures in several fundamental ways. These are summarized as
follows:
117
GA’s work with coding of solution set, not the solutions
themselves.
GA’s search from a population of solution, not a single
solution.
GA’s use pays of information (fitness function) of derivatives
or auxiliary knowledge.
GA’s probabilistic transition rules, not deterministic rules.
8.7.3 Genetic operators
The mechanics of simple GAs are surprisingly simple. A simple
GA that yields good results in many practical problems is composed with
these operators:
Reproduction
Cross over
Mutation
Fitness function
With the initial population, the population for the next generation is to be
generated which is the offspring of the current generation. The reproduction
operator selects the fit individual from the current population and places
them in a mating pool where as the less fit ones get fewer copies.
The worst fit individuals die of eventually. The factor (F/avg F) is
calculated for all individuals. This factor is expected count of individual in
the mating pool. It is then converted into an actual count by appropriately
rounding off, so that individuals get copies in the mating pool proportional
to their fitness. This process of reproduction confirms the Darwinian
principles of the survival of fittest.
118
In the crossover, set of crossover parameters are generated again
randomly. The first set step in the crossover is finding a match for
individuals. Once the pairs are decided it is necessary to find the crossover
sites, the substrings between the crossover sites are swapped from one
individual in the pair to the other.
The GA repeat the same process of the generation of new
population and evaluating its fitness. Proceeding with more generation,
there may not be much improvement in the population fitness bearing a few
because of the mutation operation and the best individual may not change
for subsequent population. As the generation advances, the population gets
filled, more fit individuals with only slight deviation from the fitness of the
best individual so far found and the average fitness comes very close to the
fitness of the best individual
8.7.3.1 Reproduction
Reproduction is the process in which individual strings are
copied according to their objective function values. Copying strings
according to their fitness values means the strings with a higher fitness
value have a higher probability of contributing one or more off spring in the
next generation. This operator, of course is an artificial version of natural
selection, a Darwin’s survival of the fittest among string creatures. It is
important to note that no new string is formed in the reproduction phase.
119
8.7.3.2 Cross over
After reproduction, simple single point cross over may proceed in
two steps. First, two individual strings are selected at random from the
mating pool generated by the reproduction operator. Next, a cross over site
is selected at a random along the string length and the binary digits are
swapped between the two strings following the cross over sites. For
example if two design vectors (parents), each with a string length of 1 0,
are given by
(Parent 1) x1= {01010-11011}
(Parent 2) x2= {10001-11100}
The result of the cross over, when the cross over site is 5, is given by
(Off spring 1) x 3= {01010-11100}
(Off spring 2) x 4= {10001-11011}
The new strings (off springs) obtained from cross over are placed in the
new population and the process is continued. A cross operator is mainly
responsible for the search of new strings. Above explained cross over
operator like edge recombination cross over, simulated binary cross over
etc. In edge recombination cross over, one parent gives one child as
explained below.
Parent 248395-1607
The result of cross over, when the cross over sight is 6, is given by
Child 248395-7061
120
8.7.3.3 Mutation
The mutation operator is applied to a new string with a specified
mutation. Probability mutation is the occasional random alteration of the
binary digit. Thus in a mutation 0 is changed to 1, and vice versa, at random
location.
These operators are simple and straight forward. The
reproduction operator selects good strings and cross over operators
recombines good strings together to hopefully create a better string. Even
though none of these clients are guaranteed and /or tested while creating a
string, it is expected that if bad strings are created, the reproduction
operator will eliminate them in the next generation and if good strings are
created, they will be increasingly emphasized.
8.7.3.4 Fitness function
GAs mimic the survival of the fittest principle, so naturally they
are suitable to solve maximization problems. Minimization problems are
usually transformed to maximization problems by suitable transformation.
A fitness function F(x) is derived from the objective function and used in
successive genetic operations. For maximization problems, fitness
functions can be considered the same as the objective function. For
minimization problems it is an equivalent maximization problem, chosen
such that the optimum point remains unchanged. A number of such
transformations are possible. The fitness function often used as F(x) =
1/(1+f(x)). This transformation doesn’t alter the location of the minimum
but converts the minimization problem into an equivalent maximization
problem.
121
8.8 PSEUDO CODE FOR GENETIC ALGORITHM
Step 1: Choose a Coding Scheme to represent the decision variables.
Choose appropriate Reproduction, Crossover and Mutation
Operators
Choose the Population Size, Crossover Probability,
Mutation Probability and the Termination Criterion
Step 2: Generate the Initial Population and evaluate the fitness
Values
Do while Termination Criterion is not met
Step 3: Perform Reproduction to create intermediate mating
Pool
Step 4: Perform Crossover to create off springs
Step 5: Perform Mutation on every string of the intermediate
Population
Step 6: Evaluate the strings in the new population
End do
Decode the best string in the final population to get the solution.
122
8.9 STEPS IN GENETIC ALGORITHM
The step by step procedure for implementing GA optimization
process is shown in Figure 8.7.
Figure 8.7 GA Flow Chart
Initialize parameters
Generate initial population
Evaluate fitness function for all population
Evaluate population statistics
Generate parents
Perform crossover
Generate offspring with mutation
Is optimal solution obtained
Terminate
Update population
123
8.10 USAGE OF GA TOOLBOX IN MATLAB
The mathematical model created using SYSTAT software to
relate cutting force and process parameters was encoded in MATLAB
software in M-FILE format. Later, using GA Toolbox available in the start
menu the input to the fitness function is given as @ file name. Then number
of variables is given as 3 and other GA functionalities were chosen
accordingly to obtain best fitness value in random process.
Population size 20
Scaling function rank
Selection function roulette
Reproduction
Elite count 2
Cross over function 0.8
Mutation
Function uniform
Rate 0.1
Crossover function two point
The GA program was then run for 100 generations and after the
termination of the process, the final point is displayed at the bottom of the
window which is the optimized parameters for the obtained best value.
124
8.11 GENETIC ALGORITHM RESULTS
8.11.1 GA result for 1½ minutes dipped insert piston
The equation formulated with the SYSTAT is named as case 1
and it is given as input to GA. The Figure 8.8 gives the result of 1½
minutes dipped in condition insert piston.
Figure 8.8 GA Result for 1½ minutes piston
125
8.11.2 GA result for 2 minutes dipped insert piston
The equation formulated with the SYSTAT is named as case 2
and it is given as input to GA. The Figure 8.9 gives the result of 2 min
dipped in condition insert piston.
Figure 8.9 GA Result for 2 minutes dipped insert piston
126
8.11.3 GA result for 3 minutes dipped insert piston
The equation formulated with the SYSTAT is named as case 3
and it is given as input to GA. The Figure 8.10 gives the result of 3 min
dipped in condition insert piston.
Figure 8.10 GA Result for 3 minutes dipped insert piston
127
8.11.4 GA result for 4 minutes dipped insert piston
The equation formulated with the SYSTAT is named as case 4
and it is given as input to GA. The Figure 8.11 gives the result of 4 min
dipped in condition insert piston.
Figure 8.11 GA Result for 4 minutes dipped insert piston
128
8.11.5 GA result for 5 minutes dipped insert piston
The equation formulated with the SYSTAT is named as case 5
and it is given as input to GA. The Figure 8.12 gives the result of 5 min
dipped in condition insert piston.
Figure 8.12 GA Result for 5 minutes dipped insert piston
129
8.12 COMPARISON BETWEEN TAGUCHI RESULT AND GA
OUTPUT
A comparison table is made to compare the GA output with
Taguchi robust design technique and is presented in the Table 8.1. From the
results, it can be understood that GA and Taguchi outputs are comparable
and they agree with each other.
Table 8.1 Comparison between Taguchi and GA
Condition Parameters Taguchi GA output
1½ minutes
dipped
Speed (m/min) 512 506
Feed (mm/rev) 0.15 0.1517
Depth of cut (mm) 0.15 0.1532
2 minutes
dipped
Speed (m/min) 512 509
Feed (mm/rev) 0.20 0.1757
Depth of cut (mm) 0.15 0.1581
3 minutes
dipped
Speed(m/min) 512 508
Feed (mm/rev) 0.15 0.1509
Depth of cut(mm) 0.15 0.1504
4 minutes
dipped
Speed (m/min) 512 511
Feed (mm/rev) 0.15 0.1530
Depth of cut (mm) 0.15 0.1544
5 minutes
dipped
Speed (m/min) 512 512
Feed (mm/rev) 0.15 0.1578
Depth of cut (mm) 0.15 0.1506
130
8.13 SUMMARY
Mathematical model is developed and the output of mathematical
model is compared with the experimental values, suitability of the model
for predicting the cutting force is also assessed.
Genetic Algorithm is developed using MATLAB. The outputs of
GA (the optimized value) are compared with the output of Taguchi method.
The close agreement with the predicted and experimental values
of cutting force confirms the potential applicability of developed model.
The matching of GA and Taguchi’s design approach validates out method
of approach.