Torque ‐ Based Temperature Control in Friction Stir Welding by Using a Digital Twin

: Friction stir welding (FSW) is an innovative solid ‐ state welding technology that produces high quality joints and is widely used in the aerospace industry. Previous studies have revealed welding temperature to be a decisive factor for joint quality. Consequently, several temperature control systems for FSW have been developed. These output feedback control systems usually require delicate and expensive temperature measuring equipment, which reduces their suitability for industrial practice. This paper presents a novel state feedback system of the welding temperature to remedy this shortcoming. The system uses a physical model of the FSW process (digital twin) for the determination of the welding temperature signal from the process torque signal. The digital twin is based on a multi ‐ input nonlinear time invariant model, which is fed with the torque signal from the spindle motor. A model ‐ based (cid:1) 1 adaptive controller was employed for its robustness with respect to model inaccuracies and fast adaption to fluctuations in the controlled system. The experimental validation of the feedback control system showed improved weld quality compared to welded joints produced without temperature control. The achieved control accuracies depended on the results of the temperature calculation. Control deviations of less than 10 K could be achieved for certain welding parameters, and even for a work piece geometry, which deliberately caused heat accumulation.


Introduction
Friction stir welding (FSW) is a modern joining technology by which the workpieces are welded in their solid state using a rotating tool. During FSW, bulk melting does not occur. This leads to various advantages of FSW, such as high tensile strength and high ductility of the joints, prevention of cracks and pores, as well as absence of fumes. These properties enable a wide range of possible applications for FSW, including the electromobility sector, where FSW is used to join cooling elements [1]. Another example of its application is in the aerospace industry; e.g., the hydrogen tank parts of the Ariane 6 launch vehicle are joined through FSW [2,3]. Due to the necessary machinery and expertise, the fabrication of friction stir welds is usually outsourced to suppliers that are often small or medium-sized enterprises (SME). Especially for these types of companies, a simple set-up of the process and a reliable achievement of the required product quality is essential.
Furthermore, mechanical properties such as the ultimate tensile strength (UTS) of the weld are primarily affected by the welding temperature [4,12]. Consequently, the application of temperature control during FSW is useful to ensure a sufficient and reproducible weld quality. The mentioned control strategies, however, all require a temperature signal that is usually obtained through in-line measurement. Different measuring methods have been applied for this purpose. The most commonly used thermometers are pyrometers [7,14] and thermocouples [6,13]. The deployment of pyrometers, however, was difficult due to the high reflectivity of the aluminum surfaces of the workpieces, causing, e.g., disturbances by an external illumination or a changing surface finish. Additionally, the emission coefficient of aluminum alloys is strongly temperature dependent, which makes a precise determination of the absolute temperature difficult. Fehrenbacher et al. [10][11][12][13]15], Ross and Sorensen [16,20], and Bachmann et al. [6] therefore suggested the application of thermocouples at the toolworkpiece interface. Via a rotating signal processing unit, the temperature signal can be transmitted directly to an external receiver. Owing to the necessary proximity of the thermocouple to the process zone, they are prone to damage during the welding process or the process set-up causing high maintenance costs. In a third concept [8,21,22], the thermoelectric effect between a steel tool and an aluminum alloy workpiece can be used to determine the temperature at their interface. This, however, restricts the range of materials for welding and requires insulation. All of these approaches share the necessity for additional temperature measuring equipment, which involves considerable and expensive adjustments to the welding system.
For this reason, Bachmann et al. [18] proposed an alternative to determine the welding temperature. Here, a regression model correlating the welding temperature with the process torque and the rate of the revolutions per minute (RPM-rate) was successfully implemented as a soft sensor (see [23]) in an FSW machine and used for temperature-controlled welding. The major advantage of this approach is that no additional temperature measuring instrumentation is required. The temperature model was derived and subsequently validated based on welding experiments. For the validation, the welding temperature was measured using thermocouples and compared to the welding temperature calculated by the regression model. Thereby, a maximum error of 15 K was achieved. Even though this approach proved to be promising for controlling the temperature without requiring additional temperature measuring equipment, Bachmann et al. [18] acknowledge that the empirical approach is only valid for one specific tool geometry and aluminum alloy. Nevertheless, the existence of a physical correlation between the welding temperature and the process torque was proven and used successfully for state feedback control. This paper presents an enhanced approach in which the welding temperature is calculated from the process torque using a digital twin (see [24]) of the FSW process. The digital twin is primarily based on physical laws of the FSW process. In contrast to the approach suggested by Bachmann et al. [18], the applicability to different welding tasks is therefore facilitated. The digital twin was implemented and validated through welding experiments with an industrial robot. Figure 1 depicts the structure of the control system using three hierarchical levels: The uppermost level in Figure 1a is comprised of the elements FSW process, controller, and digital twin. The block FSW process corresponds to the actual welding process along with elements from the machine. The machine operator adjusts the process parameters welding speed , welding temperature T set , and axial downward force F z, set . During the process, the signals of the spindle torque M s , the actual axial downward force F z , and the RPM-rate n are measured and fed to the digital twin. The digital twin consists of a reduced-order state observer, which determines the calculated temperature signal T . Since the temperature T is calculated from the spindle torque M s , the RPM-rate n, and the actual axial downward force F z and is not directly measured, it is denoted with a circumflex sign. This convention is applied throughout this paper to distinguish between calculated and measured quantities. The block controller is a model based adaptive /1 controller that compares the signal of the calculated temperature T with a desired welding temperature T set . The set RPM-rate n set is adjusted by the controller according to the control law, such that T t → T set .

Modelling and System Set-Up
The first submodel (Figure 1b) shows the inner structure of the digital twin. The essential element is the block torque model, in which a forward calculation of the estimated process torque M p is conducted. Subsequently, the process torque is corrected by the torque losses resulting from friction inside the spindle motor M I and by the acceleration M a , yielding the calculated spindle torque M s . The error between the measured and the calculated spindle torque M s -M s is the input of the observer gain. The observer gain, similar to a controller, minimizes this error by adjusting an input signal (in this case the calculated temperature T ) of the torque model. The calculated welding temperature T equals the measured welding temperature T, if T produces a zero-approaching torque model error M s -M s .
The second submodel (Figure 1c) displays the composition of the torque model. Section 2.1 describes the respective models, as well as their development and interrelation from bottom up.

Torque Model
The welding temperature and the torque mutually interact: An increase of the applied torque leads to a rise in friction and hence the welding temperature. This leads to thermal softening of the material, which in turn reduces the torque [25]. The process torque M p was calculated through a Equation (9) series of submodels ( Figure 1c). The following assumptions and restrictions (Asm.) were made to derive the submodels: 1. The shoulder is cylindrical and the probe is conical. The thread and the three flats on the probe, as well as the concave cavity on the front side of the shoulder, can be neglected [26]. 2. The tilt angle of the tool α can be neglected. 3. The temperature is constant in the shear zone and corresponds to the measured probe temperature. 4. The volume and thickness w of the shear zone are constant. The velocity distribution across the shear zone is linear [26]. 5. Friction and plastic deformation are considered by τ c , which is constant at the entire toolworkpiece interface [26]. 6. The contact condition is based on Shaw's friction law [27]. 7. The von Mises yield criterion can be applied [26,28]. 8. Coulomb's friction law can be applied. The friction coefficient μ is constant for the entire toolworkpiece interface [6]. 9. The yield stress σ y of the workpiece material depends only on the temperature T, the strain ε and the strain rate ε [29].
According to Roth et al. [26] and Arora et al. [30], the process torque M p is the cause of the temperature dependent contact shear stress τ c acting on the FSW tool. It can be formulated as: with the infinitesimal surface element dS if , which lies in radial distance r if to the center line of the tool. Combining Asm. 1 and the solution of the surface integral in Equation (1) for the tool-workpiece interface yields the formula for the process torque: where r s and r p correspond to the radius of the shoulder and the probe tip, respectively. α p is the angle of the conically shaped probe and l p is its length. A sketch of the tool is shown in Figure 2. The contact shear stress τ c is the result of the friction and plastic deformation of the material. The relationship between those variables depends on the contact state, which can be differentiated into pure sliding, full sticking and partial sliding/sticking [28]. However, it is generally accepted that both sliding and sticking occur during FSW and that this contact condition is also non-uniform. Several approaches [27,28,31] have been suggested to link the contact shear stress τ c to the shear flow stress τ s and the frictional shear stress τ f . Using the friction law for deformation processes according to tool shoulder tool probe thermocouple glue thermocouple plug Shaw [27] and Doege and Behrens [31] (see Asm. 5 and 6) yields the contact condition, which connects the contact states sliding and sticking in one formula: (3) Here, j is a natural number describing the transition between Coulomb's law (for pure sliding) and the friction factor model (for full sticking). j = 2 resulted in a sufficient accuracy of the process torque in an offline simulation. The frictional shear stress τ f can be obtained by applying Asm. 8, resulting in the friction model [26]: with the friction coefficient μ, whose value is given in Table A1, the axial downward force F z , and the radius of the shoulder r s . The shear flow stress τ s can be calculated from the yield stress σ y according to the von Mises yield criterion (Asm. 7): For the determination of the yield stress σ y , several material models have been discussed in the literature [26,28]. In a preceding offline simulation, the Johnson-Cook yield stress model demonstrated superior performance compared to the Sheppard-Wright model. The Johnson-Cook material model can be described by [32]: where ε and ε refer to the strain and the strain rate, respectively. The coefficients A, B, C, m and k are material constants determined for a specific references strain rate ε 0 and given in Table A1. T is the temperature in the shear zone, T m is the melting temperature of the material and T ∞ is the room temperature. As A corresponds to the yield stress of the material at room temperature [33], it is used to determine the strain ε according to Hook's law: The Young's modulus E is given in Table A1. As suggested by Roth et al. [26] and Schmidt [28], the mean shear rate ε in z direction can be calculated from the RPM-rate n, the width w of the shear zone (see Table A1) as well as the radii r s and r p (shear rate model): By combining the Equations (1) -(8), the process torque M p was calculated as a function of the calculated temperature T , the RPM-rate n, and the axial downward force F z . The relationship between the individual equations is presented in Figure 1c.

Digital Twin
The digital twin reverses the relationship, described by the Equations (1) - (8) in order to calculate the welding temperature T (see Figure 1). For this purpose, a reduced-order state observer approach was employed, in which the calculated spindle torque M s was compared to the measured spindle torque M s . The temperature T was the output of the dynamic observer gain and results therefore from the torque model error. To calculate the spindle torque M s , torque losses inside the motor have to be considered yielding the spindle torque model [18]: The idling torque M I results from friction, e.g., in the bearings of the spindle motor, and was measured for different RPM-rates (see Table A2). Intermediate values were determined through linear interpolation. The acceleration torque M a depends on the moment of inertia I and the timedependent change of the RPM-rate n: A value of 0.02285 kg⋅m² was obtained for the moment of inertia I in preliminary experiments. The signal of the welding temperature T was determined by closing the observer loop. Thereby, the spindle torque error is minimized by adjusting the calculated temperature input T of the torque model. The observer system ensured that the calculated welding temperature T converges to the actual welding temperature, assuming that the torque model is sufficiently accurate. For steady-state accuracy, a PI-element was employed. A derivative term was not added due to the measurement noise in the torque model error signal. The values of the observer parameters were tuned with the Matlab PID Tuner. A trade-off between fast convergence and minimal oscillations was achieved for a proportional gain K p of 0.15 K/(Nm) and an integral gain K i of 1000 K/(Nm⋅s). The signal of the output was limited by the melting temperature (see Table A1), because the welding temperatures for FSW usually do not exceed this limitation.

Controller Design
Lastly, a controller was added to the system ( Figure 1). An /1 adaptive controller was chosen due to its robustness and decoupled adaptiveness. The controller and its parameters were adopted from Bachmann et al. [18], whereby two adjustments were made: In contrast to Bachmann et al. [18], the calculated temperature T and not the measured temperature T was controlled by setting the RPM-rate n set . As the signal of the calculated temperature T compared to the signal of the measured temperature T exhibited extensive noise, the cut-off frequency was reduced from 2π rad/s (approximately 6.28 rad/s), as proposed by Bachmann et al. [17], to 3 rad/s. The filter, however, still passed the typically slow temperature changes for FSW, which lie far below 0.3 rad/s [18].

Experimental Validation
The subsystems were validated separately by welding experiments using the set-up depicted in Figure 3. After sufficient performance by the subsystem had been demonstrated, the complete control structure as shown in Figure 1a was tested. All experiments were conducted using an industrial robot (KR 500-2 MT, KUKA AG, Augsburg, Germany), equipped with an FSW spindle and a load cell for an internal control of the axial force during the welding process.  Figure A1 in the appendix.
A real-time system (MicroLabBox, dSPACE GmbH, Paderborn, Germany) and a host PC were added to implement the models and monitor the welding processes. The spindle torque M s was calculated from the power consumption of the spindle motor by the internal spindle controller. The RPM-rate n and the axial downward force F z were acquired from the spindle controller and the robot controller, respectively. Those three signals were provided to the real-time system, which was used to implement the models and set the RPM-rate n set .

Validation of the Digital Twin
For the validation of the digital twin, the calculated welding temperature T was compared to a measured probe temperature T. For this purpose, the probe of the FSW tool was equipped with a volumetric thermocouple of type K with a probe diameter of 0.5 mm. A sheathed thermocouple was used, in order to reduce measurement disturbances from oxidation. [34]. The thermocouple was placed in a drill hole with a diameter of 0.6 mm, at an angle α TC of 30° and a distance to the shoulder l p, TC of 1.8 mm. It was kept in place by a ceramic glue (Figures 2 and 3). The temperature measuring device designed by Costanzi et al. [35] was used to obtain the temperature signal. The signal was transmitted to the real-time system via wireless local area network (WLAN). The signal from the temperature measurement tool was only employed for performance evaluation and not for temperature control.
To validate the digital twin, ten welding experiments were conducted using an FSW tool with a probe tip radius r p = 2.35 mm, a length l p = 6 mm, an angle α p = 11°, and a shoulder radius r s = 10 mm. Bead-on-plate welds were made on 8 mm thick plates of EN AW-6082-T6 and EN AW-5083-H111. The tilt angle α = 2.5° was constant throughout the experiments. Table 1 shows the process parameters selected for the validation experiments. The set RPM-rate n set was manually changed during the welding process to test a variation of n set , which could be caused by the controller in the second phase of the validation. The size of the step Δn set differed depending on the welding speed v. In order to prevent tool failure, the n set was set to 1000 min −1 during the plunge phase for experiments with low RPM-rates (exp. no. 1 -3, 5 -6 and 9 -10). After the plunge phase, the RPM-rate was set to the nominal value according to Table 1. The signal of the temperature T was calculated and compared in-line to the signal of the measured temperature T. The experiments were conducted while the internal force controller was activated. Preliminary studies revealed that axial forces F z of 8.3 kN and 7.8 kN result in defect-free welds and a smooth seam surface for the chosen parameters of the welding speeds, RPM-rates, and FSW tool. In a later analysis, experiment no. 1 was repeated, but with a lower axial downward force F z (exp. no. 9 and no. 10). Table 1. Welding parameters of the step response experiments for the validation of the digital twin; the work piece geometry is shown in Figure A2a in the appendix.  Figure 4 presents the validation results of the digital twin for two experiments with a welding speed v of 200 mm/min for the aluminum alloys EN AW-6082-T6 (exp. no. 2) and EN AW-5083-H111 (exp. no. 6), respectively. The temperature measurements show the time-dependent evolution of the welding temperature along the joint. As expected, the temperatures increased with a rising set RPMrate n set . The steps in the temperature signals were caused by the incremental increase of the set RPM-rate Δn set and are marked by dashed vertical lines. The signals of the temperatures T and T all exhibited a time delay to a change of the RPM-rate Δn set below one tenth of a second ( Figure A4), which was attributed to the reaction time of the spindle controller. For the step response experiments, the steady-state temperature was generally reached after several seconds ( Figure A4). For experiments with a high welding speed, e.g., exp. no. 3, 4, 7, and 8, a distinct temperature drop in T was observed. This was attributed to the change in heat transportation phenomena at the start of the welding motion. Additionally, the experimental data in Figure 4a,b exhibited oscillations in the signals. This was attributed to the low stiffness of the industrial robot and unintentional excitation with the eigenfrequency at n set ∊ [800, 900]. Due to the general latency of heat transfer, the oscillations in the signal of the measured temperature T were significantly weaker than in that of the calculated temperature T . This can primarily be attributed to the higher measuring dynamics of the spindle controller compared to the temperature measuring tool. Additionally, the calculation of T from the oscillating signals (n, F z , and M s ) resulted in an amplification of the oscillations in the signal of the calculated temperature T .   Figure A4) and (b) exp. no. 6; the corresponding welding parameters are given in Table 1.

Exp
The performance of the digital twin was quantified using the root mean squared percentage error (RMSPE, see Equation (A1) in Appendix B) between the measured and the calculated temperature (orange curve with triangles in Figure 4). The experiments no. 2 and no. 6 exhibited an average performance with an RMSPE of 6.55% and 6.04%, respectively. The error RMSPE was below 8% for all experiments. The absolute temperature error T -T was approximately constant in most experiments. In total, the absolute mean temperature errors for all experiments ranged from −31 K (exp. no. 3) to +15 K (exp. no. 1). In experiment no. 1, positive temperature errors T -T occurred. By repeating the same experiment, but with lower axial downward forces F z (see Table 1, exp. no. 9 -10), it was observed that with a decrease of the force, the temperature error T -T also partially changed to a negative value and ranged from +15 K (exp. no. 1) over −17 K (exp. no. 9) to +5 K (exp. no. 10). This leads to the conclusion that the relationship between the axial downward force F z and the welding temperature T was not accurately modelled. A comparison between the temperature errors T -T for experiments with different welding speed v also revealed that the error T -T generally increased with the welding speed v. For equal set RPM-rates n set , the absolute measured spindle torque |M s | increased with the welding speed v in all experiments. This indicates an indirect influence of the welding speed v on the measured spindle torque M s and therefore on the calculated temperature T . The welding speed v was, however, otherwise neglected in the torque model. In summary, the varying temperature errors T -T reveal a potential for improving the torque model.

Validation of the Complete Control Structure
For the evaluation of the complete system, three bead-on-plate welds, including one with a geometry which deliberately caused heat accumulation, and one lap weld were made with the aluminum alloy EN AW-6082-T6 (see Table 2). The validation experiments for the digital twin oscillations oscillations revealed significant temperature errors for some process parameter combinations. For these experiments, insufficient control performance was expected due to an inaccurate calculated temperature T . Consequently, a parameter setting (see Table 2), which in previous experiments produced only a small temperature error of +8.5 K, was selected for the first validation experiment. To prevent expected vibrations of the robot, a lower set welding temperature of 500 °C was chosen. A second bead-on-plate weld was made for a parameter setting that produced a higher temperature error of approximately −31 K in an earlier experiment. As it was believed that the temperature errors were reproducible and could result in an insufficient control performance, a process parameter dependent correction offset T corr was added to the signal of the calculated temperature T . The value of the offset equaled the average temperature error, obtained from experiment no. 3. This enabled the validation of the complete control structure, even with the inaccurate temperature calculation. Finally, butt joints were made on a narrow geometry described in Bachmann et al. [7], which deliberately caused heat accumulation. For comparison, a second part with the same geometry was welded with a constant set RPM-rate n set (without temperature control). Table 2. Welding parameters of the experiments for the validation of the complete control structure; the work piece geometries are shown in Figure A2 (exp. no. 11 -13) and Figure A3 (exp. no. 14) in the appendix.

Welding
Speed v in mm/min Beadon-plate Figure 5 shows the results from the validation of the complete control structure for two beadon-plate welds without (a) and with (b) the application of a correction offset T corr . The dashed vertical lines mark the time in seconds when the controller was activated.
(a) (b) Figure 5. Validation of the complete control structure: Comparison of the measured temperature T (blue circle) to the calculated temperature T (green square) as well as the temperature model error T -T (orange triangle) and the set RPM-rate n set (black asterisk) for two bead-on-plate welds, exp. no. 11 without (a) and exp. no. 12 with (b) the application of a correction offset T corr ; the corresponding welding parameters are given in Table 2.
As shown in Figure 5a, the reaction of the controller resulted in an approach of the calculated temperature T (green squares) to the set welding temperature T set (dashed horizontal line). The small temperature error was expected and resulted in a small control deviation for the measured temperature T (<10 K). With the activation of the controller after approximately 3 s, the set RPM-rate n set (black asterisk) dropped from 1000 min −1 to approximately 670 min −1 . At the beginning, the controller experienced a small undershoot, which was brief enough to not influence the signal of the measured temperature T. This undershoot was more pronounced in experiment no. 12 ( Figure 5b) and was already described in [6]. It is caused by the temperature prediction with the PT1-element of the /1 adaptive controller. The impact of the undershoot was limited by setting the RPM-rate saturation value to 400 min −1 .
With the application of the correction offset T corr , (Figure 5b), the signal of the calculated temperature T was successfully held constant at a value of 31 K (= T corr ) above 530 °C. The deviation of the measured temperature T from the commanded temperature T set was, however, approximately 20 K. The temperature error T −T in experiment no. 12 was smaller (−10 K) than in the previous welding experiment no. 3 (−31 K), even though both experiments were conducted with the same process parameters. The inadequate value of the correction offset T corr led to an overreaction of the controller and a relatively high set RPM-rate n set = 1350 min −1 (black asterisk).
The lap weld from experiment no. 13 in Figure 6a produced results similar to the bead-on-plate weld of the experiment no. 11. The signal of the calculated temperature T was also successfully held constant at a value of 30 K (= T corr ) above 530 °C. An unexpected positive temperature error, together with the negative correction offset T corr , resulted in a control deviation for the measured temperature T of approximately 45 K, which was deemed too high. No undershoot in the signal of the set RPMrate n set occurred.  Figure 6. Validation of the complete control structure: comparison of the measured temperature T (blue circle) to the calculated temperature T (green square) as well as the temperature model error T -T (orange triangle) and the set RPM-rate n set (black asterisk) for a lap weld with the application of the correction offset T corr i.e. experiment no. 13 (a) and a bead-on-plate weld without a correction offset T corr , i.e. experiment no. 14 (b); the corresponding welding parameters are given in Table 2.
The last experiment was again conducted without a correction offset T corr . Here, heat accumulation was intentionally created by selecting a workpiece with a small width, as described by [7] (40 mm, see Figure A3 in the appendix). Figure 6b shows the temperature dropping effect of the start of the welding motion after 18 s. Even without a correction offset T corr , the temperature error was low during the welding phase. Due to a set RPM-rate n set in the range of 800 -900 min −1 , vibrations of the industrial robot occurred. The oscillations were transmitted to the measurement signals, which were used to calculate the temperature T . The resulting oscillating set RPM-rate n set further amplified this behavior. It is believed that a re-adjustment of the second order Butterworth filter of the /1 adaptive controller could break this self-reinforcing interaction, however at the cost of the control dynamics. Apart from these oscillations, the controller held the calculated temperature T at the set temperature of 530 °C. At around 89 s, the tool left the narrow strip of the workpiece. From there on, no particular heat accumulation occurred. The control system reacted to this by increasing the set RPM-rate n set . Due to the low temperature error, the controller deviation of the measured temperature T approached zero for the entire welding phase. Figure 7a shows a photograph of the resulting weld from experiment no. 14. For comparison, a weld made without temperature control is depicted in Figure 7b. The comparison illustrates that the controller prevented heat accumulation and ensured a high weld quality because the weld, which was fabricated with a constant set RPM-rate, exhibited excessive flash, while with the control, no flash occurred at all.

Discussion
A state feedback control of the welding temperature, using a digital twin, is feasible. The correlation of the temperature error with the process parameters revealed that the influence of the welding speed v and the axial downward force F z on the calculated temperature T should be further examined in the future. Given that the temperature error remained approximately constant while varying the set RPM-rate n set , it was concluded that the relation between n set and the welding temperature T was modelled successfully.
Some experiments with low RPM-rates (exp. no. 1-3, 5, and 6) featured higher temperature errors at the beginning of the weld. These experiments were conducted with an initial set RPM-rate n set = 1000 min −1 during the plunging phase, in order to avoid tool breakage. This resulted in a severe drop of n set , e.g., from 1000 min −1 to 600 min −1 (exp. no. 2), which required a waiting time of 10 to 15 s until the welding temperature recovered and the steady-state temperature for this set RPM-rate was approached. In these cases, the digital twin only produced sufficiently accurate results after this waiting time.
A process parameter dependent correction offset T corr was applied in the experiments no. 12 and no. 13 to validate the complete control structure for parameter sets with temperature errors above 10 K. It was shown that the application of a process parameter dependent and constant correction offset T corr generally did not improve the control performance as different thermal behaviors in the welding experiments led to an inadequate choice for the value of the correction offset T corr . These deviations could have been caused by disturbances, like tool abrasion and varying positions of the thermocouples in the tool. The repetition of the experiments with a new tool could lead to lower temperature errors. Another cause for the varying temperature errors could have been the assumptions 1 -9, which were made in order to derive a torque model that can be calculated in real time. These assumptions include the negligence of the tilt angle of the tool α and of the threads on the probe which are both temperature-influencing parameters. Minor temperature errors could also stem from imprecise temperature measurements, as thermocouples degrade over time. This could explain errors of up to 4.65 K, according to the IEC 60584-1:2013 [36].

Conclusions
In this paper, a state feedback temperature control by means of a digital twin is introduced. The digital twin served as a soft sensor to control the welding temperature. It is based on a temperature dependent analytical torque model, which uses measurements of the RPM-rate n and the axial downward force F z to calculate the process torque M p . The deviation between the calculated M s and the measured torque M s was minimized to obtain the temperature signal T . The temperature was then held at the desired value by an /1 adaptive controller. Both the digital twin and the control system were validated through several welding experiments with different process parameters. The following conclusion were drawn from the validation:  The model errors of the welding temperature range from −31 K to +15 K and primarily depend on the welding speed v and the axial downward force F z . It is believed that the model performance can be improved by finding suitable submodels to account for the welding speed v and the axial downward force F z .  The controller was able to correctly adjust the set RPM-rate n set , so that the calculated temperature was held constant at the desired value.  The low stiffness of the FSW machine (industrial robot) posed challenges, as vibrations were amplified through the digital twin and resulted in significant oscillations in the signals.  The application of a temperature error correction offset cannot be recommended. The controller deviation was smaller than 10 K for all experiments without the correction offset, including an experiment with a workpiece that deliberately caused heat accumulation.  The digital twin is only valid for the weld phase of the FSW process. The preceding and consecutive phases, during which the tool plunges into and retracts from the workpiece, were not modelled. This makes the digital twin most likely not applicable for these two phases.

Figure A3
. Geometry for experiment no. 14, data from [7], the narrowed zone causes heat accumulation. The welds are indicated in grey.