A smooth signal can still be wrong

Add bias, noise and drift to a synthetic sensor. See what averaging changes, and what needs a reference.

Synthetic temperature signals

Turn down the scatter. Watch the offset stay.

Change one fault at a time, then widen the moving average. The light orange trace is the raw test signal, dark orange is its moving average, and teal is the reference.

All values are synthetic. The same repeatable noise is used every time you change a control.

Assumptions and limits

The reference changes from 20 to 22 °C over 60 seconds, sampled at 10 Hz. The baseline adds a constant +5 °C bias and noise strength 0.8 °C, with zero drift and a 21-sample trailing average. The reference is exact in this teaching model. Real references have uncertainty. A trailing average introduces lag, so the reported smoothed error compares two equally filtered traces.

Smoothing can reduce random scatter. It cannot identify the true temperature without other information or establish calibration.

What did the checks miss?

This fixed challenge set is separate from the controls above. The simple tests use roughness > 0.4 °C, absolute mean reference error > 1 °C, or absolute reference-error slope > 0.02 °C/s. These are teaching thresholds, not instrument acceptance criteria. The spike and flatline cases escape these checks.

Fixed fault challenges, computed by the downloadable Python script
Fault addedRoughness aloneWith reference checksMissed
noiseflaggedroughnessnone in this case
biasmissedreference offsetnone in this case
driftmissedreference offset; reference driftnone in this case
spikemissednot flaggedspike
flatlinemissednot flaggedflatline

Download the computed table · Download the Python experiment · All synthetic data and assumptions

Which fault can survive smoothing?

Taking a real process
beyond the lab?

Jon and I are building RARE Labs toward an autonomous pilot plant builder using AI and robotics. Join the waitlist for updates, and tell us what you’re trying to scale.

Join the RARE Labs waitlist ↗

Sources