4.1. Time-Frequency Dual-Branch Encoding Framework
Structural dynamic responses show complex coupling between time and frequency, meaning that transient features and spectral properties are closely related. Because of this, the use of only frequency-domain analysis cannot capture transient dynamics, while using only time-domain modeling leads to unclear spectral information. To address this issue, the PI-CVAE uses a new dual-branch encoder that works in both the time and frequency domains. This architecture extracts and combines temporal and spectral features at the same time, creating a unified representation that is more consistent with physical laws. The time-domain branch extracts transient features like signal decay rates. These rates are closely related to frequency-domain properties, including structural damping ratios and half-power bandwidths.
The input to the time-domain branch is the Impulse Response Function (IRF), which is obtained by applying the Inverse Discrete Fourier Transform (IDFT) to the complex-valued Frequency Response Function (FRF):
Before transformation, the FRF undergoes preprocessing to obtain a physically admissible and causal impulse response. Conjugate symmetry is enforced in the frequency domain to guarantee a real-valued time signal. A frequency-domain window is applied to mitigate artifacts induced by the finite spectral representation. Subsequently, a temporal alignment is performed by shifting all impulse responses such that their primary peaks coincide, thereby establishing a consistent temporal reference for the subsequent neural network processing. This preprocessing pipeline ensures that the extracted time-domain features are physically consistent and directly comparable across samples.
This branch processes the discrete-time response signal (
) through a causal convolutional neural network. The operation at layer
m is defined as follows:
where
is a learnable convolution kernel. The causality constraint
ensures that the output at each time step (
n) relies only on the current and past inputs (
), preventing the use of any future information
.
The final feature vector (
) is obtained by flattening the output of the last convolutional layer (
).
where
L denotes the total number of layers and
is the flattened dimension. This vector captures the essential temporal decay characteristics of the dynamic response.
The frequency-domain branch employs a specialized self-attention mechanism to identify and prioritize resonant modes. Conventional self-attention uses shared linear projections to generate the Query (Q), Key (K), and Value (V) matrices, which limits its ability to concurrently capture both localized resonance bands and global spectral interactions in structural dynamic responses. In the PI-CVAE, a hybrid projection strategy generates the three matrices (Q, K, and V) through separate, physics-guided pathways. This design tailors each matrix for a distinct physical role, thereby enhancing the differentiation of extracted features.
The Query matrix (
Q) is designed to identify local spectral features near potential resonance peaks. It is produced by applying a 1D convolution operation to the input frequency spectrum (
):
where
represents the learnable kernel weight.
The convolutional kernel width (m) is set to a fixed value, chosen to correspond to the typical half-power bandwidth () expected in structural dynamic systems.
This ensures the convolution covers a frequency range that matches the resonance bandwidth. Symmetric padding is applied to preserve information at the spectral boundaries. In addition, LeakyReLU activation with a negative slope of 0.1 is used instead of ReLU to avoid the vanishing gradient problem. This is important for retaining information from small or negative pre-activations, which often represent physically meaningful but weak higher-order vibration modes.
The Key matrix (
K) captures a global representation of the frequency spectrum. It is produced by processing the concatenated input (
) through a Multi-Layer Perceptron (MLP).
where
and
are learnable weight matrices and
and
are bias terms. Unlike the locally focused convolutional filter used for
Q, the MLP inherently captures interactions across all frequency points. This allows it to effectively represent long-range dependencies and global modal couplings. The Swish activation function (
) is chosen for its beneficial traits, such as smoothness and non-monotonicity. These properties often lead to better performance and more stable gradients than ReLU. By explicitly incorporating the physical parameters (
), the network can dynamically adjust this global representation according to the specific structural configuration.
The Value matrix (
V) contains the fundamental spectral information to be weighted and aggregated. It is formulated as an element-wise scaling of the input spectrum to preserve the intrinsic energy distribution of the original frequency response:
where
is a learnable weight matrix, ⊙ denotes the Hadamard (element-wise) product, and
is the input spectrum. This formulation is guided by the principle of energy conservation, as expressed by Parseval’s theorem:
By performing only element-wise scaling, the transformation preserves the intrinsic structure of the spectral energy distribution.
The fused frequency-domain feature (
) is then computed through an attention mechanism as a weighted sum of the Value matrix (
V). The attention weights (
) are obtained by comparing the locally focused Query vectors (
Q) with the globally informed Key vectors (
K):
This mechanism enables the model to dynamically amplify or attenuate specific frequency components according to their physical significance.
The time-domain feature (
) and frequency-domain feature (
), which are outputs of the dual-branch encoder, are fused into a unified representation. This representation is then coupled with the underlying structural properties by incorporating the physical parameters (
) through an embedding network (
). The complete fused feature vector is constructed using the following equation.
The fused feature vector () is projected by the encoder to obtain the parameters of the latent distribution.
Two separate linear layers are used to output the mean (
) and the log variance (
) of the distribution. The latent variable (
) is sampled via the reparameterization trick, expressed as
which enables gradient-based optimization during training. This stochastic sampling introduces a probabilistic dimension to the encoding process, which is essential for supporting uncertainty quantification.
4.2. Learnable Frequency-Filtering Decoder Network
The decoder of the PI-CVAE employs a learnable frequency-filtering method to generate FRFs that are inherently regularized towards physical plausibility. While not imposing hard constraints internally, its design works synergistically with the physics-informed loss functions (
Section 4.3) to ensure non-negative magnitudes, causal phase relationships, and realistic damping behavior in the final output. Specifically, the method decodes the latent variable (
) and structural parameters (
) into a consistent FRF by dynamically adjusting the spectral amplitude and phase.
The initial FRF prediction module takes the concatenated input
and processes it through an MLP to generate a preliminary, complex-valued estimate of the FRF across all frequency points (
f):
In practice, the MLP outputs a real-valued vector of dimension
. The first
F elements are interpreted as the real part (
), and the subsequent
F elements as the imaginary part (
). This two-channel representation allows for the use of standard real-valued neural network frameworks. The complex-valued estimate is then reconstructed as follows:
The initial phase (
) is directly computed from this complex representation via the arctangent function
, ensuring mathematical consistency. The subsequent phase correction (
; Equation (16)) is applied to this initial phase as an additive term.
The amplitude processing component applies a frequency-dependent filter to enforce the non-negativity of the generated FRF magnitude. This constraint is implemented via a sigmoid-activated transformation, expressed as
where
is a learnable weight matrix that captures frequency-specific patterns and
is a bias term that sets baseline attenuation levels.
The sigmoid function is well-suited for this task. Its output is naturally bounded between 0 and 1, which guarantees non-negative magnitudes. Furthermore, its smooth gradient and asymptotic saturation support stable training and resemble the finite energy dissipation seen in real structures.
In parallel with the amplitude processing, the phase component ensures that the generated FRF exhibits causal and physically realistic phase behavior. It computes a phase correction term (
) using a hyperbolic tangent (tanh) transformation:
where
learns to modulate the phase dynamically and
provides a baseline phase offset.
Bounding the phase within this interval is a processing step that is necessary to prevent phase wrapping and achieve alignment with the range of the principal value of the argument. It should be noted that while this constraint is necessary for a causal response, it is not sufficient by itself to guarantee strict causality, which requires the full Kramers–Kronig relations between the real and imaginary parts of the FRF to be satisfied. In the proposed framework, the overall physical consistency and causality of the generated FRF emerge from the synergistic effect of multiple mechanisms: the non-negativity constraint on the magnitude; the guidance provided by the physics-informed loss functions; and the fact that the model is trained on data originating from physically realizable, causal systems.
The physically consistent
is obtained by applying the adaptive amplitude filter (
) and phase correction (
) to the initial raw estimate (
). This synthesis process is mathematically described by the following equation.
where ⊙ represents the Hadamard (element-wise) product.
This operation ensures physical consistency via two key mechanisms. First, the magnitude spectrum is dynamically scaled by the sigmoid-constrained amplitude filter (), which suppresses non-physical resonance peaks and enforces non-negative energy values. Second, the phase spectrum is adjusted by the tanh-bounded correction term () to maintain a causal and realistic waveform. Together, these operations effectively prevent the generation of non-physical spectra.
4.3. Physical Losses
Conventional loss functions for the training of a standard variational autoencoder combine a reconstruction loss (
) and a latent regularization term (
). The standard objective (
) is formulated as
The first term () encourages accurate data reconstruction, often implemented as the Mean Squared Error (MSE). The second term () regularizes the latent space distribution () towards a prior ().
While these terms ensure probabilistic modeling and data fidelity, they often fail to enforce basic structural dynamics principles. The generated responses may exhibit non-physical artifacts, such as inaccurate resonance frequencies or unrealistic damping behavior.
To address these issues, the PI-CVAE framework introduces a comprehensive physics-informed loss system. This system includes a temporal decay-rate loss to maintain realistic damping behavior and a spectral peak alignment loss to correctly identify resonance frequencies. This multi-objective strategy balances accuracy relative to training data with consistency with physical laws.
The envelope of a signal, representing its time-varying amplitude, is extracted using the Hilbert transform. For the target signal (
) and the generated signal (
), the envelopes (
and
) are obtained as follows:
where
denotes the Hilbert transform operator. The formulation of this loss is motivated by the energy dissipation characteristics of dynamic systems. In a viscously damped system undergoing free decay, the envelope decays exponentially, leading to a linear decrease in the logarithmic envelope with a slope proportional to the damping. While the impulse responses processed here are not necessarily free decays, their envelopes inherently reflect the system’s energy dissipation properties. Therefore, comparison of the derivatives of the logarithmic envelopes provides a sensitive measure of whether the generated response captures the correct damping trends. Thus, the decay-rate loss is defined as the mean squared error between the following derivatives:
This loss term acts not as a strict enforcer of a single-degree-of-freedom exponential decay model but, rather, as a physics-informed regularizer. It penalizes deviations from a broadly monotonic and physically reasonable decay pattern, thereby encouraging the generative model to respect the fundamental principle of energy dissipation observed in real structural systems.
The spectral peak alignment loss (
) ensures accurate localization by minimizing the difference between the peaks in the true and generated frequency response functions. The resonance peaks are identified from both the true FRF (
) and the generated FRF (
) as all local maxima that meet the following condition.
For each true resonance peak frequency (
), the frequency error (
) is calculated as the minimum distance to any generated resonance peak in
.
To handle outliers and potential mismatches in the number of peaks in a robust way, the aggregate loss is computed with the Huber loss function, which is less sensitive to large errors than the mean squared error. The loss is defined as
where the threshold (
) is set to
, with
being the frequency resolution. This defines a reasonable error tolerance for peak alignment.
To ensure practical applicability, the peak alignment loss incorporates specific design choices that address robustness concerns inherent to frequency-domain analysis. The selection of the Huber loss function mitigates sensitivity to outliers, providing a balanced response to both small alignment errors and larger discrepancies that may arise from noise or imperfect peak detection. The matching criterion associates each ground-truth peak with its nearest counterpart in the generated spectrum. This approach inherently accommodates discrepancies in the number of identified peaks between the target and generated FRFs, preventing loss divergence while maintaining focus on the alignment of dominant spectral features. Furthermore, a threshold parameter of is established with physical justification: it defines an acceptable alignment tolerance proportional to the frequency resolution (). The factor of two represents a conservative engineering margin that acknowledges inherent limitations in frequency discretization while avoiding excessive tolerance that could compromise alignment accuracy.
The overall training objective for the PI-CVAE combines data reconstruction accuracy with the proposed physics-informed constraints and the inherent variational regularization term, expressed as
The weighting coefficients ( and ) follow a linear warm-up schedule. Their values increase linearly from 0 to their final magnitudes (0.1 and 0.05, respectively) over the first 80% of the training epochs. This curriculum allows the model to first stabilize with the standard CVAE objective () before gradually enforcing the physics-informed constraints. This balances the influence of each constraint, promotes stable optimization, and prevents any single loss term from dominating the gradient updates.
This multi-component loss function enables the model to concurrently achieve high data accuracy, physically realistic dynamic behavior, and a well-organized latent space that supports effective uncertainty propagation.
4.4. Uncertainty Propagation Analysis
The trained PI-CVAE model facilitates highly efficient uncertainty propagation analysis by acting as a fast replacement for computationally expensive finite element simulations during Monte Carlo sampling. The overall procedure is divided into two sequential stages, including an offline training phase and an online propagation phase.
The initial offline phase represents a one-time computational investment for model development. This process starts with the creation of a training dataset. A set of N input parameter vectors () is generated through Latin Hypercube Sampling (LHS) to uniformly explore the parameter space. For each parameter vector, a high-fidelity finite element simulation computes the corresponding frequency response function ().
This set of parameter–FRF pairs () forms the training dataset for the PI-CVAE model.
After the offline training phase concludes, the online propagation phase begins. This phase uses the trained model to perform highly efficient uncertainty quantification. It starts by drawing a large number of samples (S) from the prior distribution of the input parameters (). Generating a corresponding for each parameter sample () involves two steps. First, a latent variable is sampled from the prior (). Then, the decoder deterministically maps the pair to the output (). The computational advantage of the method stems from this sub-millisecond generation capability. The resulting set of generated FRFs forms a Monte Carlo estimate of the full predictive distribution. Key statistical moments, such as the mean and standard deviation of the response, can then be directly computed from this ensemble for comprehensive uncertainty analysis.