1 Introduction

Additive manufacturing (AM) has evolved substantially during the last decades. It has transited from being a rapid prototyping technology, mainly focused on polymer processing [1], to a technology capable of producing final functional parts and processing almost any type of material [2]. Within metal AM, two major technologies are distinguished, one where there is a bed of metallic powder and the content is fused through a heat source, e.g., laser or electron beam (powder bed fusion, PBF), and the second, where the material is deposited directly in either powder or wires, called directed energy deposition (DED) [3]. Wire arc additive manufacturing (WAAM) is a DED technology that combines an electric arc as the heat source and a metal wire as feedstock, typically employing standard welding equipment. WAAM technology has many advantages compared to PBF processes. It has a higher deposition rate of up to 8 kg/h [4], it does not always require a highly inert atmosphere [5], and it is possible to manufacture large and medium-complex metal components [6] and process any alloy used in welding [7].

In welding, it is common practice to use the heat input to control process characteristics such as the cooling rate and temperature gradient. The heat input is calculated as the ratio of arc power to travel speed times the arc efficiency. The arc efficiency considers the losses from the arc to the environment. However, as Fuerschbach and Knorovsky [8] have pointed out, the heat input is insufficient to estimate the amount of metal that is actually melted. Conduction losses through the material account for more than half the absorbed energy which goes into the material [9]. Moreover, the latter gets worse at low travel speed. These losses give origin to the melting efficiency, as the ratio between the minimum necessary energy to melt the fusion zone and the energy which is effectively absorbed by the material. It has been shown that the melting efficiency can be related to the width of the heat-affected zone [10]. Therefore, it is relevant not only as any efficiency obviously is, however also as a parameter possibly affecting the stability of the process and the component’s properties.

1.1 Efficiency in metal additive manufacturing processes

Saving energy is essential in any manufacturing process. In that sense, to accurately determine the global efficiency of a metal AM process, it is necessary to differentiate between source efficiency (\({\eta }_{s}\)) and melting efficiency (\({\eta }_{m}\)). Source efficiency is described as the heat transferred to the workpiece divided by the total heat generated by the heat source and depends on the interaction between the heat source and workpiece; it is described by Eq. (1):

$${\eta }_{s}=\frac{{E}_{\mathrm{net}}}{{E}_{i}}$$
(1)

where \({E}_{i}\) expressed in [J mm−1] is the energy or heat input per unit length and can be calculated as the ratio between power (P) in watts and the travel speed v [mm s−1]; \({E}_{\mathrm{net}}\) is the net energy input per unit length. In arc sources, the power is calculated by the product between voltage and current; therefore, the arc efficiency is given by Eq. (2):

$${\eta }_{s}=\frac{{E}_{net}}{\frac{P}{v}}=\frac{v \cdot {E}_{net}}{V\cdot I}$$
(2)

For gas metal arc welding (GMAW) and submerged arc welding (SAW), \({\eta }_{s}\) typically follows between 0.8 and 0.9, while for non-consumable electrode processes such as gas tungsten arc welding (GTAW) and plasma arc welding (PAW), the arc efficiency falls to a value of around 0.5 [11]. Thus, net energy is obtained from Eq. (2).

On the other hand, the melting efficiency denotes the fraction of the net energy that in fact melts the material, while the rest is lost through heat conduction in the workpiece. The \({\eta }_{m}\) depends on both the heat source and the material properties. In welding, \({\eta }_{m}\) is defined as the amount of heat required to melt the weld deposit per unit length divided by the net energy input [12]. Similarly, for WAAM, the melting efficiency can be calculated using the same definition. Therefore, WAAM technology will depend on the wire material, bead geometry, substrate properties, and processing parameters. For instance, Fig. 1 shows the cross-section and main dimensions of a bead-on-plate deposited by WAAM in carbon steel; W represents the bead width, H is the bead height, Pd is the penetration depth, θ is the contact angle, and the darker zone is the heat-affected zone (HAZ) [13]. Melting efficiency can be estimated after the process has finished, focusing on the energy used in melting the base plate, given by the penetration area (A1), and the energy consumed in melting the deposited material (A2).

Fig. 1
figure 1

Cross-section micrograph of a single layer deposited by WAAM

Melting efficiency is defined as the reference value of heat required to cross the solid–liquid phase change barrier. In real terms, the melt pool reaches a higher temperature, but the liquidus temperature is taken as a reference. The \({\eta }_{m}\) can be determined as the ratio between the sum of the heat required to melt the base plate and the wire by the net energy input.

$${\eta }_{m}=\frac{\gamma \cdot {A}_{w}}{{E}_{\mathrm{net}}}$$
(3)

In Eq. (3), \(\gamma\) [J mm−3] represents the melting enthalpy, a quantity representing the change in enthalpy from inter-pass to liquidus temperature, \({A}_{w}\) [mm2] is the cross-section area given by the sum between A1 and A2. Since the net energy is known, \({\eta }_{m}\) can be expressed by Eq. (4):

$${\eta }_{m}=\frac{\gamma \cdot v \cdot {(A}_{1}+{A}_{2})}{{\eta }_{s} \cdot P}$$
(4)

Equations 5 and 6 show predicted melting efficiencies for 2D and 3D heat conduction by Wells [14] and Okada [15], respectively, where \(\alpha\) represents the thermal diffusivity of the material [mm2 s−1], and w the wall width [mm].

$${\eta }_{m}=\frac{1}{\left(\frac{8 \alpha }{5 v w}\right)+2}$$
(5)
$${\eta }_{m}=\frac{1}{1.35 \left(1+\sqrt{1+\frac{10.4 {\alpha }^{2}}{{\left(v w\right)}^{2}}}\right)}$$
(6)

Accurate measurement of the arc and melting efficiencies requires calorimetric methods to determine the amount of heat deposited in a workpiece. However, these methods typically do not consider heat losses between the start of the process and the beginning of calorimetric measurement [16]. Other methods use thermocouples to determine thermal cycles, but just at one point of the workpiece near the HAZ. Therefore, an alternative to assess \({\eta }_{m}\) consists of applying analytical or numerical models [17]. Pepe et al. [18] determined process efficiency of GMAW and cold metal transfer (CMT); the average process efficiency was around 85% by averaging the results of a liquid nitrogen calorimeter and an insulated box calorimeter. Mezrag et al. [16] determined the efficiency of CMT by applying two methods: (1) an analytical heat transfer model coupled with thermocouple measurements and (2) numerical heat transfer simulation. The values obtained vary between 0.78 and 0.92. CMT minimizes the heat input by actively limiting the arc current during deposition [19]. Since the AM process involves all heat transfer phenomena and besides the heat source moves continuously, the Navier–Stokes equations are also involved, making their computation highly complex and time-consuming. One alternative to solve these problems is the application of machine learning (ML) algorithms. Supervised ML algorithms map a function from known input–output pairs and are mainly used for classification and regression [20]. Regression is employed to estimate the relationships between a dependent variable and one or more independent variables [21]. Thus, it appears as an appropriate mathematical tool to build predictive models of the melting efficiency in AM as a function of process parameters.

1.2 Alloys, parameters, and machine learning in metal additive manufacturing

WAAM emerges as a powerful technology whose primary applicability has been established in the aerospace, aeronautical, automobile, and marine industries [22]. The capability of fabricating large-scale metal components at relatively low prices and a low buy-to-fly ratio, compared to conventional manufacturing and PBF processes, makes it suitable for these industrial sectors [23]. In WAAM, the heat source power falls in a range from 1 to 5 [kW], a travel speed between 5 and 50 [m s−1], and a deposition rate from 100 to 1000 [cm3 h−1] [24].

Process parameters must be chosen carefully to avoid problems such as spatter, excessive distortion [25], high residual stresses [26], and poor surface finish [27]. Several works have been developed to face these common problems, where deposition strategy optimization, path planning, and in situ monitoring are some strategies studied. Huang et al. [28] analyzed the effect of depositing direction on the residual stress and distortion. They found that alternating direction of deposition in every layer causes 25% less distortion. Xiong et al. [7] developed a closed-loop control system for controlling the layer width. The controller was useful for layer width ranging from 6 to 9 mm. Nguyen et al. [29] applied machine learning to generate optimal tool paths, avoiding welding defects and uneven build-up. Ding et al. [30] developed an automated manufacturing system applying artificial neural network (ANN) for path planning and void-free deposition with high geometrical accuracy. Ríos et al. [31] developed an analytical model to predict the power consumption for pulsed TIG and plasma deposition, and the model was validated for wall width less than 12 mm in Ti-6Al-4 V processing.

ML algorithms appear as a powerful tool to increase our understanding of metal AM. Li et al. [32] employed ANN to enhance a bead-overlapping model, preventing defects inside the fabricated samples. Deng et al. [33] compared boosting algorithms and ANN algorithms for bead geometry prediction; they trained the ML algorithms using average current, deposition rate, and inter-pass temperature as inputs and predicted the bead height and width. In the same line, Barrionuevo et al. [34] compared several ML regressors to predict layer height and wall width of Ti-6Al-4 V processed by plasma WAAM. Xia et al. [35] applied ML to predict the surface roughness and improve the surface integrity of deposited layers by WAAM. Ikeuchi et al. [36] developed a model based on ANN for track profile modeling in cold spray AM. ML algorithms bring new opportunities to optimize advanced manufacturing systems capable of modeling high nonlinear relations and learning from available data.

With the motivation to determine the melting efficiency of the WAAM technology, copper-coated, G3Si1 solid wire low-alloyed carbon-manganese steel was deposited by cold metal transfer technology. Then, three of the most powerful ML algorithms were trained to find a possible relationship between processing parameters and melting efficiency. A feature-importance analysis was developed to identify which parameter dominates the melting efficiency.

2 Material and methods

2.1 Experimental setup

Mild steel solid wire consumable electrodes G3Si1 (AWS: A5.18ER70S-6) were deposited on carbon steel plate A572 Gr50 (ASTM A1011/1011 M) by a modified GMAW variant based on a controlled dip transfer mode mechanism (Fronius CMT GmbH). All deposits were conducted on a 5-axis Trio Motion rig coupled with the Robacta Drive CMT welding torch (Lincoln Power Wave) [13]. Seventy-five single layer deposits were fabricated, where the wire diameter, wire feed speed, and travel speed were controlled while bead width, bead height, and energy were quantified. Furthermore, the cross-sectional area was determined by optical micrographs. The range of processing parameters is listed in Table 1.

Table 1 Experimental variables employed for the fabrication of mild steel by cold metal transfer

2.2 Melting efficiency evaluation

For assessing melting efficiency, Eq. (4) was applied, the source efficiency was held constant (\({\eta }_{s}=0.9\)). In cases where it is difficult to assess the cross-section area, it is possible to replace \({A}_{w}\) with the product between layer height (H) and wall width (W), as they show a high coefficient of correlation (R2 = 0.9797) (Fig. 2). Moreover, a coefficient (\(\zeta =0.87\)) is added to Eq. (4) in order to improve the model accuracy and increase its precision. Therefore, the melting efficiency can be calculated using Eq. (7):

Fig. 2
figure 2

Relationship between the cross-section area (Aw) and the product between layer height (H) and wall width (W)

$${\eta }_{m}=\frac{\zeta . \gamma \cdot v \cdot H \cdot W}{{\eta }_{s} \cdot P}$$
(7)

2.3 Machine learning algorithms

The core of the ML algorithms is the data. Therefore, Fig. 3 presents the statistical distribution of each variable and the histograms on the diagonal. The input parameters to train the algorithms were the wire diameter (WD), wire feed speed (WFS), travel speed (TS), and nominal power (P). The output parameter is the melting efficiency (ME) (Fig. 4). To accurately predict melting efficiency in WAAM processes, three types of the most potent ML regressors were employed, which are detailed in the following sections.

Fig. 3
figure 3

Scatter matrix to show a possible correlation between process parameters and melting efficiency

Fig. 4
figure 4

Machine learning regressors for predicting melting efficiency

2.3.1 Gaussian process regressors

Gaussian process regressor (GPR) is a stochastic method based on statistical learning and Bayesian theory that measures the similarity between points using a kernel function to predict the value for an unseen point from the training data [37]. GPR works well on small datasets and can provide uncertainty measurements on the predictions [38].

2.3.2 Extreme gradient boosting regressor

Extreme gradient boosting regressor (XGBR) is an ensemble boosting method, which predicts the desired outcome based on a forward stage-wise fashion [33]; it allows the optimization of arbitrary differentiable loss functions [38]. It uses a regularized model formalization to control overfitting, which gives it better performance.

2.3.3 Multi-layer perceptron

Multi-layer perceptron (MLP), commonly known as artificial neural network (ANN), is based on the perceptron as an operational unit trained using backpropagation; therefore, it uses the square error as a loss function output set of continuous values. MLP determines a function \(y=f\left(x;\theta \right)\) and learns the value of the parameters \(\theta\) that result in the best approximation [39].

GPR, XGBR, and MLP were all trained and tested. The dataset was assembled from the experimental results (Fig. 3). In order to achieve the highest accuracy, the hyperparameters of each ML algorithm were tuned by applying random search optimization. This procedure automatically examines the hyperparameter search space and attempt to find the optimal values that maximize the coefficient of determination (R2). The ranges of explored hyperparameters are listed in Table 2.

Table 2 Hyperparameter ranges employed in random search optimization

The dataset assembled with the experimental data was randomized and then split into training (80%) and testing (20%) portions. Before initiating the training process, the dataset was scaled using zero mean and unit variance. The ML algorithms employed to assess the melting efficiency were executed in Google Colaboratory (Colab) environment using Scikit-learn and XGBoost libraries.

2.4 Evaluation of the precision of machine learning algorithms

K-fold cross-validation (CV) was employed to avoid overfitting during the training process [40]. In this validation technique, k represents the number of parts in which the data is divided; k-1 folds are used for training, and the remaining fold is used to test the model [38]; in this work, 5 k CV was utilized. According to Barrionuevo et al. [41], ML algorithms’ accuracy evaluation is more straightforward when applying several metrics or a combination of them. They applied a custom metric in the form of Eq. (8):

$$IM=\sqrt{{\left(1-{R}^{2}\right)}^{2}+MSE+{\left(MAE\right)}^{2}}$$
(8)

where R2 is the coefficient of determination, MSE is the mean squared error, and MAE is the mean absolute error.

This index of merit (IM) evaluates the accuracy of the predictions; as the magnitude of the index approaches zero, the maximum predicting accuracy is achieved. This metric is beneficial when all metrics present similar results.

Once identified which algorithm presents the higher accuracy (lower IM), feature importance analysis (FIA) was employed. FIA assigns a score to input features based on how useful they are at predicting a target variable (\({\eta }_{m}\)). Moreover, FIA provides scores that help us obtain insight into the data, and the model can improve the usefulness of a predictive model on the estimations achieved.

3 Results and discussion

3.1 Bead geometry evaluation

Sequeira-Almeida [13] determined layer geometry through AxioVision image analysis software utilizing built-in measurement functions. The obtained results are shown in Fig. 5. The bead width (W) varies from 2.52 to 8.83 mm; the bead height (H) presents a compact range from 1.61 to 3.62 mm.

Fig. 5
figure 5

Boxplots of measured bead geometry: height (H) and width (W)

3.2 Analytical melting efficiency results

According to the methodology explained in Sect. 2.2, Eq. (7) shows good agreement with the conventional model depicted in Eq. (4). A \({\eta }_{m}\) of 44.56 ± 5.48% was obtained using Eq. (4), while \({\eta }_{m}\) = 44.47 ± 6.47% is reported when applying Eq. (7). Therefore, the use of the height and width of the WAAM deposit appears as a good alternative to replace the penetration area (A1), and the energy consumed in melting the deposited material (A2). The obtained results are in agreement with the results reported by DuPont and Marder [42]. Furthermore, it is common to report the melting efficiency as a function of the travel speed; thus, Fig. 6 shows that the melting efficiency increases with increasing travel speed. Equations (4), (5), and (7) were employed to assess the melting efficiency in WAAM analytically.

Fig. 6
figure 6

Melting efficiency as a function of travel speed for the cold metal transfer process

3.3 Machine learning melting efficiency results

The obtained hyperparameters that maximize the accuracy by random search optimization are reported in Table 3.

Table 3 Hyperparameters that provide the highest accuracy of each ML algorithm

Gaussian process regressor (GPR), extreme gradient boosting regressor (XGBR), and multi-layer perceptron (MLP) algorithms were applied to predict the melting efficiency during WAAM. All algorithms show similar predictions, GPR reports a melting efficiency of 44.32 ± 4.79%, XGBR 44.69 ± 4.62%, and MLP 44.12 ± 4.80%. The dispersion of these results is due in part to the range of travel speed involved in the CMT experiments. The obtained metrics during the cross-validation and testing are reported in Table 4.

Table 4 Metrics to assess the accuracy of the ML algorithms employed to predict melting efficiency in CMT

Cross-validation provides a practical evaluation of the models’ capability to predict new data and face common problems as underfitting or overfitting. For the melting efficiency evaluation, all the examined algorithms provide similar metrics. Nonetheless, GPR achieves a higher coefficient of determination, which explains how well the model replicates the observed results and presents the same value for MAE with the XGBR algorithm. XGBR and MLP present similar metrics, but MLP presents a higher index of merit, therefore, lower accuracy.

GPR obtains the lowest IM and reports the highest R2 and the lowest error metrics about the set employed for testing evaluation. All the algorithms show good accuracy for predicting melting efficiency in WAAM. Figure 7 shows the performance evaluation of each ML algorithm. The training dataset is plotted in black dots and different colors in the testing dataset by each algorithm. The predicted melting efficiency corresponds to the vertical axes, while the horizontal axes show the measured melting efficiency.

Fig. 7
figure 7

Scatter plot for accuracy evaluation of the GPR performance in the melting efficiency prediction

Figure 8 shows the feature-importance analysis, where power (P) scores the highest value, 72.74%. Therefore, the nominal power represents the main factor for the prediction model. Travel speed (TS) and wire feed speed (WFS) show feature importance of 11.56 and 10.47%, respectively. The wire diameter practically does not influence the model predictability.

Fig. 8
figure 8

Feature importance analysis of the processing parameters in the melting efficiency prediction model

In order to assess the behavior of the ML algorithms, an average set of processing parameters was selected (WD = 0.8 mm, WFS = 98 mm s−1, P = 2245 W); the melting efficiency evaluation is reported as a function of travel speed in Fig. 9. GPR and MLP algorithms converge to the maximum melting efficiency value (≈ 51%); on the other hand, XGBR reports a melting efficiency near the average (44.8%). Therefore, GPR and MLP capture the essence of the melting efficiency evaluation; they can reproduce the observed trend in Fig. 6 and the model developed by Wells [14].

Fig. 9
figure 9

Melting efficiency evaluation as a function of travel speed: comparison between XGBR, GPR, and MLP

During the WAAM process planning, it is worth noting that although the melting efficiency increases with increasing travel speed, there is a threshold where the heat input only melts the feedstock but does not melt the substrate, causing delamination. Moreover, a roughness increase has been reported while increasing travel speed or decreasing power due to a lower melting efficiency [25]. Experimentally, it has been found that the power with which there is greater melting efficiency is around 2.6 kW. Thus, a linear energy density of around 110 J/mm is recommended for processing carbon-manganese steel. Furthermore, an inverse relationship has been reported between travel speed, melt pool depth, and width, and a direct relationship with heat input [10, 43].

4 Conclusions

This work presents the evaluation of melting efficiency in a WAAM process. The cold metal transfer process was assessed analytical and by applying machine learning algorithms. The main results can be summarized as follows:

  • The calculated melting efficiency results report a value of 44.56 ± 5.48% for the cold metal transfer process employing Eq. (4). For the proposed model in Eq. (7), a melting efficiency of 44.47 ± 6.47% was obtained.

  • By applying machine learning, it is possible to predict the melting efficiency without using complex calorimetry measurement systems. This technique can adjust the process parameters to ensure suitable adhesion between the substrate and the deposited material avoiding delamination.

  • The algorithm that better performs predicting melting efficiency in CMT was the Gaussian process regressor, with a predicted value of 44.32 ± 4.79%. It shows the highest coefficient of determination, lowest mean squared error, and lowest absolute error during cross-validation and testing procedures. The accuracy evaluation was validated through the lowest index of merit. For these reasons, GPR is the algorithm recommended for predicting melting efficiency in WAAM.

  • The factors that dominate the model prediction were determined through a feature-importance analysis. Nominal power represents over 72.7% of the model’s predictability, followed by travel speed (11.6%). These parameters make physical sense since the torch power to speed ratio represents the heat input.