1 Introduction

The utilization of wire and arc additive manufacturing (WAAM) technology in contemporary production is determined by the requirement to accelerate and streamline the fabrication of distinctive metal components, along with enhancing environmental sustainability by reducing waste [1,2,3]. GMAW-based WAAM provides increased 3D printing efficiency [45] but comes with the drawback of decreased precision and poor surface quality [6]. Printed parts typically necessitate additional machining; therefore, minimizing post-processing is crucial for streamlining production time and simplifying the production chain [7, 8]. When declining post-processing, it is important to consider the poor surface quality and geometric accuracy of the printed components. The printed parts experience anisotropy in mechanical properties due to unevenness on the surface; this leads to a decrease in mechanical properties when subjected to loads across the longitudinal layers [9,10,11]. Furthermore, waviness and defects that are linked to it cause stress concentration that can be crucial for components functioning under fluctuating loads and vulnerable to fracturing [12, 13].

Deviations in metal transfer lead to defects and unusual surface irregularities. One of the primary causes of deviation in GMAW-based WAAM is the deflection of filler wire from the tool center point (TCP) (Fig. 1a). The TCP is a crucial component of the robot kinematics that determines the movements of the robot arm along the generated deposition path. The welding robot’s digital model assumes that the feed point corresponds to the TCP and is constant relative to the tool (Fig. 1b). Any deviation in the filler wire from the TCP causes the deposition point to move away from the defined path following the wire. This factor contributes significantly to the relatively low accuracy of the printed geometry [14, 15]. The positioning of the filler wire is contingent upon its stress–strain state, which is a result of the wire’s drawing and winding process during production [16]. Another reason for wire deflection is contact tip wear. The contact tip is an important part of the welding circuit, transmitting welding current to the filler wire and directing it to the deposition zone. Contact tip wear (Fig. 2a) occurs as a result of external dry friction between the contact tip and wire at speeds ranging from 2 to 15 m/min. The wear can be adhesive, corrosive, or abrasive, according to prior research [17,18,19]. Depending on the current value and whether the wire has copper plating or not, the sliding contact between the wire and contact tip can exist in a liquid or solid state [20]. The wear rate is mainly influenced by three factors: the hardness of the contact surface materials, the temperature of the contact tip, and the normal force presented in the contact zone [19, 21, 22].

Fig. 1
figure 1

Deviation of filler wire from TCP

Fig. 2
figure 2

Contact tip wear pattern. a A worn contact tip (236 m of 3Si1 wire were used) and b wire position in a new contact tip

As the contact tip wears, its internal channel changes shape, causing the wire end to deviate from the TCP and, consequently, from the 3D printing or welding path. Gradual distortion of the shape of the part being printed occurs with an increase in contact tip wear. During the 3D printing or welding process, it may be necessary to replace the worn tip with a new one. Typically, replacement is required due to decreased stability of 3D printing or welding parameters, spatter, excessive wire deflection from TCP, and increased tendency to chatter, which results in the wire being welded to the contact tip in an area of high electrical resistance. Once the worn contact tip is replaced with a new one, the wire position returns to its original position relative to the TCP. Consequently, the next layer after replacement will be displaced relative to the previous layer by an amount close to the wire deflection. The effect of shape distortion and layer displacement is noticeable on relatively bulky parts weighing from 5 to 10 kg. An example of a layer displacement defect is shown in Fig. 3. The pause for contact tip replacement in this example did not exceed the cooling time between layers. The inter-pass temperature remained at 100 to 120 °C, so it can be concluded that the change in inter-pass temperature did not affect the formation of the displacement defect.

Fig. 3
figure 3

Shift defect presented on the sample and printed part

Hitoshi Matsui and Taiji Hattori note in their study that the presence of copper coating on the wire results in a lower contact tip wear rate, as compared to wires without coating [17]. They observed a rise in wear during arc ignition, where current passes through a temporarily stationary wire. The researchers suggest using uncommon Cu-Ni alloy contact tips with low thermoelectromotive force on steel at high temperature. This leads to concentrated cooling at the contact area due to the Peltier effect. To obtain high-quality printed parts, Qiang Zhan et al. developed a method for online monitoring and control of wire bending based on the processing of images obtained by a welding camera [23]. The limitation of the approach is the utilization of a costly camera, which restrains the robot’s mobility and enhances the tool’s size. Another limitation lies in its ability to track wire position in only one plane. Additionally, the correction mechanism is not viable for GMAW-based WAAM due to the significant difference in torch design.

Insufficient attention has been given to filler wire deflection. The negative outcomes of wire deflection, combined with the continuous trend towards minimizing material consumption, necessitate enhanced management of the filler wire’s position relative to the deposition path. This improved control will guarantee better geometry accuracy and repeatability. Therefore, the research aims to acquire the wire deflection dependencies on the quantity of wire utilized and establish a technique for filler wire positioning control in GMAW-based WAAM. With these dependencies, a conclusion can be drawn regarding the contact tip’s lifetime and the optimum frequency of replacement, leading to an enhancement in 3D printed part quality.

2 Materials and methods

The deflection of the filler wire was investigated by comparing the TCP position coordinates and the filler wire coordinates at identical robot positions in its robot base coordinate system. The measurements were made directly by the robot with a positional accuracy of ± 0.003 mm. To verify the robot’s accuracy, calibrated measuring plates with thicknesses of 5, 10, and 20 mm were utilized. To measure wire deflection, a reference point was selected in the robot’s work area from which all measurements were made. The reference point was located on a static steel cone in front of the robot. The point’s coordinates were determined using the robot by aligning the calibration tip installed in the torch, whose end corresponded to the TCP position at the contact tip to work distance of 13 mm, with the reference point (see Fig. 4a).

Fig. 4
figure 4

Wire deflection measurement. a Reference point determination, b wire deflection with the new contact tip, c wire deflection with the worn contact tip, and d alignment of the wire and the reference point

The initial stage of the research aimed to establish the filler wire’s initial deviation devi caused by bending. This was accomplished by installing a new contact tip on the torch and moving it to the position with the reference point coordinates (Fig. 4b). The identical procedure was implemented when inspecting the worn tip (Fig. 4c). In the following procedure, the torch was moved in the XY plane of the robot base to align the end of the filler wire with the reference point (Fig. 4d). Subsequently, the new coordinates were fixed. For each wire, five measurements were conducted, after every 3 m of wire. By comparing the determined coordinates with the reference point, the magnitude and direction of the wire deviation with the new tip were calculated. The mean measurement deviation was 0.005 mm.

The second stage of the research investigated the wear rate of the contact tip. For this purpose, a sample printing process was developed using heat-resistant alloy wires such as alloy 718 (UNS N07718/W.Nr. 2.4668) and alloy 625 (UNS N06625/W.Nr. 2.4856), along with 3Si1 mild steel welding wire (EN ISO 14341-A: G42 3 M21 3Si1). Sample deposition was performed with a controlled short arc GMAW process with reversive wire movement. The main technological parameters of the printing process are shown in Table 1.

Table 1 Main deposition parameters

Following the previously described method, the wire’s actual position was compared to the reference point every 10 to 15 m of deposited wire first 100 m, and every 30 to 50 m after 100 m. The frequency of wire deflection measurement was determined by the shape of the printed prototype part and the preliminary results of wire deflection measurements. Wire length calculations were based on the arc time and average WFS. New contact tips were installed after using 650 to 700 m of wire.

The third stage of the experiment addressed the impact of torch position on filler wire deflection direction. Two more samples were printed, with the torch rotated by 45° and 90° around the TCP Z-axis. The printing and wire deflection measurement procedures were identical to those applied in the prior stage.

The experiments utilized a Yaskawa Motoman MA1440 welding robot equipped with a Fronius TPS500i welding power source, WF 25i R and WF 60i Robacta Drive wire feeders, a Fronius MTB 500i WR 22° welding torch, and CuCrZr tips of the suitable caliber. A push–pull system with four rollers in each feeder and a total feed channel length of 5 m from spool to torch was utilized. The minimum bending radius of the feed channels was 500 ± 10 mm.

In order to analyze the stress–strain state of the wire, it was necessary to measure its geometric parameters, specifically the diameter and radius of curvature. The wire diameter was measured using a micrometer at 10 locations over a 20-m section of wire. The scale value of the micrometer was 0.01 mm. The wire’s radius of curvature was measured while in its free state on a flat glass surface. Samples were taken from the outer, middle, and inner layers of new spools. After passing through the feed channels and welding torch, additional measurements of the wire’s radius of curvature were taken. Measurements were taken using a ruler with a scale value of 1 mm.

3 Results and discussion

3.1 Initial filler wire deflection

According to the preliminary analysis, the filler wire’s deviation from the TCP occurs due to wire curvature and contact tip wear. The initial filler wire deviation (with the new contact tip) is caused by residual deformations from the wire manufacturing and spooling. The wire curve radius can significantly differ based on its material properties, diameter, and the winding spool size. Measurements of wire deformation in the free state indicated that residual deformations are directly dependent on the wire diameter when using the same winding spool size (Table 2).

Table 2 3Si1 wire deformation

The progression of deformations with increasing wire diameter can be explicated by the equation of normal stresses in tension and compression according to Hooke’s law:

$$\sigma =\frac{y}{\rho }E$$
(1)

where ρ represents the radius of curvature of the neutral layer, y represents the distance from the neutral to the test layer, and E represents Young’s modulus. Equation (1) indicates that for the same curvature, normal stresses will be elevated in the near-surface layers of a larger wire, potentially surpassing the elastic limit and resulting in residual deformations. The wire samples were measured for their radius of curvature, with the following results: alloy 625 had a radius of curvature of 135 ± 5 mm, alloy 718 had a radius of curvature of 335 ± 5 mm, and 3Si1 wire had a radius of curvature of 469 ± 5 mm. The study also investigated the change in wire curvature as the coil unwinds. Measurements of the wire in its free state revealed that the radius of curvature on the outer and inner layers remains relatively constant, with a deviation of ± 5 mm for all three materials examined.

The mean initial displacement of the alloy 718 1.2 mm wire from a 188 mm spool was 0.68 mm for two different coils with errors of \(\sigma \text{x }= 0.04\text{ mm}\) and \(\sigma \text{y }= 0.15\text{ mm}\)(Fig. 5). Thus, the curvature radius of wire remains constant throughout its entire length for each individual coil. Due to the smaller radius of curvature of the alloy 625 wire, it exhibited an initial deviation of 1.19 mm when the torch was positioned at 0° and 1.51 mm when it was placed at − 90° (Fig. 5). The standard deviation of the measurements in both positions did not exceed \(\sigma \text{x }= 0.03\text{ mm}\) and \(\sigma \text{y }= 0.06\text{ mm}\). The deviation for 3Si1 was 0.34 mm with \(\sigma = 0.05\text{ mm}\) in the X and Y directions.

Fig. 5
figure 5

Initial deviation of filler wire from TCP (CTWD = 13 mm)

When the torch was rotated 90° relative to the TCP Z-axis (wire feed axis), the deflection direction of the alloy 625 wire changed according to the angle of torch rotation (Fig. 5). The study revealed that the direction in which the wire bends is associated with the direction of torch curvature. The influence of this effect should be investigated separately.

3.2 Contact tip wear

3.2.1 Contact tip wear rate

Wear of the contact tip is an inevitable aspect of the deposition process. It gradually increases while wire curvature remains constant. Contact tip wear rate can be determined as a ratio of the material lost to the length of filler wire passed through the contact tip. For practical purposes, the wear rate can be expressed as the ratio of the linear wear to the length of wire used. The absolute value of the wire deviation from the TCP can be expressed as follows:

$${dev}_{i}=\left|\sqrt{{\left({x}_{\text{TCP}}-{x}_{\text{i}}\right)}^{2}+{\left({y}_{\text{TCP}}-{y}_{\text{i}}\right)}^{2}}\right|$$
(2)

where xTCP and yTCP are the coordinates of the TCP at a certain robot position; xi and yi are the coordinates of the filler wire at the same robot position.

The findings indicate that wire deflection and resulting contact tip wear increase unevenly and at a variable rate (Fig. 6). Accelerated wear is observed in the first 50 m of alloy 718 and alloy 625 wires used. This phenomenon was previously noted, but not explained [18].

Fig. 6
figure 6

Wire deflection from TCP during deposition (CTWD = 13 mm)

To provide an explanation for the nonlinearity of the change in wire deflection, it is necessary to examine its interaction with the contact tip in both dry sliding and sliding electrical contact scenario with high current density. As the contact tip undergoes mechanical wear, the contact area is redistributed. In the wire’s initial position in the new tip, it occupies a position with a maximum contact area in zone 1 and a minimum in zone 2 (Fig. 2b). As the tip wears, the surface in zone 2 becomes curved with a radius similar to that of the filler wire, leading to an increase in the contact area (Fig. 2a). Nevertheless, wire deflection increases, and this causes a decrease in the contact area in zone 1.

The presence of electric current can cause the oxidation of contact surfaces by elevating the average contact temperature. Measuring the contact resistance both with worn and new contact tips has yielded a value of about 15 ± 1 mΩ. This indicates that during wear, the contact area and heating do not change significantly. If friction occurs in a shielding gas environment, the presence of an electric current does not substantially affect the wear rate [24]. In that case, the lack of oxidation results in metal-to-metal contact, causing adhesive wear.

Excluding the impact of temperature and electric current, contact interaction can be defined as a dry sliding with adhesive wear. The Archard equation traditionally describes sliding wear, based on the concept of contact inequality [25]. It states that the total wear volume Q is proportional to the normal load W and the sliding distance L, and inversely proportional to the hardness H of the softest contact surface:

$$Q=\frac{KWL}{H}$$
(3)

where constant K is determined through experiments and is influenced by surface quality, chemical composition of the materials, surface hardness, and heat transfer between the surfaces. The wire is fed through the feed channels and contact tip. This causes elastic deformation of the wire and the generation of a contact force W perpendicular to the wire feed axis in the wire bending direction (Fig. 2b). As the contact tip wears, the wire bends back to its initial position. This reduces internal stresses and contact load. Based on Eq. (3), a decrease in load leads to a decrease in wear volume, subsequently reducing the wear rate of the contact tip throughout the entire duration of its interaction with the wire (Fig. 6). It should be noted that the Archard model predicts wear at a constant load W, which could be inaccurate under variable load [26].

The force exerted by the curved wire on the contact tip depends on the wire’s stress–strain state and stiffness, usually described by Young’s modulus. Stiffness can impact material wear rate by altering the contact load, friction coefficient, and fatigue behavior. In general, higher stiffness leads to more significant wear, although other factors can also affect the wear rate.

3.2.2 Direction of deflection

Wire deflection has two important characteristics: magnitude and direction. Contact tip wear typically occurs in a constant direction for specific materials (Fig. 7). When the torch is rotated 45°, the wire deflected in a plane close to the torch bend direction. Without torch rotation, the 3Si1 wire showed a deviation in the − X direction close to the XZ plane. The alloy 625 wire demonstrated a significant deviation both in X and Y coordinates in the same torch position (Fig. 7). This deviation is attributed to the wire’s stress–strain state formed during production, where it becomes obliquely bent due to spooling. As the wire’s curvature radius decreases, its lateral deflection increases. These findings highlight the importance of considering both the magnitude and direction of wire deflection in various scenarios.

Fig. 7
figure 7

Filler wire deviation plot in the XY plane relative to TCP (CTWD = 13 mm)

The wear direction corresponds to the direction of the wire’s initial deflection. For alloy 718 wire, the angle α1 between the torch bending direction at the 45° position and the wear direction is 25° with standard error 0.21 mm (Fig. 7). For the alloy 625 wire, the angle α2 between the torch bending direction at the 0° position and the wear direction is 29° with standard error 0.24 mm (Fig. 7). This fluctuation is caused by changes in the direction of wire winding on the spool in adjacent layers (Fig. 8).

Fig. 8
figure 8

Wire winding direction diagram

The largest deflection of the alloy 625 wire occurs in the X-coordinate at the 0° torch position and in the Y-coordinate at the \(-\)90 °C position (Fig. 7). This confirms that the direction of contact tip wear is influenced by the wire’s deflection direction, which corresponds to the bending direction of the torch.

In summary, it can be concluded that wire deflection direction remains consistent throughout the deposition process and is influenced by the curvature of the torch and feeding channels. The overall deflection comprises the wire’s curvature and the wear of the contact tip. The contact tip wear rate is influenced by the variable contact load, which is affected by the wear and the quality and affinity of the contacting surfaces. To achieve greater stability in wire position and improve the accuracy of predictions and calculations of wire deflection, it is necessary to minimize torch rotation around the wire feed axis, as wire deflection direction changes depending on torch position.

3.3 Wire deviation model

To predict the deviation of the filler wire, it is necessary to establish the relationship between the position of the wire during the deposition process and the length of the wire used. A regression analysis was performed based on a measured data. The deviation value serves as the dependent variable of the regression model, and the wire length is the predictor. Based on the distribution of the measured data (Fig. 6), a nonlinear power function was selected as the fitting model for the alloy 718 and alloy 625:

$$f\left(x\right)=a+b{x}^{c}$$
(4)

The distribution of the measured data of the 3Si1 wire was described by a linear quadratic model:

$$f\left(x\right)=a+bx+c{x}^{2}$$
(5)

In both models, x is the wire length; a, b, and c are the function parameters. The parameter a in both functions describes the wire’s initial deflection, which is always greater than 0 due to its curvature. In Eq. (5), b is responsible for the curve’s slope, while c is for its shape. In Eq. (4), parameters b and c have a complex effect on the data distribution’s shape. The model parameters (Table 3) were computed using the Gauss–Newton method for solving nonlinear least squares problems in the Minitab statistical data processing software.

Table 3 Parameters of deviation models

The graph analysis shows the fit between the observed and predicted values (Fig. 9). The goodness of fit of the regression models can be assessed by the residual plots. Normal probability plots show the distribution of errors in a statistical model. The plots for the three models are almost linear, which means that the residuals are normally distributed (Fig. 10a).

Fig. 9
figure 9

Regression models of wire deflection (CTWD = 13 mm)

Fig. 10
figure 10

Residual plots of wire deviation regression models. a Normal probability plots and b residual versus fits

To detect nonlinearity, non-uniform error distributions, and outliers, it is necessary to analyze the residual versus fit diagrams (Fig. 10b). For all materials, the residuals are randomly distributed around the line 0. This indicates that the selected models fit the measured data. Furthermore, none of the residuals stands out from the random distribution, indicating an absence of outliers. The residuals form a “horizontal band” around the line 0, i.e., the error variances are uniform, and therefore, the model predictions are reasonable.

Since model (5) is quadratic, and in statistics, a quadratic model can be considered linear by parameters, it can be evaluated by the coefficient of determination R2. R2 = 95% for the 3Si1 wire deflection model and the satisfactory distribution of residuals means that the model is correct.

R2 is not an appropriate measure of goodness of fit for nonlinear regression. Instead, the standard error of regression S can be used, which measures the average difference between actual and predicted values in the units of the dependent variable. It provides a more accurate assessment of prediction accuracy. Approximately 95% of observations fall within ± S of the regression line, providing a quick estimate of the 95% prediction interval. The standard deviation of the alloy 718 model is 0.12 mm, which represents 10% of the wire diameter. Similarly, the standard deviation of alloy 625 is 0.10 mm (10% of the wire diameter). 3Si1 has the smallest standard deviation among the studied wires (0.04 mm), representing 3.3% of the wire diameter.

To ensure generalization of the obtained models, it is important to consider the properties of the filler wire and the parameters that describe its stress–strain state. The wire undergoes elastic deformation in the feed channel and the tip, making Young’s modulus the main parameter that distinguishes different materials. Additionally, the wires being studied are differentiated by their diameter. Based on the filler material certificates and available mechanical test results, the studied materials have a Young’s modulus ranging from 200 to 210 GPa [27,28,29,30,31]. To further analyze the wire’s stiffness, the elastic modulus and wire diameter can be combined into a single parameter. The wire’s bending stiffness can be calculated using the following equation, given its round cross-sectional shape:

$$EI=E\times \frac{\pi {d}^{4}}{64}$$
(6)

where EI (GPa × mm4) is the bending stiffness and d (mm) is the wire diameter. The measured diameter of alloy 625 was 0.99 ± 0.002 mm and that of alloy 718 and 3Si1 was 1.17 ± 0.002 mm.

The curvature of the tested wires is another variable parameter. This parameter is not intentionally formed at the stage of drawing and winding the wire onto a spool. When the wire is elastically deformed in the torch, it interacts with the contact tip with a certain force. This force can be determined by knowing the wire stiffness and the radius of its curvature. The static structural FE analysis revealed a distinct nonlinear correlation between the contact force and the contact tip wear degree, as shown in Fig. 11.

Fig. 11
figure 11

The change in contact force as the contact tip wears out and wire deflection increases

Using the previously obtained regression models of wire deflection, along with the known radii of curvature of the wires and the determined contact interaction force, it was possible to develop a generalized model of wire deflection. The model was developed using a data sample that underwent min–max normalization of predictors, as per the formula:

$${x}_{\text{iscaled}}=\frac{{x}_{\text{i}}-{x}_{\text{imin}}}{{x}_{\text{imax}}-{x}_{\text{imin}}}$$
(7)

where \(x_{\mathrm{iscaled}}\) is the scaled value, xi is the original value, and \({X}_{\text{imin}}\) and \({X}_{\text{imax}}\) are the minimum and maximum values of the original variable, respectively. This transformation shifts and rescales the data into the range [0; 1], maintaining the structure of the dataset while normalizing the scale of the features. The model obtained is a third-order polynomial that shows the combined effect of the intersection of parameters on the magnitude and rate of contact tip wear and the magnitude of wire deflection:

$${y}^{0.5}=3.401+3.207{x}_{1}+5.226{x}_{2}-0.6614{x}_{3}+3.071{x}_{2}^{2}+0.0699{x}_{3}^{2}+5.612{x}_{1}{x}_{2}-0.5126{x}_{1}{x}_{3}+0.0508{x}_{2}{x}_{3}+0.1093{x}_{1}^{3}-0.135{x}_{2}^{3}+0.1327{x}_{3}^{3}+0.11153{x}_{1}^{2}{x}_{2}+0.02914{x}_{1}^{2}{x}_{3}+2.6{x}_{1}{x}_{2}^{2}-0.5245{x}_{1}{x}_{2}{x}_{3}-0.09078{x}_{1}{x}_{3}^{2}+0.3686{x}_{2}{x}_{3}^{2}$$
(8)

where x1 is the wire length (m), x2 is the contact force (N), and x3 is the wire curvature radius (mm). After analyzing the regression results, it can be concluded that the contact interaction force has the greatest impact on changing the wire deflection value. The transformed response yielded an R2 value of 99.76% with a standard error of 0.02, indicating a favorable outcome for practical implementation. The model describes the wire deviation from TCP based on the elastic properties of the material, wire curvature, and the length of wire used. However, it does not consider changes in CTWD.

3.4 Wire deflection compensation algorithm

The regression model developed enables the prediction of wire deflection at various printing stages. To further its practical application, a wire deflection compensation algorithm was developed (Fig. 12). The algorithm’s objective is to modify the TCP coordinates based on the predicted (calculated) wire deflection.

Fig. 12
figure 12

Wire deflection compensation algorithm

The algorithm is dependent on the state of the contact tip. Therefore, it is crucial to reset the length of the wire used and stored in the controller’s memory when installing a new tip. This step, along with selecting the wire material (including Young’s modulus, wire diameter, and radius of curvature), constitutes the initial stage of the developed procedure, which determines the values of the input parameters of the regression model (Fig. 12). In the algorithm’s further operation, the main variable parameter is the length of the wire, while the other parameters remain constant for the same material. To increase versatility, the algorithm is not tied to a specific equipment, communication protocol, or level of integration of the welding power source and robot controller. The length of the wire used in the welding or 3D printing process can be calculated based on the arc time and the average WFS. The time measurement begins when the arc is ignited and ends when it is turned off. The wire length is calculated after each bead or layer is completed. The algorithm periodically adjusts the TCP position, based on the cycle of the arc being on and off.

Due to the wire’s oblique deflection (Fig. 7), the TCP requires adjustment in the X and Y coordinates (the Z position is controlled by the layer thickness). To achieve this, counter-clockwise trigonometric transformations of the calculated deviation value are required around the TCP based on the previously measured deflection angle (Fig. 7):

$${x}^{\prime}=x\;\text{cos}\left(\frac{\alpha \pi }{180}\right)-y\;\text{sin}\left(\frac{\alpha \pi }{180}\right)$$
(9)
$${y}^{\prime}=x\;\text{sin}\;\alpha +y\;\text{cos}\;\alpha$$
(10)

where α is the wire’s deviation angle from the torch’s curvature direction, as determined in Section 3.2.2; x′ and y′ denote the estimated deviation’s X and Y coordinates, respectively. The deviation obtained from the model lies in the torch curvature plane, which aligns with the XZ plane when optimally positioned. In this case, the calculated deviation relates to the X-axis, while Y is equal to 0. Therefore, Eqs. (9) and (10) become as follows:

$${x}^{\prime}=y\;\text{cos}\left(\frac{\alpha \pi }{180}\right)$$
(11)
$${y}^{\prime}=y\;\text{sin}\left(\frac{\alpha \pi }{180}\right)$$
(12)

where y represents the calculated deviation, as per Eq. (8). x′ and y′ values are then added to the TCP coordinates. This corrects the position of the torch and wire relative to the deposition trajectory. The proposed algorithm utilizes standard functions from the industrial robot controller, making it universal and simple to implement. The model can be implemented in the manipulator system using its built-in computational capabilities and runs as a parallel background process.

3.5 Verification

The final model’s performance and the developed algorithm were verified by 3D printing samples using alloy 718 wire. Before printing, the wire diameter and radius of curvature were measured and recorded in the robot controller. Two samples, each with a length of 150 mm, height of 80 mm, and width of 40 mm, were printed. One sample was printed with TCP position correction, and the second one used a constant TCP. After using 500 m of wire (with a sample height of approximately 45 mm), the contact tip was replaced with a new one. The wire counter was reset to zero and the compensation algorithm recalculated the correction for the next layer. The moment of tip replacement is clearly visible on the printed sample without compensation applied. The layer shift after contact tip replacement was measured to be 1.7 mm (Fig. 13), which corresponds to the correction value calculated by the model.

Fig. 13
figure 13

3D printed samples with and without using the developed algorithm

Following the method outlined in Section 2, the position of the wire was compared to a reference point every 25 m of the wire used. Prior to deposition, the initial wire deflection angle was determined. The compensation algorithm implementation resulted in a predictable and consistent position of the filler wire with the deviation up to ± 0.2 mm in the X direction and ± 0.12 mm in the Y direction during a 1000 m wire usage (Fig. 14).

Fig. 14
figure 14

Wire deviation from TCP without and with compensation (CTWD = 13 mm)

4 Conclusions

The study investigated filler wire deviation from TCP during WAAM and robotic welding using alloy 625, alloy 718, and 3Si1 welding wires. The wire deviation from TCP has been divided into components, including the following:

  • Bending of the filler wire as a result of its manufacturing and winding technology

  • Contact tip wear due to dry sliding of the tip and filler wire

The relationship between the deflection value of alloy 625, alloy 718, and 3Si1 wires and the length of wire used was determined using standard CuCrZr contact tips. The dependence for alloy 625 and alloy 718 wires has a distinct nonlinear pattern for the first 500 m of wire, after which the change in deflection is nearly linear. The intensity of tip wear for 3Si1 wire does not change as much and is described by a quadratic function.

Using the Archard equation for adhesive wear as a reference, this study explains how the non-constant normal load causes the nonlinearity in change of wire deflection. The stress–strain state of the filler wire provides the load in the contact zone. As wear increases, the stresses in the wire decrease, resulting in a decrease in normal load, and consequently a decrease in the wear rate of the contact tip. It is important to note that the Archard model assumes a constant contact load. Thus, based on the data obtained, another universal model with variable load was developed for the contact interaction between filler wire and contact tip during WAAM or robotic GMAW.

The generalized model utilizes the length of wire, radius of wire curvature, and wire stiffness as input parameters. The stiffness parameter represents the wire material, considering its Young’s modulus, diameter, and moment of inertia. Wire stiffness and curvature determine the force of contact between the filler wire and the contact tip. Based on the regression coefficients, the contact force has the most significant effect on the wire deflection value compared to all other input parameters.

The model was used to predict the wire deflection during the deposition process and to create an algorithm for correcting the wire position by changing the TCP coordinates. The algorithm can be applied to CNC machines with different kinematics (serial robot arm, parallel robot arm, gantry, etc.) without the use of additional equipment. The model can be implemented in the manipulator system using its built-in computational capabilities and runs as a parallel background process.

Verification printing with alloy 718 wire showed the error of regression model response up to 0.2 mm during the use of 1000 m of wire. The wire deflection compensation algorithm improved the stability of material deposition, doubled the life of contact tip, and eliminated the geometry deviations. By minimizing torch rotation around the wire feed axis, the stability of the wire deflection direction can be ensured, making the compensation mechanism more accurate.