What is Hysteresis and how is it used in optical encoders?


Here are a few definitions of the word “hysteresis” I found online:

From Sensorland.com

Hysteresis – Non-uniqueness in the relationship between two variables as a parameter increases or decreases. Also called deadband, or that portion of a system’s response where a change in input does not produce a change in output.


From Wikipedia

A system with hysteresis can be summarized as a system that may be in any number of states, independent of the inputs to the system. To be exact, a system with hysteresis exhibits path-dependence, or “rate-independent memory”[citation needed]. By contrast, consider a deterministic system with classical dynamics but no Hysteresis. In that case, one can predict the output of the system at some instant in time, given only the input to the system at that instant. If the system has hysteresis, then this is not the case; one cannot predict the output without looking at the history of the input, i.e., the state of the system for a given input. In order to predict the output, one must look at the path that the output followed before it reached its current value.

Here is my spin on hysteresis:

The place where we can most relate to hysteresis is in our home.  Furnaces and air conditioning systems use hysteresis to help buffer the set point at which they turn on and off.  If you can imagine having a temperature set point of exactly 70 degrees, the moment the temperature dropped to 69.9 degrees the furnace would come on. If it rose to 70.1 degrees, the AC would come on. You can see how this could result in frequent cycling of the equipment in our home.

In order to reduce this, hysteresis is used to buffer the area around our set point. In HVAC equipment it is often called “temperature swing”.  For example at my house I have a 3 degree swing set up in my programmable thermostat. This means that at a setpoint of  70 degrees, my furnace doesn’t come back on until it reaches 67 degrees.  I could tighten this up to say a one degree swing, but it costs a bit more to heat that way.

For me, it is a careful balance between saving money and keeping my girlfriend from complaining about how cold it is.


How it relates to Optical Encoders:

In optical encoders hysteresis is used to buffer the analog signal coming from the sensor before a switching decision is made.  This is particularly needed when rotary encoders are turning very slowly. As the decision point slowly approaches any variation in signal amplitude due to noise could cause the digital output to quickly switch on and off this would be seen as several quick pulses at the leading and trailing edges of the digital square waves often referred to as “chattering”.

Below is a picture of how too little hysteresis may affect encoder signals. Particularly  in a system with electrical noise.


Below is a representation of the analog signal (shown in red) of an encoder as it crosses the decision point (blue line). The output is the black digital signal.


This is what we would expect, and get,  in a perfect electrical world.  In the real world we have to deal with issues such as electrical noise.

The image below shows how electrical noise introduced in a system can cause extra pulse or “chattering. The noise is shown as a voltage anomaly on the red analog line causing multiple crossing points along the blue decision line, resulting in extraneous pulses at the edge of our digital signal.


In the next image we see how the addition of hysteresis affects the digital output signal. The cyan line represents the delay is decision point or “deadband” that is created by the addition of hysterysis.  The digital signal switches high with the original red analog signal, but doesn’t switch off again until the cyan hysteresis line crosses the blue decision point.

The new hysteresis filtered digital output is shown in magenta with the original unfiltered digital output shown in black.


One would tend to think that the more Hysteresis you add, the better as it adds more noise immunity to the system. This is true, but the other side of adding Hysteresis is that it results in positional error.

Since we are essentially delaying the point at which the digital decision is made, we are delaying the point in rotation before the signal is switched on.

In the image above when comparing the black digital signal to the magenta one we notice how the switch off point has been delayed in time. This is real system error that is the cost of hysteresis.

We can compare this to a HVAC system in that additional hysteresis around the temperature set point makes it easier for the system to withstand thermal “noise”, such as a quick temperature variation from opening a door, but ultimately keeps the system from tightly regulating to a temperature set point.

Encoder manufacturers always have to carefully balance the amount of hysteresis they add against the error introduced in the system from it.

The way that Quantum Devices fights this is through the use of their interlaced sensor, and use of differential signals to determine switching points. The interlaced sensor provides a large amplitude signal when compared to typical noise introduced into a system, so that minimum hysteresis is needed when making the switching decisions.


Hysteresis in Magnetism
Here are some links to some information on the origin of the word hysteresis and how it relates to magnetism.

Magnetic hysterysis in the iron core or “stack” of electric motors is what is responsible for a significant portion of heat build up.
The last link is particularly interesting as it talks about how hysterysis curves in magnetic materials may not be smooth.





Quantum Devices Inc. is a leading manufacturer of optical rotary encoders their main website is at www.quantumdev.com They can be contacted via e-mail at info@quantumdev.com.




About Quantum Devices Inc.
Quantum Devices, Inc. (QDI) Barneveld, WI, was established as a Wisconsin corporation in October 1989, as an outgrowth of activities in the general area of optoelectronics. The main goal of QDI is to provide customers with a complete source for all stages of product design and development, starting from concept to a marketable commodity. These products include application specific Silicon Photodiodes, Optical Encoders and Light Emitting Diodes (LED) for commercial, industrial and medical applications. QDI's photodiodes and LED's are used in instrumentation for photosynthesis and photobiological research, biomedical and medical instrumentation for measuring blood sugar levels (glucometer), oxyhemoglobin and pulse rate (pulse oxymeter). One of the most dramatic products developed at QDI was the application of LED lighting systems for use as the light source for Photodynamic Therapy (PDT). Sales of QDI products include both domestic and international markets. Quality and reliability are very important concepts in maintaining our company wide commitment to overall product performance. Quality simply means continuous process improvement. We are committed to continually increasing our product excellence through increased quality and reliability. Quantum Devices, Inc. is ISO 9001 certified and the ISO Standard will provide the guidance for the vital function of maintaining our commitment to constantly improve our product quality. Quantum Devices is now proud to introduce it's new line of rotary encoders. Incorporating QDI's patented sensor technology, our QPhase™ Family of Encoders feature high resolution, increased frequency response and superior reliability over temperature (0 to 120 degrees C). QDI incremental and absolute encoders set a new standard and are backed by a 2 year factory warranty. We invite you to request an evaluation unit, additional information or price quotations. Mission Statement Quantum Devices is dedicated to the principle that light provides the power for all life on earth. We believe the quality, delivery and control of light is essential to the wellness of man and his advancement into the future.

2 Responses to What is Hysteresis and how is it used in optical encoders?

  1. Regis says:

    Excellent post, sincerity one of the best.

    But, how we can eliminate this problem in a PLC or microcontroller?


    • Thanks for the kind words.

      I guess to answer your question I would need a bit more specific information on the type of problem you are talking about.

      In general, Hysteresis is added to a closed loop system in order to eliminate dithering around a set point. In the furnace example I used, we create a difference between the on and off set points to eliminate rapid turning on and off of the furnace.

      In order to add Hysteresis to a controller you would create two set points instead of one, an “on” and an “off set point. The further apart these two set points are, the greater the hysteresis in the system.

      Hope this helps, but let me know if you need something more specific.

      Thanks again for the comment.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: