Home / Docs-Technical WhitePaper / 08-EFT.WP.Core.Sea v1.0
Chapter 5 — Spectral Analysis and Features
I. Objectives and Scope
- Provide a coherent family of estimators that take discrete-time x[n] to power spectral density S_xx(f) (periodogram / Welch / multitaper), with unified units and normalizations.
- Define a feature family—peaks, band energy, spectral centroid, spectral flatness, harmonic clusters, coherence and phase—together with robustness assessment, consistent with Chapter 2 (sampling & quantization), Chapter 4 (H(f) conditioning), and Chapter 3 (tau_mono/ts time bases).
- Deliver postulates P85-, minimal equations S85-, and the execution workflow Mx-5 for spectral analysis; align with interfaces I80-4 (fft/psd/feature_extract).
II. Core Objects and Unit Conventions
- DFT and frequency axis
X[k] = ∑_{n=0}^{N-1} x[n] * w[n] * exp( -j * 2 * pi * k * n / N ).
f[k] = k * fs / N, Delta_f = fs / N, with k ∈ {0,...,N-1}.
Window power-normalization U_w = ( 1 / N ) * ∑_{n=0}^{N-1} w[n]^2; coherent gain G_c = ( 1 / N ) * ∑_{n=0}^{N-1} w[n]. - One- vs two-sided spectra and units
One-sided PSD: S_xx^1(f) ≈ 2 * S_xx^2(f) (except f=0 and f=fs/2); unit remains unit(x)^2 / Hz.
Amplitude spectral density ASD(f) = sqrt( S_xx(f) ), with unit unit(x) / sqrt(Hz).
Parseval consistency: ∑_{n} |x[n]|^2 / N ≈ ∑_{k} S_xx(f[k]) * Delta_f under proper normalization.
III. Postulates P85- (Consistency of Spectral Estimation)*
- P85-1 Units and normalization
Every PSD report must explicitly state {one_sided | two_sided}, U_w, and whether the factor of 2 was applied; feature computations must use the same convention. - P85-2 Leakage and windowing
When windowing, provide mainlobe width and sidelobe suppression A_sl_dB; for in-band peak measurement, ensure the peak falls within the mainlobe or apply interpolative correction. - P85-3 Statistical independence
With Welch or multitaper averaging, report effective independent averages K_eff (or equivalently nu_eff degrees of freedom); all variance/confidence bounds are based on this. - P85-4 Time–frequency consistency
For STFT, declare window length L and hop H, and record Delta_t ≈ L / fs and Delta_f ≈ fs / L; align time with tau_mono, publish with ts. - P85-5 Arrival time and phase
Any phase- or group-delay-based feature must compensate the Chapter 4 phase of H(f); otherwise label as uncompensated and quantify potential bias.
IV. Minimal Equations S85- (Estimators and Bounds)*
- S85-1 Periodogram normalization
P_xx[k] = | X[k] |^2 / ( N * fs * U_w ) (two-sided).
One-sided correction: P_xx^1[k] = 2 * P_xx[k], k ∈ (0, N/2). - S85-2 Welch averaging and variance
Split into K segments of length N_s with overlap o ∈ [0,1):
S_hat_xx(f[k]) = ( 1 / K ) * ∑_{i=1}^{K} | X_i[k] |^2 / ( N_s * fs * U_w ).
Independent DOF nu_ind ≈ 2 * K * ( ( ∑ w^2 )^2 / ∑ w^4 ); with overlap correlation nu_eff = nu_ind / c_ovlp, c_ovlp >= 1.
Variance (approx.): Var[ S_hat_xx(f) ] ≈ 2 * S_xx(f)^2 / nu_eff. - S85-3 Multitaper estimate
With P DPSS tapers: S_hat_xx(f) = ( 1 / P ) * ∑_{p=1}^{P} | FFT( v_p * x ) |^2 / ( N * fs * U_{v_p} ), and nu_eff ≈ 2 * P. - S85-4 Spectral-peak interpolation (parabolic)
With powers P_- , P_0 , P_+ at bins k-1, k, k+1:
delta = ( P_+ - P_- ) / ( 2 * ( 2 * P_0 - P_- - P_+ ) ),
f_peak ≈ ( k + delta ) * fs / N; amplitude correction A_peak ≈ P_0 - 0.25 * ( P_- - P_+ ) * delta. - S85-5 Band energy and bandwidth
BandPower( f1,f2 ) = ∑_{k: f1<=f[k]<=f2} S_hat_xx(f[k]) * Delta_f.
f_centroid = ( ∑ f[k] * S_hat_xx[k] ) / ( ∑ S_hat_xx[k] ),
SpecBandwidth = sqrt( ( ∑ ( f[k] - f_centroid )^2 * S_hat_xx[k] ) / ( ∑ S_hat_xx[k] ) ). - S85-6 Spectral flatness and tonality
SF = exp( mean( ln S_hat_xx[k] ) ) / mean( S_hat_xx[k] ).
Tonalness ≈ 1 - SF (heuristic, [0,1]). - S85-7 Cross-spectrum and coherence
S_xy(f) = E[ X(f) * Y(f)^* ], Coh^2(f) = | S_xy(f) |^2 / ( S_xx(f) * S_yy(f) ) ∈ [0,1].
phi_xy(f) = arg S_xy(f). With nu_eff DOF, the null-threshold for Coh^2 at size alpha is approximated by Coh_alpha^2 ≈ 1 - alpha^( 1 / ( K_eff - 1 ) ) (independent segment approx.).
V. Windows and Leakage Management
- Mainlobe vs sidelobes
Hamming/Hann: lower sidelobes, slightly wider mainlobe; Blackman: even lower sidelobes; Kaiser tunes A_sl_dB vs mainlobe via beta. - ENBW and resolution
ENBW = fs * ( ∑ w[n]^2 ) / ( ( ∑ w[n] )^2 ); the effective resolution bandwidth RBW ≈ ENBW.
Peak resolvability: | f_a - f_b | >= RBW.
VI. Feature Family Definitions (F85-*)
- F85-1 Peaks and harmonics
f_peak, A_peak via S85-4; estimate fundamental f0 by maximizing ∑_{h=1}^{H} S_hat_xx( h * f0 ).
HarmonicRatio = ( ∑_{h=2}^{H} S_hat_xx( h * f0 ) ) / S_hat_xx( f0 ). - F85-2 Band energy and SNR
SNR_band = 10 * log10( BandPower(signal_band) / BandPower(noise_band) ), with noise band excluding ±RBW around detected peaks. - F85-3 Spectral centroid and bandwidth
f_centroid and SpecBandwidth per S85-5; compute per band for fingerprinting. - F85-4 Flatness and roughness
SF per S85-6; Roughness ≈ Var( diff( log S_hat_xx[k] ) ) (discrete proxy). - F85-5 Coherence and phase offset
Coh^2(f), phi_xy(f); aggregate in-band as
Coh_band = mean_{f ∈ band}( Coh^2(f) ), Phase_band = atan2( ∑ Im S_xy , ∑ Re S_xy ). - F85-6 Fault tolerance and missingness
With missing mask m[n] ∈ {0,1}, use the same window per segment, normalize by effective sample count in U_w, and record missing rate in the manifest.
VII. Time–Frequency Analysis and Tracking
- STFT
STFT[m,k] = ∑_{n} x[n] * w[n - m*H] * exp( -j * 2 * pi * k * n / N_w ).
Spectrogram Spec[m,k] = | STFT[m,k] |^2 / ( N_w * fs * U_w ). - Resolution tradeoffs
Delta_t ≈ N_w / fs, Delta_f ≈ fs / N_w, with Delta_t * Delta_f ≈ 1; the hop H controls time sampling. - Trajectories and drift
Track f_peak[m] via windowed interpolation S85-4; define drift = max | f_peak[m+1] - f_peak[m] | as a rate-of-drift feature, aligned with Chapter 9 drift monitoring.
VIII. Robustness and Uncertainty
- Amplitude bias correction
For a single tone, divide by coherent gain: A_tone ≈ ( 2 / N ) * | X[k0] | / G_c (one-sided). - Variance and confidence intervals
CI_alpha(f) ≈ S_hat_xx(f) * [ nu_eff / χ^2_{1-α/2}(nu_eff) , nu_eff / χ^2_{α/2}(nu_eff) ] (chi-squared approx., independent segments). - Cross-checks
Vary N_s/overlap/window (or P for multitaper) to gauge sensitivity of S_hat_xx; if changes exceed thresholds, increase K or switch to multitaper.
IX. Workflow Mx-5 (Spectral Analysis and Features)
- Set objectives: fs / Delta_f / RBW / K or P / one_sided and bands {band_i}; import the Phase compensation plan for H(f) from Chapter 4.
- Choose estimator: method ∈ {"periodogram","welch","multitaper"}, set N or N_s/overlap (or P).
- Window & normalization: choose w[n], compute U_w / G_c / ENBW; declare one-/two-sided convention and units.
- Compute PSD: produce S_hat_xx(f) (and S_hat_yy(f), S_hat_xy(f) as needed); estimate nu_eff and variance.
- Extract features: per band compute BandPower / SNR_band / f_peak / f_centroid / SF / Coh^2 / phi_xy, etc.
- Robustness check: perturb N_s/overlap/window or P; ensure relative feature change <= epsilon_feat.
- Manifest & publish: record parameters and versions; output feature tables with uncertainty columns; for T_arr-related phase features, mark compensation status.
X. Interface Bindings and Returns (I80-4)
- fft(sig:any, window:str="hann") -> complex[]
Returns X[k]. Caller completes unit normalization and one-sided conversion; return G_c / U_w as helpful metadata. - psd(sig:any, method:str="welch", seg:int=8, overlap:float=0.5) -> dict
Return keys: {"f":float[], "Sxx":float[], "one_sided":bool, "U_w":float, "G_c":float, "nu_eff":float, "window":str, "overlap":float}. - feature_extract(sig:any, feats:list[str]) -> dict
Supported: "f_peak","A_peak","bandpower:{f1,f2}","snr:{sig,noise}","f_centroid","spec_bw","sf","coh:{y,band}","phi:{y,band}".
Include {"uncertainty":..., "nu_eff":..., "manifest_ref":...} in results.
XI. Manifest — Minimal Fields
- {method, window, N or N_s, overlap, one_sided, U_w, G_c, ENBW, nu_eff, RBW, bands:[{f1,f2}], H_phase_comp:{"enabled":bool,"ver":str}, ts_range, missing_rate}.
- Feature tables must reference this manifest and record epsilon_feat, CI_alpha parameters, and alpha.
XII. Interlocks and Cross-Volume References
- With Chapter 2: enforce consistency among ENOB/DR/Delta_f; ensure RBW is not below physical resolvability.
- With Chapter 3: keep tau_mono/ts time bases monotone in STFT indexing; combine jitter J (SNR_jitter) impact on high-frequency peaks per Chapters 2 & 4.
- With Chapter 4: any phase-/group-delay-related feature must apply H(f) compensation.
- With Chapter 8: any T_arr frequency-domain estimation must report under the same gamma(ell) and c_ref / n_eff convention.
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/