Maker Pro
Maker Pro

How do you derive opamp equations if you flip the opamp in an inverting configuration?

M

MRW

Jan 1, 1970
0
I'm actually curious because when I tried playing around with some
circuit simulation I had accidentally interchanged the inverting and
non-inverting input in an inverting configuration. I knew my output
was funky so I tried doing hand calculations and my equations came out
the same.

??
Thanks!
 
M

Michael Black

Jan 1, 1970
0
MRW" ([email protected]) said:
I'm actually curious because when I tried playing around with some
circuit simulation I had accidentally interchanged the inverting and
non-inverting input in an inverting configuration. I knew my output
was funky so I tried doing hand calculations and my equations came out
the same.
I hope you aren't saying you connected the feedback resistor to the
non-inverting input. Because that won't work.

Inverting has a series resistor from the signal input into the inverting
input, with a feedback resistor from the output to the inverting
input. The non-inverting input goes to ground, either directly or
through a resistor that exists to keep things balanced DC wise.

Non-inverting has the same resistor from the output to the inverting
input. Then a resistor from the inverting input to ground. Then
the signal is fed into the non-inverting input.

There always has to be feedback from the output to the invering input.

Michael
 
M

MRW

Jan 1, 1970
0
I hope you aren't saying you connected the feedback resistor to the
non-inverting input. Because that won't work.

Inverting has a series resistor from the signal input into the inverting
input, with a feedback resistor from the output to the inverting
input. The non-inverting input goes to ground, either directly or
through a resistor that exists to keep things balanced DC wise.

Non-inverting has the same resistor from the output to the inverting
input. Then a resistor from the inverting input to ground. Then
the signal is fed into the non-inverting input.

There always has to be feedback from the output to the invering input.

Michael

Hello Michael:

I'm actually creating a what-if scenario. What if in an inverting
opamp configuration the opamp inputs are flipped? How would I prove
via calculations that it will not work? That was just my curiosity.
 
J

Jon Slaughter

Jan 1, 1970
0
MRW said:
Hello Michael:

I'm actually creating a what-if scenario. What if in an inverting
opamp configuration the opamp inputs are flipped? How would I prove
via calculations that it will not work? That was just my curiosity.

An ideal opamp is just a comparator and does not depend on which which input
pin is used but only on the difference in the signal.

When you add a feeback loop then you need to make sure that you feed back to
the right input else you increase your amplifciation differential instead of
decreasing it(which an be useful but( isn't what an op amps about).

Your basic ideal op amp is



----- I1 ---|\
| \
R >-- O = G*(I1 - I2)
| /
----- I2 ---+/


I1,I2 are your input's, O is your output and R is infinite resistance.


In this case I1 and I2 are identical. You flip them and it doesn't matter
except on your gain(you will flip the O in sign).

If you use some feedback then fliping which input it connects too flips it
in the equation but now your feedback gain differential changes in sign and
now adds instead of subtracts. So you get infinite output. That is the
reason why the feeback is connected to the inverting pin. If not then its
kinda useless to use feedback(Maybe there are some uses for it though).

Jon
 
M

MRW

Jan 1, 1970
0

Hi Jon:

Ideally, just using the opamp golden rules, if I were to calculate the
close loop gain for an inverting opamp configuration, I would get Vo/
Vi = - Rf / Ri. I've been told that the "minus sign is due to the fact
that the op-amp is inverting." But if my inputs are flipped for the
same inverting configuration (+ becomes -, - becomes +), then my
calculation steps would still be using the same methods and
assumptions, so I would still get Vo/Vi = -Rf / Ri (?), right?

Would it be valid to say that since the feedback network is still the
same as the correct inverting configuration, but the opamp inputs are
just flipped, we can just flip the sign on the close loop gain?
There's no mathematical step for this?
 
J

John Larkin

Jan 1, 1970
0
Hi Jon:

Ideally, just using the opamp golden rules, if I were to calculate the
close loop gain for an inverting opamp configuration, I would get Vo/
Vi = - Rf / Ri. I've been told that the "minus sign is due to the fact
that the op-amp is inverting." But if my inputs are flipped for the
same inverting configuration (+ becomes -, - becomes +), then my
calculation steps would still be using the same methods and
assumptions, so I would still get Vo/Vi = -Rf / Ri (?), right?

Would it be valid to say that since the feedback network is still the
same as the correct inverting configuration, but the opamp inputs are
just flipped, we can just flip the sign on the close loop gain?
There's no mathematical step for this?

No. The feedback becomes positive, the gain becomes infinite (or
more!) and the opamp slams to one of the power rails.

Interestingly, with an ideal opamp model, some simulators will show a
zero-input, zero-output state here, which doesn't happen in real life.

John
 
J

Jon Slaughter

Jan 1, 1970
0
MRW said:
Hi Jon:

Ideally, just using the opamp golden rules, if I were to calculate the
close loop gain for an inverting opamp configuration, I would get Vo/
Vi = - Rf / Ri. I've been told that the "minus sign is due to the fact
that the op-amp is inverting." But if my inputs are flipped for the
same inverting configuration (+ becomes -, - becomes +), then my
calculation steps would still be using the same methods and
assumptions, so I would still get Vo/Vi = -Rf / Ri (?), right?

Would it be valid to say that since the feedback network is still the
same as the correct inverting configuration, but the opamp inputs are
just flipped, we can just flip the sign on the close loop gain?
There's no mathematical step for this?


Heres a very simple analysis:

A feedback of the output voltage Vo into the positive or negative input can
be represented as x*Vo where x is the fractional amount of Vo that we are
feeding back. 0 <= x <= 1. We cannot stick any less unless we have some
other means of amplification(such as another op amp).

Since you know that for open loop op amp one has

Vo = A*(V2 - V1)

where V2 is the non-inverting input and V1 is the inverting input.

If we add a feedback path to the non-inverting then we have V2 = V2 + x*Vo
or

Vo = A*(V2 + x*Vo - V1)

solving for Vo gives

Vo = A/(1 - x*A)*(V2 - V1)

The same on the inverting pin gives

Vo = A/(1 + x*A)*(V2 - V1)

So here is the main difference, for the negative feedback we have the
amplification factor

A/(1 + x*A) = 1/(1/A + x)

Notice that this factor is always between A/(1 + A) and A.

For the positive feedback we have

A/(1 - x*A) = -A/(x*A - 1)

With positive feedback we invert the output for certain x but more
importantly we get infinite gain when x = 1/A and its very unstable around
this point. If we are slightly below 1/A then we are non-inverting but
slightly above we are inverting. Also there is no way to reduce the below a
factor of 1. So here it is always amplification(which is key).


The equations themselfs don't look much different but the - sign is a big
deal.

Op amps are made with large A and not small A. For a real op amp we have

1/(1/A + x) ~= 1/x

or

1/(1/A - x) ~= -1/x

but in the second case we have unstability because x might be around 1/A
(1/A is close to 0).


Now if you understand all that its not hard to see that a real op amp
doesn't like positive feedback. We could use it on an ideal opamp and get
gain for anything above 1. But in the real world the op amps will surely it
1/A when fed back into. You cannot make x so large to feed back all of the
input and because it actually does this in a continuous way(the op amp has
to "gradually" turn on) it will end up "hitting" 1/A and just loose control.

So while its true that they look like they are inverses of each other. i.e.
1/x vs -1/x, In reality the second case is very unstable and is only a
theoretical possibility.

In any case the negative feedback does everything the positive feedback can
and more. (we can get gains from 1 to infinity. (very similar to positive
feedback case)


Hope this is more clear,
Jon
 
B

Ban

Jan 1, 1970
0
MRW said:
Hi Jon:

Ideally, just using the opamp golden rules, if I were to calculate the
close loop gain for an inverting opamp configuration, I would get Vo/
Vi = - Rf / Ri. I've been told that the "minus sign is due to the fact
that the op-amp is inverting." But if my inputs are flipped for the
same inverting configuration (+ becomes -, - becomes +), then my
calculation steps would still be using the same methods and
assumptions, so I would still get Vo/Vi = -Rf / Ri (?), right?

Would it be valid to say that since the feedback network is still the
same as the correct inverting configuration, but the opamp inputs are
just flipped, we can just flip the sign on the close loop gain?
There's no mathematical step for this?


Your so called mathematical model is only valid for a linear circuit, and a
comparator with hysteresis(this is what you get) is a *non-linear* circuit
element, which nevertheless can also be descibed with a set of equations,
but completely different ones. You can calculate the threshold values going
from negative to positive and vice versa. just assume one of the stable
stages and calculate which input is needed to change the output sign.
 
J

John Fields

Jan 1, 1970
0
Heres a very simple analysis:

A feedback of the output voltage Vo into the positive or negative input can
be represented as x*Vo where x is the fractional amount of Vo that we are
feeding back. 0 <= x <= 1. We cannot stick any less unless we have some
other means of amplification(such as another op amp).

Since you know that for open loop op amp one has

Vo = A*(V2 - V1)

where V2 is the non-inverting input and V1 is the inverting input.

If we add a feedback path to the non-inverting then we have V2 = V2 + x*Vo
or

Vo = A*(V2 + x*Vo - V1)

solving for Vo gives

Vo = A/(1 - x*A)*(V2 - V1)

The same on the inverting pin gives

Vo = A/(1 + x*A)*(V2 - V1)

So here is the main difference, for the negative feedback we have the
amplification factor

A/(1 + x*A) = 1/(1/A + x)

Notice that this factor is always between A/(1 + A) and A.

For the positive feedback we have

A/(1 - x*A) = -A/(x*A - 1)

With positive feedback we invert the output for certain x but more
importantly we get infinite gain when x = 1/A and its very unstable around
this point. If we are slightly below 1/A then we are non-inverting but
slightly above we are inverting. Also there is no way to reduce the below a
factor of 1. So here it is always amplification(which is key).


The equations themselfs don't look much different but the - sign is a big
deal.

Op amps are made with large A and not small A. For a real op amp we have

1/(1/A + x) ~= 1/x

or

1/(1/A - x) ~= -1/x

but in the second case we have unstability because x might be around 1/A
(1/A is close to 0).


Now if you understand all that its not hard to see that a real op amp
doesn't like positive feedback. We could use it on an ideal opamp and get
gain for anything above 1. But in the real world the op amps will surely it
1/A when fed back into. You cannot make x so large to feed back all of the
input and because it actually does this in a continuous way(the op amp has
to "gradually" turn on) it will end up "hitting" 1/A and just loose control.

So while its true that they look like they are inverses of each other. i.e.
1/x vs -1/x, In reality the second case is very unstable and is only a
theoretical possibility.

In any case the negative feedback does everything the positive feedback can
and more. (we can get gains from 1 to infinity. (very similar to positive
feedback case)
 
D

Don Bowey

Jan 1, 1970
0
I'm actually curious because when I tried playing around with some
circuit simulation I had accidentally interchanged the inverting and
non-inverting input in an inverting configuration. I knew my output
was funky so I tried doing hand calculations and my equations came out
the same.

??
Thanks!

You should get the datasheet for the device. I covers all the
configurations.

Don
 
J

Jon Slaughter

Jan 1, 1970
0
No, the signals int the equations are arbitrary. One can include the delay
into V2 - V1 but the effect of x is still the same in any case. Here the
delay is a real factor but even with no delay we still have the issues.

I guess, ask yourself why the delay exists. Then ask yourself how x works.
In a real op amp we do not instantaneously get a feedback gain of x. It
ramps up to x(charging of capacitances or whatever that cause this). This
ramping up is the problem. x starts at 0 and then goes to whatever value it
does. So the gain goes from A/(1 - 0*A) = A to something like A/(1 - A/A) =
oo. (since A is so large 1/A is close to zero to x doens't have to travel
far to cause infinite gain).

This because of finite slew rate which I guess includes all the real world
inner workings of the op amp that make it not be able to just jump to x and
above having to traverse from [0, 1/A] (which a negative feedback op amp
will do but it doesn' thave the issue at the point 1/A). If we could have
the opamp jump to, say, x = (A+1)/A then we have a gain of (-)1 with no
problem and the thing will work just fine(excluding thermal noises and stuff
that might make it very unstable at that point). But since the true x is
dependent on t and will rise to, say, (A+1)/A it will surely pass through
1/A which causes infinite gain.

It doesn't really matter about delay except that the same thing that causes
delay causes x to have to "ramp" up. So in actuallity they are the same
thing and I did mention that these are the reasons why there are problem
with the feedback.

In a sense though I think that "delay" is a somewhat ideal word because in
actuality there is no delay(except for the finite propagation of the EM
fied). What happens is that the slew rate(which is still a kinda generalized
effect) is very small and so we do not see the signal coming out until the
slew rate "charges" up.

On some sense what we see out by puting in VI is Vo = Vi(t)*Ramp(t)

where Ramp is just the ramp function. What we call delay is how long the
ramp function takes to reach 1. actually probably not 1 as it would depend
on Vi(t) too and some other factors. But at t ~ = 0 we do have an output. It
just such a small fraction of Vi that we don't really consider it as a
signal and we kinda then just approximate Vo as Vo = Vi(t)*Step(t-d) and say
that Vo is a delayed version of Vi(t).

Anyways. I think they are essentially the same factors(or atleast stem from
the same effect). You can call it delay but then its harder to see
equations that depend on x. Just think of x as having to step through from
0 to the value determined by the feedback path and you can see why it
doesn't work(even in theory if we just assume that x is continuous, x(0) =
0, x(T) = 'x')


Hopefully that make some sense. I think your issue with delay is that you
see it as sorta being turned on instantaneously after a certain delayed
time(well, better that it is a shifted signal). This is just an ideal
approximation and if it were true in reality then we could set a specific x
and have positive feedback that worked(probably not). If we think of delay
more as a ramp then and ask why it ramps then that same answer tells us that
x has to ramp too. x ramping is the issue.


One way to think about positive feed back is to think of turning a bowl
upside down. Lets suppose its perfectly sphereical. Now try and put a
marble on the bowl that where it will be stable(not roll off the bowl). Its
impossible except at one point. Turn the bowl right side up and it too is
impossible but at one point. These two cases are distinctly different
though. In the first the marble will roll off the bowl with any slight
change and it is almost impossible to tell how. In the second the marble
will stay at that point and any slight change will have it move back to that
point. In the first case we have positive feedback and in the second
negative.

An analogy with the op amp is that we have a "bowl" that as a hole half way
up that stretchs all around the bowl. Are requirement is that we have to
push the marble up, along the bowl, from the ground. As we do this we will
cross the hole and the marble will fall out the bowl. If we could just pick
it up and stick it at the top point then we could get stability... but this
stability is still highly unstable. For the negative feedback we do not have
the hole and we can actually release the marble anywhere in the bowl and it
will go to the stable point.


Jon
 
Top