Developing a Support Vector Regression (SVR) Model for Prediction of Main and Lateral Bending Angles in Laser Tube Bending Process

The laser tube bending process (LTBP) is a new and powerful manufacturing method for bending tubes more accurately and economically by eliminating the bending die. The irradiated laser beam creates a local plastic deformation area, and the bending of the tube occurs depending on the magnitude of the heat absorbed by the tube and its material characteristics. The main bending angle and lateral bending angle are the output variables of the LTBP. In this study, the output variables are predicted by support vector regression (SVR) modeling, which is an effective methodology in machine learning. The SVR input data is provided by performing 92 experimental tests determined by the design of the experimental techniques. The measurement results are divided into two sub-datasets: 70% for the training dataset, and 30% for the testing dataset. The inputs of the SVR model are process parameters, which can be listed as the laser power, laser beam diameter, scanning speed, irradiation length, irradiation scheme, and the number of irradiations. Two SVR models are developed for the prediction of the output variables separately. The SVR predictor achieved a mean absolute error of 0.021/0.003, a mean absolute percentage error of 1.485/1.849, a root mean square error of 0.039/0.005, and a determination factor of 93.5/90.8% for the main/lateral bending angle. Accordingly, the SVR models prove the possibility of applying SVR to the prediction of the main bending angle and lateral bending angle in LTBP with quite an acceptable accuracy.


Introduction
Tube bending is important in manufacturing. When the tube thickness is thin, the applied force or moment can deform the cross-section from its initial circular shape into an elliptical cross-section, and ovalization appears as an unwanted phenomenon [1]. The use of a laser beam in this process has several benefits: by using a laser beam, no mechanical load will be applied to the parts, and the irradiated heat/energy can be controlled very easily [2]. The cost of die fabrication will be waived, and a precise bending angle can be obtained by springback compensation and the re-arranging of the process parameters. Springback is the main phenomenon in tube bending. This phenomenon happens due to elastic recovery in the unloading stage of the tube. The stress and strain vary from a positive magnitude from the outside of the bend area to a negative magnitude in the inside area of the bend zone. After unloading, the bend angle and bend radius vary by releasing the elastic strain created in the loading stage. One of the main challenges in bending, especially in tube bending, is the prediction of and compensation for springback. The springback compensation can be carried out by predicting the bending angle with an analytical solution or statistical prediction [3].
The first attempt to predict the bending angle occurred in the year 2000, by Cheng and Lin [4] and Dragos et al. [5]. Casalino and Ludovico [6] were the first researchers that used a trained neural network to predict the process variables of laser sheet bending to reduce springback. Barletta et al. [7] and Gisario et al. [8] utilized an artificial neural distortion of the inner edge compared to other scanning strategies. Furthermore, an alternate circumferential scanning scheme led to decreased lateral bending compared to lateral bending, which normally occurs for a circumferential scanning scheme. Wang et al. [19] developed an algorithm for bending tubes in 2D and 3D space. The algorithm consists of dividing the tube into several segments based on the extremum and the inflection point of the expected tube shape. The scanning path is then determined according to the derivative and second derivative of the desired shape of the tube. Additionally, for the 3D bending of the tube, the 3D curve was decomposed into two 2D curves, and the desired shape was achieved by combining the 2D path data. As can be seen, the formation of the tube in 2D and 3D space is very complicated, and closed-form algorithms can help the manufacturer with the fabrication of complicated shapes. Nath and Yadav [20] used the integral transform technique (an inverse solution) to solve the 3D heat transfer equation during laser beam irradiation to find the final bending angle by predicting the strain field distribution while heating and cooling. By the inverse estimation of the absorption coefficient, the analytical model was developed, and the temperature field was determined. In addition to tube bending, the irradiated heat from the laser source can create local strengthening in the tube. Kim and Yoon [21] showed that the strengthening happened in the cross-sectional plane perpendicular to the axial direction of the tube. In addition, the strengthening was more effective when the number of folds was increased and the energy absorption was maximized by up to 32.2% during axial crushing by a helical laser beam irradiation pattern. Support vector regression (SVR) is a learning algorithm implemented for the estimation of discrete values according to the principle of support vector machines (SVM). SVM was introduced by Vladimir Vapnik [22] in 1992, and is a popular machine learning tool for classification and regression. SVR is a powerful tool for estimation. Several research works were published in different areas of mechanical engineering that utilized SVR. SVR can predict the drilling force drilling an internal hole in carbon-fiber-reinforced polymer (CFRP) [23], provide a wear prediction for cutting tools in the milling process [24], predict cutting force and temperature in bone drilling [25], predict cutting force and surface roughness in the milling process [26] and turning process [27], predict the laser cutting process cost for AISI316L stainless steel [28], and so on. By reviewing the different utilizations of the SVR model and comparing the prediction results from other metaheuristic approaches (such as ANN, GA, and ANFIS, etc.) it can be concluded that the SVR model can predict the output parameters in complicated systems more accurately.
To the best of the literature review and our knowledge, there is no published research work on modeling and predicting the laser tube bending process (LTBP) using SVR. This research aims to use the support vector regression method as one of the good approximators in machine learning techniques to predict the main and lateral bending angles. The basic idea behind SVR is to find the line of best fit. In conventional curve-fitting approaches, a straight line is fitted by the least square method. Each point has an equal portion in determining the slope of straight line by the least square method, while the attitude of new curve-fitting procedures is different. In new approaches, a weight function will be associated with each data point, and higher priority will be considered for points closer to the fitted line. The authors utilized the SVR model due to its motivating features, such as scattered solution representation, lack of local minimums, good generalization performance, and strong theoretical basis. The model predictor in this article will calculate the process outputs (the main bending angle and lateral bending angle) based on the input process variables, including the laser power, laser diameter, scanning speed, irradiation length, irradiation scheme, and the number of irradiations. The effect of process variables was analyzed and discussed by the authors in a previous study [29], and this article will focus only on the implementation of SVR for the prediction of process variables. It is recommended that the readers read the authors' previous publication [29] for additional details and then read this article.  Figure 1 shows a schematic view of the LTBP, with the definition of the main bending angle along the vertical direction and the lateral bending angle in the horizontal plane. To find a regression equation, it is necessary to prepare the initial data, which determine the output parameters (the main bending angle and lateral bending angle) by the variation of the input variables (independent variables) of the process. The basics of SVR will be explained in the next section. The laser tube bending was carried out by a set of experiments to prepare the required data for SVR. The experiments were carried out on a tube made of mild steel (chemical composition: Fe base, 0.23% C, 0.20% Cu, 0.83% Mn, 0.04% P, 0.05% S, and 0.28% Si) and with an 18 mm outer diameter and a thickness of 1 mm. The tube was cut into samples 100 mm in length. The tube samples were clamped from one side, and the laser irradiated along the longitudinal direction (axial irradiating scheme (AIS)) or tangential direction (circular irradiating scheme (CIS). The LTBP process variables were the laser power, laser beam diameter, scanning speed, irradiation length, irradiation strategy, and the number of irradiations. The ranges of process variables are shown in Table 1. The experimental tests were carried out according to the response surface methodology plan (Box-Behnken type). The plan consists of 92 experiments, which are listed in Table A1, Appendix A. Minitab 19 software was used for the design of experiments and data analysis in the published work [29]. After the irradiation of the laser beam, the tube bent upward (main bending angle). Unfortunately, due to non-homogenous heating along the irradiation path, a small in-plane deviation was observed, which is called the lateral bending angle. The length of irradiation was equal in the CIS and AIS at each level. To attain the SVR model, the input data was normalized in the range of [0, 1]. More details of the experimental setup and definitions are presented in Ref. [29] and are not repeated in this article. focus only on the implementation of SVR for the prediction of process variables. It is recommended that the readers read the authors' previous publication [29] for additional details and then read this article. Figure 1 shows a schematic view of the LTBP, with the definition of the main bending angle along the vertical direction and the lateral bending angle in the horizontal plane. To find a regression equation, it is necessary to prepare the initial data, which determine the output parameters (the main bending angle and lateral bending angle) by the variation of the input variables (independent variables) of the process. The basics of SVR will be explained in the next section. The laser tube bending was carried out by a set of experiments to prepare the required data for SVR. The experiments were carried out on a tube made of mild steel (chemical composition: Fe base, 0.23% C, 0.20% Cu, 0.83% Mn, 0.04% P, 0.05% S, and 0.28% Si) and with an 18 mm outer diameter and a thickness of 1 mm. The tube was cut into samples 100 mm in length. The tube samples were clamped from one side, and the laser irradiated along the longitudinal direction (axial irradiating scheme (AIS)) or tangential direction (circular irradiating scheme (CIS). The LTBP process variables were the laser power, laser beam diameter, scanning speed, irradiation length, irradiation strategy, and the number of irradiations. The ranges of process variables are shown in Table  1. The experimental tests were carried out according to the response surface methodology plan (Box-Behnken type). The plan consists of 92 experiments, which are listed in Table  A1, Appendix A. Minitab 19 software was used for the design of experiments and data analysis in the published work [29]. After the irradiation of the laser beam, the tube bent upward (main bending angle). Unfortunately, due to non-homogenous heating along the irradiation path, a small in-plane deviation was observed, which is called the lateral bending angle. The length of irradiation was equal in the CIS and AIS at each level. To attain the SVR model, the input data was normalized in the range of [0, 1]. More details of the experimental setup and definitions are presented in Ref. [29] and are not repeated in this article.

The Basics of Support Vector Regression (SVR)
SVR is a powerful tool for the solution of scattered problems in which local minimums cannot be found by other regression methods. The SVR method is a type of nonlinear classification method which categorizes the results of tests among several groups. By defining a nonlinear classification threshold from data of N independent variables mapped to a space that has more dimensions and utilizing training data {(z k , q k )} N k=1 , a linear model can be developed [22] where z is the independent variable and q is the classification vector, defined q k ∈ {−1, 1}. The classification is performed for N samples. The classification is performed by defining an optimum hyperplane defined by Equation (1). The optimum hyperplane must meet the conditions of Equations (2) and (3).
where g is the weight vector. Equations (1)-(3) define the basics of SVR. However, for practically implementing the SVR method to predict the output parameters by regression between the input parameters, a mapping function should be defined. The mapping function ∅(·) : R n → R n k , from independent variables to a space with larger dimensions, is defined by combining Equations (1)-(3) and is written as Equation (4): Equation (4) was presented by Vapnik [22] to classify the samples into two classes which are not applicable to obtaining the optimal hyperplane equation. In this way, a tolerance margin β ≥ 0 at the classification threshold is added to Equation (4), which is written as Equation (5). The minimum of the g function for finding the optimal hyperplane can be calculated by Equation (6).
where C is the tuning parameter of optimum hyperplane classification of Equation (5). Patel et al. [30] and Huang and Tsai [31] showed that using f (z, g) = g T z + h a linear regression function can result in better predictions. In this way, a threshold error, which is called the -insensitivity loss function, is utilized. If the -insensitivity loss function is defined as Equation (7), the difference between the classification vector q and the optimum hyperplane settles in the bandwidth between the − − β * i and + β i (Equation (8)).
β and β * are equal in symmetric conditions. The residual function of minimization is defined as Equation (9), and SVR searches to find the minimum residual in the bandwidth of β and β * .
where R is the cost function. The tuning parameters should be defined such that they minimize the system output. To determine these parameters, the data set of results is divided into two subsets. The first sub-set is used for training and finding the optimal value, and the second sub-set is used for validating the obtained parameters by finding the smallest possible error. The equations of the SVR model were derived by Vapnik [22], Patel et al. [30], and Huang and Tsai [31]. The prediction error can be calculated in different ways. Four common definitions of error equation are the mean absolute error (MAE), mean absolute percentage error (MAPE), root mean square error (RMS), and determination factor (R 2 ), which are demonstrated in Equations (10)- (13). θ i andθ i are the measurement data and predicted magnitude of output by SVR, respectively. Additionally, θ mean i andθ mean i are the mean of each parameter, respectively. These four error definitions show different aspects of error. The MAE and RMS are absolute values of error, while the MAPE is a relative error definition. The determination factor differs from the three other equations. The determination factor shows the quality of correlation between the real measured data and the value predicted by the regression equation. A more precise correlation will be obtained for the value of the determination factor nearer to 100%. To evaluate the goodness of the SVR model, it is essential to include all error definitions in consideration. Figure 2 illustrates the flowchart of the attained SVR predictor model. The SVR models erre developed with Python 3.8 software. As mentioned in Section 2.1, 92 experimental tests were carried out based on the variation of six important LTBP process variables. The process variables are listed in Table 1, and the two output variables are the main bending angle and lateral bending angle. After implementing the experimental tests and measuring the output variable, the results should be split into two sub-sets for cross-validation. In this article, the holdout cross-validation technique (70% training data; 30% testing data) was used to evaluate the accuracy of the SVR model. Thus, the obtained results were randomly divided into two sub-sets: 70% of the results were used for training, and the remaining 30% were used to assess the accuracy of the SVR model. The SVR model was developed and trained by the determined sub-sets of data. The prediction was carried out in Python software, and the results were plotted using MATLAB software.

Results and Discussion
As explained earlier, the data set was obtained during the process of tests. After preprocessing, the dataset was divided into two sub-datasets of and testing (30%) data. The SVR model was attained during the training p was then evaluated by the test sub-dataset. It is worth mentioning that the ters (C and ϵ) were changed in the training phase, and in the final model, v and (9, 0.1), were used to estimate the main and lateral bending angles, res In this study, the independent variables were the input variables of cluding the laser power, laser beam diameter, scanning speed, irradiation l tion scheme, and the number of irradiation passes. Additionally, the depen were the output variables (the main bending angle and lateral bending angl estimated based on the inputs. The main goal of the presented work was to dictor model that can accurately estimate the desired outputs based on the Figure 3 shows the comparison of the results predicted by the SVR m measured data for the main bending angle and lateral bending angle separa circles and red squares signify the train data and test data, respectively. A slope, which shows the = line (A: actual data; P: predicted by SVR m trated in Figure 3. A better correlation between the actual and predicted d tained for closer points to the line. The determination factor R 2 is 0.98 and 0. data (the training and test sub-sets) of the results of the main bending ang bending angle, respectively. Despite the fact that the determination factor is main bending angle results, the quality of the correlation for both output quite acceptable. It should be noted that the output parameter is the functi

Results and Discussion
As explained earlier, the data set was obtained during the process of experimental tests. After preprocessing, the dataset was divided into two sub-datasets of training (70%) and testing (30%) data. The SVR model was attained during the training process, and it was then evaluated by the test sub-dataset. It is worth mentioning that the hyperparameters (C and ) were changed in the training phase, and in the final model, values (12, 0.1) and (9, 0.1), were used to estimate the main and lateral bending angles, respectively.
In this study, the independent variables were the input variables of the model, including the laser power, laser beam diameter, scanning speed, irradiation length, irradiation scheme, and the number of irradiation passes. Additionally, the dependent variables were the output variables (the main bending angle and lateral bending angle), which were estimated based on the inputs. The main goal of the presented work was to obtain a predictor model that can accurately estimate the desired outputs based on the input values. Figure 3 shows the comparison of the results predicted by the SVR model and the measured data for the main bending angle and lateral bending angle separately. The blue circles and red squares signify the train data and test data, respectively. A line with a 45 • slope, which shows the A = P line (A: actual data; P: predicted by SVR model), is illustrated in Figure 3. A better correlation between the actual and predicted data will be obtained for closer points to the line. The determination factor R 2 is 0.98 and 0.96 for the total data (the training and test sub-sets) of the results of the main bending angle and lateral bending angle, respectively. Despite the fact that the determination factor is higher for the main bending angle results, the quality of the correlation for both output parameters is quite acceptable. It should be noted that the output parameter is the function of six independent process variables and their interactions. Therefore, finding a regression line is very difficult with common regression methods. The difference between the predicted value and the actual value is very low, demonstrating the quality of the correlation.  Figures 4 and 5 illustrate the absolute error and the MAPE error for the main bending angle and lateral bending angle, respectively, for all experimental tests. As can be seen, the blue and red bars represent the training data (70% of total results) and the test data. For the main bending angle, the absolute error at the training stage is very close to zero. The maximum absolute error is 0.027. Similarly, the absolute error is low for the test data, and the maximum absolute error is 0.15. The MAPE shows the same trend as the absolute error such that the maximum MAPE for the training and test data is 1.87% and 10.38%, respectively.  Although the absolute error for the lateral bending angle is lower than similar values for the main bending angle (which is due to the lower lateral angle magnitudes than the

Figures 4 and 5 illustrate the absolute error and the MAPE error for the main bending
angle and lateral bending angle, respectively, for all experimental tests. As can be seen, the blue and red bars represent the training data (70% of total results) and the test data. For the main bending angle, the absolute error at the training stage is very close to zero. The maximum absolute error is 0.027. Similarly, the absolute error is low for the test data, and the maximum absolute error is 0.15. The MAPE shows the same trend as the absolute error such that the maximum MAPE for the training and test data is 1.87% and 10.38%, respectively.  Figures 4 and 5 illustrate the absolute error and the MAPE error for the main bending angle and lateral bending angle, respectively, for all experimental tests. As can be seen, the blue and red bars represent the training data (70% of total results) and the test data. For the main bending angle, the absolute error at the training stage is very close to zero. The maximum absolute error is 0.027. Similarly, the absolute error is low for the test data, and the maximum absolute error is 0.15. The MAPE shows the same trend as the absolute error such that the maximum MAPE for the training and test data is 1.87% and 10.38%, respectively.  Although the absolute error for the lateral bending angle is lower than similar values for the main bending angle (which is due to the lower lateral angle magnitudes than the main angle), a higher MAPE was observed. The maximum MAPE is 3.18% and 7.04% for the training data and the test data, respectively. However, more error is observed in assessing the testing data of the lateral bending angle than the main bending angle. For a better understanding of the accuracy of the SVR model, the real and predicted values of the main bending angle and lateral bending angle were plotted in Figure 6. The real training data and the test data are illustrated by the solid blue line and solid red line, respectively. The predicted training data and predicted test data are demonstrated with blue circles and red squares, respectively. The blue circles are placed on the blue solid line for both outputs, which specifies the higher accuracy of the SVR model in the training stage. The SVR model was created based on the training dataset; thus, the readers should look at the trials in the test stage for a better understanding of the accuracy of the model, which are the data that the SVR had not encountered before. Comparing the graphs in Figure 6 demonstrates that the accuracy of the SVR model is also high for the prediction of the lateral bending angle. In addition, the model performance is relatively better for the prediction of the main bending angle.
(a) Although the absolute error for the lateral bending angle is lower than similar values for the main bending angle (which is due to the lower lateral angle magnitudes than the main angle), a higher MAPE was observed. The maximum MAPE is 3.18% and 7.04% for the training data and the test data, respectively. However, more error is observed in assessing the testing data of the lateral bending angle than the main bending angle.
For a better understanding of the accuracy of the SVR model, the real and predicted values of the main bending angle and lateral bending angle were plotted in Figure 6. The real training data and the test data are illustrated by the solid blue line and solid red line, respectively. The predicted training data and predicted test data are demonstrated with blue circles and red squares, respectively. The blue circles are placed on the blue solid line for both outputs, which specifies the higher accuracy of the SVR model in the training stage. The SVR model was created based on the training dataset; thus, the readers should look at the trials in the test stage for a better understanding of the accuracy of the model, which are the data that the SVR had not encountered before. Comparing the graphs in Figure 6 demonstrates that the accuracy of the SVR model is also high for the prediction of the lateral bending angle. In addition, the model performance is relatively better for the prediction of the main bending angle. Table 2 shows the MAE, MAPE, and RMSE and the determination factor, R 2 , for the training and test stages of the main bending angle and lateral bending angle, respectively. The results show that both the MAE and RMSE are close to zero and very small for both the main bending angle and lateral bending angle predictions. Similarly, the MAPE is very low for both outputs. Furthermore, the determination factor, R 2 , is above 90%, which shows the goodness of the accuracy of the SVR model in the prediction of the laser bending process output variables. Different values of error illustrate that the accuracy of the SVR model is relatively higher in the prediction of the main bending angle than the lateral bending angle. The bending angle is about 10 times higher than the lateral bending angle. The lateral bending angle is less than 0.20 • , which requires a very accurate approach to be estimated. The MAE and RMSE values of Table 2 show that the error of prediction is as low as 1.5% (relative error).
respectively. The predicted training data and predicted test data are demonstrated with blue circles and red squares, respectively. The blue circles are placed on the blue solid line for both outputs, which specifies the higher accuracy of the SVR model in the training stage. The SVR model was created based on the training dataset; thus, the readers should look at the trials in the test stage for a better understanding of the accuracy of the model, which are the data that the SVR had not encountered before. Comparing the graphs in Figure 6 demonstrates that the accuracy of the SVR model is also high for the prediction of the lateral bending angle. In addition, the model performance is relatively better for the prediction of the main bending angle.  Table 2 shows the MAE, MAPE, and RMSE and the determination factor, R 2 , for the training and test stages of the main bending angle and lateral bending angle, respectively. The results show that both the MAE and RMSE are close to zero and very small for both the main bending angle and lateral bending angle predictions. Similarly, the MAPE is very low for both outputs. Furthermore, the determination factor, R 2 , is above 90%, which shows the goodness of the accuracy of the SVR model in the prediction of the laser bending process output variables. Different values of error illustrate that the accuracy of the SVR model is relatively higher in the prediction of the main bending angle than the lateral bending angle. The bending angle is about 10 times higher than the lateral bending angle. The lateral bending angle is less than 0.20, which requires a very accurate approach to be estimated. The MAE and RMSE values of Table 2 show that the error of prediction is as low as 1.5% (relative error). The difference between the actual and the predicted data for the main bending angle and lateral bending angle is illustrated as a histogram in Figure 7. As can be seen, the  The difference between the actual and the predicted data for the main bending angle and lateral bending angle is illustrated as a histogram in Figure 7. As can be seen, the accumulation of error is high around the zero-point prediction, which can be called a singularity point in the bending angle prediction. For the main bending angle, a rare prediction was founded outside the range of −0.05 ≤ error ≤ 0.05. Likewise, the range for the lateral bending angle is −0.005 ≤ error ≤ 0.005. Lastly, it is worth noting that the current work is the first attempt to implement the SVR method for the prediction of the main bending angle and lateral bending angle as a very complicated process variable that depends on six different input variables. The accuracy and precision of a metaheuristic methods depend on the volume of investigation data. In this work, 92 sets of experiments were carried out, and the measured data were included in the analysis. Increasing the amount of data may lead to a better prediction, though the current model has an acceptable accuracy.

Conclusions
In this study, a modified support vector machine algorithm called support vector regression was used to predict the main bending angle and lateral bending angle in the laser tube bending process. The SVR model was trained using 70% of the experimentally measured data and by using hyperparameter (C, ϵ) values of (12, 0.1) and (9, 0.1) as the main and lateral bending angles estimated, respectively. The results show that the SVR model can predict the process output of laser tube bending very well. The MAE, RMSE, and MAPE were calculated for the main bending angle and lateral bending angle as 0.021, 0.039, and 1.485%, demonstrating the effectiveness of the trained SVR model. Likewise, the mentioned error criteria for the lateral bending angle were calculated as 0.003, 0.005, and 1.849%. The determination factor was 93.5% and 90.8% for the prediction of the main bending angle and lateral bending angle, respectively. The lateral bending angle was less than 0.20, which requires a very accurate approach to be estimated. The MAE and RMSE values show that the error of prediction is as low as 1.5%. As a final point, the SVR model performed better in predicting the main bending angle when compared to the lateral bending angle due to the lower MAPE value and higher determination factor.

Conclusions
In this study, a modified support vector machine algorithm called support vector regression was used to predict the main bending angle and lateral bending angle in the laser tube bending process. The SVR model was trained using 70% of the experimentally measured data and by using hyperparameter (C, ) values of (12, 0.1) and (9, 0.1) as the main and lateral bending angles estimated, respectively. The results show that the SVR model can predict the process output of laser tube bending very well. The MAE, RMSE, and MAPE were calculated for the main bending angle and lateral bending angle as 0.021, 0.039, and 1.485%, demonstrating the effectiveness of the trained SVR model. Likewise, the mentioned error criteria for the lateral bending angle were calculated as 0.003, 0.005, and 1.849%. The determination factor was 93.5% and 90.8% for the prediction of the main bending angle and lateral bending angle, respectively. The lateral bending angle was less than 0.20 • , which requires a very accurate approach to be estimated. The MAE and RMSE values show that the error of prediction is as low as 1.5%. As a final point, the SVR model performed better in predicting the main bending angle when compared to the lateral bending angle due to the lower MAPE value and higher determination factor.

Conflicts of Interest:
The authors declare no conflict of interest.