Fourier-based Low-Frequency Spectral Dynamics Network for differentiable spectral learning, early-warning analysis, and some physics-aware modeling of complex dynamical systems.
Differentiable LFPR and spectral-entropy metrics — reference implementation of CSD Engine B (JAX).
Symmetric to Jacobi-CSD-NN (Engine A: Jacobian damping ratio), this package implements frequency-domain Low-Frequency Power Ratio (LFPR) and spectral entropy via orthonormal DCT-II, validated against the FFT reference in CSD_dual_engine on ANDES Kundur trajectories.
TaiScience Research Group | Research / education only.
Languages: 繁體中文 · English
FLSD-Net
Fourier-based Low-Frequency Spectral Dynamics Network.
Keywords: Fourier Transform Spectral Analysis Low-Frequency Power Ratio Early Warning Signal Dynamical Systems Physics-Aware AI
| Module | Description |
|---|---|
SpectralEngineB |
Sliding-window LFPR + entropy (aligned with engine_b) |
abc_to_dq |
Differentiable Park transform |
build_engine_b_pipeline |
vmap + jit multi-bus batching |
compute_lfpr_and_entropy |
Single-window DCT core |
| Jacobi-CSD-NN | LF CSD-NN | |
|---|---|---|
| Engine | A (time-domain Jacobian) | B (frequency LFPR) |
| Stack | PyTorch | JAX |
| Metric | Damping ratio ζ | LFPR + spectral entropy |
Generated by lf_csd_nn.figure_engine.FigureEngine:
| Fig | Content |
|---|---|
| Fig 1 | KA sweep DCT vs FFT LFPR |
| Fig 2 | Post-fault LFPR time series |
| Fig 3 | Synthetic single-frequency comparison |
| Fig 4 | DCT spectrum + soft mask |
```bash
python examples/generate_figures.py
```
pip install -e .
pip install -e ".[dev]"Enable FP64:
import jax
jax.config.update("jax_enable_x64", True)from lf_csd_nn import EngineBConfig, SpectralEngineB
engine = SpectralEngineB(EngineBConfig(window_size=120, fs=60.0, f_low=2.0))
# score_lfpr, score_ent = engine.score_trajectory(t, y, channel_idx)python examples/smoke_test.py
python tests/test_engine_b_andes.py| Test | Description |
|---|---|
| TEST 1 | DCT-II orthogonality |
| TEST 2 | Finite LFPR gradients |
| TEST 3 | Synthetic DCT vs FFT LFPR |
| TEST 4 | ANDES KA sweep: Spearman(DCT, FFT) > 0.85 |
| TEST 5 | 1000-bus batch smoke |
Fig 5: FLSD-Net engine and Jacobian-CSD-NN. This System monitoring applied to a Kundur two-area power grid. Engine A (Jacobian damping ratio, PyTorch) and Engine B (low-frequency power ratio + spectral entropy, JAX) provide complementary early-warning signals before fault propagation across transmission buses.
MIT
