How To Develop a NDT Method For Weld Inspection in Battery Cell Manufacturing Using Deep Learning


 Battery cells are central components of electric vehicles. It is important for automotive OEM to utilize high quality battery cells to ensure high performance and safety of their vehicles. This results in the high demand for quality control measures and inspection methods in battery cell manufacturing. Particular relevant features of battery cells are welds for the internal electrical contact. Failures of these welds are often the cause for battery defects in the field and scrap during production. Consequently, there is a strong need to evaluate all welds during manufacturing. However, there is no established method which allows a quick, comprehensive, and cheap inline measurement of the weld quality. This paper presents a new eddy current based method for non-destructive testing of seam welds as well as a machine learning approach for its validation. A deep learning model has been trained on eddy current measurements to predict results from a reference inspection method, in this case computer tomography. The results prove that eddy current measurements can be used to replicate data acquired by computer tomography which means that eddy current measurements could be a suitable candidate for non-destructive 100% inline inspection. More general, this study demonstrates how machine learning may help to get deeper insights into measurement results and to validate new non-destructive testing techniques whose detailed features are yet unknown. The presented evaluation method enables understanding the capabilities and the limits of a new technique and to extract hidden features from the data. Furthermore, the usage of machine learning allows to perform these evaluations on artificial product samples with specific defects and features, which avoids the costly production physical samples.


Introduction
Electric vehicles (EV) are a key technology in the road map towards a sustainable mobility sector. They enable the use of renewable energy carriers substituting fossil fuels, resulting in reduced greenhouse gas emissions within the vehicles use stage. Moreover, they cause fewer local pollutant emissions, leading to an improvement of local air quality. Consequently, EV bear the potential to drastically reduce the overall environmental impact of the mobility sector. Central components of EV are battery cells. They determine the operational range (e.g. driving range for vehicles), power output (e.g. acceleration) and charging times. Furthermore, they strongly determine the safety of a vehicle and the lifetime of the battery system. In addition, the production of battery cells extensive relies on raw and auxiliary materials as well as energy associated with negative environmental effects. Therefore, improving the performance of battery cells while reducing their environmental impacts is an essential task in order to make EV successful and to realize their potential positive contribution towards a sustainable mobility sector.
The activities for improving cell performance and reducing environmental impacts can be structured into several main fields of action. The performance can be increased by achieving higher specific energy densities (higher driving range) and reduced internal resistance (higher power output, shorter charging times and reduced heat generation). The environmental impacts can be reduced by using less energy and materials for manufacturing as well as by ensuring a long lifetime of battery cells. These challenging tasks can be addressed by innovations in product design and manufacturing processes. A deep understanding of relations between product features and process parameter in order to achieve an effective manufacturing as well as effective quality control measures in large scale manufacturing systems. Machine learning approaches have been proposed to extract these relations from heterogenous data [22,24,25], which require a traceable tracking of process as well as product features along the battery cell production chain [27]. Since the most relevant raw materials (economical and environmental) are introduced at the very beginning of the manufacturing process chain, it is important to avoid any failures in intermediate products anywhere within the process chain. Scrap, caused for example through process deviations, has to be avoided. Moreover, many properties of intermediate products have direct influence on the performance and characteristics of finished battery cells. Crucial features of most battery cell types are the welds for the electrical connection of multi-layered electrodes (anodes or cathodes) and the arrester tabs. The welds combine all current collector foils of the electrodes of the same type and joint them to the arrester tab which enables the transfer of stored energy to the outside of the cell via electric current. Figure 1 shows an illustration of a cell stack with contacted arrester tabs. Welds are critical features since they determine the internal contact resistance which effects charging times of the battery (comfort), power output (driving behavior) and heat generation (safety). Furthermore, the fatigue strength of welds influences the long-term stability and thus the lifetime of the battery. Challenges in welding of electrodes and tabs arise from the combination of multiple layers with different thicknesses and potential surface contaminations or oxidations as well as from joining of multiple layers of different material thickness and potential gaps between layers. The most common joining technologies are ultrasonic welding and laser beam welding, both of which have advantages and disadvantages. In consequence, required times for process development and process ramp-  up are long. In addition, process deviations effect the quality of welds in terms of width, topology, color, holes, and surface structure, even when the relevant weld characteristics (e.g. strength, resistance) are well within its tolerances. This makes it difficult to evaluate welds based on manual visual inspection alone. As an example, Figure 2 shows an experimental line weld from laser beam welding, connecting anode sheets with the corresponding arrester tab. It is important to monitor and control the properties and characteristics of each intermediate product during manufacturing. A 100% non-destructive inline control of all relevant product features of intermediate products and components of battery cells is the ideal scenario. Non-destructive testing (NDT) of welds inline or atline after the welding process before further processing of the contacted stacks is the aim. This enables an early detection of defects (reduction of scrap) as well as the analysis of interdependencies between process parameters, surrounding conditions, materials parameters and the achieved weld quality (process monitoring). The latter allows adjusting of process parameters if deviations in weld quality occur in order to avoid scrap or cells with reduced performance. NDT methods for weld inspection for inline application in a mass manufacturing environment must enable short inspection times and high accuracy regarding the desired product characteristics, avoid any coupling medium or impacts on the inspected product unit, and be of low investment and low operating cost. However, no established NDT approach seems to fit these requirements. Consequently, there is the demand for a new NDT method suitable for battery cell welds, which allows an effective inline characterization of the intermediate product properties. One promising solution for this demand could be based on Eddy current measurement (ECM). However, the interpretation of the acquired ECM data is not straight   1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65 forward, and it is not well understood which information about physical characteristics of battery cell welds are encoded within the ECM data. These issues generally occur often when developing new NDT methods. To address these issues, a deep learning approach is developed allowing to validate the results of a new NDT method for the comparison of the NDT results with a reference measurement method, which does not necessarily have to be inline-capable. The approach can be applied to any inspection task and is not limited to the presented use case. Following this introduction, Section 2 presents theoretical background about NDT for weld characterization, the relevant state of research for ECM evaluation, and the derived research gap. Section 3 describes the concept of the study addressing the used workflow and steps for NDT validation as well as the chosen quantitative methods. Section 4 gives detailed insight into the acquired measurement data and the achieved modeling results. Section 5 presents a discussion of the gained results and the suitability of the study concept for NDT validation.

Non-destructive weld testing
Seam welds in battery cells must fulfill certain mechanical/structural and electrical requirements. In order to meet these requirements and to guarantee high mechanical strength and good electrical conductivity within the joints, seam welds must exhibit homogenous material properties (e.g. no formation of unspecified alloys due to the high temperatures during the welding process) as well as a structure without defects and elevated or scalloped regions at the surface. These criteria must be inspected after welding to ensure high quality welds. Unfortunately, common NDT methods for weld inspection have certain disadvantages which prevent their application as an inline method for large scale production environments. Inspection of welds usually incorporates a set of NDT methods that are frequently used [12]. In the following paragraphs, the methods which are most tightly connected to the topic presented here, are shortly discussed. Those include computer tomography [4], ultrasonic testing [6] and thermography [26]. Eddy current measurement [5] is the method which will be discussed in detail throughout this publication. Computer tomography (CT) [4] is a highly accurate technique which produces 3D images of the inspected weld, allowing resolution down to the µm range. However, since the technique is very complex, the instru-ments are relatively expensive and large, and the measurement time is long compared to other NDT methods. Furthermore, the technique can hardly distinguish local changes in conductivity due to different alloys which may develop during the welding process. Therefore, CT is not suitable for inline weld characterization. Ultrasonic testing [6] is based on the different propagation of soundwaves in different materials and is often used in weld control (e.g. [18,29,15,2]). However, ultrasonic testing usually incorporates a coupling medium or direct contact to the sample. An application of a coupling medium on every weld in a large-scale production may soak into the cell stack and requires a further cleaning step, which makes the method uneconomic. Flash thermography [26] uses an intense flash of light to temporarily heat the sample. The relaxation to thermal equilibrium is recorded through an infrared camera system, which reveals the heat propagation through the sample and allows to derive information of the weld such as the local electric conductivity. However, conducting reproducible measurements requires the sample to be in thermal equilibrium at the same, well defined temperature, which is potentially difficult to obtain in industrial production with short cycles times. Furthermore, flash thermography measurements are restricted to the sample surface and deeper-lying defects may not be detected. Eddy current measurement (ECM) [5] is usually performed in reflection geometry in which the coil producing the magnetic field and the coil detecting the response of the sample are located on the same side. Since the so-called skin effect limits the penetration depth of eddy currents (depending on frequency of the magnetic field and material properties of the sample), this setup is often used for a weld surface investigation with a penetration depth in the range of µm to mm. However, if the sample thickness is in the range of the penetration depth of the eddy currents, one may alternatively use a transmission geometry to gather in-depth information about the sample. In this geometry, both sensor coils are located on opposite sides of the sample in a fixed distance. This approach is well suitable for battery cell weld control since it is of low cost and short measurement time. Overall, these NDT methods address structural and electrical properties differently, while some techniques such as CT reveal a deeper insight into the structural properties of the weld and can detect even very small defects. Other techniques such as thermography or ECM allow further characterization of welds based on physical features. Drawing conclusions about electrical properties of welds based on methods for structural characterization such as CT is only possible to a limited ex-  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65 tend. For example, CT measurements show differences in material density within a weld but do not necessarily indicate transformed alloys which may have different electrical properties. Furthermore, calculating the electric properties from the structural information is very complex, even when the material composition throughout the weld is well known. In contrast, measurement techniques which are based on electric transport are expected to deliver not only information about electrical and thermal properties, but also about structual properties, since weld defects such as holes or pores limit electrical current and thermal flow. Consequently, a measurement technique based on electrical properties is expected to reveal deeper insights into the weld properties and quality parameters. For this reason, ECM in transmission setup appears to be the most promising method for inline inspection of battery cell welds. However, the transmission technique is rarely used in NDT since the geometry of most samples impede its use. Consequently, transmission setup is not well documented in literature. For example, a detailed impedance plane for different materials matching sensor signals to known defect types, as it is known for reflection ECM setups, does not exist. Thus, the evaluation of the eddy current spectra measured in transmission geometry and the identification of the critical parameters cannot be achieved by comparing the spectra to data from literature. Thus, it is necessary to perform reference measurements using a well-known technique (e.g. CT) and to identify the signatures from the different properties in the eddy current spectra. Thereby it is possible to determine the significance of the eddy current data compared to the reference method and to estimate its suitability for the special measurement task. The identification of the different signatures may be performed manually or using a data analytics approach, for example deep learning.

Related work
The evaluation of ECM data for NDT using machine learning techniques has already drawn a lot attention in the research community. However, most of the published approaches focus on the pure detection or categorical classification of defects in generic metal samples [8,9,23,30]. These approaches usually rely on specific inherent methods for feature extraction which must be tuned individually for the respective application. In a more generalizable approach, Zhu et al [31] show that convolutional neural networks (CNN) (a class of artificial neural network (ANN), especially designed for image processing) are capable of extracting features on their own and performing a suitable classification of fractions of a weld sample into two classes indicating the presence or absence of defects with nearly perfect accuracy. Only a few approaches focus on a detailed characterization of the defects. Bernieri et al [3] aim at reconstructing the depth, length and height of defects based on the peak position and intensity obtained from ECM. Assuming a two-dimensional rectangular defect shape, they use a simulation model of Albanese et al [1] to artificially generate ECM based on defect size and location. Although a trained Support Vector Regressor (SVR) achieved an acceptable reconstruction of lateral characteristics, the authors concluded that the performance for depth and height characterization needs to be improved. Rosado et al [21] propose a method for estimating the width and depth of profile cracks running along the sample surface. It relies on a non-linear Gaussian fit to extract low dimensional features out of the ECM, requiring a suitable estimate of initial parameters for convergence and an ANN trained on synthetic data. Although, the estimation on artificially generated test data achieves a sufficient error, particularly the width estimation for measured samples ranging outside training set range is insufficient. In the context of NDT for weld inspection, only one identified approach addresses the evaluation of ECM data using machine learning techniques: Rao et al [19] use an ANN with manually derived ECM features to estimate the depth of consciously machined surfaces notches. Additionally, the ANN can be taught to distinguish between disturbances and defect signals in ECM data. Furthermore, connecting an EC measurement instrument to the trained ANN enabled continuously evaluation of eddy current tested surface notches in production. In summary, none of the identified approaches can detect, classify and characterize defects within seam welds in sufficient detail in a generalizable manner. Furthermore, all publications use ECM in a reflection setup and consequently cannot contribute the evaluation of ECM data acquired in a transmission setup. This limits the proposed approaches to the evaluation of surface defects. Moreover, the identified approaches were all developed with artificially generated samples and not validated with data gathered from a real production environment.

Research demand
First, ECM in transmission setup is potentially a promising method for inline battery cell weld inspection, there 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65 is a strong demand to gain deeper insight into the interpretation of the acquired data. This can be achieved by comparing the ECM with results from established reference methods and by deriving specific ECM signals for identified defects from the reference measurements. These results enable evaluating the potential of ECM in transmission setup. Second, ANNs are a auspicious tool supporting the validation of a NDT for a novel application in manufacturing. Finding a sufficient approximation mapping ECM to corresponding measurements obtained by the reference method, shows the capabilities of deep learning for NDT validation.

Concept of study
The goal of this study is to gain deeper insight into the ECM technique and evaluating it's suitability for weld inspection. This study is part of a broader NDT method development process consisting of six major steps: 1. Task: This process starts with the definition of a specific analysis/characterization task, such as the characterization of a specific type of welds. 2. Sensor principle: Based on the given task, the evaluation of suitable sensor principles results in a selection of sensor types for further examination. 3. Sample measurements: The selected sensors and a reference method are used for the generation of representative sample measurements. 4. Data preparation and analysis: The prepared sample measurement data gives insight about the contained information acquired from the measurement methods. 5. Comparison: The derived insight from the sample data can be used for comparing the results acquired by the new NDT method with the results from the reference method. 6. Conclusion: The comparison enables the conclusion about the suitability of the new NDT method for the given analysis task. This paper focuses on steps 4-6 for the development of an ECM method for inline weld inspection by compar-ing transmission ECM with CT measurements. However, the overall development process is not limited to the presented use case but may also be used as a blueprint of a general approach for developing new NDT methods. The main idea behind this study is using deep learning techniques to approximate CT images from ECM data in order to evaluate how well this is possible. The underlying hypothesis is: If the ECM data contains enough information about the 3D weld seam structure, the creation of artificial CT-images using deep learning should deliver good results. Such visual analystics approach improves the derivation of knowledge in addition to the quantified result evaluation from the machine learning model [13]. Figure 3 illustrates the workflow. First, sample seam welds were manufactured with a laser welding process which is comparable to a mass production application. Second, measurement setups for CT measurements and ECM were established and used to generate sample measurements for all sample welds. Third, the measurement data were prepared and split into data sets for training and testing. Forth, the training data were used to train a ANN which was then used to predict artificial CT images from the ECM test data. Fifth, the results were compared to the respective CT test data so evaluate the performance of the trained ANN. Finally, this evaluation enables to conclude if ECM data can be used to replicate a CT measurement and to acquire similar information about the weld quality as from 3D CT images. Further evaluation of the trained network allows a detailed analysis of the potential and the shortcomings of ECM compared to the reference method (CT) as well as a deeper understanding of the signal structure and the signatures of the different sample weld properties.  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63 64 65

Sample preparation
In this experiment, sample seam welds with a length of 35 mm were produced with an industrial laser welding process. For each sample, 20 copper current collector foils were welded on a nickel-plated copper arrester tab. A total of 100 sample welds was produced with different laser parameter settings (e.g. laser power, laser focus) in order to achieve welds with different quality.

Computer Tomography
CT measurements of the sample welds were performed on a Diondo d5 using an acceleration voltage of 230 kV at 350 µA resulting in a power of 80.5 W. In order to reduce measurement times, a set of 20 samples was measured in each run, scanning a volume of 128 × 128 × 69 mm with a voxel size of 0.063 mm. From this total volume scan, data sets were derived for each individual weld describing the measured values along the x, y and z coordinates of a weld in a 3D array. These data sets can be used to create images showing the CT results, as shown in Figure 4. The black and white color schema in the figure represent the measured intensity indicating areas with less material (white) within the weld.

Eddy current measurment
ECM were performed using a specifically designed transmission sensor which was traversed along the seam weld in equidistant parallel lines with 0.25mm spacing, as illustrated in Figure 5. During one measurement, the sensor collects data points of real and imaginary value every 0.05 mm along its path for an area of 6 × 50 mm. For each sample weld, two measurements were performed with an amplification of 12 and 30 dB respectively, a sensor velocity of 50 mm/s and an eddy current frequency of 65 kHz. As result, each measurement delivers four data sets with measured values along the x and y coordinates of a sample weld: Real part with low amplification, imaginary part with low amplification, real part with high amplification, imaginary part with high amplification. These data sets can be used to create images showing the ECM results, as exemplarily presented in Figure 6.

Data preprocessing
In order to use acquired data in a deep learning model, a preprocessing of the raw ECM and the CT images is necessary. Since a set of 20 welds were scanned in the CT at once, it is necessary to separate the raw data sets into disjoint 3D images (volumes) for each individual weld and to label each image with a unique sample id. Within each of these images, the weld is horizontally aligned using manually generated annotations for    3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65 the arrester tabs of the samples. Afterwards, each CT volume is reduced to two two-dimensional images by calculating the sums of voxel values along the z-and y-axis. This maps the 3D CT images to their xy-and xz-plane, as shown in Figure 7. These planes will be used as CT volume representatives for the following investigations. Scanning multiple welds within one batch in a CT means, that the impact of beam hardening varies for the different samples. This effect is reduced by fitting a third order polynomial along the x-direction to regions beside the actual weld, where a constant material thickness is expected, and normalizing all further lines with those values. Next, individual CT images are manually aligned with their corresponding ECM images according to their defect signals. This is important since the prediction depends on the spatial relationship and model inputs and outputs. For the alignment of each sample, a longitudinal and lateral mask is shifted over the CT image based on fixed sized ECM image. Finally, CT images and ECM images are separately normalized between zero and one according to the global minimum and maximum across all samples. After preprocessing, some samples were excluded from the overall data set due to missing values or impossible manually alignment. The final data set for this study was randomly split into 69 train and 18 test samples, by the ration of 0.8.

Deep learning
In deep learning, multiple interconnected layers of perceptrons, forming ANNs, are used to approximate nonlinear functions. These ANNs can be trained on a set of observations -pairs of known in-and outputs -to predict unseen inputs in the future. Their prediction capability on unseen observations is evaluated on test data which the ANN had not been trained on. The prediction of CT images based on ECM data was handled by a CNN. This type of ANN is designed for images processing, by maintaining the spatial relationships of its input which is important for computer vision tasks such as image classification [14]. Unlike fully connected neural networks, neurons between successive layers in a CNN will only connect if the input neurons are locally arranged. Therefore, weights of a CNN layer are assigned to filters, so called kernels, extracting feature maps out of the input. More detailed information about CNNs can be found in literature (e.g. Goodfellow et al [11]). The advantage of CNNs over traditional feature extraction methods, like Canny and Sobel filter, is that kernel weights are trainable based on a given data set.
In this study, the task is to assign every voxel of the stacked ECM image, as shown in Figure 6, a continuous score indicating the material density at the related positions in the CT image. In order to deal with the limited amount of ECM data and corresponding CT images, the U-net model architecture was chosen for CT image prediction since it allows a image segmentation with only few training samples [20]. It was widely applied in manufacturing for the automated analysis of visual inspections [10,7,28,17]. The U-net's bottle neck architecture forces the CNN to extract those features out of the input (ECM), thus it can best reconstruct the desired output (CT image). In order to perform the layer operations, all input ECM and CT images were sized to 256 × 1024 pixels by first order spline interpolation. Furthermore, to encourage a pixel-wise regression rather than classification and to enable higher learning rates, the sum of squared residuals (SSR) determines the gradients during training. For a normalized comparison the mean-squared-error (MSE) is monitored during training and used to evaluate model performance. The number of training samples is increased by cropping the ECM images in four equally sized crops (4 × 256 × 256) towards 276 training samples. Defect pattern in the ECM only have a limited spatial extension and thus neighbouring crops can be processed independently of each other. The crop size was chosen with respect defect size. In addition, the training procedure is divided into the following steps: (1) pre-train the model on cuts until loss converges and (2) fine-tune the model parameters with decreasing learning on full sized images until loss converges. After training, the model can be used as predictor for CT images of seam welds based on ECM data inputs. Figure 8 shows this procedure as part of the study workflow. In order to shift the U-net's prediction capability either on the width or the depth information that is encoded in the ECM, two models with separate sets of trainable parameters have been trained. Using the afore outlined technique, the first model was trained to predict the xyplane and the second model to predict xz-plane based on the same set of ECM data.

Results and discussion
The investigation is structured into two main branches. First, mapping of ECM to corresponding CT images and second, characterization of ECM for defined weld defects from artificial CT images.

Prediction of CT images from ECM
The trained CNN was used to create predictions of CT images from input ECM. Figure 9 exemplarily shows CT image predictions for three different sample welds (samples A43, A88, A42). While the first two images of a set show the original CT image (ground truth) and the prediction of the xy-plane, the latter two images show the ground truth and the prediction of the xz-plane.

General similarity
A first visual comparison of the results for the xy-plane clearly reveals major similarities between the ground truth and the prediction. The material density of the base material (background) is resembled very well and most of the defects shown in the CT image (dark red) can be found in the prediction with similar location, size, shape and intensity. Only smaller, less intense defects, such as those in sample A43 between x = 15 -18 mm, are rarely represented in the prediction. Moreover, the original CT images and the predictions for the xz-plane also show obvious similarity. The intensity in areas with particular much and less material is to some extend not optimally reproduced, but the position and size of the defects fit well together in most cases. This first evaluation shows that details about the structural properties of welds may be resembled by the prediction with considerably more details compared to the first visual inspection of ECM results. This clearly underlines that more information is present in the ECM as expected at first sight, which can only be extracted by detailed analysis.
A quantitative evaluation of the prediction performance for all samples in the test data set based on the individual mean squared errors (MSE) is presented in Figure 10. Overall, the MSE for xy-and xz-planes is fairly small in the range of 10 −3 , supporting the former findings of a high prediction quality. The MSE of the xyplanes (3.471 · 10 −3 ), however, is considerably smaller (better) than the MSE for the xz-planes (6.39 · 10 −3 ). A possible explanation is that the xy-features are directly encoded in the ECM whereas the xz-features are indirectly encoded and must be extracted implicitly out of the ECM. However, xz-planes achieving MSEs comparable or even better than xy-planes for some samples indicate that depth information is encoded in the ECM (as described e.g. in [5]) and could be extracted using the presented technique. The large outlying MSE for samples A1, A21 and A80 may by caused by defect characteristics which occur in the test data set but are underrepresented in the training data set. This issue might be solved, if more training samples are acquired and defect characteristics in the train and test are equally distributed, which would presumably further improve the prediction quality for both planes. Thus, an enhanced prediction of the xz-features may require a more complex model and a larger data set for training.

Defect location and orientation
In addition to the overall similarity of ground truth and prediction, it is relevant to evaluate if location and orientation of defects are correctly approximated by the CNN. For this purpose, the location of each defect is considered as the center of each visible defect within an image regarding the respective axis. To do so, the locations of individual defects are determined with the following approach: 1. Cutting of predicted and ground truth CT image into equally sized images along the x-axis 2. Checking whether the ground truth cut contains a defect 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63 64 65  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63 64 65  This technique was applied to all test samples to determine the defect centers as well as the prediction errors obtained. Figure 12 presents the predicted defect centers with respect to their ground truth in terms of a multivariate kernel density estimation (KDE) for all axes. Thereby, darker colors indicate higher values of the calculated two-dimensional probability density function (PDF). For the x-and y-axis the PDF centers are the located on their optimal lines. The red line indicates the average defect center determined by the train set. Whereas the two approximated centers of the PDF for the z-axis are slightly shifted toward their optima, since depth information is implicitly encoded in the ECM making it harder for the CNN to extract the required features. However, it should be mentioned, that the valid prediction of the defect position regarding the z-axis may not necessarily only be based on the ECM. It may furthermore be supported by regular patterns in the defect depth along the welds, which were identified by the CNN during the training. A detailed investigation of this behavior will be discussed in further publications.
Overall, the predicted defect centers align very well with their ground truth values. These results indicate that not only lateral information of defects is encoded in the ECM but also depth information, which is not visible at the first sight.

Defect size
In addition to defect location, defect size is an important metric for the evaluation of seam weld quality. To answer the question, if ECM data allows determining the correct defect size, the defect size from the generated CT images is compared to the size of the same defect shown in the corresponding CT image (ground truth). For this purpose, the actual defects in the xy-plane of the CT images are identified and isolated by determining their contours with the marching squares algorithm [16]. These isolated defects are expanded to rectangular cuts of the original CT image for each of which a corresponding cut is created from the predicted CT images. Both cuts are transformed to binary masks using a defined threshold. Values above the threshold indi -1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63 64 65 cate pixel covering a defect. The size of the defects is calculated by counting the pixels of the defect masks. Figure 13 shows an exemplary defect in the ground truth (right) and its counterpart in the prediction (left). The technique for defect characterization was applied to all weld samples to determine the relative error between the actual and predicted defect sizes. The error is greater than one if the predicted defect size is larger compared to the actual defect size, and vice versa. Figure 14 shows a plot of all calculated relative errors, sorted by the ground truth defect size. In general, the defect size can be derived from the ECM with reasonable small relative error, if the defect size is above 0.5 mm 2 . However, below this defect size, the relative error increases for smaller defects. This can either be explained by a limited resolution of the ECM and thereby reduced sensitivity for defects below a certain size and intensity or by limitations of the model for minor features, for example due to an insufficient number of training samples.

Inverse model evaluation
In this study, so far, ECM data was used to predict corresponding CT images in order to validate the suitability of ECM for weld inspection. In a next step, to gain further understanding of the relations between defect patterns and ECM data, an inverse approach was used to predict ECM data for a given CT image. More specifically, another CNN was trained to predict ECM raw data from a corresponding input original CT image. Figure 15 shows exemplary results (from the test data set) generated by the inverse model for a sample weld.
The top of the figure shows the xy-plane of the original CT image and the cut for which the results are presented in the plot below. The plot shows the predicted ECM data (solid lines) for real and imaginary part as well as the measured ECM data (dashed lines). It also shows the transformed pixel values for the cut through the 2D-CT image (grey line  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63 64 65  artificially created CT images containing defects with different size and intensity were used to predict the corresponding ECM. In the artificial CT images, defects are represented by uniform colored ellipses with smooth edges (blurred using a Gaussian filter) and different color intensity in front of a uniform colored background. Figure 16 presents the evaluation of predicted ECM pattern for defects with different size and intensities. It can be observed that the predicted ECM signature for a defect shows a double-peak structure, as expected from the measurements presented above, confirming the general validity of the model. For increasing defect sizes, the amplitude of the defect signature increases for the real part and decreases for the imaginary part of the ECM prediction. Furthermore, the distance between the two peaks of a double-peak increases for both signals. Increasing defect intensity results in an increase of amplitude and peak distance of the signal's real part, whereas the amplitude and the peak distance are slightly decreasing for the imaginary part. Moreover, in contrast to the defect size, the intensity has no effect on the peak distance, neither on the real nor on the imaginary part. This findings are quantified in Figure 17 and 18. They enable a distinct characterization of defects. In general, both defect characteristics, size and intensity, of the weld seam can be distinguished in the ECM defect signal by the ratio of their real and imaginary part.
More specifically, the achievable construction accuracy, depends on quality and amount of sample data available for the training of the convolutional neural network (CNN). In this study, the CNN allowed a precise construction of the xy-plane of the corresponding CT image regarding defect location, size and shape. The obtained precision for the xz-plane is only moderate but allows to derive simple defect characteristics, such as center of mass, within an acceptable tolerance range.
A training with a greater model size as well as more and diverse weld samples might overcome the limited accuracy of xz-planes. In addition, the inverse model helps to get further insight into the relations between ECM signals and defect properties, although the inverse modelling is challenging due to the implicit feature encoding coupled with the high dimensional output space of the inverse model. Overall, the obtained results prove that the ECM data acquired from a transmission sensor contains sufficient information about the weld properties to replicate the CT reference method. This is especially promising since CT is not suitable as a method for 100% non-destructive inline weld inspection whereas ECM can be set up for exactly this purpose. Consequently, ECM can be integrated in large-scale battery cell manufacturing as a quality control method for seam welds inspection. In order to enrich the capabilities of the developed eddy current transmission sensor, future work will focus on the prediction of certain quality parameters from ECM data by using machine learning approaches. This will improve the weld inspection in battery cell manufacturing as well as the general understanding of the ECM signals.

Funding
Not applicable.

Conflicts of interest/Competing interests
Not applicable.

Availability of data and material
Data is not publically available. Reprensentative sample data is shown in the article.

Code availability
Custom code created in python using the deep learning library Keras. Code is not publically available.