Hold the truth steady: adaptive hysteresis, dwell time, and clean alerts
Reality check:
Raw temperature near a critical limit is noisy.
If you trigger an alert every time it jitters across that limit, you drown in alarms and operators stop caring.
SSMT solves that in two layers:
- Adaptive hysteresis memory (
Q_phase) that resists jitter. - Clean side detection (
p_side) so you always know which side of danger you’ve effectively been living on.
This section shows how to build that memory in a principled, auditable way.
1.5.x Adaptive hysteresis (rho by noise)
Goal: stabilize warnings near a pivot without hiding real danger.
We dynamically adjust how “sticky” the memory is, based on how noisy the signal is at that moment.
Step 1 — Estimate recent noise (dimensionless)
We watch a sliding window of recent Kelvin samples around the survival pivot.
sigma_T := std( T_K[t-W+1 : t] )
sigma_norm := sigma_T / DeltaT_m
Where:
Wis the recent window length in samples (for example, 30).DeltaT_mis the softness width you declared for that pivot (for example, 2.0 K).sigma_normis unitless. It tells us “how wild is this zone relative to the width of danger.”
Step 2 — Map noise to hysteresis strength (bounded)
Noisier → stronger memory. Calmer → lighter memory.
rho_raw := 1 - exp( - sigma_norm / sigma0 )
rho := clip( rho_raw, rho_min, rho_max )
Where:
sigma0 > 0controls how fastrhoramps up with noise.0 <= rho_min < rho_max < 1.- Higher
rhomeans “don’t flip state too fast.”
Intuition:
- Quiet environment →
rhois lower → system reacts quickly to real change. - Chaotic environment →
rhois higher → system refuses to flap.
Step 3 — Soft side likelihood around the pivot
We compute which side of the pivot we’re currently on, as a smooth value in (0 , 1).
p_side := 0.5 * ( 1 + tanh( k_side * ( T_K - T_m ) ) )
Where:
k_side > 0controls sharpness.p_side≈ 0 means “cold side,”p_side≈ 1 means “hot side,” andp_side≈ 0.5 means “right on the edge.”
This replaces hard boolean flags like is_frozen = (T < 0C) with a smooth, human-readable posture.
Step 4 — Adaptive exponential smoother (the actual memory)
Now we maintain a memory channel Q_phase that encodes which side we’ve effectively been living on, not just this one noisy instant.
Q_phase := rho * Q_phase_prev + (1 - rho) * clip(p_side, 0, 1)
Where:
Q_phase_previs the previous timestep’sQ_phase.Q_phasestays in[0 , 1].- Near 0 means “we have effectively been on the cold/solid-risk side.”
- Near 1 means “we have effectively been on the hot/liquid-risk side.”
- Middle values mean “we are hovering in ambiguity.”
This is the dial you actually escalate on.
Why this matters:
- No flapping: If
T_Kbounces just above and below the danger line for 10 minutes,Q_phasewon’t scream on/off every second. - True dwell time: You can say “trigger sustained-freeze alert only if
Q_phase< 0.2 for 15+ minutes,” or “trigger overheat escalation ifQ_phase> 0.8 and rising.” - Explainability: You can show
Q_phaseto humans and say “we’ve effectively been in the red zone for 14 minutes.” That’s reviewable, not mysticism.
Recommended starting knobs
These are safe defaults to begin with (tune per deployment):
W = 30 # samples in sliding window
sigma0 = 0.1
rho_min = 0.50
rho_max = 0.95
k_side = 0.5 # 1/K scale for the tanh side detector
Initialization for first sample:
Q_phase_0 := clip( p_side_0 , 0 , 1 )
After that, the update is fully deterministic.
1.6 Soft hysteresis near the pivot (summary form)
If you don’t want the adaptive version yet, SSMT also defines the simpler fixed-memory form:
p_side := 0.5 * (1 + tanh(k_side * (T_K - T_m)))
Q_phase := rho * Q_prev + (1 - rho) * clip(p_side, 0, 1)
Where:
k_side > 0sharpens how fast you consider it “crossed.”rho in (0,1)is the memory strength.
How to use this:
Q_phasebecomes your “stay in danger / leave danger” proof.- You alarm on
Q_phase, not on raw °C/°F. - You can say: “Only page a human if
Q_phaseshows we’ve truly been on the hot side of the survival band for 15 straight minutes.”
This solves the classic alarm fatigue problem:
- Refrigerated transport that rings nonstop at 0°C / 32°F.
- Life support systems that scream, calm down, scream again.
- Battery thermal runaway triage that pages six teams because of sensor jitter.
SSMT gives you a clean, auditable, memory-aware dial instead of noise.
Why this is structurally important
At this point you don’t just have a number.
You have:
a_phase: “which side of danger are we on and how deep?” in(-1,+1).Q_phase: “how long have we actually been living in that danger band?” in[0,1].
That pair is incredibly powerful for:
- cold chain custody,
- human survivability envelopes (suit, cabin),
- structural fatigue and warp onset,
- battery pack pre-runaway warning,
- planetary habitat integrity.
It is also easy to audit and explain after an event.
Navigation
Previous: SSMT – Making It Operational: Alignment Dials and Survival Bands (1.4–1.5)
Next: SSMT – Pooling Sensors, Declaring Valid Ranges, and Staying Honest (1.6.x–1.8)
Directory of Pages
SSMT – Table of Contents