1 Introduction

Polymers have displaced other materials in a wide range of industrial applications due to their physical and performance features, as well as their inexpensive production costs [1]. Polymethylmethacrylate (PMMA) is a robust, resilient, and transparent thermoplastic with a high refractive index and great resistance to scratching, aging, and weathering [2]. PMMA is used in biomedicine, optics, solar, sensors, battery electrolytes, nanotechnology, viscosity, pneumatic actuation, molecular separations, and polymer conductivity [3]. Today, laser-assisted machining is a hot topic due to benefits such as high energy densities and control over the heated zone [4]. Laser cutting of polymers is gaining popularity due to its excellent quality and cutting speed, as well as its dependability [5]. Straight, accurate, and burr-free cuts or surface treatments are simple to achieve [6]. When the thickness of the cut materials increases, changes in the notch profile can be detected [7]. These often take the shape of kerf surface imperfections and curved profiles at the edges [8].

Carbon dioxide (CO2) laser cutting, which is accomplished by concentrating the light at a wavelength of approximately 10.6 µm, is effectively utilized in polymeric materials with low thermal conductivity [9]. CO2 laser cutting finds its place in the cutting or surface texturing of a wide variety of materials [10]. CO2 lasers have become the backbone of the material processing industry due to their ease of use compared to alternative processing tools. The most important advantages are more effective material usage, no tool wear, and high cutting quality [11]. The major laser cutting process parameters are laser beam power, transverse laser speed, auxiliary gas pressure, and focal length [12]. Sharifi et al. [13] evaluated the effect of CO2 laser cutting parameters such as laser power, cutting speed, nozzle distance and sheet thickness on the cutting of AL6061T6 alloy. In the findings of the study, laser power emerged as the most effective parameter in terms of cutting zone temperature and edge quality.

Anjum et al. [14] applied Gaussian process regression (GPR) technique to predict surface roughness, kerf width and kerf depth in PMMA micro-milling process with a CO2 laser machine using laser input parameters such as number of passes, incident energy, laser power and scanning speed. In [15], analytical and regression models were developed to examine the effects of laser power, scanning speed and pass number parameters of the CO2 laser machine on PMMA microchannel profile and depth, and surface roughness. In [16], the effect of laser power and cutting speed on the width and depth of microchannels formed during laser cutting of the material in the production process of Polydimethylsiloxane (PDMS) chips was investigated. In [17], the effects of microchannels machined on the PMMA substrate surface in a CO2 laser system on depth, width and aspect ratio were analysed with varying laser power and cutting speed. The effects of the parameters of the laser speed and power, and the position and orientation of the samples on the average surface roughness and dimensional accuracy of the CO2 laser cutting of thin PMMA sheets were investigated in [18]. The study by Konari et al. [19], which investigated the effects of laser processing parameters on the microchannel properties of polydimethylsiloxane, polymethyl methacrylate and microscope glass substrate, demonstrated that with the increase of laser power, deeper straight microchannels were formed. Prakash et al. [20] demonstrated focused cutting, unfocused cutting, and raster scanning strategies to create microchannels on PMMA substrate. In [4], it was noticed that when cutting PMMA material with CO2 laser, the kerf deflection increased at high cutting speed, laser power and gas pressure, the surface roughness was deteriorated at high laser power and low cutting speed, and a large heat-affected zone (HAZ) was formed.

Optimizing machining parameters in laser manufacturing processes requires experimental design, statistical data analysis, mathematical knowledge for formulation, and process-specific knowledge. However, instead of dealing with such difficult processes in which all parameters are modeled, the most dominant parameters are tried to be determined by statistical methods [21,22,23,24,25]. In recent years, metaheuristic algorithms, machine learning methods, and hybrid approches have been used in material processing to optimize laser processes such as cutting, drilling and machining. The following are the relevant studies in the existing literature on these three approaches.

2 Metaheuristic Studies

Elsheikh et al. [26] employed a genetic algorithm (GA) to acquire the optimal laser cutting parameters of polymethylmethacrylate sheets to optimize the kerf geometry. Regression formulas that model the laser cutting process are exploited for the fitness function in GA. Smoke emissions were minimized by GA during the laser cutting of polyvinyl chloride sheets in [27]. Pandey et al. [28] optimized the kerf taper and surface roughness by GA in the process of cutting titanium alloys using an Nd:YAG laser. Goyal and Dubey [29] employed GA approach to improve the quality of hole taper and hole circularity in the drilling process of nickel-based superalloys using Nd:YAG laser. In [30], optimum cutting quality associated with scanning speed and pulse density and frequency parameters in Nd:YAG laser milling was achieved by particle swarm optimization (PSO) technique. In the experimental study by Shrivastava and Pandey [31], a hybrid approach consisting of second-order regression models and PSO was applied to optimize kerf width and kerf taper during the laser cutting of the Inconel-718 sheet. Elsheikh et al. [32] benefited from the GA method to optimize laser cutting parameters exploiting second order regression model as an objective function to minimize the kerf taper. The optimum laser parameters giving geometrical properties such as good hole taper and circularity for drilling small diameter holes in hard-to-cut titanium alloy sheets were obtained using GA in [33]. Madić et al. [34] determined the optimum laser cutting parameters to minimize the steepness of the cutting edge obtained in CO2 nitrogen inert cutting of AISI 304 stainless steel using the response surface method (RSM) and GA.

Murat et al. [35] utilized PSO and GA methods to optimize the tensile strength of the manufactured part by taking into account the process parameters of laser power, layer thickness, scanning speed and structure direction in the selective laser melting (SLM) process. Gautam et al. [36] applicated Firefly Algorithm to optimize kerf width, kerf deflection and kerf thinning parameters according to lamp current, pulse frequency, pulse width, air pressure and cutting speed parameters in laser cutting of BFRC sheets. Gautam et al. [37] applied a teaching–learning-based optimization (TLBO) approach to minimize kerf deviations in laser cutting of Kevlar-29 composite laminates with Nd:YAG. This study brought out that the dominant parameters were lamp current and laser cutting speed. In [38], lamp current, pulse frequency and cutting speed parameters were optimized with TLBO approach to minimize top/bottom kerf width, top/bottom kerf deviation and kerf taper in laser cutting of hybrid composite sheet based on Kevlar-29 and Basalt fiber. Acherjee et al. [39] conducted experimental investigation and process optimization of transmission laser welding of dissimilar plastics are carried out using response surface methodology (RSM) and flower pollination algorithm (FPA) integrated approach. In another study with FPA, the desired process performances were achieved by optimizing the machining parameters in the electrochemical machining (ECM) process [40]. Acherjee et al. [41] optimizes the processing parameters of the ultrasonic machining (USM) process using cuckoo search (CS) and chicken flock optimization (CSO).

2.1 ANN Studies

Artificial neural networks (ANNs) have been widely used in the laser cutting process, as there are many interactive parameters and complex processes that affect the cutting quality of a material with laser. The ANN with multilayer perceptron (MLP) architecture is proposed to determine, predict and analyze the dominant parameters in the CO2 laser cutting of PMMA sheets in [42]. Ružiak et al. [43] proposed the exploit of an ANN to predict the characteristics of the cutting kerf and the HAZ considering the common impact of laser performance and annual circle number during cutting spruce wood using CO2 laser. Kechagias et al. [44] implemented a feedforward and backpropagation neural network (FFBP-NN) to optimize the kerf width and kerf angle at different distances from the surface during cutting PMMA sheets with a low-power CO2 laser. A convolutional neural network (CNN) model was developed for the analysis and estimation of kerf width in laser cutting of unoriented thin electrical steel in [45]. Klancnik et al. [46] introduced a backpropagation ANN model which maps the parameters of laser power, cutting speed, and auxiliary gas type to the parameters of kerf width and average surface roughness to predict the cutting quality of tungsten alloy sheet with CO2 laser. An artificial intelligence (AI) application was suggested predicting the kerf geometry and hole diameters (at the upper and downside) during laser micro-cutting and micro-drilling on NIMONIC 263 superalloy plate in [47]. Vagheesan and Govindarajulu [48] revealed that feedforward backpropagation ANN is more reliable in estimating surface roughness and kerf width parameters for cutting aluminum with CO2 laser. Madic and Radovanovic [49] exposed that ANN outperforms regression models in assessing surface quality in mild steel cutting using a CO2 laser. Peko et al. [50] introduced a model for estimating kerf width with input parameters (cutting height, cutting speed, and arc current) in the plasma jet metal cutting process using a feedforward backpropagation ANN.

2.2 Hybrid Studies

A hybrid ANN and real coded genetic algorithm (GA) approach was demonstrated to predict kerf width and surface roughness considering cutting speed, laser power and auxiliary gas pressure when cutting mild steel with a CO2 laser in [51]. Pandey and Dubey [52] proposed a hybrid genetic algorithm-neural network approach to predict the surface roughness and kerf taper characteristic of titanium alloy plate during Nd:YAG laser cutting. In [53], an optimized artificial intelligence model consisting of long short-term memory (LSTM) and chimpanzee optimization algorithm (CHOA) has been developed for laser cutting of basalt fiber-reinforced polymer composites (BFRC) using control factors such as cutting speed, air pressure, pulse frequency, pulse width, and lamp current. In [54], a hybrid approach consisting of random vector functional link network (RVFL) and equilibrium optimizer (EO) was used to predict kerf quality indeces with high accuracy in CO2 laser cutting of PMMA sheets. Chaki and Ghosal developed [55] a hybrid ANN and simulated annealing (SA) model to predict cut quality during laser cutting of mild steel plates. ANN and RSM methods were established to predict the density of SLM fabricated parts in Ti6Al4V materials in [56]. PSO, self-adaptive harmony search, and GA were integrated into these models and the impacts of laser processing parameters and their interactions on the part porosity were assessed. Zhang et al. [57] proposed an approach based on a multiobjective slime mold algorithm (SMA) and support vector regression to optimize the process parameters of laser coating.

The following conclusions can be drawn from the literature review:

  1. (a)

    Statistical method such as analysis of variance (ANOVA) is used to determine the dominant parameter in the laser cutting process.

  2. (b)

    The mathematical relationship between laser processing parameters and output parameters such as kerf width, kerf depth and surface smoothness is mostly modeled by ANN.

  3. (c)

    GA and PSO methods from metaheuristic algorithms come to the fore in the optimization of laser process parameters.

  4. (d)

    Second-order regression models are generally applied as objective function for metaheuristic algorithms.

  5. (e)

    There is no metaheuristic algorithm that can solve every optimization problem efficiently and effectively. In other words, a method that produces an optimal solution for one problem may not do it for another problem.

Changing the number or range of laser processing parameters can cause a difficult problem to predict in the kerf geometry problem, which is tried to be optimized. For this reason, modeling the laser cutting process, examining the parameter effects, and revealing an optimization process where these output conditions are provided at the same time is a very important issue. Therefore, investigating and selecting the capabilities of different metaheuristic algorithms on the same problem is important for performance evaluation.

In this study, the effects of cutting parameters (laser power, cutting speed, and standoff distance) on kerf width and depth were analyzed to achieve a good cut quality in PMMA sheets in the CO2 laser cutting process. First, an ANOVA test and sensitivity analysis were implemented to interpret the effects of laser input parameters on output parameters. Sensitivity analysis was carried out to examine the sensitivity of laser parameters over the specified range. Second, to model the kerf width and depth properties, fifth-order nonlinear regression models were generated using the data obtained from the experimental study through the MATLAB Curve Fitting tool. The accuracy of the models was checked for R2, corrected R2 and root-mean-square error (RMSE) metrics. In the selection of metaheuristic methods to be applied to the problem, first of all, GA and PSO methods, which are widely used in similar studies in this field, were determined. In addition to these methods, ant lion optimization (ALO) and whale optimization algorithm (WOA) methods, which are accepted in the literature, were selected. Since the convergence performance of metaheuristics is highly dependent on the selection of control parameters and fitness functions, algorithms with different numbers of control parameters were chosen in this study. The produced regression models are exploited as fitness functions of the proposed metaheuristic algorithms. Although there are many machine learning techniques, ANN was used in this study as in other literature studies. The aim here is to prove the success of the optimization of the kerf width and depth parameters of the proposed regression models and metaheuristic algorithms by using the modeling and predictive power of ANN rather than proposing a new ML method. The simulation results revealed that the laser power was the dominant parameter compared to the cutting speed in the ANOVA test carried out on the experimental data. In the sensitivity analysis, it was observed that the sensitivity of the laser power and laser speed parameters changed depending on the standoff distance.The values obtained in the PSO method were considered to be more significant as a result of the ANOVA test performed to control the adequacy of metaheuristic algorithms. Therefore, the PSO algorithm has come to the fore in finding the optimum laser cutting parameters. The parameters suggested by the PSO were applied to the ANN model and compared with the metaheuristic optimization process. The results proved the accuracy of the fifth-order nonlinear regression models and the chosen metaheuristic method.

The contribution of this study to the literature is presented below:

  1. (a)

    In the metaheuristic-based process proposed, optimum laser input parameters can be found where many desired output parameters are provided simultaneously while Taguchi, ANOVA, and response surface methodology (RSM) methods are utilized to verify the percentage contribution of each laser process parameter on the desired outputs.

  2. (b)

    In addition to GA and PSO methods, which are widely used in the optimization of laser parameters, ALO and WOA methods that have not been implemented before are analyzed.

  3. (c)

    The results obtained contribute to the metaheuristic field in terms of evaluating the performances of the algorithms, and to the manufacturing field in terms of evaluating the effects of the laser parameters suggested by the algorithms on the laser cutting.

The rest of this paper is structured as follows: The following section presents the metaheuristic methods utilized in the study. The feedforward neural network (FFNN) model is discussed in Sect. 3. The experimental setup which consists of experimental data acquisition, the ANOVA test, mathematical modeling, sensitivity analysis, and ANN modeling exploited is explained in Sect. 4. Implementation and results are given in Sect. 5. The study concludes with Sect. 6, which explains implementation and findings.

3 Metaheuristic Algorithms

Metaheuristic algorithms are widely used to address complex optimization problems where traditional approaches fall short. It is seen that many different metaheuristic algorithms are used in the literature. They apply different methodologies to reach the optimum solution. The most important advantage of metaheuristic algorithms over traditional optimization methods is that they produce optimum results without being caught in the local optimum. In this study, genetic algorithm (GA), particle swarm optimization (PSO), whale optimization algorithm (WOA), and ant lion optimization (ALO) are utilized.

GA, an evolutionary algorithm, is inspired by natural selection and biological reproduction processes of the fittest individual. The GA is built on the concept of survival of the fittest, with the best solution emerging from previous generations. GA uses selection, crossover, and mutation processes to produce new progeny from previous generations [58,59,60,61].

PSO is a method that uses minimization to solve a nonlinear and multidimensional problem effectively. PSO is a simulation of a social system inspired by the behavior of flocks of fish and birds. PSO is significant in herd intelligence algorithms because of its minimal constraint on fitness function continuity and capacity to adapt to several changeable situations [62, 63].

The ALO algorithm is another form of algorithm that simulates ant lion hunting. Its random walk simulates the five primary hunting processes: trapping, trapping ants, capturing prey, and re-setting traps. ALO and its derivatives have been used to solve a diverse set of optimization issues [64,65,66].

WOA is a swarm-based metaheuristic algorithm inspired by humpback whales' natural bubble-net hunting behavior. It is preferred in optimization issues because of its benefits such as simple structure, less operator requirements, quick convergence, and fast discovery phases [67,68,69].

Table 1 tabulates the advantage-disadvantage of these methods.

Table 1 The advantage-disadvantage of GA, PSO, ALO, and WOA [66, 70,71,72]

It is clear from Table 1 that metaheuristic algorithms have advantages and limitations over each other. Therefore, there is no single algorithm that stands out for every problem.

4 Neural Network Model

Neural networks (NNs) replicate the ability of the human brain to recognize patterns in data collection. NNs, which offer faster and more powerful solutions to complicated problems, give robots or computers the capacity to learn in the same way that humans do. A feedforward neural network (FFNN) is a sort of multilayer perceptron that is highly prevalent (MLP). An FFNN has an architecture that consists of an input layer, a hidden layer, and an output layer. The first layer receives the input variables, and the number of neurons in this layer equals the number of input variables. By modifying the input values, the hidden layer communicates with the output layer. It is densely packed with neurons. The output layer displays the outcome of the applied problem. The number of neurons in this layer is dependent on the number of issue output variables.

Figure 1 depicts a single hidden layer FFNN design. As seen in the diagram, each neuron in a layer is linked to all neurons in the preceding layer.

Fig. 1
figure 1

Feedforward neural network architecture with a single hidden layer [73]

The output of a neuron is derived by calculating the weighted sum of the outputs of the neurons in the previous layer, as given in Eq. (1) [74]

$$N_{j}^{h} = \mathop \sum \limits_{r = 1}^{N} w_{rj} i_{j} + b_{j}^{h}$$
(1)

where wrj is the weight of the link between the previous layer's r-th neuron and the following layer's jth neuron. The bias input for each neuron is represented by the b parameter. In the hidden layer, the weighted sum is transmitted via the tangent sigmoid activation function, and in the output layer, the linear activation function. The mathematical expression of the tangent sigmoid function is shown in Eq. (2) [75].

$$f\left( x \right) = \frac{2}{{1 + e^{ - 2x} }} - 1$$
(2)

where x refers to the output of a neuron \(\left( {N_{j}^{h} } \right)\). The output of the tangent sigmoid function always remains in the range [− 1, 1]. After the number of hidden layers and the number of neurons in each layer are decided, the training phase is performed. In this process, the weights that are considered random at the beginning are updated at each epoch value so that the network converges to the optimum weight values.

5 Experimental Setup

The flowchart of the proposed process is illustrated in Fig. 2. The process starts with the acquisition of experimental data. Analysis of variance (ANOVA) and the sensitivity analysis are executed to assess the impact of the experimental data on the process. Artificial neural network (ANN) modeling is employed to justify the accuracy of the proposed metaheuristic-based optimization process. The metaheuristic flowchart contains the common steps to be used in all the comparing methods.

Fig. 2
figure 2

Flowchart of the proposed optimization process

5.1 Data Acquisition

Figure 3 shows a schematic diagram of a 130 W air-supplied laser equipment used to make kerf on a polymethylmethacrylate (PMMA) sheet. The laser utilized has a wavelength of 10.600 nm. The machine has a working area of 1300 mm × 1600 mm and a maximum cutting speed of 4000 mm/min. The resolution is 1200 DPI, and the sensitivity is less than 0.01 mm. The air supply acts as a shielding gas, eliminating molten debris from the cutting zone and protecting the lens from the fumes that occur. Furthermore, a vacuum system removes the created smoke from the machine.

Fig. 3
figure 3

Schematic diagram of the experimental setup used to cut a kerf with a CO2 laser

In general, the key parameters that determine the kerf profile produced by carbon dioxide (CO2) laser cutting are cutting speed, laser power, auxiliary gas pressure, and focus point (or nozzle distance) [3, 8]. The effects of laser power (P or p), cutting speed (S or s), and nozzle distance (Nd) processing parameters on the width and depth of the kerf opened in 4-mm-thick PMMA sheet are experimentally investigated in this work. The thermophysical parameters of PMMA sheets are listed in Table 2.

Table 2 Thermophysical properties of PMMA [76]

Prior to the experimental investigation, the maximum and lowest values for the parameters of laser power, cutting speed, and nozzle distance were determined. In the laser, the nozzle distance is calculated for intervals of a specific thickness. The mean kerf width and depth for these Nd values were measured based on the power and speed values, and the results are shown in Table 3. The width and depth of kerf produced on the PMMA sheet surface were measured with the help of a non-contact laser optical profilometer (Nanovea PS50, USA). The kerf depth and width measurements were accomplished according to ISO 25178–2:2012. The penetration of the kerf in the depth axis was measured from the direction of the thickness axis in the depth and width measurements. Figure 4 illustrates the measuring optical profilometer and measurement procedure.

Table 3 The laser parameters and values used in the experimental study
Fig. 4
figure 4

Optical profilometer and schematic for measuring the depth and width of the CO2 laser kerf on a PMMA surface

Table 3 illustrates the laser parameters and values used in the experimental study. The values given here were obtained as a result of preliminary study. In the study, it was observed that if laser power less than 15W was utilized, no significant trace was formed on the PMMA. For powers above 45 W, PMMA sheets were cut. Likewise, more power levels were used because the laser parameter stood out as the most effective parameter. It has been noticed that if the speed value is increased more than 150 mm/s, the kerf geometry disappears as the amount of energy transferred to the surface decreases. Since precision is required in measuring the standoff distance, materials with certain thickness measurements were employed.

5.2 ANOVA Test

To measure the kerf geometry, the experiments were carried out using the nozzle distance, cutting speed, and cutting power parameters listed in Table 4. During the measurement, the data were obtained from three different places and the average of the values was taken. Before obtaining the equations from the experimental data set via regression, Analysis of Variance (ANOVA) is performed to find the interaction between the process variables and the response [77,78,79]. For this purpose, statistical significance was tested with F-value (Fischer variation ratio) and p-value (significant probability value). The results are tabulated as given in Table 5. The main purpose of the statistical test is to observe the effects of the input parameters on the output parameters. Since the nozzle distance is not a remotely controlled parameter in the laser device used, functions have been created for fixed distances.

Table 4 Design of experiment plan and measured values
Table 5 p-value / F-value test of the experimental dataset

The laser beam is strongly influenced by the laser standoff distance, which changes the power distribution in the deposition plane corresponding to the substrate surface. The laser beam, like any directional light beam, deviates slightly from the nominal size as the distance between the plane of deposition and the focal point increases. Therefore, the change of standoff distance changes the effect of laser power and laser speed parameters in the kerf geometry. In Table 5, the relationship between kerf depth and kerf width, depending on the input parameters of cutting speed and laser power, is examined. The low p-value reveals the strength of the relationship between the variables. As seen in Table 5, laser power arises the greatest effect on kerf depth at 3 mm standoff distance and on kerf width at 5 mm distance. When evaluated in terms of laser speed, the greatest effect on the kerf depth occurred at a distance of 5 mm, while the effect on the kerf width appeared at a distance of 4.1 mm. It is explicit that the effect of laser power on kerf depth decreases with increasing nozzle distance, However, this linear relationship does not occur with changes in kerf width. The results in the bottom line of Table 5 were obtained by using all of the data in Table 4. From this, it turns out that the input parameter that affects the output parameters the most is the laser power.

5.3 Mathematical Modelling

Curve fitting is a popular technique for reconstructing curves from experimental data. To obtain curves that match limited requirements, several curve-fitting techniques are applied [80]. Most algorithms assume that the implicit polynomial degree that best reflects the points is known. The MATLAB CF tool was used to perform curve fitting in this investigation. The preliminary testing revealed that the polynomial technique produced the best curve-fitting results. Table 6 shows the generated kerf geometry polynomial equations for different nozzle standoff distances. Here, p and s parameters represent laser power and cutting speed, respectively. While generating polynomials in MATLAB CF, the parameter p was chosen from the fifth order and s from the second order.

Table 6 Polynomial equations representing kerf geometry variation at various nozzle standoff distances

The proximity of the measured values to the observed values in the model may be used to understand the fit of a regression model. This is measured using a variety of criteria. The values observed in the MATLAB CF tool are utilized in this case. The fitting accuracy provided by the R-squared (R2) values indicates the curve's ability in fitting the real raw signal. R2 values close to one imply that the estimations completely fit the data [81, 82]. The adjusted R2 is crucial in determining how well the model explains the response variable from the independent factors. R2 can occasionally lead to certain misunderstandings. Statistically, the model's explanatory power grows as the R2 value increases. However, the large R2 does not appear frequently in empirical work since the practical value of explanatory factors, not only statistics, must be considered. It is critical to keep track of the revised R2 value. The root-mean-square error (RMSE) is the square root of the residual variance and represents the absolute fit of the created model to the data. R2 is a relative measure of fit, whereas RMSE is an absolute measure of fit. A lower RMSE value suggests a more accurate fit. The maximum and minimum range of the RMSE value changes based on the application and the size of the data utilized. It is acknowledged that the RMSE values obtained in Table 6 are suitable because the micrometer measure was utilized in this investigation and the values were large, as shown in Table 4. The R2 value in Table 6 is greater than 0.99, and the adjusted R2 values are greater than 0.97. This demonstrates that the curves generated using the curve fitting tool are correctly matched.

Figure 5 shows the cutting speed and laser power effects on kerf width change, and kerf depth change at various nozzle standoff distances. These graphs were created by using the MATLAB CF toolbox. Figure 5a and b show the results for a standoff distance of 3 mm. It is obvious that the kerf depth changes rapidly depending on the power variations and this situation coincides with the figures in the sensitivity analysis. When the kerf width and depth are evaluated in terms of cutting speed, the sensitivity is smaller and in the opposite direction. In other words, the kerf depth and width decrease with the increase in the cutting speed. The results in Fig. 5c and d are similar. However, Fig. 5d depicts that the sensitivity to power change decreases after 30W, as revealed in the sensitivity analysis. This is because a saturation zone is formed. A similar result is also observed in the results of the kerf depth sensitivity, as shown in Fig. 5f and h. Considering Fig. 5a, c, e and g, the maximum value of the kerf width decreases with the increase of the standoff distance. This is because the machining surface is in the negative region. That is, the focus point remains below the processing surface, and due to the tapering of the laser beam, the laser spot area acting on the sample surface decreases due to the increasing distance. As a result, changing the standoff distance significantly changes the effects of laser power and laser speed on the kerf geometry.

Fig. 5
figure 5

Cutting speed and laser power effects on kerf width change (a, c, e, and g), and kerf depth change (b, d, f, and h) at various nozzle standoff distances

5.4 Sensitivity Analysis

Sensitivity analysis is a mathematical method exploited to compare or validate modeled data and experimental outputs. It is done to determine critical parameters in an experimental process or to find the trend of a parameter on output. Mathematically, to determine the sensitivity, the partial derivative of the objective function with respect to a certain variable is taken [83, 84].

When analyzing Figs. 5, 6, 7, 8 and 9, it can be seen that some graphs are in the positive region, and some are in the negative region. When the graphs are in the positive region it means that the output parameter value increases with the input parameter. Similarly, negative values indicate that the output parameter value decreases with the input parameter. A large sensitivity value indicates that these changes are realized at a high rate.

Fig. 6
figure 6

Sensitivity analysis results of laser power a and laser speed b (constant parameters for a: speed 100 mm/s, standoff distance at 3 mm, constant parameters for b: power 30W, standoff distance at 3 mm)

Fig. 7
figure 7

Sensitivity analysis results of laser power a and laser speed b (constant parameters for a: speed 100 mm/s, standoff distance at 4.1 mm, constant parameters for b: power 30W, standoff distance at 4.1 mm)

Fig. 8
figure 8

Sensitivity analysis results of laser power a and laser speed b (constant parameters for a: speed 100 mm/s, standoff distance at 5 mm, constant parameters for b: power 30W, standoff distance at 5 mm)

Fig. 9
figure 9

Sensitivity anlysis results of laser power a and laser speed b (constant parameters for a: speed 100 mm/s, standoff distance at 6 mm, constant parameters for b: power 30W, standoff distance at 6 mm)

When the laser beam is focused on the surface of the material, the beam intensity reaches its maximum value. If the laser beam is focused at the same distance above or below the material surface, the laser intensity at the material surface will be the same. Because the laser spot size is the same at these two points. However, when the laser beam is focused on a point above the material surface, the high energy in the focus interacts with the material vapor. Thus, part of the laser beam cannot be transferred to the material surface. In this event, called plasma shielding, a high temperature plasma or vapor cloud may form on the material. This plasma or vapor cloud prevents some of the laser beam energy sent to the material surface from reaching the material surface. In the sensitivity analysis results of laser power graphics given in Figs. 5, 6, 7, 8 and 9, the reason for obtaining negative sensitivity values at high power is plasma shielding occurring at these high laser power values. The reason for the negative sensitivity seen in the same graphs at low power is that the minimum amount of energy required for surface modification could not be transferred to the material surface. As the power of the beam sent to the material is increased, the material first heats up, then melts and finally ablation occurs. This negative sensitivity was observed at the evaporation threshold at low powers.

Figure 6a demonstrates the sensitivity of laser power over kerf depth and kerf width in a laser cutting process. Positive values indicate that output values increase with increasing power values. In terms of kerf depth, the sensitivity remains at the same level in the 20-40W range of laser power. This means that the increased power value shows the same sensitivity on the output. In terms of kerf width, it continues to increase as the laser power increased. Because higher laser power transfers more energy to the material. The result is that more material melts and is removed from the interaction zone to the edges, resulting in greater kerf width.

Figure 6b shows the effect of laser speed on kerf depth and kerf width. The negative values here indicate that the output values decrease with increasing speed values. In terms of depth, velocity sensitivity is on average at the same level. However, from the point of view of kerf width, the effect decreased a little with the increase of the speed value. Moving the laser nozzle faster will reduce the amount of energy per unit moment.

As seen in Figs. 7, 8, and 9, similar graphs were procured within 4.1, 5, and 6.2 values of standoff distance. Figure 7a exhibits that the sensitivity decreases with increasing laser power in terms of kerf depth. This means that the power increase does not increase the depth more than the initial values. On the other hand, the power sensitivity on the kerf width forms around an average value. In Fig. 7b, the negative value of the graph indicates that the kerf depth value decreases with the increase in speed, and the sensitivity increases in terms of depth. In terms of kerf width, the sensitivity decreases as the speed increases. Similar inferences can be drawn for Fig. 8.

The results with a standoff distance of 6 mm are given in Fig. 9. In this case, the standoff distance has moved away from the experimental sample. It is clearly seen from Fig. 9a, the effect in terms of kerf depth is positive at low power values, but then it turns negative. In the sense of the kerf width, the power effect is generally low, but tends to decrease. Figure 9b, the laser speed and depth values decrease compared to the initial speed, and while the sensitivity increases for depth, it tends to decrease slightly for width.

5.5 Artificial Neurol Network Model

The parameter settings used to train the single-layer feed forward neural network (FFNN) are shown in Table 7. The experiment was carried out using an Intel Core i5 CPU and 8 GB of RAM. The model was built with the MATLAB Neural Network Toolbox. The model was run 1000 times in order to examine the neural network architecture. In each trial, the training, validation, and testing data differ at random. The data is utilized for training 90% of the time, validation 5% of the time, and testing 5% of the time.

Table 7 The hyper-parameters of Neural network used

The settings were empirically initialized using the trial-and-error approach. NN is trained for 100 epochs. The network is trained in each trial, and the mean squared error (MSE) value, which measures network performance, is calculated. Figure 10 depicts the cumulative distribution function (CDF) of the epochs with the greatest MSE training performance across 1000 trials. The finest training outcomes are readily apparent at 16 epochs and lower.

Fig. 10
figure 10

Cumulative distributions of epoch length at which the best training performance is achieved

Figure 11 illustrates the average MSE variation in the number of neurons in the hidden layer during the training and validation phases. Each point in the figures corresponds to 50% of the cumulative distributions (CDF = 0.5), i.e., the average, of the MSEs obtained after 1000 runs. It is clear from Fig. 11 that the average MSE decreases as the number of neurons in the hidden layer increases. However, validation error increased in the hidden layer architecture with 15 or more neurons. Therefore, the number of neurons in the hidden layer is set to 15 as listed in Table 7.

Fig. 11
figure 11

Average MSE vs the number of hidden neurons for the training and validation stage

By feeding the laser power and cutting speed parameters obtained as a result of metaheuristic optimization to the trained NN, the depth and width values are estimated. In this way, 1000 values for MSE, depth, and width are procured. The CDF of the MSE is plotted. The best MSE values at CDF values less than 0.5 are determined as depicted in Fig. 12. To procure the best performance, the results in Table 9 are achieved by taking the average of the depth and width values of the NN output that gives the MSE values less than 0.00638599.

Fig. 12
figure 12

Cumulative distributions of mean squared errors in the testing stage

In order to compare the results of the regression model and artificial neural network (ANN), the laser parameters used in the experiment were applied as an introduction to the proposed 5th order regression equations and ANN architecture. The data obtained are illustrated comparatively in Figs. 13 and 14. In Fig. 13, it is seen that the polynomial plot obtained from the regression model produced for the kerf depth overlaps with the experimental data with high accuracy. Thus, the accuracy of the regression model was validated by ANN as well as analysis of variance (ANOVA). These results prove that the produced regression model can be exploited as a fitness function in metaheuristic algorithms. The results obtained for the kerf depth are also valid for the kerf width model as seen in Fig. 14.

Fig. 13
figure 13

Comparison of experimental, regression and ANN methods for the kerf depth

Fig. 14
figure 14

Comparison of experimental, regression and ANN methods for the kerf width

6 Implementation and Results

The metaheuristic algorithms used in this study include genetic algorithm (GA), particle swarm optimization (PSO), whale optimization algorithm (WOA), and ant lion optimization (ALO). They are used to determine the optimal laser power and cutting speed. Table 8 lists the hyperparameters for the optimization methods used in this study.

Table 8 The hyperparameters of the metaheuristic algorithms used

Optimization, in general, is the process of determining the minimum and maximum values of a continuous or discontinuous function. Simulation techniques may be used to determine the optimization function, often known as the fitness or objective function. The ideal solution may not always be obtained during an optimization process owing to flaws that may occur from the problem itself. As a result, choosing the fitness function is critical in metaheuristic approaches. The equation presented in Eq. (3) is employed as a fitness function in this research.

$${\text{fitness}} = \left| {f_{{w\_{\text{des}}}} - f_{w} } \right| + \left| {f_{{d\_{\text{des}}}} - f_{d} } \right|$$
(3)

where fw_des and fd_des are the average desired width and depth values to be found. The fw and fd are the generated kerf geometry polynomial equations given in Table 6. As shown in Eq. (3), the minimization procedure will be carried out using metaheuristics. In other words, they will compute the compatibility function, nozzle distance, speed, and power parameters to get the function closer to zero, as shown in Table 9's best cost column.

Table 9 Metaheuristic optimization outputs for GA, PSO, ALO, and WOA

Table 9 compares the performance of the GA, PSO, ALO, and WOA metaheuristics for the specified kerf geometry. The best cost value in the table represents the algorithm's convergence quality. When it comes to minimization, a low best cost value suggests that convergence is preferable. When the table is studied, it is clearly seen that the PSO approach outperforms the other methods in terms of convergence. The first value in the first row of the table corresponds to the value in the 12th row of Table 4. These data were used to evaluate the polynomials' appropriateness. The parameters derived from the optimization approaches are nearly identical, as seen in the first line of Table 9. This demonstrates that the optimization strategies are effective. The numbers in the second and third rows of Table 9 represent intermediate values that were not acquired experimentally, and so do not appear in Table 4. When the standoff distance was 4.1 mm, the optimum solution was reached by all algorithms, and the PSO approach provided the best convergence. The ALO approach performed better in the kerf geometry in the third row. Only width and depth optimization were performed on the values in the fourth and fifth rows, respectively. The idea is that in some circumstances, just the width and depth parameters are required. In these circumstances, because one of the width or depth equations is utilized as the fitness function, all approaches show improved convergence. The PSO approach achieved the best convergence in these circumstances.

Table 10 lists the F-value and p-value test results showing the interaction between the best cost values of the metaheuristic algorithms, the performances of which are presented in Table 8, and laser power, cutting speed, and standoff distance. The main purpose here is to compare the performance of metaheuristic algorithms on the kerf geometry problem rather than finding meaningful p-value and F-value. As can be seen from Table 9, the best cost values vary for each outcome. When the p-values and F-values in Table 10 are examined, it is seen that the values obtained in the PSO method are more significant. This relationship is clearly seen in the "Best Cost" columns in Table 9. The best cost values are reached by the PSO method. As a result, the PSO method comes to the fore in terms of both evaluations. in terms of laser power suggested by metaheuristics, the ALO method is the other successful method after PSO. Considering the suggested cutting speed parameters, the WOA method can be considered after PSO.

Table 10 Performance comparison of metaheuristic methods with p-value / F-value testing

In Table 11, the kerf geometry obtained from the input parameters suggested by the selected PSO method and the values found for these inputs by the ANN were compared. When the PSO and ANN results are analyzed, it is clear that the data on kerf width and depth seem consistent. While the kerf geometry polynomial used as a fitness function in the first three lines consists of the kerf depth and kerf width functions, the fitness function applied in the fifth and sixth lines consists of only the kerf depth and kerf width functions, respectively. The results for the desired kerf geometry are on the left side of the table, while the relative error values for PSO and ANN are given on the right. In the sense of kerf depth, the relative error value in the data obtained with the PSO method is lower than that in the ANN method. The same is true for the kerf width. As a result, by using the optimization process proposed in the article, the laser processing parameters that simultaneously provide the kerf depth and kerf width, which form the kerf geometry, can be successfully found.

Table 11 The performance comparison of PSO and ANN in terms of relative error

7 Conclusion

In this study, a metaheuristic-based process is proposed to optimize the kerf width and depth in terms of laser power, cutting speed and nozzle distance parameters during carbon dioxide (CO2) laser cutting of polymethylmethacrylate (PMMA) sheets. Obtained findings are presented below.

  1. 1.

    Analysis of Variance (ANOVA) analysis was performed for the experimental data, and it was revealed that the biggest effect as laser processing parameter among standoff distance, laser power and laser cut speed is laser power. For example, the p-value of the laser power parameter was 5.06 × 10–5 at a standoff distance of 5 mm, where the laser cutting speed p-value was the lowest with 0.024.

  2. 2.

    A fifth-order polynomial regression model was created using MATLAB Curve Fitting tool and regression model fit was analyzed using R-squared (R2), adjusted R2 and Root Mean Square Error (RMSE) parameters. The R2 value in each polynomial is 99%, while the adjusted R2 value is more than 97%. It has been revealed that the polynomials derived from these values are in high agreement with the experimental data and can be used as a fitness function in metaheuristic algorithms.

  3. 3.

    Sensitivity analysis was performed using the regression model. The sensitivity of the laser power was found to be the most variable parameter at different kerf depths. It is observed that the effect of cutting speed on kerf depth causes a lower sensitivity change. While the sensitivity of the laser power on the depth reached 150, its effect on the kerf width could not exceed 20. The effect of the laser speed on the depth exceeded 15, while its effect on the width was close to less than 2. The sensitivity remained constant over the range of laser power at low standoff distance, while at higher laser powers the sensitivity decreased as the distance increased.

  4. 4.

    Four different metaheuristic methods such as genetic algorithm (GA), particle swarm optimization (PSO), whale optimization algorithm (WOA), and ant lion optimization (ALO) were applied to the optimum kerf geometry generation problem. While all methods gave effective and sufficiently accurate results, the PSO method stood out with its low-cost value. In addition, ANOVA on the metaheuristic performances of the methods also confirmed the success of the PSO.

  5. 5.

    In order to prove the accuracy of the proposed metaheuristic-based process, the artificial neural network (ANN) model, which is widely used in the literature, has been created. It has been verified that the proposed optimization process yields successful results.

  6. 6.

    As a result, it has been seen that kerf geometry optimization using metaheuristic methods can yield effective and successful results. As a future work, a more precise kerf geometry model can be created by including more laser parameters in the optimization process. Since the complexity of the problem will increase with the increasing number of laser parameters, recently developed metaheuristic methods should be investigated and selected.