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

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

Textbook Inverting Amplifier Circuit.jpg



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



Switching Input Terminals.jpg



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

  • Like
Likes berkeman

Answers and Replies

  • #2
gneill
Mentor
20,842
2,815
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.
 
  • Like
Likes sophiecentaur, Abdullah Almosalami and Dullard
  • #3
berkeman
Mentor
58,180
8,240
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. :smile:

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
 
  • Like
Likes Abdullah Almosalami and jim hardy
  • #4
gneill
Mentor
20,842
2,815
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.
 
  • Like
Likes Abdullah Almosalami and berkeman
  • #5
DaveE
Gold Member
884
648
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:
  • Like
Likes Abdullah Almosalami and berkeman
  • #6
jim hardy
Science Advisor
Gold Member
2019 Award
Dearly Missed
9,839
4,879
"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

upload_2018-10-29_16-11-7.png


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

see also http://www.philbrickarchive.org/

any help ?

old jim
 

Attachments

  • Like
Likes davenn, DaveE, Asymptotic and 2 others
  • #7
Tom.G
Science Advisor
3,460
2,196
You seem to have gotten the signs a bit confused.
op-amp.png


Cheers,
Tom
 

Attachments

  • Like
Likes jim hardy
  • #8
Averagesupernova
Science Advisor
Gold Member
3,674
655
If it doesn't "enforce a null" it's not "operational".
A very good way to look at op-amps.
 
  • Like
Likes jim hardy
  • #9
gneill
Mentor
20,842
2,815
You seem to have gotten the signs a bit confused.
View attachment 233079

Cheers,
Tom
upload_2018-10-30_9-26-28.png

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##.
upload_2018-10-30_9-37-18.png

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

Attachments

  • Like
Likes Abdullah Almosalami
  • #10
LvW
820
220
Some comments:

(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).
 
  • Like
Likes sophiecentaur, alan123hk and gneill
  • #11
sophiecentaur
Science Advisor
Gold Member
25,074
4,761
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.
 
  • Like
Likes jim hardy
  • #12
jim hardy
Science Advisor
Gold Member
2019 Award
Dearly Missed
9,839
4,879
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.
 
  • #13
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:

Standard Inverting Op Amp Equation.jpg


2) Now flip the Op Amp inputs:

Flipped Op Amp.jpg


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:

Op Amp Input Comparison.png


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:

Op Amp Input Comparison 2.png


Op Amp Input Comparison 3.png


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

  • Like
Likes alan123hk
  • #14
Some comments:

(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?
 
  • #15
sophiecentaur
Science Advisor
Gold Member
25,074
4,761
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:
  • #16
jim hardy
Science Advisor
Gold Member
2019 Award
Dearly Missed
9,839
4,879
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:
  • Like
Likes sophiecentaur and Tom.G
  • #17
166
60
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: -
Op Amp1.jpg

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

  • Like
Likes NascentOxygen
  • #18
sophiecentaur
Science Advisor
Gold Member
25,074
4,761
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.
 
  • Like
Likes Klystron, Asymptotic and jim hardy
  • #19
LvW
820
220
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).
 
  • #20
sophiecentaur
Science Advisor
Gold Member
25,074
4,761
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.
 
  • Like
Likes jim hardy
  • #21
LvW
820
220
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.
 
  • Like
Likes Abdullah Almosalami, sophiecentaur and jim hardy
  • #22
jim hardy
Science Advisor
Gold Member
2019 Award
Dearly Missed
9,839
4,879
But positive feedback has been used in linear amplifiers.
I second that.

In addition to Sophie's Regenerative Radio Receiver

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

upload_2019-1-20_10-17-23.png
 

Attachments

  • Like
Likes Klystron, Nik_2213, Abdullah Almosalami and 2 others
  • #23
sophiecentaur
Science Advisor
Gold Member
25,074
4,761
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.
 
  • #24
anorlunda
Staff Emeritus
Insights Author
8,779
5,657
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.


gesign.jpg


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

Attachments

  • Like
Likes Klystron, Abdullah Almosalami and jim hardy
  • #25
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.
 

Related Threads on What happens when you flip the inputs of an op amp?

Replies
47
Views
3K
Replies
3
Views
745
  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
15
Views
4K
Replies
12
Views
3K
  • Last Post
Replies
4
Views
771
Replies
2
Views
822
  • Last Post
Replies
6
Views
789
  • Last Post
Replies
3
Views
2K
Top