scieee AI-readable full text Open interactive document viewer

Prediction of microscopic residual stresses using genetic programming

Millán García, Laura,Kronberger, Gabriel,Fernández, Ricardo,Bokuchava, Gizo,Halodova, Patrice,Sáez-Maderuelo, Alberto,González-Doncel, Gaspar,Ignacio Hidalgo, J.

Abstract

The authors acknowledge to Consejería de Educación e Investigación, from Comunidad Autónoma de Madrid, CAM, Madrid, Spain, for the project Micro-Stress-MAP, of ref. Y2018/NMT- 4668, and also to the Spanish Ministerio de Economía Competitividad, MINECO, for the project of ref. MAT2017-R83825-C4-1-R, to which this work is linked. The FLNP of the JINR (Dubna, Russia)

Full text

Applications in Engineering Science 15 (2023) 100141 Available online 9 September 2023 2666-4968/© 2023 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). Contents lists available at ScienceDirect Applications in Engineering Science journal homepage: www.elsevier.com/locate/apples Prediction of microscopic residual stresses using genetic programming Laura Millán a, Gabriel Kronberger b,∗, Ricardo Fernández a, Gizo Bokuchava c, Patrice Halodova d, Alberto Sáez-Maderuelo e, Gaspar González-Doncel a, J. Ignacio Hidalgo f aCentro Nacional de Investigaciones Metalúrgicas, CSIC, Madrid, Spain bJosef Ressel Center for Symbolic Regression, Heuristic and Evolutionary Algorithms Laboratory, University of Applied Sciences Upper Austria, Hagenberg, 4232, Softwarepark 11, Austria cFrank Laboratory of Neutron Physics, Joint Institute for Nuclear Research, Dubna, Russia dCentrum Výzkumu Řež, Řež, Czech Republic eCentro de Investigaciones Energéticas, Medioambientales y Tecnológicas, CIEMAT, Madrid, Spain fUniversidad Complutense de Madrid, Madrid, Spain ARTICLE INFO Keywords: Material science Machine learning Symbolic regression Residual stress Neutron diffraction Microstructure ABSTRACT Metallurgical manufacturing processes commonly used in the industry (rolling, extrusion, shaping, machining, etc.) usually cause residual stress development which can remain after thermal heat treatments. These stresses can be detrimental for the in-service performance of structural components, which makes their study and understanding important. Residual stress variations are usually determined at a macroscopic scale (commonly, using diffraction methods). However, stress variations at the microscopic scale of the individual crystallites (grains), are also relevant. Contrary to the macroscopic residual stresses, microscopic residual stresses are difficult to quantify using conventional procedures. We propose to use machine learning to find equations that describe microscopic residual stresses. Concretely, we show that we are able to learn equations to reproduce the diffraction profiles from microstructural characteristics using genetic programming. We evaluate the learned equations using real neutron diffraction peaks as a reference, obtaining accurate results for the most frequent grain orientations with runtimes of a few minutes. 1. Introduction Residual stresses (RS) are commonly developed during manufacturing processes of metallic components. Metal forming operations such as machining and shaping, applied to metallic parts, induce nonhomogeneous plastic deformations with the result of RS fields generation (Hauk,1997). These stress fields may remain after heat treatments and can affect the performance of components. Most importantly, RS can reduce the durability and lead to sudden unexpected failures. Many accidents occurring in factories, buildings, vehicles, or civil structures can be directly associated with these RS. An important strategy to prevent these accidents is to ensure a detailed understanding of these RS fields for their control in manufacturing of components. However, one of the principal problems stems from the lack of knowledge of RS and from the difficulties when it comes to determining the extent of the damage they can produce. RS are divided into two types depending on the scale on which they manifest themselves: macroscopic and microscopic RS. The macroscopic stresses (M-RS) extend over the sample or component size, and the microscopic ones (m-RS) vary at the scale of the microstructure (Chatterjee et al.,2016;Ganguly et al.,2011;Gloaguen et al., ∗Corresponding author. E-mail address: [email protected] (G. Kronberger). 2015). Within these m-RS, intergranular (type II) and intragranular (type III) residual stress can be distinguished (the term type I is usually reserved for the M-RS). Data to calculate the M-RS can be obtained with neutron or synchrotron radiation diffraction methods. However, the measurement or quantification of the m-RS is still an open problem. To understand the difficulty of addressing these kind of studies, it is necessary to focus on the complex nature of material microstructure as well as the limited capability of diffraction methods. The microstructure of crystalline materials is subdivided into small crystallites (grains) with a size of typically a few microns. The orientations of grains within the polycrystal differ among neighboring grains. Due to the anisotropic character of the lattice structure, a stress field associated with the individual grains, the m-RS of type II, is developed during metal manufacturing processes. Furthermore, crystal defects, such as dislocations, which are responsible for plastic deformation, distort the ordered crystalline structure and lead to m-RS. Several studies have employed different techniques such as Electron Back-Scatter Diffraction (EBSD) / Kikuchi lines, micro-Raman, X-ray diffraction, micromagnetic and ultrasonic methods to calculate https://doi.org/10.1016/j.apples.2023.100141 Received 14 April 2023; Accepted 9 August 2023 Applications in Engineering Science 15 (2023) 100141 2 L. Millán et al. this microscopic stress. Diffraction methods are non-destructive and suitable to investigate m-RS fields. Diffraction peaks are produced by many grains, all of them with a common crystallographic direction. This is because the region illuminated by the beam is significantly larger than the grain size. As a consequence, the resulting diffraction peak in the diffractogram is the sum of the diffracted signal produced by the contributing grains. It is clear that diffraction peaks obtained from these experiments contain the stress information of the individual grains (Fernández et al.,2018). In addition, some data from individual grains, such as their size, aspect ratio, and slope of the long grain axis with respect to a given sample direction can be readily obtained from visual inspection of EBSD maps besides the crystallographic orientation. In this work we propose to use genetic programming (GP) to find equations that link individual grain characteristics obtained from EBSD maps, to peak shifts in the diffractograms, and thus allow to predict the m-RS contribution for each grain. For our study, we use diffractograms and EBSD maps from multiple samples from an aluminum alloy cylinder that was rapidly cooled (quenching) to develop type I and type II RS fields. Machine learning is fundamental to the development of artificial intelligence. One important area of machine learning is supervised learning from observational data. In this approach we learn a model that maps input values to target values. The model can later be used to predict values of the target variable. In engineering applications of artificial intelligence, explainability and interpretability of models is an important concern because we often require to fully understand the internal workings of the model, to gather new insights and knowledge, or to increase reliability and safety. Equation learning, frequently called symbolic regression, provides the potential to learn interpretable models in the form of short equations (Koza,1992;Affenzeller et al., 2009;Sahoo et al.,2018). With these equations we can calculate predicted diffractograms from microstructural characteristics of the grains provided by experimental EBSD maps and analyze the effects of microstructural characteristics on peak shifts. The rest of the paper is organized as follows: Section 2, describes previous work applying machine learning to solve problems in the field of materials science. In Section 3, the data collection techniques and the proposed method are explained. In Section 4we validate the equations identified by GP using intersection plots to visualize the dependencies between variables that are captured by the models. This work finishes with the most relevant conclusions in Section 5. 2. Related work Genetic programming is an evolutionary machine learning method developed to generate expressions and potentially even full computer programs that solve a given programming problem (Koza,1992). It is the oldest and most established method for symbolic regression where the goal is to learn equations from observational data. Recently, there has been an increased interest in equation learning methods and symbolic regression for scientific machine learning (Sahoo et al., 2018;Udrescu and Tegmark,2020;Guimerà et al.,2020;Mundhenk et al.,2021). Since its beginning, symbolic regression has been used successfully in many applications of science and engineering. Of relevance for the present study is its applicability in industrial processes, particularly in processes that involve the shaping of metallic materials. Brezonick’s work measuring cold deformation (Brezocnik and Gusel,2004), surface roughness (Brezocnik and Kovacic,2003) and impact strength (Gusel and Brezocnik,2006) of copper and aluminum alloys, for example, shows the potential use of GP in this sector. Another important example is its use in thermomechanical processes such as friction stir welding (Yunus and Alsoufi,2018;Hidalgo et al., 2016). Symbolic regression using GP has been used to extend a physicsbased model into a semi-analytical hybrid model for a metal sheet bending process (Asadzadeh et al.,2021). We have previously used symbolic regression and GP in the area of material science for learning friction models from large-scale industrial friction tests (Kronberger et al.,2018), to learn semi-analytical models for stress–strain curves of aluminum alloys (Kabliman et al.,2021;Kronberger et al.,2022), and to predict the phase kinetics of steel (Piringer et al.,2022). We were also able to use GP to calculate the relaxed lattice parameter across the weld bead of an age-hardening aluminum alloy using neutron diffraction data (Cioffi et al.,2014). In this way, it was possible to determine the M-RS profile across the weld. This study, in which the problem of the m-RS could not be addressed due to its complexity, was a precursor to the developments presented in this work. 3. Methodology For the present investigation we have selected a single-phase aluminum alloy AA5083, that has a relatively simple microstructure, and in which the lattice parameter does not vary with annealing treatments. Furthermore, a cylindrical sample, which was annealed at elevated temperature followed by a quenching, is selected because the cylindrical symmetry simplifies the study. Even in this case, addressing the problem of calculating the stress state of individual grains is still a very complex problem. It requires not only the experimental data supplied by different, representative, diffraction peaks but also the information of many individual grains. We use the EBSD technique to determine microstructural data of individual grains. 3.1. Electron back-scattering diffraction The EBSD technique, used in a scanning electron microscope (SEM), allows measuring the individual orientations of grains and to generate orientation imaging microscopy (OIM) maps. It is a surface technique, as consequence, a special preparation of the samples is necessary before measurement. A 4 mm thick disc was cut from the central area of the cylinder. Cubes of 4 ×4×4mm3were cut out at positions 0, 6 and 12 mm from the center. The faces of these cubes perpendicular to the extrusion axis direction were sanded and polished to ensure a good surface finish. For each of the cubes, EBSD data were collected on a Lyra GMU SEM equipped with a Nordlys II detector (Oxford Instruments) with AZTec acquisition software. The diffraction maps were post-processed using Channel5 software. Fig. 1 shows the maps obtained using this technique. These maps are extracted from the axial surface of each cube. The color pattern represents the different orientations of the grains, blue for 111, red for 200, green for 220, and pink for 311. Despite stemming from the same sample, it is possible to observe a clear variation among the three cubes. The microstructural gradient observed in Fig. 1 arises from the frictional forces between the extrusion die and the metallic alloy. This friction provokes a different plastic flow behavior in the inner region (away from the die) of the extruded bar with respect the outer one (close to the die) during the extrusion process. Therefore, this generates a different microstructure and, consequently, an individual prediction model for each position and orientation should be sought that depends on the properties and neighborhood of the grains. From the EBSD maps, we collected data for each of the visible grains including the orientation (ℎ𝑘𝑙), the area, the diameter, the number of neighbors, the position (x,y), the aspect ratio and the slope (which is the angle between the long axis grain direction and the radial axis of the cylinders which intercepts the center of mass of the grain). These data are collected in a table with one row for each grain as shown in Table 1. For each one of these three positions on the radial direction of the cylinder we prepared a separate table. Each grain in the list was included in one of the four main ℎ𝑘𝑙families based on the distance between its direction vector and the vector of the nearest principal orientation. The grain counts obtained per orientation are represented in Table 2. The last column includes the values of the elastic modulus 𝐸ℎ𝑘𝑙 for each orientation. This property Applications in Engineering Science 15 (2023) 100141 3 L. Millán et al. Fig. 1. EBSD maps obtained at three different positions, left to right; at r=0 mm (center), at r=6 mm, and at r=12 mm, across the radial direction of the cylinder. Each color represents a different crystal orientation with the axial direction, according with the reference triangle on the right. The black band in the lower left corner represents the scale of the images, its value being 200 μm. The horizontal direction (for maps at 6 and 12 mm) is coincident with the radial direction. Table 1 An extract of the data obtained using the EBSD technique. This table includes information of grains located in the central position (𝑟= 0). belonging to all four texture components. Grain ID Area μm2Diameter μm Neighbors x y Aspect ratio Slope ℎ𝑘𝑙 0 717 30.214 9 15.67 12.9 1.621 152.5 111 1 201 15.998 3 38.13 3.86 2.0907 0.49718 237 2 295 19.381 4 57.21 6.12 2.7134 19.073 111 3 117 12.205 3 83.32 3.34 1.8991 165.59 013 4 242 17.553 6 94.92 9.48 1.4032 51.102 015 5 31 6.2825 2 101.71 2.52 1.3311 108.08 001 6 124 12.565 4 114.77 2.4 3.9348 7.0842 32 17 7 771 31.332 6 151.98 9.39 1.9345 0.56682 112 8 47 7.7358 2 173.55 2.43 1.4229 150.11 111 9 368 21.646 4 186.9 7.79 1.4882 30.399 111 10 633 28.389 6 202.38 16.81 1.3586 25.153 102 11 41 7.2252 2 212.02 1.71 2.1311 163.3 111 12 1066 36.841 11 233.9 19.91 1.7427 130.14 158 13 37 6.8637 1 234.11 5.84 2.6223 63.921 011 14 155 14.048 3 252.44 2.75 3.3816 177.12 111 15 389 22.255 3 277.08 7.51 1.4817 165.74 223 16 1920 49.443 10 306.66 19.66 1.7247 12.195 213 17 87 10.525 4 334.02 3.67 1.5737 143.37 111 18 21 5.1709 2 341.38 1.24 1.7178 19.178 328 19 1407 42.326 10 360.94 14.87 1.8775 26.352 111 20 944 34.669 7 409.84 20.62 2.0654 90.54 001 ... ... ... ... . . . . . . . . . ... ... Table 2 Number of grains, at each location across the radial direction 1belonging to each one of the four main ℎ𝑘𝑙 orientations. The value of the elastic modulus 𝐸ℎ𝑘𝑙 for each ℎ𝑘𝑙 is also indicated. hkl 0 mm 6 mm 12 mm 𝐸ℎ𝑘𝑙 GPa 111 754 661 626 75.5 200 871 279 159 63.2 220 103 399 96 72.0 311 976 1765 633 69.0 Total 2704 3104 1514 69.9 (average) informs us about the stiffness of the grains (111 grains are the stiffest and the 200 grains the most compliant). In this way, four datasets were created from each list, according to the four preferred ℎ𝑘𝑙-orientations (as shown in Table 2). For each orientation a different mean lattice spacing 𝑑ℎ𝑘𝑙 𝑥𝑖is relevant in the diffractograms (see Fig. 2). The lattice spacing indicates the distance between crystal lattice planes with the same orientation. In other words, the orientation mainly determines the position and contribution of the diffraction peak of each grain, however other grain characteristics such as the size or aspect ratio may also have an effect. Thus, each grain has a different value of 𝑑ℎ𝑘𝑙 𝑥𝑖that will contribute to a greater or lesser extent to its corresponding peak. The sum of the contributions of all grains 𝑑ℎ𝑘𝑙 𝑥𝑖will give rise to the profile of the diffraction peak corresponding to the orientation of those grains. These values of 𝑑ℎ𝑘𝑙 𝑥𝑖have an associated value of m-RS. Therefore, if we can predict the 𝑑ℎ𝑘𝑙 𝑥𝑖from the grain characteristics we can also calculate the m-RS associated with this grain using Hooke’s law and the stress equilibrium expressions described in previous works (Millán et al.,2020,2021a,b). We selected the area, aspect ratio, number of neighbors, and slope as potential parameters that affect the 𝑑ℎ𝑘𝑙 𝑥𝑖and used those variables as inputs for equation learning. 3.2. Neutron diffraction The neutron diffraction measurements provide the lattice spacing, 𝑑ℎ𝑘𝑙 𝑥𝑖, of different (ℎ𝑘𝑙) planes in grains inside the sample. Peak shifts in the diffractograms are used to analyze the strains, and the M-RS using the generalized Hooke’s law of elasticity. The neutron diffraction data was obtained at nearly similar positions at which the EBSD maps were obtained. The measurements were conducted before sectioning the quenched cylinder to extract the samples for the EBSD measurements. In this way, it is guaranteed that the RS fields generated with the heat treatments were not altered. The experiment was carried out on the neutron Fourier stress diffractometer (FSD) operating at the IBR-2 pulsed reactor in the Frank Laboratory of Neutron Physics (FLNP) in Dubna (Russia) (see Bokuchava et al.,2019 for further details). For the measurements, the sample was positioned in two configurations, vertical and horizontal, to obtain diffraction data of the axial, radial, and hoop directions. The gauge volume used for each configuration was 2 ×2×25 mm3 and 2 ×2×2mm3, respectively. The measurements were taken at four different positions, 𝑟={0,3.5,7, and 10}mm along the radial Applications in Engineering Science 15 (2023) 100141 4 L. Millán et al. Fig. 2. Neutron diffraction pattern obtained for the axial direction at the central position, r=0, of the cylinder. A magnification of the 311 and 111 peaks is shown. direction, at the mid-height of the cylinder. The measurements generate diffraction patterns which include the contribution of the different sets of (ℎ𝑘𝑙) planes. Fig. 2 shows the diffraction pattern (axial direction) obtained at distance r =0 mm in the sample. Here, the intensity is shown on the 𝑦-axis and the lattice spacing 𝑑ℎ𝑘𝑙 𝑥𝑖on the 𝑥-axis. The ℎ𝑘𝑙 corresponding to the four principal diffraction peaks are indicated. A magnified view of the 311 and 111 peaks is also shown. The technique is very sensitive and is capable of detecting elastic deformations of the lattice with great precision. For the purpose of the present study, it will be taken into account that the peak intensity distribution of a given ℎ𝑘𝑙 is proportional to the total number of grains with the corresponding orientation, as obtained from the EBSD measurements, using proportionality rules. The peak profiles are extracted for the four principal ℎ𝑘𝑙 and used as the target for the equation learning process. To resolve the stress of individual grains (the m-RS) from the neutron diffraction data, it must be taken into account that these data include also the M-RS, in the way calculated in a previous work (Millán et al.,2020). This M-RS must be subtracted from the total stress to obtain the corrected m-RS using the equation 𝜎𝑚,ℎ𝑘𝑙 𝑥𝑖=𝜎𝑇 ,ℎ𝑘𝑙 𝑥𝑖−𝜎𝑀 𝑥𝑖, where 𝜎𝑚,ℎ𝑘𝑙 𝑥𝑖is the m-RS for 𝑖position across the radial direction and ℎ𝑘𝑙 orientation and 𝜎𝑀 𝑥𝑖is the M-RS for 𝑖position. 3.3. Equation learning for predicting the grain lattice spacing Fig. 3 gives a visual overview of the equation learning process. The aim is to find a function (equation) for each ℎ𝑘𝑙 orientation that depends on the microstructural parameters mentioned in Section 3.1. This function predicts the lattice spacing value for each grain, and must be such that it reproduces the specific experimental diffraction peak profile. To calculate the predicted peak profile, we sum up the contributions of each of the grains, whereby the predicted lattice spacing is used to locate the peak of each grain. The mean of absolute errors between the predicted and the target peak profile is used as the objective function to be minimized. It is assumed that all grains contribute equally to the peak intensity, and the expression must be common for all grains with the same orientation. However, the expression identified should not be equal for all peaks since the mechanical response of grains will depend on the specific ℎ𝑘𝑙. Therefore, we treat the four most frequent grain families ℎ𝑘𝑙 (111, 220, 200, and 311) independently of each other. This is conducted by splitting the EBSD data-set of each grain family and selecting the corresponding peak from the diffraction spectrum, as shown in the figure. Some approximations are assumed: •Only the diffraction patterns (EBSD and neutron diffraction) corresponding to the axial direction will be analyzed here, as it coincides with the axi-symmetric direction and corresponds to the unconstrained direction of the extrusion process. This is a simplification of the problem since a complete analysis of the m- RS would require also the study of the spectra obtained for the radial and hoop components. This much more complex problem is being the subject of further analysis. •Each run will study only one individual peak and its corresponding grains, for a given position in the sample. •The influence of the instrumental scatter and the stresses associated with lattice defects (i.e., type III m-RS) is considered negligible. Peak broadening of the measured peaks is, therefore, only attributed to type II m-RS development. 3.4. Genetic programming The pseudo-code of the GP algorithm adapted for this problem is shown in Fig. 4. It takes as inputs the table of grain characteristics 𝑋for one ℎ𝑘𝑙-direction as for example shown in Table 1 as well as the extracted peak 𝑦for the same direction from the diffractogram. The result is a formula to calculate the lattice spacing for each grain 𝑑ℎ𝑘𝑙 𝑥𝑖. The algorithm is a variation from Affenzeller et al. (2009) and uses offspring selection to increase diversity of solution candidates. The main adaptation necessary for this problem is the fitness function described in Fig. 5. For our experiments, we have used the algorithm parameter values shown in Table 3. The terminal set for GP contains numeric parameters as well as the input variables: grain area, number of neighbors, Applications in Engineering Science 15 (2023) 100141 5 L. Millán et al. Fig. 3. Overview of the equation learning process. We use GP (Fig. 4) to find four models represented as short equations, namely; 𝑓311, 𝑓220, 𝑓200, 𝑓111, to predict the lattice spacing 𝑑ℎ𝑘𝑙 𝑥𝑖for each grain in each ℎ𝑘𝑙 group. The predicted peak profile is calculated via kernel density estimation (Fig. 6) with a Gaussian kernel. GP searches for the equations that best fit the target profile (Fig. 5), which are extracted for all four ℎ𝑘𝑙 from the full diffractogram. Table 3 GP parameter settings. Parameter Value Population size 500 Function set {+,−,⋅,log,exp} Terminal set {area A, num. neighbors I, aspect ratio AR, slope S, random numeric parameters } Max. tree size 20 nodes Max. tree height 12 levels Fitness function (maximized) Negative sum of absolute errors Initialization PTC2 Parent selection Random & proportional Offspring selection Strict Crossover rate 100% Mutation rate 10% Max. generations 1000 Max. selection pressure 10 aspect ratio, and slope. The function set contains addition, subtraction, multiplication, as well as exponential and logarithmic functions. The size of expression trees is limited to 50 nodes and 12 levels to prevent evolution of overly large and complex equations that are prone to overfitting. The fitness function is specific for this problem since the lattice spacing of individual grains cannot be directly measured. The fitness function in Fig. 5 compares the predicted peak to the actual peak extracted from the diffractogram. Whereby the predicted peak is calculated from the predicted lattice spacing 𝑑ℎ𝑘𝑙 𝑥𝑖(𝑛)via a smoothing operation as shown in the pseudo-code for the function CalcSpectrum in Fig. 6. Fig. 6 shows the pseudo-code for calculating the predicted spectrum via kernel density smoothing. First, the expression is used to calculate the predicted lattice spacing values for each grain. Then we use a Gaussian kernel to calculate the predicted peak profile. To match the target spectrum, we first bring the predicted lattice spacing values 𝑑pred to the same scale and offset as the lattice spacing values in the target spectrum 𝑦. At the end, we scale the predicted peak to match the target peak. 4. Results A total of thirty runs for each configuration of the algorithm were made for each location in the sample and crystallographic orientation using an Intel Core i5 processor with 16 GB RAM on Windows 10. We varied the mutation rate from 5% to 25% in initial experiments, but did not observe a large difference in the results. So we used 10% mutation rate, which is a common value (Affenzeller et al.,2009). Applications in Engineering Science 15 (2023) 100141 6 L. Millán et al. Fig. 4. Pseudo code for the GP algorithm. Fig. 5. Pseudo code for the evaluation function. Applications in Engineering Science 15 (2023) 100141 7 L. Millán et al. Fig. 6. Pseudo code for calculating a predicted peak profile using a Gaussian kernel. The grain data files are split into two halves for model training and testing. Rows from the grain data table are assigned randomly to the training or testing sets. For GP we used only the training sets for fitting and selecting models. The testing sets are only used after training is finished for the results reported in this section. 4.1. Predicted peak profiles and expressions Figs 7,8and 9show the predicted distributions from the 30 runs and the data from the neutron diffraction peaks. The 𝑥-axis represents the 𝑑ℎ𝑘𝑙 𝑥𝑖range of the peaks selected for each ℎ𝑘𝑙-orientation. The 𝑦axis is defined as the number of grains with the same value of 𝑑ℎ𝑘𝑙 𝑥𝑖, i.e. belonging to the same section. Each line corresponds to one model produced by a GP run. For the 111 and 311 grains, the model is able to reproduce the diffraction peak profiles quite well. It is important to consider the scale of the 𝑦-axis values. Since, for example, the predicted peaks of grains 220 for the central position, 𝑟= 0 mm, and at 6 mm have larger deviations from the target peaks. This must be due to the fact that there are fewer grains with this orientation as shown in Table 2. Furthermore, these grains have irregularities in the shape of their peaks, i.e., they show distortions of the Gaussian profile. This is because they are more compliant than 111 grains. Therefore they are subjected to more deformation. Qualitatively, the peaks for 111 and 311 are predicted best and most consistently over all positions. The averages of mean of absolute errors (MAE) over all models are shown in Table 4. The unit of the error is the grain count. When interpreting the MAE numbers we must take into account the total number of grains given in Table 2. To demonstrate the simplicity of the equations identified by GP, the equations with best MAE on the test set are shown below. Most of the expressions are polynomials of small degree even though we Table 4 Average over 30 models of mean of absolute errors on the test sets. 0 mm 6 mm 12 mm 111 1.293 1.802 1.111 200 2.229 1.451 5.857 220 1.000 0.599 0.612 311 1.964 1.693 1.914 included the division operators and nonlinear functions exp and log in the function set. GP automatically identified, that polynomials of low degree are sufficient to predict the diffraction peaks. 𝑑111,0 𝑥𝑖= 4.052 ⋅10−5 𝐴𝑅2 𝑖𝑆𝑖+ 3.042 ⋅10−4 𝐼𝑖+ 3.592 ⋅10−6 𝐴𝑅𝑖𝐴𝑖 − 7.828 ⋅10−6 𝐴𝑖− 0.0147 𝐴𝑅𝑖+ 2.372 (1) 𝑑111,6 𝑥𝑖= 2.542 ⋅10−5 𝑆𝑖− 0.00125 𝐴𝑅𝑖𝐼𝑖+ 2.549 ⋅10−4 𝐼𝑖 + 0.00168 𝐴𝑅2 𝑖+ 0.00752 𝐴𝑅𝑖+ 2.3453 (2) 𝑑111,12 𝑥𝑖= 2.515 ⋅10−6 𝐼2 𝑖𝑆𝑖− 6.744 ⋅10−6 𝑆𝑖− 3.658 ⋅10−4 𝐴𝑅𝑖𝐼𝑖 − 3.856 ⋅10−5 𝐴𝑅𝑖𝐴𝑖+ 0.01291 𝐴𝑅𝑖+ 2.336 (3) 𝑑200,0 𝑥𝑖= −1.819 ⋅10−5 𝐼𝑖𝑆𝑖− 1.363 ⋅10−5 𝑆𝑖 − 4.270 ⋅10−5 𝐼2 𝑖− 1.493 ⋅10−4 𝐴𝑅𝑖𝐼𝑖 + 0.0013 𝐼𝑖+ 4.893 ⋅10−4 𝐴𝑅𝑖+ 2.045 (4) 𝑑200,6 𝑥𝑖= 2.935 ⋅10−5 𝑆𝑖+ 1.407 ⋅10−4 𝐴𝑅𝑖𝐼𝑖− 0.00215 𝐼𝑖 + 0.00307 𝐴𝑅2 𝑖− 0.02338 𝐴𝑅𝑖+ 2.071 (5) 𝑑200,12 𝑥𝑖= 4.7⋅10−6 𝐴𝑅𝑖𝐼𝑖𝑆𝑖− 3.416 ⋅10−5 𝐼𝑖𝑆𝑖 + 1.048 ⋅10−6 𝐴𝑅𝑖𝐴𝑖𝐼𝑖− 5.371 ⋅10−5 𝐴𝑅𝑖𝐼𝑖 −9.453 ⋅10−4 𝐼𝑖−1.314 ⋅10−7 𝐴𝑖+ 2.0462 (6) 𝑑220,0 𝑥𝑖= 5.384 ⋅10−6 𝐴𝑅𝑖𝐼𝑖𝑆𝑖+ 4.453 ⋅10−6 𝐴𝑅𝑖𝑆𝑖+ 8.208 ⋅10−6 𝑆𝑖 + 1.264 ⋅10−4 𝐼𝑖+ 1.612 ⋅10−6 𝐴𝑖+ 1.436 (7) Applications in Engineering Science 15 (2023) 100141 8 L. Millán et al. Fig. 7. Deviations in thirty executions of GP for center position. 𝑑220,6 𝑥𝑖= 7.815 ⋅10−5 𝑆𝑖− 9.574 ⋅10−5 (𝐴𝑅𝑖 − 8.026)(2.569 𝐼𝑖+𝐴𝑅𝑖+ 35.7) − 9.11 ⋅10−6 𝐴𝑅𝑖+ 1.4024 (8) 𝑑220,12 𝑥𝑖= −1.869 ⋅10−6 𝐼𝑖𝑆𝑖+ 5.7151 ⋅10−5 𝑆𝑖 + 5.4069 ⋅10−4 𝐴𝑅𝑖𝐼𝑖+ 5.3633 ⋅10−6 𝐼𝑖 + 0.00118 𝐴𝑅2 𝑖− 0.00157 𝐴𝑅𝑖+ 1.426 (9) 𝑑311,0 𝑥𝑖= 1.227 ⋅10−5 𝐴𝑅𝑖𝑆𝑖− 7.621 ⋅10−6 𝑆𝑖 + 0.00152 𝐴𝑅𝑖𝐼𝑖− 4.89 ⋅10−5 𝐼𝑖 − 1.626 ⋅10−5 𝐴𝑖+ 1.224 (10) 𝑑311,6 𝑥𝑖= 9.712 ⋅10−6 𝐼𝑖𝑆𝑖+ 3.093 ⋅10−6 𝑆𝑖− 9 ⋅10−4 𝐼𝑖 − 1.028 ⋅10−6 𝐴𝑅𝑖𝐴𝑖+ 1.23 (11) 𝑑311,12 𝑥𝑖= 1.22 − 3.064 ⋅10−6 (𝐼𝑖+ 2.629) (𝐴𝑅𝑖𝑆𝑖 − 5.413 𝑆𝑖+ 6.266 𝐴𝑅2 𝑖− 60.16 𝐴𝑅𝑖)(12) Fig. 8. Deviations in thirty executions of GP for position 6 mm. 4.2. Intersection plots To further explain and validate the predictions made by the identified equations, we use intersection plots, which show the response of the models over each of the input variables. With these visualizations, we can understand the dependency of predicted m-RS from microstructural variables as captured by the equations. A detailed description of this dependency would enlarge this paper unnecessarily. This study is, in fact, the subject of a follow-up publication. To produce the intersection plots, the value of three inputs is kept constant at an average value represented by the dashed gray line, and only the variable of interest is varied. The 𝑦-axis represents the output of the models (the lattice spacing, 𝑑ℎ𝑘𝑙 𝑥𝑖). The dependence of 𝑑ℎ𝑘𝑙 𝑥𝑖of these parameters is proportional to the m-RS. The plots are reviewed and the highlights observed for each orientation for each position in the following. Applications in Engineering Science 15 (2023) 100141 9 L. Millán et al. Fig. 9. Deviations in thirty executions of GP for position 12 mm. Figs. 10,11, and 12 show the intersection plots for the best equations from all runs at positions 0, 6, and 12 mm. 4.2.1. Scenario 1: position at 0 mm Firstly, it can be observed that peak 111 is symmetric (Fig. 7) and the trends of the models for 111 present a lot of dispersion. The plot for the slope shows two alternative trends. This implies that 111 grains can be ordered by increasing or decreasing slope, and both cases would lead to a Gaussian peak with small errors. In summary, for the Gaussian peak for orientation 111, GP identified no clear functional dependency of the target variable and the inputs. For orientation 200, the models show more defined trends and the peak is non-symmetric. Analyzing the averages, it is observed that the most relevant parameters in this orientation are the number of neighboring grains and the slope. It can be seen that at higher values of these parameters, the lattice spacing decreases. For this orientation, there are two alternative explanations to which the GP runs converged. A few models show a positive effect of the aspect ratio and slope, which is contrary to the majority of the models. However, those few models are also those that match the target peak best (see Fig. 7), while the majority of models shows a multi-modal peak that significantly deviates from the target peak. The three good models, consistently predict lower lattice spacing for higher number of neighbors, and higher lattices spacing for higher aspect ratio or slope. The 220 grains are the largest grains and occur seldom and in isolation. Contrary to the 111 grains, the data for the target peak is not symmetric and the intersection plots show that the equations are relatively consistent regarding the effects for the prediction. However, as the predictions have larger errors we cannot expect to gather relevant insights from the intersection plots for the 220 grains. For orientation 311 the predictions are better. However, the sensitivity analysis plots do not show clear correlations. The picture is similar as for 111 because the 311 peak is symmetric as well. There are two alternative explanations to which GP converged. 4.2.2. Scenario 2: position at 6 mm For the 6 mm position, we observe a similar situation as for the center position. The peaks for 111 and 311 are symmetric and fit well, but the intersection plots show high variance between models indicating that GP was not able to identify effects consistently. The predicted peaks for 220 have high error as there are only few 220 grains. The 200 grains show a non-symmetric peak and a lower variance in the intersection plot. The predictions fit the target peak relatively well, and we see that the equations consistently predict lower lattice spacing for grains with higher aspect ratio or slope. The grain area and number of neighbors have almost no effect in the models. A substantial variation in the identified trends is observed compared to the central position. 4.2.3. Scenario 3: position at 12 mm At 12 mm we observe in Fig. 9 that the peaks for 111 and 311 are predicted well, whereby the predictions for 200 and 220 are rather far off. The peak for 111 is symmetric while the peak for 311 is asymmetric. In the intersection plots in Fig. 12, we can ignore the plots for 200 and 220 because these equations do not fit the target peak well. Interestingly, in this case the models for the 111 grains show more consistent trends, although the peak is symmetric. For example, it can be seen that area correlates negatively with the lattice spacing. In the corresponding EBSD map (see Fig. 1) it is possible to find 111 grains of varying sizes, some very large and some very small. Moreover, at this position the number of 111 grains has decreased and now they are not arranged in clusters but are located in isolation at the grain boundaries. Many different equations allow to predict the 311 peak well. The main influences appear to be the number of neighbors and the slope. However, there are at least two distinct trends. On trend predicts that the lattice spacing increases considerably with the number of neighbors and the slope, compared to the second option where the number of neighbors has no effect but lattice spacing decreases quickly with increasing slope. 5. Summary This work extends the study presented at the EVOAPPS 2021 Conference (Millán et al.,2021b) in which m-RS in a quenched cylindrical sample extracted from aluminum alloy extruded bar were calculated using data from only one neutron diffraction peak at the sample central axis. Now, we complete the study by incorporating the four main peaks of the spectra and data from other positions along the sample radial direction. We use equation learning (symbolic regression) based on genetic programming, to determine the m-RS for each orientation to reproduce the peaks’ profiles. All 𝑑ℎ𝑘𝑙 𝑥𝑖values have been calculated for each grain