---
title: 'KHLineNum: AE-Based Porosity Metric in LPBF'
url: https://www.emergentmind.com/topics/khlinenum
type: topic
---

# KHLineNum: AE-Based Porosity Metric in LPBF

KHLineNum is a spatially resolved porosity metric introduced for metallic laser powder bed fusion (LPBF) to quantify keyhole-induced (KH) porosity from airborne acoustic emission (AE) with sub-scanline resolution. In the reported framework, KHLineNum is defined as the number of KH pores per unit scan length, derived from ex situ X-ray computed tomography (XCT) and mapped to millisecond-scale AE snippets through submillisecond spatiotemporal synchronization. The metric was proposed because conventional aggregate measures such as volumetric porosity fraction, total pore count, and total pore volume do not localize transient pore-generation events along the scan path, whereas AE is intrinsically time-localized. The resulting AE-to-KHLineNum pipeline combines continuous wavelet transform (CWT) scalograms, scan speed, and a lightweight convolutional neural network (CNN) to predict \(\log(\mathrm{KHLineNum})\) with \(R^2\) exceeding 0.8, while also supporting AE-driven inference of keyhole regime boundaries on the power-velocity process map [2508.13492].

## 1. Definition and physical interpretation

KHLineNum is defined as a linear number density of keyhole-induced pores along the laser scan track:
\[
\mathrm{KHLineNum} = \frac{N_{\mathrm{pores}}}{L_{\mathrm{travel}}}.
\]
Here, \(N_{\mathrm{pores}}\) is the number of keyhole-induced pores within a given spatial segment of the scan track, and \(L_{\mathrm{travel}}\) is the distance traveled by the laser during the corresponding AE time window. The units are \(\mu\text{m}^{-1}\), because \(L_{\mathrm{travel}}\) is measured in micrometers. For an AE snippet of duration \(\Delta t\) and local scan speed \(V_{\mathrm{local}}\),
\[
L_{\mathrm{travel}} = V_{\mathrm{local}}\,\Delta t.
\]
The pores counted in \(N_{\mathrm{pores}}\) are those whose centers lie within the spatial interval associated with the snippet, with an added drift tolerance described below [2508.13492].

The metric was motivated by the mismatch between conventional porosity descriptors and the temporal granularity of in situ sensing. Volumetric porosity fraction, total pore count, and total pore volume are useful for bulk quality assessment, but they do not indicate where along the scan track pores form and cannot resolve transient events occurring over millisecond time scales and hundreds of microns in length. KHLineNum addresses this by expressing the rate of KH pore generation per unit scan length in a short, localized interval.

Its physical meaning is tied directly to unstable keyhole dynamics. KH pores arise when the keyhole vapor cavity becomes unstable and collapses, entrapping gas. The paper states that instability is governed by local energy density, oscillation modes of the keyhole surface and melt pool, and vapor recoil pressure and turbulence. In that setting, low KHLineNum corresponds to stable keyhole or conduction-mode behavior with few collapses, whereas high KHLineNum indicates more frequent or more severe instability events leading to pore entrapment. The study further reports that KHLineNum is more discriminative and learnable from AE than total pore count (KHNum), total pore volume (KHVol), and line-density of pore volume (KHLineVol), which suggests that a line-based density is a better latent target for time-localized sensing than purely volumetric summaries [2508.13492].

## 2. Experimental realization in LPBF and XCT-based computation

The experimental platform was an EOS M290 LPBF system processing Ti-6Al-4V (Ti-64) under argon shielding with a 1064 nm Yb-fiber laser of Gaussian profile, maximum laser power 400 W, and laser spot size \(100\ \mu\text{m}\). Two specimen classes were used. The single-bead (SBD) configuration contained four parallel single tracks of length 6 mm with 1.5 mm spacing to minimize thermal interaction. The pad (PAD) configuration used \(6 \times 6\ \text{mm}^2\) square pads with raster scanning, hatch spacing from 130 to 213 \(\mu\text{m}\), and different scan orientations. Multiple power-speed combinations were sampled around known conduction, transition, and keyhole process-window regions [2508.13492].

XCT provided the ground-truth pore data. Imaging was performed with a Zeiss Xradia CrystalCT at voxel size 2.96 \(\mu\text{m}\), 160 kV, 10 W, 2.35 s exposure, with HE2 filter and beam shift/hardening corrections. In Dragonfly, pores were segmented by global intensity thresholding, connected-component labeling, and morphological filtering. For each pore, the extracted attributes included voxel count, Feret diameters, aspect ratio, and 3D coordinates, especially the coordinate along the scan direction. To retain only real KH pores, the study applied the following filters: minimum voxel count \(> 4\) voxels, minimum Feret diameter \(> 5.92\ \mu\text{m}\), and exclusion of pores within \(0.1\ \text{mm}\) of the scan line start or end to avoid boundary effects. Manual checks were also used to correct segmentation [2508.13492].

KHLineNum is computed by matching an AE snippet to a spatial segment of a scan line and counting pores whose centers fall inside that segment. For a snippet beginning at time \(t_0\) on a scan line whose start time is \(t_{\mathrm{scan,start}}\), the spatial coordinates are
\[
x_0 = V_{\mathrm{local}}(t_0 - t_{\mathrm{scan,start}}), \qquad
x_1 = x_0 + V_{\mathrm{local}}\Delta t.
\]
Because KH pores may drift rearward in the melt pool, the method appends a fixed \(50\ \mu\text{m}\) extension to the end of the window:
\[
x_{1,\mathrm{eff}} = x_1 + 50\ \mu\text{m}.
\]
All pores with centers in \([x_0, x_{1,\mathrm{eff}}]\) are counted in \(N_{\mathrm{pores}}\), while \(L_{\mathrm{travel}} = x_1 - x_0\) remains the undrifted segment length. A minimum snippet duration of \(4\ \text{ms}\) was imposed so that the drift extension would not dominate the mapped distance. This produces sub-scanline resolution, with windows as short as 4–10 ms, corresponding to spatial intervals on the order of 0.4–4 mm depending on scan speed [2508.13492].

Because KHLineNum is sparse and highly skewed, especially under conduction-regime conditions where it is near zero, the model training target is \(\log(\mathrm{KHLineNum})\), with exponentiation applied during evaluation. This log-domain treatment reflects the strongly skewed porosity distribution observed in the data.

## 3. Spatiotemporal registration and airborne AE acquisition

The AE channel was acquired in situ with a PCB Piezotronics HT378A06 ultrasonic microphone with bandwidth up to 50 kHz, mounted inside the build chamber approximately 50 mm above the build plate at a fixed position. A Thorlabs PDA10CS2 (A10) photodiode with 1064 nm bandpass filter was oriented at the fusion zone. AE and photodiode signals were synchronously sampled at 100 kHz using an NI cDAQ with NI9232. The photodiode served only as a timing marker to detect laser on/off transitions and segment the continuous AE stream into individual scan lines and layers; no spectral processing was performed on the photodiode signal [2508.13492].

Temporal registration required explicit compensation for acoustic propagation delay. The sound-travel latency over approximately 50 mm was estimated as 0.72 ms, so the AE signal was advanced by 72 samples at 100 kHz to align AE time with the laser events observed in the photodiode trace. The paper describes this synchronization as submillisecond in precision, which is essential because KHLineNum is assigned on 4–10 ms windows. Without such correction, the spatial interval linked to a given snippet would be systematically shifted relative to the true fusion-zone events [2508.13492].

This registration strategy is central to the metric’s meaning. KHLineNum is not merely a post hoc pore density; it is a pore density tied to a specific interval of laser travel and therefore to a specific interval of AE. A plausible implication is that the metric functions as a bridge variable between ex situ volumetric ground truth and in situ dynamical sensing, enabling supervised regression rather than only regime classification.

## 4. AE representation and regression model

The AE time series for each snippet is transformed into a time-frequency scalogram using the continuous wavelet transform with Morlet mother wavelet:
\[
W_x(a,b)=\int_{-\infty}^{\infty} x(t)\,\psi^*\left(\frac{t-b}{a}\right)\,dt.
\]
The resulting \(W_x(a,b)\) is mapped to a discrete image \(I(f,t)\) whose horizontal axis is time over the snippet, vertical axis is frequency from 5 kHz to 50 kHz on a log scale, and pixel intensity is the magnitude of the CWT, interpreted as localized acoustic energy. The implementation uses ssqueezepy with fast CWT. Each scalogram is bilinearly interpolated and resized to \(224 \times 224\) pixels, and converted from colormap output to a single-channel grayscale image [2508.13492].

The CNN input tensor has size \(224 \times 224 \times 2\). Channel 1 is the grayscale AE scalogram. Channel 2 encodes scan speed \(V\) by normalizing the scalar speed to \([0,255]\) and tiling it into a constant \(224 \times 224\) image. The output is a scalar prediction
\[
\hat{y}= \log(\mathrm{KHLineNum}),
\]
which is exponentiated at evaluation time to recover KHLineNum. For PAD-layer analysis, windowwise KHLineNum predictions are converted into a predicted layer total pore count using
\[
\hat{N}_{\mathrm{pores}} \approx \sum_i \hat{\mathrm{KHLineNum}}_i\,L_{\mathrm{travel},i}.
\]
This yields a layer-level KHNum estimate from sub-scanline predictions [2508.13492].

The network itself consists of a lightweight convolutional backbone followed by a multilayer perceptron head. The backbone has five convolutional blocks, each comprising 2D convolution with kernel \(3\times 3\), stride 1, padding 1, ReLU activation, and average pooling. The input \((224 \times 224 \times 2)\) is reduced to a latent tensor of \((7 \times 7 \times 128)\). The head flattens this tensor and applies two fully connected layers of 128 and 64 units, both with ReLU, followed by a final linear layer producing the scalar output. Training minimizes mean squared error on the log-transformed target:
\[
\mathcal{L}(\theta)=\frac{1}{N}\sum_{i=1}^N (\hat{y}_i-y_i)^2,
\qquad y_i=\log(\mathrm{KHLineNum}_i).
\]

The dataset contains approximately 3200 labeled AE snippets from SBD and PAD builds over multiple snippet durations from 4 to 10 ms. The SBD dataset is split by power-velocity combinations into 80% training and 20% validation. The PAD dataset is reserved entirely for cross-geometry validation without fine-tuning. Training uses PyTorch 1.13.1, batch size 64, 150 epochs, Adam optimizer, initial learning rate \(1\times 10^{-4}\), and a scheduler that reduces the learning rate when validation loss plateaus [2508.13492].

## 5. Predictive performance and frequency-band interpretation

For SBD validation with KHLineNum as the target, the reported coefficient of determination
\[
R^2 = 1-\frac{\sum_i (y_i-\hat{y}_i)^2}{\sum_i (y_i-\bar{y})^2}
\]
is consistently greater than 0.8 for snippet durations from 4 to 10 ms, with the best range at 6–8 ms. The paper interprets this as a trade-off between temporal resolution and context: shorter windows provide less acoustic context, while longer windows reduce localization. The model also exhibits false positives or overestimation in low-porosity segments, especially where KHLineNum is approximately zero and the acoustic signal is weak. This is presented as a limitation in the low-defect regime rather than as a failure of the metric itself [2508.13492].

Cross-geometry validation on PAD data is stronger at the layer-total level. Using a model trained only on SBD, the derived PAD KHNum predictions achieve \(R^2 \approx 0.91\)–0.94 depending on window length, indicating strong generalization to more complex raster scans. The paper again notes slightly worse performance at low-energy-density power-velocity points where few pores form. Alternative training targets—KHNum, KHVol, and KHLineVol—produce higher mean squared error than KHLineNum, and violin-plot analysis shows that KHLineNum yields the lowest error and tightest distributions. The qualitative AE-level correlation plots likewise show more distinct clustering and less overlap for KHLineNum than for the alternative metrics [2508.13492].

To interpret what the network learns, the study performs a mask-one-band-out (MOBO) ablation on the input scalograms. Frequency bands are zeroed out and the pretrained model is reevaluated, with importance assessed by the resulting root mean squared error
\[
\mathrm{RMSE}=\sqrt{\frac{1}{N}\sum_i (y_i-\hat{y}_i)^2}.
\]
On coarse 10 kHz partitions, masking 25–45 kHz substantially increases RMSE. On finer 2 kHz partitions, the 37–45 kHz band yields the largest RMSE increase when removed. The abstract describes the 35–45 kHz band as particularly informative, and the detailed ablation isolates 37–45 kHz as the most informative sub-band. The paper states that this is consistent with prior work showing that keyhole vapor cavities exhibit surface oscillations and tip instabilities in the tens of kHz range, and with synchrotron X-ray observations in which periodic oscillations precede turbulent pore-generating behavior. This suggests that KHLineNum is not only statistically predictable from AE but also physically tied to keyhole oscillation dynamics [2508.13492].

## 6. Use in process characterization and regime mapping

Beyond defect quantification, KHLineNum is used to characterize the power-velocity process space. For PAD data, AE-derived KHLineNum predictions are integrated into KHNum per pad or layer, and a KHNum heat map is plotted over the power-velocity space. From this scalar field, isocontours such as KHNum \(= 300\), 600, and 1000 are extracted and interpreted as empirical “KH-bounds.” Low KHNum corresponds to conduction-regime conditions with little porosity, intermediate KHNum to transition behavior, and high KHNum to unstable keyhole conditions with many pores [2508.13492].

The study compares these AE-derived contours with the experimental keyhole boundary reported by Zhao et al. for Ti-64, defined by the onset of critical keyhole tip instability. The paper’s key observation is that contours at approximately KHNum \(= 600\)–1000 align closely with Zhao’s KH-bound in both shape and location, despite a relatively coarse power-velocity sampling grid. This is used to argue that AE-derived KHNum contours can function as empirical approximations to true experimental keyhole boundaries. In that sense, KHLineNum and its integrated KHNum derivative provide a quantitative bridge from time-frequency AE features to classical defect-regime maps [2508.13492].

A thresholding interpretation is also given. If a maximum acceptable KHNum is specified for a part, then process combinations above the corresponding contour are rejected. The paper gives the example that for KHNum \(= 300\) on a \(6 \times 6\ \text{mm}^2\) pad, the minimum acceptable speed is approximately 400 mm/s at the given power. A separate one-dimensional plot of KHNum against power-velocity index across the PADs shows a steep increase between approximately 600 and 1000 pores per pad, and this steep transition coincides with the experimental KH-bound. The authors describe this as consistent with earlier findings that keyhole fluctuation frequency and amplitude change sharply near the keyhole boundary, leading to burst-like increases in porosity. A plausible implication is that KHLineNum is sensitive not only to defect severity within a regime but also to the onset of the conduction-to-keyhole transition itself [2508.13492].

## 7. Relation to other porosity metrics, monitoring modalities, and limitations

The study explicitly contrasts KHLineNum with volumetric porosity metrics. Its stated advantages are spatial resolution, direct compatibility with short AE time windows, and higher sensitivity to localized pore bursts and transient events. These properties explain why KHLineNum outperforms KHNum, KHVol, and KHLineVol as a regression target. The metric is therefore presented not as a replacement for bulk porosity measurements in all contexts, but as a specifically time-aligned descriptor suitable for linking in situ sensing to ex situ defect mapping [2508.13492].

The AE-based framework is also compared with direct XCT. AE-based estimation is noninvasive, in situ, and provides millisecond-scale temporal resolution; once trained, it is scalable across many builds without repeated XCT. XCT remains the higher-resolution three-dimensional reference because it captures pore size, shape, and spatial distribution comprehensively, but it is expensive, time-consuming, post-process only, and difficult to scale to production. The paper therefore positions AE-based KHLineNum estimation as complementary to XCT: representative builds are imaged by XCT to provide ground truth, and the trained AE model is then deployed for subsequent builds [2508.13492].

Relative to other sensing modalities such as high-speed imaging, thermal cameras, photodiode-only approaches, and build-plate sensors, the reported contribution is the direct linkage between acoustic features and a physically meaningful porosity metric, together with frequency-band interpretation tied to keyhole oscillations and the reconstruction of keyhole regime boundaries using only AE and scan speed. The paper notes that prior AE studies often emphasized classification, such as keyhole versus conduction or lack-of-fusion discrimination, whereas this framework performs regression on a continuous, spatially localized defect-density target.

Several limitations are stated directly. Multi-laser LPBF introduces source ambiguity because AE from different lasers superimposes. The experiments are conducted on small builds of less than 10 mm, so larger parts may alter acoustic propagation pathways and attenuation. Predictions become less reliable in low-defect regimes where KH porosity is sparse and AE signatures are weak. The framework also does not directly capture post-formation pore elimination by remelting. Future directions suggested in the paper include validation on other materials, extension to more complex geometries and scanning strategies, incorporation of AE signatures of pore elimination, use of multi-microphone configurations and sensor fusion, linkage to fatigue-based process windows, and exploration of more advanced models such as ResNet and ViT, although only minor gains beyond the simple CNN are noted. These constraints indicate that KHLineNum is best understood as a calibrated process-characterization variable whose utility depends on careful registration, training, and acoustic-context control rather than as a universally transferable scalar without system-specific adaptation [2508.13492].

Source: https://www.emergentmind.com/topics/khlinenum