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

  • Thread starter Thread starter Abdullah Almosalami
  • Start date Start date
  • Tags Tags
    Amp Op amp
Click For Summary
SUMMARY

The discussion centers on the implications of flipping the inputs of an operational amplifier (op amp) in a circuit. When the inputs are switched, the negative feedback mechanism is disrupted, leading to different circuit behavior. The ideal op-amp assumptions, such as infinite gain and equal input voltages, only hold true under negative feedback conditions. Without this feedback, the circuit behaves more like a comparator, which can yield unexpected output values, particularly under non-ideal conditions.

PREREQUISITES
  • Understanding of operational amplifier (op amp) fundamentals
  • Knowledge of feedback mechanisms in electronic circuits
  • Familiarity with Kirchhoff's Voltage Law (KVL) and Kirchhoff's Current Law (KCL)
  • Basic concepts of linear and non-linear circuit analysis
NEXT STEPS
  • Study the differences between negative and positive feedback in op amp circuits
  • Learn about the Schmidt Trigger circuit and its applications
  • Explore the effects of real-world conditions on op amp performance, including noise and power supply variations
  • Investigate simulation tools for op amp analysis, such as SPICE or LTspice
USEFUL FOR

Electrical engineers, circuit designers, and students studying analog electronics who seek to deepen their understanding of operational amplifier behavior and feedback systems.

Abdullah Almosalami
Messages
49
Reaction score
15
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

  • Textbook Inverting Amplifier Circuit.jpg
    Textbook Inverting Amplifier Circuit.jpg
    44.5 KB · Views: 2,529
  • Switching Input Terminals.jpg
    Switching Input Terminals.jpg
    43.6 KB · Views: 2,242
  • Like
Likes   Reactions: berkeman
Engineering news on Phys.org
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   Reactions: sophiecentaur, Abdullah Almosalami and Dullard
Abdullah Almosalami said:
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   Reactions: Abdullah Almosalami and jim hardy
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   Reactions: Abdullah Almosalami and berkeman
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   Reactions: Abdullah Almosalami and berkeman
"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 let's 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

  • upload_2018-10-29_16-11-7.png
    upload_2018-10-29_16-11-7.png
    35.9 KB · Views: 1,490
  • Like
Likes   Reactions: davenn, DaveE, Asymptotic and 2 others
You seem to have gotten the signs a bit confused.
op-amp.png


Cheers,
Tom
 

Attachments

  • op-amp.png
    op-amp.png
    21.8 KB · Views: 1,802
  • Like
Likes   Reactions: jim hardy
jim hardy said:
If it doesn't "enforce a null" it's not "operational".
A very good way to look at op-amps.
 
  • Like
Likes   Reactions: jim hardy
Tom.G said:
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

  • upload_2018-10-30_9-26-28.png
    upload_2018-10-30_9-26-28.png
    2.6 KB · Views: 1,582
  • upload_2018-10-30_9-37-18.png
    upload_2018-10-30_9-37-18.png
    2.5 KB · Views: 1,304
  • Like
Likes   Reactions: Abdullah Almosalami
  • #10
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   Reactions: sophiecentaur, alan123hk and gneill
  • #11
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   Reactions: jim hardy
  • #12
sophiecentaur said:
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 :
jim hardy said:
It is the duty of the "operational circuit" designer to wrap his "amplifier" with a circuit that let's 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
gneill said:
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

  • Standard Inverting Op Amp Equation.jpg
    Standard Inverting Op Amp Equation.jpg
    47.5 KB · Views: 1,264
  • Flipped Op Amp.jpg
    Flipped Op Amp.jpg
    38.3 KB · Views: 1,047
  • Op Amp Input Comparison.png
    Op Amp Input Comparison.png
    19.6 KB · Views: 1,159
  • Op Amp Input Comparison 2.png
    Op Amp Input Comparison 2.png
    10.5 KB · Views: 1,149
  • Op Amp Input Comparison 3.png
    Op Amp Input Comparison 3.png
    11.5 KB · Views: 1,139
  • Like
Likes   Reactions: alan123hk
  • #14
LvW said:
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
Abdullah Almosalami said:
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 textbooks derive how OP amps behave in circuits so why not just refer to yours?
 
Last edited:
  • #16
Abdullah Almosalami said:
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. .

jim hardy said:
It is the duty of the "operational circuit" designer to wrap his "amplifier" with a circuit that let's 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   Reactions: sophiecentaur and Tom.G
  • #17
Abdullah Almosalami said:
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:
LvW said:
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

  • Op Amp1.jpg
    Op Amp1.jpg
    20.9 KB · Views: 1,073
  • Like
Likes   Reactions: NascentOxygen
  • #18
alan123hk said:
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   Reactions: Klystron, Asymptotic and jim hardy
  • #19
Abdullah Almosalami said:
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
LvW said:
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   Reactions: jim hardy
  • #21
sophiecentaur said:
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   Reactions: Abdullah Almosalami, sophiecentaur and jim hardy
  • #22
sophiecentaur said:
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 let's 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

  • upload_2019-1-20_10-17-23.png
    upload_2019-1-20_10-17-23.png
    76.6 KB · Views: 900
  • Like
Likes   Reactions: Klystron, Nik_2213, Abdullah Almosalami and 2 others
  • #23
LvW said:
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
jim hardy said:
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 let's 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

  • gesign.jpg
    gesign.jpg
    29.7 KB · Views: 738
  • Like
Likes   Reactions: Klystron, Abdullah Almosalami and jim hardy
  • #25
sophiecentaur said:
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 textbooks 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.
 
  • #26
LvW said:
Where did you read "...would work.." ?
I never have stated that such a circuit (positive feedback) would work as an amplifier.

LvW said:
(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.

I was asking where did you get reasoning about the idealized conditions. As in, based on what more detailed model of the op amp that would now account for transients and noise and such. That's more what I was looking. I understand that switching the outputs doesn't work the same as seen from the equations shown so far, and it seems most of the replies are saying the mathematical model here is just ideal and doesn't work in reality, but to me that's a push to say alright then, well, what is a more accurate mathematical model? Perhaps more complex but something that could be used for analysis, and then maybe from that explore other cases.
 
  • #27
Abdullah Almosalami said:
I could have gone wrong in the calculations, but I don't see it and no one has pointed out where,
opampWposFB.jpg


Va = 0

and Vb = Vc + (Vout - Vc) X Ri/(Ri + Rf)

Vout = Avol X (Vb - 0)
Vout = Avol X (Vc + (Vout - Vc) X Ri/(Ri + Rf))

Gain = Vout/Vc = Avol X (1 + (Vout/Vc -1) X Ri/(Ri + Rf))
looks recursive to me. Check my algebra ?
old jim
 

Attachments

  • opampWposFB.jpg
    opampWposFB.jpg
    41 KB · Views: 729
  • Like
Likes   Reactions: sophiecentaur
  • #28
Abdullah Almosalami said:
I could have gone wrong in the calculations, but I don't see it and no one has pointed out where,

upload_2019-1-20_22-58-58.png



##\frac{Vout - Vb}{Rf} = \frac{Vb - Vc}{Ri}##

## Vb## and ##Vout## as in previous post
 

Attachments

  • upload_2019-1-20_22-58-58.png
    upload_2019-1-20_22-58-58.png
    41.1 KB · Views: 640
  • #29
Abdullah Almosalami said:
I was asking where did you get reasoning about the idealized conditions. As in, based on what more detailed model of the op amp that would now account for transients and noise and such. That's more what I was looking. I understand that switching the outputs doesn't work the same as seen from the equations shown so far, and it seems most of the replies are saying the mathematical model here is just ideal and doesn't work in reality, but to me that's a push to say alright then, well, what is a more accurate mathematical model? Perhaps more complex but something that could be used for analysis, and then maybe from that explore other cases.

No - the problem is not the need for a "more accurate model". The opamp models provided by the manufacturers are very complex and accurate enough.
The reason for the observed (surprising) results are the properties of the various analyses.

Ask yourself: What happens when a circuit with feedback tends to self-excitement ? The output voltage increases - and this increase is coupled back to the input supporting this increase ...We can observe that this process needs a certain (in many cases a very short) time due to unavoidable delays in real opamp models ...and, therefore, we can demonstrate this effect in a time domain simulation only (TRAN analysis).

In contrast, it is not the task of AC analyses to take into account such timely effects - these analyses must reveal the frequency-dependent properties of a circuit only and, hence, must assume steady-state conditions. For this reason, this analysis must assume that the supply voltages are switched on "long tiome ago". The same applies to the DC analysis , which - by its nature - cannot predict what the circuit perhaps will do in the near future because all delaying elements (like capacitors) do not contribute to the DC behaviour.

In summary - even in case of an unstable circuit, the simulation programm will always find a fixed DC operational point - and a following AC analysis shows a frequency response with gain. Remember, the AC analysis is a small-signal analysis - it is based only on the slope of a theoretical tangent applied in the DC operating point. These results are not surprising because our hand calculation would give exact the same results.
The only difference is that we - hopefully - will not start to perform such calculation by hand because we KNOW in advance that the circuit will be unstable.
 
  • Like
Likes   Reactions: Abdullah Almosalami and sophiecentaur
  • #30
sophiecentaur said:
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.

I don`t think it is a "paradox".
If we wouldn`t know about the problems of such positive feedback we would start calculations by hand (KVL,KCL) - and we would get a fine result.
Why? Because in our calculations we have assumed steady-state conditions. Hence, it is not a "paradox" but we simply have made an error.
If one looks at the characteristics and differences of the individual analyses (DC, AC, TRAN), it becomes clear that only an analysis in the time domain can reveal the tendency to self-excitation. Hence, the simulation programs makes no "error" while finding a DC bias point with a corresponding tangent (basis for AC analyses).
The error is on our side because we have wrongly interpreted the results of the analyses.
 
  • Like
Likes   Reactions: jim hardy, Abdullah Almosalami, sophiecentaur and 1 other person

Similar threads

  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
9
Views
7K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
6K
  • · Replies 9 ·
Replies
9
Views
5K
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K