# What is the purpose of the opamp in an integrator circuit?

What is the exact role of opamp in an integrator circuit....?

• It does the integration. Oct 15 '15 at 13:40
• There are multiple reasons, you can easily turn a square wave into a ramp signal. Commonly used for charging purposes due to its gradual changes. Oct 15 '15 at 13:41
• No, the integration is done by the capacitor.
– LvW
Oct 15 '15 at 14:54

Here comes another explanation: For integrating purposes we need a passive RC lowpass with a very low cut-off frequency. This would require excessive large capacitor values.

Therefore - why not using the capacitance multiplication offered by the MILLER effect? Do you remember the MILLER effect in a simple transistor stage? Hence, we connect the integrating resistor to the inverting input of an amplifier which has a capacitor between inverting input and output. Now - the capacitor value is amplified by the open-loop gain of the opamp (as seen from the input).

Example: 1nF*1E5=100µF. Together with an integrating resistor of R=10kOhm we would have a time constant of 1sec (cut-off at f=1/6.28 Hz). As another advantage - the output is available at the low-resistive opamp output.

By the way: That is the reason the shown circuit is called "MILLER integrator".

• This is a typical example of how some phenomenon can be both useful and undesired... The transistor version of the Miller integrator can be included in the circuit evolution before the op-amp version. Feb 12 at 1:49
• Or with other words: Each circuit modification with the aim to improve one specific property of a circuit will, at the same time, degrade another property of that circuit. In electronics, every design is a trade-off between comflicting parameters.
– LvW
Feb 13 at 9:49

An opamp in such a negative feedback configuration will try to keep the voltage between the - and + input zero. The + input is grounded (0 Volt) so the opamp will control it's output such that the - input will also be 0 Volt. Let's assume that Vin is 1 Volt then there will be 1 V across resistor R. This means that a current of 1/R will flow through the resistor. This current cannot flow into the - input of the opamp (the inputs are high-impedance) so the current must flow to the capacitor, charging it. Since the - input stays at 0 Volt and the capacitor is charging, the other plate of the capacitor (connected to the output of the opamp) must linearly decrease in voltage. So at the output there would be a linearly decreasing voltage.

To make the output voltage increase you would have to apply a negative voltage (for example -1 Volt) to the input. If Vin = 0 then the circuit enters a static situation as the capacitor is not charged nor discharged.

• As per the figure given by Mr.Nuts, if there was a positive 1 V input, the output would linearly decrease becoming more and more negative. Oct 16 '15 at 21:47

The Opamp decouples the voltage over the capacitor from the current through the resistor. By adjusting the voltage on the other side of the capacitor until the input side is at zero voltage, the resistor charging the capacitor always sees the equivalent of an empty capacitor, charging into a 0V terminal. Thus the current through the resistor stays proportional to the input voltage even while the capacitor is being charged.

• Exactly! The combination of the capacitor and op-amp can be thought of as a "ever empty capacitor" or a "bottomless vessel". See the hydraulic analogy in this RG question. Feb 12 at 1:24

By virtue of negative feedback, the inverting input is kept at the same voltage as the non-inverting input i.e. ground or 0V. This is called a virtual earth.

It has the effect of this - any voltage applied to the input creates a current in R that is Vin/R. There is no option here - the inverting input, to a massive extent is held at 0V by negative feedback.

Given that the input impedance of the op-amp can be regarded as being so high as to be regarded as infinite, the input current can only flow through the capacitor.

Q = CV or $\dfrac{dQ}{dt} = C \dfrac{dV}{dt}$ = input current

Because the voltage on the capacitor (V) in the above equation is one-side tied to the same virtual earth, the op-amp output must actually be -V.

Can you see why this is an integrator?

$\dfrac{V_{IN}}{R} = -C\dfrac{d(V_{OUT})}{dt}$

Integrate both sides to solve for Vout.

My inference,

Opamp dont care about the capacitor…it does its work tirelessly to equate both input terminals…it our work how to basically exploit this property to our need of integration.

So what our requirement

To linearly discharge the capacitor for true integration.

How will us achieve step 1…and the answer is to charge capacitor via constant currents

Now what are the problem that comes in generating constant current ….and those are —> i) If input voltage is varying for e.g sine cos etc and ii) the capacitor voltage Vc

Now with some voltage drops over R due to Vin at inverting terminal of opamp …the opamp according to its nature will try to equate the voltages of both terminal to the same value thus it output such a voltage which will make same current to flow across the capacitor and the same current to flow across R to cancel out….so literally its the same thing that means a same and opposite amount of current flows across the capacitor which is also flowing across R….hence the two currents are same ..

Now considering fluctuation of Vin..first we should know what does constant current means..it means that the value of current should remain same no matter what Vin and R value is..it should be fixed at some value always.Suppose Vin rise positively to some extent(any atributary value)..as current starts flowing through R… voltage is developed at the inverting terminal…now in order to maintain constant current across the branch(resistor + capacitor) the opamp will output the same voltage in opposite direction..which literally maintains same potential in the branch ..no matter what value Vin goes ..Vout will go down or up the same extent hence maintaining the same current in the branch despite of Vin fluctuations.

Also one should not be confused about the direction of the current that is flowing in the branches ,there are no opposite currents..since the left end of cap is at zero volts due to virtual ground which is still at greater potential than the negative Vout potential of the cap..hence the current will maintain the same direction…(ie…Vin—>R—->C——>Vout..)….

Am I right...

• Here is my opinion, five years later... Interesting way of thinking and explaining... Exactly, the op-amp does not know what an element is connected between its output and inverting input. It just "observes" the voltage of its left end and changes the voltage of its right end so that to keep the former with zero value. Continue in this direction... Feb 12 at 1:36

I like to this of it as a voltage-to-current converter. The op amp converts the input voltage to a feed-back current.

The current that gets fed back through the capacitor is given by ohms law: Icap = Iresistor = Vin/R This is true because the op amp strives to keep the voltage the same at its two input terminals, so the voltage at the inverting terminal should always be 0 V. So the current flowing through the resistor should be the input voltage divided by the input resistance.

The voltage across the capacitor (Vout) is then given by the capacitor equation:

Vcap = integration(Icap)/C Vout = -Vcap Vout = -integration(Vin/R)/C Vout = -integration(Vin)/(RC)

• Well, I guess, strictly speaking, the resistor is the voltage-to-current converter... The op amp keeps one leg of the resistor at 0 V and forces the same current from the resistor to flow through the capacitor. Oct 19 '15 at 23:42
• Yes, the humble resistor acts here as a passive voltage-to-current converter. It is imperfect but works at ideal load conditions (short circuit) provided by the op-amp. So, the combination of the resistor and op-amp (including the power supply) can be considered as a 'perfect voltage-to-current converter'. I have dedicated two stories to it in Wikibooks and in circiit-fantasia.com. Feb 12 at 1:12

What is exact role of opamp in integrator circuit....?

My simple answer is: The op-amp compensates the voltage drop across the capacitor by adding an equivalent output voltage in series.

A better way to answer such a fundamental question is to reinvent step-by-step the circuit and show its evolution from the simplest passive version to the most sophisticated op-amp active version. I have demonstrated this approach below by a 5-step building scenario accompanied by pictures.

Surprisingly, my explanations are not based on the virtual ground concept but rather on the more general concept of virtual short between the two op-amp inputs. That is why my circuits are drawn floating and only the digits 1 and 2 in blue remind of the virtual and real ground.

## Building scenario

1. C current integrator. Due to its accumulating property, the humble capacitor can serve as a simple integrator with current input and voltage output - Fig. 1.

Fig. 1. A capacitor acting as a simple current-to-voltage integrator.

If driven by a constant current source, it would be perfect because the voltage drop across the capacitor will not affect the current (the current source is responsible for the constant current).

2. RC voltage integrator. But since, for a variety of reasons, we prefer to use voltage than current in our circuits, we need an integrator with voltage input. We easily guess to put a resistor R in series to the capacitor with the purpose to convert the input voltage to current - Fig. 2.

Fig. 2. An RC circuit acting as an imperfect voltage-to-voltage integrator.

In the beginning, the voltage across the capacitor is zero. The current is determined only by the input voltage and resistance, according to Ohm's law (I = Vin/R). But when the voltage across the capacitor increases, the current begins depending also on it - I = (Vin - Vc)/R, and slows down its rate of change. This leads to the famous exponent... but here we need a linear relation.

3. RC integrator compensated. The voltage drop across the capacitor causes this nonlinearity... so, it has to be zero for a best linearity... but we need it as an output voltage. What do we do then?

Common sense and experience tell us the idea how to remove Vc but still to have a copy of it. We quess to connect a variable voltage source in series to the capacitor and in the same direction as the input voltage - Fig. 3, and make its voltage equal to the voltage drop across the capacitor.

Fig. 3. RC integrator compensated by a "helping" voltage source.

As a result, the voltage drop of the capacitor will be removed and the current will be as in the beginning - I = (Vin - Vc +Vc)/R = Vin/R. Note that here the integrating circuit (R, C and VOA) is responsible for the constant current; it "helps" the input voltage source with an additional voltage VOA = Vc.

But where do we take the output voltage from? There are three possible output voltages:

1. Vout = V(1-2) = 0: This is where we took the output voltage so far. But now it is zero and cannot serve as an output voltage.

2. Vout = Vc: Theoretically, the original voltage across the capacitor can be used as an output voltage but this has two drawbacks: first, this voltage is "floating"; second, the load will shunt the capacitor with its internal resistance and will divert a part of the current flowing through the capacitor.

3. Vout = VOA = -Vc: This is the clever idea which might occur to us - to use the compensating "mirror copy" -Vc as an output voltage instead of the original voltage Vc. Thus the load is grounded; it consumes a current from the "helping" voltage source instead from the input source and so it can be with low resistance.

I conducted such a fun experiment with my students in 2001. We used an electrolytic capacitor with large capacitance and a resistor with high resistance (to slow the charging process), a sensitive voltmeter to measure the voltage V(1-2), and a variable power supply to produce VOA (Vout). Students were varying VOA so that to keep zero voltage V(1-2); as a result, VOA was changing linearly through time.

4. Op-amp inverting integrator. Now it remains only to replace the manually-controlled "helping" voltage source with an op-amp - Fig. 4. The current path is crucial here to see the great idea. Since the input voltage is positive, the op-amp output voltage is negative and the current enters the op-amp output... then passes through the negative power supply V- and returns to the input source. The positive source V+ is not essential in this case; so it is only hinted.

Fig. 4. Op-amp inverting integrator (only the negative power supply V- is explicitly shown).

The op-amp keeps (almost) zero the voltage V(1-2) between its inputs so its output voltage is always equal to the voltage drop across the capacitor. Thus the op-amp compensates the voltage drop Vc across the capacitor - by copying the capacitor voltage and adding the copy in series to the input voltage.

So, the key point of this explanation is adding, not amplifying. To think of the amplifier in a negative feedback circuit not as of an amplifier but rather as of something like a slow being is a powerful technique for intuitive understanding and explaining such op-amp circuits.