A Water Environment-Based Simulated Method for Ultrasonic Testing of Slag Inclusion Weld Defects Based on Improved VMD

The identification of slag inclusion defects in welds is of the utmost importance in guaranteeing the integrity, safety, and prolonged service life of welded structures. Most research focuses on different kinds of weld defects, but branch research on categories of slag inclusion material is limited and critical for safeguarding the quality of engineering and the well-being of personnel. To address this issue, we design a simulated method using ultrasonic testing to identify the inclusion of material categories in austenitic stainless steel. It is based on a simulated experiment in a water environment, and six categories of cubic specimens, including four metallic and two non-metallic materials, are selected to simulate the slag materials of the inclusion defects. Variational mode decomposition optimized by particle swarm optimization is employed for ultrasonic signals denoising. Moreover, the phase spectrum of the denoised signal is utilized to extract the phase characteristic of the echo signal from the water–slag specimen interface. The experimental results show that our method has the characteristics of appropriate decomposition and good denoising performance. Compared with famous signal denoising algorithms, the proposed method extracted the lowest number of intrinsic mode functions from the echo signal with the highest signal-to-noise ratio and lowest normalized cross-correlation among all of the comparative algorithms in signal denoising of weld slag inclusion defects. Finally, the phase spectrum can ascertain whether the slag inclusion is a thicker or thinner medium compared with the weld base material based on the half-wave loss existing or not in the echo signal phase.


Introduction
Austenitic stainless steel is widely preferred by industries and used in media storage, transportation, processing and production, equipment manufacturing, and other industries due to its mechanical properties (such as high tensile strength, good yield strength, and high-temperature strength), outstanding corrosion resistance, and good weldability [1].Currently, welding is fusing metal parts to form a strong bond that can withstand harsh conditions.The quality of the weld is critical to safety and performance, as defects can lead to failures, accidents, and financial losses [2].Weld inspection is an important task in nondestructive testing (NDT), which is necessary to detect weld defects.During the welding process, defects can occur on a weldment, such as porosity, gas pores, longitudinal cracks, lack of penetration, and slag inclusion [3].Slag inclusion in these defects means volume defects not as visible as cracks, incomplete penetration, or incomplete fusion defects, which are called surface defects.
Defect testing of weldments has attracted much attention in recent years.Commonly used weld defect detection methods include eddy current [4], magnetic particle inspection [5], X-ray [6], spectroscopy emission [7], and ultrasonic testing (UT) [8].Ghubade and Kumar [9], in their review work on casting defects and methodologies for quality improvement, provided insight into casting defects and casting quality.Singh et al. [10] proposed an active pulse infrared thermal imaging technology detection method which uses a FlukeTi 32 thermal imaging camera to record the metal casting heating and temperature decay processes.Using the prior knowledge that defect-containing regions have higher temperatures than defect-free regions, defect regions with high thermal concentrations and the size and depth of defects are characterized.Li et al. [11] proposed a frequency band-selecting pulsed eddy current testing (FSPECT) method.Compared with energy equivalent square wave PEC technology, FSPECT responds better and faster to deep defects.The authors of [12] designed an active thermal imaging system with induction heating.By recording the surface temperature with an infrared thermal imaging camera, the entire infrared image sequence is evaluated using a Fourier transform, and the phase image is processed to detect surface cracks.At the same time, the signal distribution around the cracks at different depths is analyzed and calculated to determine the crack depth.Wang et al. [13] designed a digital ray detection system based on charge-coupled devices.The system can receive X-rays with a wider energy range and obtain higher imaging quality.Tkocz et al. [14] designed a low-cost four-channel phased array electromagnetic ultrasonic transducer system.The generated focused ultrasonic beam completed the defect detection experiment on a rough cast steel plate with a thickness of 32 cm.A-scan data showed that the system could detect artificial defects up to a depth of 16 cm.
The research mentioned above primarily focused on the size and depth of internal defects in materials.However, the literature on the different categories of slag inclusion defects is limited.Slag inclusion defects are typically classified as metal or non-metal inclusions.Slag defects arise from multiple factors, including suboptimal welding practices, inadequate preheating, and imprecise control over welding parameters.It is difficult to determine the accuracy of the test results for slag inclusion types since the process is irreversible and destructive to the specimen.The process of producing austenitic stainless steel is highly intricate and demands a controlled production environment.This poses a challenge when it comes to obtaining slag inclusion defect samples with known slag material.Numerical simulated methods based on finite element analysis have attracted attention from many researchers [15,16].This simulation of the ultrasonic testing system could easily design or optimize an ultrasonic testing system by regulating the parameters of the system, which offers a theoretical foundation for detection and reduces detection blindness [17].However, the effectiveness of this simulation approach often tends to be overly ideal.Therefore, we designed a water environment-based experiment for slag inclusion defect detection to address these issues.
Radiographic testing (RT) can be implemented utilizing either X-ray radiation or a gamma-emitting radioactive source [18].Given the pronounced dependence of the X-ray absorption coefficient on the material density, radiographic imaging is particularly well suited for identifying volume defects characterized by an altered mass content, such as slag inclusions or porosity [19].RT offers a more direct and precise determination of the material type of slag inclusions within welds.However, it is limited by the harmful radiation it generates, the complexity of the detection process, and the extended duration of the testing, which preclude its suitability for in situ, real-time detection in industrial environments, such as the scenario of steel structure weld inspection for a building.Compared with the RT method, UT can overcome these disadvantages and is more widely applied in weld inspections due to its safety, portability, in situ and real-time feedback, and low cost.Moreover, UT can test the depth information of a defect.UT is a commonly used method for detecting flaws in solids.It provides precise information about the position and size of defects.Therefore, we chose UT in this paper to detect the inclusion defects.However, ultrasonic signals can be easily scattered by complex factors such as the environment and the object being measured.This often leads to noise in the received echo signal, which can affect the quality and reliability of the measurement.Therefore, denoising is an essential step for removing noise and enhancing the signal.Classical signal denoising algorithms include wavelet transform (WT) [20], empirical mode decomposition (EMD) [21], and its variants such as ensemble EMD (EEMD) [22] and complementary EEMD with adaptive noise (CEEMDAN) [23].EMD series methods may produce mode mixing or cause incomplete signal decomposition and denoising with residual noise in the denoised signal.Variational mode decomposition (VMD) is a new algorithm for decomposing signals into several intrinsic mode functions (IMFs) with different center frequencies to pick out the effective signal [24].It overcomes the problems of endpoint effects and modal aliasing in EMD [25].Compared with other methods, VMD has been proven to yield a better frequency resolution and noise immunity [26].However, it requires manually setting the hyperparameters.To address this issue, researchers have investigated methods for setting parameters automatically.For instance, Hua et al. applied the grasshopper optimization algorithm (GOA) to further fine-tune the parameters in VMD for Lidar signal decomposition [27].Similarly, Qi et al. harnessed the grey wolf optimization (GWO) method to determine the most effective VMD parameters, alongside parallel EMD for Lidar signal noise reduction [28].Additionally, Long et al. made use of particle swarm optimization (PSO) to identify the ideal VMD parameters for filtering out disturbances from ultra-high-frequency partial discharge signals [29].
In the ultrasonic detection of slag inclusion defects in austenitic steel welds, the signal will exhibit a superior signal-to-noise ratio after effective denoising.A Fast Fourier transform (FFT) is performed on the denoised signal to obtain the phase spectrum.In accordance with the principles of wave propagation theory, it is established that mechanical and electromagnetic waves, when encountering an interface with a transition to a denser medium, experience a π phase shift upon reflection.This is in contrast to the situation where they interact with a less dense medium, where no such phase change occurs.This intrinsic relationship between the echo phase and the characteristics of the interface material is invariant across diverse experimental settings and environmental conditions.Consequently, we introduce a novel experimental methodology for the ultrasonic detection of slag inclusion defects in welds, which is based on the simulation of aquatic environments.
In a nutshell, we designed a series of experiments utilizing selected cubic specimens made of various materials immersed in a water-based environment to simulate different material types in slag inclusion defects found in weldments.Specifically, the six selected cubes were composed of different materials, including metallic materials such as iron, copper, aluminum, and magnets, as well as non-metallic materials like wood and resin.The primary objective was to analyze the phase characteristic information of ultrasonic signals and investigate the relationship between phase and slag inclusion materials by utilizing ultrasonic testing in conjunction with an improved VMD denoising method, thereby achieving the classification and detection of slag inclusion defects.
The rest of this paper is organized as follows.The methodology employed in this study is outlined in Section 2; the experiments are shown in Section 3; and the results analysis is discussed in Section 4. Finally, this work is summarized in the Section 5.

VMD 2.1.1. VMD Theory
VMD is a non-recursive variational mode decomposition algorithm showing excellent capacity for processing nonlinear and non-stationary signals which was proposed by Dragomiretskiy [24].It ensures sparsity by limiting the central frequency and bandwidth of each IMF.VMD can avoid issues related to mode mixing and boundary effects, which always exists in EMD, WT, etc.The constrained model is defined as follows: where u k (t) represents the kth IMF, ω k represents the central frequency of is the unit pulse function, ⊗ represents a convolutional computation, and ∂ i represents a partial derivative operation.Initially, the Hilbert transform was applied to each IMF to obtain a one-sided spectrum: Then, we estimated the central frequency (ω k ) of each IMF and modulated each IMF to the baseband: Lastly, the bandwidth of each IMF was estimated through the H 1 Gaussian smoothness by calculating the L 2 − norm of the demodulated signal gradient.

Solution of Variational Equations
The equation initially presented as Equation ( 1) was converted into a form without constraints by employing the Lagrange multiplier, denoted by λ.Furthermore, to maintain the fidelity of signal reconstruction in the presence of additive Gaussian noise, a quadratic penalty factor, represented by α, was utilized.The resulting unconstrained formulation is expressed as follows: Next, by solving Equation ( 4), f (ω) and ωk are updated as follows: where ûi (ω), f (ω), λ(ω) are the Fourier transform of u k (t), f (t), λ(t) respectively.The VMD algorithm's process has four main steps: , and n such that all their values are zero, and set a suitable number of decomposition modes K.

•
Step 2. Iteratively update u k and ω k using Equations ( 5) and ( 6), and stop when the preset value K is reached.

•
Step 3. Update λ using the following equation: where τ represents the noise tolerance for a given discrimination accuracy 0 < ϕ < 1 × 10 −7 .If this satisfies the following condition, then stop the iteration.Otherwise, return to Step 2: where ûk is the updated expression of u k .

•
Step 4. Arrange the obtained K IMF components from low to high frequencies, calculate the correlation coefficient between each component and the original signal, eliminate the IMF components with smaller correlation coefficients, and reconstruct the remaining components.

Improved VMD through Particle Swarm Optimization
Efficient and precise parameter selection for VMD hinges on the choice of (K, α).This study employs particle swarm optimization to ascertain the optimal (K, α) values for VMD, thereby eliminating subjective judgment and automating the search for the best parameters.The fundamental concept behind employing the PSO algorithm to discover the best solution lies in the collaborative effort and exchange of information among the various members of the population [30].The algorithm can be described as follows.
In an N-dimensional space, a swarm consists of m particles, where represents the motion of a particle, p i = (p i1 , p i2 , • • • , p in ) represents the local optimal solution that the particle has experienced, and p g = (p g1 , p g2 , • • • , p gn ) is the best position among the entire swarm as the global optimum.
In PSO, the update of velocity and position of a particle can be calculated as follows: x id (t where ω is the inertia weight, c 1 , c 2 are the learning factors, and r 1 , r 2 are random numbers distributed in the range [0, 1].Specifically, the optimal parameter (K, α) is selected in parallel by introducing a twodimensional particle swarm.According to Equations ( 9) and ( 10), there will be the following equations: x K (t + 1) The intricacy of components indicates their regularity, with reduced complexity signifying a higher degree of regularity.The sample entropy serves as a statistical instrument for assessing the complexity and unpredictability of time series data [31].Essentially, the sample entropy measures the probability of recurrence of comparable data patterns in a time series.Consequently, a greater sample entropy value suggests a more intricate, less predictable, and more irregular time series.
The equation for the sample entropy is given below: where r represents the signal tolerance, m is the embedding dimension, N is the signal length, and B m (r) is the mean pattern count.
The fitness function described in this paper, represented by Equation ( 14), is calculated as the average of the squared error (SE) for all intrinsic mode functions (IMFs) obtained from a single variational mode decomposition (VMD).A f itness value of less than 0.1 indicates that the optimal solution has been achieved: where K is the total number of IMFs decomposed via VMD and {u k } = {u 1 , . . . ,u K } are IMFs.PSO can be optimized by minimizing the fitness function with K and alpha as the optimization-seeking parameters.The following steps should be taken:

•
Step 1. Firstly, input the original series (ultrasonic signal).Then, set the range of the VMD parameter pairs (K, α), where K takes integer values in the range of [2,12] and α's range is within [100, 30,000].After that, initialize the positions and velocities of the swarm's particles.Finally, calculate the local and global optimal solutions using Equation ( 14).

•
Step 2. Apply Equations ( 11) and ( 12) to update the particle positions.Refresh the local and global solutions accordingly.

•
Step 3. Output the global optimal solution of the IMF's number K and the penalty factor α when the fitness value is less than 0.1 or the maximum number of iterations is reached.

•
Step 4. Using the optimized results, apply the VMD method to break down the vibration signal into different IMFs.Filter out the IMFs that fall outside the frequency range of the ultrasonic processing equipment, and combine the remaining effective IMFs to obtain a precise ultrasonic vibration signal.

Ultrasonic Wave Propagation Theory
Classical wave propagation theory posits that a wave transitioning from a less dense to a denser medium will undergo reflection at the point of intersection between the two media.The cause of this reflection is the abrupt phase shift of the reflected wave at the midpoint of its cycle, a concept referred to as half-wave loss [32].Half-wave loss is a phenomenon that occurs when a mechanical wave reflects at the interface between two media with different properties.This typically happens when the wave transitions from a less dense medium to a denser one, such as from air to a solid.In the case of mechanical waves like ultrasound, this occurs when the wave transitions from a medium with a lower refractive index to one with a higher refractive index.The reflected wave undergoes a phase shift of pi, which is equivalent to a half-wavelength change in the spatial period.This phase shift leads to a so-called phase inversion, where the wave phase becomes negative after reflection if it is positive before reflection at the interface between the media.
Half-wave loss in the phase of the ultrasonic echo will occur at the interface when propagation is constituted in a wave-dense medium compared to steel, such as the tungsten inclusion defect.However, the phase of ultrasonic echo will change continuously when ultrasonic waves propagate through the steel matrix and encounter porosity or non-metallic inclusions, and a reflection will occur at the interface between the steel and non-metallic inclusion without the half-wave loss.Depending on the phase of the ultrasonic echo, we can determine whether the inclusions of the slag are a thin medium or thick medium relative to the steel matrix.
Welding slag inclusions are embedded within the austenitic stainless steel matrix, serving as a model for an environment with a foreign object included.Foreign objects can be categorized as either wave-thin or wave-dense media relative to the matrix material [33].According to wave propagation theory, ultrasonic waves propagate through the environment and reflect off foreign objects.The presence or absence of a half-wave loss in the echo signal's phase can indicate whether the foreign material is a wave-thin or wave-dense medium.In our experimental set-up, water and diverse material samples were employed to simulate the environment and slag inclusions, respectively.

Experimental Set-Up
As it is not easy to observe the material of slag inclusion in weld defects, this experiment utilized a simulated experiment with a water environment to simulate defects inside the weldment, as shown in Figure 1a.The ultrasound experimental system consisted of an SIUI CTS-1002 ® digital ultrasound machine (Shantou, China), a 5Z14N transmitting probe (SIUI longitudinal wave straight probe, 5 MHz, 14 mm, shown in Figure 1b), and a signal acquisition computer (Tektronix MDO4024C oscilloscope, Beaverton, OR, USA).The ultrasonic probe was responsible for transmitting and receiving the ultrasonic signals, producing pulsed ultrasonic signals at a nominal center frequency of 5 MHz.Theoretically, its operating frequency would be equal to the nominal frequency.However, a downshift in frequency could be potentially caused by the manufacturing technology of the piezoelectric crystal probe and aging of the detector with a served time duration.Figure 2 illustrates the loaded excitation waveform of the probe when the SIUI CTS-1002 was operating at a voltage of 100 V.The oscilloscope operated at a sampling frequency of 2.5 GHz, which was employed to visualize the temporal disparity of ultrasonic waves as they traversed various positions within austenitic stainless steel.It filled the tank with water, fixed a cylindrical pillar on the bottom, and placed the cubic sample on top of the pillar in this experiment.We maintained a certain distance between the sample and the bottom of the water tank to distinguish the echo signals reflected from the sample surface and the bottom of the tank.Figure 1c shows that the vertical distances were 9.00 cm and 10.20 cm between the upper surface of the slag specimen and the transmitting probe surface and the bottom surface of the specimen and the bottom of the water tank, respectively.The specimen was a cubic sample with a side length of 2.00 cm.The ultrasonic probe was placed on the top of the water tank to transmit ultrasound vertically and directly immerse it in the water, which eliminated the need for a coupling agent and resulted in reduced attenuation of the ultrasound wave.The reflected ultrasonic echo signals of the 6 cubic specimens were collected by our ultrasound system.The original echo signals were collected by the oscilloscope shown in Figure 3, where (a) is the reference original echo signal obtained when no slag cube block was placed in the water environment and (b) is the original echo signal obtained when a wood specimen was immersed in the water tank.The signal encircled by a red box on the left in Figure 3a is the echo from the bottom surface of the water tank, and the following weaker one encircled by the right red box is the secondary echo.It can be seen that the first echo's occurrence time was approximately 2.8 × 10 −4 s, given an ultrasonic wave propagation velocity of approximately 1500 m/s.This corresponded to a traveled distance of approximately 42 cm, which was consistent with twice the distance between the ultrasonic probe and the bottom surface of the water tank (21.20 cm), as shown in Figure 1c.Upon placement of a slag specimen in the water, the ultrasonic waves underwent multiple traversals between the ultrasonic detector and specimen.As depicted in Figure 3b, the red rectangles highlight the initial and secondary echoes reflected from the water-wood cubic block interface, occurring at approximately 1.2 × 10 −4 s and 2.4 × 10 −4 s, respectively.These echo arrival times corresponded to the distances traversed by the ultrasonic waves, in accordance with the experimental distance set-up of 9.00 cm between the transmitting probe and slag inclusion specimen.The original echo signal reflected from the sample surface was intercepted and used for analysis in this experiment.We chose the experiment of the wood specimen immersed in water as an example to illustrate the experimental procedures and subsequent analysis of the results.The chosen white birch wood specimen had a density of approximately 0.599 g/cm 3 in a dry state and approximately 0.676 g/cm 3 after being submerged in water for half an hour.An original ultrasound echo signal from the sample of wood is shown in Figure 4, VMD was performed on the ultrasonic echo signal.As can be seen in the figure, there was significant noise in the signal, especially at the beginning and end of the signal.

Evaluating Indicator
Signal denoising is the extraction of effective information from the original signal.VMD is an adaptive decomposition method.After decomposition by these algorithms, a series of IMFs with a certain center frequency can be obtained.One or more layers of the decomposed IMF contain noise for noisy signals.Moreover, it is particularly important to judge whether the IMF is noise or a useful signal.Usually, in the signal processing process, some researchers will directly discard IMFs with smaller orders.At the same time, some useful signals contained in IMFs with smaller orders will also be discarded.However, the signal-to-noise ratio (SNR) is reduced, and the denoising effect is poor.This paper first obtains the normalized cross-correlation (NCC) function of each modal function IMF and the original signal and then uses the obtained NCC to determine the useful signal mode and noise mode.
In this case, we needed to select effective IMFs for reconstruction to obtain denoising signals.The SNR and RMSE were used as evaluation indices of the denoising effect.The SNR shows an energy relationship between the signal and noise.The higher the SNR, the more useful the information, and the less noise there is in the signal.Therefore, the SNR can be a quite intuitive method for evaluating the effect of denoised signals by analyzing whether the SNR improves.The definition of the SNR is as follows: where x is the original signal, x is the denoised signal, and ∥ * ∥ indicates the norm.
The root mean square error shows the difference between the denoised signal and original signal in numerical terms, and the smaller the RMSE, the better the noise reduction effect.The RMSE is defined as follows: where length( * ) represents the length of the signal.
In order to effectively identify and separate the noise component in the IMFs decomposed by VMD, a normal correlation coefficient was introduced based on time-frequency analysis of the IMF component to further determine the degree of correlation between the IMF and the original signal.The larger the NCC, the better the correlation between the corresponding IMFs and the original signal.The NCC is defined by where u k and x are the kth IMF and denoised signal, respectively.

PSO-VMD Denoising
This section presents the results of the echo signal decomposition received from the water-slag specimen interface through VMD optimized by PSO.To validate the superiority of our proposed vibration signal processing method, we compared it with other methods.The comparative methods included WOA [34], GA [35] and ALO [36] algorithms used to optimize the two core parameters (K, α) of VMD.The defect signal processing of ultrasonic testing data from the water-wood interface served to illustrate the application of the IMF's section approach in the proposed PSO-VMD method.We applied these methods to process the original ultrasonic echo signals individually.The fundamental concept underlying these methods is to decompose the original defect signal and eliminate non-ultrasonic components.By employing the PSO technique for parameter optimization adaptively, we deployed VMD on the ultrasonic defect testing data.
To compare the accuracy and efficiency of the different signal processing methods, Table 1 lists the main parameters K and α for the improved VMD algorithms, SNR, RMSE, and processing time.The SNR and RMSE indicators were employed to assess the approaches' accuracy, while the processing time refers to quantitatively analyzing the efficiency of denoising.It can be seen that all of the improved VMD methods could decompose the original signal by setting the parameters K and α automatically.The proposed PSO-VMD method provided the least IMFs (seven) with the highest SNR and the lowest RMSE.The SNR reflects the ratio of the overall signal to the noise component, where the higher the SNR, the better the noise reduction effect.The RMSE quantitatively represents the deviation between the denoised signal and the original signal, where a lower RMSE indicates more effective noise reduction.PSO-VMD could effectively denoise and extract features from ultrasonic testing signals to highlight the slag inclusion defect features.Compared with PSO-VMD, the WOA-VMD, GA-VMD and ALO-VMD methods demonstrated varying extents of over-decomposition phenomena, which decomposed the signal into 10, 8, and 10 IMFs, respectively.Additionally, a comparison experiment on the denoising efficiency of the improved VMD algorithms was conducted on a PC equipped with an Intel i7-3700K CPU (Santa Clara, CA, USA), Nvidia Geforce RTX 3090 GPU, and 128 GB of memory (Santa Clara, CA, USA).Each algorithm was configured with the maximum number of iterations set to 10, and each was executed 10 times on the echo signals of wood specimen.The average processing times for each algorithm are presented in Table 1.The experimental results indicate that both the WOA and ALO optimization algorithms exhibited superior efficiency, with processing times of 79.7 s and 78.9 s, respectively, in comparison with the GA method's 1155.9 s, demonstrating the lowest efficiency.Our proposed PSO algorithm held a middle ground at 536.7 s in terms of efficiency.Consequently, there exists a considerable scope for enhancement in the noise reduction efficacy of PSO-VMD when compared with the WOA-VMD and ALO-VMD algorithms.It is anticipated that advancements in computational power will mitigate this discrepancy, rendering it a non-obstacle in the foreseeable future.
The components were sorted by frequency from low to high in Figure 5 for IMFs in the time domain and in Figure 6 for IMFs in the frequency domain.The low-frequency component IMF1 demonstrated strong periodic fluctuations, and the high-frequency component appeared to be random.IMF1 symbolized effective signals from slag inclusion defects, while other IMF components corresponded to interference or noise.The echo signals from the slag specimens could be effectively distinguished from the interference components.
Table 2 shows the normalized cross-correlation between the IMF components of the denoised signal and the original signal.The NCC of IMF1 was 0.9975, which was significantly higher than those of the other modes.It can be seen from the spectrogram presented in Figure 6 that the center frequencies among the IMFs were distinct and separate without any overlap, reflecting the efficacy of PSO in the context of VMD parameter tuning.Figure 7 shows the comparison between the denoised signal and the original signal, which exhibited characteristics similar to the original data but with less noise and a higher signal-to-noise ratio.

Phase of the Echo Signal
In this experiment, water was the original medium for ultrasonic wave propagation, and the surfaces, those of cubic blocks of iron, aluminum, copper, wood, resin, and other materials placed in the water environment to simulate slag inclusion defects, were the interfaces for sound wave reflection.Among the six materials selected, metallic blocks such as iron, aluminum, copper, and magnets are thick media compared with water, while non-metallic wood and resin are thin media.By analyzing the phase spectrum of the echo signal, we could determine whether the simulated inclusion was a thin medium or a thick one based on the half-wave loss theory.
The phase spectrum describes the phase information of the frequency components within a signal.In practical applications, the phase spectrum helps with understanding the phase relationships among different frequency components of a signal, which is quite important for signal analysis, processing, and interpretation.According to the theory of half-wave loss, in the propagation of sound waves, the phase spectrum serves as a critical means for analyzing reflected signals.We could determine whether the material at the reflective interface was a denser medium by assessing whether the reflected signal had undergone a π phase shift.
The phase spectrum can be either wrapped or unwrapped.The wrapped phase spectrum limits the phase values to the range from −π to π, which helps with visualizing and analyzing phase changes, especially when there is a phase shift (such as a half-wave loss).The unwrapped phase spectrum, on the other hand, shows continuous phase changes from −∞ to ∞, which may be more intuitive in some cases but may not be as clear as the wrapped phase spectrum when analyzing phase jumps.Therefore, the wrapped phase spectrum was employed to analyze the phase of the echo signals reflected from the slag specimen surfaces.Figure 8a,b depicts the wrapped full-phase spectrum of the echo signal from the wood specimen interface before and after the denoising process.Figure 8c presents an expanded view of the denoised phase spectrum from 1 to 5 MHz, highlighting the specific frequency range of interest.The central frequency of the denoised signal was 4 MHz, which was obtained from the IMF1 component shown in Figure 6.Then, the corresponding phase of −42.63°could be picked out from the enlargement of the denoised signal's phase spectrum in Figure 8c.This experimental result shows that the detector's operational frequency deviated from its nominal value of 5 MHz, which is potentially attributable to variations in crystal attachment, manufacturing tolerances, and probe aging.
The decomposition and phase analysis of PSO-VMD were performed for six different material samples, and the results are presented in Table 3.The table shows that the ultrasonic signal phase of the non-metallic materials was negative, while that of the metallic materials was positive, indicating opposite signs.Therefore, it can be concluded that the phase of the ultrasonic echo signal can reflect whether a slag inclusion is metallic or non-metallic.In austenitic stainless steel, if the ultrasonic testing signals of slag inclusion defects in a weld show indications of half-wave loss, then this is typically indicative of tungsten inclusions.This type is a denser medium relative to the austenitic stainless steel matrix.The tungsten inclusion defect in austenitic steel mainly occurs during the process of tungsten inert gas (TIG) welding.If there is no half-wave loss in the phase change of an echo reflected from the slag interface, then this indicates that the slag inclusion is a thin medium, which is always non-metallic compounds or other metallic inclusions like aluminum particles.Identifying the category of a slag inclusion defect is critical for finding the reasons for defects developing, improving production efficiency, and reducing the rate of defective products, ultimately reducing production costs.

Conclusions
This paper designed a water environment-based simulation method for weld inclusion material classification using ultrasonic testing and introduced the PSO-VMD denoising and phase processing method with an ultrasonic signal.The classification of slag inclusion material is effectively carried out using the phase spectrum of an echo signal.To summarize this paper, we can draw the following conclusions: • A water environment experiment with six categories of cubic samples, including four metallic and two non-metallic materials, was used to simulate the slag inclusion defects with different materials in the weldments of austenitic stainless steel.

•
The proposed method with PSO-VMD denoising the ultrasonic signals utilizes PSO to optimize the VMD hyperparameters, including the suitable number of decomposition modes K and penalty factor α.This was proven to effectively denoise the noisy signal and to be superior to other comparative algorithms, namely WOA-VMD, GA-VMD and ALO-VMD.PSO-VMD's results show that it decomposed the minimum number of modes (only seven IMFs) but with the highest SNR and lowest RSME among all methods, which demonstrates that PSO-VMD has superior performance in the noise reduction of slag inclusion defect detection signals.

•
The phase spectrum was proposed as a valuable tool for analysis of the phase characteristics of ultrasound echo signals.By analyzing the phase spectrum, we can ascertain whether a slag inclusion has a thicker or thinner medium compared with the austenitic stainless steel base material, based on the presence or absence of a half-wave loss in the echo signal phase.
Our work provides a referential identification method for identifying material types with slag inclusion defects for practical applications.

Figure 1 .
Figure 1.(a) Experimental system of ultrasonic testing based on water environment simulation.(b) Top view of the water tank and ultrasonic probe.(c) Schematic diagram of vertical distances between objects placed inside the water tank.

Figure 2 .
Figure 2. The loaded excitation waveform of the probe with the SIUI CTS-1002 operating at a working voltage of 100 V.

Figure 3 .
Figure 3. Original echo signals measured by the oscilloscope: (a) no slag cube specimen and (b) wood cube specimen placed in the water environment.

Figure 4 .
Figure 4.The original echo signal reflected from the water-wood interface.

Figure 6 .
Figure 6.The decomposed IMF spectrum under PSO-VMD in the frequency domain.The inset in IMF1 is a local enlargement of the IMF component.

Figure 7 .
Figure 7. Denoised signal and original signal from the water-wood interface.

Figure 8 .
Figure 8. Phase spectrum (a) before denoising and (b) after denoising of echo signal from the wood specimen's surface.(c) Expanded view of (b) within the 1-5 MHz frequency range.

Table 1 .
Comparative results for parameters, evaluation index, and processing time for different VMD optimization algorithms.

Table 2 .
NCC between the IMF component of the denoised signal and the original signal.

Table 3 .
Frequencies and phases of 6 samples' echo signals.