# What happens when you flip the inputs of an op amp?

So, from my textbook, and what seems to be standard, an inverting amplifier circuit goes something like this:

However, when I switch the terminals of the op amp and follow through with the equations, I get the same Vout.

So my question then is what is the difference? I know there is other circuitry involved with the op amp internally, so I guess that's involved but I haven't gotten there yet.

#### Attachments

• 52.4 KB Views: 1,447
• 52.1 KB Views: 1,268
berkeman

Related Electrical Engineering News on Phys.org
gneill
Mentor
When you flip the inputs you no longer have a negative feedback situation (where a portion of the output is fed back to the negative input of the op amp). The mechanism that forces ##v^+## equal to ##v^-## is no longer present. So indeed, the internal circuitry of the op amp is going to produce something different.

Think of the op amp as a dependent voltage source with some amplification factor A so that ##V_o = A(v^+ - v^-)## and reanalyze the circuit.

sophiecentaur, Abdullah Almosalami and Dullard
berkeman
Mentor
So my question then is what is the difference?
Good for you to ask questions like this and try to work out the answer. Keep on doing that, and you will go far.

In addition to the comments by @gneill have a look at this wikipedia page about the circuit you have stumbled upon. Pay particular attention to how to set the hysteresis voltage in such circuits -- that's an important practical part of learning to use comparators.

https://en.wikipedia.org/wiki/Comparator

Abdullah Almosalami and jim hardy
gneill
Mentor
Hmm. I think it's not quite a comparator circuit as the output does influence the input. It may be counter-intuitive at first glance, but the circuit will have a fixed gain and surprisingly, it turns out to be the same as for the negative feedback scenario.

My point was that you shouldn't rely on the "voltage rule of ideal op-amps" when setting out to analyze a scenario that doesn't clearly have negative feedback, and would be better served by going back to basics for a first pass at the circuit.

Abdullah Almosalami and berkeman
DaveE
Gold Member
The ideal op-amp assumption that Va = Vb is only valid if the amplifier is operating with negative feed back so that the high gain can adjust Va in the correct direction. If you remove the feedback, or change its polarity, you will create a comparator, not a linear amplifier, and the input voltages can vary greatly. So before you can apply the ideal amplifier approximations, you must verify that the circuit has the correct form of negative feedback.
You can do a more detailed (and accurate) analysis if you remove the Va = Vb assumption, and add in the amplifier gain Av as Vo = Av*(Vb-Va). Then observe what happens if you let Av get really large.
The ideal op-amp approximations (for a voltage amplifier) are:
1) Infinite gain. This implies equal input voltages for negative feedback.
2) Infinite input impedance at both inputs.
3) Zero output impedance.
None of these are always true in practice, but they allow an approximate solution to quickly understand the function of the circuit and a good starting point for an analysis of the non-ideal effects when each/any of the assumptions breaks down.

Last edited:
Abdullah Almosalami and berkeman
jim hardy
Gold Member
2019 Award
Dearly Missed
"Operational" nickname grew out of the early days when they were used to perform some continuous mathematical operation like add subtract or find logarithm......
Op-amps were expensive vacuum tube gizmos so logic (Boolean math) operations would more likely be done by relays.

But the name "operational" stuck to the amplifier even though that term describes its intended use.
It is the duty of the "operational circuit" designer to wrap his "amplifier" with a circuit that lets it force its inputs equal.
Otherwise he has built something other than an "Operational Amplifier Circuit" - perhaps a comparator or logic gate..

Splitting hairs i know, but it's an important distinction.

I was lucky enough to grow up on this early Philbrick-Nexus manual
http://www.waynekirkwood.com/images/pdf/Applications_Manual_for_Operational_Amplifiers_Part_1.pdf

If it doesn't "enforce a null" it's not "operational".

any help ?

old jim

#### Attachments

• 67.1 KB Views: 768
davenn, DaveE, Asymptotic and 2 others
Tom.G
You seem to have gotten the signs a bit confused.

Cheers,
Tom

#### Attachments

• 38.7 KB Views: 998
jim hardy
Averagesupernova
Gold Member
If it doesn't "enforce a null" it's not "operational".
A very good way to look at op-amps.

jim hardy
gneill
Mentor
You seem to have gotten the signs a bit confused.
View attachment 233079

Cheers,
Tom

Turns out that this is not a good assumption in this case (that Vout is positive).

If we assume some gain ##A## for the op-amp, then since the (-) input is grounded then the (+) input must be at ##V_{out}/A##.

Write KCL for the (+) input node, see what you find. What happens when ##A## gets very large?

#### Attachments

• 3.9 KB Views: 845
• 2.6 KB Views: 619
Abdullah Almosalami
LvW

(1) The shown calculation in the first post (second case) contains no errors - however, one should stumble over the fact that the output goes negative although the non-inv. input is connected to the input signal.
(2) Even a simulation program (DC or AC simulation) will confirm the result.
(3) But we all know that - in reality - the result is wrong.
(4) Where is the error? The circuit with positive feedback would be a stable amplifier only in case the following (idealized) conditions would be met:
* No noise, neither internally nor externally.
* Absolutely stable supply voltages
* No power-switch-on transients.
(5) The mentioned calculation/simulations assume these unrealistic idealized conditions (like a large ball is riding upon another smaller ball).

sophiecentaur, alan123hk and gneill
sophiecentaur
Gold Member
When I first came upon Feedback, I couldn't imagine following the signal round and round the loop. I asked the "how does it know?" question to myself. The secret is to tale the steady state situation when things have settled down after switch on, and believe in the equations - I don't think you can avoid some maths when dealing with feedback.
You can ease into the dynamic aspects of feedback eventually.

jim hardy
jim hardy
Gold Member
2019 Award
Dearly Missed
The secret is to tale the steady state situation when things have settled down after switch on, and believe in the equations - I don't think you can avoid some maths when dealing with feedback.
Seconded ! With Great Vigor !

It is very counterintuitive and was a major stumbling block for me.

That's why i hammer on this phrase :
It is the duty of the "operational circuit" designer to wrap his "amplifier" with a circuit that lets it force its inputs equal.
it reminds me to write the KVL equations for both of the amplifier's input pins and set them equal.

When you flip the inputs you no longer have a negative feedback situation (where a portion of the output is fed back to the negative input of the op amp). The mechanism that forces ##v^+## equal to ##v^-## is no longer present. So indeed, the internal circuitry of the op amp is going to produce something different.

Think of the op amp as a dependent voltage source with some amplification factor A so that ##V_o = A(v^+ - v^-)## and reanalyze the circuit.
I know this question and your reply was a while back now but hopefully you're still around. I finally came around to analyzing the circuit with the input resistor, dependent voltage source, and output resistance of the op amp, and I found that it still acts the same way pretty much, with a tiny detail of difference. So here's what I did:

1) Regular Inverting Op Amp Circuit:

2) Now flip the Op Amp inputs:

You see from both final equations (bottom of each picture), they are almost exactly the same except the "AR2" term in the first case is negative and in the second case positive.

How does this affect things? If I put this up on Desmos, and set some values for R1, R2, Ri, Ro, and A, I get the following:

They are pretty much the same line. And if I tried to see more exact values, I find that there is indeed a very small difference, but it's essentially insignificant:

So it seems like even in the more detailed model, flipping the op amp's inputs does not change the output much at all. I suppose perhaps I'd have to go down to the CMOS level next to analyze once more. What do you all think?

#### Attachments

• 73.6 KB Views: 549
• 59.8 KB Views: 507
• 86.5 KB Views: 574
• 54.4 KB Views: 543
• 54.3 KB Views: 562
alan123hk

(1) The shown calculation in the first post (second case) contains no errors - however, one should stumble over the fact that the output goes negative although the non-inv. input is connected to the input signal.
(2) Even a simulation program (DC or AC simulation) will confirm the result.
(3) But we all know that - in reality - the result is wrong.
(4) Where is the error? The circuit with positive feedback would be a stable amplifier only in case the following (idealized) conditions would be met:
* No noise, neither internally nor externally.
* Absolutely stable supply voltages
* No power-switch-on transients.
(5) The mentioned calculation/simulations assume these unrealistic idealized conditions (like a large ball is riding upon another smaller ball).
You mention the idealized conditions in which the positive feedback would work. How do you know this? Is this from a much more detailed op amp model?

sophiecentaur
Gold Member
I found that it still acts the same way pretty much
You do know that there is a huge difference in the behaviour of an Op Amp with positive and with negative feedback so you must have an error if your calculations tell you otherwise. You should question your initial equations (the blue ones) because I don't understand where they come from. I can't read your handwriting easily enough but you have the original. All EE text books derive how OP amps behave in circuits so why not just refer to yours?

Last edited:
jim hardy
Gold Member
2019 Award
Dearly Missed
However, when I switch the terminals of the op amp and follow through with the equations, I get the same Vout.
That's because of algebra.
##Vout = -Vin \left( \frac{ Rfb}{ Rin} \right) ## is the only relation that makes Vb equal Va ..
That's what @LvW was demonstrating.

But your circuit when connected with positive feedback does not allow the amplifier to cause that relationship. .

It is the duty of the "operational circuit" designer to wrap his "amplifier" with a circuit that lets it force its inputs equal.
Otherwise he has built something other than an "Operational Amplifier Circuit" - perhaps a comparator or logic gate..
When you swapped those inputs you changed from a linear multiplier circuit, ##\left( \frac{ Rfb}{ Rin} \right) ##,
to a primitive sort of logical comparator circuit that does the Boolean operation ' out = (c greater than a) ' ....

Last edited:
sophiecentaur and Tom.G
They are pretty much the same line. And if I tried to see more exact values, I find that there is indeed a very small difference, but it's essentially insignificant:
one should stumble over the fact that the output goes negative although the non-inv. input is connected to the input signal
I tried to describe the situation in a more concise way as follows: -

Great and brilliant, you have shown a special and interesting state of the op amp I have never thought of before, although this is just a mathematical calculation that would not happen in reality.

#### Attachments

• 67.7 KB Views: 485
NascentOxygen
sophiecentaur
Gold Member
Great and brilliant, you have shown a special and interesting state of the op amp I have never thought of before, although this is just a mathematical calculation that would not happen in reality.
"Not in reality"? It's the basis of the very familiar Schmidt Trigger circuit. Lookitup.

Klystron, Asymptotic and jim hardy
LvW
You mention the idealized conditions in which the positive feedback would work. How do you know this? Is this from a much more detailed op amp model?
Where did you read "...would work.." ?
I never have stated that such a circuit (positive feedback) would work as an amplifier.
What I have tried to explain was the following:
Using the known equations for analyzing such a circuit (KVL, KCL) we arrive at a set of equations which result in an amplified signal.
No inner contradiction during calculations. And all the simulation programs give the same result - if you are doing a DC analysis or an AC analysis.

Why? Because in these analysis (and for our hand calculations) we have neglected all the REAL WORLD influences: Noise, power supply fluctuations and - most important - power.switch-on transients. Hence, such a circuit will never work in reality. But we must know that only an analysis in the time domain (TRAN analysis using a real opamp model) will reveal such a kind of instability - not a TRAN analysis with an ideal VCVS model nor a DC analysis or an AC analysis (however, the phase response shows an "unnormal" behaviour).

sophiecentaur
Gold Member
I never have stated that such a circuit (positive feedback) would work as an amplifier.
But positive feedback has been used in linear amplifiers. The Tuned Radio Frequency receiver of a few years ago used positive feedback to produce a high gain, narrow band amplifier. The precise amount of feedback needed fine adjustment or the gain would be too low - or the device would oscillate. If the feedback parameter is low enough, you can get increased gain and linear behaviour - but not when an OP amp is the basic amplifying device. Take a low gain transistor or valve and you can get useable circuit gain with the right circuit components.

jim hardy
LvW
But positive feedback has been used in linear amplifiers..
Yes - of course. A slight positive feedback will result in a stable amplifier (with reduced bandwidth) - as long as the loop gain is <+1.
However, it was my intention not to complicate the answer to the given problem and to be realistic - because the amount of positive feedback for the circuit under discussion is required to be smaller than 1/Aol (Aol=DC open-loop gain) for a stable bias point.

Abdullah Almosalami, sophiecentaur and jim hardy
jim hardy
Gold Member
2019 Award
Dearly Missed
But positive feedback has been used in linear amplifiers.
I second that.

there's the magnetic amplifier
wherein positive feedback around a low gain element (resembling a transformer) gives it high gain
and that high gain inductive element can then be wrapped with a circuit that lets it enforce a null, ie "operate" .
It was the basis of early submarine reactor instrument systems and an early commercial nuke plant Yankee Rowe...

http://exvacuo.free.fr/div/Sciences/Dossiers/EM/Magnétisme/George B Trinkaus - Magnetic amplifiers.pdf

#### Attachments

• 492.6 KB Views: 365
Klystron, Nik_2213, Abdullah Almosalami and 2 others
sophiecentaur
Gold Member
However, it was my intention not to complicate the answer
The OP really needs to be shown the complexities and realities in order to resolve his apparent paradox. I haven't checked the calculations but there must be some hidden constraints about the actual validity of the answer in most circumstances, I guess.

anorlunda
Staff Emeritus
there's the magnetic amplifier
wherein positive feedback around a low gain element (resembling a transformer) gives it high gain
and that high gain inductive element can then be wrapped with a circuit that lets it enforce a null, ie "operate" .
It was the basis of early submarine reactor instrument systems and an early commercial nuke plant Yankee Rowe...
Not only that, the magnetic amplifier was the basis of the famous GE sign on the building where I once worked in Schenectady. It has 1399 bulbs. It slowly dims on and off in a 10 second cycle. In 1926, when it was first lit, smoothly modulating nearly 100 kW was a significant accomplishment. There was a second sign on the other side of the plant operating 180 degrees out of phase with the first sign's cycle. The engineers were very proud that the sum of the two power demands was constant through the whole cycle. The on-site power plant's capacity in 1926 may not have been much bigger than 100 kW.

If the building still exists 7 years from now, it will be the 100th anniversary for the sign.

p.s. In that picture, I can see several burned out bulbs. Tsk tsk. That would never have been allowed in my day.

#### Attachments

• 151.6 KB Views: 284
Klystron, Abdullah Almosalami and jim hardy
You do know that there is a huge difference in the behaviour of an Op Amp with positive and with negative feedback so you must have an error if your calculations tell you otherwise. You should question your initial equations (the blue ones) because I don't understand where they come from. I can't read your handwriting easily enough but you have the original. All EE text books derive how OP amps behave in circuits so why not just refer to yours?
I could have gone wrong in the calculations, but I don't see it and no one has pointed out where, and EE textbooks (like the two I've looked at) derive the equations for the standard inverting input case but always ignore the other way around. I do know that it doesn't work in reality, so what I was kind of hoping for was for someone to describe a more accurate model of an op amp that does account for all that was mentioned here.