Harmonizing sound and light: X-ray imaging unveils acoustic signatures of stochastic inter-regime instabilities during laser melting

Laser powder bed fusion (LPBF) is a metal additive manufacturing technique involving complex interplays between vapor, liquid, and solid phases. Despite LPBF’s advantageous capabilities compared to conventional manufacturing methods, the underlying physical phenomena can result in inter-regime instabilities followed by transitions between conduction and keyhole melting regimes — leading to defects. We investigate these issues through operando synchrotron X-ray imaging synchronized with acoustic emission recording, during the remelting processes of LPBF-produced thin walls, monitoring regime changes occurring under constant laser processing parameters. The collected data show an increment in acoustic signal amplitude when switching from conduction to keyhole regime, which we correlate to changes in laser absorptivity. Moreover, a full correlation between X-ray imaging and the acoustic signals permits the design of a simple filtering algorithm to predict the melting regimes. As a result, conduction, stable keyhole, and unstable keyhole regimes are identified with a time resolution of 100 µs, even under rapid transitions, providing a straightforward method to accurately detect undesired processing regimes without the use of artificial intelligence.


Supplementary Method 2 Experiment design
Thin walls were fabricated on the center of the substrate in standard keyhole printing conditions with a Gaussian beam at the focal point, focused on top of the powder bed with a measured beam diameter of 27.5 µm (see Supplementary Figure 1a).The keyhole regime was confirmed through ex-situ microstructural analysis and observation of the melt pool geometry.The laser process parameters of the build are reported in Supplementary Table 1 -Process parameters for fabrication of the parts and for the subsequent re-melting (RM) passes.After the fabrication of the thin walls, as illustrated in Supplementary Figure 2, the build plate was moved upwards by the nominal height of the wall, and all the surrounding powders were removed to allow operando X-ray imaging through the entire thickness of the wall during laser processing of the top surface.Additionally, the top surface was ground slightly to remove the bulges formed at both ends of the wall as a result of laser acceleration and deceleration.Afterwards, single-line laser re-melting was carried out on the center line of the top surface of the wall, utilizing different laser process parameters and laser defocus values.In particular, converging (favoring keyhole formation) and diverging (stabilizing the conduction regime) defocus 3 with similar beam spot size and process parameters were employed to record the acoustic feedback from the laser-material interaction, to guarantee identical associated machine and environmental noises (e.g., noise transmitted from the laser at different nominal laser powers, scan head mirrors, etc.).The re-melting passes were repeated several times to improve the statistical significance of the measurements.The motivation behind the choice of wall thickness was twofold.Primarily, it had to be thin enough to provide adequate X-ray transmission, making high-speed X-ray imaging possible.Additionally, the effects of top and side surface roughness and geometrical inaccuracy become stronger for lower wall thicknesses 4 , providing non-uniform heat dissipation and projected laser energy distribution during the re-melting process and leading to eventual changes in the melt pool geometry or even in the melting regime.The laser beam profile at each defocus value was measured using a CCD camera laser beam profiler (FBP-1KF, CINOGY Technologies, Germany) based on a multi-stage high-performance attenuator with a pixel size of 3.45 µm 2 .The beam profile was displayed using a beam profiler software (RayCi64 Pro, CINOGY Technologies, Germany).
For non-Gaussian beam profiles, the beam diameter in three axes and the corresponding average value was measured at different intensity levels (20% -80%) (see Supplementary Figure 1b-f).The theoretical evolution of the laser beam spot size at different defocus values was calculated based on the following equation (Eq.1).
where ω0 = 13.75 µm is the beam waist (i.e., the smallest radius of the Gaussian beam); z is the scanner position [mm]; z0 = 0 mm is the scanner position for the laser beam to be focused on the surface of the build plate; λ = 1070 ± 10 nm is the laser wavelength.

Supplementary Method 3 Segmentation algorithm
In our study, we began by conducting exploratory data analysis (EDA) on the pre-processed signal spectrograms.As seen in Figure 6 (of the main text), we observed that the majority of the signal energy was concentrated in the frequency range of 35-105 kHz when the process was in the keyhole regime.This observation prompted us to apply a digital filter to extract only the relevant frequency range.To improve the pipeline's expressivity, we applied a non-linear function point-wise to the filtered signal and smoothed it using a moving average.The selected non-linear function is PReLU 7 , which facilitates the application of the successive smoothing filters by making the signal running average positive (the former is zero in the raw data due to the oscillatory nature of AE signals).This process is illustrated in Supplementary Figure 3a, where one of the pre-processed AE signals and the result of all the aforementioned operations are shown.
Additionally, we duplicated the filtering pipeline to produce two signals, each corresponding to a specific regime of interest.To do this, we initialized two filters: a band-pass filter with a passband frequency range of 35-105 kHz and a band-stop filter with the same stopband frequency.The impulse response duration was set to 1.25 ms, corresponding to 2501 data points at a 2 MHz sampling rate, to achieve at least 80 dB of attenuation (corresponding to the signals' mean SNR) for the band-pass (or band-stop) filter.
The implementation of two filtering branches offers several benefits to our approach.Firstly, it increases the robustness of the procedure as, even in the case of uncertain detection from one of the signals, the prediction can be supported by the second signal.Secondly, it creates a framework that can be easily expanded to detect multiple regimes by adding additional filtering branches.Lastly, it allows for generating predictions by applying the SoftMax function to the output of our filters.Specifically, the following SoftMax function is point-wise applied to the filtered signals: ) is small, close to 0 -we are predicting the keyhole at the i-th time step of   .See Supplementary Figure 4a for the complete block diagram.Notice that by providing a prediction per data point, the complete pipeline results in a segmentation algorithm with the goal of dividing each AE signal into segments, each corresponding to a melting regime between conduction, stable keyhole, and unstable keyhole.
Our approach to segmenting the melting regimes for LPBF processes is built upon initial empirical observations of the available data, specifically the time-frequency analysis of the signals.Through this analysis, we were able to identify specific spectral characteristics that correspond to the conduction and keyhole regimes.However, we recognized that relying solely on these observations may not deliver the most optimal results for all available signals.Therefore, to optimize the discrimination of the regimes, we adopted a data-driven approach to improve the pipeline further.
This approach utilizes annotated data to fine-tune the pipeline, going beyond the initial time-frequency insights and applying a data-driven filter that allows one of the two output signals to be more intense when the corresponding regime is occurring.This fine-tuning allows for a more accurate and reliable segmentation of the regimes, which is crucial for real-time in-situ monitoring of the LPBF process.
Precisely, to guide the filter design optimization, we have used a variation over the cross-entropy loss, which ensures a low score when the pipeline segmentation matches the ground truth and a high one otherwise -e.g., when   ( , ) is close to zero, even though  , should correspond to conduction mode.The ground truth in this context refers to the annotated data that provides the true labels -derived from the X-ray movies, see Section 2.1 -for each data point, indicating whether it corresponds to the conduction or keyhole regime.Specifically, the risk function (cross-entropy through time) is defined as follows: (  ,   ,   ) = − , (5)   where   denotes the number of data points the signal   is made up of, ( , ) = 1 if  , corresponds to keyhole and ( , ) = 0 if  , corresponds to conduction mode according to the ground truth.The parameter   and   act as balancing coefficients between keyhole and conduction occurrences, which are not equally distributed, and their values are given by: where  is an indicator function, whose value is 1 if the condition in the argument is true and 0 otherwise, and   is the j-th element of the set containing all ground truth values (0 for conduction and 1 for keyhole) for all the available signals.Scaling the risk function by these two balancing coefficients reduces the penalty of wrong predictions for the most common regime while increasing it for the less frequent one.
Additionally, note that the risk   also depends on   and   , which represents the vectors comprising all the filters parameters (defining their impulse response), for both conduction (  ) and keyhole (  ) filtering branches.
Once the risk   is computed for all the available AE signals   using the initial parameters   and   , the latter can be updated as follows: (  ,   ,   ), (7) (  ,   ,   ), (8)     in which the gradients are calculated with respect to   and   ,  is the so-called learning rate that controls the entity of the "step" taken towards the opposite gradient direction, and  denotes the number of signals used to optimize the filters' parameters.This technique is commonly referred to as gradient descent 8 , and, in our case, the gradient calculations are performed with an automatic differentiation tool (Pytorch 9 ).
Finally, repeating the steps denoted in Eqs. ( 7) and ( 8) using the value for the risk function obtained with the updated parameters   and   allows determining the parameters that minimize the risk function.

From binary to ternary
In the previous section, we introduced a regime segmentation technique based on the analysis of the acoustic emissions signals acquired during the Laser Powder Bed Fusion (LPBF) process.This approach relied on a filtering pipeline designed to extract specific frequency ranges from the raw data and a prediction model that utilized the SoftMax function to discriminate between the conduction and keyhole regimes.However, the flexibility of this technique suggests taking the optimization one step further by allowing for the discrimination of the unstable keyhole regime from the stable one.
This task was achieved through minor modifications to the previously described pipeline, which included the inclusion of one additional filtering branch and slight changes in the loss function so that it can handle a vectorial indicator function, i.e., making ( , ) one of the columns of the identity matrix of size K (the number of regimes we are predicting).The remaining required changes can be seen in Supplementary Figure 4b, where the complete pipeline for the segmentation of the three regimes mentioned above is presented.The procedure is detailed in Supplementary Figure 3b, where one of the pre-processed AE signals and the result of all the operations are presented.This extended capability is of extreme importance for LPBF processing monitoring, especially the detection of instabilities within the keyhole regime (where porosity formation occurs).Thanks to the high time resolution in these predictions, the location of the affected regions can be identified accurately, and healing measures can be employed to save processing time and resources.

Training procedure
The training procedure for the regime segmentation technique is divided into several steps.First, a leaveone-out cross-validation strategy is employed, where a single signal is left out from the training set and used as the test set.This process is repeated for all signals in the training set, providing a robust evaluation of the model performance.
We use a variation over the cross-entropy loss to guide the filter design optimization.The parameters of the pipeline are updated using the L-BFGS optimizer, an optimization algorithm that approximates the Newton Method using a limited memory of previous gradients.Additionally, we use a learning rate scheduler, which randomizes the learning rate if the risk does not decrease between one epoch and the following one.If the risk function does not decrease for 100 epochs, we apply a small amount of random noise to the signals to ensure that the pipeline does not get stuck in a suboptimal solution.The optimization process for every fold of the leave-one-out cross-validation is stopped according to the following criteria: when the minimum risk (a measure of the difference between the predicted and ground truth labels) is less than 0.1, or when the number of epochs is greater than 10'000, or when the "counter flat" reaches 100 and the minimum risk is less than 0.35.The "counter flat" is a value that is incremented every time the risk does not decrease between one epoch and the following one, serving as a way to check if the optimizer has stopped making progress.

Table 1 -
Process parameters for fabrication of the parts and for the subsequent re-melting (RM) passes.
denotes the i-th data point of the n-th pre-processed AE signal   , ( , ) and ( , ) are the i-th data points of the n-th conduction and keyhole signals, respectively, and   ( , ) (  ( , )) is the prediction denoting conduction (or keyhole) detection for the i-th time step of   .As the name suggests, the SoftMax function finds the maximum between the two signals, which corresponds to our prediction; e.g., if the conduction signal (( , )) is higher than the keyhole one (( , )) at a specific time -which translates to   ( , ) being close to 1 -we are predicting conduction at that time.Conversely, if ( , ) is larger than ( , ) -i.e.,   ( ,