dsfb
Drift-Slew Fusion Bootstrap (DSFB): a trust-adaptive nonlinear state estimator for tracking position (phi), drift (omega), and slew (alpha) across multiple measurement channels.
In practical terms, this crate:
- takes one scalar measurement per channel at each time step
- predicts a three-state model
phi,omega,alpha - computes per-channel residuals against the predicted position
- tracks an exponential moving average of residual magnitude
- converts those residuals into normalized trust weights
- applies a bounded residual correction to the state estimate
Use dsfb when you want a small deterministic observer that can keep fusing redundant scalar channels while automatically downweighting channels whose residuals stop behaving like the rest.
What goes in and what comes out
Inputs:
DsfbParams: observer gains and trust parameters- channel count: number of scalar measurement channels
- initial state:
DsfbState { phi, omega, alpha } - per-step data:
&[f64]measurements plusdt
Outputs:
- corrected
DsfbState - per-channel trust weights through
trust_stats()/trust_weight() - per-channel residual-envelope state through
ema_residual()
Install
From crates.io:
[]
= "0.1.2"
To track unreleased changes, use Git:
[]
= { = "https://github.com/infinityabundance/dsfb", = "main" }
Quick Start
use ;
let params = new;
let mut observer = new;
observer.init;
let dt = 0.01;
let measurements = ;
let state = observer.step;
println!;
At each call to step, DSFB predicts the next state, compares all channels to that prediction, and uses trust-weighted residual aggregation to decide how much the observer should move.
Simulation Example
From workspace root:
Outputs:
output-dsfb/<timestamp>/sim-dsfb.csv- metrics summary in console
Google Colab note:
- Click
Run allfirst. - If prompted for input data, click
Browsein the file picker and uploadsim-dsfb.csv(or your generated CSV file).
Repository
Full documentation, notebooks, and verification scripts: https://github.com/infinityabundance/dsfb
Separate Crate In This Repo
For the separate synthetic benchmarking package used for fusion diagnostics paper workflows, see:
crates/dsfb-fusion-benchcrates/dsfb-fusion-bench/README.md
Citation
de Beer, R. (2026).
Slew-Aware Trust-Adaptive Nonlinear State Estimation for Oscillatory Systems With Drift and Corruption (v1.0).
Zenodo. https://doi.org/10.5281/zenodo.18642887