APEM journal Advances in Production Engineering & Management Volume 11 | Number 4 | December 2016 | pp 366-376 http://dx.doi.Org/10.14743/apem2016.4.234 ISSN 1854-6250 Journal home: apem-journal.org Original scientific paper Multi-objective optimization of the turning process using a Gravitational Search Algorithm (GSA) and NSGA-II approach Klancnik, S.a*, Hrelja, M.ab, Balic, J.a, Brezocnik, M.a aProduction Engineering Institute, Faculty of Mechanical Engineering, University of Maribor, Maribor, Slovenia bAVL, Piezocryst: Advanced Sensorics GmbH, Graz, Austria A B S T R A C T A R T I C L E I N F O In this paper, we proposed a Gravitational Search Algorithm (GSA) and an NSGA-II approach for multi-objective optimization of the CNC turning process. The GSA is a swarm intelligence method exploiting the Newtonian laws on elementary mass objects interaction in the search space. The NSGA-II is an evolutionary algorithm based on non-dominated sorting. On the basis of varying values of the three independent input machining parameters (i.e., cutting speed, depth of cut, and feed rate), the values of the three dependent output variables were measured (i.e., surface roughness, cutting forces, and tool life). The obtained data set was divided further into two subsets, for the training data and the testing data. In the first step of the proposed approach, the GSA and the training data set were applied to modelling a suitable model for each output variable. Then the accuracies of the models were checked by the testing data set. In the second step, the obtained models were used as the objective functions for a multi-objective optimization of the turning process by the NSGA-II. The optimization constraints relating to intervals of dependent and independent variables were set on the theoretical calculations and confirmed with experimental measurements. The goal of the multi-objective optimization was to achieve optimal surface roughness, cutting forces, and increasing of the tool life, which reduces production costs. The research has shown that the proposed integrated GSA and NSGA-II approach can be implemented successfully, not only for modelling and optimization of the CNC turning process, but also for many other manufacturing processes. © 2016 PEI. University of Maribor. All rights reserved. Keywords: Turning Multi-objective optimization Evolutionary algorithms Particle swarm Gravitational Search Algorithm NSGA-II algorithm *Corresponding author: simon.klancnik@um.si (Klancnik, S.) Article history: Received 8 July 2016 Revised 19 November 2016 Accepted 21 November 2016 1. Introduction Advances in existing production are measured in terms of the flexibility, autonomous functioning and extent of automation. Modernisation of production covers the modernisation and integration of the latest technologies into production systems so that the companies remain competitive. Integration of advanced technologies results in shorter manufacturing times, higher capacities and reduction of production costs. Because of the dynamics and increase in the amount of input parameters or data, the optimization of systems has become more difficult than previously. Because of high quantities of data, the optimal functioning of production can often be reached no more by conventional methods; therefore, more advanced methods are applied to acquire new and better solutions in the optimization of production systems. The research is aimed at conceiving an advanced system for modelling of CNC machining operations and subsequent optimization of machining parameters by the use of the developed machining models. In the past, a lot of researches have been executed in the field of optimization 366 Multi-objective optimization of the turning process using a Gravitational Search Algorithm (GSA) and NSGA-II approach and modelling of the CNC machining operations [1-3]. Important researches in this field have been carried out for optimization of milling [4], turning [5], laser cutting and water jet cutting [6]. Successful optimization relies on the use of the training and testing databases [7] comprised of the values measured in experiments [8, 9]. The training and testing databases allow the training of algorithms and testing of correctness of the models developed. The development of modern methods of optimizing and modelling of complex production systems requires know-how from the area of intelligent systems, which presupposes incorporation of artificial intelligence into solving complex engineering problems. One of the most widespread nondeterministic approaches for solving complex engineering problems is evolutionary computation, especially genetic algorithms and genetic programming [10]. There are many works where genetic algorithms, as well as other nondeterministic methods (e.g., Artificial Neural Networks - ANN) were implemented for solving various problems in cutting systems, including surface roughness optimization and optimal tool selection (see for example [1, 14-21]). Another artificial intelligence method used frequently is swarm intelligence. Swarm intelligence is only a covering term and is divided into many sub-types [22]. Often, the authors refer to intelligence adopted from biological aspects, e.g. bee swarms, bird flights or ant colonies [23]. A relative novelty in the swarm intelligence methods is the Gravitational Search Algorithm (GSA) working on the principle of the interaction of masses [24]. A review of the literature reveals that, so far, the GSA has not been reported frequently for optimization of manufacturing technologies. This paper proposed an effective approach for modelling and multi-objective optimization of CNC machining processes by the GSA and NSGA-II. Data gained on the basis of experimental measurements were used for training and testing of the model developed by the GSA. After modelling, the multi-objective optimization of the cutting parameters was done on the basis of CNC cutting models developed by the GSA. The NSGA-II algorithm was implemented for the multi-objective optimization. The system is generally convenient for different CNC machine tools and can be adapted to several different materials" removing processes, e.g. milling and laser cutting. However, our research was restricted to turning as far as training of the system and testing of its effectiveness are concerned. The article is composed as follows: Section 2 presents detailed descriptions of the experimental setup, Gravitational Search Algorithm, and elitist Non-dominated Sorting Genetic Algorithm^ (NSGA-II) background. The results and discussion are presented in Section 3. The article ends with a short Conclusion. 2. Materials and methods 2.1 Experimental setup and results Models of the turning process were created by means of experimental measurements of the output parameters of machining operations depending on the input parameters, in accordance with the work of Jurkovic [25]. The experiment was carried out during a fine turning operation on the CNC lathe Georg Fischer NDM-16. Samples from the material C45E were used for execution of the experiment. This is a hot rolled structural steel. The workpiece diameter for machining was 010 mm x 380 mm. The tool used for the test samples was the cutting insert Sandvik Coromant DNMG 150608-PM4025. The following equipment was used for proper measuring of tool wear, machining forces, and surface roughness: • Measuring of cutting forces: Force meter Kistler 9257A. Measuring range Fx.y.z = 5 kN allowing capturing, displaying and processing of resulting cutting forces with the aid of the programme package Labview TM. • Surface roughness: Roughness meter Ra produced by Mitutoyo SJ-201P. • Tool wear: Microscope Carl Zeiss with magnification 30x and 0.0001 mm resolution. Advances in Production Engineering & Management 11(4) 2016 367 Klancnik, Hrelja, Balic, Brezocnik The input data for execution of the experiment were as follows: • Cutting speed Vc (m/min) • Feed rate/(mm/rew) and • Cut depth ap (mm). The output data were gained from the input data, as the latter have direct impact on their values. The output data and/or the experiment results were: • Main cutting force Fc (N) • Surface roughness Ra (^m) and • Tool resistance time T (min). The experimental results obtained during the fine turning are presented in Table 1. Table 1 The results of the experiment Input data Output data Trial No. Vc (m/min) /(mm/rev) ap (mm) Fc (N) Ra (|m) T (min) 1 400 0.100 0.40 128.893 0.77 32.66 2 500 0.100 0.40 130.755 0.80 11.15 3 400 0.200 0.40 201.899 1.70 25.89 4 500 0.200 0.40 202.200 1.67 7.450 5 400 0.100 1.20 337.859 1.11 28.43 6 500 0.100 1.20 330.745 1.19 9.230 Tr 7 400 0.200 1.20 492.945 2.14 20.74 ai ni 8 500 0.200 1.20 550.848 1.77 5.610 n crq d 9 450 0.150 0.80 299.005 1.26 14.44 t 10 450 0.150 0.80 301.647 1.30 14.38 £D 11 450 0.150 0.80 304.772 1.29 14.39 12 450 0.150 0.80 299.519 1.28 14.48 13 450 0.150 0.80 299.875 1.27 14.43 14 450 0.150 0.80 303.832 1.28 14.46 15 366 0.150 0.80 313.225 1.37 34.46 16 534 0.150 0.80 307.622 1.31 6.120 T CD i n 17 450 0.066 0.80 174.024 1.21 20.25 18 450 0.234 0.80 406.719 2.32 10.93 crq d 19 450 0.150 0.13 61.2230 1.17 12.18 £D a 20 450 0.150 1.47 497.895 1.13 10.05 2.2 Gravitational Search Algorithm background In the Gravitational Search Algorithm, a set of objects with relevant atomic masses is concerned, the objects representing the search mechanism [24]. Those objects find the proper solution during the searching process. The search mechanism works on the principle of Newtonian gravitation laws and laws of motion and, on the basis of gravitational attraction, it searches for the optimum solution in the multitude of potential solutions, where each of the solutions has a specific mass. All particles within the population are attracted by mutual gravitational forces according to Eq. 1 and 2, which causes global motion of objects in the system, heavier objects attracting lighter objects to a larger extent. The objects communicate mutually by means of the gravitational force. Larger masses result faster in a better solution, but they move more slowly than lower masses with worse solutions. In the GSA, each particle has four basic properties: Location, inertial mass, active gravitational mass and passive gravitational mass. The location of mass coincides with the location of the result of the problem. With the aid of the active, passive and inertia masses, it is also possible to write the mathematical function. In that way, the algorithm is guided through the space of solutions by means of mutual effects of gravitational and inertia masses. After expiration of the search time, the solutions are expected to start tending to the 368 Advances in Production Engineering & Management 11(4) 2016 Multi-objective optimization of the turning process using a Gravitational Search Algorithm (GSA) and NSGA-II approach largest mass in the system, that mass increasing during the search process and representing the optimum solution in the search space. The search space represented by the algorithm is not influenced by the external masses so that only two physical laws, i.e. the gravitation law and the law of motion act on it. In a system of two or more bodies, it is the active gravitational mass Ma that affects most the remaining bodies inside the system with its gravitational field, which means that it has the greatest mass. The passive gravitational mass MP represents the gravitational field of the body with less mass and affects the gravitational field of the more massive object passively only and has a lesser mass. The system of several bodies must be calculated in pairs, two by two bodies simultaneously. The inertia gravitational mass Mi is the mass with which the object in the system resists the position change, if acted upon by a specific mass. The body having larger inertia mass changes the direction of motion slower than the body with smaller mass, as the force must act on the body longer in order to direct the body into a new direction. If the Newtonian equations are written by using newly named masses in combination with two bodies, the result is as follows: Fn = G-—2--(1) where: F12 - Attraction with which the second body acts on the first body G - Gravitational constant MA2 - Active mass of second object MP1 - Passive mass of first object R - Distance between the two objects Consequently, the gravitational force F12 acting on the first object with the mass of the second object is proportional to the product of the active part of gravitational mass in the system with the passive part of gravitational mass, and inversely proportional to the distance between the two objects. The acceleration with which the body moves and/or the effect of the second on the first body can be written with the equation: Fl2 r^ al = — (2) mn a1 - Acceleration with which the body moves; effect of the second on the first body F12 - Attraction with which the second body acts on the first body mI1 - Inertia mass of the first body Transformation of the system by means of a random component ensures random motion of mass bodies. N F?(t)= ^ randb^F2b(t) (3) b = l.b*i where: Fa(t) - Force with stochastic characteristic in given time t randb - Random number at interval [0,1] ensures randomization F£b(t) - Force which is caused by the b-th mass particle and acts on the a-th mass particle in al time t As the stochastic mode of operation of gravitational force has been given, the same must be effected also on the gravitational acceleration and, thus, Eq. 2 is transformed to an n-dimensional equation in specific time t: TO) aS(t)=mp> (4) where: Advances in Production Engineering & Management 11(4) 2016 369 Klancnik, Hrelja, Balic, Brezocnik aJJ(t) - Gravitational acceleration of body a in the n-dimension space ^vTCO - Force with stochastic characteristic in specific time t Mia(t) - Inertia mass of body a in specific time t On the basis of the updated equation for the force with stochastic characteristic in specific time t, and on the basis of the gravitational acceleration of body a in the d-dimension space, the new velocity of particle or body in the space with n-dimensions - Eq. 5, can be expressed; the same also applies to the newly calculated position of the body in the solution space - Eq. 6: v2(t + 1) = randa^v2(t) + aW) (5) z£(t + 1)=z£(t) + i£(t + 1) (6) Terms in Eq. 5 and 6: + 1) - New velocity of body a in newly calculated time t + 1 x%(t + 1) - New position of body a in newly calculated time t + 1 randa - Random number at interval [0,1] ensures randomization va (0 - Velocity of motion of body a in specific time t (t) - Acceleration of body a in specific time t xa (0 - Position of body a in specific time t n - Index n stands for the n-dimension space with solutions Gravitational and inertia masses of bodies in the system can also be written as a fitness function to define the success of the algorithm in searching for the solution. It must be borne in mind that larger masses are better indicators of solutions and are more effective; however, as those bodies have larger mass, they move slower in the space with solutions. That phenomenon is compensated for by a random number of lighter bodies representing worse solutions but, in combination with heavier bodies, they take part in converging to proper solutions much faster. If it is assumed that gravitational and inertia masses are identical, they can be written in the form of an equation. Updated equations of the mass system are: Man = Mvn =Min = Mn.n = 1,2.....N (7) = fita(t) -worstjt) ma{t) best(t) —worst(t) (8) (9) where fita(t) stands for the fitness value of body a in specific time t, while best(t) and worst(t) are values representing the best and worst current values of results and can be written even in more detail, particularly, when searching for minimums and maximums. For minimum: best(t) = minje{li2.....N)fitb(t) worst(t) = maXje(li2i_iN)fitb(t') ( ) For maximum: bestit) =maxJe(i.....N)fitb(t) worst(t) = min]e(1,,Nyfitb(t) ( ) To avoid efficiently the local minimums at the beginning of the algorithm start-up the research principle must be introduced, whereas, after n-iterations, the research limit is dimmed by means of elimination and the system of algorithm functioning passes into the search mode. That is reached by gradual elimination and each subsequent algorithm iteration assures better convergence of solutions. Each subsequent potential optimal solution can be designated N-best, where each iteration changes the action of the virtual gravitational force with which it affects all the remaining bodies in the space of solutions. Consequently, N-best is the time function having 370 Advances in Production Engineering & Management 11(4) 2016 Multi-objective optimization of the turning process using a Gravitational Search Algorithm (GSA) and NSGA-II approach the value No at the beginning of time t. In that way, at the beginning of the algorithm, all elements act with gravitational force on all remaining bodies, while the force decreases linearly with the reduction of the number of objects in the system and/or convergence of solutions to one point, which can also be described by means of gravitational collision of two bodies. The algorithm finalises the optimization, when only one body is still available with the greatest possible mass with which it acted on the remaining bodies and attracted them gravitationally. In that way, the Eq. 3 can be transformed and the result is: TO) = ^ randbF2b(t) (12) bEN-best.b^a Fa(.t) - Force with stochastic characteristic in specific time t randb - Random number at interval [0,1], it assures randomization Fab (0 - Force which is caused by the b-th mass particle and acts on the a-th mass particle in time t N-best - Set of first bodies with largest mass and highest fitness value The pseudocode of the GSA algorithm is presented in Fig. 1. 1: Start GSA 2: Set-up search space 3: For each particle 4: Initialize mass particle 5: Start regression analysis module/with measured experimental data 6: END 7: Do 8: For each particle/import measured experimental data 9: Calculate capacity/fitness function of particle 10: Capacity of particle > best capacity of particle (best (t)) ^ new best 11: Evaluate worst values as worst (t) 12: END 13: For each particle 14: Calculate velocity, masses and accelerations of mass particle 15: Update particle position and velocity 16: END 17: While ^ number N of iterations is reached 18: END GSA Fig. 1 Pseudocode of the GSA algorithm 2.3 NSGA-II algorithm background The NSGA-II (elitist Non-dominated Sorting Genetic Algorithm) is a genetic algorithm designed for multi-objective optimization [26]. The algorithm uses the crowding distance metric and non-dominated sorting as its main features. Fig. 2 presents the algorithm's pseudocode. Roughly speaking, an algorithm consists of initialization, selection and re-combination. Selection and re-combination are the main algorithm steps (see Fig. 2). In the first step, the old population of parents and descendants is combined into a joint population of size 2n. In the next step, the subjects from that combined population Rt-1 are sorted front by front using non-dominated sorting. Subjects not dominated by any other subject go into the first front. The first i fronts still going whole into the new parent population Pt are written into that population. The first next front (front i+1) not going whole into the newly created population is sorted by using the crowding metric. The least crowded subjects from front i+1 are added to the new population Pt. The solutions have the largest range if the extreme subjects in the front are evaluated as best when sorting with the crowding metric. Evaluation of the remaining subjects in the front is performed by calculating the distance to its nearest neighbours. Advances in Production Engineering & Management 11(4) 2016 371 Klancnik, Hrelja, Balic, Brezocnik 1: Randomly generate and evaluate initial population of parents Po. 2: Prepare empty initial population of descendants Qo. 3: Setup t = 0. 4: Until stopping criterion has been fulfilled, repeat: 5: Setup t = t + 1. 6: Unite two old populations of parents and descendants: Rt-i = Pt-i % Qt i. 7: Perform non-dominated sorting on Rt i and determine fronts Fi, i = 1,2,... 8: Prepare new empty population of parents Pt. 9: Put into population Pt the first i front fronts still fitting whole into it. 10: With the use of crowding distance metric sort front F+i no more fitting whole into population Pt 11: Add the least crowded subjects from Fi+1 to population Pt 12: Generate population of descendants Qt from parent population Pt by using tournament selection, crossover and mutations. 13:_Evaluate subjects from population of descendants Qt._ Fig. 2 Pseudocode of the NSGA-II algorithm When optimising k criteria, k subjects are first sorted according to growing evaluating values f for each criterion j = 1, 2,., k. In the next step for each subject I, the distance between its two neighbours u and v is calculated according to the following equation: dj(i)=--(13) 7V y j?max _j?min where fjnax and f™111 are the maximum and the minimum values of the j-th criterion, respectively. The following must apply: fj(u) < fj(i) < fj(y) (14) As already mentioned, the highest possible distance is assigned to the two extreme subjects (with respect to the j criterion). For all remaining subjects, the crowding metric for subject i is equal to the sum of those distances according to all criteria: k c(i) = Yjdj(i) (15) 7 = 1 The parent population Pt is obtained in the manner described above. In the next steps, the descendant population is generated from that population by using tournament selection, crossover and mutation. Out of two random subjects, the subject classified into the front with lower consecutive value, wins in the selection. If two subjects taking part in selection come from an equal front, then the subject better evaluated by the crowding metric is chosen. The descendant population is designated Qt. Each subject from the descendant population is evaluated in the last step of the NSGA-II algorithm. That estimate is used in the next generation for non-dominated sorting of subjects. The algorithm is repeated until the maximum number of generations has been reached or until another stopping criterion has been reached. 3. Results and discussion 3.1 Modelling of turning process by the Gravitational Search Algorithm For processing experimental data the GSA method was used for the purposes of turning system modelling. For the modelling process the following control parameters of the GSA optimization algorithm were used: • Number of mass bodies: 210 • Number of iterations: 1000 • Size of mass body (dimension): 10 • Power of Euclidean distance between mass bodies: 1 372 Advances in Production Engineering & Management 11(4) 2016 Multi-objective optimization of the turning process using a Gravitational Search Algorithm (GSA) and NSGA-II approach • Power factor a: 20 • Gravitational constant Go: 100 In particular, the two random factors a and Go must be pointed out. Both of them are interrelated and form the refreshment of iteration within the scope of the gravitational constant, where the Go value is the initial value of the gravitational constant and is changed exponentially on the basis of factor a which, in combination with the ratio of consecutive iteration and total number of iterations, affects the contingency of gravitational constant values additionally during each iteration. The mass particle size and/or the properties of solutions written in the mass particle are represented with a dimension which also defines the number of coefficients in the polynomial representing the model of the individual machining operation. A prerequisite for successful execution of modelling was correct selection of the polynomial optimized by means of GSA. Eq. 16 shows the form of a ten-coefficient polynomial which proved to be a good choice for prediction of output variables. /(x1,x2,x3) = + k2 •x1 + /c3 • x2 ■ x3 •x-l • x2 + k6 ■ -x3 (16) + kj ■ x2 ^X3 + ■Xi ■Xi + ■ x2 ■ X2 + ^10 ■ ■ where x1 is cutting speed Vc , x2 is feed rate f and x3 is depth of cut ap. The polynomial represents the core of the system round which the optimization process is designed. Input and output experimental values are inserted into the polynomial, while the optimization process optimises the coefficients in such a manner that the predictions given by the polynomial model are as near the experimental values as possible. Out of all the experimental measurements performed, fifteen measurements were chosen at random for the process of optimising of the polynomial coefficients, while the remaining 5 measurements were used for result verification. The results of optimization are polynomial models for the calculation of cutting force, surface roughness and tool wear (Eq. 17-19). Fc = 523.66 - 1.89 ■ x1 - 813.18 ■ x2 + 48.88 -x3 + 3.05- x1 ■x2 + 0.29 ■x1■x3 + 1439.13 ■ x2 ■x-j + 0.0014 ■ x1 ■x1 - 1257.73 ■ x2 ■X;, (17) - 43.70 ■x, l3 Ra = 3.74 - 0.01 • x1 - 4.25-X2 + 1.53^X3 -0.01 x1 ^x2 - 0.001 • x1 •Xs - 1.03 • x2 •Xs + 0.00002 • x1 •x1 + 68.81 -0.31-x3 T = 294.77 - 0.95 • x1 - 242.17 • x2 - 4.60-x3 + 0.24^ x1 ^x2 + 0.02^ -x3 - 9.20 • x2 -x3 + 0.0007 • x1 •x1 + 287.75 • x2 -x2 -5.37^x3 •Xs (18) (19) Testing of the developed models was recorded as a comparison of experimental values, predictions and percent deviation; experimental value ^ prediction ^ percent deviation: • Principal cutting force (Eq. 17) Lowest deviation with measured value: 550.848 N ^557.877 N ^1.28 % Highest deviation with measured value: 174.024 N ^189.579 N ^8.94 % Average deviation of all twenty measurements with ten predictions: 3.57 % • Surface roughness (Eq. 18) Lowest deviation with measured value: 2.32 [im ^2.31 [im ^0.43 % Highest deviation with measured value: 1.31 [im ^1.48 [im ^13.30 % Average deviation of all twenty measurements with ten predictions: 4.02 % • Tool life (Eq. 19) Lowest deviation with measured value: 10.93 min ^ 10.77 [im ^1.49 % Highest deviation with measured value: 28.43 min ^ 26.45 min ^ 6.97 % Average deviation of all twenty measurements with ten predictions: 4.50 % In this case, the deviation was within the acceptable ten percent. In any case, the lowest possible deviations are desirable, but the size of deviations depends primarily on the number of Advances in Production Engineering & Management 11(4) 2016 373 Klancnik, Hrelja, Balic, Brezocnik measurements. The experiment assured only 20 results of finishing machining, therefore, the final average of results can be assumed to be acceptable. 3.2 Multi-objective optimization by the NSGA-II algorithm On the basis of models created by means of the GSA algorithm and outlined in the previous subsection, in this paragraph, a set of optimal solutions for the chosen machining operation will be searched for. In our case, the resulting models for force, roughness and tool resistance represent three objective (criteria) functions having to satisfy also the limitations stated below. In this research, the aim of multi-objective optimization by the NSGA-II method was to determine such a combination of independent input variables (i.e. cutting force, feed rate and cut depth) at chosen intervals, that optimal values of criteria functions will be reached and the limitations prescribed satisfied. On the basis of theoretical calculations of limitations, and on the basis of experimental data, the optimization limitations of cutting force Fc, roughness Ra and tool resistance T were determined: • Fc < 450.0 N • 1.0 < Ra <1.6 |im • 15.0