A novel AE algorithm-based approach for the detection of cracks in spot welding in view of online monitoring: case study

The detection of cracks in spot welding is a major issue especially online. This paper deals with this topic using acoustic emission monitoring. It proposes an approach based on Shannon entropy with a novel criterion that allows increasing the detection sensitivity. A data-based model is built, coded, and then applied on acoustic emission signals. The obtained crack detection results are satisfactory. The cracks are revealed using fluorescent dye penetrant, which enables validating the method. A flowchart of whole the proposed approach is described so that practitioners can benefit from the authors experience, towards successful implementation in laboratory as well as in production line. The current approach is applied on resistance spot welding as a case of study, but it could be applicable in nonstationary environment such as other kinds of spot welding, and more hopefully for other manufacturing processes.


Introduction
Resistance spot welding (RSW) is widely used to join sheet metals in various fields such as automotive industry. A typical steel body-in-white contains nearly 5000 resistance spot welds [1]. The main steels that are used are either uncoated or zinc coated. The latter is used in body applications thanks to its improved corrosion resistance. However, due to its lower melting point (less than the Fe base metal on the surface), it undergoes liquid metal embrittlement (LME) [2], which can impact severely the quality of the spot weld. Therefore, for safety as well as product quality concerns, it is important to detect it. Detection of this kind of cracks should be achieved automatically in order to save time and cost. Since nearly all of the RSW joints today are produced by robots, it is of interest to achieve online monitoring (i.e., in production and so under time constraints) of the RSW process in order to detect the said cracks.
Acoustic emission nondestructive technique is well adapted to reach this aim. Actually, during the spot-welding process, a mechanical wave is generated at each spot. It propagates in the sheets under welding as well as in the electrode, as it is schematized in Figure 1. The wave is emitted by the spot itself, due to its phase transformation from solid to pasty state (melting, coalescence, and cooling). Hence, if an acoustic sensor is placed on one among the sheets to be jointed or on one electrode, it can catch the generated wave. This mechanical wave is then converted to an electrical signal, which will be acquired by a devoted electronic equipment, and recorded for further analysis if needed. That is the principle of acoustic emission technique.
The problem here is that the AE signal does not contain only the wave created by the spot weld formation but also those generated by the different stages of the RSW process (i.e., the set down of the electrodes, the squeeze, the current flow, the holding time or forging, and the liftoff). In some cases, these stages can be easily identified in the AE acquired signal [3,4]. If the crack generates a separated echo from those of the different stages of the process, its detection is a trivial task. This is an ideal case! In practice, the AE signal can be continuous, and the possible echoes related to these phenomena are not so distinguishable. As an alternative, the crack detection could be based on the analysis of specific AE features such as hit counts, energy, rise time, etc. [5,6]. However, these features are generally effective when the recorded acoustical activities are due to mechanical deformation of the structure. During spot welding, a high acoustical activity of the welding process can be recorded. This activity is dependent on many factors, which are not necessary stable during whole the process: welding current, welding time, holding time, electrode force, fit-up between the sheets, electrode tip design, the electrical resistivity of the sheets, sheets thickness and materials, sheets surface conditions, etc. In addition, during the welding time, the current and the water flow can generate noise, which is why the frequency band of the acquisition system must be adapted. Also, the wave energy provided by the welding process can be very high comparatively to that induced by cracks. This will lead to mask the signature of crack in the acquired signal. All these factors make the detection of crack signature a very challenging task. Indeed, if there are some weak components in the signal, they will be hidden by the largest ones. Shannon entropy [7] is suitable for revealing low magnitudes. This feature does not exploit explicitly the instantaneous amplitudes of a given signal. This will help to overcome the instability of the acoustical activity generated by the welding process.
Shannon's entropy, associated for a long time with the telecommunication domain, has been extended recently to NDT applications, including AE. For example, Runar et al. [8] investigated the use of the entropy of AE signals by comparing it to AE hit counts evolution. Chai et al. [9] confirmed that the entropy of AE signals can be used to discriminate different damage stages in a steel plate subjected to fatigue crack growth test. Another way of using entropy with AE is to calculate it over the cumulative number of counts [10,11]. The results showed that entropy is effective in detecting fatigue fracture initiation and propagation in metal plates. This technique was also applied to detect crack in rail wheel by Zhang et al. [12]. In their study, the detection of crack is based on a visual analysis of the sliding entropy result. In the present work, since the detection of crack should be automatic, we have proposed a feature derived from the result of the sliding entropy.
The next section is devoted to a mathematical formulation of the model developed to detect cracks in spot welds and to describe the methodology of defect detection basing on the novel feature. In this section, a didactic example is presented to illustrate the added value of this feature, in order to help the reader understanding easily the detection of spot weld cracks in real conditions. Section 3 is dedicated to the experimental setup and material. Section 4 presents the collected AE measurements, the obtained particle inspection technique images. Section 5 deals with analysis and discussion of the obtained results, such as defect detectability. Finally, Section 6 is devoted to the main concluding remarks of this current work and presents some outlooks.

Classical statistical features
A statistical feature is a single-valued quantitative characterization of a signal measurement and can be constructed using various statistical and signal processing techniques. The term feature can be found in literature as damage index or criterion [13]. A change in the acoustical response under two different conditions can be represented in terms of the discrepancy of the feature computed under the two different conditions. Therefore, a feature is a change detector. A good feature must be sensitive to damage, while unaffected by environmental and operational variations such as machine noise. Feature extraction can be performed in various domains such as time, frequency, and joint time-frequency. In the time domain, the most frequently used features in literature, which are maximum amplitude (MA), root mean square (RMS) [14], signal strength (SS) [15], mean (MN), standard deviation (σ) [16], coefficient of dissimilarity (∁) [17], kurtosis (K), and skewness (S) are extracted from each acquired signal. The mathematical expressions of these eight damage indices are described below, from top to bottom, respectively: where s is the acquired signal and N the number of samples a n . Bold letter denotes a vector.
where b is the baseline signal, which consists of N samples b n . If the first signal is considered as baseline, each one among the other acquired signals is s in this equation.
The units of MA, RMS, SS, MN, and σ are volt. The coef-ficients∁, K, and S are however dimensionless. The features MA, MN, and σ are very common features in statistics. The SS is often used as feature for AE signals. It is defined as the integral of the rectified voltage signal over the duration of the AE signal. The RMS measures the energy of the AE signal. Hence, if the energy of the AE signal varies due to the presence of damage, this variation will be seen in the RMS values. The feature ∁ is the drop in the correlation coefficient between the current signal and the baseline. Actually, when the signal s is identic to the baseline b, in Eq. (6), the correlation coefficient reaches unity. That is to say that the higher the similarity between two signals, the closer to unity is this coefficient. Kurtosis and Skewness measures some characteristics of the data distribution such as symmetry [18].
These features were tested in the current study. However, none of them was able to discriminate between healthy and damaged spots. To tackle this issue, a feature based on Shannon's entropy is proposed. Further detail is provided in the following.

Shannon's entropy-based feature
Shannon's entropy, which was introduced by Claude Shannon in 1948, is a measure of the information contained in a set of data. It describes the degree of surprise or uncertainty present in a data distribution [7], such as electrical signals in the current study. Actually, in N samples (or instantaneous amplitudes a n ) of a given signal s, redundant information can be present (i.e., some a n are identic to each other). If it is the case, the degree of surprise becomes low, and the higher the redundancy, the lower the surprise is. This surprise, which is generally too weak and should hold the information for which we look, is buried in the redundant information. Shannon's entropy allows extracting it through the calculation of the probability of the existence of a n , which can be expressed as follows: where the index j refers to the j th event. An event is all the instantaneous amplitudes a n that are equal to each other. From the last equation, if N decreases, the probability increases. To do so, the signal can be divided in some sub-signals, but this only makes sense if the "surprise" is local.
The combination of these probabilities of the events permits calculating the entropy of the signal s. More explicitly, it can be expressed as follows: where M is the total number of the events contained in the signal s.
For illustration, let us consider a didactic example in which three simple signals s 1 , s 2 , and s 3 of 100 samples where s 2 is a redundant version of s 1 (i.e., s 1 and s 2 have the same nonzero samples, there is only a variation in the amplitude) and s 3 is similar to s 2 but it contains a novel event where a new sample shows a small amplitude value. These signals are expressed analytically as following, and they are plotted in Figure 2 (left).
To ensure a fair comparison between the entropy-based feature and the classical statistical features, all these features were calculated for the three signals. The results are presented in Table 1. These results show that all statistical features are sensitive to the signal redundancy. Actually, the value of these features for the signals s 1 and s 2 are different while the entropy-based feature remains constant for the two signals. Moreover, the entropy of signal s 3 is different from that of the signals s 1 and s 2 . Thus, the change observed in the entropy of signal s 3 is due to the presence of the new event ("surprise"). As conclusion, the entropy is the only feature which is robust to signal redundancy and sensitive to "surprise" detection.
Since the "surprise" is local (precisely at t = 81), subdividing each signal into sub-signals and calculating the entropy for each one can be helpful. To verify this, two cases are studied where in the 1st one the window is equal to half of the signal duration and in the second one, the window is 1/10 of the signal duration. The obtained results are shown in Figure 2 (right). From this figure, it is evident that in each window, the entropy is the same for the three signals except for the sub-signal that includes the "surprise." Also, the shorter the window, the higher the entropy is. Moreover, windowing the signal provides another advantage, which is the temporality of the event; in other words, localizing the event in time, which means knowing when the event had occurred exactly. This can offer the possibility to understand better of the welding process and hopefully for the determining the root cause in order to act efficiently.
This technique is to be generalized to the acoustic signals acquired in this study. As aforementioned, the crack occurrence would generate a very small ultrasound. In order to maximize the chances to catch it, the sampling frequency should be relatively high (i.e., increasing the bits). This makes the recorded AE signal during the process of welding relatively long (in terms of samples number). Hence, it is of interest to calculate the entropy on a sliding window over the recorded signal. After that, the root mean square of the entropy values is proposed as a crack sensitive feature in the present work. It can be expressed as follows: where W is the number of windows that can be calculated via this formula: where H and q are the width of the window and the sliding step, respectively. M ω is a variable that may change from a window to another one, and p ω j is the probability of the j th event of the ω th window.

Methodology
The proposed methodology of crack detection is based on novelty detection method [19]. The methodology mainly  consists of three sequential steps, namely, training, threshold definition, and testing. In the first step, the monitoring of a given number of healthy spot welds is to be achieved, which amounts recording a signal at each spot weld. To be sure that no cracks can be generated in the welded spots, the Zn layer was removed before welding. This step is crucial for determining the crack index (said also criterion or signal feature). The training set must be representative of the actual welding parameters as well as the material of the sheets being assembled, and the welding machine characteristics. Once the signals are collected, the features presented previously should be extracted.
The second step is to establish a threshold, which will enable the automatic crack detection. The one adopted in this study is expressed by the following formula [20].
where μ is the mean of the features extracted from the collected signals in the training period, and σ, its standard deviation. Note that the Eq. (16) is only valid for normal distribution data sets. If the data does not follow the said distribution, the current threshold may not be suitable. "An appropriate transformation of a data set can often yield a data set that does follow approximately a normal distribution. This increases the applicability and usefulness of statistical techniques based on the normality assumption. The Box-Cox transformation is a particularly useful family of transformations," as it is suggested in reference [21]. A normality test will be performed later to prove whether the data follows the normal distribution or not. Consequently, a signal is considered as "novel" (i.e., it does not belong to the healthy spot class) when its calculated feature (noted SPE) falls below the low threshold η 1 or exceeds the high threshold η 2 . Moreover, another simple way to know immediately if the new welded spot is cracked or not is the gap between its feature and those of the healthy ones. Mathematically, this gap can be expressed as follows: where F is the proposed novel feature based on the sliding entropy, s c is the signal of the current spot, the index k refers to a healthy spot (its signal is s h ) among the total welded spots K. This is based on the a priori that the said feature increases when the spot weld is damaged.
In the third step, at each spot, a signal (will be qualified hereafter by current or new) is to be recorded and the selected feature is to be extracted from it. This feature is then compared to the upper and lower thresholds. An alarm can then be triggered if there is need. To avoid disturbing the production chain, the result of all the spot welds, for a given equipment such as car body, can be gathered in one digital table instead of triggering an alarm. Of course, the testing stage should be carried out with the same welding parameters of the previous step. In the experiments achieved in the current study, to generate cracks, the presence of Zn layer is combined with an extended welding time.
The various steps of the current methodology are gathered in Figure 3, in which the features can be those presented in Section 2.1 (standard features) or in Section 2.2 (the novel one).

Experimental setup and validation
The aim of the experiments was to weld a hat profile sheet to a flat sheet. Two specimens were assembled: one will be used to test the method and another one for validation. They will be referred by specimen #1 and specimen #2, respectively. For both, the materials are DP1200 for the hat profile and Mild Steel for the flat sheet. The length*width of the sheets are 300*106 mm 2 , and the thicknesses are 1.4 mm for DP1200 and 2 mm for Mild Steel.
In some regions, the zinc material that was used to galvanize the steel was removed before welding, by means of chemical etching using 3% HNO3. This is because the Zn is the main cause of cracks if it is not the unique. Hence, doing this allows obtaining healthy spot welds. In total, for each specimen, 14 spot welds were performed: 7 at each side. Among them, seven spots were achieved in the region where the Zn has been removed.
The experimental setup, which consists of a welding machine, an acoustic emission system, and a synchronization equipment, is shown in Figure 4. The welding was conducted with a Bosch Rexroth RSW machine. The clamping force is generated electrically with 1000 Hz continuous current. The other welding parameters are gathered in Table 2.
During all the experiments, acoustic emission sensors were mounted on the electrode holder using tape bands with silicone grease as a couplant. The role of the couplant is to improve the sensor sensitivity. All signals were amplified by 34 dB AE using an AEP3N preamplifier and were recorded with 714 kHz sampling rate. A threshold of 40 dB AE and a bandpass filter from 50 to 350 kHz were used. An electronic triggering system was developed for these experiments to synchronize the AE signal being acquired with the electric current flow. It uses a Hall-effect sensor to detect the passage of the current and it delivers 5 V to the AE system, providing then the time reference. Therefore, only the AE signal corresponding to the welding process is captured (i.e., welding time, holding time, and liftoff).
In order to validate AE results and confirm or infirm the presence of LME crack, Fluorescent Magnetic Particle Inspection (MPI) has been performed [22]. The obtained results are shown in Figure 5. The pictures bordered by green line correspond to the spot welds where Zn was removed before welding while those with red line correspond to the ones with Zn. As expected, spot welds without Zn are healthy while those obtained with Zn (especially due to an extend welding time) have LME cracks. Concerning the type of these cracks, researchers in the field classify cracks into three categories: type A, B, and C [23]. Type A refers to surface cracks located in the center of the area in contact with the electrode. Type B is also surface cracks but located outside the area in contact with the electrode. Finally, type C category is internal cracks formed in the interface of the two sheets. It can be seen that LME cracks obtained in these experiments are type A and B. Type A cracks are small with a length not exceeding 5 mm and are mainly radial. Type B cracks are mainly circular located near the indentation area with a length that can exceed 10 mm, which the case of spots n°8, 10, 11, 12, and 14.

Collected data
The AE data, collected from the specimen #1, are gathered and plotted in Figure 6. At the left-hand side is shown an example of an acquired time signal (blue curve) superimposed with the electric current curve (red) and the force curve (black). The recording duration is 2.8 s, which was kept the same for each spot weld. The acoustic signal is triggered at the initiation of the current flow through a Hall-effect sensor. Thanks to this trigging, the welding phases (welding time, holding time, and liftoff) are covered by the acoustic signal, as it is illustrated in the same figure. Unlike the works of Joly [3] and Luo [4], no phase can be identified! In other words, the signal is continuous, and no echo can be distinguished from the rest. In addition, the energy delivered by the welding process is very high, which should hide the possible signal generated by the LME crack.
The image, shown in the middle, is a top view of a 3D representation of the amplitudes of the juxtaposed signals versus the propagation time (Y-axis) and the number of the welded spots (X-axis). The abscissa axis corresponds also to the number of the collected signals since each spot weld generates one acoustic signal. A color bar that helps reading this image is presented at the right-hand side. The redder the color is, the higher the amplitude absolute, and the darker the blue color is, the nearer to zero the amplitude.
The main advantage of such a visualization is to provide a global view that allows an immediate reading of the possible difference between the signals, and more particularly between those generated by the healthy spots and those produced by the damaged ones. As it can be seen, on the one hand, there is significant variability between the different signals (no signal is equal to each other), arguing hence the nonstationary nature of the environment in which the data are collected. This is exactly  what it was expected, due to the current, force, electrode/ specimen contact, specimen surface flatness variabilities, etc.
On the other hand, there is huge similarities between both signal classes: healthy and damaged spots. That is to say there is no patterns that can help distinguishing between the two classes. The possible changes that might be caused by the cracks should be too small to be seen with the naked eye, and therefore, the crack detection cannot be enabled from such a data display.
In addition to the time domain, the frequency, and the joint time-frequency domains were investigated for whole the collected data (i.e., 14 signals). Among them, four results are presented in Figure 7, where two correspond to the healthy spots 3 and 5, and the others to damaged ones 9 and 11. For each spot weld, the time signal, its spectrum (i.e., frequency content), and its timefrequency transform are shown. The time signals are among those served to build the 3D presentation shown in Figure 6.
The spectra are calculated via the fast Fourier transform [24]. The time-frequency representation is somewhat based on slicing the signal being processed. The idea behind using this kind of representation is to check if there is any local information in the frequency domain that would be related to the cracks occurrence. The time-frequency diagram can be obtained via some transforms such as short time Fourier transform and continuous wavelet transform. In the current work, the later technique was used, with Complex Morlet mother wavelet. This kind of wavelet is commonly used for ultrasonic guided waves signals [25,26]. It helps to get high time-frequency resolution [27]. It can be mathematically expressed by the following equation. Figure 8 shows from left to right its real part and the joint frequency time of this part.
where f 0 is the central frequency, τ, a time-decay parameter and t, time, i, the imaginary number such that i 2 = -1.
As it can be seen in the detailed views of the Figure 7, the shapes of the time signals are too different from each other. This remark is valid for their spectra as well as for their joint time frequency. Unfortunately, there is no located frequency component that can be seen in the case of the cracked spots and not the other ones and vice versa. This means that the frequency content is also sensitive to the nonstationarity of the environment, and this occurred during all the recording duration. It confirms also that the possible influence on the collected data of the crack occurrence is too weak so that it cannot be seen in any domain. It can be therefore concluded from these results that neither the frequency domain nor the timefrequency domain is able to discriminate between the healthy spots and the damaged ones. This example justifies the limitations of the standard signal processing techniques with regard to the current problem and argues the need to investigate further ones.

Analysis based on classical signal features
The values of the classical features expressed in Section 2.1 and the associated thresholds η 1 and η 2 are plotted in Figure 9. The verification of the distribution normality of the data is reported in "Appendix." The green bars correspond to the healthy welds while the red ones correspond to those cracked. As it can be seen, all the tested statistical features fail in discriminating between the healthy spots and the damaged ones. Overall, a variability of these features can be remarked, which is consistent with the results discussed previously in Sections 2.2 and 3.2. In addition, no gap between the green bars and the red bars exists. Most of them indicate a value of the damaged spots between the lower the upper thresholds defined in Section 2.3 except the features Maximum, Kurtosis, and Skewness, which indicate the spot n°13 as damaged. This is evidently an inefficient result of classification as 6 spots among 7 were wrongly classified.

Analysis based on Shannon entropy criterion
To deal with the issue encountered in the previous subsection, the proposed novel feature described in Section 2.2 is calculated. The methodology of the calculation of this feature is described in the flowchart presented in Figure 10. Explicitly, the calculation begins by defining the window width H and the sliding step q. Then, the following steps are executed: Fig. 5 Validation of crack presence with Fluorescent MPI. Healthy spots framed in green (spots n°1-7) and spots with LME cracks framed in red (spots n°8- 14) 1. Calculate the entropy E ω of the portion of the signal delimited by the window H, (i.e., apply Eq. (10) for the ω th window H with 1 ≤ ω ≤ W). 2. The window H slides by the step q. If the sliding window reaches the end of the signal, then go to step 3, otherwise repeat from step 1. 3. The proposed entropy-based feature F is given by calculating the root mean square of the vector of the entropy E ω .
This procedure is to be repeated for all the acquired signals (i.e., 14 for each specimen).
For each spot, the vector of sliding entropy E = E ω , 1 ≤ ω ≤ W is hence obtained. Figure 11(b) and (c) presents an example of a healthy and a cracked spot, respectively. In order to have a global view and rends the analysis easier even visually, the vectors E of the 14 spots are juxtaposed and plotted. This offers another presentation option where the data is displayed as a top view, as in Figure 6. The obtained result is presented in Figure 11(c), which is a cartography with spots number in abscissa axis and time in ordinate axis. The color represents the gated sliding entropy amplitude at each window. In this figure, the left part of the image corresponds to the healthy spots (i.e., from spot n°1 to spot n°7). A similar color distribution of the healthy state can be remarked. This color uniformity can be explained by the fact that there is no "surprise" effect in the collected signals from the healthy spots. This can be considered as a signature of healthy state characteristic of welding time and holding time. By comparing this signature to that of the cracked spots (i.e., from n°8 to n°14), a difference between the two states can be seen. The time window at which this difference appears could be related to the LME occurrence time. The crack initiation begins near 800 ms and continues propagating during the holding time. By comparing the figures (b) and (c), the difference in this time range is more highlighted (i.e., the curve of the figure (b) is smoother), except for spots n°2 and n°8. For this specific point, one can remark that the shape of its sliding entropy E is similar to those of the cracked spot after 1.6 s, and in the interval [~0.8 s, 1.6 s], the behavior is somewhat similar to that of the healthy spots. For better precision in the analysis, it is judicious to transform each vector E to a scalar. This is exactly the role of the novel feature F, introduced in Eq. (14). This equation is called, and the corresponding result is shown in Figure 12(a). In order to an idea about the added value of this novel feature, the classic entropy of the each signal is plotted. The result is shown in Figure 12(b).
As it can be remarked in both figures, the result is unfortunately not positive because of the spot n°2. It must be noted that the signals of spots n°1, 2, and 8 have been acquired with an abnormal acoustical activity at the beginning of the welding process, due to splash phenomenon. These signals could lead to false indication of LME crack spots. Therefore, they can handicap the ability of the entropy to discriminate automatically between healthy and damaged spots as it is the case. Therefore, in order to enable an automatic detection of LME spots, these signals should be deleted. To do so, they should be recognized automatically as such. We propose the use of a camera or a microphone to detect the splash since it projects some visible light and undergo an audible specific noise that can be easily distinguished from an ambient noise. Both, camera of microphone, should be accurately synchronized with the spot welding for recording only the right data at the right time, and avoiding then to clutter the monitoring system. Figure 13 shows, from left to right, the results of crack detection using the novel feature and the classical entropy feature without the splashed spots signals. The classical entropy succeeds in discriminating between the healthy and damaged spots. However, the gap between the two types of signals is very small, which jeopardize the damage sensitivity. When using the proposed novel feature, the gap is much higher. It was increased around six times, which argues the real added value of this feature and confirms the idea of the fact that the effect of the crack does not impact all the signal.

Influence of window width
As mentioned in Section 2.2, two parameters can influence the result of the sliding entropy: the window width and the sliding step. The results of different window widths are presented in Figure 14. These results show that when the window width is very small (up to 1.4 ms) comparatively to the signal duration (i.e., 2.5 s), the result of sliding entropy is very noisy. With this window width, it is difficult to discriminate between the healthy and damaged spots. As far as the window width increases, the result of the sliding entropy becomes clearer, and the noise disappears gradually enabling a perfect separation between the healthy and the damaged spots. For very large window width (up to 280 ms), the result is still satisfying but the resolution becomes poor. When the window reaches a value of 700 ms, Fig. 9 Classical statistical features for each spot weld: healthy (green) and cracked (red). The horizontal red dashed lines are the thresholds η 1 and η 2 Fig. 10 Flowchart of the calculation of the feature F given in Eq. (14), for a given signal. The work is to be repeated for each collected signal (i.e., each spot weld) Fig. 11 Sliding entropy for all spots a, sliding entropy of a healthy spot b and sliding entropy of a cracked spot c which represents 25% of the duration of the AE signal, the discrimination ability of the sliding entropy deteriorates.
In order to have a more precise result on the influence of the window width, the proposed novel feature for crack detection was calculated for hundreds of window width from 0.14 to 1400 ms using a logarithmic scale. The gap between the healthy spots and cracked spots, which is illustrated in Figure 14, was also calculated to emphasize the influence of the window width on this gap. The result is presented in Figure 15. Surprisingly, even if the result of the sidling window entropy is noisy when using a small window width as illustrated in Figure 14, the gap between the healthy spots and damaged spots is positive. It can be concluded here that the minimum of the features that correspond to cracked spots is higher than the maximum of those of the healthy spots. As noticed earlier, when the window width increases, the noise in the result of the sliding entropy disappears gradually. This implies a small increase in the gap that remains relatively constant for a large number of windows. Then, at a window of approximately 150 ms, the gap starts to fluctuate. After that, it decreases to a value of almost zero for the last window width (i.e., 1400 ms). Note here that this window is almost the half of the AE signal duration. Hence, a very large window jeopardizes the crack detection ability. In conclusion, a trade-off concerning the window must be found in order obtain an optimal detection.

Influence of sliding step
The sliding step is another parameter which should be studied. To investigate its influence, for an optimal window width of 24 ms, the sliding step was modified from 0.14 to 24 ms. As it can be remarked, the maximum sliding step was taken as the window width. Actually, a larger sliding step will lead to lose of information as some parts of the signals will not be examined. The results are presented in Figure 16. These results show that the sliding step does not have an influence on the sliding entropy. In order to

AE results verification
The second database, built from the specimen #2, was used for the verification of the proposed approach for LME crack detection. This database contains 14 spots as well: 7 spots healthy and the others are damaged. Figure 17(a) is a top view representation of the collected signals. As expected, the analysis of the original signals cannot provide discrimination between the healthy and cracked spots. However, using the proposed approach, which is based on the sliding entropy, a clear separation between the healthy and damaged spots can be noticed, as it can be seen in Figure 17(b). Figure 18 shows the results of cracked spot detection using the novel feature developed in this study and the classical entropy method. As it can be remarked, the classical entropy is unable to detect cracked spots. However, using the novel feature, a gap between the healthy spots and damaged spots can be clearly noticed. This second example confirms the efficiency of the novel feature. Of course, some other cases could be necessary especially real conditions (without removing Zn and with normal welding time) to rule on the reliability of the said feature.

Conclusion
This paper presented a novel method and criterion based on Shannon entropy in order to detect automatically cracks in resistance spot welds using acoustic emission. It has been proven that this method is efficient regarding the limitation of the main classic features usually used as damage index. The main barrier that was lifted using the current novel feature is the nonstationarity of the acquired data, due to the variability of the welding parameters. However, in the current case of study, the healthy state is guaranteed by removing the Zn,  Fig. 15 Influence of the window width on the result of crack detection using the proposed novel feature. The white stripes correspond to the AE signals acquired with abnormal acoustical activity Fig. 16 Results of the influence of the sliding step of the sliding entropy which may not be possible in real word. Before deploying the method, its robustness should be verified regarding two parameters: 1/ real welding time and 2/ calibration (learning step) with the presence of Zn. It can be concluded that although this study has great limitations, it is helpful for crack detection. Moreover, the methodology would be adaptable to other cases, where detecting weak events (or "surprise") in an electrical signal is a concern. Investigations in this direction should be performed to confirm or infirm the transposability of this method and criteria.
Appendix The threshold must be determined in order to ensure automatic detection of cracked spots. The method of the calculation of the threshold proposed, in Eq. (16), assumes that the healthy state data follow a normal distribution. In this case, a normality test could be applied to prove whether the data follow a normal distribution or not. In the literature, different normality tests exist. We have chosen to use Kolmogorov-Smirnov test [28]. It is a statistical hypothesis test, which returns a decision for the null hypothesis that the data in a vector x comes from a standard normal distribution, against the alternative that it does not come from such a distribution. The standard normal distribution is a special case of the normal distribution where the mean is equal to 0 and the variance is equal to 1. To transform a normal data into standard normal data, a process of standardization is applied using the following transformation: where x is the data vector, μ is the mean of the healthy spot data, and σ is the standard deviation of the healthy state data. This transformation was applied on the data used in the current study (i.e., the calculated entropy-based features). After that, Kolmogorov-Smirnov test was used to check whether the transformed data follow a standard normal distribution or not. The result was positive, as it is shown in Figure 19.