EveryCircuit
Contact
Reviews
Home
stanislav_maslovski
modified 11 years ago

Limitations in opamp implementation

4
14
139
01:17:11
In real life this circuit is a variant of the Schmitt trigger, which has two stable states at +Vcc = +15 V and -Vcc = -15 V at the output. A state with any other value of the output voltage is unstable, i.e., the circuit immediately switches to one of the above states because of the positive feedback. The trigger flips between the two stable states (with hysteresis) when the input voltage (orange wire) varies in a range greater than approximately +- Vcc*(R1/R2), i.e., greater than +-1.5 V in this example. EC is unable to correctly simulate this circuit when the input voltage is set initially below the transition threshold (for instance, when the input source is set to 1 V as in this example). In this case, EC just returns the output voltage which corresponds to the unstable linear operating point of the circuit. Adding noise does not seem to help to force the circuit into one of the stable states. Needless to say, there are other simulators known to me which are not able to treat this trivial circuit correctly ;-) Kudos to freax who questioned this originally. UPD: Controlled voltage source demonstrates the same behavior. And for comparison you can see now also what happens in a more realistic operational amplifier (the circuit below).
published 11 years ago
hurz
11 years ago
Yes, you have to cross the schmitt trigger threshold first to leave this semi stable behavior. But i do not see this as a simulator bug. Greetings, Werner.
stanislav_maslovski
11 years ago
Hi, Werner! I understand what you say, and there are other simulators which behave similarly. But maybe it make sense to implement in EC reaction to the injected noise in this case? I.e., you shake the phone and it jumps off the unstable state to one of the stable states? For some reason this does not happen currently.
hurz
11 years ago
But start with 1.51V and you are in schmitt-mode. Only thing which runs me crazy is this CFS. E.g. 1.5V at simstart cause "cant find solution". But I understand if you have circuit which start inside schmitt threshold than it behave wrong to a real schmitt gate. This gate type is so far missing. I already placed a request to Igor to have the ability for all gate types to configure them as schmitt by just change properties. Cheers, Werner.
stanislav_maslovski
11 years ago
All of this, I believe, is due to some limitations in the controlled voltage source implementation in EC, because it is likely that the opamp (as probably other gates too) is implemented internally through the controlled voltage source.
hurz
11 years ago
Think about the following setup. Suppose you have a perfect MOS schmitt inverter. Supply voltage 5V. Input voltage 2.5V. Question, what is the logic output after power startup? High or Low?
stanislav_maslovski
11 years ago
Werner, I understand your point about the perfect opamp or inverter :) What I try to say is that EC could probably even in this case take the advantage of being an *interactive* simulator, and, in case of an unstable (but otherwise valid!) solution injecting noise should push the circuit off this unstable point. Unfortunately, the current EC solver seems to lack the ability to distinguish between stable and unstable operating points.
stanislav_maslovski
11 years ago
... in the case of an opamp or vcvs, I mean.
hurz
11 years ago
If this is your only concern than I recommand to use 100k to 1Meg ratio and shake to kick it into one stable side is working! Hope this helps
stanislav_maslovski
11 years ago
Oh, come on, that is cheating :) In this case the noise will reach a level above threshold, but you perfectly understand I am not talking about that.
hurz
11 years ago
Okok, but you still not answered my question about High or Low! I want you only to underdtand that this startup situation is an undefined state which results for this OpAmp schmitt trigger emulation. And also is an undefined situation for a perfect schmitt trigger.
stanislav_maslovski
11 years ago
Werner, I agree that the situation you describe corresponds to an undefined state. However, I do not agree that EC treats this situation correctly. In real world (if we assume we own a very ideal Schmitt trigger realization), your situation will result in a random behavior with equal probabilities of getting High and Low at the output when you turn on the circuit. Note that in reality it is IMPOSSIBLE to obtain a state with any intermediate voltage between High and Low! EC, however, makes an unprepared user to believe that such states are possible.
stanislav_maslovski
11 years ago
The source of the problem is somewhere in the solver which does not distinguish stable, physically possible solutions, from unstable, unrealistic ones.
hurz
11 years ago
The simulator is perfect and is trapped in a stable state. To get out of this state it need quite a big error which would let the simulator make useless/imperfect for any other circuit. Lets see what Igor thinks about. Cheers Stanislav I have to sleep ;-) see you
stanislav_maslovski
11 years ago
Werner, no, in real life that state is not stable! The simulator, therefore, behaves against physics of the real world in this particular case, and thus is far from been perfect :) Good night!

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy