Real-Time Data Assimilation in Welding Operations Using Thermal Imaging and Accelerated High-Fidelity Digital Twinning

: Welding operations may be subjected to different types of defects when the process is not properly controlled and most defect detection is done a posteriori. The mechanical variables that are at the origin of these imperfections are often not observable in situ. We propose an ofﬂine/online data assimilation approach that allows for joint parameter and state estimations based on local probabilistic surrogate models and thermal imaging in real-time. Ofﬂine, the surrogate models are built from a high-ﬁdelity thermomechanical Finite Element parametric study of the weld. The online estimations are obtained by conditioning the local models by the observed temperature and known operational parameters, thus fusing high-ﬁdelity simulation data and experimental measurements.


Introduction
Welding is used extensively in the nuclear industry, for assembly and as a repair technique. It is often used in maintenance operations of different kind that involve various geometries and welding parameter settings. Very high temperatures applied in a localized zone cause expansion and nonuniform thermal contractions, resulting in plastic deformations in the welding and its surrounding areas. Thus, residual stresses and permanent deformations are produced in the welded structure. These could induce a variety of defects such as hot tearing/cracking if the process is not properly controlled. Other defects may appear such as porosity, lack of fusion or lack of penetration that need to be identified after an operation.
The detection of defects in weld beads is usually performed after the welding operation is fully performed [1]. When a defect is identified, the entire operation needs to be done again. Therefore, it would be desirable to obtain real-time estimations of the current mechanical state of the assembly using in situ measurements. With such estimations at hand, welding operations could be stopped and/or controlled whenever predicted or forecasted mechanical states are outside acceptable tolerance regions.
To this end, we propose to develop a digital twinning approach [2] whereby highfidelity model predictions will be continuously adjusted with respect to thermal images acquired online during the welding operation. The simulation will rely on a state-of-the-art mesoscale transient thermoelastoplastic finite element model. The fusion between FEA and in situ measurements will be done by accounting for well-chosen parametric sources of uncertainties in the simulation model, leaving freedom for the digital twin to react and adapt to the sequence of thermal images. We aim for the data assimilation to be done following a statistical and, if possible, Bayesian framework [3], to enable incorporating engineering knowledge about the uncertain parameters of the model, and allow deriving credible regions for the predictions and forecasts of mechanical states.
Unfortunately, data assimilation problems, i.e., sequential inverse or sequential calibration problems, are notoriously expensive to solve when the numerical models are systems of partial differential equations [4][5][6]. In the context discussed above, the parameters of spatially detailed nonlinear FEA models would need to be optimized in real-time. This is intractable. We will therefore develop an appropriate piecewise linear meta-modeling technique to achieve real-time efficiency.
Over the last decades, surrogate modeling via model order reduction has been successfully developed for a variety of applications relying on high-fidelity modeling. This is especially true for data-driven approaches based on projecting the high-fidelity model in low-dimensional subspaces [7][8][9][10][11][12][13], among which POD-generated subspaces [14][15][16] can be seen as an extension of the principal component analysis to continuous variables. Projection-based model order reduction methods are known to reduce the computational complexity of high-fidelity models by precomputed candidate solutions corresponding to various points in the parameter domain (snapshot), and reusing the generated information to fasten online solution procedures. However, even by using efficient hyper-reduction schemes [17][18][19][20], reduced simulations of welding operations are still computationally too demanding for process monitoring. This is in particular due to (i) the lack of reducibility of moving heat source problems in general [17,21,22] and (ii) the relatively high online cost associated with hyper-reduced models (hyper-reduction generalizes well in large parameter domains owing to the fact that in the online phase, the nonlinear equations of the original simulation model are solved on a reduced integration domain [23,24]).
To circumvent these difficulties, we propose to develop an offline/online metamodeling technique based on a mixture of probabilistic principal component analysis models (PPCA). For any given position of the heat source, the thermomechanical state, augmented by the vector of uncertain parameters, will be postulated to follow a Gaussian distribution with low-rank covariance structure. This model will be identified using the method of snapshots. Offline, we will run the high-fidelity mechanical simulations corresponding to a fine sampling of the parameter space. In a second step, the Gaussian model will be identified using the maximum likelihood approach probabilistic PCA described by Bishop [25]. Online, parameter estimation will reduce to Gaussian conditioning (i.e., the Kalman method), which can be made efficient when the covariance matrix exhibits a lowrank structure. We will show numerically that this strategy allows us to successfully, and for the first time, set up a data assimilation framework for welding operations, blending high-fidelity thermomechanical simulations and thermal imaging in real-time to predict and forecast mechanical states.
In a second stage of developments, we will treat the case where the position of the heat source is to be estimated from thermal imaging. This is of practical interest when the position of the welding torch is not accurately known or tracked during joining operations. To achieve this goal, we build, numerically and offline, a correlation model statistically linking the position of the hottest spots detected on the thermal image to the actual position of the welding torch. Then, the data assimilation method based on the PPCA can be easily adapted, using a probabilistic mixture of PPCA instead of a single Gaussian model. Of course, conditioning the mixture of PPCA remains analytically tractable, and computationally efficient as, as it will be shown, few PPCAs are associated with nonvanishing coefficients at any given time (i.e., the estimation of the position of the torch from thermal images is accurate). Even in this setting, the low-rank structure of the mixture of PPCAs ensures that data assimilation is performed in real-time, without sacrificing the accuracy provided by the high fidelity thermomechanical model.
In all cases, future states may be predicted by conditioning future statistical models to available observations. This is technically done by Gaussian (mixture) conditioning of all future mechanical states to current posterior distributions of unknown model parameters.
The approach proposed in this paper is closely related to other data assimilation methods available in the literature. Filtering methods based on parametrized models (e.g., Kalman or particle filters) typically construct a Markov model for the propagation of parameter distributions in time, progressively assimilating data as they are made available. Our approach can be seen as a degenerate such filter whereby past data are ignored, only the current thermal image influencing the posterior distribution of unknown model parameters. Taking past data into account can be done, for instance, by concatenating mechanical states from current and past assimilation times over a sliding window (i.e., an autoregressive model). For the particular experimental setup considered in this work, taking past data into account brought no significant change in predictive parameter distributions, which justifies our development of a past-agnostic assimilation method. In terms of meta-modeling, we could have used nonlinear meta-modeling techniques such as polynomial chaos or neural network regression [26][27][28], but the choice of a linear model (PPCA) allows us to solve analytically the conditioning problem, thus bringing robustness to the method, which cannot be expected when using Markov Chain Monte Carlo solvers or sequential importance sampling [5]. Our approach is clearly inspired by the parametrized background data-weak approach [29], which adopts a variational point of view, while our method is Bayesian, thereby delivering credible intervals and not point estimates. Similar to the parametrized background data-weak method, we perform state estimation in large dimensions by using a background covariance matrix generated by parametric variations of a high-fidelity PDE system. The low rank structure of this covariance matrix is used to fasten online Gaussian conditioning, circumventing the usual N 3 complexity issue by making use of standard algebraic techniques [25,30].
Our paper is organized as follows. In Section 2, we present the experimental configuration of our test case. Section 3 aims to present the thermomechanical model and the inverse problem, detailing the known and unknown parameters. In Section 4, we will introduce the construction of the local surrogate models using Probabilistic PCA, and in Section 5, two different use cases are considered: a situation where the heat source position is known and another one where it needs to be estimated. Forecasting is also discussed. Finally, in Section 6 we present results for all the configurations introduced in Section 5 using noisy simulation data when the torch position is known and real experimental data when it is not. Appendices A-C give, respectively, details on the algebraic expressions used to accelerate the computations, some more forecasting results and material parameters of the specimen.

Experimental Configuration
To test the proposed approach, we need to find an application that can replicate similar welding conditions (in terms of materials and parameter variety) to those of a real maintenance operation that can be performed in a laboratory environment with proper instrumentation.
The target application is the stress prediction in a 316L stainless steel (The chemical composition and some of the temperature dependent material parameters are given in Appendix C) specimen submitted to Programmierter-Verformungs-Risstest (PVR) hot cracking tests. PVR tests, developed during the 1970s by the Austrian company Boehler, consist of making a fusion line using bead-on-plate TIG-welding with argon shielding while the specimen is uniaxially tensile loaded [31]. It allows the control of the tensile deformation progressively, which means that it can show cracks of different origin, most notably solidification and liquidation cracking. The large surface of the specimen allows easy positioning of thermocouples on both sides of it, as shown in Figure 1, and it is also possible to film the surface of the specimen with an infrared camera. Thus, process parameters and infrared images of the welding operation are the observational data from which 3D stresses and temperatures will be estimated. The experiments are performed with a 6-axes Panasonic robotic arm and equipped with a ValkWelding torch and the tensile loading is applied with a Lloyd Instruments LS100 plus. Two parameters related to the heat source are fixed before the experiment: the speed (v) and the power (Q), which is the product of voltage (U) and current (I). The experiments are instrumented with two thermocouples and filmed with a SC7500 FLIR infrared camera. The infrared video will provide real-time measures on part of the specimen. While both sides of the specimen have thermocouples, only the surface that is not being welded is filmed. This way, reflections from the welding arc and the robot itself are avoided.

Thermo-Elasto-Plasticity
Numerical simulation of welding is a very complex problem, as it needs to take into account a great number of parameters to represent multiscale and multiphysics phenomena, using temperature dependent material properties that are not always properly known. Usually, the interactions between the metallurgy, the heat, and the mechanical problems need to be simulated. In the case of 316L stainless steel, the metallurgic interactions are negligible [32], and thus the model is reduced to a weakly coupled nonlinear parametric thermo-elasto-viscoplasticity problem.
We consider a model of unsteady thermo-elasto-viscoplasticity over spatial domain Ω ∈ R 3 , whose boundary will be denoted by ∂Ω, and time domain T ∈ [0, T]. For all (x, t) ∈ Ω × T , the unsteady heat equation reads as where T : Ω × T → R is the temperature field, ρ is the mass density, k is the thermal diffusion coefficient and c p is the specific heat capacity. The above equation is complemented by boundary condition on domain boundary ∂Ω T . Moreover, on domain boundary ∂Ω q , where γ is the radiation coefficient and ζ is the thermal convection coefficient. At time t = 0, the temperature T is equal to T 0 everywhere in the computational domain. For all (x, t) ∈ Ω × T , the mechanical equilibrium reads as This equation is complemented by boundary conditions on part of the domain ∂Ω u , and σ · n = 0 (6) on part of the domain ∂Ω t . The coupled thermomechanical problem is closed by the following constitutive relation: where (u) := 1 2 ∇u + ∇u T is the total strain, p is the plastic strain and α(T − T 0 )I d is the thermal strain, with α the coefficient of thermal expansion and I d the identity tensor. The plastic strain is fully determined by a Von Mises plasticity model with isotropic and kinematic hardening.
where R(p) is the limit of the elastic domain due to isotropic hardening, λ is the plastic multiplier andσ = σ − 1 3 Tr(σ)I is the deviatoric part of the stress tensor. In the specimen of a PVR test, the traction boundary conditions are enforced by Dirichlet boundary conditions: The main mechanical quantity of interest is the first principal stress, denoted by σ I : The first principal stress is the highest principal stress. It has a huge influence on hot cracking during the welding process.

Thermomechanical Load
The choice of a model for the moving heat source is a key point in numerical simulation of welding. The most commonly used one is Goldak's double-ellipsoid model [33], represented in Figure 2. It is important to note that the heat distribution is different in the front and the rear of the heat source, thus the model depends on the current central position of the heat source P(t) = (x(t), y(t), z(t)) ∈ R 3 , In the equation above, P 0 ∈ R 3 is the position of the heat source at the start of the welding operation, and P F ∈ R 3 is the position at the end of the operation. T = (P F − P 0 )V corresponds to the total welding time, which depends linearly on the velocity V of the source. P (t) is a small (normalized) time delay that accounts for potential errors in the control of the welding robot (This is a very simple model, which could easily be modified to include fluctuations of the velocity field.). This parameter will be identified online.
Assuming that the heat source moves in the direction x, the final equation is where a r , a f , b and c are unknown parameters describing the geometry of the double ellipsoid (In practice, we calibrate a r , b, c, η and K where K is the ratio between a r and a f : a r = Ka f ), Q = U I is the power, with U the voltage, I the current and η the efficiency.

Space and Time Discretization
The thermomechanical problem is discretized in space using the standard P1 Lagrange finite element method. In the following, T(t) and σ (t) will respectively denote the vector of finite element nodal temperature and the vector of components of the stress tensor at the quadrature points.
The thermomechanical problem is discretized in time using the standard backward Euler finite difference scheme.

"Truth" Online Inverse Problem
We now describe the problem of data assimilation and online forecasting for the welding operation.

Parametrized Probabilistic Setting
The power Q of the heat source and its velocity V are supposed to be controlled with a good degree of accuracy. The mechanical load U d is also well controlled during the experimental procedure. In order to build the "truth" digital twin, we further assume that the thermal capacity and diffusivity of the material are well characterized. The mechanical behaviour of the structure (thermal expansion, elasticity and plasticity) are also assumed to be well characterized, qualitatively and quantitatively. This is consistent with EDF's decades of experience in modeling, characterizing and simulating such welding processes. Finally, the thermal and mechanical boundary conditions are reasonably well quantified in our experimental setting.
However, several sources of uncertainties negatively affect the predictive capabilities of the simulation model: • The position P of the center of the heat source is not perfectly well known. We will consider that parameter t is random, i.e., is a source of epistemic uncertainty. • The spatial distribution of the heat source is not known with precision. We surmise that that the main contribution to the overall uncertainty of the model is the spatial length-scale of the Goldak model. Therefore, the parameter space P = M × Θ space comprises two distinct blocks: • The set of known parameters µ = {Q, V} ∈ M, which will vary from one welding operation to the next, but can be controlled with precision. • The set of unknown parameters θ = {a r , b, c, η, K, } ∈ Θ, which are given a probability distribution θ ∼ p θ that encodes the prior knowledge available about these parameters.

"Truth" Online Bayesian Conditioning
Data will be assimilated at homogeneously distributed timesT The assimilation time step ∆t is adjusted so that the number of assimilation steps N t is the same for all simulations, independently of the velocity V of the heat source, Online at time t k ∈T , we assume that surface temperatures are measured noisily (i.e., with the thermal camera). We will write where H is a fixed Boolean operator acting on the vector of finite element temperature nodal values T k at time step k. The additive measurement noise is supposed to be zero-mean . The sources of the temperature measure uncertainty are varied and might include light reflections or lack of knowledge of material parameters like the emissivity at different temperatures [34]. The measure error parameter σ 2 M will be calibrated empirically comparing the measure from two sensors available in EDF's welding lab.
Assuming that the successive noise vectors { k } k∈[0,t]∩T are independent, the statistical inverse problem to be solved online is the following.
At time t ∈T , the posterior distribution of unknown parameters given the past measurements is where Unfortunately, evaluating the likelihood function in real-time is unfeasible, even when using standard Markov assumptions.

Real-Time Predictions with Gaussian Mixture of Local Surrogate Models
In the previous section, the truth inverse problem was presented, and it was concluded that it is not well suited for real-time applications. To overcome this, in this section the construction of Gaussian local surrogate models from snapshots of a Finite Elements parametric study is discussed.

Local Multiphysics PCA Model
Our proposal is to make local surrogate models for a linear joint representation of the state, known parameters and unknown parameters for every position of the heat source at the assimilation times. The positions are fixed in a grid between the initial position P 0 and the final position P F with a regular separation ∆P. The parametric solutions are clustered by the position P(t) of the heat source and associated to the position P k = k∆P if |P(t) − P k | < ∆P 2 . The local model at position P k reads as Operator Φ k -a decoder-is fixed for each position and possesses n φ columns. It is obtained by using all parametric solutions of the welding problem corresponding to position P k . This probabilistic model encodes the dependency between all the state variables and the known and unknown parameters in the form of a multivariate Gaussian: The choice of using local models aims at avoiding the use of a global reduced basis, as it is well known that moving heat sources generate irreducible parametric solutions [17]. Notice as well that there is no Markovian assumption in the model. In other words, measurements at times {t l } l<k do not provide any new information about the state at time k.
Using Gaussian assumptions on α k and s follows a certain logic as well. With s k being Gaussian, we can deduce that d k , the observed data at time k is also Gaussian distributed. This means that p(s k |d k , µ) will also be Gaussian and can be calculated analytically, allowing us to greatly accelerate the computation times.

Maximum Likelihood PCA
In order to calibrate the surrogate model, we assume that a snapshot of n s extended states is available, which we denote by S = {S 1 , S 2 , . . . , S n s }. This snapshot should cover the time and parameter domains appropriately.
In 1999, Tipping and Bishop [35] showed that a probabilistic formulation of PCA can be obtained from a Gaussian latent variable model, where the basis vectors are maximumlikelihood estimates. Given Equation (22), there are explicit expressions for the maximum likelihood estimates of the parameters: where U q contains the left singular vectors associated to the greatest q < n s singular values of a Singular Value Decomposition (SVD) of the snapshot matrix S. The diagonal matrix Λ q is also obtained from the SVD, and it contains the greatest q singular values in decreasing order. R is an orthogonal rotation matrix that, in practice, will be chosen to be the identity matrix. Finally, σ 2 is related to the truncation error: where λ j are the smaller singular values. This means that the generative PCA model can be easily computed from a SVD of the output of a parametric study of the thermomechanical finite elements model.
The snapshots S = {S 1 , S 2 , . . . , S N t } are generated using a straightforward procedure. All the parameters in P are assumed to be uniformly distributed over a hyper-cube and will be sampled using Latin Hypercube Sampling [36]. The minimum and maximum values for each parameter are given by experts.
The samples are generated as follows. For every (µ, θ) sampled with LHS the finite element simulation is ran over T (µ) = [0, T(µ)], delivering a history of N t snapshots. Additional postprocessing could be performed depending on the physics that are represented in the state vector s.

Online Prediction
In this section, we treat the resolution of the inverse problem. Two cases have to be considered depending on whether the torch position is known or not: The first case, when the heat source position is known at all times, is straightforward and the predictions are obtained using a single well-identified PPCA model. In the second case, the torch position needs to be estimated with some uncertainty. The predictions are now computed from a mixture of PPCAs. Finally, the forecast of future states is discussed.

Known Position
Let us assume that the heat source position is known at all times. This happens when all measurements are synchronized and knowing how much time has passed from the starting point allows perfect knowledge of the position P k via the speed or when the robotic arm is equipped with a sensor measuring the advanced distance and this signal is available. This corresponds to a situation where P (t) = 0 in Equation (16).
When the position P k is known, the closest model is also known and it is enough to estimate the current state and unknown parameters. This is done by computing the posterior distribution p(s k |d k , µ), which is Gaussian as seen in Section 4. It can be computed analytically and it is completely determined by its mean m s k |d k ,µ and covariance Σ s k |d k ,µ and it. Introducing the notation Σ s k = Φ k Φ kT + σ 2 T I d , the mean and covariance are where H k is a Boolean operator acting as the observation function.
The evaluation of this expression is very slow due to the size of the matrices involved. To avoid this cost, we propose to compute the posterior distribution of the reduced coordinates α k instead. Once again, the posterior distribution p(α k |d k , µ) is Gaussian, so it is determined by its mean m α k |d k and covariance Σ α k |d k : The mean of the posterior distribution of s k can be then deduced using the reduced basis Φ k as follows: As for the covariance matrix, it can be calculated by The whole covariance matrix might be impossible to store in RAM if the number of degrees of freedom is large. In this case, only the diagonal of the matrix product Φ k Σ α k |d k ,µ Φ kT is calculated.
For further details on the acceleration of these computations, see Appendix A.

Unknown Position
As it is the case in EDF's lab, we may not have access to the exact heat source position for lack of synchronicity between the measure sensors. In this case, P (t) > 0 in Equation (16) and the torch position needs to be estimated from the video frame, which adds more uncertainty to the model. The filmed side of the specimen is the opposite side of the weld and there exists a delay between the highest temperature on this side and the torch position. Furthermore, this delay is dependent on material and operational parameters, such as the speed.
Using the finite elements simulations used for the prior generation of the local PPCA surrogate models, we created a Gaussian surrogate model that links the position of the highest temperature measured on the camera side of the specimen x k and the known parameters µ with the position of the heat source on the welded surface of the specimen P k . The model was fitted using a Matérn kernel with ν = 3 2 as a covariance function. The output of the model is the probability distribution of the estimated heat source positionP k . We sample this distribution to find possible torch positions.
Not being able to determine the exact position, the data assimilation needs to be adapted using a mixture of PPCAs. The multiphysics state for this video frame is named sˆk to indicate an unknown position. For each sample of the heat source position we assign it the closest local PPCA model and a discrete assignment probability distribution is calculated to find the active coefficients of the mixture. Assuming a total of J local models are active, p(sˆk|d k , µ) is computed as a Gaussian mixture of the estimations of each local model weighted by the discrete assignment probability p j ∀j ∈ J: The torch position estimation is sufficiently accurate to ensure that the number of active PPCA models is not too large. The assimilation is still performed in real-time due to the very quick evaluation of each individual PPCA.

Forecasting of Future States
Despite the lack of Markovian assumption in the model, it can be used to forecast future states without observed experimental data by integrating previously estimated unknown parameter values. Indeed, the unknown parameters are not changed online and, assuming that they were estimated for a position P k , θ k could be used to obtain accurate predictions of future states.
The position of the future state is defined by a displacement of j∆P in the direction of the weld, where ∆P is the regular separator in the positions grid. This opens two possibilities whether the torch position was known or was estimated from the data frame. If the heat source position was known, the prediction is computed using the PPCA model for position P k+j = (k + j)∆P, this is p(s k+j |µ, θ k ).
The other possibility is that the current position was estimated from the experimental data. In this case, the displacement will be added to the position samples so that the uncertainty on the torch position is maintained. Then, the prediction will be calculated using the mixture of PPCAs.

Results
In this section, we will show the use of the proposed models. First of all, the experimental configuration of a PVR hot cracking test is explained. Then, details about the parametric finite element study from which the snapshots are generated will be given.
For the numerical tests, two sources of data are considered to show the case where the torch position is well known and the case where and estimation of its position is needed. The first test will use noisy synthetic data obtained from a previously calibrated Finite Element solution as input. The joint multiphysics state and unknown parameters estimation are obtained using a single PPCA model. Then, we will consider a frame of an infrared video of a PVR experiment. The torch position will be deduced from the image and the estimation computed from a mixture of PPCAs.
Last, the forecasting capabilities of the model will be showcased for the prediction of a state situated 12 mm further than the last studied position.

Experimental Procedure
A PVR hot cracking test was done at EDF R&D welding lab to obtain experimental data. The 316L steel specimen is 200 mm long and 3.5 mm thick. Its width is 80 mm on both ends and 40 mm in the center. The fusion line is 130 mm long. The specimen was placed in a tensile testing machine which was configured to augment the tensile deformation speed progressively from 0 mm/s to a maximum speed of 0.333 mm/s. The welding parameters used in the experiment are shown in Table 1. Thus, the known parameters are v = 2 mm/s and Q 0 = U × I = 8.4 × 81 = 680.4 W. The welded specimen is shown in Figure 3.  The experiment is instrumented with two type K thermocouples and a SC7500 FLIR infrared camera. The thermocouples, one on each side of the specimen (see Figure 1), are placed 110 mm from the bottom and 4 mm to the left from the center. The camera films the surface that is not being welded in order to avoid reflections from the welding arc. Figure 4 shows the projection of a frame of the video on the FE mesh. The resolution of the camera images is 320 × 256 pixels.
Previous uses of this configuration of thermocouples and infrared camera helped with the calibration of the parameter σ 2 m . To estimate the value of σ 2 m , we compare the measures of both sensors on a single point over time. The aim is to obtain an estimation of deviations between measures. Figure 5 shows the comparison between the signals. Here, both measures seem very close but show differences in some areas. Due to the configuration of the camera, only temperatures above 400 • C should be considered. One more thing to note is the peak that appears in the camera measure during the cooling phase, which was probably caused by the reflection of light. Work is being done at the lab to improve the quality of instrumentation and avoid this kind of issue. Considering the thermocouple and camera measures as Θ T (t) and Θ C (t), respectively, the value of σ 2 m is estimated as which corresponds to a standard deviation of~18 • C. The thermocouple measures, and not the camera data, are also used to calibrate the unknown parameter values for a high fidelity Finite Elements simulation of the experiment that will be used as reference. This is a standard procedure that is done for every simulation of an experiment at EDF and it involves the resolution of an optimization problem. The result of the calibration of θ is shown in Table 2.

Prior Generation
In Section 4, we briefly discussed the generation of the prior that is obtained by running finite element simulations for a Latin Hypercube Sampling of the parameter space P, where every parameter is assumed to be uniformly distributed. The minimum and maximum values for each parameter are issued from EDF's decades of experience in both welding and numerical analysis of welding. These values are shown in Table 3 for the known parameters and in Table 4 for the unknown parameters.

Estimation of the Heat Source Position
Before launching the two tests, the heat source position is identified using the surrogate model presented in Section 5. Figure 6 shows the discrete probability of assignment from 1000 samples of the position distribution.  The most probable basis is 130, which corresponds to 65 mm from the starting position. This position is the one that will be used as known position in the synthetic data test.

Tests with Noisy Synthetic Data
In this first test, the input data come from the calibrated finite elements simulation of the experiment, with µ = (2.0, 680.4). The snapshot used as input is the one corresponding to the highest probability. White noise of the same amplitude as the measure error estimated for the camera has been added to the data. The observation function H k restricts the view to a region "seen" by the camera, and it is represented in Figure 7. The mean of the posterior distribution m k s k |d k contains the estimation of the temperature and maximum principal stress fields, as well as the unknown parameters. We can compare these results to the calibrated finite elements simulation, from which the input data was taken.
The results are compared along a line of 130 mm at the center of both sides of the specimen, which coincides with the the weld line on the torch side. The 95% confidence interval of the estimation is also plotted around the posterior mean in Figures 8 and 9. The reconstruction of the temperature and stress fields is very accurate, with a global relative error of 1.3693% for the temperature and 6.3419% for the principal stress. This relative error is calculated as where T k |µ,θ and σ k I|µ,θ are the nodal temperature and principal stress simulation values, respectively, and s k |T and s k |σ I are the estimated nodal temperature and principal stress, respectively.
The confidence intervals are thin for the observed temperature data, as it is expected, but it is larger around the peak on the non-observed surface. For the principal stress estimations, although no data was seen, the estimated posterior mean is close to the simulation on both surfaces.
The estimation of the unknown parameters θ is very close to the results of the deterministic calibration, with a relative error inferior to 10%, meaning that the parameter calibration successfully identified the theta values used for the simulation. A comparison of the values obtained by the deterministic calibration and the mean posterior theta estimation is given in Table 5.

Tests with Real Experimental Data
In this test, we will use the camera frame projected onto the mesh as input data for the model. The camera is configured to capture temperatures above 400 • C, so the observation function H k is modified to only use data above 400 • C, which is the area represented in Figure 10.
The estimation is calculated as a mixture of the results given by the local PCA models in Figure 6. The amount of active local models is small and each individual conditioning is computed very fast. All the confidence intervals are the 95% confidence intervals.
On the camera side, the estimations can be compared to the measured temperature. In Figure 11, we can see that the model estimates a temperature that follows the experimentally measured one. Interestingly, the estimation deviates from the simulation, as seen in Figure 12, where the temperature is higher for the FE results. We interpret this difference in the estimation and the FE simulation as a model correction given by the partial observation of the temperature. We remind the reader that the FE model was calibrated using only the thermocouple measures and not the infrared camera. This difference between the FE simulation and the measured data in Figure 12 may indicate that the calibration of θ using the thermocouples is not good enough. This is supported by the fact that the estimated efficiency η, shown in Table 6 along with the other unknown parameters, is smaller at~0.74 while the initial calibration estimated it at 0.9. A smaller efficiency would transfer less temperature to the specimen, explaining the lower estimated temperature.   Note that on the camera side the confidence interval is very small for the temperature estimation, as it is expected from observed data, while on the torch side the confidence interval is larger, especially around the peak position. No mechanical data is observed, and thus the maximum principal stress confidence intervals reflect the uncertainty of the posterior estimation (see Figure 13).

Forecasting
In this last example, the forecasting capabilities of the model will be shown. Let us assume that we want to estimate the temperature and maximum principal stress fields in a future position that has not been observed yet. This position is situated 12 mm further than the one studied for the previous tests. All the information available is the value of the known parameters and the posterior estimation of the unknown parameters with their associated posterior covariance.
Choosing the active coefficient of the mixture of PPCAs for this position P j = (k + 12)∆P is the first problem to solve. When an image is available, the surrogate model for position estimation takes the highest temperature identified in the image and returns the probability distribution of the torch position. In the forecasting problem, we have no video frame to find the highest temperature, so it is assumed to be shifted by the 12 mm and then it is used to obtain the discrete assignment probability. The multiphysics states j will be predicted by conditioning its distribution by the known parameters µ and the estimated unknown parameters θ k with its associated posterior variance.
As with previous tests, the predicted estimations, p(s j |µ, θ k ), are compared to the experimental data (when it is possible) and to a Finite Elements simulation over a line on both sides of the specimen. Figure 14 shows a frame of the video where the highest temperature position is situated 12 mm to the right of the highest temperature position found in Figure 10. The measures corresponding to that frame are compared to the predictions in Figure 15. The estimation is very close to the camera data but the 95% confidence interval is very large compared to the one in Figure 11, a case where the data was observed, reducing the uncertainty.  The Finite Elements simulation was used as reference in Figures 16 and 17, where we observe generally large confidence intervals on both sides of the specimen. Overall, knowledge of the known and unknown parameters is enough to obtain predictions that represent the behaviour of the temperature and maximum principal stress fields but with a high degree of uncertainty, which can be greatly reduced by observation of the thermal images. This is not the case when only the known parameters are observed. Additional figures are shown in the Appendix B to support this claim.

Conclusions
We have proposed a novel data assimilation methodology for automatized welding operations monitored using thermal imaging. The approach is based on digital twinning, a physically detailed thermomechanical finite element model assimilating online data and predicting unseen mechanical quantities of interest such as stress fields. Sources of variability are clearly identified and modeled using appropriate random parameters, the distribution of which are designed based on expert knowledge. Data assimilation then consists in finding the posterior distribution of the uncertain parameters given the sequence of thermal images available at current process time.
The data assimilation framework is made in real-time by deploying and offline-online meta-modeling technology. Sparse linear models are postulated for every position of the welding torch, linking observations and hidden mechanical quantities to the parameters of the welding process and to the random parameters. The coefficients of the linear models are identified using the method of snapshots, using hundreds of prior high-fidelity computations. Online, predicting unseen mechanical states operation reduces to simple Gaussian conditioning with a background covariance matrix exhibiting a low-rank structure. This is made computationally efficient using standard algebraic manipulations. Thanks to this model/data fusion technology, we have shown that we were, for the first time, able to predict mechanical stress fields during welding in real-time, the predictions being continuously adjusted based on thermal imaging. We have shown that our digital twin may produce predictions that differ significantly from those produced by a high-fidelity model that is precalibrated using standard thermal sensing via a set of thermocouples. We interpret this finding as an online model correction, the data acquired online being richer, corresponding to thermal sensing closer to the regions of intense thermal gradients.
Finally, we were able to forecast stress predictions into the future of welding operations, by simply using current posterior distributions of unknown parameters and perform uncertainty propagation. We have shown that such predictions where reasonably sharp and could be used to stop welding operations in advance, when forecasting inadmissible levels of stresses.
The developments presented in this paper are expected to be the foundations for further theoretical and applied research. Future experiments may include additional instrumentation to obtain more data such as measures of the strain field by digital image correlation. In terms of algorithmic efficiency, the proposed meta-modeling methodology is piecewise linear, homogeneously along the trajectory of the welding torch. We are now investigating a data-driven clustering approach of the welding parameter domain, which we expect will help us minimize the memory required to store the various metamodels. In terms of application, the present developments focus on the prediction of stresses during the operations, but could easily be extended to the prediction of residual stresses. The exploration of parameter spaces describing geometrical variations of joining operations is also of high practical interest. Finally, the proposed approach may constitute the computational core of a model-based control technology aimed at adjusting the process parameters online in order to ensure that the joining operations produce assemblies that are of acceptable mechanical qualities.

. Mean of the Posterior Gaussian Distribution
In order to accelerate the evaluation, the following algebraic identity [25] is used: where P ∈ R M×M , R ∈ R N×N and B ∈ R N×M . This expression can be verified by multiplying both sides by (BPB T + R). The left side of the equation is quicker to evaluate when M << N. If N << M, the right side is quicker to evaluate. It is easy to see that X T XX T + Z −1 in Equation (A3) corresponds to the right side of Equation (A5) when P = Id, B = X and R = Z. In our case, the left side of Equation (A5) is faster because N M , the number of PPCA modes, is smaller than N C , the number of mesh nodes where the infrared camera is observed (N M << N C ). The expression that should be evaluated is Notice that Z is a diagonal matrix, which means that computing Z −1 is trivial and X T Z −1 is very fast.

Appendix A.2. Covariance of the Posterior Gaussian Distribution
In the case of the covariance matrix, it is convenient to use the Woodbury identity [30]: where A ∈ R M×M , U ∈ R M×N , B ∈ R N×N and V ∈ R N×M . If A = Id, U = X T , B = Z −1 and V = X, then we recognize that the right side of Equation (A8) is the expression in Equation (A4). It is quicker to evaluate the left side of Equation (A8) due to the dimensions of the problem. Thus, the covariance matrix is computed as Notice that Equation (A7) is part of Equation (A6), meaning that it only needs to be computed once. The results shown in Table A1 are the average of 7000 runs for both examples using each of the expressions presented previously. The computation time is greatly reduced using the expression in Equations (A6) and (A7). In this appendix, we show some complementary forecasting results. In particular, we want to compare a forecast performed with and without observing the posterior theta values, as well as a comparison between the posterior covariance of a forecast and an estimation obtained observing an infrared image.
We have shown that using the previously estimated unknown parameters θ, forecasting a future state is possible. Indeed, parametric uncertainty is the main source of uncertainty in our model. The first result we want to show is a comparison between a forecast obtained using only the known parameters µ and another one observing the mean θ posterior. Figure A1 shows that without observing the mean θ posterior, the estimation is not good and forecasting is not possible. This indicates that the prior distribution of the unknown parameters might not be well chosen or that it reflects a spectrum of values that is too large for this case.
Additionally, we want to compare the posterior covariance of a forecasted estimation and an estimation obtained after observing an infrared image. It is clear that observing the temperature field, the uncertainty is greatly reduced, as seen in Figure A2.

Appendix C. Relevant Material Parameters
In this final appendix, more details on the 316 stainless steel specimen is given. Most of the thermal and mechanical material properties of steel are temperature dependent and, thus, it is of great importance to take the variations into account. In Table A2, the temperature dependent values of four material properties used in the simulations are shown. These were obtained in previous research works by EDF R&D in collaboration with CEA Saclay and Université de Bretagne Sud.
The chemical composition of the material is directly related to the occurrence of cracks. In Table A3, the detailed chemical composition of the used specimen is given. The data was directly obtained from the manufacturer.