Technical Article

Hysteresis - Error and Compensation in Control Systems

May 05, 2022 by Shawn Dietrich

Hysteresis is a term introduced in basic control system courses and listed on sensor datasheets, but the terms is not often understood, with error deriving from both the system itself as well as the sensor.

What Does Hysteresis Mean?

Hysteresis is a common term used in the automation industry when referring to sensors that detect objects or measure physical change. Hysteresis can be defined as the amount of error in sensing between the applied control signal and the resulting change in the system. For example, if we look at a pressure sensor, the hysteresis would be the amount of error in the measured value right after pressure is applied to the sensor, before the system has a chance to respond. Once the system under pressure finally comes to a steady state, the amount of error is reduced.


Control system

Figure 1. Hysteresis is an unavoidable characteristic of temperature, pressure, motion, and many other systems. Image used courtesy of Canva


It’s important to note that for a small amount of time after the pressure is applied to the sensor, the reading of the value will not be 100% accurate. Most sensors themselves will have some kind of hysteresis, published within the user manual or datasheet of the sensor. When the sensing data is graphed over time, we can see hysteresis is not linear and it can therefore be very difficult to calculate the expected amount of error.

Why is There Hysteresis In Sensors?

Within any sensor is some kind of material or electronic device that does the actual measuring. With inductive metal sensors, there are electronics that measure the eddy currents within the material being measured. In the case of temperature sensors, there are dissimilar metals that produce different resistance or a change in current as the temperature of the environment changes. Even solid-state transducer elements experience a delay time in voltage rise as current is required to flow.

When these sensors detect a physical change of state in the system, it takes some time for the system within the sensor to adapt to this change and reflect the change to the output. If the change of state is large, that will reflect in the hysteresis or error in the measurement. The amount of time the sensor takes to come to a steady state is very short but if we are using a sensor to stop motion or to control a reactive process, even small fractions of a second will be important.


Pressure transducer

Figure 2. Pressure transducer. Image used courtesy of RS Components


What is Hysteresis In a System?

The hysteresis within a sensor really cannot be controlled, only accounted for, but sometimes we will build hysteresis into a system. Earlier we said that hysteresis is an amount of error, another way of looking at hysteresis is the amount of allowable error within a system.

Consider a precise temperature controller scenario, where the hysteresis would be the amount above or below the respective setpoints where the system will turn on cooling or heating. Typically we would have a setpoint for our system for a high and low limit, say we want the cooling system to engage at 80°F, and the heating system at 50°F. In this example, if we turned on the heater at exactly 50°F, there would still be some time in which the system is cooling down before the sensor registered a temperature rise. The desired compensation for hysteresis may mean we should engage the heater at around 55°F. The compensation should include both the system hysteresis and that of the sensor itself.



Figure 3. Thermocouples with M12 connectors. Image used courtesy of Omega Engineering


How is Hysteresis Error in a Sensor Measured?

Hysteresis error occurs when the value being measured (like pressure) is increasing or decreasing, and it might not be the same in both directions. The total error then, is the sum of the error (actual value versus minus sensor output value) in both the positive-going plus negative-going directions. This value is typically provided by the manufacturer of the sensor in the form of a positive or negative percentage of the sensor’s measuring range. This error can be concerning if you are trying to take extremely accurate measurements on a dynamic system.

Remember, hysteresis is for a dynamic system, meaning this error occurs during the change of state, there is no error from hysteresis when the system is at a steady state, only error from measurement inaccuracy. It is also important to note that hysteresis error for the temperature or pressure system itself will never come from a datasheet, only by careful measurement or advanced simulation of a system. Manufacturers can only provide information about the hysteresis error for a particular device.


Strain Gauge

Figure 4. Strain gauge load cell. Image used courtesy of Omega Engineering



The hysteresis of a sensor can be a very important detail if your application requires high-speed feedback. For example, referencing a servo motor that is driving a linear slide. After a servo motor has been installed into a linear slide, the slide must be brought to a known position. From this known position we can record the servo encoder position or use an internal function block to reference the servo. If we were to use a proximity sensor to flag the servo as being in the known position, the hysteresis of the sensor will affect the reference position. This could result in accuracy issues within the servo position. Another example would be a through-beam sensor on a robot gripper. If the sensor is used to search for a single part within a stack of parts, the hysteresis will affect the final position of the robot.

There are some tricks we can use to reduce the hysteresis error. When using a sensor during motion we can use a higher velocity rough search and then a slower, more accurate search path when the target gets closer. In the robot example, we would first search toward the stack. When the sensor comes on, we stop the robot, and then pass back in the opposite direction at a slower speed until the sensor goes off. The same is true with the servo example, using a rough search and then a slower search in the opposite direction reduces the amount of hysteresis error, therefore, making a more accurate system.


Hysteresis in any real-world system is produced by two elements: the delay between output and system response, as well as between the sensor value input and signal output. Being able to carefully measure the system response and understanding the hysteresis values on a specification sheet can greatly improve the accuracy of a system.