Op Amp Integrator and Differentiator: 4 Smart Design Fixes

Share:
Analog Electronics
Op Amp Integrator and Differentiator: 4 Smart Design Fixes

Swap a resistor for a capacitor and an op amp starts doing calculus, integrating or differentiating the input signal.

Integrator Differentiator RC Time Constant Wave Shaping

An op amp integrator produces an output proportional to the integral of its input, while a differentiator responds to the rate of change. Both use a resistor and capacitor around an inverting op amp.

Hello everyone, today we are going to learn how an op amp integrator and differentiator work, how to calculate their outputs, and which simple fixes make them stable in real circuits.
op amp integrator

What Is an Op Amp Integrator?

An op amp integrator is an inverting amplifier with a capacitor in the feedback path instead of a resistor. The output voltage is proportional to the integral of the input over time, built on the op amp basics of virtual ground.

The input resistor converts input voltage into a current, and that current charges the feedback capacitor. Because the inverting input stays at virtual ground, the capacitor voltage grows steadily as long as current flows.

Inverting op amp integrator circuit with input resistor and feedback capacitor
Image credit: All About Circuits

A differentiator swaps the positions, with the capacitor at the input and the resistor in feedback. Its output depends on how fast the input changes.

Both circuits rely on capacitor charging behaviour explained in RC time constant basics.

Integrator and Differentiator Formulas

Integrator: Vout = minus (1 ÷ RC) × ∫ Vin dt
Differentiator: Vout = minus R × C × dVin ÷ dt

Integrator example, constant input:
Vin = 1 V, R = 10 kΩ, C = 1 µF, t = 5 ms
Change = 1 × 0.005 ÷ (10000 × 0.000001) = 0.5 V
Output ramps down by 0.5 V

Differentiator example:
Input ramp = 1 V per ms, R = 10 kΩ, C = 0.1 µF
Output = 10000 × 0.0000001 × 1000 = 1 V, inverted

The minus sign in both formulas comes from the inverting configuration. A positive input gives a falling output.

A square wave into an integrator becomes a triangle wave. A triangle wave into a differentiator becomes a square wave.

How the Integrator Output Builds Up

Input VoltageApplied through resistor R
Constant CurrentI = Vin ÷ R into virtual ground
Capacitor ChargesVoltage rises as current flows
Output RampsOpposite polarity to input
SaturationEventually reaches a supply rail

With any DC input or offset, the ideal integrator keeps ramping until it hits a rail. That is the biggest practical problem with the circuit.

Even the tiny input offset voltage of the op amp will slowly drive the output into saturation. The fixes below solve this.

4 Smart Design Fixes

1
Resistor Across C
A large resistor in parallel with the capacitor limits DC gain.
2
Reset Switch
A switch across the capacitor zeroes the integrator on demand.
3
Input Resistor on Differentiator
Limits high frequency gain and noise.
4
Small Capacitor Across Rf
Rolls off the differentiator at high frequency for stability.

Fix 1 turns the integrator into a low pass filter below a chosen corner frequency. It integrates correctly only above that corner, which is fine for AC signals.

Fixes 3 and 4 tame the differentiator, whose gain would otherwise rise without limit at high frequency. Zbotic notes that this rising gain amplifies noise and can cause oscillation.

Integrator vs Differentiator

FeatureIntegratorDifferentiator
Feedback elementCapacitorResistor
Input elementResistorCapacitor
Gain vs frequencyFalls with frequencyRises with frequency
Noise behaviourSmooths noiseAmplifies noise
Main riskDrift to saturationInstability and noise
Square wave inTriangle outSpikes out

The integrator is naturally a low pass circuit and is far more common in practice. The differentiator is used carefully, usually with band limiting.

Compare these with passive networks in RC low pass and high pass filters, which behave similarly but without gain.

Where These Circuits Are Used

PID Controllers
Integral and derivative terms in analog control.
Function Generators
Square to triangle wave conversion.
Charge Amplifiers
Piezoelectric sensor signal conditioning.
Ramp Generators
Timing and sweep circuits.
Edge Detection
Differentiators highlight fast transitions.
Analog Computers
Solving differential equations electronically.

The integral term of a PID controller is exactly an integrator, removing steady state error over time.

Triangle waves from an integrator can drive a comparator to generate PWM, a common trick in motor drives and power supplies.

Choosing R and C Values

The unity gain frequency of an ideal integrator is 1 divided by 2π R C. For R of 10 kΩ and C of 10 nF, that is about 1.6 kHz.

Pick values so the integrator works well within the frequencies of interest. Use film or C0G capacitors for low leakage and stable value.

Select an op amp with low input bias current and offset, especially for slow integrators. A slow op amp adds phase error at higher frequencies.

Integrator Ramp Calculator

Output Change for Constant Input
Integrator result
Output changes by 0.500 V, falling, unity gain at 15.9 Hz

A negative input makes the output rise. Check that the final value stays inside the op amp output swing.

Integrator Strengths
  • Smooths noisy signals.
  • Generates clean ramps.
  • Core of analog control loops.
  • Simple component count.
Design Challenges
  • Drifts with DC offset.
  • Needs reset or DC feedback.
  • Capacitor leakage causes error.
  • Differentiator amplifies noise.

TI Integrator Circuit PDF

PDF
Analog Engineer’s Circuit, Integrator Circuit
Texas Instruments design note with component selection and simulation

Integrator and Differentiator Video

Op Amp Integrator FAQ

What does an op amp integrator do?
It produces an output proportional to the time integral of the input.
Why does the output drift?
Offset voltage and bias current slowly charge the capacitor.
How is drift stopped?
With a resistor across the capacitor or a reset switch.
What does a differentiator output?
A voltage proportional to how fast the input changes.
Why is a differentiator noisy?
Its gain rises with frequency, amplifying noise.
What wave does a square wave become?
A triangle wave after integration.
Where are integrators used?
PID control, wave generators and charge amplifiers.

Related Articles

External References

What We Learn Today

  • A capacitor in feedback makes the output the integral of the input.
  • A differentiator responds to rate of change but amplifies noise.
  • DC feedback, reset switches and band limiting make both circuits practical.
I hope you like above blog. There is no cost associated in sharing the article in your social media. Thanks for reading!! Happy Learning!!

Leave a Reply

Your email address will not be published. Required fields are marked *