Page 180 - Data Science Algorithms in a Week
P. 180
164 Djordje Cica and Davorin Kramar
Table 4. General framework of PSO for ANN training
(i) Determine an objective function and algorithm parameters. Initialize the position and
velocities of a group of particles randomly.
(ii) Decode each particle in the current population into a set of connection weights and
construct a corresponding ANN.
(iii) Simulate ANN using current population and evaluate the ANN by computing its mean
square error between actual and target outputs.
(iv) Calculate the fitness value of each initialized particle in the population.
(v) Select and store best particle of the current particles.
(vi) Update the positions and velocities of all the particles and generate a group of new
particles.
(vii) Calculate the fitness value of each new particle and replace the worst particle by the
stored best particle. If current fitness is less than local best fitness then set current fitness
as local best fitness and if current fitness is less than global best fitness then set current
fitness as global best fitness.
(viii) Repeat steps (iv) to (vii) until the solution converge.
(ix) Extract optimized weights.
Similar to the previous one, a careful parametric study has been carried out to
determine the set of optimal PSO parameters, where the value of one parameter is varied
at a time, while other parameters have fixed values. The optimization process takes place
with the values of cognitive acceleration, social acceleration, maximum number of
generations, and population size. The fitness value of a PSO solution is estimated based
on the mean absolute percentage error of each training data sample. The error of each set
of training data is the deviation of the result (cutting force components) of the PSO-based
ANN from that of the desired one. For main cutting force the optimal values of cognitive
acceleration, social acceleration, number of generations, and population size were 0.8,
1.6, 350, and 250, respectively. For feed force optimal values of these parameters were
0.4, 1.4, 270, and 250. Finally, for passive force the optimal values of cognitive
acceleration, social acceleration, number of generations, and population size were 0.5,
1.0, 340, and 240, respectively. The results of the parametric study for main cutting force
are shown in Figure 5.
RESULTS AND DISCUSSION
In this section, ANN trained by backpropagation algorithm and bio-inspired ANN
were applied for prediction of cutting force components in turning of Inconel 718 under
HPC conditions and a comparative analysis is performed. After a number of trails it was
found that the best network architecture consists five input neurons in input layer
(corresponding to five machining parameters), one hidden layer with then neurons and
one output neuron in output layer (corresponding to cutting force component). The BP-
based, GA-based and PSO-based ANN models were validated by using nine sets of