In short: An op-amp differentiator puts a capacitor on the input and a resistor in the feedback path, so its output is proportional to the rate of change (dV/dt) of the input — but because its gain rises with frequency it massively amplifies noise, which a small series resistor (and often a feedback capacitor) tames.
The differentiator is one of the two classic op-amp calculus circuits — the mirror image of the op-amp integrator. Where the integrator accumulates area under the input curve, the differentiator reports its slope. It is deceptively simple on paper and notoriously twitchy in the lab, which makes it a favourite interview topic: anyone can draw the ideal circuit, but only engineers who understand its stability problem can build one that works.
The ideal differentiator and its transfer function
Take an inverting op-amp. Replace the usual input resistor with a capacitor C and keep a resistor R in the feedback path. The inverting input sits at a virtual ground, so the full input voltage appears across the capacitor. The capacitor current is i = C·dVin/dt, and since no current enters the op-amp's input, that same current flows through R. The output must therefore be:
Vout = −R·C · dVin/dt
The output is the time-derivative of the input, scaled by the time constant RC and inverted. Feed in a triangle wave and you get a square wave (constant positive slope → constant negative output, then the reverse). Feed in a ramp and you get a DC step. A pure DC input gives zero output — the differentiator ignores anything that is not changing.
In the frequency domain the capacitor's impedance is 1/(jωC), so the closed-loop gain is −R·jωC = −jωRC. The magnitude of the gain rises at +20 dB/decade — it doubles every time frequency doubles. That single fact is the root of every problem this circuit has.
The noise-amplification problem
Because gain climbs with frequency, the differentiator is a high-pass amplifier with no upper limit. Real signals carry wideband noise — thermal (Johnson) noise, the op-amp's own input voltage noise, pickup from switching supplies, digital clock harmonics. A 1 µV disturbance at 1 kHz might be negligible, but the same amplitude at 1 MHz is amplified a thousand times more. The result is an output buried in hiss and spikes, with the genuine derivative signal nowhere to be seen.
Worse, the circuit is not just noisy — it is often unstable. The op-amp's open-loop gain falls at −20 dB/decade. The differentiator's feedback network adds its own +20 dB/decade rise and an associated phase shift. Where the two curves meet, the phase margin can collapse toward zero and the circuit rings or oscillates. A step at the input produces a decaying (or growing) sinusoid instead of a clean impulse. This is why a textbook differentiator dropped into a real board so often "doesn't work."
The compensation resistor fix
The cure is to stop the gain from rising forever. Add a small resistor Rs in series with the input capacitor. At low frequencies Rs is negligible against the capacitor's large impedance, so the circuit still differentiates. But above the corner frequency fc = 1/(2π·Rs·C) the capacitor's impedance drops below Rs, and the stage reverts to a plain inverting amplifier with a flat gain of −R/Rs. The +20 dB/decade climb levels off, the high-frequency noise gain is capped, and the phase margin recovers.
Many designs add a second element — a feedback capacitor Cf across R — to roll the gain back down at the very top of the band, giving a clean band-pass response. The practical recipe is to choose the differentiator corner for the signal you care about, then set the compensation corner about a decade higher so your wanted derivative is untouched while anything faster is rejected.
| Element | Role | Effect if omitted |
|---|---|---|
| Input C | Produces i ∝ dV/dt | No differentiation |
| Feedback R | Converts current to Vout | Output undefined |
| Series Rs | Caps high-freq gain at −R/Rs | Noise & oscillation |
| Feedback Cf | Rolls gain down past fc | Residual HF peaking |
A worked example: with C = 10 nF and R = 100 kΩ, the base time constant is RC = 1 ms. Adding Rs = 1 kΩ sets the compensation corner at 1/(2π·1k·10n) ≈ 15.9 kHz, limiting high-frequency gain to −R/Rs = −100 instead of letting it run away.
Where it is used — and how it is designed today
Differentiators appear in edge detectors, rate-of-change alarms, FM demodulators, analog PID controllers (the "D" term), and in the front end of some pulse-shaping instrumentation. In most modern designs the differentiation is done in software after an ADC, precisely because the analog version is so sensitive to noise. When it is built in hardware, engineers verify it in SPICE first.
Running an AC analysis in a simulator such as Cadence Virtuoso (Spectre), Synopsys PrimeSim/HSPICE, or a free tool like LTspice lets you plot the gain magnitude and watch the +20 dB/decade slope flatten exactly at the compensation corner. A transient analysis with a triangle source confirms the square-wave output, and a stability (loop-gain) probe confirms adequate phase margin — the same methodology used across professional analog teams. If you want hands-on design and tape-out-grade analog skills, our partners at Avecas design services run production flows on exactly these tools.
Once you are comfortable here, the natural next steps are the integrator (its calculus partner) and the active filter design article, which generalises the same impedance-ratio thinking into Sallen–Key and multiple-feedback topologies. All three build on the single idea of a frequency-dependent feedback network.
Want to master analog building blocks end-to-end — from op-amp intuition to SPICE-verified design? Explore the full analog track in the CourseTron course catalog and build these circuits yourself.
Frequently asked questions
Why is the op-amp differentiator output inverted?
It is built on the inverting op-amp topology, where the signal enters through the capacitor to the inverting (−) input. The virtual-ground action gives a negative sign, so Vout = −RC·dVin/dt. If you need a non-inverted derivative, follow it with a unity-gain inverting stage.
Why does the differentiator amplify noise so badly?
Its gain is proportional to frequency (−jωRC), rising 20 dB per decade with no upper bound. High-frequency noise therefore sees enormous gain. The series compensation resistor Rs caps that gain at −R/Rs above its corner frequency, which is what makes the circuit usable.
How do I choose the compensation resistor value?
Pick the frequency above which you no longer want to differentiate (typically where noise dominates), then set Rs so that 1/(2π·Rs·C) equals that corner. Keep the corner at least a decade above your highest signal-of-interest frequency so the wanted derivative is unaffected.
Should I use a hardware differentiator or do it in software?
If you already sample the signal with an ADC, a digital difference (or a filtered derivative) is almost always cleaner and more flexible. Reserve the analog differentiator for cases needing continuous, low-latency response — edge detection, fast alarms, or the derivative term of an analog controller.