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
Flipping the inputs of an operational amplifier (op-amp) alters the feedback mechanism, transitioning from a negative feedback scenario to a positive feedback one, which can lead to different circuit behavior. The standard assumption that the input voltages are equal (Va = Vb) holds true only under negative feedback conditions, while positive feedback can create instability and result in outputs that may not align with expected values. Although some calculations suggest that the output remains similar when inputs are swapped, real-world factors such as noise and power supply variations can significantly affect performance. The discussion emphasizes the importance of understanding the underlying principles of op-amp operation and the necessity of proper circuit design to maintain desired functionality. Ultimately, the distinction between operational amplifiers and comparators is crucial for accurate analysis and application.
  • #61
eq1 said:
There is an algebra error. The fourth step from the bottom uses the substitution Vo=A(Vc) but the correct substitution is Vo=A(Vb), defined in your step 3. (Assuming I am reading your handwriting correctly that this. The subscripts are a bit small on my screen.)

here's the bottom five steps. Can you highlight your observation ?

upload_2019-1-24_19-1-47.png
eq1 said:
The correct way to analyze the operating point is KCL at B. (b-c)/Ri = (o-b)/Rf substitute b=o/A and solve yielding o=A*c*Rf/(Rf+Ri-A*Ri) (thanks wolfram alpha!) As lim A->inf you get Vo=-c*Rf/Ri which is the correct answer.

I too solved for Vout using KVL for b, took limit as gain approaches infinity...
with infinite gain it's## Vin X (1 - \frac {Rfb + Rin}{Rin} ) ## which resolves to the same expression as yours
and only proves that Kirchoff's Laws agree.

eq1 said:
This circuit can be perfectly stable.
i strongly disagree. See post 35.

Sitting on a cusp is not stable.
and it is a disservice to a beginner to infer otherwise.

upload_2019-1-24_19-50-38.png

This circuit does not develop any restoring forces to return it to equilibrium..
It does the opposite, develops a disrupting force that drives it away from equilibrium toward infinity
but it hits the power supply rail first.

It's a disservice to a beginner to claim otherwise.

Vo=-c*Rf/Ri is NOT the mathematical operation that this circuit performs. To perform that one requires negative feedback.

What this circuit does mathematically is a logical computation with only two output states,
True and False,
represented by the maximum and minimum output values of Vout

"output state" = Vin + (Vout-Vin)X(Rin/(Rfb +Rin) > 0

where "output state" is a logical variable and the voltages (and R's) are real ones.
and (Vout-Vin)X(Rin/(Rfb +Rin) is just the voltage across Rin

Ahhhh, nostalgia.
I always modeled my circuits in Basic on my TI-99/4A,
and that Basic would assign to "output state" integer value,
either 0 (no bits set) for FALSE or -1 (all bits set for TRUE. .
That Basic was interesting , you could mix logicals and reals in an equation which was sometimes handy. But that's another story.

Anybody see algebra goofs or typos ? Please advise.

old jim
 

Attachments

  • upload_2019-1-24_19-1-47.png
    upload_2019-1-24_19-1-47.png
    22.4 KB · Views: 472
  • upload_2019-1-24_19-50-38.png
    upload_2019-1-24_19-50-38.png
    12.2 KB · Views: 520
Last edited:
  • Like
Likes Tom.G
Engineering news on Phys.org
  • #62
LvW said:
Question: For the purpose of finding the gain formula for the attached circuit - is it allowed to set Vp=Vn [or (Vp-Vn)=Vout/Aol] for the most left amplifiier ?
Op Amp2.jpg

It is allowed to set (Vp=Vn) or (Vout=A(Vp-Vn)) for performing the circuit analysis.
Vout = A(Vp-Vn) is the basic definition of an ideal operational amplifier.
Vp = Vn is based on the very high open-loop gain, the potential difference between its inputs tend to zero when a feedback network is implemented.

LvW said:
Before we start to analyze a circuit, is it necessary to know beforehand whether it will work stable or unstable?
There is no need to know it as you have already given the answer on #56.
I totally agree with your analysis.
We find the steady-state result for the given circuit by Kirchhoff's laws but no guarantee for stability, therefore, a verification of loop gain < 1 is necessary afterward. If the loop gain > 1, then the circuit is unstable, It cannot be used as a stable linear amplifier with the relationship given by steady-state analysis.

For example, the single stage non-inverting positive feedback amplifier that OP mentioned on #1, the feedback factor is obviously Ri/(Ri+Rf), let's assume the gain of the ideal Op Amp be G, then loop gain = G*Ri/(Ri+Rf), which must be less than 1 for stable operation, namely G*Ri/(Ri+Rf)<1 or G<(Rf/Ri+1). Therefore, when G becomes positive infinity, the amplifier is unstable for any positive values of Rf and Ri.

On the other hand, the single stage inverting negative feedback amplifier has loop gain = -G*Ri/(Ri+Rf) which must be less than 1 for stable operation, namely -G*Ri/(Ri+Rf)<1, or -G<(Rf/Ri+1), so that it must be stable for any positive values of Rf and Ri since the left hand side is either 0 or any negative number.
 

Attachments

  • Op Amp2.jpg
    Op Amp2.jpg
    10.1 KB · Views: 541
Last edited:
  • Like
Likes LvW and jim hardy
  • #63
sophiecentaur said:
"Not in reality"? It's the basis of the very familiar Schmidt Trigger circuit. Lookitup.

Smith.jpg


This is indeed a Schmitt Trigger circuit. The critical design equation is also related to Vout = -(R2/R1)*Vin.
Since OP's main focus seems to be related to the contradiation of equation derivation, I just mean that Vout = -(R2/R1)*Vin given by steady-state analysis doesn't mean we can realize a stable linear amplifier with that relation.
 

Attachments

  • Smith.jpg
    Smith.jpg
    23.9 KB · Views: 630
  • Like
Likes jim hardy
  • #64
jim hardy said:
here's the bottom five steps. Can you highlight your observation ?

I'm on an iphone so I can't mark up the image (or at least I don't know how to) but in second line from the top A*Vo/Vc is reduced to A*A in the line below. This is not a valid substitution because vo=A(Vb-Va)=A*Vb

jim hardy said:
This circuit does not develop any restoring forces to return it to equilibrium..
It does the opposite, develops a disrupting force that drives it away from equilibrium toward infinity
but it hits the power supply rail first.

The circuit as drawn is absolutely stable because an ideal opamp has infinite bandwidth and therefore has no phase delay so it can't be unstable.

For a real opamp... is the circuit stable? My answer is: it depends!

What does it depend on? Which opamp obviously (as I'm sure you know, attenuators exist too!), how it is powered, and what the valid input is (say I restrict the input to +-1mV, power from +-10V, and have A=1000, no hitting the rail here), is it internally compensated, is it even voltage mode, etc. etc.

But we also need to agree on the definition of stability. I understand the intuitive appeal of that definition but, with respect to Merriam-Webster, I would interject that it has limited value. For example, is a resistive divider stable? I would argue it is but I am not sure how I use that definition to demonstrate it. I think a better, but still intuitive, definition is "bounded input gives bounded output" [1] but there are other choices. Wikipedia lists 8! [2] Also note, by this definition an oscillator is stable. (Probably by Merriam's too as I think they conceded periodic motion as a type of equilibrium.)

[1] https://en.wikipedia.org/wiki/BIBO_stability
[2] https://en.wikipedia.org/wiki/Stability_theory
 
  • #65
eq1 said:
The circuit as drawn is absolutely stable because an ideal opamp has infinite bandwidth and therefore has no phase delay so it can't be unstable

I agree that an ideal opamp has infinite bandwidth and therefore has no phase delay it must be unstable. We refer to the dynamic system when talking about stability. If the system does not have any time dependent characteristic, then it has no stability issues.

Therefore, I just try to approximate the dynamic system when I apply the loop gain to analyze the system which does not include any time-dependent characteristic.

This reminds me of the question raised by OP, we can't describe the behavior of dynamic system in reality without using a dynamic model.

To get closer to reality, I think it would be helpful to add a little delay (td) to the ideal OpAmp, just redefine the equation to Vout(t) = Gain*Vin(t-td), and then we should be able to get the desired results through analysis or simulation. There are of course many other methods, such as adding RC delay circuit at the output and so on.
 
Last edited:
  • #66
eq1 said:
......
Most importantly the amplifier has to transition from unpowered to powered which is an AC event, but this is a DC analysis so it doesn't describe that situation. In AC this circuit is likely unstable depending on the specifics of the amplifier's construction. Turn on can be done but it is very tricky to do without getting stuck at one of the power rails.

When a circuit with feedback is unstable - it is unstable and, hence, cannot be used as a linear amplifier...and it does not matter if the input signal is small or large or if it is DC or AC...
* DC instability (static) means: No fixed (stable) DC operating point within the linear transfer range
* AC instability (dynamic) means: Self-excitement (oscillations) around a stable bias point.
 
  • #67
eq1 said:
The circuit as drawn is absolutely stable because an ideal opamp has infinite bandwidth and therefore has no phase delay so it can't be unstable.
It's surely not so much a matter of stability as Linearity. The output of any amplifier will eventually be limited by the power supply volts. When there is positive feedback, the input volts need to go far enough 'the other way' to pull the output volts away from the supply rail and onto the other one. It is hard to remove the time dependent aspect of the circuit and the input signal would have to change fast enough (and with prediction) to bring the output volts back to Zero.
As has been mentioned already, it's the problem of balancing a pencil on its point - but worse; it involves getting the pencil upright from a near-horizontal position and then catching and maintaining it in the vertical position.
 
  • Like
Likes Asymptotic
  • #68
sophiecentaur said:
As has been mentioned already, it's the problem of balancing a pencil on its point

Yes. I agree. It's exactly analogous to that. The problem originally presented is the equivalent of asking is there a mathematical solution to balancing an idealized pencil on an idealized surface to which I answer, yes, there is a mathematical solution to that idealized problem. Does that mean I can balance a pencil on my desk right now? No, it does not. But that idealized problem does have a solution.

sophiecentaur said:
it involves getting the pencil upright from a near-horizontal position and then catching and maintaining it in the vertical position.

Maybe. Then again. Maybe this pencil is in 0g and it's already upright. We don't know because those details have not been provided so why assume them. And that's my point and why I answer it depends. If one puts a 741 in place of the ideal opamp will it be stable? No definitely not. So maybe don't put a 741 there. What circuits are legal to place there? Unknown. The problem does not specify that.
 
  • Like
Likes sophiecentaur and LvW
  • #69
sophiecentaur said:
As has been mentioned already, it's the problem of balancing a pencil on its point - but worse; it involves getting the pencil upright from a near-horizontal position and then catching and maintaining it in the vertical position.

There is a similar problem:
There are some circuits with feedback fulfilling Barkhausens oscillation criterion - however, the circuit does NOT oscillate (real opamp model), but goes into saturation. But for an IDEAL model it oscillates (in simulation). Tricky situation - in particular to find an explanantion.
 
Last edited:
  • Like
Likes sophiecentaur
  • #70
i repeat

jim hardy said:
So the circuit is not stable as algebra implies.
Nor is it astable as intuition implies
It's bistable, will sit happily at one limit or the other until you apply enough Vin to overwhelm the feedback and make it flip to the other state.

As has been mentioned already, it's the well known Schmitt Trigger and Rin / Rfb sets the hysteresis.
 
  • Like
Likes sophiecentaur and dlgoff
  • #71
alan123hk said:
I just mean that Vout = -(R2/R1)*Vin given by steady-state analysis doesn't mean we can realize a stable linear amplifier with that relation.

eq1 said:
Maybe. Then again. Maybe this pencil is in 0g and it's already upright. We don't know because those details have not been provided so why assume them. And that's my point and why I answer it depends. If one puts a 741 in place of the ideal opamp will it be stable? No definitely not. So maybe don't put a 741 there. What circuits are legal to place there? Unknown. The problem does not specify that.

Fair enough.

I think we all know how the circuit operates
and we realize that

ampwposFB2.jpg


That formula is true only at two infinitesimal points
It does not represent describe(is a better verb-jh) the circuit's behavior at any other point.
So it cannot be used to evaluate the circuit for stability, linearity, or prediction of behavior.
In short it does not represent the circuit under discussion.

In other words, you can't use a single linear equation to describe a discontinuous function even if a computer simulation tells you it's okay.
You've got to either bound Vo as @NascentOxygen did in post #45
or use an inequality instead.

And as teachers we should encourage beginners to recognize that.

No more semantics and hair splitting on this one for me.

Over and out.

old jim

and @ still won't autocomplete when i click it, until after about six tries and a preview.
 

Attachments

  • ampwposFB2.jpg
    ampwposFB2.jpg
    40.6 KB · Views: 599
Last edited:
  • Like
Likes alan123hk
  • #72
jim hardy said:
In other words, you can't use a single linear equation to describe a discontinuous function even if a computer simulation tells you it's okay.
Precisely and precisely. A good computer simulation could, however, recognise what's happening and spot the situation. The sort of simulation you usually come across is just like a student whose good at Maths but who never built anything.
 
Last edited:
  • Like
Likes Klystron, dlgoff and jim hardy
  • #73
eq1 said:
I'm on an iphone so I can't mark up the image (or at least I don't know how to) but in second line from the top A*Vo/Vc is reduced to A*A in the line below. This is not a valid substitution because vo=A(Vb-Va)=A*Vb

thanks, now i see it

upload_2019-1-26_10-46-52.png


shoulda been ##A=\frac{Vo}{Vb}## instead.old jim

ps
@alan123hk Great graphic, it broke down the communication barrier.
Nicely Done !
 

Attachments

  • upload_2019-1-26_10-46-52.png
    upload_2019-1-26_10-46-52.png
    10.3 KB · Views: 451
  • #74
NascentOxygen said:
The relation Vout = A(v+ - v-) is incomplete, it's a simplification. There are strong conditionals attached to it restricting it to only those instances where Vout is not pinned near either rail.

A more complete representation would be Vout = A(v+ - v-) iff (Vo max> Vout > Vo min)

So before applying that simplified rule, you must first establish that Vout is going to lie within the allowable range, and if it doesn't then that rule doesn't apply.

-edited-

Well sure. The saturation points are there, but it doesn't change my question.
 
  • #75
Abdullah Almosalami said:
but it doesn't change my question.

Abdullah Almosalami said:
So my question then is what is the difference?
Are you asking "When you flip the inputs ?"

comparator.jpg


Meaning that the linear and continuous function inside the red rectangle no longer describes the behavior of your circuit
so any conclusions drawn from it are irrelevant.

You now need to describe the circuit with a nonlinear discontinuous function.

The plots of the two functions just happen to cross at two points as shown .

That's the difference.
 

Attachments

  • comparator.jpg
    comparator.jpg
    28.6 KB · Views: 472
  • Like
Likes Abdullah Almosalami and dlgoff
  • #76
Abdullah Almosalami said:
Well sure. The saturation points are there, but it doesn't change my question.

Abdullah A. - does that mean that you have the feeling that your question was not yet answered? (In spite of more than 70 contributions?)
 
  • Like
Likes jim hardy
  • #77
LvW said:
Abdullah A. - does that mean that you have the feeling that your question was not yet answered? (In spite of more than 70 contributions?)
Oh my bad I was just working my way down the responses and I'm not even all the way through yet. But certainly my question has been answered a while back at this point! And with much gratitude for the amount of knowledge put in here beyond my expectations! I might even revisit this post after I've gone through more coursework and into the details of the internal circuitry of amplifiers and such to look at the responses from a new perspective once more.
 
Last edited:
  • Like
Likes Tom.G and jim hardy
  • #78
I really don't understand why this thread has the momentum that it seems to. Switching the inputs of an op-amp from inverting negative feedback to positive feedback as shown in the very first post of this thread does in no way imply that their analysis should be the same. If one cannot accept this from the beginning then one needs to be prepared for a difficult road ahead. That is not to say that I have not been fooled by some strange op-amp configurations. I certainly have.
 
  • #79
Averagesupernova said:
I really don't understand why this thread has the momentum that it seems to.
upload_2019-2-8_12-27-34.png
For me it has been a months long search for that good sentence.
But it took @alan123 's picture in post 63 to unlock my alleged brain.

I think perhaps many of us people who are drawn to science struggle for words ? I know i do.
I struggle for math, too
best i can do for this circuit is

## Vout = 12 X \frac{(\frac{Vout}{2} + {Vin}) } {abs(\frac{Vout}{2} + {Vin}) } ##

......

upload_2019-2-8_12-42-42.png


but i digress... what counts is we got there. It took all of us, though.

Good thread !

old jim
 

Attachments

  • upload_2019-2-8_12-27-34.png
    upload_2019-2-8_12-27-34.png
    1.8 KB · Views: 480
  • upload_2019-2-8_12-42-42.png
    upload_2019-2-8_12-42-42.png
    20.3 KB · Views: 512
Last edited:
  • Like
Likes Abdullah Almosalami and dlgoff

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