top of page
Search

Practical use case: Hysteresis

  • Writer: Ivaylo Fiziev
    Ivaylo Fiziev
  • 7 hours ago
  • 1 min read

Hysteresis is a control technique where two different thresholds are used - one for switching ON and one another for switching OFF. This prevents rapid toggling (chatter) when the input signal fluctuates around a single setpoint.


Common use cases are:

  1. Temperature control (heaters, ovens)

  2. Pressure systems (compressors)

  3. Motor control with feedback signals

  4. Tank level control (pump start/stop)


Why it’s needed?

Analog signals often fluctuate slightly. Without hysteresis:

  • A value near a threshold (e.g., 50.0°C) may bounce between 49.9 and 50.1

  • This causes outputs (like heaters, pumps, relays) to switch rapidly

  • That leads to wear, instability, and poor control


A typical implementation looks like this:

FUNCTION_BLOCK "MAIN"
VERSION:1.0
VAR_INPUT
	input : LREAL;		// signal value
	low_limit : LREAL;	// lower threshold
	high_limit : LREAL;	// upper threshold
END_VAR
VAR_OUTPUT
	output : BOOL;		// ON/OFF 
END_VAR
BEGIN
IF #input < #low_limit THEN
	#output := true;
ELSIF #input > #high_limit THEN
     #output := false;
END_IF;
END_FUNCTION_BLOCK

Think of a home thermostat:

  • Heater turns on when it’s too cold

  • Turns off when it’s warm enough

  • Doesn’t constantly toggle at one exact temperature


Design tips:

  1. Choose hysteresis band wide enough to handle noise

  2. A band too wide will affect system performance



 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Subscribe Form

Thanks for submitting!

bottom of page