Integrator, differentiator and precision rectifiers

Ideal and practical op-amp integrators and differentiators, their corner frequencies and waveforms, and precision half-wave and full-wave rectifiers.

Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Integrators turn a flow-rate signal into total volume, a current into charge, and a square wave into a ramp for a function generator; they are also the heart of dual-slope ADCs and PI controllers. Differentiators turn position into velocity and detect edges. Precision rectifiers make it possible to rectify a 10 mV AC signal for an AC voltmeter or envelope detector, which an ordinary diode with a 0.6 V drop simply cannot do.

Key ideas

Ideal inverting integrator. Input resistor R to the virtual-ground node, capacitor C from output to that node. The input current v_i/R has nowhere to go except into C, so the capacitor voltage, and hence the output, is the running integral: v_o = −(1/RC)∫v_i dt + v_o(0). A constant input produces a linear ramp; a square wave produces a triangle wave. In the frequency domain the gain is −1/(jωRC): falling at 20 dB/decade, with unity gain at f = 1/(2πRC).

Why the ideal integrator fails in practice. At DC its gain is the op-amp's open-loop gain, so the tiny offset voltage and bias current are integrated too and the output drifts into saturation. The practical (lossy) integrator puts a large resistor R_f across C. Below f_a = 1/(2πR_fC) it is an inverting amplifier with gain −R_f/R; well above f_a it integrates. Choose f_a at least ten times below the lowest signal frequency. Integrators also need a reset switch across C in many instruments.

Ideal differentiator. Capacitor C at the input, resistor R in feedback: v_o = −RC·dv_i/dt. Its gain rises at 20 dB/decade, so it amplifies high-frequency noise and, combined with the op-amp's own roll-off, tends to ring or oscillate.

Practical differentiator. Add a small resistor R_s in series with C (and often a small capacitor across R). Then the circuit differentiates only up to f_b = 1/(2πR_sC) and behaves as an inverting amplifier of gain −R/R_s above it. Design rule: signal frequencies below f_b; f_b well above the highest signal frequency but low enough to stop noise.

Precision rectifiers. Putting the diode inside the op-amp's feedback loop divides its forward drop by the open-loop gain, so the circuit rectifies millivolt signals.

  • Precision half-wave (super diode): a non-inverting buffer with the diode in the feedback path; output follows positive inputs and is zero for negative ones.
  • Inverting precision half-wave: two diodes, one closing the loop for each polarity, so the op-amp output never saturates; this improves speed.
  • Precision full-wave (absolute-value) circuit: a half-wave stage plus a summing amplifier gives v_o = |v_i| (with a weighting of 2 on the half-wave output).
  • Speed is limited by slew rate: when the input crosses zero the op-amp output must jump by about two diode drops, so high-frequency signals are rectified inaccurately.

Formulas

v_o(t) = −(1/RC)·∫ v_i dt + v_o(0) — ideal integrator; R in Ω, C in F, RC in s.

Δv_o = −V_in·Δt / (RC) — change in output for a constant input V_in over Δt.

|A(f)| = 1 / (2π·f·R·C) — integrator gain magnitude.

f_a = 1 / (2π·R_f·C) — lower limit of integration in the practical integrator; DC gain −R_f/R.

v_o(t) = −R·C·dv_i/dt — ideal differentiator.

|A(f)| = 2π·f·R·C — differentiator gain magnitude; unity at f = 1/(2π·R·C).

f_b = 1 / (2π·R_s·C) — upper limit of differentiation in the practical differentiator; high-frequency gain −R/R_s.

v_o = |v_i| — ideal full-wave precision rectifier; effective diode drop V_γ/A.

Worked examples

Example 1 (standard: integrator). An integrator has R = 10 kΩ and C = 0.1 µF. Its input is a ±1 V square wave at 1 kHz (no DC). Find RC, the peak-to-peak output, and the lower limit f_a if R_f = 1 MΩ is placed across C.

  1. RC = 10⁴ × 10⁻⁷ = 1 ms.
  2. Each half-period lasts Δt = 0.5 ms with a constant input of 1 V.
  3. Δv_o = V_in·Δt/RC = 1 × 0.5 ms/1 ms = 0.5 V; the output ramps down 0.5 V, then up 0.5 V: a triangle of 0.5 V peak-to-peak.
  4. f_a = 1/(2πR_fC) = 1/(2π × 10⁶ × 10⁻⁷) = 1.59 Hz; DC gain −R_f/R = −100. The 1 kHz signal is far above f_a, so it is integrated accurately.

Answer: RC = 1 ms; triangle of 0.5 V peak-to-peak; f_a ≈ 1.6 Hz.

Example 2 (GATE level: practical differentiator). A differentiator has C = 0.1 µF, feedback R = 10 kΩ and series R_s = 1 kΩ. The input is a 2 V peak-to-peak, 100 Hz triangular wave. Find the unity-gain frequency, f_b, and the output waveform.

  1. Unity-gain frequency: f = 1/(2πRC) = 1/(2π × 10⁻³) = 159 Hz.
  2. f_b = 1/(2πR_sC) = 1/(2π × 10³ × 10⁻⁷) = 1.59 kHz. The 100 Hz input (and its first few harmonics) is below f_b, so the circuit differentiates.
  3. Slope of the triangle: it rises 2 V in half a period (5 ms), so dv_i/dt = 2/0.005 = 400 V/s.
  4. v_o = −RC·dv_i/dt = −10⁻³ × 400 = −0.4 V during the rising half, +0.4 V during the falling half.

Answer: unity gain at 159 Hz, f_b ≈ 1.59 kHz, output a ±0.4 V square wave (0.8 V peak-to-peak), inverted relative to the slope.

Common mistakes

  • Forgetting the minus sign of the inverting integrator and differentiator.
  • Leaving out the initial condition v_o(0) when integrating.
  • Getting RC wrong by a factor of 1000 (kΩ × µF = ms, not s), which leads to impossible outputs of thousands of volts.
  • Ignoring saturation: an integrator with a constant input ramps only until it hits the supply rail.
  • Using the ideal integrator without R_f and being surprised by drift to a rail.
  • Thinking a precision rectifier has exactly zero drop at all frequencies; slew rate limits it.

For GATE IN

Expect output waveforms of integrators and differentiators for step, square, triangle and sine inputs, time to saturation, corner frequencies of the practical forms, and transfer characteristics of precision half-wave and full-wave rectifiers. Practise sketching input and output waveforms on the same time axis with correct amplitude and sign.

Quick check

  1. R = 100 kΩ, C = 1 µF, constant input +1 V, v_o(0) = 0. v_o after 50 ms?
  2. Same integrator: time to reach −13 V?
  3. A differentiator has RC = 1 ms and input slope 2 V/ms. Output?
  4. Why does a precision rectifier work for 10 mV signals?

Answers: 1. −0.5 V. 2. 1.3 s. 3. −2 V. 4. The diode is inside the feedback loop, so its drop is divided by the op-amp's open-loop gain.

Try answering each one aloud before you open it.

  1. 1.What is an integrator circuit and how does it work?Concept

    An integrator circuit is an electronic circuit that performs the mathematical operation of integration, which is essentially summing the input signal over time. It typically consists of an operational amplifier (op-amp) with a resistor connected to the input and a capacitor connected in the feedback loop. When a voltage is applied to the input, the output voltage is proportional to the integral of the input voltage with respect to time, effectively producing a ramp signal if the input is a constant voltage.

  2. 2.Explain the working principle of a differentiator circuit.Concept

    A differentiator circuit is designed to produce an output voltage that is proportional to the rate of change of the input voltage. It usually consists of an operational amplifier with a capacitor connected to the input and a resistor in the feedback loop. When a voltage is applied to the input, the output voltage is proportional to the derivative of the input voltage with respect to time, which means it amplifies high-frequency components of the input signal.

  3. 3.What is a precision rectifier and why is it used?Concept

    A precision rectifier places the diode inside the negative-feedback loop of an op-amp, so the diode's forward drop is divided by the op-amp's open-loop gain and becomes microvolts. The simplest form, a non-inverting buffer with a diode in its feedback path, is often called a super diode. It can rectify signals of a few millivolts, which an ordinary silicon diode with a 0.6-0.7 V drop cannot. It is used in AC voltmeters, envelope and peak detectors, and absolute-value circuits in instrumentation.

  4. 4.Why is a capacitor used in the feedback loop of an integrator circuit?Application

    A capacitor is used in the feedback loop of an integrator circuit because it stores charge over time, which is essential for the integration process. The voltage across the capacitor is proportional to the integral of the input current, and since the input current is related to the input voltage, the output voltage becomes the integral of the input voltage. This allows the circuit to produce a continuous summation of the input signal over time.

  5. 5.What happens if the feedback resistor in an op-amp differentiator is removed?Application

    The resistor is the only path from the output back to the inverting input, so removing it leaves the op-amp in open loop with just a capacitor at its input. The circuit no longer differentiates: with no DC feedback, offset voltage and bias current drive the output to one supply rail, and any input change pushes it between rails like a comparator. The output current through C can only flow if the feedback resistor provides the path that converts it into an output voltage, v_o = −R·C·dv_i/dt.

  6. 6.How does the frequency response of an integrator circuit differ from that of a differentiator circuit?Application

    The frequency response of an integrator circuit decreases with increasing frequency, as it acts as a low-pass filter. This means it attenuates high-frequency signals while allowing low-frequency signals to pass. In contrast, a differentiator circuit acts as a high-pass filter, where the frequency response increases with frequency, amplifying high-frequency signals while attenuating low-frequency signals.

  7. 7.An integrator has R = 10 kΩ and C = 1 µF, with v_o(0) = 0. A constant +5 V is applied for 2 s. What is the output?Numerical

    For a constant input the ideal output is a ramp, v_o = −(V_in/RC)·t, with RC = 10 kΩ × 1 µF = 10 ms. The ramp rate is 5/0.01 = 500 V/s, so the ideal formula would give −1000 V after 2 s, which is impossible. In practice the output reaches negative saturation (about −13 V on ±15 V supplies) after roughly 13/500 = 26 ms and stays there. This is why integrator time constants must be chosen for the signal duration, and why integrators have reset switches.

  8. 8.What are the limitations of using a precision rectifier in high-frequency applications?Application

    In high-frequency applications, precision rectifiers may face limitations due to the finite bandwidth of the operational amplifier used. The op-amp's slew rate and gain-bandwidth product can limit the circuit's ability to accurately follow rapid changes in the input signal, leading to distortion or phase shifts. Additionally, parasitic capacitances and inductances in the circuit can further degrade performance at high frequencies.

  9. 9.Explain how a precision rectifier can be used in an audio signal processing application.Application

    In audio signal processing, a precision rectifier can be used to accurately detect and process low-level audio signals without introducing significant distortion. It can rectify audio signals with amplitudes lower than the forward voltage drop of standard diodes, allowing for precise envelope detection or peak detection in audio compressors, limiters, and other dynamic range processing tools.

  10. 10.Determine the output voltage of a differentiator circuit with a 1 kΩ resistor and a 100 nF capacitor, given an input voltage that changes linearly from 0 V to 10 V over 1 ms.Numerical

    The output voltage of a differentiator circuit is given by V_out = -RC * (dV_in/dt). The rate of change of the input voltage, dV_in/dt, is (10 V - 0 V) / 1 ms = 10,000 V/s. Substituting the given values: V_out = -(1,000 Ω * 100×10^-9 F) * 10,000 V/s = -1 V.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?