Op-amp integrator and differentiator calculator
The parts for an inverting op-amp integrator or differentiator from the band it has to work over, or the response of the parts already fitted: the unity-gain frequency, the resistor that stops the integrator's gain at DC and the one that stops the differentiator's at high frequency, the op-amp gain-bandwidth each needs, and what a sine, square or triangle comes out as. The design steps are TI's SBOA275 and SBOA276, and the defaults are their worked designs: 1.59 nF for 0 dB at 1 kHz with 100 kΩ, and 15.0 nF with 1.00 kΩ for a differentiator from 100 Hz to 2.5 kHz on an op amp faster than 5.31 MHz.
Integrator: a capacitor in the feedback path, output proportional to the time integral of the input, gain falling at 20 dB per decade. Differentiator: a capacitor at the input, output proportional to the input's rate of change, gain rising at 20 dB per decade. Both are the inverting amplifier with one resistor swapped for a capacitor.
Design: enter the band the circuit has to work over and get the parts, by the steps of TI's SBOA275 (integrator) or SBOA276 (differentiator). Analyse: enter the parts already fitted and see where they integrate or differentiate, and whether the op amp is fast enough.
The input resistor. SBOA275 step 1: "Set R1 to a standard value", and uses 100 kΩ. A larger R1 needs a smaller C1 for the same f0dB, and a larger R2 for the same DC gain.
The frequency at which the integrator's gain is 1 (0 dB), f0dB = 1/(2π·R1·C1). Below it the output is larger than the input, above it smaller. SBOA275 uses 1 kHz.
The lowest frequency the circuit has to work at. SBOA275 designs for 100 Hz and puts the R2·C1 corner a decade below it; SBOA276 designs for 100 Hz and puts fc half a decade below it.
The highest frequency the circuit has to work at. SBOA275: 100 kHz, which needs an op amp of at least 1 MHz GBW. SBOA276: 2.5 kHz, with R1 setting the upper corner half a decade above it.
Round the calculated parts to a stocked series. The differentiator rounds C1 up and R1 down, the directions of SBOA276's ≥ and ≤; SBOA276 itself rounds 11.1 nF to 15 nF and 1.2 kΩ to 1 kΩ, which is E6. The integrator rounds C1 to the nearest value and R2 up; SBOA275 keeps the calculated 1.59 nF, "none" here.
The op amp's gain-bandwidth product, from its datasheet (UGBW or GBW). SBOA275's TLV9002: 1 MHz. SBOA276's TLV9061: 10 MHz. It sets the top of the integrator's band and whether the differentiator is stable.
Input offset voltage, from the datasheet. The integrator multiplies it by its DC noise gain, 1 + R2/R1; the differentiator, whose input capacitor blocks DC, by 1. TLV9002: 0.4 mV. TLV9061: 0.3 mV.
Input bias current, from the datasheet, which flows through R2 and shifts the output by Ib·R2. TLV9002: 5 pA. TLV9061: 0.5 pA. SBOA275 design note 2: "Select a CMOS op amp to minimize the errors from the input bias current."
The input waveform. An integrator turns a square into a triangle and a sine into a cosine; a differentiator turns a triangle into a square and a square into a spike at each edge. The waveforms are SBOA275's and SBOA276's own transient tests.
The input's peak amplitude, from its centre to its peak. SBOA275 tests with ±100 mV; SBOA276 with ±20 mV (sine and triangle) and ±1 mV (square).
The input's frequency. SBOA275 tests at 1 kHz; SBOA276 at 2.5 kHz and, for the triangle, 100 Hz.
How far the output can swing either side of its reference (ground, or the Vref a single supply needs) and stay linear. SBOA275: ±2.45 V on ±2.5 V. SBOA276: 0.1 to 4.9 V about 2.5 V, ±2.4 V.
- C1 = 1/(2π·R1·f0dB), SBOA275 step 2
- 1.59 nF
- R2 ≥ 10/(2π·C1·fMin), step 3: the corner a decade below fMin
- 10.0 MΩ
- Op-amp GBW ≥ 10 × fMax, step 4
- 1.00 MHz: 1.00 MHz meets it
- Unity-gain frequency f0dB = 1/(2π·R1·C1)
- 1.00 kHz
- Lower corner 1/(2π·R2·C1) · DC gain R2/R1
- 10.0 Hz · 100 (40.0 dB)
- Integrates from 10 × the corner to GBW/10, SBOA275's decades
- 100 Hz to 100 kHz
- Gain at 100 Hz and 100 kHz: ideal · with the parts and op amp (derived)
- 20.0 dB → 19.9 dB · −40.0 dB → −40.1 dB
- Error from the ideal at 100 Hz and 100 kHz: gain · phase (derived)
- −0.05 dB, +5.7° · −0.05 dB, −5.7°
- Loop crossover · rate of closure · phase margin, single-pole op amp (derived)
- 1.00 MHz · 20 dB/decade · 90°
- Output for a ±100 mV sine at 1.00 kHz, with the op amp (derived)
- ±99.9 mV, 200 mV peak to peak
- Output offset: Vos × DC noise gain 101 · Ib × R2 (derived)
- 40.4 mV · 50.0 µV
SBOA275 prints 100 MΩ for this step, not 10 MΩ: it substitutes 10 Hz for fMin in "R2 ≥ 10/(2π × C1 × fMin)", which puts the corner at 1 Hz, two decades below the 100 Hz goal. Its schematic and simulations use 100 MΩ; switch to Analyse to see that circuit.
How this is calculated
Standard: TI SBOA275B, Integrator Circuit (pp. 1–4); TI SBOA276C, Differentiator Circuit (pp. 1–5); TI SNOA621C, AN-20 (Figures 6–10); TI SNLA140D, AN-31 (Figures 1-10, 1-11); TI SBOA092B, Handbook of Operational Amplifier Applications (pp. 21–22, 32–33, 38–40, 55, 61)
- The integrator. SBOA275 p. 2 gives the transfer function and, in step 2, C1 = 1/(2π × 100 kΩ × 1 kHz) = 1.59 nF; AN-20 Figure 9 and AN-31 Figure 1-11 write the same corner as fc = 1/(2πR1C1). SBOA092 p. 40: "Unity gain crossover occurs at the frequency where XCO = RI."
- SBOA275 step 3, "the lower cutoff frequency a decade less than the minimum operating frequency". With the design goal fMin = 100 Hz it gives 10.0 MΩ; SBOA275 substitutes 10 Hz and prints 100 MΩ, the value its schematic uses, which puts f_L at 1 Hz. The corner and the DC gain follow from R2 in parallel with C1.
- SBOA275 step 4: "Select an amplifier with a gain bandwidth at least 10 times the desired maximum operating frequency." For 100 kHz, 1 MHz.
- The differentiator. SBOA276 p. 2 gives the transfer function and, in step 2, C1 ≥ 3.5/(2π × 499 kΩ × 100 Hz) ≥ 11.1 nF ≈ 15 nF. The 3.5 is "half a decade (approximately 3.5 times)", design note 2. AN-20 Figure 7 writes fc = 1/(2πR2C1).
- SBOA276 step 3: R1 ≤ 1/(7π × 15 nF × 2.5 kHz) ≤ 1.2 kΩ ≈ 1 kΩ; step 5 gives the corner of an optional CF across R2. AN-20 Figure 7 sets the two corners equal, fh = 1/(2πR1C1) = 1/(2πR2C2), with fc ≪ fh ≪ f_unity gain.
- SBOA276 step 4, "the necessary op amp gain bandwidth product (GBP) for the circuit to be stable": (499 kΩ + 1 kΩ)/(2π × (1 kΩ)² × 15 nF) > 5.3 MHz. Rearranged, GBW/fh > 1 + R2/R1: at the corner fh the op amp's open-loop gain is still above the high-frequency noise gain, so the noise gain has levelled off before the open loop meets it (derived).
- The response the figure and the gain rows plot, derived: the inverting amplifier with an op amp of a single pole at its gain-bandwidth. For the integrator Zin = R1 and Zf = R2 ∥ C1; for the differentiator Zin = R1 + 1/(j2πfC1) and Zf = R2 ∥ CF. 1/β is the noise gain; where A·β = 1 is the loop crossover, and the difference in slope between 1/β and A there is SBOA092's rate of closure (p. 33). With GBW = 10 MHz it gives SBOA276's simulated 13.4 dB at 100 Hz and 41.4 dB at 2.5 kHz.
- Waveforms, derived from the transfer functions. Left: a square wave of peak A and period T into the integrator gives a triangle ramping at A/(R1C1); R2 bends the ramps, and with no R2 the peak-to-peak value is the limit on the right. Right: a triangle of peak A at f has slope 4Af, and the differentiator gives a square of that slope times R2C1. A sine comes out at A times the gain above.
- The integrator's output offset, derived from its DC noise gain; the differentiator's C1 blocks DC and its noise gain there is 1. SBOA275 design note 4: without an offset adjustment "the large DC noise gain will cause the circuit to saturate".
Assumptions
- The op amp is a single pole at its gain-bandwidth product, with unlimited DC gain and no output resistance. SBOA092 p. 32 calls the constant gain-bandwidth sketch "a conservative approximation to the typical response"; the model reproduces SBOA276's simulation but not SBOA275's at 100 kHz.
- The output stays within the op amp's slew rate, which this page does not check, and inside the linear swing entered, which it does.
- The input is driven from a source of negligible impedance; a source resistance adds to R1.
- The capacitors are ideal: no leakage, no dielectric absorption, no change of value with voltage or temperature.
- Offset and bias current are taken at their datasheet values and one sign; their drift with temperature is not modelled.
- The integrator's output starts from its steady state. A reset switch across C1, as in AN-20 Figure 9 and AN-31 Figure 1-11, sets a different starting point.
What sets an op-amp integrator's gain
An integrator is the inverting amplifier with its feedback resistor replaced by a capacitor. The input current, Vin/R1, cannot flow into the op amp, so it charges C1, and the output is the voltage across C1: SBOA092 (p. 21) describes it as current that "charges the capacitor and is stored there as a voltage from the output to ground". TI's SBOA275 writes the result as Vout = −1/(R1·C1) ∫Vin dt (p. 2). The output moves at a rate set by the input voltage and the time constant R1·C1, and it is inverted, since the input is on the inverting pin.
In the frequency domain the capacitor's impedance falls with frequency, so the gain does too: AN-20 calls the circuit "essentially a low-pass filter with a frequency response decreasing at 6 dB per octave" (p. 8), which is 20 dB per decade. One number places that line, the frequency at which the gain is 1. SBOA092 (p. 40): "Unity gain crossover occurs at the frequency where XCO = RI", which is f0dB = 1/(2π·R1·C1). Below it the output is larger than the input, above it smaller, and at every frequency the output lags a sine input by 90° on top of the inversion: SBOA275's simulation (p. 3) says "A 1kHz sine wave input yields a 1kHz cosine output."
The differentiator swaps the parts the other way, a capacitor in and a resistor in the feedback path. SBOA276 (p. 2) writes Vout = −R2·C1·dVin/dt: the output follows the input's rate of change, and the gain rises at 20 dB per decade through 1 at fc = 1/(2π·R2·C1). The calculator does both, from the band the circuit has to work over or from the parts already on the board.
Why a practical integrator needs a resistor across the capacitor
The ideal integrator's gain at DC is unlimited, and it integrates whatever DC it is given, including the op amp's own offset. SBOA275 (p. 1): "The ideal integrator circuit saturates to the supply rails depending on the polarity of the input offset voltage and requires the addition of a feedback resistor, R2, to provide a stable DC operating point." R2 across C1 turns the DC gain into R2/R1, and the gain curve flattens below the corner fL = 1/(2π·R2·C1). "The feedback resistor limits the lower frequency range over which the integration function is performed." Below the corner the circuit is a first-order low-pass filter, and AN-20 (p. 9) makes the distinction for its own low-pass circuit: "The circuit may be considered as an AC integrator at frequencies well above fc; however, the time domain response is that of a single RC rather than an integral."
R2 is a trade. A larger R2 moves the corner lower and integrates over more of the band, and SBOA275's first design note is "Use as large of a value as practical for the feedback resistor." It also raises the DC noise gain, 1 + R2/R1, that multiplies the op amp's offset voltage, and the bias current flows through R2 as well. With SBOA275's 100 MΩ and 100 kΩ and the TLV9002's 0.4 mV of offset (p. 4), the output sits 400 mV away from zero, 16 % of the ±2.45 V swing; with 10.0 MΩ it is 40.4 mV. Design note 4 is the fix for the large case: "An adjustable reference needs to be connected to the non-inverting input of the op amp to cancel the input offset voltage or the large DC noise gain will cause the circuit to saturate. Op amps with very low offset voltage may not require this." The schematic's "Vos −740u" source is that reference. Bias current adds Ib·R2, 500 µV for the TLV9002's 5 pA, which is why note 2 asks for a CMOS op amp.
The other way out is to leave R2 off and close a DC loop around the integrator from outside. SBOA275: "This circuit is most commonly used as part of a larger feedback/servo loop which provides the DC feedback path, thus removing the requirement for a feedback resistor." A stand-alone integrator with no R2 also needs a way to start from a known state, and AN-20 (p. 9) is explicit: "The circuit must be provided with an external method of establishing initial conditions", the switch S1 across C1 in its Figure 9. AN-31's Figure 1-11 has the same switch, "Open: Integrate, Closed: Reset", with 100 Ω in series with it.
How far from the corners is far enough
Two things bend the integrator away from its ideal line: R2 at the bottom of the band and the op amp's gain-bandwidth at the top. SBOA275 keeps a decade from each: step 3 puts the R2·C1 corner "a decade less than the minimum operating frequency", and step 4 asks for "a gain bandwidth at least 10 times the desired maximum operating frequency", because, as design note 3 puts it, "The effectiveness of the integration function is usually reduced starting about one decade away from the amplifier bandwidth." The table puts numbers on both, for SBOA275's own circuit (100 kΩ, 1.59 nF, 100 MΩ, a 1 MHz op amp), from the calculator's response: the error R2 alone causes at multiples of its corner, and the error the single-pole op amp adds at fractions of its GBW.
| Frequency | Gain error | Phase error | |
|---|---|---|---|
| 2 × fL | 2.00 Hz | −0.97 dB | +26.6° |
| 3.5 × fL | 3.50 Hz | −0.34 dB | +15.9° |
| 10 × fL | 10.0 Hz | −0.04 dB | +5.7° |
| 30 × fL | 30.0 Hz | 0.00 dB | +1.9° |
| 100 × fL | 100 Hz | 0.00 dB | +0.6° |
| GBW/2 | 500 kHz | −0.98 dB | −26.5° |
| GBW/3.5 | 286 kHz | −0.35 dB | −15.9° |
| GBW/10 | 100 kHz | −0.05 dB | −5.7° |
| GBW/30 | 33.3 kHz | −0.01 dB | −1.9° |
| GBW/100 | 10.0 kHz | −0.01 dB | −0.6° |
A decade from either limit, the gain is within 0.05 dB and the phase within 5.7° of an ideal integrator's. Half a decade (3.5 times) costs about 16° of phase. Which matters depends on the use: an integrator that shapes a triangle wave cares about the phase and the shape; one in a control loop cares about the phase at the loop's crossover.
Worked example: SBOA275's integrator
SBOA275 is TI's Analog Engineer's Circuit for the integrator. Its design goals (p. 1) are an input from 100 Hz to 100 kHz, 0 dB at 1 kHz and an output of ±2.45 V on ±2.5 V supplies. Step 1 sets R1 = 100 kΩ, "a standard value", and steps 2 to 4 follow. The calculator's defaults reproduce them.
step 2 C1 = 1/(2π × 100 kΩ × 1 kHz) = 1.59 nF
fitted 1.59 nF: f0dB = 1/(2π × 100 kΩ × 1.59 nF) = 1.00 kHz
step 3 R2 ≥ 10/(2π × 1.59 nF × 100 Hz) = 10.0 MΩ corner 10.0 Hz
as printed, 10/(2π × 1.59 nF × 10 Hz) = 100 MΩ corner 1.00 Hz
step 4 GBP ≥ 10 × 100 kHz = 1.00 MHz
DC gain R2/R1 = 100 MΩ / 100 kΩ = 1000, 60.0 dBStep 3 as printed substitutes 10 Hz for fMin, where the design goal is 100 Hz: "Calculate R2 to set the lower cutoff frequency a decade less than the minimum operating frequency. R2 ≥ 10/(2 × π × C1 × fMin) ≥ 10/(2 × π × 1.59nF × 10Hz) ≥ 100MΩ". The words and the formula both give 10.0 MΩ with 100 Hz, a corner at 10.0 Hz; the printed 100 MΩ puts it at 1.00 Hz, two decades below 100 Hz rather than one. The schematic and the simulations use 100 MΩ, so the larger value is the circuit TI tested. The calculator's design mode follows the formula, and its analyse mode starts from the schematic.
The AC simulation (p. 2) marks "40dB @ 10Hz", "0dB @ 1kHz" and "-38.6dB @ 100kHz". With the TLV9002 modelled as a 1 MHz single pole, the calculator gives 39.96 dB, 0.00 dB and −40.04 dB. The first two agree. At 100 kHz the ideal line is at −39.99 dB and the single-pole model a little below it, where the simulated curve is 1.4 dB above; past 100 kHz the simulated curve levels off just below −40 dB and rises again towards 1 MHz, which a single-pole op amp does not do. Whatever the simulated op amp adds beyond a single pole shows from 100 kHz, a tenth of the GBW, which is design note 3's decade.
The transient simulations (pp. 3–4) use a ±100 mV input at 1 kHz. A square wave "yields a 1kHz triangle wave output" spanning −136.45 mV to 186.58 mV, 323.03 mV peak to peak; the ideal ramp, 100 mV/(100 kΩ × 1.59 nF) = 629 V/s for half a millisecond, gives 314.5 mV, 2.7 % less, a difference this page does not account for. A triangle yields the parabolic arcs of a sine-like wave from −76.77 mV to 77.53 mV, 154.30 mV; the ideal integral is 157.2 mV. The page's tests hold the calculation to these figures within 3 %.
The differentiator, and why it needs an input resistor
The differentiator's gain rises with frequency without limit, and two things follow. It amplifies noise: AN-20 (p. 7) calls it "extremely susceptible to high frequency noise since AC gain increases at the rate of 6 dB per octave", and SBOA092 (p. 22) says that "of all the circuits presented in this section, the differentiator is the one that will operate least successfully with real components." And it is unstable. AN-20: "the feedback network of the differentiator, R1C1, is an RC low pass filter which contributes 90° phase shift to the loop and may cause stability problems even with an amplifier which is compensated for unity gain."
SBOA092 gives the test on the Bode plot (p. 33): "If the rate of closure between the open and closed loop sections of the Bode plot is greater than 40 db per decade the system is likely to be unstable." The noise gain of a simple differentiator rises at 20 dB per decade and meets the op amp's open loop falling at 20 dB per decade, so (p. 39) "the rate of closure is about 40 dB / decade, making the simple differentiator inherently unstable in operation." The calculator computes the rate from its model: for SBOA276's circuit with R1 removed it is 40 dB per decade, with 0.1° of phase margin and a 31.2 dB peak near 14.8 kHz.
SBOA276 (p. 1): "The ideal differentiator circuit is fundamentally unstable and requires the addition of an input resistor, a feedback capacitor, or both, to be stable. The components required for stability limit the bandwidth over which the differentiator function is performed." An input resistor R1 in series with C1 stops the gain at R2/R1 above fh = 1/(2π·R1·C1); a capacitor CF across R2 rolls it off above 1/(2π·R2·CF). AN-20's practical differentiator (Figure 7) fits both at the same corner, and explains the stability in terms of phase: "R1C1 and R2C2 form lead networks in the feedback loop which, if placed below the amplifier unity gain frequency, provide 90° phase lead to compensate the 90° phase lag of R2C1 and prevent loop instability." AN-31's Figure 1-10 is the same circuit with values: 1 kΩ and 10 nF in, 10 kΩ and 1 nF in the feedback, for fc = 1.59 kHz and fh = 15.9 kHz from both pairs.
SBOA276's step 4 turns the requirement into a minimum gain-bandwidth: GBP > (R1 + R2)/(2π·R1²·C1). R1 is the part that sets it. The table holds SBOA276's 15 nF, 499 kΩ and 10 MHz op amp and varies R1, with the upper corner, the high-frequency gain, the GBW step 4 asks for, and the phase margin and peaking of the calculator's single-pole model.
| R1 | fh | Gain above fh | GBW needed | Margin | Peaking |
|---|---|---|---|---|---|
| none | — | unlimited | none enough | 0° | 31.2 dB |
| 330 Ω | 32.2 kHz | 63.6 dB | 48.7 MHz | 26° | 7.8 dB |
| 1.00 kΩ | 10.6 kHz | 54.0 dB | 5.31 MHz | 64° | 2.2 dB |
| 2.20 kΩ | 4.82 kHz | 47.1 dB | 1.10 MHz | 84° | 0.6 dB |
| 4.70 kΩ | 2.26 kHz | 40.5 dB | 242 kHz | 89° | 0.2 dB |
| 10.0 kΩ | 1.06 kHz | 34.0 dB | 54.0 kHz | 90° | — |
A larger R1 makes the circuit easier to stabilise and lowers the band it can differentiate over, since fh falls with it; SBOA276's step 3 takes the largest R1 that keeps fh half a decade above fMax. The op amp matters as much as R1: with SBOA276's 1 kΩ on a 2.00 MHz op amp, below the 5.31 MHz step 4 asks for, the noise gain meets the open loop at 34 dB per decade, the margin falls to 34° and the response peaks 5.8 dB above the parts alone. The margin and peaking columns are from a model that treats the op amp as a single pole, which leaves out its higher poles, so they are the best case.
Worked example: SBOA276's differentiator
SBOA276's design goals (p. 1) are 100 Hz to 2.5 kHz, with the output between 0.1 V and 4.9 V on a single 5 V supply and a 2.5 V reference on the non-inverting input. Step 1: "Set R2 to a large standard value", 499 kΩ, since design note 1 is "Select a large resistance for R2 to keep the value of C1 reasonable." Step 2 is "Set the minimum differentiation frequency at least half a decade below the minimum operating frequency", step 3 "Set the upper cutoff frequency at least half a decade above the maximum operating frequency".
step 2 C1 ≥ 3.5/(2π × 499 kΩ × 100 Hz) = 11.2 nF → 15.0 nF (E6, up)
step 3 R1 ≤ 1/(3.5 × 2π × 15 nF × 2.5 kHz) = 1.21 kΩ → 1.00 kΩ (E6, down)
step 4 GBP > (1 kΩ + 499 kΩ)/(2π × (1 kΩ)² × 15 nF) = 5.31 MHz
corners fc = 1/(2π × 499 kΩ × 15 nF) = 21.3 Hz
fh = 1/(2π × 1 kΩ × 15 nF) = 10.6 kHz
band 3.5 × fc to fh/3.5 = 74.4 Hz to 3.03 kHz
HF gain R2/R1 = 499 = 54.0 dBSBOA276 prints "≥ 11.1 nF ≈ 15nF Standard Value", "≤ 1.2 kΩ ≈ 1 kΩ Standard Value" and "> 5.3MHz", and "The bandwidth of the TLV9061 is 10MHz, therefore this requirement is met." Both roundings are to E6 and in the safe direction, C1 up and R1 down, which is what the calculator's E6 setting does. The band the parts give, 74.4 Hz to 3.03 kHz, covers the goal.
The AC simulation (p. 3) marks "13.4dB @ 100Hz" and "41.4dB @ 2.5kHz". The calculator, with the TLV9061 as a 10 MHz single pole, gives 13.45 dB and 41.42 dB. The second is instructive: the ideal differentiator gives 41.41 dB at 2.5 kHz and R1 alone pulls that down to 41.17 dB, but the op amp's finite gain-bandwidth adds a little back: the model rises 2.2 dB above the parts-only curve near 11.7 kHz and reaches its maximum, 54.0 dB, at 14.6 kHz, where the simulated curve also tops out, a little above 50 dB between 10 kHz and 20 kHz, before it rolls off. The loop crosses over at 22.2 kHz, closing at 24 dB per decade with 64° of phase margin.
The transients (pp. 3–4): "A 2.5-kHz sine wave input yields a 2.5-kHz cosine output", from 128 mV to 4.87 V for ±20 mV in, ±2.37 V about 2.5 V; the calculator gives ±2.35 V. "A 100-Hz triangle wave input yields a square wave output": the ±20 mV triangle has a slope of 8 V/s, and 499 kΩ × 15 nF × 8 V/s = ±59.9 mV, inside the 2.43 V to 2.57 V the plot spans, spikes at each reversal included. "A 2.5-kHz square wave input produces an impulse output": each 2 mV edge through R1 would give a spike of 2 mV × R2/R1 = 998 mV on an ideal op amp, decaying with R1·C1 = 15.0 µs; the simulation's spikes reach 1.84 V and 3.16 V, ±0.66 V, so the calculator reports its figure as an upper bound.
The waveforms: square to triangle, triangle to square
The two circuits undo each other's waveforms, which is what the test input fields are for. Into an integrator, a square wave of peak A gives a triangle whose ramps run at A/(R1·C1) volts per second, and whose peak to peak is A·T/(2·R1·C1) for a period T; with R2 fitted the ramps are exponential rather than straight, and the calculator uses the exact steady state, 2A·(R2/R1)·tanh(T/(4·R2·C1)), which is the straight-ramp figure when R2·C1 is long against T. A triangle gives parabolic arcs that look like a sine, and a sine gives a cosine.
Into a differentiator, a triangle's constant slope, 4A·f, gives a square of height R2·C1·4A·f, and a square gives a spike at each edge. The output for a sine uses the full response, parts and op amp together. In every case the calculator adds the offsets and checks the total against the linear swing entered: SBOA276's design note 4 is "Operate within the linear output voltage swing (see Aol specification) to minimize non-linearity errors."
Where the model stops being valid
The op amp is a single pole. The response curves treat the op amp's open loop as GBW/f all the way up. SBOA092 (p. 32) calls that constant gain-bandwidth sketch "a conservative approximation to the typical response", and adds that "Since the typical gain fall off exceeds 20 dB per decade at some points, there may be slight peaking at intermediate closed loop gains." The model reproduces SBOA276's simulation to 0.1 dB and does not reproduce SBOA275's near 100 kHz, as above. The phase margin it reports leaves out the op amp's higher poles.
Unity-gain stability. At high frequency the integrator's noise gain falls to 1, so the op amp has to be stable at unity gain: AN-20 (p. 9), "the amplifier used should generally be stabilized for unity-gain operation". A decompensated op amp is outside this page.
Offsets and bias current. The calculator takes the datasheet offset and bias current with one sign and at one temperature. SBOA092 (p. 55) notes that in a simple integrator "current offset is stored in the feedback capacitor causing output voltage error", and AN-20 asks for a resistor at the non-inverting input equal to R1, "R2 must equal R1 for minimum error due to bias current", a correction this page does not model.
Slew rate and swing. A large, fast waveform can ask for more slew rate than the op amp has; this page checks the swing, not the slew rate. SBOA275's TLV9002 and SBOA276's TLV9061 slew at 2 V/µs and 6.5 V/µs (p. 4 and p. 5).
Common mistakes
- Leaving R2 off a stand-alone integrator. Without it the output drifts to a rail at a rate set by the offset; with it, the offset is multiplied by 1 + R2/R1, 1001 for SBOA275's parts.
- Leaving R1 off a differentiator. Without it the rate of closure is 40 dB per decade and the circuit rings or oscillates; SBOA276 step 4 has no answer with R1 = 0.
- Forgetting the inversion. Both circuits drive the inverting input, so an integrator's output falls while its input is positive.
- Choosing the op amp by the band alone. The integrator wants ten times fMax in GBW; the differentiator's requirement comes from its parts, (R1 + R2)/(2π·R1²·C1), and can be much higher: 5.31 MHz for a 2.5 kHz circuit.
- Trusting a printed value without its formula. SBOA092 (p. 61) prints "0.6 kHz" for 1/(2π·RI·CI) with 1 kΩ and 0.1 µF, and "16 kHz" for 1/(2π·RO·CI) with 100 kΩ; the formulas give 1.59 kHz and 15.9 Hz.
- Using the 3 dB bandwidth idea on an integrator. It has no flat band to measure 3 dB down from; its useful band is set by the distance from the R2 corner and from the GBW, as in the first table.
Further reading
- TI SBOA275, Analog Engineer's Circuit: Integrator Circuit — the design steps (p. 2), AC and transient simulations (pp. 2–4) and the TLV9002.
- TI SBOA276, Analog Engineer's Circuit: Differentiator Circuit — the design steps, including the GBW for stability (p. 2), and the simulations (pp. 3–4).
- TI SNOA621, AN-20: An Applications Guide for Op Amps — the classic differentiator, practical differentiator and integrator, Figures 6 to 10.
- TI SNLA140, AN-31: Amplifier Circuit Collection — the practical differentiator and the integrator with a reset switch, with values (Figures 1-10 and 1-11).
- TI SBOA092, Handbook of Operational Amplifier Applications — the ideal circuits (pp. 21–22), Bode plots and the rate of closure (pp. 32–40), and practical integrators and differentiators (pp. 55–62).
- Op-amp gain calculator — the inverting and non-inverting amplifiers these circuits are built from.
- Active filter calculator — the low-pass and high-pass filters an integrator with R2, and a differentiator with R1, turn into outside their bands.
- Transimpedance amplifier calculator — another circuit whose stability is set by where the noise gain meets the open loop.
- Slew rate calculator — whether the op amp can follow the waveform this page does not check.
- Reactance calculator — the capacitor's impedance that sets both circuits' gain.