Prediction of Surface Roughness in Functional Laser Surface Texturing Utilizing Machine Learning

: Functional laser surface texturing (LST) arose in recent years as a very powerful tool for tailoring the surface properties of parts and components to their later application. As a result, self-cleaning surfaces with an improved wettability, efﬁcient engine components with optimized tribological properties, and functional implants with increased biocompatibility can be achieved today. However, with increasing capabilities in functional LST, the prediction of resulting surface properties becomes more and more important in order to reduce the development time of those functionalities. Consequently, advanced approaches for the prediction of the properties of laser-processed surfaces—the so-called predictive modelling—are required. This work introduces the concept of predictive modelling with respect to LST by means of direct laser writing (DLW). Fundamental concepts for the prediction of surface properties are presented employing machine learning approaches, theoretical concepts, and statistical methods. The modelling takes into consideration the used laser parameters, the analysis of topographical, and other process-relevant information in order to predict the resulting surface roughness. For this purpose, two different algorithms, namely artiﬁcial neural network and random forest, were trained with experimental data for stainless steel and Stavax surfaces. Statistical results indicate that both models can predict the desired surface topography with high accuracy, despite the use of a small dataset for the training process. The approaches can be used to further optimize the laser process regarding the process efﬁciency, overall throughput, and other process outcomes.


Introduction
The modification of components to alter or enhance their surface properties has always been practiced, for example, the ancient Egyptians used water to improve the handling of heavy pyramid stones with sledges [1].From the ancient past to present processing, there has been a paradigm shift to alter the surface directly and modify its properties.Laser surface texturing is one of the key technologies in this area, as many surface functions can be enhanced or created, e.g., with self-cleaning properties by producing textures which are superhydrophobic (water repellent) [2,3] and have reduced friction [4,5] and anti-icing characteristics [6].One of the most important determining indicators for the surface performance regarding wettability, tribology and anti-icing is the surface roughness (together with a specific surface geometry), which can be described, for instance, by the average surface roughness value (Sa).
In this frame, Shi et.al. have analyzed that the friction behavior and wear under fluid dynamic pressure lubrication conditions depend on the surface roughness value for aluminum alloy.They showed that with an increase of surface roughness, the friction characteristics resulted first in a decreasing and then in an increasing friction coefficient.This change can be attributed to the Hertzian contact stress, which describes the elastic deformation of a surface [7].The friction behavior of steel is also related to the surface roughness Sa, where increasing values result in higher average friction coefficients and a longer initial steady wear transition period in sliding fiction [8].
A strong influence of surface roughness is assumed in the literature for the wetting behavior for a variety of materials.Kubiak et. al. proposed a model for correlating the surface roughness to the water contact angle, obtaining a good agreement for a wide range of materials, including aluminum alloy, iron alloy, copper, and ceramic.In particular, for smooth but not polished surfaces (with Sa values below 10 µm), a higher water contact angle can be reached [9].Due to its importance, surface roughness is a widely used parameter and a technical requirement for archiving a certain functional surface behavior.However, the process-dependent nature of LST leads to the selection of conservative process parameters for a desired surface, which do not guarantee either the surface finish or the height throughput achieved.
The previous given examples show that the average roughness is one of the most important parameters for the initial determination of the surface functions.Therefore, predicting the surface roughness as a function of the laser process parameters can save considerable time and resources by firstly reducing the time spent on experiments to find the right process parameters and secondly allowing to optimize the process for a specific parameter, e.g., processing speed.
Prediction of a parameter can be realized using four different approaches [10]: • analytical models based on machining theory; • experimental models to examine the influence of various factors; • design of experiments models; • artificial intelligence (AI)-based models.
Analytical and experimental models are already widely adopted for laser-based manufacturing, applying conventional approaches such as statistical regression or analysis of variance.Such models are dependent on the laser machine used and need a constant adjustment for environmental, mechanical, and material influences.Although they are well suited for modeling, the underlying nonlinear complex relationships between process parameter and resulting surface parameters may not be described precisely [10].Purely analytical modeling of laser machining processes is highly complex and is reliant on a multitude of machine-and laser-specific parameters to be determined empirically, as well as material-related influences.To the best knowledge of the authors to date, no analytical model for predicting the average surface roughness Sa for laser texturing methods is known.
AI-based models are developed using non-conventional approaches such as artificial neural networks, random forest, and genetic algorithms and have become a preferred trend and are applied for near-optimal conditions during processing.Artificial neural networks (ANN) are a well-known prognostic method and accurately fit nonlinear problems, similar to genetic algorithms (GA), which are used to generate high-quality solutions for optimization and search problems.Random forests are widely used machine learning algorithms that solve both classification and regression problems.They are known for their flexibility and ease of use for a wide range of problems.
There have been numerous studies on the application of various ML-based models to predict the resulting surface roughness for conventional machining operations, such as CNC milling.However, only preliminary results have been reported for laser surface texturing (LST).During manufacturing of nano-or micro-scale geometry using direct laser writing (DLW), the depth and diameter of the ablated region (spot or crater) depends on various material, machining, and laser parameters.Artificial neural networks can be used to model the nonlinear laser micro-machining process for different materials and to obtain the optimum laser pulse energy with a high degree of accuracy [11].Furthermore, self-organizing Kohonen feature maps, a subclass of ANN, have been applied to model the influence of the laser pulse energy on the surface roughness in a laser-based surface polishing process [12].In addition, there are several works on forecasting the laser-ablation spot comparing ANN with different algorithms such as genetic programming (GP) and design of experiments (DoE) [13,14].In all these approaches, the ML-based methods were able to achieve high predictive accuracy over the analytical and experimental models.
In the case of laser texturing for surface functionalization, ANN was applied for classification of the topographical functional response.Thus, a general approach to predict the water contact angle on laser-induced periodic surface structures (LIPSS) was demonstrated with an accuracy of 10 degrees within the static water CA measurement uncertainty [15].Similarly, more complex convolutional neuronal networks (CNN) have been used to monitor the defects in laser welding and laser metal deposition processes based on the real-time mid-wave infrared imaging.The authors demonstrate an accuracy of 96.4% [16].
This work presents the first approach to predict the resulting surface roughness on two commonly used machining materials, stainless steel and Stavax, for laser surface texturing using a commercially available machine.Such materials are typically used for molding applications, such as molding polymers, and the rough surfaces of the mold is exploited to achieve a matting effect on the molded material.It focuses on the comparison of applicability of ANN and RF to predict the surface roughness Sa only from the machine parameters for direct laser writing.With the presented approach, it will be possible to predict the surface roughness for processing parameters that were not included in the initial dataset ofprocessing parameters for the used materials and possibly expand it to other metals or other laser surface texturing methods in the future.

Materials
Two different stainless steel alloys, X5CrNi18-10 (stainless austenitic chromium nickel steel, EN 1.4301/AISI 304) and Uddeholm Stavax ESR (specialized mold steel), were used for the experiments.The EN 1.4301 samples have a dimension of 55 mm × 85 mm with a thickness of 0.7 mm and an initial surface roughness Sa of ~0.16 µm.The samples made of Stavax material have dimensions of 45 mm × 45 mm with a thickness of 3 mm and a surface roughness Sa of 0.50 µm.The materials have been chosen because of the expected similar laser texturing behavior, allowing the prediction results to be compared.Both initial surfaces are shown in Figure 1 and both samples were cleaned with ethanol before texturing.The chemical composition of the presented alloys is described in Table 1 [17,18].

Surface Characterization
The textured surfaces were analyzed using a white light interferometry microscope  After laser processing, the samples were not subjected to any further cleaning procedures.The materials were chosen due to their relevance in several industrial sectors (e.g., food industry [19] or aerospace [20,21]).These materials, normally used for molding applications, have a rough surface texture.

Surface Characterization
The textured surfaces were analyzed using a white light interferometry microscope (Sensofar S Neox) with a 50× objective.The lateral and vertical resolution of the objective is 340 nm and 4 nm, respectively.With the objective used, an area of 800 µm × 800 µm was recorded for each textured region for analysis.The roughness parameters were extracted according to ISO 25178-2 using the software MountainMap ® (Digitial Surf, France).

Experimental Setup and Direct Laser Writing
The texturing was performed on a GF AgieCharmilles LASER P400 U (Georg Fischer AG, Schaffhausen, Switzerland) using a 5-axis system with an integrated pulsed ytterbium fiber laser (IPG Laser GmbH, Burbach, Germany) with a wavelength of 1064 nm generating 100 ns pulses with a pulse energy of up to 3 mJ (@10 kHz).The laser beam is guided by using a scanning galvanometer with a 160 mm f-theta lens, reaching a spot diameter of 100 µm at the working position.The setup has been presented in detail elsewhere [22].To produce textures with different roughness, the surface was scanned using a one-pass strategy with a fixed hatch spacing of 50 µm, and for both materials, one resulting matrix is shown in Figure 2. As can be seen in the surface images, a chaotic surface texture with varying heights was generated, as expected for the chosen approach.These structures can be used for replacing sandblasting, where random structures with a roughness of 0.4 to 2.2 µm Sa are used.Additionally, a distinct difference between the initial surface (Figure 1) and the different textured laser fields can be observed.The available parameter space of the machine was systematically interrogated, changing the laser frequency, scan speed, and laser power.The tests were grouped in matrices of 100 individual textures.The used parameters are presented in Table 2 and were chosen so that the whole possible parameter space was scanned.This range was chosen in order to have a general roughness prediction model for the machine and material used.Each laser field was 3 × 3 mm and in a grid with a 0.2 mm margin.Consequently, each matrix was 31.8 mm × 31.8 mm and was placed in the center of the 400 × 400 mm scan field to avoid an elliptical beam profile from the f-theta lens.The textures were generated using only one pass with alternating scanning speed and a distance between the scanning lines (hatch distance) of 50 µm.As descripted above, the surface roughness was measured after texturing according to ISO 25178-2.For this purpose, 800 topography measurements for each material prediction were generated.The textures were generated using only one pass with alternating scanning speed and a distance between the scanning lines (hatch distance) of 50 µm.As descripted above, the surface roughness was measured after texturing according to ISO 25178-2.For this purpose, 800 topography measurements for each material prediction were generated.

Artificial Neural Network Approach
ANN approaches are computational models which have been inspired by biological neural networks [23].It consists of interconnected artificial neurons and processes information through differently weighted connections.These objects, called nodes, are arranged in layers, with the first layer being responsible for input and the last for output.The number of nodes in these layers must equal the number of input and output parameters.In between, there can be any number of layers with nodes, which are called hidden

Artificial Neural Network Approach
ANN approaches are computational models which have been inspired by biological neural networks [23].It consists of interconnected artificial neurons and processes information through differently weighted connections.These objects, called nodes, are arranged in layers, with the first layer being responsible for input and the last for output.The number of nodes in these layers must equal the number of input and output parameters.In between, there can be any number of layers with nodes, which are called hidden layers.Especially large networks are called deep learning networks.The precision of the network is affected by the number of nodes within the network [24].
In this work, the network has been implemented using scikit-learn [25], a Python library for predictive data analysis.As the surface roughness is a continuous parameter, a multilayer perceptron repressor (MLPRegressor) was used.While this approach can be utilized for nonlinear models, the nonconvex loss function may result in more than one local minimum during validation.Moreover, this approach is sensitive to the variance of the input parameters [24].Therefore, all parameters (input and output) were scaled by removing the mean and scaling to unit variance, and a Bayesian search was used to tune to model and determine the best parameters [26].For possible parameter of the estimator in the tuning process of the network, for the activation function the logistic sigmoid, hyperbolic Tan, and rectified linear unit function, was set, and for possible solver for the weight optimization stochastic gradient descent, a stochastic gradient, and an optimizer from the family of quasi-Newton methods, were selected.For the hidden layers, one to three layers with up to 350 neurons were specified.The best performing parameter set in the search was used for prediction.

Random Forest Approach
Random forest is the combination of uncorrelated decision trees so that each tree depends on the values of a random vector.Decision trees (DC) are a technique for the systematic classification of data objects and, thus, for the solution of decision problems [27].Here, the implementation was done using classifying decision trees fitted with a meta estimator (random forest regressor) using the scikit-learn python library [25].In this approach, features are randomly swapped at each split, resulting in different splits between groups of trees for the same training data.Similar to the neural network approach, a Bayesion search was used to tune the hyperparameters.A maximum depth of 150 was set for the subtrees and 500 to 1500 leaf nodes as the maximum [28].Since this approach is not sensitive to the variance of the input parameters, no feature scaling was applied in training and prediction in contrast to the neural network.For the maximal numbers of subtrees, a depth of 150 was also used.As in the case of the neural network, the best parameter set was used for prediction and analysis.As both models are conventional machine learning approaches, and the small dataset set used, the training time for each set was on average below five minutes.Therefore, these models can be quickly trained and easily applied to new data in practical applications.This addition emphasizes the efficient training time of the models, which is a desirable quality for practical implementation.However, this estimate does not, of course, include the initial time required to search for hyperparameters, as this can be a time-consuming process that can vary depending on the size and complexity of the model.

Analysis of the Dataset and Feature Construction
The dataset was split into 80% for training and 20% for validation of the networks.To increase the available parameters for the networks, further parameters, pulse overlap, pulse energy, and energy density were derived from the machine parameters.Thus, the laser material interaction on the sample is better reflected in the modeling approach, which increased the accuracy of the model.The pulse overlap (OP%) for the used texture strategy has been calculated from the distance p between two spots and the laser beam diameter D on the material as follows: As the hatch distance is identical for each textured field, it can, therefore, be neglected in the calculation.In addition, the pulse energy (E p ) was calculated from the laser power (P) and frequency f using Equation ( 2): To include the total amount of laser energy on the material into the model, the cumulative fluence dose (F C ), representing the total amount of applied laser energy per unit of area, has been calculated from the pulse energy, the hatch distance (HD), and pulse distance: With these additional features, the number of input accounts for the networks could be increased, thus improving accuracy.

Prediction Approach
For the prediction of the surface roughness, a feed-forward ANNs and RF network was applied to the data, for the performance evaluation, a cross-validation was used.The machine parameter from the experiment and the calculated feature shown above were fed into the algorithm as input.In order to determine the optimal parameters, a grid search was carried out utilizing a Bayesian optimization to shorten the computing time [29].
Figure 3a,b show comparison of predicted and measured data for both the RF and ANN models, respectively.As it can be seen from the measured Sa values, most of the resulting roughness values were around 1 µm, as expected for the given process parameters and the initial roughness of the material.For this range, both models respond better than for smaller or higher roughness values, as more data is available for training.For stainless steel, 79.6% of the training data is in this range, and for Stavax, about 81.1% of the data points.Surface roughness values below 0.5 µm were predicted more accurately for Stavax in general, which can be contributed to the higher initial surface roughness leading to a polishing effect for texturing with lower pulse energy in contrast to the stainless steel surfaces with a lower initial roughness [30].The large outliers for stainless steel above 1.5 µm and 1.2 µm for both models can also be contributed to this effect, as well as to parameter sets which are not typical for laser processing, as they produce high irregular surface structures.The RF leads to an accurate result for a given parameter space, as it is the combination of the prediction of many decision trees and, therefore, reduces the variance of the output [27].In this case, this leads to two opposing effects: fewer variants for the resulting prediction for the lower and higher ranges and more outliers overall, which can be seen by the obtained maximum absolute error (MAE).This effect can also be seen in the larger maximum error of 1.084 µm for RF (as described in Table 2) and the minimal error of 0.001 µm, which is too small for calculation of the overall approach.Additionally, this model has a higher overall accuracy for roughness close to the initial roughness, which can also be explained by the calculated reduced variance, being 0.007 below the resulting roughness of 0.5 µm and 0.02 for higher roughness values.This result is to be expected since a decision tree approach has higher accuracy is modeling nonlinear relationship between the input and output values for the known parameter space.
For the ANN approach, it can be seen, in general, that there are fewer outliers with a higher variance, as indicated by the larger mean error for both materials (0.078 µm for stainless steel and 0.047 µm for Stavax).This also leads to a higher error variance for roughness values below 0.5 µm.Similar to the RF, the prediction accuracy varies between the materials with better performance for Stavax.For example, for 316L, the MAE for RF is 0.148 µm and 0.039 µm for Stavax for the whole range.Similar results have been observed for the ANN approach, with MAE values of 0.037 µm and 0.139 µm, similar to the ANN approach, where the MAE was 0.037 µm for Stavax and 0.139 µm for 316L, respectively.However, neglecting the overall higher variance of the predicted parameters, this approach produces similar results for the two different materials.This can be contributed to the better adaptability of the ANN to nonlinear correlations between the input parameters [31].

Validation and Evaluation of Results
To compare the effectivity of the different models in predicting the resulting surface roughness, statistical evaluation was performed.The obtained results are listed in Table 3.For Stavax, both models achieve an accuracy over 90% (correlation factor R 2 over 0.9) with a maximum error below 0.25 µm, and for stainless steel, relative lower values of ~80%.The predicted results are generally close to directly measured data for all methods and, thus, can be used to predict the surface roughness in functional laser surface texturing.However, as can be seen from the mean absolute error of 0.047 µm for Stavax, both models produce better results compared to the predicted roughness on stainless steel, where the mean absolute error is almost twice as high (0.079 µm).This differences could be related to the lower variations of resulting Sa values for Stavax (compared to 316L), since the Stavax steel plates were produced using electro-slag remelting (ESR), yielding very low nonmetallic inclusions compared to stainless steel [32].For the ANN approach, it can be seen, in general, that there are fewer outliers with a higher variance, as indicated by the larger mean error for both materials (0.078 µm for stainless steel and 0.047 µm for Stavax).This also leads to a higher error variance for roughness values below 0.5 µm.Similar to the RF, the prediction accuracy varies between the materials with better performance for Stavax.For example, for 316L, the MAE for RF is 0.148 µm and 0.039 µm for Stavax for the whole range.Similar results have been observed for the ANN approach, with MAE values of 0.037 µm and 0.139 µm, similar to the ANN approach, where the MAE was 0.037 µm for Stavax and 0.139 µm for 316L, respectively.However, neglecting the overall higher variance of the predicted parameters, this approach produces similar results for the two different materials.This can be contributed to the better adaptability of the ANN to nonlinear correlations between the input parameters [31].

Validation and Evaluation of Results
To compare the effectivity of the different models in predicting the resulting surface roughness, statistical evaluation was performed.The obtained results are listed in Table 3.For Stavax, both models achieve an accuracy over 90% (correlation factor R² over 0.9) with a maximum error below 0.25 µm, and for stainless steel, relative lower values of ~80%.The predicted results are generally close to directly measured data for all methods and, thus, can be used to predict the surface roughness in functional laser surface texturing.However, as can be seen from the mean absolute error of 0.047 µm for Stavax, both models produce better results compared to the predicted roughness on stainless steel, where the mean absolute error is almost twice as high (0.079 µm).This differences could be related to the lower variations of resulting Sa values for Stavax (compared to 316L), since the Stavax steel plates were produced using electro-slag remelting (ESR), yielding very low nonmetallic inclusions compared to stainless steel [32].For the stainless steel prediction, it can be seen for both approaches, that the maximal errors are smaller in contrast to the Stavax results.This can be attributed to the lower initial roughness Sa of ~0.16 µm, which leads to less-pronounced structures after laser treatment.
Figure 4 shows the importance of the different evaluated input parameters on the prediction result for the random forest approach.Feature importance is computed as the standard and mean deviation on accumulation of the impurity decreased within each tree [27].For both materials, is can be seen that the cumulative fluence dose (Fc) on the surface has the most impact on the resulting surface roughness.The difference in the relative feature importance between stainless steel and Stavax for this parameter (Fc) can be attributed to the initial roughness of the material, similar to the maximum error.Consistent with Fc, the variation in surface roughness after the laser treatment on stainless steel 316L can be achieved for a small change in laser power, which is denoted by the significantly higher relative feature importance (0.051 compared to 0.174).If the parameter range for the used frequency or power was constrained, the impact of one parameter would have a greater influence.However, this is in direct contrast to the higher initial surface roughness of the Stavax material, where a small change in pulse energy may have a smaller effect on the resulting surface.This effect can also be seen in the importance of the pulse overlap on Stavax, as this parameter has a larger influence on the resulting roughness.This also causes a greater influence of the parameters of power and speed, since these are directly related to the achieved overlap (see Equation ( 1)).
Similar influences of the parameters can be assumed for the ANN approach, as the resulting prediction is similar.In consequence, the obtained results show that both approaches can be used to predict the resulting surface roughness of steel samples for the used machine and explored laser parameters.
higher relative feature importance (0.051 compared to 0.174).If the parameter ra the used frequency or power was constrained, the impact of one parameter would greater influence.However, this is in direct contrast to the higher initial surface ro of the Stavax material, where a small change in pulse energy may have a smaller e the resulting surface.This effect can also be seen in the importance of the pulse on Stavax, as this parameter has a larger influence on the resulting roughness.T causes a greater influence of the parameters of power and speed, since these are related to the achieved overlap (see Equation ( 1)).
Similar influences of the parameters can be assumed for the ANN approach resulting prediction is similar.In consequence, the obtained results show that b proaches can be used to predict the resulting surface roughness of steel samples used machine and explored laser parameters.

Conclusions
In this work, two machine learning algorithms have been studied on their capability to predict the resulting surface roughness Sa for direct laser writing from its process parameters on two different materials, stainless steel 316L and Stavax.The limitations and respective abilities for the algorithms, random forest and artificial neural network, were introduced and discussed.Additionally, a dataset was created covering the complete possible range of the laser machine to train a model for each algorithm, respectively.The focus was placed on the parameters: pulse frequency, scanning speed, and laser power, as those have the most impact on the resulting surface topography.It was shown that both machine learning approaches are able to predict the roughness with high precision.Accuracies of ~90% and ~80% were obtained on Stavax and stainless steel 316L, respectively, and independent of the used model (random forest and neuronal network).Thus, both approaches are suitable to predict the resulting roughness of laser-treated substrates and can, therefore, replace time-consuming parameter screenings or rely on vague experiencebased parameter settings.For the random forest model, the importance of the different features was analyzed to gain a deeper understanding of the relevance of the chosen input parameters from the laser processing.For both materials, the main influencing factor was found to be the applied cumulative fluence dose to the surface.Overall, this work lays the foundation for a further study of the application of machine learning approaches for more complex microstructure prediction in laser surface machining.Furthermore, it should be investigated whether the already trained algorithm, and the gained knowledge, can be transferred to new materials and, thus, the number of needed data and training time could be significantly reduced.Therefore, additional experiments of the influence of the roughness parameter would also be needed.In addition, it would be worth investing in an approach for different types of material, such as aluminum or polymer, as similar results could be expected.

Figure 1 .
Figure 1.Initial roughness of the material for (left) flat stainless steel 316L samples with Sa 0.16 µm and (right) for Stavax with Sa 0.50 µm.

Figure 2 .
Figure 2. Exemplary laser treated surface and resulting roughness (Sa) values for constant laser power of 18 W and frequencies (repetition rate) from 110 kHz to 200 kHz (bottom-top) and scanning speed from 1.1 m/s to 2.0 m/s (left to right) for the materials 316L (left) and Stavax (right).SEM images of the textured surface for both materials and four different process parameters (1-4)

Figure 2 .
Figure 2. Exemplary laser treated surface and resulting roughness (Sa) values for constant laser power of 18 W and frequencies (repetition rate) from 110 kHz to 200 kHz (bottom-top) and scanning speed from 1.1 m/s to 2.0 m/s (left to right) for the materials 316L (left) and Stavax (right).SEM images of the textured surface for both materials and four different process parameters (1-4).

Figure 3 .
Figure 3.Comparison of predicted and measured surface roughness Sa for RF (a) and ANN (b) for both materials: 316l (blue) and Stavax (red).The initial roughness for both samples is shown as dotted lines.The maximum absolute error (MAE) for the three ranges: lower 25%, upper 25%, and in between, is shown in the corresponding table.

Figure 4 .
Figure 4. Relative feature importance of the input parameter for the prediction using rando approach.

Figure 4 .
Figure 4. Relative feature importance of the input parameter for the prediction using random forest approach.

Table 1 .
Chemical composition (mass fractions in %) for stainless steel samples and Stavax.

Table 2 .
Experimental data for the model constructions (resulting surfaces of matrix 3 is shown in Figure2).

Table 3 .
Evaluation of ANN and RN prediction accuracy for the surface roughness Sa.