Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How does the feedback work in an inverting op amp amplifier?

Status
Not open for further replies.
Good. I am glad to see that you used a realistic model of an opamp and worked out why the gain is simply -Rf/Rs.
Almost all modern opamps have ideal spec's. The opamps invented almost 50 years ago were not ideal.
 
What about if A and Ri are not that large? Can it still show some negative feedback?
Most definitely. Negative feedback shows up in many circuits, even when we don't realize it or see it clearly.
 
I think as a beginner in electronics as I am, I must first understand something basic. I belive there are more nad more interesting things waiting there for me to discover.
I'd like to try to explain what I was trying to say in a different way.

First, you are correct that you generally need to take a basic view/approach at first, and please do that to the extent you need to. Usually that works well.

However, sometimes a simplistic/basic viewpoint eliminates a critical aspect of the problem you are trying to crack.

Before, I mentioned including the frequency roll-off of a realistic opamp. The reason why this is important is that, as MrAl stressed, the time evolution is a critical aspect to understanding how feedback and stability work. Time evolution implies dynamic variations (in time) which then implies differential equations to describe the time evolution. You can't have time evolution without dynamical differential equations. The first-order frequency roll-off model of an opamp is the simplest model which includes a differential equation to describe the time evolution.

I wanted to stress this because my previous description was vague on the point of why frequency roll-off of the gain is important. It is not so much that you need to think about frequency, but you do need to think about time evolution to understand feedback, and how it works. Your first attempt at iterating was a crude attempt to get to the answer, and it was the best you could do with a simple DC model. The problem is that real continuous time systems (such as the one you are considering) don't iterate, but they do evolve in time.
 
Good. I am glad to see that you used a realistic model of an opamp and worked out why the gain is simply -Rf/Rs.
Almost all modern opamps have ideal spec's. The opamps invented almost 50 years ago were not ideal.
Actually, MrAl has showed me the same calculations in post #11, or sels I probably won't think of the superposition approach.
 
I'd like to try to explain what I was trying to say in a different way.

First, you are correct that you generally need to take a basic view/approach at first, and please do that to the extent you need to. Usually that works well.

However, sometimes a simplistic/basic viewpoint eliminates a critical aspect of the problem you are trying to crack.

Before, I mentioned including the frequency roll-off of a realistic opamp. The reason why this is important is that, as MrAl stressed, the time evolution is a critical aspect to understanding how feedback and stability work. Time evolution implies dynamic variations (in time) which then implies differential equations to describe the time evolution. You can't have time evolution without dynamical differential equations. The first-order frequency roll-off model of an opamp is the simplest model which includes a differential equation to describe the time evolution.

I wanted to stress this because my previous description was vague on the point of why frequency roll-off of the gain is important. It is not so much that you need to think about frequency, but you do need to think about time evolution to understand feedback, and how it works. Your first attempt at iterating was a crude attempt to get to the answer, and it was the best you could do with a simple DC model. The problem is that real continuous time systems (such as the one you are considering) don't iterate, but they do evolve in time.
Thank you so much, Steve. I'll remember your suggestions.

Frequency response is kind of troublesome for me, I'm still struggling with it : )
 
Hi MrAl, thank you. I'll try the experiments you suggested in post #38 later.

Now let me continue with the calculations in post #39 and stick to the circuit shown in Fig.1.

Vo=A*Vd= -A*Vn= -(Vin*A*Rp1/(Rs+Rp1))/(1+A*Rp2/(Rf+Rp2))

From this expression, I notice that if the gain A is high enough, A*Rp2/(Rf+Rp2) >> 1, or
A >> (Rf+Rp2)/Rp2, then the output voltage magnitude can go up to any value the input Vin wants it to, even with a small Ri as long as A is large enough. But the output voltage of an opamp in inverting configuration is limited by its two power supplies.

Let's see what can happen to the current Ii through the resistor Ri.
Since Vn=(Vin*Rp1/(Rs+Rp1))/(1+A*Rp2/(Rf+Rp2)), Ii=Vn/Ri. Likewise, we can control the magnitude of Ii by controlling gain A for any given resistances. If the gain is heigh enough, Ii becomes negligible, and Vn=Vp=0. Or even simpler, just look at the expression for Vn, if A is heigh enough, Vn=0. Since Vp=0, so Ii=0

I would like to do some experiments to compare the voltage Vn in two different circuits, one with a dependant voltage source, another without it:
upload_2014-12-24_21-21-38.png

But I'll let a computer do the calculations.

Arbitrarily choose values for Vin, the resistances and the gain A.

For Vin=1, Rs=1k, Ri=1k, Rf=10k, A=2, then the voltage at node n in Fig.2, Vn2=435mV, the voltage at node n in Fig.3, Vn3=500mV.

For the same Vin and resistances but A=20, Vn2=244mV, Vn3=500mV.

For A=200, Vn2=45mV, Vn3=500mV.

For A=2000, Vn2=5mV, Vn3=500mV.

For A=10^6, Vn2=10uV, Vn3=500mV ...

A few things I can see.
When the gain increases, Vn2 decreases, eventually approaches zero, even Ri is small compared to the input resistance of an opamp. This is basically what MikeMl showed me in post #2.

No matter what the gain is, Vn2 is always smaller than Vn3, so I think there must be something forcing the voltage to drop and it must come from that VCVS. But I'm not sure if I should call this action the "feedback", for two reasons. One I think it will depend on what the definition of "feedback" is, and two, please look at this transistor circuit which I found in textbook:
upload_2014-12-24_22-56-48.png

It has a relationship between Vg, Vgs the voltage between the gate and the source and Id the drain current:

Vg=Vgs+Rs*Id

If we fix Vg, and somehow Id increases a little, then Vgs has to be reduced, because Id=K*(Vgs-Vt)^2, in turn Id decreases. That's what they call the "feedback". I can't see a similar relation exist in the VCVS circuit.
upload_2014-12-24_21-21-38.png
upload_2014-12-24_22-56-48.png
 
Last edited:
Hi again,

Feynman once said that each person internalizes concepts differently. I think a method that matches the way you are thinking about this would be a first order Taylor method for solving differential equations (also known as Euler's Method).

The method is very simple. We get the next result from the previous result by knowing the first derivative and using some very small time step size to dampen the response so we dont get a wild result.
If the previous result at some time 't' is called Vout, then the next result at t+dt is:
Vout=Vout+dt*(dy/dt)

So we are just adding dt*(dy/dt) (which is just dy) to the previous result of Vout to get the next value of Vout. The step size is dt (the first dt) which is made very small.

For the op amp, lets say we have a 1k input resistor and 3k feedback resistor and no other resistors for the gain, and they connect to the inverting input. The non inverting input is tied to ground. The power supplies are limited to plus and minus 10 volts.
The internal gain of the op amp is a constant 100, and to model the time response we'll just use a low pass filter of low impedance, with time constant RC=0.001 seconds. This is just a low pass RC filter connected to the 'output' of the op amp, but really it's internal to the op amp. The output of the op amp itself we'll call "E", and the voltage across the cap we'll call Vout, and Vout feeds R2 which is the feedback resistor. We consider the impedance of the RC low pass filter to be low enough to drive R2 without drawing any significant current from the capacitor.

For this setup the voltage at the non inverting terminal is:
vp=0
and at the inverting terminal it is:
vn=R2*(Vin-Vout)/(R1+R2)+Vout
The open loop gain Aol=100 so the output of the internal op amp summer is:
E=(vp-vn)*Aol
To model the limited power supplies we must test this to make sure it is less than 10 but greater than -10 so two statements:
If E<-10 then E=-10
If E>10 then E=10
Finally, the next result is the sum of the previous result and the increment, and the increment is:
dy=dt*dy/dt
and:
dy/dt=(E-Vout)/RC

We have a gain of 100 and time constant RC=0.001, so we choose a time step of 0.00001 for example. So we have:
dt=10e-6

so we have now:
dy=10e-6*(E-Vout)/RC

We assume that the cap voltage Vout is zero at t=0 so we have to start:
Vout=0

We will assume we have Vin step to 1v at a time just to the right of t=0.

Now we are ready to begin the stepped calculations.


************START**************

Starting with Vout=0 we have of course (we do this one time only):
Vout=0

and since Vin=1 we have from vn=R2*(Vin-Vout)/(R1+R2)+Vout:
vn=0.75

We then have:
E=(vp-vn)*Aol=(0-0.75)*100=-75

Using the power supply clamping statements this clamps to -10v, so now E=-10.

Calculating the increment in y we have:
dy=10e-6*(E-Vout)/RC
so
dy=10e-6*(-10-0)/0.001=-0.1

Now we can update Vout:
Vout=Vout+dy=0+(-0.1)=-0.1

So now we see Vout change from 0 to -0.1 volts.

What we do now is go back to START and recalculate everything again except we dont set Vout=0 for any calculations after the first one.

Doing this again, we get a new Vout which is:
Vout=-0.2

Doing the calculations a third time, we get:
Vout=-0.3

Doing the calculations a fourth and more times, we see Vout as a ramp until it reaches a certain point and then it starts to level off. I think it starts to level off after something like 20 to 30 calculations. Finally, after 70 repeats of the calculations we see:
Vout=-2.999999 volts approximately

and Vout is very flat now so it appears to have stabilized.

Thus the output with Vin=1v is Vout=-3 volts, but we also are able to get a rough idea what the time solution looks like for the output and feedback.
 
Last edited:
Hi again,

Here is a diagram to go with that previous post...
The gain of that small rectangular block is 100. A little hard to see there.
 

Attachments

  • OpAmpSteppedResponse-1.gif
    OpAmpSteppedResponse-1.gif
    15.1 KB · Views: 292
Hello MrAl,

Please see if I get the point you were trying to show me. First of all, I'll assume that the time during which Vin goes from zero to 1 Volt is extremely small that during the time period E is still zero and the cap is completely uncharged. Did this assumption appropriate?

I also assume that y(t)=Vout(t) and Vout(0)=0.

From the RC circuit, we have
RC(dy/dt) + y(t) = E(t), or
dy/dt = (E(t)-y(t))/RC = (E(t)-Vout(t))/RC.

At t=0, Vin=1. From
vn(t)=(Vin-Vout(t))*R2/(R1+R2) + Vout(t), we have
vn(0)=3/4=0.75 V.

E(0)=-0.75*100=-75, but right away it is clipped to -10 V.

The slop at t=0 on the Vout(t) curve with RC=0.001, dt=10^(-5):
(dy/dt)(0)=(E(0)-y(0))/RC=(-10-0)/10^(-3)= -10^4

Now Vout(1*dt)=Vout(0)+(dy/dt)(0) * dt=0-10^4*10^(-5)= -0.1
---------------------------------------------
In the 2nd time interval, namely, (dt) =< (t) =< (2*dt) :

vn(dt)= (Vin-Vout(dt))*R2/(R1+R2) + Vout(dt)=(1+0.1)*3k/4k +(-0.1) = 0.725

E(dt)=-0.725*100=-72.5, likewise cippped to E(dt)=-10

Sorry, I got a little stuck, let me think and I'll get back later.
 
Hi MrAl,

Please see if I correctly understand what you told me.

upload_2014-12-26_16-30-29.png

For the RC low-pass filter, if Vout is desired, I can get it by solving equation

RC(dVout/dt)+Vout(t)=E(t) (1)

But we don't know what E(t) is. If we replace E(t) by

E(t)= -100*vn
= -100*(((Vin-Vout(t))*R2/(R1+R2))+Vout(t)) (2)

we still have a problem that E(t) might be clippped by the power supplies constraints.

So we get back to (1), we have

dVout/dt=(E(t)-Vout(t))/RC

We can evaluate Vout by its previous value by taking tiny dt, namely

Vout(t1)=Vout(t0+dt)
=Vout(t0) + (dVout/dt)(t0)*dt
=Vout(t0) + (E(t0)-Vout(t0))/RC ------ step 1

Then we update E(t1)=E(t0+dt) by equation 2, testing E(t1) to see if it's within (-10, +10). -------- step 2

Repeat the above two steps until we get exhausted. Oh, No! until Vout doesn't vary too much, hopefully.

One thing like you said I think is important, the impedance of the RC filter must be very small, or else ..., Oh Oh, what will happen if it's not? Complicate the situation?

Let me give it a try.

If R*C=0.001 second, dt=0.00001 second, then probably we repeat
5*R*C/dt=500 times before we see Vout stabilize. EDIT: I think the estimate with a factor 5 has a problem, for E is not constant, it varies with time.

For t=0, Vin=1, Vout(0)=0, vn(0)=0.75, E(0)=-75, E(0)=-10

For t=0.00001
Vout(0.00001)=-0.1
vn(0.00001)=0.725
E(0.00001)=-72.5=-10
--------------------------------
Vout(0.00002)=-0.199
vn(0.00002)=0.70025
E(0.00002)=-70.025=-10
-------------------------------
Vout(0.00003)=-0.29701
vn(0.00003)=0.6757475
E(0.00003)=-67.57475=-10
---------------------------------------
Vout(0.00004)=-0.3940399
vn(0.00004)=0.651490025
E(0.00004)=-65.1490025=-10
-------------------------------------------
Vout(0.00005)=-0.490099501
vn(0.00005)=0.6275
E(0.00005)=-62.75=-10
--------------------------------------------
Vout(0.00006)=-0.5851
vn(0.00006)=0.603725
E(0.00006)=-60.3725=-10
---------------------------------------------

I think I can feel how the "feedback" develops, finally : )

Thanks a lot!
 

Attachments

  • upload_2014-12-26_16-29-5.png
    upload_2014-12-26_16-29-5.png
    8.3 KB · Views: 248
Last edited:
If you would like to investigate how the input offset of the op amp affects the output, add a small battery of perhaps 0.002v in series with the non inverting terminal. Do the calculations once with the positive terminal of this battery connected to the non inverting terminal, then again after you flip the battery polarity. This will show what happens with a typically small but non zero input offset voltage.
While investigating the following circuit you suggested, I found one interesting thing.
upload_2014-12-27_21-29-41.png

Instead of analyzing directly on the op amp, I do it on its corresponding model as shown below.
upload_2014-12-27_21-30-19.png

Assume that the input resistance of the op amp itself is infinite, then the voltage Vn at node 'n' is

Vn=Vin*Rfb/(Rin+Rfb) - A*Vd*Rin/(Rin+Rfb)
and
Vd=Vn - Vinp,

Combining the two equations we get

Vn*[1+A*Rin/(Rin+Rfb)] = Vin*Rfb/(Rin+Rfb) + A*Vinp*Rin/(Rin+Rfb) --- (1)

From the above diagram we see that

Vout= -A*Vd = -A*(Vn-Vinp) --- (2)

If we solve Vn from equation (2) and insert that result into equation (1), we have

Vinp - Vout/A - Vout*Rin/(Rin+Rfb) = Vin*Rfb/(Rin+Rfb)

If A=∞ and we rearrange terms, we get the familiar relationship:

(Vin-Vinp)/Rin = (Vinp-Vout)/Rfb --- (3)

In other words, when we use (3) to solve problems in an inverting op amp circuit , we implicitly assume the op amp is ideal.
 
Deleted the post.

I don't want to upset one of the very best students ETO has had in ages...
Unless of course, she has a sense of humor too:cool:
 
Last edited:
Hi tvtech,

Hmmm, I think I'm NOT as pretty as you are. But I think I AM as cute as that kitty ...
<<<<<

My English isn't very good, I'm still learning. For example, I don't know what it means : (
Everyone tries to help me with stuff. I shoo them away when they try to hit on me.

Well, that kitty would like to go to bed, It's 1 am now here in Taipei. Good night!
 
Oh God..I am busted

I posted and than Edited...too late :(

You please take this as a little relaxing joke Heidi....nothing meant other than a bit of fun.

Don't you sleep now until you have read this.....I am a Guy. I am making things worse by trying to explain.

Totally stuffed now

tvtech
 
I know you are here Steve

Ask Mods to Ban me if you want.
I will deal with it.

Perfect example of trying to bring lightheartedness where it was not required or understood.

I feel terrible.

Regards,
tvtech
 
Last edited:
Lol TV,

No need to ban. She slapped your face only ;)

All men get a red cheek now and again due to a poorly chosen word to a pretty girl. We heal fast though.
 
If you would like to investigate how the input offset of the op amp affects the output, add a small battery of perhaps 0.002v in series with the non inverting terminal. Do the calculations once with the positive terminal of this battery connected to the non inverting terminal, then again after you flip the battery polarity. This will show what happens with a typically small but non zero input offset voltage.
I guess I could understand your ideas by rearrange equation (3) in post #54 as

Vout(t)= -(Rfb/Rin)*Vin + [(Rin+Rfb)/Rin]*Vinp (4)

The first term in the right hand side is the original amplified Vin, if there were a signal appearing at the non-inverting terminal, it would also be amplified by a factor of (Rin+Rfb)/Rin.

If Vinp indicates a small signal, it will also be amplified:
upload_2014-12-28_17-41-29.png

upload_2014-12-28_17-42-22.png
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top