Virtual Sensor for On-Line Hardness Assessment in TIG Welding of Inconel 600 Alloy Thin Plates

Maintaining high-quality welded connections is crucial in many industries. One of the challenges is assessing the mechanical properties of a joint during its production phase. Currently, in industrial practice, this occurs through NDT (non-destructive testing) conducted after the production process. This article proposes the use of a virtual sensor, which, based on temperature distributions observed on the joint surface during the welding process, allows for the determination of hardness distribution across the cross-section of a joint. Welding trials were conducted with temperature recording, hardness measurements were taken, and then, neural networks with different hyperparameters were tested and evaluated. As a basis for developing a virtual sensor, LSTM networks were utilized, which can be applied to time series prediction, as in the analyzed case of hardness value sequences across the cross-section of a welded joint. Through the analysis of the obtained results, it was determined that the developed virtual sensor can be applied to predict global temperature changes in the weld area, in terms of both its value and geometry changes, with the mean average error being less than 20 HV (mean for model ~35 HV). However, in its current form, predicting local hardness disturbances resulting from process instabilities and defects is not feasible.


Introduction
Welding plays a pivotal role in the industrial sector, serving as the backbone of manufacturing, construction, and engineering projects around the globe.It provides a robust method for joining metals and thermoplastics, enabling the creation of complex structures and machinery essential for infrastructure development, transportation networks [1], and energy production [2].The versatility and strength of welding techniques facilitate innovations in design and materials science, driving advancements in aerospace, automotive, and renewable energy industries.Furthermore, the continual evolution of welding technologies, including automation and robotic welding, underscores its critical importance in enhancing efficiency, safety, and quality in industrial operations.As such, welding remains an indispensable skill and process, underpinning the growth and sustainability of modern industrial economies.Inconel is a trademark for a group of metal alloys known for their high nickel-chromium content and exceptional heat resistance, making them ideal for extreme environments such as jet engines and gas turbines [3].Additionally, Inconel superalloys exhibit excellent resistance to corrosion and creep, ensuring long-term durability and reliability in harsh operating conditions.Maintaining those properties during welding detection of wear of the secondary cable of a welding gun [19], and the control of robotic welding [20].
In the case of the welding process and the prediction of mechanical properties like hardness or impact strength, the main drawback limiting the possibility of the elaboration and application of these methods is the necessity of gathering a relatively large amount of real-life data.This demands the performance of many welding trials with different process parameters to obtain samples with different qualities of joints [21,22].Next, proper analysis must be made, which is preceded with the cutting of samples, etching, etc. [23][24][25].This high workload cannot be omitted by sample generation using, e.g., finite-elementmethod simulation.This is the case because in simulations for fixed sets of parameters, the same results will always be obtained [26][27][28].During welding for the same set of parameters, slightly different results are gathered due to differences in the material structure or temporary changes in process conditions [29][30][31].
In this paper, the design and application of a novel virtual sensor that can be used to predict changes in hardness in the cross-section of a welded joint is described.The key idea was to apply temperature profiles gathered on the surface of a welded workpiece in three different distances of the prediction area (under the welding torch).The main innovation is the transformation from a two-dimensional temperature matrix into a hardness vector, which can be used directly during manufacturing to evaluate local faults of welding that lead to disturbance or the lowering of joint quality and mechanical properties.

Materials and Methods
To develop a virtual sensor of acceptable quality, several steps must be taken (Figure 1).Initially, an active experiment should be conducted where joints are produced under various process settings.Throughout this process, the temperature distribution on the surface of the workpiece samples is recorded.In the subsequent step, the samples are sectioned, grouped into sets for each, and secured through hot mounting.Following this, the specimens are subjected to grinding and polishing to achieve a high-quality surface, making them suitable for hardness testing.The hardness of each sample is determined using the Vickers hardness test.The collected hardness data are then linked with the corresponding thermal profiles.Ultimately, this dataset is utilized to develop an artificial neural network designed to forecast the hardness distribution across the cross-section of welded joints.
Sensors 2024, 24, x FOR PEER REVIEW 3 of 18 [18], the detection of wear of the secondary cable of a welding gun [19], and the control of robotic welding [20].
In the case of the welding process and the prediction of mechanical properties like hardness or impact strength, the main drawback limiting the possibility of the elaboration and application of these methods is the necessity of gathering a relatively large amount of real-life data.This demands the performance of many welding trials with different process parameters to obtain samples with different qualities of joints [21,22].Next, proper analysis must be made, which is preceded with the cutting of samples, etching, etc. [23][24][25].This high workload cannot be omitted by sample generation using, e.g., finite-elementmethod simulation.This is the case because in simulations for fixed sets of parameters, the same results will always be obtained [26][27][28].During welding for the same set of parameters, slightly different results are gathered due to differences in the material structure or temporary changes in process conditions [29][30][31].
In this paper, the design and application of a novel virtual sensor that can be used to predict changes in hardness in the cross-section of a welded joint is described.The key idea was to apply temperature profiles gathered on the surface of a welded workpiece in three different distances of the prediction area (under the welding torch).The main innovation is the transformation from a two-dimensional temperature matrix into a hardness vector, which can be used directly during manufacturing to evaluate local faults of welding that lead to disturbance or the lowering of joint quality and mechanical properties.

Materials and Methods
To develop a virtual sensor of acceptable quality, several steps must be taken (Figure 1).Initially, an active experiment should be conducted where joints are produced under various process settings.Throughout this process, the temperature distribution on the surface of the workpiece samples is recorded.In the subsequent step, the samples are sectioned, grouped into sets for each, and secured through hot mounting.Following this, the specimens are subjected to grinding and polishing to achieve a high-quality surface, making them suitable for hardness testing.The hardness of each sample is determined using the Vickers hardness test.The collected hardness data are then linked with the corresponding thermal profiles.Ultimately, this dataset is utilized to develop an artificial neural network designed to forecast the hardness distribution across the cross-section of welded joints.

Welding of Test Joints
The test samples, crafted from the nickel superalloy Inconel 600, were subjected to TIG welding and were all fabricated from 1.2 mm thick sheets.These materials were procured from Huntington Alloys Corporation located in the Huntington, WV, USA.The creation Sensors 2024, 24, 3569 4 of 18 of this material entailed an industrial procedure, which included melting the Inconel 600 inside an electric furnace.Following the melting process, the material underwent plastic deformation through cold rolling, which was intermittently coupled with a heat treatment process known as recrystallization annealing.The chemical composition of the used material is shown in Table 1.All workpieces were joined using the Casto TIG 2002 device (Castolin Eutectic Gmbh, Kriftel, Germany, Figure 2).The TIG welding of thin sheets was performed under laboratory conditions with the following constant parameters: shield gas flow Ar 12 L/min, ridge shield gas flow Ar 3 L/min.For welding a tungsten electrode (thoriated), type WT20 (diameter 2.4 mm) was used.
material is shown in Table 1.All workpieces were joined using the Casto TIG 2002 device (Castolin Eutectic Gmbh, Kriftel, Germany, Figure 2).The TIG welding of thin sheets was performed under laboratory conditions with the following constant parameters: shield gas flow Ar 12 L/min, ridge shield gas flow Ar 3 L/min.For welding a tungsten electrode (thoriated), type WT20 (diameter 2.4 mm) was used.
The temperature distribution across the welded joints was captured using an FILR A655sc infrared camera, as shown in Figure 1.This camera boasted a spatial resolution of 640 × 480 pixels and a 16 bit dynamic range and was calibrated with an emissivity setting of ε = 0.13.The change in emissivity related to temperature variation was disregarded for the methodologies applied, as there was no requirement to differentiate temperatures between the molten and solidified areas of the joint.Additionally, any reflections emanating from the intense heat of the welding torch and the welding arc itself were adjusted for using a fixed reflected temperature value.Infrared images were recorded at a frame rate of 60 fps.The optical axis of the camera was positioned at an 87-degree angle to the sample's plane, maintaining a 600 mm gap from the welded object.Data post-processing and analysis was performed in the MATLAB R2023b environment with the use of an additional Teledyne FLIR Science File SDK (to read and process IR sequences).Joints were made for various sets of process parameters, which are shown in Table 2.The selection of parameters was conducted in order to achieve joints differing in mechanical properties.The resulting joint face is presented in Figure 3.It can be seen that the seam The temperature distribution across the welded joints was captured using an FILR A655sc infrared camera, as shown in Figure 1.This camera boasted a spatial resolution of 640 × 480 pixels and a 16 bit dynamic range and was calibrated with an emissivity setting of ε = 0.13.The change in emissivity related to temperature variation was disregarded for the methodologies applied, as there was no requirement to differentiate temperatures between the molten and solidified areas of the joint.Additionally, any reflections emanating from the intense heat of the welding torch and the welding arc itself were adjusted for using a fixed reflected temperature value.Infrared images were recorded at a frame rate of 60 fps.The optical axis of the camera was positioned at an 87-degree angle to the sample's plane, maintaining a 600 mm gap from the welded object.Data post-processing and analysis was performed in the MATLAB R2023b environment with the use of an additional Teledyne FLIR Science File SDK (to read and process IR sequences).
Joints were made for various sets of process parameters, which are shown in Table 2.The selection of parameters was conducted in order to achieve joints differing in mechanical properties.The resulting joint face is presented in Figure 3.It can be seen that the seam width as well as the discoloration of welds is different for various sets of parameters that are causing different amounts of heat input.

Hardness Examination
To examine the joint zone (JT), the heat-affected zone (HAZ), and the base material area (BM), Adler's reagent was applied to the joint surfaces.This etchant is composed of 3 g of ammonium chlorocuprate ((NH4)3(CuCl4)), 20 mL of distilled water, 50 mL of hydrochloric acid (HCl), and 15 g of iron chloride (FeCl3).The etching process was performed incrementally, lasting between 10 and 15 s at ambient temperature.Macro-level examination of the etched joints was conducted with an OLYMPUS GX71 light microscope by Olympus Corporation (Tokyo, Japan), featuring up to 50×x magnification.The breadth of the HAZ and the dimensions of the welded joint's face and ridge were accurately measured to within ±0.1 mm using metallographic analysis under a microscope.Metallographic examinations at the microscopic level involved analyzing welded joint samples cut across the weld's longitudinal axis.These samples were set in Duracryl Plus self-hardening resin (Figure 4), then sequentially sanded on water-based abrasive sheets ranging from 320 to 1000 grit.With each switch in abrasive paper, the sanding direction was

Hardness Examination
To examine the joint zone (JT), the heat-affected zone (HAZ), and the base material area (BM), Adler's reagent was applied to the joint surfaces.This etchant is composed of 3 g of ammonium chlorocuprate ((NH 4 ) 3 (CuCl 4 )), 20 mL of distilled water, 50 mL of hydrochloric acid (HCl), and 15 g of iron chloride (FeCl 3 ).The etching process was performed incrementally, lasting between 10 and 15 s at ambient temperature.Macro-level examination of the etched joints was conducted with an OLYMPUS GX71 light microscope by Olympus Corporation (Tokyo, Japan), featuring up to 50× magnification.The breadth of the HAZ and the dimensions of the welded joint's face and ridge were accurately measured to within ±0.1 mm using metallographic analysis under a microscope.Metallographic examinations at the microscopic level involved analyzing welded joint samples cut across the weld's longitudinal axis.These samples were set in Duracryl Plus self-hardening resin (Figure 4), then sequentially sanded on water-based abrasive sheets ranging from 320 to 1000 grit.With each switch in abrasive paper, the sanding direction was altered by 90 • .The samples were then polished on a Struers Planopol-3 machine (Struers A/S, Ballerup, Denmark) using a felt disk and an Al 2 O 3 water suspension.The hardness of the cross-sectional areas was measured employing the Struers DuraScan 50 hardness tester (Henri Hauser AG, Biel, Switzerland) with a force of 9.807 N; thus, the hardness of 1 HV (or HV) was measured.
altered by 90°.The samples were then polished on a Struers Planopol-3 machine (Struers A/S, Ballerup, Denmark) using a felt disk and an Al2O3 water suspension.The hardness of the cross-sectional areas was measured employing the Struers DuraScan 50 hardness tester (Henri Hauser AG, Biel, Switzerland) with a force of 9.807 N; thus, the hardness of 1 HV (or HV) was measured.

Data Processing and Neural Model Elaboration
The first stage that influences results is the extraction of temperature profiles.For test purposes, three profiles were extracted, and the offset between them was 50 px.Due to perspective distortion, profiles were cut out in the bottom area of the thermogram, which represented the region closer to the welding torch.In this region, geometric distortion was low, and the image was in focus.As there was a constant welding speed set on the automated weld stand (Figure 2), there was a linear relationship between welding speed and the position of the welded workpiece.Additionally, thermograms were recorded with a constant framerate; thus, an IR image where the workpiece was in an assumed position in relation to the reference point was developed.Thanks to these dependencies, thermograms were found, in which the lowest profile (Slice 1, Figure 5) was in the approximate location at which the workpiece was cut apart to create samples for hardness measurements.

Data Processing and Neural Model Elaboration
The first stage that influences results is the extraction of temperature profiles.For test purposes, three profiles were extracted, and the offset between them was 50 px.Due to perspective distortion, profiles were cut out in the bottom area of the thermogram, which represented the region closer to the welding torch.In this region, geometric distortion was low, and the image was in focus.As there was a constant welding speed set on the automated weld stand (Figure 2), there was a linear relationship between welding speed and the position of the welded workpiece.Additionally, thermograms were recorded with a constant framerate; thus, an IR image where the workpiece was in an assumed position in relation to the reference point was developed.Thanks to these dependencies, thermograms were found, in which the lowest profile (Slice 1, Figure 5) was in the approximate location at which the workpiece was cut apart to create samples for hardness measurements.
altered by 90°.The samples were then polished on a Struers Planopol-3 machine (Struers A/S, Ballerup, Denmark) using a felt disk and an Al2O3 water suspension.The hardness of the cross-sectional areas was measured employing the Struers DuraScan 50 hardness tester (Henri Hauser AG, Biel, Switzerland) with a force of 9.807 N; thus, the hardness of 1 HV (or HV) was measured.

Data Processing and Neural Model Elaboration
The first stage that influences results is the extraction of temperature profiles.For test purposes, three profiles were extracted, and the offset between them was 50 px.Due to perspective distortion, profiles were cut out in the bottom area of the thermogram, which represented the region closer to the welding torch.In this region, geometric distortion was low, and the image was in focus.As there was a constant welding speed set on the automated weld stand (Figure 2), there was a linear relationship between welding speed and the position of the welded workpiece.Additionally, thermograms were recorded with a constant framerate; thus, an IR image where the workpiece was in an assumed position in relation to the reference point was developed.Thanks to these dependencies, thermograms were found, in which the lowest profile (Slice 1, Figure 5) was in the approximate location at which the workpiece was cut apart to create samples for hardness measurements.Extracted profiles, three for each image, were linked with corresponding hardness profiles.Thus, a pair of input data to virtual sensor and expected sensor output was created.
To find the best combination of networks' topologies and hyperparameters, the MAT-LAB Experiment Manager was used.The general structure of the network is presented in Figure 6.The network consists of LSTM Layers (one or two), a fully connected layer (FC), a rectified linear unit layer (ReLU), and a dropout layer.The LSTM architecture includes cell states and gates (input, forget, and output gates) that control the flow of information, Sensors 2024, 24, 3569 7 of 18 allowing the network to retain or discard information over long sequences.The network's ability to selectively remember and forget information allows it to capture intricate patterns and relationships in the sequence data.The ReLU layer is used to introduce non-linearity into the model, while the dropout layer realizes a regularization task that is used to prevent overfitting.
experiment 2 and [1; 900] in experiment 3. The number of hidden units determines the capacity of a model to learn and represent complex patterns in the data.It also affects the model's ability to generalize from training data to unseen data and influences the ability of the LSTM to retain and utilize information over long sequences.The initial learning rate range was [0.001; 0.3] in both experiments.The initial learning rate is crucial for determining the convergence speed, stability, and final performance of an LSTM network; a high learning rate can lead to fast but potentially unstable convergence, while a low learning rate results in slower, more precise training.A wider range of parameters in the case of the second experiment was chosen to check a field of possible solutions.Then, the final, optimal network was selected using only a limited range of parameters in which the previous best ones were placed.

Results and Discussion
The elaboration of the neural model for a virtual sensor started with training pairs' extraction.There were 93 hardness profiles measured for nine welded test pieces.Corresponding thermal profiles were found in the sequences of thermograms taken during the welding.Exemplary temperature profiles and resulting hardness profiles are presented in Figures 7 and 8.For further calculations, temperature was standardized using the z-score distance measure.It can be noticed that slice 1, representing temperature profile, which is Three parameters were optimized during one experiment session: LSTM network depth, number of hidden units, and initial learning rate.LSTM network depth is a parameter that directly influences the topology of the network.After the input layer, a number of LSTM layers is present.The first experiment was a preliminary one.In this one, only the suitability of the general network topology was checked, without judging the values of creatin parameters.The number of layers was optimized and the best value was searched for in a range from one layer to seven layers in experiment 2 and [1; 2] in experiment 3, respectively.The number of LSTM layers affects a model's capacity to learn hierarchical patterns and long-term dependencies, with more layers enabling deeper feature extraction but increasing the risk of overfitting and computational complexity.Balancing the number of layers is crucial for achieving optimal performance without excessive overfitting or excessive training time.The next hyperparameter that was optimized was the number of hidden units in each LSTM layer.In this case, the search range was [10; 600] in experiment 2 and [1; 900] in experiment 3. The number of hidden units determines the capacity of a model to learn and represent complex patterns in the data.It also affects the model's ability to generalize from training data to unseen data and influences the ability of the LSTM to retain and utilize information over long sequences.The initial learning rate range was [0.001; 0.3] in both experiments.The initial learning rate is crucial for determining the convergence speed, stability, and final performance of an LSTM network; a high learning rate can lead to fast but potentially unstable convergence, while a low learning rate results in slower, more precise training.A wider range of parameters in the case of the second experiment was chosen to check a field of possible solutions.Then, the final, optimal network was selected using only a limited range of parameters in which the previous best ones were placed.

Results and Discussion
The elaboration of the neural model for a virtual sensor started with training pairs' extraction.There were 93 hardness profiles measured for nine welded test pieces.Corresponding thermal profiles were found in the sequences of thermograms taken during the welding.Exemplary temperature profiles and resulting hardness profiles are presented in Figures 7 and 8.For further calculations, temperature was standardized using the z-score distance measure.It can be noticed that slice 1, representing temperature profile, which is located closest to the welding pool, has the shape that is most relevant in the context of temperature changes in the joint.
After analyzing the results from all performed experiments (see Appendix A), the two best models were selected according to MAE.The detailed results for the two best models, N30e3 and N04e3, and for the reference model that gave weak results (N33e2) are shown in Table 3.It can be noticed that there were quite large differences between hardness profile prediction quality within one model for various welded samples.For example, for N30e3, which was considered as the best model, the MAE varied from 24.72 to 47.54.Moreover, this model was not the best choice for all test samples, as for 12.2.5 and 12.5.2,N04e3 performed better according to MAE.Because of this, both models were further evaluated in detail.
OR PEER REVIEW 8 of 18 located closest to the welding pool, has the shape that is most relevant in the context of temperature changes in the joint.After analyzing the results from all performed experiments (see Appendix A), the two best models were selected according to MAE.The detailed results for the two best models, N30e3 and N04e3, and for the reference model that gave weak results (N33e2) are shown in Table 3.It can be noticed that there were quite large differences between hardness profile prediction quality within one model for various welded samples.For example, for N30e3, which was considered as the best model, the MAE varied from 24.72 to 47.54.Moreover, this model was not the best choice for all test samples, as for 12.2.5 and 12.5.2,N04e3 performed better according to MAE.Because of this, both models were further evaluated in detail.The structure of the N30e3 network is presented in Table 4.The network had eight layers and 8.7 million learnable parameters in total.In contrast, the N04e3 network was OR PEER REVIEW 8 of 18 located closest to the welding pool, has the shape that is most relevant in the context of temperature changes in the joint.After analyzing the results from all performed experiments (see Appendix A), the two best models were selected according to MAE.The detailed results for the two best models, N30e3 and N04e3, and for the reference model that gave weak results (N33e2) are shown in Table 3.It can be noticed that there were quite large differences between hardness profile prediction quality within one model for various welded samples.For example, for N30e3, which was considered as the best model, the MAE varied from 24.72 to 47.54.Moreover, this model was not the best choice for all test samples, as for 12.2.5 and 12.5.2,N04e3 performed better according to MAE.Because of this, both models were further evaluated in detail.The structure of the N30e3 network is presented in Table 4.The network had eight layers and 8.7 million learnable parameters in total.In contrast, the N04e3 network was smaller and had 7 million learnables.The training time of each individual network was  The structure of the N30e3 network is presented in Table 4.The network had eight layers and 8.7 million learnable parameters in total.In contrast, the N04e3 network was smaller and had 7 million learnables.The training time of each individual network was similar for all models, and it was in the range of one to two minutes.
Initially, a subjective assessment of the results obtained from three selected models was conducted.Relevant results from the samples are shown in Figures 9-12.The first observed phenomenon concerns the shape of the obtained hardness profiles.In the case of the N04e3 models, the better representation of transition zones, where a decrease in hardness values occurs before the weld and then increases, was observed in most cases.On the other hand, regarding the representation of hardness values in the weld zone, the responses obtained from the N04e3 model are characterized by the better representation of         To quantify the similarity between models, additional metrics were used, as the subjective assessment of predicted shapes of hardness profiles differs from the objective one.This is especially the case when results seem to differ significantly after visual investigation, but the difference in the value of the mean maximal absolute error is low.In order to investigate the performance of the selected models, which are the core of virtual sensors, in more detail, several additional similarity measures were applied.The first are common distance measures: Euclidean distance and Manhattan distance [32].Those measures allow one to measure the straight-line distance between two points in Euclidean space.They are simple approaches but might not be effective for time series that are shifted in time or amplitude.The next applied measure is the cosine similarity [33].It measures the cosine of the angle between two vectors, which can be useful for understanding the similarity between two series regardless of their magnitude.Another simple and commonly used metric is the Pearson correlation [28].It can be used to assess the similarity of vectors regardless of their average values and variability, but at the same time, this type of correlation assumes that the relationship is linear and that the data are normally distributed, which might not always be the case in real-world data.The longest common subsequence (LCSS) is a method used to measure similarity between two sequences by identifying the longest subsequence present in both sequences without changing the order of items [34].This method is beneficial in problems where patterns over time/location are more important than the actual values of data points.The final approaches used are dynamic time warping (DTW) and restricted time warping [35].DTW allows the stretching and compressing of data series to find an optimal match, making it more suitable for time series that may vary in speed.In the restricted version of DTW, additional constraints are applied on the warping window, limiting how far the alignment can stray locally.The purpose of this is to prevent extreme distortions in the time alignment, which might be irrelevant.To quantify the similarity between models, additional metrics were used, as the subjective assessment of predicted shapes of hardness profiles differs from the objective one.This is especially the case when results seem to differ significantly after visual investigation, but the difference in the value of the mean maximal absolute error is low.In order to investigate the performance of the selected models, which are the core of virtual sensors, in more detail, several additional similarity measures were applied.The first are common distance measures: Euclidean distance and Manhattan distance [32].Those measures allow one to measure the straight-line distance between two points in Euclidean space.They are simple approaches but might not be effective for time series that are shifted in time or amplitude.The next applied measure is the cosine similarity [33].It measures the cosine of the angle between two vectors, which can be useful for understanding the similarity between two series regardless of their magnitude.Another simple and commonly used metric is the Pearson correlation [28].It can be used to assess the similarity of vectors regardless of their average values and variability, but at the same time, this type of correlation assumes that the relationship is linear and that the data are normally distributed, which might not always be the case in real-world data.The longest common subsequence (LCSS) is a method used to measure similarity between two sequences by identifying the longest subsequence present in both sequences without changing the order of items [34].This method is beneficial in problems where patterns over time/location are more important than the actual values of data points.The final approaches used are dynamic time warping (DTW) and restricted time warping [35].DTW allows the stretching and compressing of data series to find an optimal match, making it more suitable for time series that may vary in speed.In the restricted version of DTW, additional constraints are applied on the warping window, limiting how far the alignment can stray locally.The purpose of this is to prevent extreme distortions in the time alignment, which might be irrelevant.
Applying eight described measures led to a set of results (Table 5, Figure 13).First, it can be noticed that in most cases, the general order of model performances stands.Nevertheless, for the cosine similarity, the results for sample 12.9.5 (Figure 11) are opposite to those of the visual assessment of the hardness profile outputted by models.In this case, CS suggests that the results given by model N33e2 are better than the output from the N04e3 model.This is incorrect, because N04e3 results in a general shape and approximate value of hardness change in the joint area that is well reproduced, while the N33e2 model only produces a straight line.For other metrices, there is common disagreement when evaluating the quality of the N04e3 and N33e3 models.The comparison of LCSS and RDTW is especially interesting and gives insights into how models behave for certain data inputs.The LCSS measures more relevant positions, similar to DTW and RDTW.E.g., in the case of sample 12.10.4(Figure 12), the large advantage of the N30e3 model is visible.It can be seen, when analyzing the plots of ground truth and predicted profiles, that the N30e3 model converges better with real data, as the left slope of the hardness decrease in the joint is closer to the real one, and for the right slope, where hardness increases, the offset between the real data and predicted data is smaller than that in the case of the N04e3 model.In DTW, where the translation of the hardness profile is less important than its shape, the N04e3 model is favorable, because the predicted hardness profile (and also the exact hardness values) is closer to the real data, mainly in the joint part, but it is translated.The property of LCSS, in which some points of profiles can remain unmatched, leads to intuitively better results in this case, because no correspondence has to be found for noisy or degraded regions.

Conclusions and Future Developments
This contribution aims to introduce the current state-of-the-art deep learning techniques to the prediction of hardness distribution on the cross-section of a welded joint.The prediction is based on a virtual sensor that utilizes information about the process temperature recorded on the workpiece surface.The proposed method was tested on real-life data obtained during an active welding experiment, where welded joints were produced for the same type of welded material using various process parameters.The conclusions obtained in this paper can be summarized in the following points: • A method was developed to be applied to predict the hardness of joints made using TIG (GTAW-gas tungsten arc welding).The main question that arose at the stage of result analysis was whether the obtained results were suitable enough to indisputably state that joints can be accepted as meeting quality requirements in terms of mechanical properties.As the dataset used to train neural models was limited, the identification of hardness deviations, especially in the heat-affected zone, was insufficient.Local changes, especially increases in hardness within the heataffected zone, remained unrepresented.Additionally, there were no local hardness changes in the fusion zone, which would manifest as temperature variations in the input profiles.On the other hand, the decrease in hardness in the fusion zone was accurately replicated (within the range of mean values).The width of the zone with reduced hardness was also effectively predicted.
Possible directions for further development are grouped into three main areas.First of all, additional samples have to be welded and new data acquired for different material geometries (e.g., the thickness of welded sheets).The authors assume that there can be a neural model that is specialized in assessing certain types of joints made from a single material or for a small group of related materials.The second direction is connected to the enhancement of model input space to allow signals from other sensors and process parameters to be used.The last considered development path is devoted to the further optimization of the neural model in terms of structure and other error or similarity measures that would be used to steer network training.

Figure 1 .
Figure 1.Diagram of performed research stages.Figure 1. Diagram of performed research stages.

Figure 1 .
Figure 1.Diagram of performed research stages.Figure 1. Diagram of performed research stages.

Figure 2 .
Figure 2. Welding device, TIG torch, and IR camera used during studies.

Figure 2 .
Figure 2. Welding device, TIG torch, and IR camera used during studies.

Figure 3 .
Figure 3. Welded samples made during the experiment.The side of the weld face is shown.

Figure 3 .
Figure 3. Welded samples made during the experiment.The side of the weld face is shown.

Figure 5 .
Figure 5. Thermogram taken during welding process of sample 12.1.With red lines, horizontal profiles are marked.From this IR image and corresponding hardness profile, training pair no.12.1.2was crated.

Figure 5 .
Figure 5. Thermogram taken during welding process of sample 12.1.With red lines, horizontal profiles are marked.From this IR image and corresponding hardness profile, training pair no.12.1.2was crated.

Figure 5 .
Figure 5. Thermogram taken during welding process of sample 12.1.With red lines, horizontal profiles are marked.From this IR image and corresponding hardness profile, training pair no.12.1.2was crated.

Figure 6 .
Figure 6.Schematic diagram of neural network used as a virtual sensor for hardness prediction.

Figure 6 .
Figure 6.Schematic diagram of neural network used as a virtual sensor for hardness prediction.
However, responses from the N30e3 model tend to indicate maximum values obtained in the weld area.

Table 1 .
Chemical composition of the investigated Inconel superalloys.

Table 1 .
Chemical composition of the investigated Inconel superalloys.

Table 2 .
TIG welding parameters used for the generation of samples.

Table 2 .
TIG welding parameters used for the generation of samples.

Table 3 .
MAE results obtained for hardness prediction with use of two best models and reference model.

Table 3 .
MAE results obtained for hardness prediction with use of two best models and reference model.

Table 3 .
MAE results obtained for hardness prediction with use of two best models and reference model.

Table 4 .
Detailed structure of N30e3 network.Initially, a subjective assessment of the results obtained from three selected models was conducted.Relevant results from the samples are shown in Figures9-12

Table 5 .
Results of model assessment with different series similarity measures.

•
The selected neural networks, being the bases of the virtual sensor, have two LSTM layers and 746 and 851 neurons in each layer, respectively.•The best hardness profile prediction was made with N04e3.In this case, the MAE was 19.62 HV.The best overall performance was obtained for the N30e3 model, for which the average MAE for all verification samples was 34.12 HV. • The application of profile similarity measurements allowed the in-depth investigation of virtual sensor performance.It was revealed that MAE global error is good for quantifying the overall quality of model output, but similarity measures like longest common subsequence (LCSS) and restricted dynamic time warping (RDTW) can also be successfully applied to quantify local quality, especially in the case of transient profile regions between joints and base materials.

Table A1 .
Neural model training results achieved in experiment no. 2.