3
\$\begingroup\$

When using the virtual ground concept to analyze op-amp circuits, the sign of the inputs (inverting/noninverting) don't seem to matter. Is this also the case in actual circuits? I also tried to simulate a circuit in the everycircuit android app and I can't see any effect of interchanging the inputs on the output.

Imgur

I tried solving for the voltage gain \$\frac{V_o}{V_1}=\frac{A_dV_i}{V_1}\$ by finding the limit of the ratio as \$A_d\$ approaches infinity. I got the same expression for both circuits, which is \$-\frac{R_f}{R_1}\$.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Doesn't say much for the app. Are you sure it's an opamp and not an instrumentation amp.? \$\endgroup\$ Jul 21, 2014 at 13:32
  • \$\begingroup\$ I'm not sure. But even so, wouldn't analysis of the circuit with the assumptions that (1) voltage across the input terminals is zero, and (2) no current flows through the input terminals yield the result that the inputs are interchangeable? \$\endgroup\$
    – Phil S
    Jul 21, 2014 at 13:38
  • \$\begingroup\$ That (1) assumption has a precondition, which can be expressed as "the feedback must be negative". (There are some more, like inputs and outputs being in the valid range.) \$\endgroup\$ Jul 21, 2014 at 14:00

6 Answers 6

6
\$\begingroup\$

When I teach introductory op-amp analysis techniques, I emphasize the following to start with:

(1) Check for the presence of negative feedback. This means that the output of the op-amp is connected via some network to the inverting input of the op-amp.

(2) If negative feedback is present, assume the inverting and non-inverting input voltages are equal (not zero!).

In the case that negative feedback is present, the output of the (ideal) op-amp will be whatever it needs to be to make the inverting input voltage equal to the non-inverting input voltage.

To see this, assume that the non-inverting input voltage is made slightly (infinitesimally) more than the inverting input voltage. This should make the output more positive which will act to increase the inverting input voltage thus restoring the equality of the input voltages.

But what happens if we interchange the inputs? Rather than the inverting input, the output is connected to the non-inverting input instead. This is called positive feedback.

Now, as before, assume that the non-inverting input voltage is made slightly (infinitesimally) more than the inverting input voltage. As before, This should make the output more positive but, now, this will act to make the non-inverting input even more positive than the inverting input. The equality of the input voltages will not be restored, in fact, the non-inverting input voltage and output voltage will 'run away' - a real op-amp output will reach its maximum level and stay there.

So, despite the fact that a mathematical solution with equal input voltages exists in the case there is positive feedback, the solution isn't physically relevant since it is unstable - any disturbance will drive the circuit away from, rather than back to, the solution.

\$\endgroup\$
2
\$\begingroup\$

The REAL op amp output is G*(V+ - V-). "G", here, is the internal gain of the op amp, and is very high. In fact, when we assume G is infinite, and that zero current can enter the input terminals (both of which are APPROXIMATELY true), lovely things start to happen so long as the op amp is in a NEGATIVE FEEDBACK configuration. What sort of things? Well, for one, both input terminals must end up at nearly identical voltages. Why? Well, if the difference between V+ and V- is bigger than infinitessimal, when you multiply it by infinite G, the output must saturate.

So, we derive some lovely rules that determine ideal op amp behavior, and then we forget what the assumptions are. Bottom line, there is a clear difference between the two input terminals, but the "rules" we come up with to describe op amp behavior let you forget this difference, to ill effect.

\$\endgroup\$
1
\$\begingroup\$

No, you can't flip the + and - inputs of a opamp and still expect the circuit to work.

Think about it. Draw out a circuit that uses a opamp, then flip the two inputs and analyze the circuit again. It's not going to work the same as the original circuit.

\$\endgroup\$
4
  • \$\begingroup\$ Whoever downvoted this, what exactly do you think is wrong? \$\endgroup\$ Jul 21, 2014 at 14:24
  • \$\begingroup\$ (I didn't downvoted this, but want to explain some caveat). Some DC analysis solvers 'converge' opamps in both configurations. This accidentaly cause generators not to start up after initial DC analysis. \$\endgroup\$
    – Vovanium
    Jul 21, 2014 at 15:04
  • \$\begingroup\$ I didn't think it was wrong, I just thought the answer was rather brief, didn't contribute much and was not up to your usual standards. You talk about analyzing the circuit, I expected you to show this. \$\endgroup\$
    – tcrosley
    Jul 21, 2014 at 17:15
  • \$\begingroup\$ @tcrosley: Ah, OK. At the time it was the only answer, and I thought this was rather a dumb question that would be dispatched with quickly. This was all before the OP added schematics and some analisys to the question. \$\endgroup\$ Jul 21, 2014 at 17:41
1
\$\begingroup\$

The shorthand way of analyzing a (linear) op-amp circuit is to assume that the inverting and non-inverting inputs are at the same potential. That assumes it has been wired properly (and that the gain is essentially infinite).

You could think of the output being at the bottom of a steep valley- any changes to the output are multiplied by the open-loop gain to (mostly) correct for the error.

Imagine an inverting amplifier with closed-loop gain of -1. Swap the input terminals, and all appears okay, at least with zero input, both inputs are at zero and the output is at zero, but it reality it's balanced on a knife-edge and any slight change in the output causes the a change in the input, which is multiplied by the open-loop gain*, causing the output to move much further in the same direction until it hits the rails (saturates).

*typically in the range of 120dB (\$10^6\$) for a good op-amp.

\$\endgroup\$
1
  • \$\begingroup\$ Yes - exactly. However, you must be careful because simulation programs (for some simulations) assume automatically that the power was switched-on since infinite times in the past. In this case, you (no - not you, the opamp!) is riding upon the rasor´s edge - and everything seems to be OK. Hence: Do a power switch-on at t=0 or some µsec later - and you will see that the ouput goes into saturation for pos. feedback. Fazit: Of course, you must not interchange both inputs. The term "virtual ground" is based on the assumption that the open-loop gain is infinite (which is not true). \$\endgroup\$
    – LvW
    Jul 21, 2014 at 14:18
1
\$\begingroup\$

Other answers have touched upon how an op amp works, but may not be clear on why the simulated circuit works as it does. A couple key observations to start:

  1. If an op amp is wired using infinitely-fast components such that the potential difference (+ minus -) on the two inputs at some moment in time is a uniformly-decreasing function of the output which crosses zero at some point, then that point will represent a unique equilibrium state for the op amp

  2. Op amps are generally wired in such a fashion.

Many circuit simulators model the behavior of certain ideal components by making a prediction as to what their outputs might do, seeing how the predicted behavior feeds back to the inputs, and making new predictions for the output, seeing how that feeds back to the input, etc. If the circuit being simulated has only one equilibrium state, and if the repeated guesses converge on a solution, the quality of the initial guess may affect the rate of convergence (and thus simulation speed), but won't affect correctness. What can sometimes happen with a mis-wired op amp is that the simulator will try to predict output behavior that would leave the circuit as close to being balanced as possible, observe that circuit is in balance, and decide that it's happy. The simulator won't notice that the "balance" is an unstable equilibrium rather than a stable one.

This behavior is contrary to the way real-world op amps behave, but is actually not inconsistent with the behavior of an ideal op amp. An ideal op amp whose inputs are at the same potential may have any arbitrary voltage on the output. If the loop gain of the op amp is wired to be positive, but there is a possible output voltage where the inputs would be balanced, then the op amp must output either a positive inifinite (or rail, for an ideal "clamped" op amp) voltage, a negative infinite (or rail) voltage, or the voltage which would achieve balance. Nothing in the specification of an ideal op amp would favor one of those behaviors over another; the third behavior would in the real world have probability zero, but in the ideal world is among the things that "could" happen.

\$\endgroup\$
3
  • \$\begingroup\$ Agreed +1. It would be great if op-amps in simulation had an option to add a touch of noise to prevent this from happening without adding in another separate component. \$\endgroup\$
    – horta
    Jul 21, 2014 at 19:26
  • 1
    \$\begingroup\$ Agreed. I wish simulators had more options for "optimistic" or "pessimistic" component behaviors. For example, have a typical "and" gate pass its inputs into slew-rate limiters, and output VDD minus the lower of the two (slew-rate-limited) inputs. To build a flip flop, one would need to generate two non-overlapping clock phases using something other than the above style of NAND gate, but a flip flop thus constructed would report setup/hold failures by latching an unclean value (and downstream logic which tried to latch that would in turn latch an unclean value). \$\endgroup\$
    – supercat
    Jul 21, 2014 at 19:55
  • 1
    \$\begingroup\$ To make something like a double synchronizer work, one would have to add a gain stage between the flops, but if one only adds gain stages at places where it's safe (e.g. in double-synchronizers) one can expect that in places where setup/hold violations could cause metastability, it would likely show up as unclean logic levels. A circuit that works cleanly under such constraints could be relied upon to do so in the real world. \$\endgroup\$
    – supercat
    Jul 21, 2014 at 19:58
1
\$\begingroup\$

An op-amp will produce a positive output if the '+' input is more positive than the '-' input.

And will produce a positive output if the '-' input is more positive than the '+' input.

In all the circuits where we say the '+' and '-' pins are at the at the same potential such as:

enter image description here

Think about what would happen if the '-' terminal were not at the same potential as '+'

When you apply a positive voltage to Vin the voltage at the '-' input increases so Vout must become more negative. It can't keep going more and more negative however since at some point Vout would start to pull the '-' negative which would make Vout rise again. So the feedback causes the output to vary to the point where these effects cancel out.

In practise the voltage at '+' and '-' cant be exactly the same because the amp has gain and its this gain and the difference in potential between '+' an '-' that sets the output. But since a typical op-amp has very high gain the difference between '+' and '-' is tiny and can be ignored.

Now as a thought exercise swap '+' and '-' and make Vin slightly positive, This makes the '+' input more positive than '-' causing Vout to become more positive which makes '+' even more positive ... the amplifier ends up saturated and Vout is very close to the positive supply voltage.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.