3
\$\begingroup\$

I am trying to understand the working and function of the integrator and differentiator circuits using op-amps.

Can someone tell me why we need to use op-amps for that function? Selecting just the right value of RC components (appropriate time constant values) according to our input signal would also perform the same function, right?

What advantage does the op-amp give us and what disadvantage does the usage of RC circuits for the differentiation and integration functions gives us?

\$\endgroup\$
5
  • \$\begingroup\$ "Selecting just the right value of RC components (appropriate time constant values) according to our input signal would also perform the same function, right?" No, you have to use opamp. \$\endgroup\$ Jun 17 at 7:56
  • 3
    \$\begingroup\$ I suggest that you use a circuit simulator like LTSpice and build these circuits with and without opamps. Then compare their behavior. Which ones have in a more "ideal" behavior? For example, generate a square-wave signal and use an integrator to convert that into a triangle-shaped wave. \$\endgroup\$ Jun 17 at 7:58
  • 2
    \$\begingroup\$ @Newbie, I want to ask you honestly: Do you need even simpler and clearer explanations, which, however, require some reaction on your part? I ask you because I have noted that your questions are interesting and they provoke such answers... but once you get them, you does not react... Why? \$\endgroup\$ Jun 17 at 18:28
  • \$\begingroup\$ @Circuitfantasist, I am not sure what you mean by that I do not react? \$\endgroup\$
    – Newbie
    Jun 18 at 4:29
  • \$\begingroup\$ @Newbie, If you asked an interesting question, it stimulates the participants to answer it with an (even more) interesting and original answer. It would be good for you to rate this not only with "+1" but also with an (albeit short) comment where you can show what you understood and what you did not understand. You can also ask an additional question. Thus, a small discussion can take place, as a result of which the issue will be fully clarified. \$\endgroup\$ Jun 18 at 18:01
10
\$\begingroup\$

You don't need the opamp, in theory. A simple, passive, RC circuit gives you am integrator or differentiator (otherwise known as first order low pass/high pass filter).

One problem is output impedance and loading. The opamp allows you to create a similar circuit which has very low output impedance, and whose characteristic will not be significantly altered when connected to a real world load, in the order of kilohms to megohms.

Input impedance might also be an issue if the output impedance of the driving signal is not very low. This could also be solved by using an opamp buffer.

A second problem with a passive integrator is that it has an exponential response to a constant input, whereas an opamp integrtaor has a linear one (until it reaches its limit of course).

\$\endgroup\$
16
  • 4
    \$\begingroup\$ The main problem of the RC integrating circuit is its nonlinear (exponential) curve through time when a constant input voltage is applied. \$\endgroup\$ Jun 17 at 13:50
  • 1
    \$\begingroup\$ you are correct! updated. \$\endgroup\$
    – danmcb
    Jun 17 at 15:02
  • \$\begingroup\$ In principle, the same applies to an active integrator as well. However, this effect is hardly to identify because of the very large MILLER capacitance. So - it is common practice to neglect this effect. \$\endgroup\$
    – LvW
    Jun 17 at 15:50
  • \$\begingroup\$ @LvW, Here is an illustration of my "meta" comment that I just wrote under Spehro's response a while ago. The op-amp integrator is something qualitatively different from the ordinary RC integrating circuit; its curve is thousands of times more linear than the exponential curve of the RC circuit... so we can consider it as a straight line. Talking about circuit imperfections at the stage of understanding kills the understanding of the fundamental idea. This is a basic principle in inventive (creative) thinking. \$\endgroup\$ Jun 17 at 19:57
  • \$\begingroup\$ Different people have different principles for explaining physical phenomena - no surprise there. Therefore, I cannot agree with your last sentence. There is no fundamental difference in the operation of the simple RC element and the active MILLER integrator. In both cases the output voltage is the time integral over the current flowing through the resistor. The only difference is that the time constant of the active circuit can be very large. I think that this knowledge is the basis for understanding both circuits. \$\endgroup\$
    – LvW
    Jun 18 at 6:28
5
\$\begingroup\$

Yes - a simple RC circuit can be used (theoretically !) as an integrator - under the assumption that the time constant T=RC is very large. For example:, with R=100k and C=10µF the pole frequency is wp=1 rad/s and the range of intergation will approximately start for w>100 rad/s.

What does the opamp? It not only allows to connect a load (without influence to the integration process) but it will drastically increase the effective capacitance by a factor which is identical to the (very large) open-loop gain of the opamp. This is due to the well-known MILLER effect. Therefore, such an intergator is called "MILLER integrator".

MILLER effect (in short):

When a capacitor C is connected between the input and the INVERTING output of an amplifier, the current through C is much larger (due to the amplified and inverted output voltage) if compared with the current driven from the input voltage only. Hence, the effective conductance wC seems to be much larger (if seen from the input only and when compared with the product wC for the selected value of the capacitor).

Example: C=1nF connected between input and (inverting output).

  • Current through C without an amplifier: i1=V_in*wC

  • Current through C (between v_in and v_out=-A * v_in): i2=[v_in-(-A*v_in)]*wC.

  • Comparison: i2/i1=(1+A).

  • For case 2, the current through C is larger by a factor of (1+A); that means: The capacitor C acts as if it were larger by the factor (1+A).

  • Note that for an opamp we have A=A_open loop.

\$\endgroup\$
7
  • \$\begingroup\$ Thank you for your answer. But, I have not got the concept of Miller effect understood. Any simple explanation you can provide to understand the Miller effect in basic terms? \$\endgroup\$
    – Newbie
    Jun 17 at 10:22
  • \$\begingroup\$ Please, see my edit (MILLER effect) \$\endgroup\$
    – LvW
    Jun 17 at 10:55
  • \$\begingroup\$ Why are you putting Miller in all caps? \$\endgroup\$
    – Hearth
    Jun 17 at 13:46
  • 2
    \$\begingroup\$ Sorry, but I could not get your message. What do you mean with "all caps"? I spoke only about one single cap between input and inverting output! \$\endgroup\$
    – LvW
    Jun 17 at 15:45
  • \$\begingroup\$ "caps" = "capital letters" \$\endgroup\$ Jun 17 at 20:43
5
\$\begingroup\$

Consider the simplest possible input to the integrator (a constant voltage) and compare the behavior of the two circuits.

schematic

simulate this circuit – Schematic created using CircuitLab

(I've added an inverter to the op-amp integrator to give an output that is the positive integral of the input voltage, for easy comparison).

enter image description here

We know ideally the integrator will output a straight line ramp starting at the initial voltage and increasing at 1V/100ms.

From the simulation we can see that the op-amp circuit does that, however the RC circuit does not. Initially it starts off with the same slope, however as the output voltage starts to approach an appreciable fraction of the input voltage (1V in this case) the divergence increases. It will never even quite get to 1V, whereas the op-amp output will increase until the op-amp itself runs into some kind of limit (such as getting too close to the positive rail for the op-amp to work properly).

The op-amp integrator also has a low output impedance, which is a useful secondary effect. In this case, the op-amp input "looks" like a 100K resistor to (virtual) ground, whereas the RC circuit is not as simple.

If it is a current that you are integrating, a capacitor alone will do that perfectly, however an op-amp integrator circuit (think of the above circuit with R1 = 0\$\Omega\$ and V1 replaced with a current source) has the input as a virtual ground. That's a great advantage in some situations (for example, if the current source is a photodiode) since it almost eliminates the voltage change across the PD, greatly increasing the circuit performance because the PD capacitance has little effect on the circuit speed.

\$\endgroup\$
20
  • \$\begingroup\$ "From the simulation we can see that the op-amp circuit does that, however the RC circuit does not." And how does the op-amp circuit do this magic? \$\endgroup\$ Jun 17 at 15:44
  • 1
    \$\begingroup\$ @Circuitfantasist That magic is referred to in my answer with respect to the virtual ground, so the op-amp becomes an almost ideal voltage to current converter. Sounds like you're itching to write an answer, so please have at it. We already have answers that approach from the frequency domain and the time domain and your unique approach can't hurt. \$\endgroup\$ Jun 17 at 17:14
  • 1
    \$\begingroup\$ @Circuit fantasist, when you read my single comment above again you will notice that I did nothing else than to mention the fact that the non-idealities of the opamp integrator can best be seen by inspecting the phase response. So - I dont know which "approach" you are referring to. I cannot see where I have "discouraged others"..... \$\endgroup\$
    – LvW
    Jun 18 at 6:41
  • 1
    \$\begingroup\$ @Circuitfantasist - the basic principle by which the op amp improves the linearity of the RC basic circuit, is: gain is cheap. The RC basic circuit works well when RC is large; the op amp version works well when A* RC is large, A being the op amp voltage gain. \$\endgroup\$
    – Whit3rd
    Jun 20 at 20:41
  • 1
    \$\begingroup\$ @Whit3rd, Agree... but only to add that you will never imagine how the op-amp inverting amplifier operates if you think of the op-amp as of a high speed amplifier. You have to think of it as of a slow acting servo... or human being (like the student in 2001)... \$\endgroup\$ Jun 20 at 21:27
4
\$\begingroup\$

There are already given several answers of RC integrators and RC differentiators and how they in certain conditions do something which resembles integration or differentiation.

But a capacitor alone does both of them and it does them very well. That's because capacitors obey the following law:

Charging current = Capacitance x The growth rate of the voltage.

That could be reversed by saying that the capacitor integrates the charging current.

So, is it integrator or is it differentiator depends on which quantity (current or voltage) is the input and which is the output.

This, of course, causes some difficulties if one wants both input and output as voltages. Operational amplifier is a good help for this. The common opamp based integrator converts the input voltage to charging current and the common opamp based differentiator converts the charging current to voltage.

\$\endgroup\$
8
  • \$\begingroup\$ Very good answer with some ingenious guesses... Ah, if only you could clarify your last sentence, an excellent answer would be... \$\endgroup\$ Jun 17 at 15:33
  • \$\begingroup\$ OK. I'll add a clarification later. \$\endgroup\$
    – user287001
    Jun 17 at 15:58
  • \$\begingroup\$ user287001, is it really the "common opamp based integrator" which converts the input voltage into a charging current? I don`t think so. The integrator does nothing else than to integrate the voltage. Rather, it is just the resistance R between the signal input and the inverting terminal of the opamp (which is nearly at ground potential) who does this conversion. This does not work for a simple passive RC circuit because the current through the resistor is not determined by the input voltage only! \$\endgroup\$
    – LvW
    Jun 17 at 16:05
  • \$\begingroup\$ It charges the capacitor between -input and output of the opamp. The -input stays at GND potential, - the opamp sets Uout such way - The input current is Uin/R and that charges the capacitor because opamp inputs do not take substantial current when compared to other currents in a well designed circuit. Converting the input voltage to charging current is the mechanism how the common integrator does that "nothing else, but integrates" \$\endgroup\$
    – user287001
    Jun 17 at 16:11
  • \$\begingroup\$ Yes - thats exactly what I was saying: It is the resistor R (and not the whole integrator circuit) which provides the charging current i=v_in/R. \$\endgroup\$
    – LvW
    Jun 17 at 16:14
4
\$\begingroup\$

Can someone tell me why we need to use op-amps for that function?

Short answers

Here are two short but comprehensive answers - in the first, the op-amp is considered attached to the input voltage source; in the second, it is considered attached to the capacitor:

1. The op-amp copies the voltage drop VC across the capacitor and adds it to the input voltage VIN to compensate for VC; as a result, the current does not depend on Vc. The copy is used as an output voltage; so the load does not affect the input current because it is supplied by a separate voltage source.

2. The op-amp serves as a “helping” voltage source VC connected in series to the capacitor.

But if you still want to know the whole truth about the famous circuit, I recommend you read my story below.

Revealing the circuit contradiction

When we try to improve а circuit, at one point we encounter a contradiction. For example, in the OP's humble RC integrating circuit - Fig. 1, on the one hand, the input source "wants" the voltage drop across the capacitor to be negligible so as not to affect the input current (as other comments also note). However, on the other hand, the next stage "wants" this voltage to be large enough to function properly.

RC voltage integrator

Fig. 1. An RC circuit acting as an imperfect integrating circuit

Solving the contradiction

Basically, there are two ways to solve circuit contradictions - through compromise (used by conventionally thinking circuit designers, engineers, technicians, hobbyists...) and through new idea (used by creatively thinking inventors). The first solution is only a quantitative improvement while the second is a qualitatively new idea leading to invention. Let's consider the two approaches in the OP's RC integrating circuit.

Compromise solution

First, we can moderately increase R, C or both (the so-called time constant R.C) or decrease the input voltage (if possible) so as not to allow the output voltage to increase much. Thus we will make a trade-off between the linearity and magnitude of the output voltage… but we cannot expect a great result.

Another straightforward solution is to significantly increase the RC time constant and then to amplify the signal… but this will increase the noise as well. Obviously, we need a more clever idea...

Inventive solution

The clever idea. We can borrow this idea from life where we compensate for losses through equivalent income. In this case, voltage drop VC across the capacitor is such a loss because it is subtracted from the input voltage VIN and an effective voltage VIN - VC remains in the circuit. It creates a gradually decreasing current I = (VIN - VC)/R that is less than the desired constant current I = VIN/R.

Conceptual circuit. Following our philosophy of life, we decide to compensate for the "harmful" voltage drop VC by adding an equivalent voltage VC to the input voltage. For this purpose, we connect the following voltage source in series and in the same direction to the input voltage source - Fig. 2.

RC integrator compensated

Fig. 2. The following voltage source VOA = VC adds its voltage in series to VIN thus compensating the undesired voltage drop VC

Its voltage is added to VIN: so it compensates for VC and the current does not change when the capacitor charges - I = (VIN - VC + VC)/R = VIN/R. As a result, the contradiction is solved and we obtain a perfect linearity combined with high output voltage.

Op-amp implementation. The compensating voltage source can be implemented by a floating voltage follower… but the ingenious solution of the famous op-amp inverting amplifier can be obtained by applying a negative feedback - Fig. 3.

Op-amp inverting integrator

Fig. 3. In the op-amp implementation, the op-amp output acts as the compensating voltage source (only the negative power supply V- is explicitly shown)

Here, the op-amp adjusts its output voltage to make it equal to VC by observing the difference between them with its inputs and keeping it almost zero. If the op-amp non-inverting input is grounded (this is not mandatory), the famous virtual ground appears at the inverting input.

Conclusion

As you have seen above, the idea behind the op-amp inverting integrator is extremely simple. It is just an improved RC integrating circuit where a following voltage source (like a small adjustable "battery") producing voltage VC is connected in series to the input voltage source to help it. As a result, the voltage drop across the resistor R is equal to the input voltage VIN and the input current I = VIN/R depends only on VIN.

Some history

At the end of my story, I want to share an interesting psychological phenomenon - what are people capable of in the name of not accepting someone else's idea... no matter how simple it is... just because it is nobody's but someone's... To illustrate it, I have arranged in chronological order the main materials that I have published dedicated to this simple but clever idea.


The first guesses about this idea arose in my head in the late 80's but it became clear in 1992 when I sketched it on A5 sheet of paper and added it to my collection of circuit ideas...

Yellowed sheet from my idea archive - in Bulgarian. Translated text: (date 05.07.92) Title: Active integrator explained by "anti voltage". Explanation: The op-amp creates "anti voltage" and applies it in series to Uc. As a result, the current I in the circuit (through C) is constant and equal to I = E/R. The capacitor is linearly charged (Uc).


What was interesting to me was not the idea itself, no matter how clever it was, but to derive universal principles of how to convert imperfect passive circuits into perfect op-amp circuits. I managed to do it in 1997 at a university conference Electronics'97 with my material How to convert passive circuits into active ones and I have been promoting it ever since.


In 2001, my students and I carried out a very interesting experiment in the laboratory using a "man-controlled op-amp" (we made it using a battery and a potentiometer). We chose a large time constant (C = 1000 microF, R = 10 k) so that the voltage across the capacitor was slowly increasing. One of the students was slowly moving the potentiometer viper in the opposite direction so that to keep zero voltage at the *virtual ground". As a result, the potentiometer voltage was linearly changing. Unfortunately, I have only saved one poor quality photo where the details are not clearly visible.


In 2004, I included this idea in my web course on Basic Electronics.


To make it more attractive, in 2004 I created an interactive circuit builder based on this principle...

Building an op-amp inverting integrator - animated Flash movie, Ruffle needed


In 2006, I created Circuit stories on the whiteboard and dedicated a few stories to this principle...

How do we build an op-amp RC integrator? - circuit-fantasia.com (Circuit stories on the whiteboard)

Ramp generator - circuit-fantasia.com (Circuit stories on the whiteboard)


In 2008, I carried out my next web didactic experiment by uploading the laboratory classes with the participation of my students at Wikibooks...

How to make a perfect RC integrator - Wikibooks, Circuit Idea


In 2009, I generalized this principle into a philosophy about all op-amp inverting circuits and created Voltage compensation Wikibooks story. In the talk page I told the history of this idea.


In 2010, I was able to combine this principle with the opposite bootstrapping and to generalize them through the Miller theorem...

Miller theorem - Wikipedia


In the following years, I was popularizing the idea many times in forums including SE EE...

2011 What is the purpose of the opamp in an integrator circuit? - SE EE

2013 Can we virtually increase the capacitance up to infinity? - ResearchGate

2015 My understanding of RC circuits is broken - SE EE

2020 How does an op amp integrator work? - SE EE

2020 Charging of capacitor in RC circuit - SE EE

2021 What does a capacitor do? - SE EE

... until now... a total of 30 years...

And what do you think was the result? The same as here, in the comments and chats under this question... and what it will be like after my next attempt to show how simple the idea behind the op-amp integrator is... and behind all inverting circuits with negative feedback - just a small "battery" in series to the capacitor...

\$\endgroup\$
11
  • \$\begingroup\$ @Newbie, Any question? Is the small "battery" in series to the capacitor understandable to you? \$\endgroup\$ Jun 20 at 20:11
  • 1
    \$\begingroup\$ thank you for the very detailed explanation. +1 \$\endgroup\$
    – Newbie
    Jun 21 at 7:47
  • \$\begingroup\$ @Newbie, If you were my student, I would ask you the following question to check if you understood the clever idea: "The capacitor C subtracts a voltage drop VC from the input voltage while the op-amp adds voltage VC to the input voltage. Then what element op-amp represents? What can you call it?" \$\endgroup\$ Jun 21 at 14:24
  • 1
    \$\begingroup\$ @Newbie, In particular, here it is a "negative capacitor"... This is just a different point of view on this phenomenon... figuratively speaking... Don't go deeper if you are not interested. My remark was more to the "sages" here but, as you can see, they hide and are silent... Watch and learn how life is so that you are not surprised in the future by inadequate reactions... Thus you will gradually become a "practical psychologist" who sees the "other truth" about people... Thanks for the support. \$\endgroup\$ Jun 23 at 6:15
  • 1
    \$\begingroup\$ Thank you very much for your clarification \$\endgroup\$
    – Newbie
    Jun 23 at 6:20
2
\$\begingroup\$

Integrators without op amps are only an approximation.

Consider an ideal integrator with a time constant of 1 second. Put a unit input to it, and the output will rise (theoretically forever) at 1 per second in a perfectly straight line.

Now use an op amp with a 1 Mohm input resistor and a 1 uF feedback capacitor. For a 1 volt input, the output will rise (well, fall, actually) at 1 volt per second. It will do this until the output gets close to the supply voltage, at which point it will limit. Within the limits imposed by the power supplies the circuit will act like an ideal integrator.

Finally, consider a 1 Mohm resistor connected to a 1 uF cap, with the voltage across the cap being the output. If you apply 1 volt to the resistor, the voltage at the cap will initially rise a 1 V/sec. Integrator, right?

Well, keep watching. Instead of rising without limit, the capacitor voltage will start levelling off and will never get above 1 volt.

So, as long as the capacitor voltage doesn't change appreciably, a passive RC integrator works fine. The larger the output voltage, the farther it deviates from ideal behavior.

\$\endgroup\$
1
  • \$\begingroup\$ Really, it is a very good idea to explain in parallel, with the same values ​​of the RC elements, 1) the "bad" (RC) -> 2) the perfect (real op-amp) -> and 3) the "ideal" (ideal op-amp) circuit. But an even better idea is to show how 1 turns into 2 which, in turn, turns into 3... because everyone can see that the active op-amp circuit contains the passive RC circuit. Uncovering the evolution of a circuit solution can best explain it... \$\endgroup\$ Jun 17 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.