**4.2. ANN simulation model for the monitoring of the friction stir welding process**

The research interest to developing new technological tools for the control and optimization of manufacturing processes is growing. Such developments are crucial elements for the production engineering. Within the FSW process, many experiments are needed to understand the process-related dynamics and to control all the significant variables and the thermographic techniques are a valuable help but it is necessary to increase and optimize control techniques with new information tools for enhancing the quality of manufacturing systems. The reduction in time and cost of the experiments can be reduced by the implementation of numerical and analytical models. Thus the relationship between the process parameters and the quality of the weld can be easily identified by a model based on the adoption of one or more artificial neural networks (ANNs). Neural networks software packages are very common among scientists and manufacturing researchers. In particular, their applications in the field of welding have showed good success. As far as concern the FSW process, in scientific literature, there are only few papers that discuss the modelling of this welding process by a neural network [75–79]. In particular, a very interesting work is the study of Shojaeefard et al. [80] who studied the adoption of the neural network trained with Particle Swarm Optimization (PSO) for modelling and forecasting of the mechanical properties of the friction stir welding butt joints in AA7075/AA5083. A further contribution is provided by Asadi et al. [81], which with the use of ANN found a relationship between the grain size and the hardness of nanocomposites in FSW process. In this particular case study, an effective simulation model was developed for predicting, monitoring and controlling the mechanical properties of welded AA5754 H111 plates, using the ANNs with the FSW process parameters as input variables. The data set for training, testing and validation of the ANN were the results obtained by experimental cases [82–84], in which all welded joints were performed by non-destructive (visual inspection) and destructive testing (macrographic tests). These tests have been useful for detecting macro defects present on the surface and within the welded area. An accurate quantitative analysis of the FSW process was carried out using the results of the destructive tests of each welded specimen in terms of ultimate tensile strength (UTS) and Vickers micro hardness. Thermographic techniques were used to study the thermal behaviour of FSW process. In the thermal analyses, two thermal parameters were considered: the maximum temperature and the slope of the heating curve measured during the FSW process, along the two sides of the weld (MSHCRS and MSHCAS, respectively). The analysis established that there is a correlation between the data derived from the thermographic controls and the quality of the welded joints, in terms of UTS. Thus this work defines the importance and effectiveness of the use of infrared technology for monitoring the FSW process in a quantitative manner, giving important information on the thermal behaviour of joints during the process. Finally, the purpose of this case study was to correlate the mechanical properties of welded joints in terms of UTS and microhardness to the thermal parameters with the use of the ANN. The results obtained have defined a model with the use of the neural networks that can predict quantitatively the mechanical behaviour of the FSW joints, as shown in **Figure 6**.

**Figure 6.** Approaches used for evaluating the quality of FSW process through destructive and non-destructive tests.

The results of all tests are summarized in **Table 2** and the same data were used to train the ANN.

In order to establish a relationship between the mechanical properties of the FSW joints and the process parameters, a simulation model was developed. In the development of the model two different ANNs were used, as follows: in the first network, called "ANNHV", was used as output variable, Vickers micro hardness of HAZ; in the second network, called "ANNUTS" was used as the output variable the ultimate tensile strength. Both have used process parameters as inputs. The ANNs were implemented using Alyuda NeuroIntelligence™-Neural networks software (2.2, Alyuda Research Company, LLC., Cupertino, CA, USA). The first network ANNHV was developed with five input nodes (*n*, *v*, *p*, *MSHCRS*, and *MSHCAS*) and only one response node


1 Tool rotation speed.

2 Tool travel speed.

plates, using the ANNs with the FSW process parameters as input variables. The data set for training, testing and validation of the ANN were the results obtained by experimental cases [82–84], in which all welded joints were performed by non-destructive (visual inspection) and destructive testing (macrographic tests). These tests have been useful for detecting macro defects present on the surface and within the welded area. An accurate quantitative analysis of the FSW process was carried out using the results of the destructive tests of each welded specimen in terms of ultimate tensile strength (UTS) and Vickers micro hardness. Thermographic techniques were used to study the thermal behaviour of FSW process. In the thermal analyses, two thermal parameters were considered: the maximum temperature and the slope of the heating curve measured during the FSW process, along the two sides of the weld (MSHCRS and MSHCAS, respectively). The analysis established that there is a correlation between the data derived from the thermographic controls and the quality of the welded joints, in terms of UTS. Thus this work defines the importance and effectiveness of the use of infrared technology for monitoring the FSW process in a quantitative manner, giving important information on the thermal behaviour of joints during the process. Finally, the purpose of this case study was to correlate the mechanical properties of welded joints in terms of UTS and microhardness to the thermal parameters with the use of the ANN. The results obtained have defined a model with the use of the neural networks that can predict quantitatively the

**Figure 6.** Approaches used for evaluating the quality of FSW process through destructive and non-destructive tests.

mechanical behaviour of the FSW joints, as shown in **Figure 6**.

214 Advanced Applications for Artificial Neural Networks

3 Position of the sample along the welding direction.

4 Maximum Slope of Heating Curve of thermal profiles evaluated on the surface of joints along the retreating side. 5 Maximum Slope of Heating Curve of thermal profiles evaluated on the surface of joints along the advancing side.

6 Vickers microhardness values measured in the HAZ.

7 Vickers microhardness normalized values measured in the HAZ.

8 Ultimate tensile strength values.

9 Ultimate tensile strength normalized values.

**Table 2.** Measured data used to train the ANN.

(output node), identified as the micro hardness of the Heat Affected Zone of the welds, HVhaz. "Trial-and-error approach" was used to investigate and analyze more than 1000 different network architectures to identify the best architecture for the first network (ANNHV). The network fitness score was calculated for each network with different design (number of hidden layers, number of nodes, etc.), based on the inverse of the mean absolute error (MAE) on the testing set. The best network architecture has been identified with the higher fitness score. The best accuracy and minimum prediction error was obtained by adopting an ANNHV characterized by only one hidden layer with 12 neurons as shown in **Figures 7**–**9**.

The second network (ANNUTS) was developed with six input nodes (*n*, *v*, *p*, *MSHCRS*, *MSHCAS* and *HVhaz*) and one response node (output) identified as the ultimate tensile strength of the welds (UTS). Even in this second analysis the methodology chosen for identifying the architecture of the network are the same of the ANNHV. The "best" reliability of the prediction was achieved, adopting an ANNUTS characterized by only one hidden layer with four neurons, as shown in **Figures 10**–**12**.

The reliability of the estimation of the mechanical properties predicting by the ANN simulation model was evaluated by comparing the data with the experimental results. For this purpose, the mean absolute percentage error (MAPE) was calculated for the two ANNs modelled. **Table 3** summarizes the results of this analysis that demonstrated that the values derived from ANN simulation have a higher level of reliability. Therefore, the neural networks were able to predict, with significant accuracy, the mechanical properties of the friction stir welding joints, under a given set of welding conditions.

**Figure 7.** Back-propagation neural network used to foresee the Vickers micro hardness of the Heat Affected Zone (HAZ).

**Figure 8.** Predicted Vickers HAZ micro hardness by ANN versus the experimental data.

**Figure 9.** Regression line at the training stage.

(output node), identified as the micro hardness of the Heat Affected Zone of the welds, HVhaz. "Trial-and-error approach" was used to investigate and analyze more than 1000 different network architectures to identify the best architecture for the first network (ANNHV). The network fitness score was calculated for each network with different design (number of hidden layers, number of nodes, etc.), based on the inverse of the mean absolute error (MAE) on the testing set. The best network architecture has been identified with the higher fitness score. The best accuracy and minimum prediction error was obtained by adopting an ANNHV characterized

The second network (ANNUTS) was developed with six input nodes (*n*, *v*, *p*, *MSHCRS*, *MSHCAS* and *HVhaz*) and one response node (output) identified as the ultimate tensile strength of the welds (UTS). Even in this second analysis the methodology chosen for identifying the architecture of the network are the same of the ANNHV. The "best" reliability of the prediction was achieved, adopting an ANNUTS characterized by only one hidden layer with four neurons, as shown in **Figures 10**–**12**. The reliability of the estimation of the mechanical properties predicting by the ANN simulation model was evaluated by comparing the data with the experimental results. For this purpose, the mean absolute percentage error (MAPE) was calculated for the two ANNs modelled. **Table 3** summarizes the results of this analysis that demonstrated that the values derived from ANN simulation have a higher level of reliability. Therefore, the neural networks were able to predict, with significant accuracy, the mechanical properties of the friction stir welding

**Figure 7.** Back-propagation neural network used to foresee the Vickers micro hardness of the Heat Affected Zone (HAZ).

by only one hidden layer with 12 neurons as shown in **Figures 7**–**9**.

joints, under a given set of welding conditions.

216 Advanced Applications for Artificial Neural Networks

Starting from the results obtained in previous researches [84] where the most significant FSW process parameters for AA5754 H111 plates were identified, the development of this ANN model could be used to identify the optimal process parameter setting in order to achieve the desired welding quality.

**Figure 10.** Back-propagation neural network used to foresee the ultimate tensile strength.

**Figure 11.** Predicted ultimate tensile strength by ANN versus the experimental data.

**Figure 12.** Regression line at the training stage.


**Table 3.** Mean absolute percentage error computed for hardness and ultimate tensile strength of AA.
