Hysteresis

2 Posts

Why Dead Zones and Static Friction Keep Small Errors from Disappearing

7 minute

One of the most confusing closed-loop symptoms is a small error near the target that never disappears.

A valve command changes slightly, but flow does not change. A motor receives a small output, but the shaft does not move. A servo is almost at target, but remains stuck. A stage has a tiny position error, and the controller keeps correcting, but the mechanics do not respond.

The controller is computing. The output variable is changing. The device is not moving.

Read More

Why Sensor Thresholds Need More Than One If Statement

4 minute

Many sensor features eventually become a condition:

if (value > threshold) {
    alarm = true;
}

This looks reasonable, but real devices usually need more.

Sensor values jitter. Environments drift. Samples hit spikes. User actions may stay near the boundary. With only one threshold, the device can bounce between triggered and not triggered.

A better model is:

raw value
-> filtered value
-> threshold check
-> hysteresis, debounce, confirmation
-> state machine
-> product action

The threshold is only one part of state detection.

Read More