# Neural Network Modeling for Prediction of Weld Bead Geometry in Laser Microwelding

Authors: Mohd Idris Shah Ismail; Yasuhiro Okamoto; Akira Okada
Journal: Advances in Optical Technologies
 (2013)

---

## Abstract

Laser microwelding has been an essential tool with a reputation of rapidity and precision for joining miniaturized metal parts. In industrial applications, an accurate prediction of weld bead geometry is required in automation systems to enhance productivity of laser microwelding. The present work was conducted to establish an intelligent algorithm to build a simplified relationship between process parameters and weld bead geometry that can be easily used to predict the weld bead geometry with a wide range of process parameters through an artificial neural network (ANN) in laser microwelding of thin steel sheet. The backpropagation with the Levenberg-Marquardt training algorithm was used to train the neural network model. The accuracy of neural network model has been tested by comparing the simulated data with actual data from the laser microwelding experiments. The predictions of the neural network model showed excellent agreement with the experimental results, indicating that the neural network model is a viable means for predicting weld bead geometry. Furthermore, a comparison was made between the neural network and mathematical model. It was found that the developed neural network model has better prediction capability compared to the regression analysis model.


---

## Body

## 1. Introduction

Laser microwelding has a great potential in the joining production development. This microjoining technology is expected to realize the demand for high quality and faster joining method of thin metal sheets. The advantages of laser microwelding such as precision control of heat input, deep weld penetration, and minimal distortion offer higher welding speed compared to the conventional welding method. The low cost of production has made laser microwelding essential in various industries, including electronics, medical instruments and automotive industry. In the joining process of microproducts, the technological advancement in the field of monitoring and control is required. Therefore, the concentration must be given to the control of the factors which affect the laser microwelding process.Primarily, a proper model needs to be constructed and tested before implementing for online control. The requirement to predict weld bead geometry as a function of welding performance in the laser microwelding has become more important to provide a basis for a computer-based control system in the future. The process parameters determine the weld bead geometry, due to the combination of these parameters control the heat input [1]. The effect of process parameters on weld bead geometry can be studied with the help of developing mathematical models. Many studies have been carried out to develop various mathematical models for prediction of weld bead geometry [2–4]. However, it is not easy to apply this conventional technique to the practical situations because the relationship between welding process and the weld bead geometry is a very complex relationship.Recently, neural networks have been widely used to tackle problem which cannot be satisfactorily handled by conventional analytical approaches. The advantages of neural network include extreme computation, powerful memory and rapid learning. Furthermore, it can predict an output parameter with accuracy even if the input parameter interactions are not completely understood [5, 6]. It has been reported that the implementation of neural network could minimize the time and cost consumption during machining process [7]. These capabilities make neural network a useful prediction tool that can be implemented successfully in the research and development of laser welding [8], laser forming [9], laser cutting [10], and laser surface hardening [11].In the present work, an attempt has been made to develop a neural network model in order to predict accurately the weld bead geometry in the laser microwelding process by changing laser power, scanning velocity, and spot diameter. The experimental work was carried out on the thin stainless steel sheet using a single-mode CW fiber laser with high-speed scanning system for data collection to train and validate the effectiveness of the neural network model. The prediction capability of neural network model is also compared with the performance of statistical regression model, which has been developed from the same experimental datasets used for the neural network model.


## 2. Experimental Work

A schematic diagram of experimental setup is shown in Figure1. In this study, the wavelength of 1090 nm single-mode CW Yb fiber laser was used. The laser was delivered by optical fiber and focused by a telecentric type fθ lens of 100 mm in focal length. Instead of the conventional moving stage, a Galvano scanner was used in order to achieve the high-speed laser scanning. The expander was installed between the isolator and the bending mirror to change the diameter of laser spot. The main process parameters used in the study are given in Table 1. In addition, the welding experiments were carried out in shielding gas of nitrogen with a constant pressure 100 kPa. The austenitic stainless steel SUS304 was used as a specimen. The sizes of each specimen were 30 mm in length, 15 mm in width, and 50 μm in thickness. After the laser welding, the welded specimens were cut perpendicular to the scanning direction for the measurement of weld bead geometry by optical microscope. Figure 2 shows the weld bead profile of laser welded bead-on-plate joint.Table 1
Process parameters for laser microwelding.
Parameter
Value
Laser power, W
10, 20, 30, 40, 50, 60, 70
Scanning velocity, m/s
0.5, 1.0, 1.5, 2.0, 2.5, 3.0
Spot diameter,µm
17.5, 35.0Figure 1
Schematic diagram of experimental setup.Figure 2
Weld bead profile of bead-on-plate joint.


## 3. Artificial Neural Network

Artificial neural network (ANN) is widely established in the artificial intelligence (AI) research where a nonlinear mapping between input and output parameters is required for a function approximation [12]. Various types of ANN, like multilayer perceptron (MLP), radial basis function (RBF), and self-organizing map (SOM), are used for modeling. The MLP with backpropagation algorithm is widely used because of its simplicity and great forecast ability in the weld modeling [13]. The flow chart of modeling procedure with backpropagation neural network is shown in Figure 3. In this study, the ANN modeling is carried out in two phases: the first phase is to train the network model, while the second phase is to validate the network model with data, which were not used for training.Figure 3
Flow chart of ANN modeling procedure.


### 3.1. Neural Network Architecture

Choosing the optimum network architecture is one of the challenging steps in neural network modeling. Figure4 shows the neural network architecture employed in this study. The backpropagation neural network (BPNN) has three layers: input layer, hidden layer, and output layer. As there are three inputs and two outputs, the numbers of neurons in the input and output layer had to be set to 3 and 2, respectively. In the many applications, the backpropagation architecture with one hidden layer is enough [14]. Therefore, only one hidden layer has been used in this study. In order to find an optimal architecture, different numbers of neurons in the hidden layer were considered and prediction error for each network was calculated. The BPNN is based on the error correction learning rule. Therefore, the operation of the neural network model can be divided into two main steps: forward computing and backward learning [9].Figure 4
Neural network architecture for predicting weld bead geometry.


#### 3.1.1. Forward Computing

In the forward computing, the input patterns applied to the neurons of the first layer are just a stimulus to the network. On the other hand, there is no computation in the input layer. As illustrated in Figure5, each neuron in the hidden layer determines a net input value based on all its input connections. These nodes are connected to each other so that the value of one node will affect the value of another. The relative influence that one node has on another one is specified by the “weight” that is assigned to each connection. The net input is calculated by summing the input values multiplied by their corresponding weight. Once the net input is calculated, it is converted to an activation value. The weight on the connection from the ith neuron in the forward layer to the jth neuron is indicated as wij. The output value Yj of neuron j is computed by the following equation:
(1)netj=∑i=0nwijxj+x0,Yj=fact(netj),
where netj is the linear combination of each of the xi values multiplied by wij, x0 is a constant known as the bias, n is the number of inputs to the jth neuron, and fact is the activation of neuron j. In this study, the hidden layer with log-sigmoid (S-shaped curves) activation function is used for the prediction of weld bead geometry. The log-sigmoid activation function is given in
(2)Yj=11+exp(-netj).Figure 5
Architecture of an individual neuron for backpropagation neural network.


#### 3.1.2. Backward Learning

In backward learning, the generated output of the network is compared to the desired output, and an error is computed for each output neuron. The error vectorE between desired values and the output value of the network is defined as
(3)E=∑jEj=∑j12(Tj-Yj)2,
where Yj is the output value of the jth output neuron and Tj is the desired value of the jth output neuron. Errors are then transmitted backward from the output layer to each neuron in the forward layer. The process is repeated layer by layer. Connection weights are updated by each neuron to cause the network to converge. The network was trained with the Levenberg-Marquardt training algorithm. This training algorithm was chosen due to its high accuracy in similar function approximation. The adjustments of weights and biases are done according to transfer function
(4)Δwij=-(JTJ+μI)-1JTE,
where J is Jacobian matrix of derivation of each error, μ is a scalar and E is error function.


### 3.2. Training of Neural Network Model

The development and the training of the network were carried out using MATLAB Neural Network Toolbox [15]. The input and output of the model are illustrated in Figure 4. There are three neurons in the input layer of network, which are the laser power, scanning velocity, and spot diameter. The output layer has two neurons, which gives the weld bead depth and width. The input and output parameters datasets could not be trained by neural network in their original form due to the wide range of values among them. In order to become feasible neurons, all the values in the input neurons had to be preprocessed by normalizing and transformed within the range of −1 and +1. The normalized value (Xi) for each raw input and output dataset (di) was calculated as
(5)Xi=2dmax-dmin(di-dmin)-1,
where dmax and dmin are the maximum and minimum values of the raw data, respectively.The relationships of 70 combinations between weld bead geometry and the process parameters obtained from the experiments were used as the training and testing data. They are randomly divided into two datasets, of which 63 were used for training and 7 for testing or validation. The neural network configuration for training is created and formulated in MATLAB with specification given in Table2. In order to identify the optimum network architecture, it is essential to determine the number of neurons in the hidden layer. Therefore, the number of neurons was chosen from 4 to 20 neurons in a hidden layer. The accuracy of the network was evaluated by the mean squared error (MSE) and the coefficient of multiple determination, R2. As can be seen in Table 3, the MSE in the training process is not directly related to increasing the number of neurons. It can be noted that there is a small number of neurons in the hidden layer, and the training performance of network is not satisfactory. However, the increase in the number of neurons beyond 14 has no significant improvement on the performance of the networks. From Table 3, it is clear that the network with 14 neurons in hidden layer shows the minimum MSE and the highest R2 during training process. Figure 6 shows the performance of 3-14-2 network at the end of training. As the number of epochs was increased, the error decreased and converged to a value of about 0.00109 after 1000 epochs. The calculated weld bead geometry in the training of 3-14-2 network is confirmed by the correlation with the experimental data as shown in Figure 7. It can be seen that there is high correlation between the calculated and measured values of weld bead geometry.Table 2
Neural network configuration for the training in MATLAB.
Parameter
Specification
No. of neurons in input layer
3
No. of neurons in hidden layer
4–20 (in steps of 2)
No. of neurons in output layer
2
Training function
Levenberg-Marquardt (trainlm)
Performance function
Mean squared error (MSE)
Activation function
logsig
Maximum epoch (training time)
1000
Performance goal
1.0
×
10
-
3
Learning rate
0.05
Normalized range
−1 to 1Table 3
Training performance of different network architecture.
Network architecture
MSE
R
2
RMS error of training
Bead depth
Bead width
3-4-2
0.03152
0.9907
2.584
6.891
3-6-2
0.01451
0.9908
2.577
4.070
3-8-2
0.01143
0.9939
2.094
3.783
3-10-2
0.00859
0.9931
2.228
2.881
3-12-2
0.00792
0.9940
2.077
2.832
3-14-2
0.00109
0.9991
0.822
0.989
3-16-2
0.00227
0.9979
1.239
1.366
3-18-2
0.00393
0.9971
1.438
2.027
3-20-2
0.00571
0.9958
1.749
2.420Figure 6
Performance of 3-14-2 architecture during training of neural network.Figure 7
Comparison between calculated and measured weld bead geometry during training of 3-14-2 network.


## 3.1. Neural Network Architecture

Choosing the optimum network architecture is one of the challenging steps in neural network modeling. Figure4 shows the neural network architecture employed in this study. The backpropagation neural network (BPNN) has three layers: input layer, hidden layer, and output layer. As there are three inputs and two outputs, the numbers of neurons in the input and output layer had to be set to 3 and 2, respectively. In the many applications, the backpropagation architecture with one hidden layer is enough [14]. Therefore, only one hidden layer has been used in this study. In order to find an optimal architecture, different numbers of neurons in the hidden layer were considered and prediction error for each network was calculated. The BPNN is based on the error correction learning rule. Therefore, the operation of the neural network model can be divided into two main steps: forward computing and backward learning [9].Figure 4
Neural network architecture for predicting weld bead geometry.


### 3.1.1. Forward Computing

In the forward computing, the input patterns applied to the neurons of the first layer are just a stimulus to the network. On the other hand, there is no computation in the input layer. As illustrated in Figure5, each neuron in the hidden layer determines a net input value based on all its input connections. These nodes are connected to each other so that the value of one node will affect the value of another. The relative influence that one node has on another one is specified by the “weight” that is assigned to each connection. The net input is calculated by summing the input values multiplied by their corresponding weight. Once the net input is calculated, it is converted to an activation value. The weight on the connection from the ith neuron in the forward layer to the jth neuron is indicated as wij. The output value Yj of neuron j is computed by the following equation:
(1)netj=∑i=0nwijxj+x0,Yj=fact(netj),
where netj is the linear combination of each of the xi values multiplied by wij, x0 is a constant known as the bias, n is the number of inputs to the jth neuron, and fact is the activation of neuron j. In this study, the hidden layer with log-sigmoid (S-shaped curves) activation function is used for the prediction of weld bead geometry. The log-sigmoid activation function is given in
(2)Yj=11+exp(-netj).Figure 5
Architecture of an individual neuron for backpropagation neural network.


### 3.1.2. Backward Learning

In backward learning, the generated output of the network is compared to the desired output, and an error is computed for each output neuron. The error vectorE between desired values and the output value of the network is defined as
(3)E=∑jEj=∑j12(Tj-Yj)2,
where Yj is the output value of the jth output neuron and Tj is the desired value of the jth output neuron. Errors are then transmitted backward from the output layer to each neuron in the forward layer. The process is repeated layer by layer. Connection weights are updated by each neuron to cause the network to converge. The network was trained with the Levenberg-Marquardt training algorithm. This training algorithm was chosen due to its high accuracy in similar function approximation. The adjustments of weights and biases are done according to transfer function
(4)Δwij=-(JTJ+μI)-1JTE,
where J is Jacobian matrix of derivation of each error, μ is a scalar and E is error function.


## 3.1.1. Forward Computing

In the forward computing, the input patterns applied to the neurons of the first layer are just a stimulus to the network. On the other hand, there is no computation in the input layer. As illustrated in Figure5, each neuron in the hidden layer determines a net input value based on all its input connections. These nodes are connected to each other so that the value of one node will affect the value of another. The relative influence that one node has on another one is specified by the “weight” that is assigned to each connection. The net input is calculated by summing the input values multiplied by their corresponding weight. Once the net input is calculated, it is converted to an activation value. The weight on the connection from the ith neuron in the forward layer to the jth neuron is indicated as wij. The output value Yj of neuron j is computed by the following equation:
(1)netj=∑i=0nwijxj+x0,Yj=fact(netj),
where netj is the linear combination of each of the xi values multiplied by wij, x0 is a constant known as the bias, n is the number of inputs to the jth neuron, and fact is the activation of neuron j. In this study, the hidden layer with log-sigmoid (S-shaped curves) activation function is used for the prediction of weld bead geometry. The log-sigmoid activation function is given in
(2)Yj=11+exp(-netj).Figure 5
Architecture of an individual neuron for backpropagation neural network.


## 3.1.2. Backward Learning

In backward learning, the generated output of the network is compared to the desired output, and an error is computed for each output neuron. The error vectorE between desired values and the output value of the network is defined as
(3)E=∑jEj=∑j12(Tj-Yj)2,
where Yj is the output value of the jth output neuron and Tj is the desired value of the jth output neuron. Errors are then transmitted backward from the output layer to each neuron in the forward layer. The process is repeated layer by layer. Connection weights are updated by each neuron to cause the network to converge. The network was trained with the Levenberg-Marquardt training algorithm. This training algorithm was chosen due to its high accuracy in similar function approximation. The adjustments of weights and biases are done according to transfer function
(4)Δwij=-(JTJ+μI)-1JTE,
where J is Jacobian matrix of derivation of each error, μ is a scalar and E is error function.


## 3.2. Training of Neural Network Model

The development and the training of the network were carried out using MATLAB Neural Network Toolbox [15]. The input and output of the model are illustrated in Figure 4. There are three neurons in the input layer of network, which are the laser power, scanning velocity, and spot diameter. The output layer has two neurons, which gives the weld bead depth and width. The input and output parameters datasets could not be trained by neural network in their original form due to the wide range of values among them. In order to become feasible neurons, all the values in the input neurons had to be preprocessed by normalizing and transformed within the range of −1 and +1. The normalized value (Xi) for each raw input and output dataset (di) was calculated as
(5)Xi=2dmax-dmin(di-dmin)-1,
where dmax and dmin are the maximum and minimum values of the raw data, respectively.The relationships of 70 combinations between weld bead geometry and the process parameters obtained from the experiments were used as the training and testing data. They are randomly divided into two datasets, of which 63 were used for training and 7 for testing or validation. The neural network configuration for training is created and formulated in MATLAB with specification given in Table2. In order to identify the optimum network architecture, it is essential to determine the number of neurons in the hidden layer. Therefore, the number of neurons was chosen from 4 to 20 neurons in a hidden layer. The accuracy of the network was evaluated by the mean squared error (MSE) and the coefficient of multiple determination, R2. As can be seen in Table 3, the MSE in the training process is not directly related to increasing the number of neurons. It can be noted that there is a small number of neurons in the hidden layer, and the training performance of network is not satisfactory. However, the increase in the number of neurons beyond 14 has no significant improvement on the performance of the networks. From Table 3, it is clear that the network with 14 neurons in hidden layer shows the minimum MSE and the highest R2 during training process. Figure 6 shows the performance of 3-14-2 network at the end of training. As the number of epochs was increased, the error decreased and converged to a value of about 0.00109 after 1000 epochs. The calculated weld bead geometry in the training of 3-14-2 network is confirmed by the correlation with the experimental data as shown in Figure 7. It can be seen that there is high correlation between the calculated and measured values of weld bead geometry.Table 2
Neural network configuration for the training in MATLAB.
Parameter
Specification
No. of neurons in input layer
3
No. of neurons in hidden layer
4–20 (in steps of 2)
No. of neurons in output layer
2
Training function
Levenberg-Marquardt (trainlm)
Performance function
Mean squared error (MSE)
Activation function
logsig
Maximum epoch (training time)
1000
Performance goal
1.0
×
10
-
3
Learning rate
0.05
Normalized range
−1 to 1Table 3
Training performance of different network architecture.
Network architecture
MSE
R
2
RMS error of training
Bead depth
Bead width
3-4-2
0.03152
0.9907
2.584
6.891
3-6-2
0.01451
0.9908
2.577
4.070
3-8-2
0.01143
0.9939
2.094
3.783
3-10-2
0.00859
0.9931
2.228
2.881
3-12-2
0.00792
0.9940
2.077
2.832
3-14-2
0.00109
0.9991
0.822
0.989
3-16-2
0.00227
0.9979
1.239
1.366
3-18-2
0.00393
0.9971
1.438
2.027
3-20-2
0.00571
0.9958
1.749
2.420Figure 6
Performance of 3-14-2 architecture during training of neural network.Figure 7
Comparison between calculated and measured weld bead geometry during training of 3-14-2 network.


## 4. Development of Mathematical Models

The mathematical models for relationship between the process parameters and weld bead geometry also have been developed. In general, the response function can be represented as follows:(6)Y=f(P,v,d),
where Y is the weld bead geometry, P is the laser power, v is the scanning velocity, and d is spot diameter. The second-order polynomial equation used to represent the response surface for three factors could be expressed as follows:
(7)Y=a0+a1P+a2v+a3d+a12Pv+a13Pd+a23vd+a11P2+a22v2+a33d2,
where a0 is the constant of regression equation, the coefficients a1, a2, and a3 are linear terms, the coefficients a12, a13, and a23 are interaction terms, and the coefficients a11, a22, and a33 are the quadratic terms.The same datasets, as used in neural network model, were used to develop the mathematical models. The values of the coefficients in the polynomial equation were calculated using the statistical analysis software of MINITAB. In order to guarantee the reliability of the model coefficients were determined using a backward elimination procedure in which insignificant terms were eliminated based on significance level of ≤0.05. After evaluation of the coefficients, the final forms of mathematical models for weld bead depth and width are developed and given in (8) and (9), respectively,
(8)h=9.763+1.725P-0.724d-0.288Pv-0.009P2,(9)w=10.115+0.968P-0.081d+0.011Pd-0.117vd-0.009P2.The model adequacy is tested using the analysis of variance (ANOVA) technique, which is presented in Table4. According to this technique, it was found that the calculated F-ratio value of the models exceeded the standard tabulated value at 95% confidence level and the models are considered to be adequate within the confidence limit.Table 4
Analysis of variance for testing adequacy of mathematical models.
Bead geometry
Sum of the squares
Degrees of freedom
F-ratio
P
Regression
Residual
Regression
Residual
Bead depth,h
20134.2
2683.5
4
58
108.79
0.000
Bead width,w
8742.7
4748.3
5
57
20.99
0.000
Tabulated values ofF:  F0.05(4.58)=2.531; F0.05(5.57)=2.534.


## 5. Results and Discussion

The prediction results for the best architecture of the neural network and the established mathematical model are analyzed and discussed. The efficiency and predictability of these developed models have been defined as follows:(10)Ee=|Ea-EpEa×100|,
where Ee is the absolute prediction error and Ea and Ep represent the experimental and predicted weld bead geometry, respectively. The prediction errors of bead depth by the mathematical model and neural network model are shown in Figure 8. It shows that the prediction error of mathematical model ranged from 0.26 to 137.93%, while neural network model ranged from 0.004 to 57.45%. Figure 9 shows the results of prediction error of bead width by both models. It can be seen that the prediction errors by the mathematical model and neural network model range from 0.47 to 49.50% and from 0.02 to 11.88%, respectively. It can be noted that the prediction error obtained from neural network model showed better and more accurate results than those of the developed models using regression analysis method. In addition, it is very difficult to establish the relationship between process parameters and welding performance with mathematical model because of the complex and nonlinear relationship. It proves the superiority of neural network model to predict the weld bead geometry with high precision due to its high robustness to establish the relationship between the welding performance and its process parameters.Figure 8
Prediction error of bead depth.Figure 9
Prediction error of bead width.Next, the validation of developed models from the neural network and mathematical models is presented. The model has been validated using a fresh set of data as listed in Table5 and the predicted results of both models on the bead depth and bead width are shown in Figures 10 and 11, respectively. Based on the training results of neural network, the 3-14-2 network with the weights and biases obtained from the training process was selected for the validation process. According to Figures 10 and 11, it can be seen that the distribution of data points for neural network model is similar and close to the A=T line with accuracy of 97.56%, while the prediction accuracy of mathematical model was 81.28%. The neural network model gives the best fit to the experimental results and produced better prediction of the weld bead geometry than the traditional regression model. The performance of the neural network was less affected by architecture changes or the number of neurons in hidden layer [11]. In addition, the neural network model was performed with non-linear mapping between input and output parameters [12]. From the results, the neural network technique has been shown as an effective method to predict the complex relationship between the welding performance and its process parameters.Table 5
Dataset of process parameters and welding results for model validation.
No.
Laser power
Scanning velocity
Spot diameter
Bead depth
Bead width
1
10
1.5
17.4
7.45
13.82
2
20
3.0
34.8
2.97
19.61
3
30
1.0
17.4
41.47
42.97
4
40
2.5
17.4
19.36
26.58
5
50
1.5
34.8
20.42
40.00
6
60
0.5
17.4
50.00
50.43
7
70
2.0
34.8
25.95
68.08Figure 10
Comparison between calculated and measured weld bead geometry using mathematical model.Figure 11
Comparison between calculated and measured weld bead geometry using neural network model.


## 6. Conclusions

An ANN-based model was developed to predict the weld bead geometry of thin steel sheet in laser microwelding. The main conclusions obtained in this study are as follows.(i)
The ANN network which is a backpropagation with the Levenberg-Marquardt training algorithm was used to learn the training data of weld bead geometry resulting from the experimental work. The architecture of the neural network has 14 neurons in hidden layer and the prediction result of the neural network model was found to be in good agreement with the experimental results.(ii)
The neural network model has better predictive ability compared with the mathematical model in predicting weld bead geometry. The predicted weld bead geometry of the neural network model is much closer to the actual weld bead geometry than those of the mathematical model.(iii)
Neural network is a powerful tool and is easy to use in complex problems. Neural network can be used reliably, successfully, and very accurately for the prediction of weld bead geometry in laser microwelding.



---

*Source: 415837-2013-12-09.xml*