Hysteresis in Analog Circuits: Comparator and Operational Amplifier Circuits

September 13, 2019 Cadence PCB Solutions

Pentode amplifier


Hysteresis is one of those concepts with a fancy name and a deceptively simple meaning. Many physical systems, including plenty of electronic components, exhibit hysteresis. In essence, the state of the system depends upon events that occurred in the system at all previous points in time. Although this might sound like an odd occurrence, it is common and very useful in a variety of electronic circuits. You can take advantage of hysteresis in analog circuits and even build hysteresis into your circuits using feedback and saturation, providing plenty of useful functionality.

What is Hysteresis Phenomena

Hysteresis phenomenon occurs when ferromagnetic materials are magnetized in one direction; even when the imposed magnetizing field is removed, ferromagnetic materials will not relax back to zero magnetization. Because the material can only be driven back to zero with a field in the opposite direction, there is a lack of retraceability known as hysteresis. 

When this occurs, applying an alternating magnetic field will yield a hysteresis loop. Because ferromagnetic materials have this phenomenon occurring predictably, it can be useful as a predictive or stabilizing mechanism. This is because some ferromagnetic materials retain magnetization. 

An Example: Operational Amplifiers vs. Comparators

Hysteresis in analog circuits is useful for controlling switching in circuits with saturation (i.e., transistors), although it is undesirable in some circuits. As an example, hysteresis can be purposefully added to a comparator circuit as it can be used to set the duty cycle of the output waveform.

If this sounds odd, then you can consider two fundamental (and seemingly equivalent) components: comparators and operational amplifiers. Note that an operational amplifier can be used as a comparator, but not all comparators act like amplifiers, thus the two terms are sometimes used interchangeably. Hysteresis plays an important role in both circuits, and understanding these circuits provides circuit designers with a baseline for understanding the use of hysteresis in more advanced circuits.

If we compare two common ICs with these components (LM324 and LM339), it becomes easier to see how hysteresis plays a role in some analog circuits and can be used to control the desired switching behavior in these circuits.


LM324 and LM339 pin diagrams

Operational amplifier (LM324) and comparator (LM339) pin diagrams


Although the circuit symbols and pin diagrams are similar, the output stage from the comparator is an open collector (grounded emitter). This means that the output from the comparator is optimized for saturation, thus the comparator is really a 1-bit ADC. In contrast, the output stage from the operational amplifier is optimized for linear operation, either as an inverting or non-inverting element with gain.

As an input analog signal continuously changes at the inputs in either circuit, this induces switching behavior at the output. The output can switch at different input voltages in the presence of hysteresis. This difference is seen when one compares the output as the input rises or falls. Similar behavior can be seen when there is hysteresis in analog circuits with other elements, particularly in nonlinear circuits with saturation.

Hysteresis in an Operational Amplifier

Just as positive feedback produces hysteresis in a comparator, it does the same in an operational amplifier. This forms a Schmitt trigger circuit. Note that, if an operational amplifier is driven to saturation as a closed-loop circuit (i.e., with hysteresis thanks to a feedback loop), then the output can also saturate and provides the same function as a comparator, although major manufacturers will recommend that this not be done. This is because the amplifier’s recovery time is not normally designed to a specific value in common operational amplifiers, including the LM324.

Hysteresis in a Comparator

Hysteresis is important for producing stable switching behavior in a comparator circuit. This hysteresis is added by including a positive feedback loop between the output and one of the inputs, which then defines the threshold for switching as the input signal rises and falls. Noise on the input signal in a comparator circuit can produce multiple transitions as the input signal rises. Intentionally adding hysteresis to a comparator circuit is useful for suppressing this unintended switching due to noise. An analogous application is to eliminate contact bounce in mechanical switches, which will also produce unintended switching.


Suppressing unintended switching with hysteresis in analog circuits

Suppressing unintended switching in a comparator circuit


This added hysteresis can also be used to define the duty cycle of the output square wave, depending on the exact shape of the input AC waveform (i.e., charging/discharging capacitor or a sinusoidal waveform). When the input is rising, it forces the comparator to switch at a different voltage than when the input is falling. This is because the feedback loop sends some current from the output back to the input, which changes the magnitude of the signal seen at the input.

Analyzing Hysteresis in Analog Circuits

The fundamental tool for analyzing hysteresis in analog circuits is a hysteresis loop. In a hysteresis loop, you can visualize how some output characteristic (e.g., the voltage and/or current) changes as the input signal changes over a predetermined range of values. This type of graph can be easily constructed from two temporal waveforms for the input and output signals. When the output is graphed as a function of the input, you should see a loop that is similar to what one would observe with a Schmitt trigger circuit.

As discussed above, the size of the hysteresis window can be a function of the frequency of the input analog signal when capacitive or inductive elements are added to the feedback loop. The size of the hysteresis window can also be affected when multiple comparator/operational amplifier circuits are cascaded in your networks. The amplitude of the input signal will also affect the size of the hysteresis window, especially cascaded networks. You can analyze the behavior of the network with an AC sweep simulation and small-signal analysis.


Graphs showing hysteresis in analog circuits

Example input and output waveforms (left) and the corresponding hysteresis window (left). Note that the dashed lines show nearly corresponding locations in each graph.


Whenever you are incorporating hysteresis in analog circuits, you need a strong circuit simulator that helps automate a number of important analyses like plotting a B-H curve of a core, for example. A B-H curve tells how the magnetic properties of used materials responded to outside magnetic forces. 


PSpice’s Model Editor for a B-H curve

Managing a hysteresis curve is easy with PSpice’s Model Editor


Using PSpice Designer for OrCAD can help you analyze your designs as they become more complex. This unique set of features takes data directly from your schematic and gives you a full view of the behavior of your circuits, even B-H curves can be plotted easily. 


About the Author


Follow on Linkedin Visit Website More Content by Cadence PCB Solutions
Previous Article
Working with MOSFET SPICE Models in Circuit Analyses
Working with MOSFET SPICE Models in Circuit Analyses

Here’s what you need to know about different MOSFET SPICE models in different circuit analyses.

Next Article
How the Thermal Conductivity of Your PCB Substrate Affects Performance
How the Thermal Conductivity of Your PCB Substrate Affects Performance

Here’s what you need to know about the thermal conductivity of your PCB substrate, how it affects your boar...