ELEKTROTEHNIŠKI VESTNIK 81(3): 143-147, 2014 ORIGINAL SCIENTIFIC PAPER Using of genetic programming in engineering Matej Babič 1 , Peter Kokol 2 , Igor Belič 3 , Peter Panjan 4 , Miha Kovačič 5 , Jože Balič 6 1 Ph.D. Researcher, Slovenia, E-Mail: babicster@gmail.com 2 University of Maribor, Faculty of Electrical Engineering and Computer Science, Slovenia, E-Mail: kokol@uni-mb.si 3 Institute of Metals and Technology, Slovenia, E-Mail:Igor.belič@imt.si 4 Institute Jozef Stefan, Slovenia, E-Mail: Peter.Panjan@ijs.si 5 Štore-Steel d.o.o., Slovenia, Laboratory for Multiphase Processes, University of Nova Gorica, Slovenia, E-Mail: Miha.kovačič@ store-steel.si 6 University of Maribor, Faculty of Mechanical Engineering, Slovenia, E-Mail: joze.balic@um.si Abstract. Intelligent systems are process coupled with robotics in industrial usually settings, though they may be used as diagnostic systems connected only to passive sensors. In this paper we use a new method which combines an intelligent genetic algorithm and multiple regression to predict the hardness of hardened specimens. The hardness of a material is an important mechanical property affecting mechanical properties of materials. The Microstructures of the hardened specimens are very complex and cannot be described them with the classical Euclidian geometry. Thus, we use a new method, i.e. fractal geometry. By using the method intelligent-system, genetic programming and multiple regression, improved production the process laser-hardening increases because of the decreased time of the process and, the improved increased topographical property of the used materials. The genetic-programming modelling results show a good agreement with teh measured hardness of the hardened specimens. Keywords: genetic programming, engineering, complex geometry structure, Uporaba genetskega programiranja v inženirstvu Inteligentni sistemi naj bi se po navadi povezali skupaj z robotiko v nastavitvah industrijskih procesov, čeprav so lahko sistemi za diagnostiko povezani samo za pasivne senzorje. V tem članku bomo uporabili metodo, ki združuje inteligentne genetske algoritme in multiplo regresijo za napoved trdote kaljenih vzorcev. Trdota materiala je pomembna mehanska lastnost, ki vpliva na mehanske lastnosti materialov. Mikrostrukture kaljenih vzorcev so zelo kompleksne in jih ne moremo opisati s klasično evklidsko geometrijo. Zato smo uporabili novo metodo, fraktalno geometrijo. Z metodo inteligentnega sistema, genetskim programiranjem in multiplo regresijo smo povečali proizvodnjo pri laserskem kaljenju, saj smo skrajšali čas procesa in povečali topografsko lastnost materiala. Rezultati modeliranja genetskega programiranja se dobro ujemajo z izmerjenimi vrednostmi trdote kaljenih vzorcev. 1 INTRODUCTION Intelligent systems need to be adaptive to solve problems as creatively as possible with a minimal human input. They generally follow a sequence of events in diagnosing and addressing a potential problem. First, the system identifies and defines the problem. Intelligent-system engineering (ISE) is a blanket term used to refer to a variety of Artificial Intelligence (AI) approaches, including neural networks, evolutionary algorithms, model-based prediction and control, case-based diagnostic systems, conventional control theory, and symbolic AI. The term intelligent- system engineering is most frequently used in the context of AI applied to specific industrial challenges such as optimizing a process sequence in a sugar factory. In this paper we propose a method which combines an intelligent genetic algorithm and multiple regression to predict the hardness of hardened specimens. Many objects observed in nature are typically complex, irregular in shape and thus cannot be described completely by the Euclidean geometry. The Fractal geometry [1] is becoming increasingly popular in material science to describe complex irregular objects. The Fractal structure was found in robot laser hardening [2]. The key of the fractal geometry is the fractal dimension [3-7] which describes, the complexity Received 31 January 2014 Accepted 27 May 2014 144 BABIČ, KOKOL, BELIČ, PANJAN, KOVAČIČ, BALIČ of the geometrical microstructure. We calculated it for the microstructure of the robot laser specimens [8, 9]. Different tool steels are widely used in industrial applications based on good performance, wide range of mechanical properties, machinability, wear resistance, and how cost cheapness. By laser remelting the surface of the materials, we can significantly improve their wear properties, better than with the inductive hardening. Robot laser surface [10] remelting is one of the most promising techniques for surface modification of the microstructure of a material to improve its wear and corrosion resistance. The Laser hardening [11] is a metal surface treatment process complementary to the conventional flame and induction hardening processes. A high-power laser beam is used to rapidly and selectively heat a metal surface to produce the hardened case depths of up to 1.5 mm with a hardness value of up to 65 HRc. The aim of the paper is to outline the possibilities of applying genetic programming and multyple regression to predict the hardness after, a robot laser heat treatment and to assess, their perspective use. 2 MATERIAL PREPARATION First, we hardened the tool steel with a robot laser cell. We changed two parameters, i. e. speed v ∈ [2, 5] mm/s in steps of 1 mm/s, and temperature T ∈ [1000, 1400] °C. After hardening, we polished and etched all specimens. A detailed characterization of their microstructure before and after surface modifications was conducted using a field emission-scanning electron microscope (SEM), JEOL JSM-7600F. The SEM pictures (Fig. 1) were converted into binary images from which we calculated the fractal dimensions. They were determined using the Hurst exponent H estimation method. Figure 1. Fractal structure of a robot-laser-hardened specimen 3 METHOD To analyse the results, we used an intelligent system method, namely genetic programming and multiple regression. Genetic Programming (GP) is a method used to evolve computer programs. GP is inspired by the biological evolution. It is a machine-learning technique used to optimise a solution based on a fitness score. Solutions are represented by chromosomes encapsulating parameters, and these chromosomes change with iterations to get closer to a desired representation. GP has many applications; arm, traffic optimization problem and its solving [12], etc. The hardness prediction is based on the available function genes (i.e., basic arithmetical functions) and terminal genes (i.e., independent input parameters, and random floating-point constants). In the presented case, the models consist of the following function genes: addition (+), subtraction (-), multiplication (*) and division (/); and the following terminal genes: air temperature [°C] (X1), speed of hardening [m/s] (X2), fractal dimension (X2), and basic hardness (X4). Fig. 2 show one of the randomly generated mathematical models. Figure 2. GP Model The following evolutionary parameters were selected to process the simulated evolutions: 500 for the size of the population of organisms, 100 for the maximum number of generations, 0.4 for the reproduction probability, 0.6 for the crossover probability, 6 for the maximum permissible depth in the creation of the population, 10 for the maximum permissible depth after the operation of crossover of two organisms, and 2 for the smallest permissible depth of organisms in generating new organisms. Genetic operations of reproduction and crossover were used. To select organisms the tournament method with the tournament size of 7 was used. The Multiple linear regression attempts to model (1) the relationship between two or more explanatory variables and a response variable by fitting a linear USING OF GENETIC PROGRAMMING IN ENGINEERING 145 equation to the observed data. Every value of the independent variable x is associated with the value of the dependent variable y. Formally, the model for the multiple linear regression the given n observations is y i =  0 +  1 x i1 +  2 x i2 + ...  p x ip +  i for i = 1,2, ... n. (1) In the least-square model, the best-fitting line (Figure 2) for the observed data is calculated by minimizing the sum of the squares of the vertical deviations from each data point to the line (if a point lies exactly on the fitted line exactly, then its vertical deviation is 0). Figure 3. Multiple regression 4 RESULTS In Table 1, the parameters of the hardened specimens that impacting the hardness are presented. We mark specimens from P1 to P16. Parameter X1 presents the parameter of temperature [°C], X2 presents the hardening speed [mm/s], X3 presents the fractal dimension and X4 presents the base hardness (hardness before hardening). The last parameter is the measured hardness of the laser-hardened robot specimens. With the fractal dimension we describe the complexity of the hardened specimens. In Table 1 we can see that specimen P15 has the largest fractal dimension, i. e. 2.433. Thus specimen P15 is the most complex. Specimen P1 has the highest hardness after hardening, that is 60 HRc. In table 2, the experimental and prediction data are presented. S stands for the name of the specimens and ED presents for the experimental data. Predictions with the multiple regression are presented in columns PR and those with GP in columns P GP. The measured and predicted surface hardness of the laser-hardened robot specimens is shown in the graph in Fig. 4. The regression model is presented in equation (2). The GP model is presented in equation (3). The GP model presents a 1.33% deviation from the measured data, which is less than the regression model, presenting a 2.44% deviation. Y = 58,39271272 + 0,00880226* X1 + 0,702872611* X2 − 5,677509178* X3 − 0,034312945* X4 (2) Y = 48, 9908+0, 64137*X2 −1, 71943 _X3 +0, 00874* (X1 +0, 00874*X3*(−2, 79749+X1+(−1,71943+0, 00874*X1) X3* X3* X3 * X3+(−1, 71943+0, 00874* X1)*(−1,71943*X2+X3*X3)))−0,03422*(−5,15829 −1,71943*(0,00874*X1+0,00874*X2)−1, 07806*X2− 3,43886*X3+0,4137*X2*X3*X3+X3*(−1,71943+ 0,00874*X1−0,00942224*X2+(−3, 13886+X2)* (−1,71943* X2+0, 00874* X3)−1,71943*X3 + 0, 00874* X1*X3 − 1, 17943*X3 *X3)* (−3, 45389+0, 64137*(X2+0,00874*(X1−1,7943*X3))−1,07806*X3* X3 )+X4) (3) Table 1. Parameters of the hardened specimens S X1 X2 X3 X4 Y P1 1000 2 2.304 34 60 P2 1000 3 2.264 34 58.7 P3 1000 4 2.258 34 56 P4 1000 5 2.341 34 56.5 P5 1400 2 2.222 34 58 P6 1400 3 2.388 34 57.8 P7 1400 4 2.250 34 58.1 P8 1400 5 2.286 34 58.2 P9 1000 2 2.178 60 57.4 P10 1000 3 2.183 58.7 56.1 P11 1000 4 2.408 56 53.8 P12 1000 5 2.210 56.5 56 P13 1400 2 2.257 58 55.3 P14 1400 3 2.265 57.8 57.2 P15 1400 4 2.433 58.1 57.8 P16 1400 5 2.289 58.2 58 Table 2. Experimental and prediction data S ED P R P GP P1 60.0 54.3531 58.3646 P2 58.7 55.28307 57.4004 P3 56.0 56.02001 56.7468 P4 56.5 56.25165 56.5463 P5 58.0 58.33956 58.0556 P6 57.8 58.09996 58.7735 P7 58.1 59.58633 57.447 P8 58.2 60.08481 58.5599 P9 57.4 54.17633 56.6413 P10 56.1 54.89542 56.1589 P11 53.8 54.4135 56.377 P12 56.0 56.22336 55.9996 P13 55.3 57.31733 57.562 P14 57.2 57.98165 56.856 P15 57.8 57.7204 57.7407 P16 58.0 59.23741 57.7365 146 BABIČ, KOKOL, BELIČ, PANJAN, KOVAČIČ, BALIČ Figure 4. Measured and predicted porosity of teh hardened specimens 5 DISCUSSION Compared to other approaches, the fractal approach is found to be more appropriate to characterise the complex and irregular surface microstructures observed on the surface of the robot-laser hardened specimens, it can be effectively utilized in predicting the material properties from the fractal dimensions of the microstructure. Specimen P15 has the largest fractal dimension, 2.433, thus specimen P15 is the most complex. A statistically significant relationship was found between, the hardness, parameters of the robot laser cell and image analysis with the fractal geometry. With the fractal dimension we describe complexity of the hardened specimens. Also, analysis of the SEM images of the robot laser-hardened specimens is an interesting approach. Specimen P1 has the highest hardness after hardening, that is 60 HRc. We use the method intelligent-system to predict hardness of the robot laser-hardened specimens. Using the intelligent system method, GP and multiple regression, we increase the laser-hardening production process, decreasing the time of the process and improving the material topographical property. The GP model allovs for 1.33% deviation from the measured data which is less than that of the regression model which presents a 2.44% deviation. 6 CONCLUSSION The paper proposes the use of a new method of intelligent system, genetic programming and multiple regression to predict the hardness of hardened specimens. The fractal geometry is used to describe the complexity of the robot laser hardened specimens. The original characteristics of the method are: 1. The structure in the robot laser-hardened specimens is fractal. 2. The fractal dimension is used to describe the complexity of the hardened specimens. 3. The optimal fractal dimension of different parameters of the robot laser-hardened tool steel is inditified. 4. The fractal dimension varies between 2 and 3. 5. To predict the hardness of the hardened specimens, a genetic algorithm and multiple regression are used. 6. The genetic programming modelling results show a good agreement with the measured porosity of the hardened specimens. In future we plan to use the intelligent-system model to predict more further mechanical properties of the robot laser-hardened specimens. REFERENCES [1] Mandelbrot, B. B. The fractal geometry of nature. New York: W. H. Freeman, 1982:93. [2] BABIČ, Matej, PANJAN, Peter, KOKOL, Peter, ZORMAN, Milan, BELIČ, Igor, VERBOVŠEK, Timotej. Using fractal dimensions for determination of porosity of robot laser-hardened specimens. International journal of computer science issues, ISSN 1694-0814, 2013, vol. 1, issue 2, str. 184-190, [3] Eghball, B., Mielke, L. N., Calvo, G. A., Wilhelm, W. W. 1993, Fractal description of soil fragmentation for various tillage methods and crop sequences. Soil Sci. Soc. Am. J. 57:1337–1341. [4] Hatano, R., Kawamura, N., Ikeda, J., Sakuma, T. 1992, Evaluation of the effect of morphological features of flow paths on solute transport by using fractal dimensions of methylene blue staining patterns. Geoderma 53:31–44. [5] Crawford, J. W., Sleeman, B. D. 1998, From particles to architecture: Fractals, aggregation and scaling in environmental soil science. p. 41–45. In P. M Huang, N. Senesi, and J. Buffle (ed.) Structure and surface reactions of soil particles. IUPAC Environ. Anal. Phys. Chem. Ser. Vol. 4. John Wiley & Sons, New York. [6] Crawford, J. W., Matsui, N. 1996, Heterogeneity of teh pore and solid volume of soil: Distinguishing a fractal space from its nonfractal complement. Geoderma 73:183–195. [7] Fan, L. W., Hu, Y. C., Tian, T., Yu, Z. T. The predication of effective thermal conductivities perpendicular to teh fibres of wood using a fractal model and an improved transient measurement technique, International journal of Heat Mass Transfer 49 (2006) 4116–4123. [8] Babič, M., Muhič, T. 2010, Fractal structure of the robot laser hardened materials. In: 18th Conference on Materials and Technology, 15th–17th November 2010, Portoroz, Slovenia. Program and abstracts book. [Ljubljana: Institute of Metals and Technology,], p. 73. (In Slovene) [9] Babič, M. 2010, Fractal dimension of the robot laser hardening tool steel. V: ROBNIK, Marko (ur.), KOROŠAK, Dean (ur.). 9th Symposium of Physicists at the University of Maribor, Hotel Pyramid, Maribor, 9, 10 and 11 December, 2010. Book of Abstracts. London: CAMTP, [2] F. (In Slovene) [10] Grumm J., Žerovnik, P., Šturm, R. 1996, Measurement and analysis of residual stresses after laser hardening and laser surface melt hardening on flat specimens; Proceedings of the Conference "Quenching ’96", Ohio, Cleveland. [11] Pashby, I.R., Barnes, S. & Bryden, B.G. 2003, "Surface hardening of steel using a high power diode laser", Journal of Materials Processing Technology, vol. 139, no. 1-3, pp. 585-588. [12] A. Horvat, A. Tošić: Optimization of traffic networks by using genetic algorithms, Journal of Electrical Engineering and Computer Science, 79(4): 197-200, 2012. Matej Babič is Ph.D.student in Computer Science of the University of Maribor, Slovenia. He studied Mathematics at the Faculty of Education in Maribor. His research interest are in fractal geometry and graph theory. 50 51 52 53 54 55 56 57 58 59 60 61 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10P11P12P13P14P15P16 Hardness (HRc) Specimens Experimental data Prediction with MR Prediction with GP USING OF GENETIC PROGRAMMING IN ENGINEERING 147 Peter Kokol is a professor at the Faculty of Electrical Engineering and Computer Sciencethe, University of Maribor. It`s research interests are in the areas of Databases and Data Mining and Software reliability. He is the author of over 100 scientific papers published in the world's leading journals. Igor Belič is enployed with the Institute of Metals and Technology, Slovenia. His research interests are in neural network and it’s modeling. Peter Panjan is a head of the Department of Thin Films and Surfaces at the Jožef Stefan Institute. He researches hard coatings used in protection of tools and machine parts against wear and some other physic and chemistrycal uspects of thin films, surfaces, plasma physics and vacuum technique. Miha Kovačič is an Assist. Prof at the Laboratory for Multiphase Processes, University of Nova Gorica. Jože Balič is a professor at the Faculty of Mechanical Engineering, University of Maribor, Slovenia. He is a vice dean for research work, head of the Intelligent Manufacturing Systems Laboratory, head of the research group " Dynamic, Intelligent and Integrated Technology and Systems, member of the National science board technology (Slovenian Research Agency) , vice-president of DAAAM International, Vienna (Danube Adria Association for Automation and Manufacturing). member of the World Academy of Materials and Manufacturing Engineering (http://www.wamme.org/) . He is the author of over 100 original scientific papers publish in the world's leading journals and over 200 papers in peer- reviewed international scientific conferences covering computer integrated manufacturing, intelligent manufacturing and advanced manufacturing technologies.