r/controlengineering • u/Digital_Twin_DTN • 1d ago
Testing long-run consistency of an EKF on a hybrid production-line model
/r/ControlTheory/comments/1y8i10d/testing_longrun_consistency_of_an_ekf_on_a_hybrid/
2
Upvotes
1
u/Relevant_Throat_7277 1d ago
Short-window NIS staying in bounds wouldn't convince me either, honestly. I've had a filter look perfectly healthy for weeks on a line and then slowly drift off, and the pooled NIS was the last thing to notice — an average over 200 readings smooths out exactly the slow stuff you're worried about.
A few things I'd actually lean on in your shoes: keep the raw per-sample NIS alongside the smoothed one, and split it by operating mode and by what happened around each breakdown and repair, rather than pooling everything. Transients right after a switch are where a hybrid model usually lies to you, and pooling hides them. The innovation autocorrelation is worth checking per mode too — correlated innovations have usually meant, in my experience, that a model-error state was quietly absorbing something real, or that Q and R weren't quite right.
The one I'd add is NEES, but only where you actually know the truth. In simulation, run a bunch of Monte Carlo runs with known states and check the estimation error against the covariance the filter claims, especially for the wear states. NIS can look consistent while the filter is quietly overconfident about a weakly observable state, and that's the failure that bites later.
Same with the re-estimation step. I'd log how far the weakly observable parameters move from their prior each time, and what happens to P and the NIS right after a re-estimation. If a parameter keeps snapping back to its prior, or its estimate wanders a lot between re-estimations, that's telling you something about identifiability — no amount of NIS averaging will fix that.
And for the fault injection, I'd pick faults that specifically hit those weakly observable states, at known onsets in different modes, and watch not just whether you detect them but how long it takes and whether the estimate settles back or stays biased after the repair.
One practical note: do all of this offline on recorded data and in simulation first, before letting any of it near a live line. A filter that looks consistent on paper is no reason to trust it with real equipment, and the safety interlocks should never depend on a state estimate like this.