Home / Docs-Technical WhitePaper / 09-EFT.WP.Core.Density v1.0
Chapter 6 — Spectral Density and Time–Frequency
I. Objectives and Scope
- Establish a unified convention for S_xx(f) (power spectral density, PSD) and time–frequency analysis (STFT / multiresolution), guaranteeing energy consistency and unit coherency: unit( S_xx ) = unit(x)^2 / Hz.
- Fix window normalization and bandwidth metrics U_w, ENBW_Hz; specify single-/two-sided conversions, band-power computation, and uncertainty reporting.
- Provide the engineering workflow Mx-95 and the interface contract I90 6 (I/O shapes), aligned with Core.Sea Chapter 5 and Appendix C (window library).
II. Notation and Conventions
- Sequence and sampling: x[n], n = 0..N-1; sampling rate fs; segment length L; hop H; number of segments M.
- DFT frequency grid: f_k = k * ( fs / L ), k = 0..L-1; one-sided indices k = 0..L/2 (for even L).
- Window and normalization: w[n], with window power U_w and equivalent noise bandwidth ENBW_Hz:
- S92-9 : U_w = ( 1 / L ) * ∑_{n=0}^{L-1} w[n]^2.
- S92-8 : ENBW_Hz = fs * ( ∑ w[n]^2 ) / ( ∑ w[n] )^2.
- Frequency resolution: Delta_f = fs / L. Always state one-/two-sided convention and Delta_f in reports.
III. PSD Definition, One-/Two-Sided Conversion, and Energy Consistency
- Windowed DFT: X_w[k] = ∑_{n=0}^{L-1} x[n] * w[n] * exp( -j * 2 * pi * k * n / L ).
- Single-segment periodogram (two-sided convention):
S92-30 : P_xx[k] = ( 1 / ( fs * L * U_w ) ) * | X_w[k] |^2. - Welch PSD (segment averaging with optional overlap):
- For segment m, x_m[n] = x[n+mH], X_m[k] = ∑ x_m[n] * w[n] * exp( -j * 2 * pi * k * n / L );
- S92-31 : S_xx[k] = ( 1 / M ) * ∑_{m=0}^{M-1} ( 1 / ( fs * L * U_w ) ) * | X_m[k] |^2 (two-sided).
- One-/two-sided conversion (real signals):
- S1_xx[0] = S2_xx[0], and if L even, S1_xx[L/2] = S2_xx[L/2];
- S1_xx[k] = 2 * S2_xx[k], k = 1..(L/2 - 1).
- Energy consistency and variance check (zero-mean assumption):
Continuous view: S92-34 : var(x) ≈ ( ∫_0^{fs/2} S1_xx(f) df ); discrete: var(x) ≈ ∑_{k=0}^{L/2} S1_xx[k] * Delta_f. - Band power and amplitude spectral density:
S92-36 : P_band(B) = ( ∑_{k∈B} S_xx[k] ) * Delta_f; ASD(f) = sqrt( S_xx(f) ).
IV. Window Normalization, Leakage, and Scalloping
- Window normalization revolves around U_w and ENBW_Hz: publishing S_xx must include both.
- Leakage control: choose windows balancing main-lobe width and sidelobe suppression (e.g., hann, blackman); scalloping error in continuous spectra is governed jointly by ENBW_Hz and main-lobe width.
- When fs < 2 * f_max, the manifest must declare the anti-alias filter H(f) and a residual alias estimate (see Core.Sea Chapter 4).
V. Time–Frequency Analysis: STFT and Spectrogram
- STFT:
- S92-32 : STFT_x(m,k) = ∑_{n=0}^{L-1} x[n+mH] * w[n] * exp( -j * 2 * pi * k * n / L ).
- Time tag t_m = ( m * H ) / fs, frequency f_k = k * ( fs / L ).
- Spectrogram (PSD-normalized):
S92-33 : S_xx(m,k) = ( 1 / ( fs * L * U_w ) ) * | STFT_x(m,k) |^2 (two-sided; convert to one-sided as above). - Energy conservation (frame-average sense):
∑_{m,k} S_xx(m,k) * Delta_f * ( H / fs ) ≈ ( 1 / N ) * ∑ x[n]^2 (state the redundancy correction due to window and overlap).
VI. Cross-Spectrum, Coherence, and Phase
- Cross-spectrum (Welch form):
S92-37 : S_xy[k] = ( 1 / M ) * ∑_{m} ( 1 / ( fs * L * U_w ) ) * X_m[k] * conj( Y_m[k] ). - Magnitude-squared coherence:
S92-38 : Coh_xy[k] = | S_xy[k] |^2 / ( S_xx[k] * S_yy[k] ), in [0,1]. - Phase and group delay: angle( S_xy[k] ) and tau_g(f) = - d( arg H(f) ) / d( 2 * pi * f ) (conditioning chain per Core.Sea Chapter 4).
VII. Uncertainty and Degrees of Freedom (Sketch)
- Welch nu depends on the number of segments, the window, and the overlap. Recommended reporting:
- nu ≈ 2 * M_eff, where M_eff ≤ M; estimate M_eff from inter-segment correlation or via library window autocorrelation approximations.
- Confidence interval (log-normal approximation): 10*log10( S_xx ) ± z * sqrt( var_hat ), and include nu and approximation caveats in the manifest.
- For cross-spectrum coherence, declare bias-correction method (e.g., randomization / phase scrambling).
VIII. Engineering Workflow Mx-95 (PSD → Energy Verifier)
- Preprocessing. De-mean/de-trend; if needed, band-pass or anti-alias filter (record H(f) and group-delay compensation).
- Segmentation and windowing. Choose L, H, w[n]; compute and record U_w, ENBW_Hz, Delta_f.
- Estimation and convention. Compute S_xx[k] (Welch); state one-/two-sided and DC/Nyquist handling; for coherence, compute S_xy[k], Coh_xy[k] concurrently.
- Energy reconciliation. Compute sigma_hat^2 = ∑ S1_xx[k] * Delta_f and compare to time-domain variance; output rel_err = | sigma_hat^2 - var(x) | / var(x).
- Time–frequency (optional). Compute S_xx(m,k); for a band of interest, emit P_band(t) = ∑_{k∈B} S_xx(m,k) * Delta_f.
- Report and manifest. Publish spec.parquet|nc, writing fs, L, H, window, Delta_f, U_w, ENBW_Hz, nu, side, units, rel_err.
- Alignment and arrival time (multi-source cases). Use tau_mono internally and publish ts; if path timing is applied, record both T_arr forms and delta_form.
IX. Interface Contract (Aligned with I90 6)
- spectral_density(sig:any, method:str="welch", window:str="hann") -> SpecRef
Expected fields: {"S_xx":"array|tensor", "fs":..., "L":..., "H":..., "window":"...", "U_w":..., "ENBW_Hz":..., "Delta_f":..., "side":"one|two", "nu":..., "qc":{"rel_err":...}}. - spec_to_energy(spec:SpecRef, band:any) -> float
Input band = {"f_lo":..., "f_hi":...} or an index set; return P_band preserving units.
X. Implementation Notes and Recommendations
- Window choice. Leakage suppression first: blackman; balanced trade-off: hann; amplitude accuracy (flat-top compensation): flattop (note larger ENBW_Hz).
- Segment length. L sets Delta_f; prefer increasing L (not excessive smoothing) to resolve narrowband components.
- Overlap. Typical 50%–75%; must record H/L. Overlap does not linearly raise degrees of freedom—report nu or M_eff.
- Unit coherency. When publishing S_xx, explicitly state unit(x) and unit( S_xx ) = unit(x)^2/Hz; for ASD, unit(x)/sqrt(Hz).
XI. Cross-Volume / Cross-Chapter Consistency
- Window conventions (ENBW_Hz, U_w) align with Core.Sea Appendix C; arrival-time notation T_arr, path gamma(ell), measure d ell, c_ref, n_eff follow Core.Sea Chapter 8; synchronization and jitter metrics follow Core.Sea Chapter 3.
- This chapter’s S92-8, S92-9, S92-30..S92-38 are part of the global S92-* ledger; workflow Mx-95 and interface I90 6 are the shared anchors for reuse.
XII. Chapter Highlights
- Window normalization via U_w and ENBW_Hz; Welch-form S_xx for stable estimation; explicit one-/two-sided conversion and DC/Nyquist handling.
- STFT spectrograms are PSD-normalized and respect time–frequency energy consistency; cross-spectra and coherence support inter-channel dependency diagnostics.
- The Mx-95 pipeline makes “spectrum → energy” auditable and reconcilable; I90 6 secures implementation binding and cross-system consistency.
Copyright & License (CC BY 4.0)
Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.
First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/