Prediction of Weld Bead Formation of Duplex Stainless Steel Fabricated by Wire Arc Additive Manufacturing Based on the PSOBP Neural Network
https://doi.org/10.1007/s1180402300332y

Abstract
Duplex stainless steel was formed through welding wire and arc additive manufacturing (WAAM) using tungsten inert gas. The effects of wire feeding speed (WFS), welding speed (WS), welding current, and their interaction on the weld bead width and height were discussed. Backpropagation (BP) neural network algorithm prediction model was established by taking the bead width and height as the output layer, and the network weight and threshold values were optimized using the particle swarm optimization (PSO) algorithm to obtain the prediction model of bead width and height. The predicted results were verified by experiments. Results show that the weld bead width increases with the increase in WFS and the welding current and decreases with WS. The smaller the WFS, the faster the WS, which is beneficial for the generation of equiaxed crystals. The smaller the welding current, the faster the cooling speed of the metal melt, which is conducive to the formation of dendrites. The interaction among WS, wire feed speed, and welding current has a significant effect on the bead width. The weld bead height is positively correlated with the wire feed speed and negatively correlated with the WS and current. The interaction between the wire feed speed and WS is significant. The optimized WAAM process parameters for duplex stainless steel are a wire feed speed of 200 cm/min, WS of 24 cm/min, and welding current of 160 A. The maximum error of the BP neural network in predicting the weld bead width and height is 7.74%, and the maximum error between the predicted and experimental values of the BPPSO neural network is 4.27%. This finding indicates that the convergence speed is fast, improving the prediction accuracy.Article Highlights• Duplex stainless steel was formed using tungsten inert gas WAAM;• The effects of WAAM parameters—wire feeding speed, welding speed, and welding current—on forming dimensions were evaluated;• PSOBP successfully predicted the crosssectional dimensions of the weld bead and improved the prediction accuracy compared with that using BP;• The fitting function of the singlepass singlelayer weld bead section of duplex stainless steel WAAM was determined as the cosine function. 
1 Introduction
Duplex stainless steel exhibits high strength and excellent stress corrosion resistance, which are suitable for marine engineering (Chen et al., 2022). Additive manufacturing (AM) is a 3D solid rapidly available manufacturing technology and is one of the key development implications for future innovation. Wire and Arc Additive Manufacture (WAAM) adopts layerbylayer surfacing to manufacture dense metallic solid parts. Owing to its high heat input and fast forming speed, it is suitable for the lowcost, efficient, and fast nearnet shape formation of large and complex components. This technology has incomparable efficiency and cost advantages over other additive technologies in manufacturing largesized structural parts. The combination of WAAM and marine manufacturing is a hot topic in marine manufacturing. WAAM can be used for the direct formation of large ship parts and is especially suitable for the onsite repair of ship parts. Many studies have been conducted on the welding of duplex stainless steel (Landowski et al., 2020; Maurya et al., 2021; Świerczyńska et al., 2020; Maurya et al., 2022a; Maurya et al., 2022b), but only a few have focused on the WAAM of duplex stainless steel. In the present work, the WAAM of duplex stainless steel using tungsten inert gasshielded welding was carried out, and the quality of weld bead formed using duplex stainless steel was predicted. The results can provide scientific guidance for the WAAM of duplex stainless steel components.
Gasshielded tungsten inert welding (TIG) (Moreira et al., 2020) is one of the widely used welding heat sources and has the characteristics of stable arc, no reaction between shielding gas and metal, convenience, and flexibility (Ayarkwa et al., 2017). WAAM is based on the stacking of overlapping weld beads, and the quality of weld beads directly affects the quality of the processed workpiece (Sahoo et al., 2021). Given that the welding process is nonlinear, multivariable, and complex, the weld quality is directly related to the welding process (Durga et al., 2021). Guo et al. (2018) found that when welding 5083 aluminum alloy with molten electrode plasma arc, an increase in welding current and a decrease in welding speed (WS) increase the depth of melt. When conditions such as 230 A current, 0.9 m/min wire feed speed, and 6.5 L/min shielding gas flow rate are adopted, the maximum tensile strength of the welding area reaches 274 MPa, which is close to 86% of the base material. Le et al. (2021) found that the optimal process parameters for the arc augmentation of 308L stainless steel wire are 368 mm/min wire feed speed, 22 V welding voltage, and 122 A welding current, which can obtain a singlelayer singlepass with a smooth and regular surface, reduce heat input, and ensure the stability and quality of 308L walls. Owing to the different melting points of different kinds of metal wires, such as ER5356 (Yuan et al., 2020), ER2319 (Qi et al., 2019), and 316L (Wang et al., 2022), their suitable WAAM process parameters also vary. The welding currents of the above welding wire materials are 90 – 110, 120, and 150 A, respectively, and their wire feeding and WSs are different. Variations in thermal expansion coefficient and deformation behavior are found between austenite and ferrite in duplex stainless steel. The inharmonious deformation of the two phases is prone to the formation of edge cracks (Zhao et al., 2019), resulting in a complex welding process of duplex stainless steel (Martins and Casteletti 2009). Many complex factors influence weld bead quality and bring great challenges to the accurate prediction of weld quality (Martina et al., 2019; Sasikumar et al., 2021). Therefore, studying the effect of process parameters on the dimensions of duplex stainless steel formed by WAAM is of great significance to realize the accurate prediction of weld quality.
With the rapid development of artificial intelligence, algorithms that establish mathematical models to predict the objective function have been applied in the field of welding. Wang et al. (2021) used the vision sensing system to collect weld pool images during welding and proposed an active interference suppression control algorithm based on deep learning that provides the necessary strategy for the online monitoring and control of weld width during WAAM. To reduce the offset of the deposited layer in WAAM, He et al. (2021) used the depth residual network to predict the deposited layer offset according to the visual morphology of the melt pool obtained by the vision sensor and found that the average prediction error is less than 0.14 mm. Xue et al. (2018) established a backpropagation (BP) neural network to predict WAAM weld bead geometry, but the prediction results are not ideal due to the presence of many process parameters and model output parameters. Tian et al. (2013) developed a TIG weld size prediction model based on a genetic algorithm to optimize the BP neural network and obtained the optimal solution method for the weights and threshold values of the BP neural network that produces good prediction results (Xiao et al., 2009; Yi et al., 2007). Particle swarm optimization (PSO) is an iterationbased optimization algorithm that is easy to implement and does not require the adjustment of many parameters. It is superior to traditional optimization algorithms (such as genetic algorithms) and is often used to optimize models to find the optimal solution. Kumar et al. (2020) used PSO and multiobjective optimization to obtain the best process parameters for the best joint quality. To predict weld bead morphology, Liu (2020) proposed a nonlinear fitting image analysis system based on image processing and mathematical function models. The relationship between welding process parameters and singlelayer forming dimensions, welding process parameters, and multipass forming dimensions was established. Ding et al. (2015) and Cao et al. (2010) proposed three singlelayer singlepass weld crosssectional function models with circular arc function, cosine function, and curved function to achieve the fitting and prediction accuracy of weld crosssectional sizes when multilayers and multipasses overlap.
Although the predictions of different weld bead dimensions and realtime error monitoring of WAAM sizes are available, all these methods require highcost equipment and complex mathematical models. This study mainly adopted the BP neural network algorithm (Ghafarallahi et al., 2021), which has strong nonlinear mapping capability and flexible network structure but slow learning speed and is prone to falling into local minima. PSO can effectively compensate for the shortcomings of BP neural networks by seeking individual optima via the initialized random particles, sharing the position with the overall particle swarm, and finally finding the global optimum value, thus improving the prediction accuracy and generalization ability of the model. Therefore, this study used the PSOoptimized BP (PSOBP) neural network algorithm to accurately predict the weld bead formation of duplex stainless steel WAAM. This approach can be applied to predict the process parameters required for singlepass welding wire and can also provide singlepass size prediction for the repair of large duplex stainless steel parts (i.e., corroded or worn ship hull, large gear, and propeller) to reduce actual repair errors and defects. In addition, this study provides a new idea for the research of lap ratio and path planning of large and complex parts manufactured by arc additives.
ER2209 duplex stainless steel wire manufactured by WAAM was selected as the experiment object, and the response surface methodology was used to optimize the TIG WAAM process parameters. The effects of welding current, WS, wire feed speed, and their interaction on the weld bead width and height were analyzed. The weld bead size prediction models of BP and BPPSO were established with MATLAB software, and their prediction results were compared. Finally, the fitting function of the weld bead crosssectional shape was applied to lay the groundwork for the exploration of duplex stainless steel multiple weld bead formation. The remainder of this article is organized as follows. Section 2 introduces the experimental methods, Section 3 presents the results and discussion, and Section 4 shows the main conclusions.
2 Experiment
2.1 WAAM and materials
As shown in Figure 1, the trial was carried out on a selfbuilt automatic TIG WAAM platform made up of a KUKA model KR 60 HA machine arm, a Shenzhen Ruiling YC315 TIG welder, and a WF007A wire feeder. Ar_{2} with a purity of 99.99% was used as the protective gas.
2.2 Onefactor and response surface experiments
First, the effects of wire feeding speed (WFS), WS, and welding current on the formed bead size of duplex stainless steel were studied. The other parameters were set to fixed values, including argon shielding gas flow rate of 15 L/min, tungsten electrode extension of 3 mm, and wire feeding angle of 30°. Suzhou EDM wire cutter model M340 was used to cut the formed singlelayer weld to obtain the crosssectional profile of the bead. The section was observed with a highprecision OPLENIC metallurgical microscope and measured with EZcam software to obtain the microstructure, melt width, and height of the bead. Figure 2 shows the overall flow diagram of this study.
From the singlefactor response surface experiment, the weld bead width and height were taken as the evaluation criteria of formed weld bead quality. The influence law and interaction of each parameter on weld bead width and height were studied. The weld bead width and height were taken as response values. A response surface analysis test table with three factors and three levels was designed in accordance with Box – Benhnken central combination test theory, as shown in Table 1. Various process parameters were designed according to the surface response method, and the measurement results of weld bead size were recorded. The correlations of weld bead width and height with wire feed speed, WS, and welding current were verified.
Factors Levels 1 2 3 Wire feeding speed (WFS) (cm/min) 150 200 240 Welding speed (WS) (cm/min) 24 36 48 Welding current (WC) (A) 145 155 165 2.3 PSOBP neural network model
BP neural network is a multilayer feedforward neural network with forward signal propagation and using an error backpropagation algorithm as the correction training algorithm. This method is simple and practical and is one of the most commonly used approaches to study and predict the process parameters of welding seam (Qi et al., 2019; Wang et al., 2022; Zhao et al., 2019; Martins et al., 2009). BP neural network is a typical neural network composed of three or more layers of neurons. The structural direction is from left to right, and the neurons are connected by weights between the layers. The gradient of the loss function relative to each neuron is calculated, and the weight is updated in the process of gradient BP error and iterated continuously until convergence.
The weight iteration formula is as follows:
$$ \Delta \omega_{i j}(n)=\eta \frac{\partial E}{\partial \omega_{i j}(n)}+\alpha \Delta \omega_{i j}(n1), n \in N^{+}, $$ (1) where ∆ω_{ij} (n) is the difference of the n_{th} iteration weight, and E denotes the mean square error of the output layer. The first term is the conventional learning factor term, which is the learning factor that can be set based on the specific situation, and the second term is the momentum term, which is the momentum factor. The sample data must be normalized to remove the effect of dimensionality between indicators before running the network algorithm.
$$ X=\frac{x\min (A)}{\max (A)\min (A)}, $$ (2) where X represents the value after data normalization, X∈ [−1, +1], and max/min (A) represents the maximum number of data elements in the same column. A is all the elements of the same column, and x is the value of a specific digit on that column. BP neural network implements an inputtooutput mapping function. The mathematical theory has demonstrated that threelayer neural networks can approximate nonlinear continuous functions with arbitrary accuracy. The following empirical formula is used as a general reference:
$$ l=\sqrt{n+m}+a, $$ (3) where n is the number of neurons in the input layer, m is neurons in the output layer, a∈[1,10], and l is the number of neurons in the hidden layer. In this study, the welding current, WS, and wire feed speed parameters were selected as the neurons of the network input layer, and the height and width of the weld bead were selected as the neurons of the output layer. According to the calculation results of the error value of the performance function under different hidden layers, the neural network prediction model has a 3122 structure, as shown in Figure 3.
PSO is a population intelligence algorithm based on the study of the predatory behavior of birds or fish. The basic idea is to assume that a certain number of particles are initialized to simulate birds in a bird swarm. Each particle has two attributes: velocity and position. The velocity of the particle determines the direction and distance and is dynamically adjusted according to the flying experience of the particle and its partners. The particles track these two extremum optimization updates through the given memory function and continue to iterate until the group optimal solution is found. The Ddimensional space is made up of N randomly initialized particles, and particle i position is X_{i} = (x_{i1}, x_{i2}, …, x_{iD}), X_{i} substitute into the adaptation function f (X_{i}) to find the adaptation value. The velocity of particle i is W_{i} = (v_{i1}, v_{i2}, …, v_{iD}), the individual extrema of particle search are denoted by P_{i} = (p_{i1}, p_{i2}, …, p_{iD}), and the particle population search's global extreme point is defined by g_{i} = (g_{i1}, g_{i2}, …, g_{iD}).Following the search for the individual and global extremes, the particle velocity and position update equations are as follows:
$$ {\boldsymbol{V}}_{\boldsymbol{i}\boldsymbol{D}}^\boldsymbol{k}=\boldsymbol{W} \boldsymbol{V}_{\boldsymbol{i}\boldsymbol{D}}^{\boldsymbol{k}\mathit{\pmb{1}}}+c_{\mathit{1}} r_\mathit{1}\left(\boldsymbol{P}_{\boldsymbol{i}\boldsymbol{D}}\boldsymbol{X}_{\boldsymbol{i}\boldsymbol{D}}^{\boldsymbol{k}\mathit{\pmb{1}}}\right)+c_{\mathit{2}} r_\mathit{2}\left(\boldsymbol{g}_\boldsymbol{i}\boldsymbol{X}_{\boldsymbol{i}\boldsymbol{D}}^{\boldsymbol{k}\mathit{\pmb{1}}}\right), $$ (4) $$ \boldsymbol{X}_{\boldsymbol{i} \boldsymbol{D}}^\boldsymbol{k}=\boldsymbol{X}_{\boldsymbol{i} \boldsymbol{D}}^{\boldsymbol{k}\mathit{\pmb{1}}}+V_{\boldsymbol{i} \boldsymbol{D}}^{\boldsymbol{k}\mathit{\pmb{1}}}, $$ (5) where V_{iD}^{k} and X_{iD}^{k} denote the D_{th} dimensional components of the velocity vector and position vector of particle i's flight in the k_{th} iteration, respectively; c_{1} and c_{2} are the learning factors; r_{1} and r_{2} are two random variables in the range [0,1]; and W is inertial weight adjustable spatial search range. A linear decreasing strategy with the following formula is usually used to enhance PSO's global and local convergence capability to find the best solution.
$$ w_i(t)=\frac{w_{\text {ini }}w_{\text {end }}}{G}+w_{\text {end, }} $$ (6) where w_{i}(t), w_{ini}, w_{end}, and G denote the weight of the t_{th} iteration, the initial weight, the termination weight, and the total number of iterations, respectively. Weights and thresholds are assigned at random in the simple BP neural network structure, and the PSO algorithm optimizes the BP neural network mainly by treating the weights and thresholds as particles. Figure 4 shows the flow chart for developing the PSOBP prediction model.
In this work, 87 groups of tests with various process parameters were carried out. Among these, 57 groups of data were chosen as training samples, and the rest were used as test samples for prediction. The training process ended when the training error as an index reached a constant or specified minimum value. The data obtained from the response surface test were divided into training and testing data. All selected data samples were then normalized, and the topology of 3121 was selected on the basis of the above parameters for the BP model. Tansig was chosen as the signal conditioning for the implicit layer and Purelin for the output layer. The training time was set to 1000, the learning rate was 0.1, and the expected error was 10^{− 5}. The above parameter settings were substituted into MATLAB language programming to obtain the training results. PSO was also used to optimize the BP neural network for prediction. Finally, the experimental results, BP neural network prediction, and PSOBP neural network prediction were compared.
2.4 Determination of the fitting function for the weld bead section
The weld bead profile image was processed by a 3D scanner to generate an STL file, and then the average crosssectional profile of the weld bead was calculated by MATLAB image processing. The coordinates of two points at the bottom and one point at the top of the profile were determined, and different model functions were used for fitting. The mean square error ratio of different models was calculated. After comparison with the fitting accuracy of different models, the optimal fitting function model was determined.
3 Results and discussion
3.1 Effect of WAAM process parameters on weld bead forming dimensions
3.1.1 Width of weld beads
Figure 5 shows the effect of wire feed speed, WS and welding current on the width of the weld bead. The upper and lower bars in the figure represent the fitted error limits. As shown in Figure 5a, the weld bead width increases with the wire feed speed. The reason is that when the heat input, welding current, and WS are constant, the wire feed speed and the amount of wire melt increase, resulting in an increase in bead width. Figure 5b shows that the bead width decreases significantly with the increase in the WS because of the reduced amount of cladding per unit time. Figure 5c shows that the weld bead width increases linearly with the welding current. The reasons are that when the current increases, the diameter of the arc melt pool and the heat also increase, and the corresponding weld bead width becomes widened.
3.1.2 Height of weld bead
Figure 6 shows the effect of WAAM process parameters on weld bead height. As displayed in Figure 6a, the bead height increases with the wire feed speed. The reason is that when the heat of the molten pool is constant, the increase in the wire feed speed causes the unmelted welding wire to absorb heat. Hence, the bead height increases with the cladding amount. Figures 6b and 6c show that the bead height approximately linearly decreases with the increase in WS and current. The first reason is that when the heat output of the molten pool remains constant, the WS increases, and the cladding amount per unit time decreases. Thus, the bead height decreases. The second reason is that when the wire feed speed and WS remain constant, that is, when the cladding amount remains constant, the welding current and heat output increase. Thus, the bead height decreases.
3.2 Effect of WAAM process parameters on microstructure
Figure 7 shows the microstructure of duplex stainless steel under different WAAM process parameters. The microstructures are all composed of white austenite and black ferrite. The WS and current in Figures 7a and 7b are the same, but the WFS is different at 150 and 240 cm/min, respectively. The microstructure in Figure 7a is mainly equiaxed crystals with a small amount of dendrite, and the structure in Figure 7b is mostly dendrite. This finding can be attributed to the increase in WFS and the amount of metal in the molten pool per unit time and the long metal cooling time, prompting most of the austenite structure to exist in the form of dendrites.
The WFS and welding current in Figures 7c and 7d are the same, but the welding speed is different at 24 and 48 cm/min, respectively. The microstructure in Figure 7c is mostly dendrite, and that in Figure 7d is mainly fine dendrite with minimal equiaxed structure. WS is an important influencing factor of arc heat input per unit time. When the WS is slow, the heat input of welding increases and the cooling speed of metal slows down, which is conducive to the formation of dendrites. On the contrary, the increase in WS accelerates the cooling speed, which is conducive to the formation of equiaxed crystals.
The WFS and WS in Figures 7e and 7f are the same, but the welding current is different at 145 and 165 A, respectively. The microstructure in Figure 7e shows the coexistence of equiaxed crystals and dendrites, and that in Figure 7f is dominated by dendrites with a small number of equiaxed crystals. The reason is that when the current increases, the molten pool temperature increases and the cooling speed slows down, which is conducive to the formation of dendrites.
In summary, WAAM process parameters affect the metal microstructure by influencing the cooling rate of the metal melt. The smaller the WFS, the faster the WS, which is beneficial to the generation of equiaxed crystals. The smaller the welding current, the faster the cooling speed of the metal melt, which is conducive to the formation of dendrites.
3.3 Response surface
3.3.1 Interaction of process parameters with weld bead width
The experimental design and experimental data obtained with the DesignExpert 8.0 software are shown in Table 2. In this study, 87 groups of experimental data were obtained to ensure the number of training samples in the later stages. In particular, 29 groups of experiments were carried out, and each group carried out three parallel experiments. The first 17 groups of data were used for response surface software fitting.
Number Experimental scheme Bead size WFS(cm/min) WS(cm/min) WC(A) Bead width(mm) Bead height(mm) 1 240 48 155 3.24 1.98 2 150 36 145 3.95 1.45 3 195 36 155 4.49 1.63 4 195 36 155 4.39 1.63 5 240 36 145 4.16 2.72 6 195 36 155 4.39 1.63 7 195 24 165 6.19 1.77 8 150 24 155 5.81 1.42 9 195 36 155 4.03 1.85 10 195 48 145 3.33 1.71 11 240 24 155 3.47 2.81 12 195 24 145 4.69 2.17 13 195 48 165 3.65 1.5 14 195 36 155 4.092 1.93 15 240 36 165 4.61 2.23 16 150 36 165 5.26 1.1 17 150 48 155 4.09 1.07 18 150 24 165 5.61 0.98 19 150 48 165 3.76 1.02 20 240 48 165 2.45 0.97 21 240 24 165 4.76 1.82 22 195 36 165 3.8 0.88 23 150 36 155 3.36 1.35 24 240 36 155 4.77 1.72 25 195 24 155 6.04 1.79 26 150 24 145 6.72 1.44 27 150 48 145 3.64 1 28 240 48 145 2.21 2.03 29 240 24 145 3.46 2.53 Figure 8 shows the bending degree of the response surface, that is, the level of interaction. From the bending degree of the surface in the middle part, we can conclude that significant interaction occurs between the weld bead width and the WS, welding current, and WFS. The reason is that when the WS increases, the heat diffusion of the weld bead per unit time slows down. However, when the welding current increases, the heat input also increases. As a result, the amount of melted wire per unit time increases, leading to changes in the weld bead width. No significant interaction is observed between the wire feed speed and welding current. The reason is that when the wire feed speed increases, the amount of wire filler per unit time also increases. An increase in the welding current means a high heat input. Therefore, when the WS is constant, no significant interaction exists between the weld bead width and the above two parameters.
ANOVA of the response surface twofactor interaction model in Table 3 reveals that F=20.77, P=0.005, indicating that the model used in this experiment is significant. P_{A}, P_{B}, P_{C}, P_{AB}, and P_{BC} are all less than 0.05, indicating that the wire feed speed, WS, and welding current are three factors, and the WS has a significant influence on the interaction between the wire feed speed and welding current. The other interaction terms are less significant, which is consistent with the observation that the interaction between the wire feed speed and welding current is not significant in the 3D diagram. The model fit value R^{2} = 0.935 3 is obtained, where R^{2} is always between 0 and 100%. The higher the fit value, the better the model fits the data. The calculated R^{2} indicates that the model has a good response value and good fitting of variation. The effect relationship of each factor is in the order of B (WS) > C (welding current) > A (wire feed speed). The influence of various factors on the weld bead width is not a simple linear relationship. According to the regression analysis of the experimental results and the establishment of regression models:
Source Sum of squares df Mean square FValue PValue Significant Model 10.35 12 0.86 20.77 0.005 0 Significant A/WFS(cm/min) 0.048 1 0.048 1.17 0.041 1 B/WS(cm/min) 3.80 1 3.80 91.55 0.000 7 C/WC(A) 0.83 1 0.83 19.94 0.011 1 AB 0.56 1 0.56 13.36 0.021 7 AC 0.18 1 0.18 4.45 0.102 5 BC 0.35 1 0.35 8.38 0.044 3 Pure error 0.17 4 0.042 Cor total 10.52 16 $$ \begin{gathered} Y_1=4.280.11 A0.98 B+0.45 C+0.37 A B \\ 0.21 A C0.29 B C0.048 A^20.078 B^2+0.26 C^2+ \\ 0.49 A^2 B0.015 A^2 C0.69 A B^2 \end{gathered} $$ 3.3.2 Interactive effect of process parameters on weld bead height
Figure 9 shows that the interaction between the wire feed speed and WS has a significant effect on the bead height. The reason is that when the wire feed speed increases and the welding current remains unchanged, the increase of WS results in less heat input to the filled wire and an increase in the bead height. No significant interaction is found between the bead height and the welding current, wire feed speed, welding current, and WS. The reason is that when the welding current and heat input increase, the amount of metal that can be melted increases. The increase in the wire feed speed also increases the amount of melt cover per unit time. With the increase in the WS, the bead height changes significantly.
The principle of ANOVA in Table 4 is the same as that of the above analysis of the influencing factors of bead width. The model fit value R^{2} = 0.949 8 is obtained, indicating that the model has a good response value and good fitting of variation. The effect relationship of each factor is in the order of A (wire feed speed) > B (WS) > C (welding current). The effect of the factors on the bead height is obtained through the regression analysis of the experimental results using the regression model:
Source Sum of squares df Mean square FValue PValue Significant Model 3.60 9 0.40 23.82 0.000 2 Significant A/WFS(cm/min) 2.76 1 2.76 164.51 < 0.000 1 B/WS(cm/min) 0.46 1 0.46 27.17 0.001 2 C/WC(A) 0.26 1 0.26 15.66 0.005 5 AB 0.058 1 0.058 3.43 0.035 3 AC 4.900E003 1 4.900E003 0.29 0.605 7 BC 9.025E003 1 9.025E003 0.54 0.487 2 Pure error 3.848E003 4 9.619E004 Cor total 0.17 16 $$ \begin{aligned} 1 / Y_2 & =1.73+0.59 A0.24 B0.8 C0.12 A B \\ 0.035 A C & +0.048 B C+0.087 A^20.00075 B^2+0.054 C^2 \end{aligned} $$ In the above analysis, the maximum weld bead width was set as a numerical criterion for the comparison of experimental results. The obtained optimized process parameters are a wire feed speed of 200 cm/min, WS of 24 cm/min, and welding current of 160 A.
A singlelayer weld bead formed under the above best process parameters is shown in Figure 10a. The surface of the weld bead is smooth without defects. As displayed in the crosssection of the weld bead in Figure 10b, the internal forming quality of the weld bead is good.
3.4 Validation of PSOBP prediction results
In accordance with the topology and parameter setting of the BP neural network, the dimensionality of PSO was calculated as D = l* (m + n) + l + m. Population number N was set between 10 and 50, and N=40 was chosen for this work. The initial and termination weights were w_{ini} = 0.9 and w_{end} = 0.3, respectively. The total number of iterations was G = 100, and the learning factor c_{1} = c_{2} = 2. Figure 11 shows that the iterative convergence speed of the fitness values of PSO is faster and more stable than those of BP. In addition, PSO optimizes the BP connection weights while improving the overall performance of the network.
The distribution of PSOBP predicted values, BP neural network predicted values, and actual output values is shown in Figure 12. A certain degree of coincidence is observed between the test sample data and BPpredicted values. Despite the error value between some groups of test samples and the predicted values in the middle of the graph, the results are still within the acceptable range.
The prediction errors of the PSOBP prediction model in the figure are more stable and less floating than those of BP, indicating that the predictiveness of the BP neural network optimized by PSO is more stable, and the prediction accuracy is further improved.
Four groups of experimental data with different process parameters were selected and predicted, and the comparison results are shown in Table 5. The maximum absolute error of the prediction model of BPPSO is 4.27%, and that of the BP neural network is 7.74%. Compared with the BP prediction model, the PSOBP prediction model has a smaller error, and its predicted bead width and height are closer to the actual values.
Validation experiment Weld bead width (mm) Weld bead height (mm) Experimental value BP Predictions PSOBP Error 1 (%) Error 2 (%) Experimental value BP Predictions PSOBP Error 1 (%) Error 2 (%) 1 4.342 2 4.360 8 4.294 7 0.42 1.09 1.901 2 1.754 1.859 6 7.74 2.16 2 4.642 8 4.436 1 4.566 9 4.45 2.24 2.220 2 2.200 6 2.378 7 0.88 0.11 3 5.213 1 5.326 9 5.288 4 2.18 1.44 1.092 3 1.159 7 1.105 8 6.17 1.24 4 3.684 5 3.887 6 3.800 6 5.512 3.15 1.151 1.087 8 1.200 1 5.49 4.27 4 Determination of the fitting function of the weld bead section
In the WAAM of metal parts, the dimensional accuracy and quality of the metal part are affected by the welding process, crosssectional geometry of the single weld bead, and overlap of adjacent weld beads. Modeling and analysis of weld bead crosssectional profiles provide the necessary morphological data for slicing, path planning, and process automation in WAAM.
For the visualization of the weld bead shape for dimensional prediction, the weld bead was first produced by a 3D scanner into an STL file, which was then processed by MATLAB image processing to calculate the average crosssectional profile of the weld bead. The coordinates of the bottom two points and the top point of the crosssectional profile were determined, as shown in Figure 13. The experimental data were then substituted into the coordinate points in turn, and their positions were idealized as symmetrical about the Y axis. The point coordinates were obtained from the weld bead crosssection size, and the parabola function model, cosine function model, and semicircle function model were selected. The weld bead crosssection fitting shape was obtained by MATLAB software fitting, as shown in Figure 14a. Finally, the mean square error of different models was calculated, and the fitting accuracy of different models was compared. Figure 14b shows the mean square error between different fitting functions and the actual weld bead coordinate points in the fitting process.
Figure 14a shows the fitted shape of the weld bead crosssection. The coordinates of points were obtained from the weld bead crosssection size. Three function models, i.e., the parabolic function model, cosine function model, and semicircle function model, were selected to fit the shape of the weld bead crosssection. Another fitting was performed in MATLAB software. Figure 14b shows the mean square error of the different fitting functions related to the actual weld bead coordinate points during the fitting process. Here, the maximum fitting mean square errors of the parabolic function, cosine function, and semicircle function are 0.65, 0.46, and 0.71, respectively. The cosine function fitting is closest to the weld bead crosssection geometry, which serves as a guideline for multilayer multipass WAAM.
5 Conclusion
In this work, duplex stainless steel was formed through WAAM using tungsten inert gas. The effects of WAAM parameters and their interaction on forming dimensions were evaluated. The crosssectional dimensions of the weld bead were successfully predicted using PSOBP, which improved the prediction accuracy compared with that using BP. The fitting function of the singlepass singlelayer weld bead section of duplex stainless steel WAAM was determined.
1) The weld bead width increases with the wire feed speed and welding current and decreases with the increase in the WS. The significant influence on the bead width is in the order of WS > welding current > wire feed speed. The weld bead height is positively correlated with wire feed speed but negatively correlated with the WS and welding current. The significant influence on the bead height is in the order of wire feed speed > WS > welding current.
2) The interactive effect between the wire feed speed and WS on the bead height is significant, but that between the welding current, wire feed speed, welding current, and WS is not significant. The interactive effect among the WS, welding current, WS, and wire feed speed on the bead width is significant. No significant interaction is found between the wire feed speed and welding current. The optimized process parameters for duplex stainless steel WAAM are wire feed speed of 200 cm/min, WS of 24 cm/min, and welding current of 160 A. WAAM process parameters affect the metal microstructure by influencing the cooling rate of the metal melt. The smaller the WFS, the faster the WS, which is beneficial to the generation of equiaxed crystals. The smaller the welding current, the faster the cooling speed of the metal melt, which is conducive to the formation of dendrites.
3) The maximum error of the BP neural network in predicting weld bead width and height is 7.74%. After PSO optimization, the maximum error between the predicted and experimental values of the BP neural network is 4.27%. With the fast convergence speed, the prediction accuracy is improved.
4) The maximum fitting mean square errors of the parabolic function, cosine function, and semicircle function models in the fitting function of the weld bead section are 0.65, 0.46, and 0.71, respectively, showing that the error of the cosine function model is the smallest and its fitting effect is the best.
Competing interest The authors have no competing interests to declare that are relevant to the content of this article. 
Table 1 Factor levels
Factors Levels 1 2 3 Wire feeding speed (WFS) (cm/min) 150 200 240 Welding speed (WS) (cm/min) 24 36 48 Welding current (WC) (A) 145 155 165 Table 2 Experimental design and results
Number Experimental scheme Bead size WFS(cm/min) WS(cm/min) WC(A) Bead width(mm) Bead height(mm) 1 240 48 155 3.24 1.98 2 150 36 145 3.95 1.45 3 195 36 155 4.49 1.63 4 195 36 155 4.39 1.63 5 240 36 145 4.16 2.72 6 195 36 155 4.39 1.63 7 195 24 165 6.19 1.77 8 150 24 155 5.81 1.42 9 195 36 155 4.03 1.85 10 195 48 145 3.33 1.71 11 240 24 155 3.47 2.81 12 195 24 145 4.69 2.17 13 195 48 165 3.65 1.5 14 195 36 155 4.092 1.93 15 240 36 165 4.61 2.23 16 150 36 165 5.26 1.1 17 150 48 155 4.09 1.07 18 150 24 165 5.61 0.98 19 150 48 165 3.76 1.02 20 240 48 165 2.45 0.97 21 240 24 165 4.76 1.82 22 195 36 165 3.8 0.88 23 150 36 155 3.36 1.35 24 240 36 155 4.77 1.72 25 195 24 155 6.04 1.79 26 150 24 145 6.72 1.44 27 150 48 145 3.64 1 28 240 48 145 2.21 2.03 29 240 24 145 3.46 2.53 Table 3 ANOVA of weld bead width
Source Sum of squares df Mean square FValue PValue Significant Model 10.35 12 0.86 20.77 0.005 0 Significant A/WFS(cm/min) 0.048 1 0.048 1.17 0.041 1 B/WS(cm/min) 3.80 1 3.80 91.55 0.000 7 C/WC(A) 0.83 1 0.83 19.94 0.011 1 AB 0.56 1 0.56 13.36 0.021 7 AC 0.18 1 0.18 4.45 0.102 5 BC 0.35 1 0.35 8.38 0.044 3 Pure error 0.17 4 0.042 Cor total 10.52 16 Table 4 ANOVA of weld bead height
Source Sum of squares df Mean square FValue PValue Significant Model 3.60 9 0.40 23.82 0.000 2 Significant A/WFS(cm/min) 2.76 1 2.76 164.51 < 0.000 1 B/WS(cm/min) 0.46 1 0.46 27.17 0.001 2 C/WC(A) 0.26 1 0.26 15.66 0.005 5 AB 0.058 1 0.058 3.43 0.035 3 AC 4.900E003 1 4.900E003 0.29 0.605 7 BC 9.025E003 1 9.025E003 0.54 0.487 2 Pure error 3.848E003 4 9.619E004 Cor total 0.17 16 Table 5 Comparison of predicted results of weld bead width and height
Validation experiment Weld bead width (mm) Weld bead height (mm) Experimental value BP Predictions PSOBP Error 1 (%) Error 2 (%) Experimental value BP Predictions PSOBP Error 1 (%) Error 2 (%) 1 4.342 2 4.360 8 4.294 7 0.42 1.09 1.901 2 1.754 1.859 6 7.74 2.16 2 4.642 8 4.436 1 4.566 9 4.45 2.24 2.220 2 2.200 6 2.378 7 0.88 0.11 3 5.213 1 5.326 9 5.288 4 2.18 1.44 1.092 3 1.159 7 1.105 8 6.17 1.24 4 3.684 5 3.887 6 3.800 6 5.512 3.15 1.151 1.087 8 1.200 1 5.49 4.27 
Ayarkwa KF, Williams SW, Ding J (2017) Assessing the effect of TIG alternating current time cycle on aluminium wire + arc additive manufacture. Additive Manufacturing, 18: 186193. https://doi.org/10.1016/j.addma.2017.10.005 Cao Y, Zhu S, Liang XB, Wang WL (2010) Overlapping model of beads and curve fitting of bead section for rapid manufacturing by robotic MAG welding process. Robotics and Computer Integrated Manufacturing, 27(3): 641645. https://doi.org/10.1016/j.rcim.2010.11.002 Chen M, He JS, Li JS, Liu HB, Xing SL, Wang G (2022) Excellent cryogenic strengthductility synergy in duplex stainless steel with heterogeneous lamella structure. Materials Science and Engineering, 831: 142335. https://doi.org/10.1016/j.msea.2021.142335 Ding DH, Pan ZX, Cuiuri D, Li HJ (2015) A multibead over lapping model for robotic wire and arc additive manufacturing (WAAM). Robotics and Computer Integrated Manufacturing, 31: 101110. https://doi.org/10.1016/j.rcim.2014.08.008 Durga KV, Ram PAVS, Munaf S A, Tanya B (2021) SEM with EDAX analysis on plasma arc welded butt joints of AISI 304 and AISI 316 steels. Materials Today: Proceedings, 44: 13501355. https://doi.org/10.1016/j.matpr.2020.11.393 Ghafarallahi E, Farrahi GH, Amiri N (2021) Acoustic simulation of ultrasonic testing and neural network used for diameter prediction of threesheet spot welded joints. Journal of Manufacturing Processes, 64: 15071516. https://doi.org/10.1016/j.jmapro.2021.03.012 Guo YY, Pan HH, Ren LB, Quan G (2018) An investigation on plasmaMIG hybrid welding of 5083 aluminum alloy. The International Journal of Advanced Manufacturing Technology, 98: 14331440. https://doi.org/10.1007/s0017001822064 He HY, Lu J, Zhang Y, Han J, Zhao Z (2021) Quantitative prediction of additive manufacturing deposited layer offset based on passive visual imaging and deep residual network. Journal of Manufacturing Processes, 72: 195202. https://doi.org/10.1016/j.jmapro.2021.09.049 Kumar D, Ghosh S, Kuar AS, Paitandi S (2020) Laser transmission welding of thermoplastic with beam wobbling technique using particle swarm optimization. Materials Today: Proceedings, 26: 808813. https://doi.org/10.1016/j.matpr.2019.12.422 Landowski M, Świerczyńska A, Rogalski G, Fydrych D (2020) Autogenous Fiber Laser Welding of 316L Austenitic and 2304 Lean Duplex Stainless Steels. Materials 13: 2930. https://doi.org/10.3390/ma13132930 Le VT, Mai DS, Doan TK, Paris H (2021) Wire and arc additive manufacturing of 308L stainless steel components: Optimization of processing parameters and material properties. Engineering Science and Technology, an International Journal, 24(4): 10151026. https://doi.org/10.1016/j.jestch.2021.01.009 Liu LX (2020) Study on Deposition Morphology and digital twin Simulation of Deposition Process in Arc Additive Manufacturing. University of South China, (in Chinese) Martina F, Ding J, Williams S, Caballero A, Pardal G, Quintino L (2019) Tandem metal inert gas process for high productivity wire arc additive manufacturing in stainless steel. Additive Manufacturing, 25: 545550. https://doi.org/10.1016/j.addma.2018.11.022 Martins M, Casteletti LC (2009) Microstructural characteristics and corrosion behavior of a super duplex stainless steel casting. Materials Characterization, 60(2): 150155. https://doi.org/10.1016/j.matchar.2008.12.010 Maurya AK, Pandey C, Chhibber R (2021) Dissimilar welding of duplex stainless steel with Ni alloys: A review. International Journal of Pressure Vessels and Piping, 192: 104439. https://doi.org/10.1016/j.ijpvp.2021.104439 Maurya AK, Pandey C, Chhibber R (2022a) Effect of filler metal composition on microstructural and mechanical characterization of dissimilar welded joint of nitronic steel and super duplex stainless steel. Archives of Civil and Mechanical Engineering, 22: 90. https://doi.org/10.1007/s43452022004139 Maurya AK, Pandey C, Chhibber R (2022b) Influence of heat input on weld integrity of weldments of two dissimilar steels. Materials and Manufacturing Processes, 38: 379400. https://doi.org/10.1080/10426914.2022.2075889 Moreira AF, Ribeiro KSB, Mariani FE, Reginaldo TC (2020) An Initial Investigation of Tungsten Inert Gas (TIG) Torch as Heat Source for Additive Manufacturing (AM) Process. Procedia Manufacturing, 48: 671677. https://doi.org/10.1016/j.promfg.2020.05.159 Qi ZW, Qi BJ, Cong BQ, Sun HY, Zhao G, Ding JL (2019) Microstructure and mechanical properties of wire + arc additively manufactured 2024 aluminum alloy components: Asdeposited and post heattreated. Journal of Manufacturing Processes, 40: 2736. https://doi.org/10.1016/j.jmapro.2019.03.003 Sahoo A, Tripathy S (2021) Development in plasma arc welding process: A review. Materials Today: Proceedings, 41: 363368.10.1016/j. matpr. 2020.09.562 http://www.sciencedirect.com/science/article/pii/S2214785320372783 Sasikumar C, Sundaresan R, Merlin MC, Ramakrishnan A (2021) Corrosion study on AATIG welding of duplex stainless steel. Materials Today: Proceedings, 45: 33833385. https://doi.org/10.1016/j.matpr.2020.12.777 Świerczyńska A, Fydrych D, Landowski M, Rogalski G, Łabanowski J (2020) Hydrogen embrittlement of X2CrNiMoCuN2563 super duplex stainless steel welded joints under cathodic protection. Construction and Building Materials, 238: 117697. https://doi.org/10.1016/j.conbuildmat.2019.117697 Tian L, Luo Y, Wang Y (2013) Prediction Model of Weld Size of TIG Based on BP Neural Network Optimized by Genetic Algorithm. Journal of Shanghai Jiao Tong University, 47(11): 16901701 (in Chinese) http://en.cnki.com.cn/Article_en/CJFDTOTALSHJT201311008.htm Wang C, Zhu P, Lu YH, Shoji T (2022) Effect of heat treatment temperature on microstructure and tensile properties of austenitic stainless 316L using wire and arc additive manufacturing.Materials Science and Engineering, 832:142446. https://doi.org/10.1016/j.msea.2021.142446 Wang YM, Lu J, Zhao Z Deng WX, Han J, Bai LF, Yang XW, Yao JY (2021) Active disturbance rejection control of layer width in wire arc additive manufacturing based on deep learning.Journal of Manufacturing Processes, 67:364375. https://doi.org/10.1016/j.jmapro.2021.05.005 Xiao Z, Ye SJ, Zhong B, Sun CX (2009) BP neural network with rough set for short term load forecasting.Expert Systems with Applications, 36(1): 273279. https://doi.org/10.1016/j.eswa.2007.09.031 Xue QK, Ma SY, Liang YX, Wang JX, Wang YP, He FL, Liu MY (2018) Weld Bead Geometry Prediction of Additive Manufacturing Based on Neural Network.International Symposium on Computational Intelligence and Design, 2:4751. https://doi.org/10.1109/ISCID.2018.10112 Yi JQ, Wang Q, Zhang DB, Wen JT (2007) BP neural network predictionbased variableperiod sampling approach for networked control systems.Applied Mathematics and Computation, 185(2): 976988. https://doi.org/10.1016/j.amc.2006.07.020 Yuan T, Yu ZL, Chen SJ, Xu M, Jiang XQ (2020) Loss of elemental Mg during wire + arc additive manufacturing of AlMg alloy and its effect on mechanical properties.Journal of Manufacturing Processes, 49:456462. https://doi.org/10.1016/j.jmapro.2019.10.033 Zhao Y, Wang Y, Tang S, Zhang WN, Liu ZY (2019) Edge cracking prevention in 2507 super duplex stainless steel by twinroll strip casting and its microstructure and properties.Journal of Materials Processing Technology, 266:246254. https://doi.org/10.1016/j.jmatprotec.2018.11.010