Skip to main content

Module baseline

Module baseline 

Source
Expand description

DSFB-Debug: baseline computation — healthy-window statistics.

§Role in the pipeline

Computes the nominal reference x_hat(k) and the admissibility envelope radius ρ from the healthy-window slice of the residual stream. These two values anchor the entire downstream evaluation:

  • x_hat(k) is subtracted from x(k) to produce r(k) = x(k) - x_hat(k) (paper §5.2; see residual.rs).
  • ρ defines the admissibility envelope E(k) = { r : ‖r‖ ≤ ρ } (paper §5.4; see envelope.rs).

§Healthy-window contract

Per paper §F.4, the “healthy window” is the first N fault-free windows of the residual stream. The harness identifies the healthy slice via OwnedResidualMatrix.healthy_window_end from the upstream fixture metadata. The bound is operator-supplied, never inferred from data — DSFB-Debug refuses to fit baseline statistics on suspected-fault windows.

§Numerical stability

Mean is two-pass (compensated summation); standard deviation is single-pass with explicit (n - 1) Bessel correction. No NaN propagation — NaN inputs are treated as imputed downstream. Square-root delegates to envelope::sqrt_approx_pub so the no_std core needs no libm/std::f64 dependency.

Functions§

compute_baseline_envelope
Compute per-signal envelope radii (3σ) from healthy residuals.
compute_baseline_mean
Compute the per-signal mean from a healthy window.