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.

Integrating op amps

Status
Not open for further replies.

normad

Member
Im trying to find the gain of a basic integrating op amp with an input resistor of 1k and a feedback network of a 100n capacitor parallel with a 1000k resistor..

i used time domain calculations to find the coltage over the capacitor and took the output as equal to that.. but im not sure about the answer..

whats the best method to calculate the gain of an integrating op amp?

if you dont mind please kindly explain how the integrating op amp works :)

thanks a lot!
 
The theoretical gain of a basic inverting op amp is simply the feedback impedance divided by the input impedance. In your case that is 1000kΩ in parallel with 1/(2*PI*F*100nF) divided by 1kΩ.

A pure op amp integrator has an input resistor and a feedback capacitor (the 1000k resistor in your circuit is likely to prevent saturation of the op amp at the rail with no input due to op amp offset). An integrator "integrates" the input signal. Thus the output is basically a running sum (integral) of the input voltage over time. The "gain" of the integrator is determined by the RC time-constant. In one time-constant of time, a 1V DC input will case the output to change by 1V.
 
I assume that the + input to your op amp is connected to gnd.

Op amps have a very high gain, so the negative feedback makes the input voltage (ie. the voltage between the + & - inputs) very close to zero.

This is called a virtual ground.

So the simplest way I know of to calculate the output voltage for a given input voltage is to use

I = Vo/Zf = Vin/Rin, hence Vo = Vin * Zf/Rin

where I is the current through the input resistor and it is equal to the current through the feedback network.

This is essentially what Carl wrote above.
 
Last edited:
I tend to think of it this way: At low frequencies, the gain of your stage is -Rf/Rin = -(1e6/1e3) = -1000 = 60db. At some frequency, the Xc of the capacitor is equal the feedback resistor, 1meg. Below that frequency, the gain is determined by the feedback resistor; above that frequency the capacitor dominates, and the higher the frequency, the lower the gain. At the frequency where Xc = Rf, since the two are in parallel, this reduces the gain by half, or -6db.

Rf = 1e6 = Xc = 1/(2ΠfC) = 1/(6.28*f*100e-9)

Solving for f; f = 1/(6.28*1e6*100e-9) = 10/6.28 = 1.6Hz

So below 1Hz, gain is 1000 (60db); above 2Hz, gain falls off at 6db per otcave.

Let's see how we do: (see attached)

Note, gain at low frequencies is 60db (from -40dbV to +20dbV).

Now look at the circuit again in the time domain. Notice if you wait long enough, the gain is 1000.
 

Attachments

  • D3.png
    D3.png
    39.4 KB · Views: 425
  • D3a.png
    D3a.png
    35.1 KB · Views: 458
Last edited:
Thanks.. i think i get how to analyse it..

so one method is to

1) find the current through capacitor
2) use ic = C*dv/dt
3) isolate dv/dt and integrate it over dt to find the capacitor voltage
4) capacitor voltage would be equal to the output voltage(?)

and the other would be

1) get the transfer function
2) substitute values for frequency
3) convert back to time domain to get a time varying expression for output(?)

so by both these methods you should get the same answer?
and yes v+ is connected to ground :)
 
Thanks.. i think i get how to analyse it..

so one method is to

1) find the current through capacitor
2) use ic = C*dv/dt
3) isolate dv/dt and integrate it over dt to find the capacitor voltage
4) capacitor voltage would be equal to the output voltage(?)

and the other would be

1) get the transfer function
2) substitute values for frequency
3) convert back to time domain to get a time varying expression for output(?)

so by both these methods you should get the same answer?
and yes v+ is connected to ground :)

you are mixing things up... it is easy to look at the amp as an RC filter with a gain function... RC filters are sometimes considered integrators and they do approximate integration until you approach a frequency of 1/RC.

Active integrators are opamps connected as inverting amplifiers with only a capacitor as a feedback element. A DC voltage is then converted to a DC current which charges the capacitor, the result is an almost perfect integrator until you saturate the opamp output.

Dan
 
But when you consider it as an RC filter with gain function you get the right value for the gain. But in that equation its missing that the output signals at offset, as seen on the curve. When you integrate the curve you get the ryt equation with the offset but wrong gain :confused:

i uploaded the curve i got for the output.. can you explain how to get that curve mathematically.. :( im running out of time
2hours eta :(:(
 
That is a time domain response where the input frequency is such that the gain is only about 2. If you look at the frequency domain response I posted, look where the gain is about 6db (~800Hz). Note that the phase shift from input to output is in the flat region where the phase shift is 90degrees. This is the region which is a long way above the corner frequency, so the response is that of an almost pure integrator (i.e. rolling off at -6db per octave, and exhibiting a phase shift of 90 degrees.
 
i understand that.. thanks :) but my homework problem is to get the time domain equation for the output at 1kHz.. therefore i need the equation for the red curve in my diagram :(
 
and the frequency domain response i got is a different.. although i did get a gain of around 3 at 1kHz at that bode.

a quick response would be highly appreciated :) 1 hour ETA :confused:
 

Attachments

  • bode..png
    bode..png
    25.7 KB · Views: 285
I would use Laplace transforms. That is much easier than solving Differential Equations.
 
Last edited:
Here is the Laplace method for a step input.

Note that it is not an exact integrator due to the presence of the feed back resistor R.

I'll leave it to you to do it for a sine input.

I also suggest that you repeat the maths with R removed.

Then, for a step input, the output v(t) will be a ramp rather than an exponential.

Note that the exponential approximates a ramp initially.

Also note that the gain at DC & low frequencies is R/r as you would expect.
 

Attachments

  • Integrator 2..gif
    Integrator 2..gif
    65.6 KB · Views: 249
  • Integrator 1..gif
    Integrator 1..gif
    51.7 KB · Views: 250
Last edited:
wow.. thanks a lot! :):)
any idea y you're not getting the gain when you're doing a time domain analysis? and not getting the offset when finding vout using the transform function?
 
I don't understand the first part of your question.

The gain is written at the bottom of the first page, ie. Vo(S) = ...

There is no offset since I have assumed an ideal Op Amp.

And in the time domain result, the gain is R(1-ε(-t/τ)/r

And as t > ∞, the gain > R/r
 
Last edited:
no no im not asking about your solution.. unfortunately i still didnt have time to go through it :(

lets say a voltage of 2sin(2000*pi*t) is applied to the above circuit..

when you multiply it by the magnitude of the transfer function and add the phase difference you get

Vout = -1.59*2sin(2000*pi*t-90)

but when you do a time domain analysis.. as in when you consider the voltage across the capacitor and integrate it over time you get

Vout = -(some_gain)*2(cos(2000*pi*t) + 1))

so as you can see this signal is going to be an offset of its amplitude due to the +1 part of its equation.. which is the case for integrating op-amps as shown in the simulation curve. but unfortunately the (some_gain) i get here is not equal to 1.59.. which is the correct gain according to simulation.. :S

and in the first method using transfer functions i get the gain of 1.59 but not the offset..

so for my prelim i just substituted 1.59 inplace of (some_gain) and the answer was correct! :D hehe but i dont know how to derive it mathematically.. unless you do both analysis and combine them
 
Hi there,


One way to do this would be to find the Laplace of the integrator, then convolve that with the Laplace for a sine wave, then find the inverse transform.
I assume the sine wave itself does not have an offset voltage.

If you dont need the initial exponential part of the response you can just assume sin and cos terms:
Vo=A*sin(wt)+B*cos(wt)

That is quite handy if you only need the steady state response (i think that's what you may want),
but if you want to include that exponential term too but dont have to include the initial cap voltage you need to add that one also:
Vo=A*sin(wt)+B*cos(wt)+C*e^(-at)

but if you do need to include the initial cap voltage then you have to add another exponential term:
Vo=A*sin(wt)+B*cos(wt)+C*e^(-at)+Vc*e^(-at)

Note w is the angular frequency for the applied sine wave and Vc is the initial cap voltage referenced to the inverting terminal.
A,B,C, and lower case 'a' are all constants to be determined.

I think the easiest way to find the Laplace for the integrator is to sum all the currents to zero.
 
Last edited:
It is 40 years since I last solved DEs directly.

So I have forgotten how to do integration for a sine function as in this case.

I know that ∫sin t dt = -cos t, but this case is more complex.

Attached is the solution for a step function solution - it may give you a clue as to what your problem is.
 

Attachments

  • Integrator 3..gif
    Integrator 3..gif
    31.5 KB · Views: 236
Hi again,


Doing a direct evaluation with the sine source is a little more involved but maybe not by much...

Starting with ljcox's current analysis for the circuit:
R*C*dVo/dt=Vi*R/r-Vo

that is the differential equation for the circuit.

One way to solve this is by the use of Laplace transform techniques,
or we can do it using an integrating factor.

To get into integrating factor form, we rearrange some terms and we get:
dVo/dt+Vo/(R*C)=Vi/(r*C)

and since Vi=sin(w*t) we substitute that and get:
dVo/dt+Vo/(C*R)=sin(w*t)/(r*C)

and now the equation is in the integrating factor form:
dy/dt+p(t)*y=g(t)

and the solution is:
(u(t)*y)'=u(t)*g(t)

where:
(u(t)*y)' is the time derivative of (u(t)*y)
y=Vo
dy/dt=dVo/dt
p(t)=1/(R*C)
g(t)=sin(w*t)/(r*C)
u(t) is the integrating factor:
u(t)=e^integrate[p(t)]dt

and now we will integrate both sides of the DE:
integrate[(u(t)*Vo)']dt=integrate[u(t)*g(t)]dt

and after substituting the values above and simplying the left side we get:
e^(t/(R*C))*Vo=integrate[e^(t/(R*C))*sin(w*t)/(r*C)]dt

and after performing the ride side integration we get:
e^(t/(R*C))*Vo=(e^(t/(R*C))*(R*sin(w*t)-w*cos(w*t)*R^2*C))/(r*w^2*C^2*R^2+r)+K

Now solving for Vo we get:
Vo=K*e^(-t/(R*C))-(w*R^2*C*cos(w*t))/(r*w^2*C^2*R^2+r)+(R*sin(w*t))/(r*w^2*C^2*R^2+r)

and lastly we would solve for K using the initial conditions.

This is now in the form i was talking about previously, but if you want to solve with a peak amplitude factor
you'll have to substitute A*sin(w*t) for sin(w*t) in g(t), then solve again, and if you want an input offset and a
peak amplitude you'll have to substitute A*sin(w*t)+B where B is the offset voltage, then solve the above again.

Now wasn't that simple?
:)
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top