# Differentiator

In electronics, a differentiator is a circuit that is designed such that the output of the circuit is approximately directly proportional to the rate of change (the time derivative) of the input. A true differentiator cannot be physically realized, because it has infinite gain at infinite frequency. A similar effect can be achieved, however, by limiting the gain above some frequency. The differentiator circuit is essentially a high-pass filter.
An active differentiator includes some form of amplifier, while a passive differentiator is made only of resistors, capacitors and inductors.

## Passive differentiator

The simple four-terminal passive circuits depicted in figure, consisting of a resistor and a capacitor, or alternatively a resistor and an inductor, behave as differentiators.

Capacitive differentiator
Inductive differentiator

Indeed, according to Ohm's law, the voltages at the two ends of the capacitive differentiator are related by a transfer function that has a zero in the origin and a pole in −1/RC and that is consequently a good approximation of an ideal differentiator at frequencies below the natural frequency of the pole:

${\displaystyle Y={\frac {Z_{R}}{Z_{R}+Z_{C}}}X={\frac {R}{R+1/sC}}X={\frac {sRC}{1+sRC}}X\implies Y\approx sRCX\quad {\text{for}}\ |s|\ll 1/RC}$

Similarly, the transfer function of the inductive differentiator has a zero in the origin and a pole in −R/L.

Frequency response function of the passive differentiator circuits. ${\displaystyle \omega _{0}=1/RC}$ for the capacitive circuit, while ${\displaystyle \omega _{0}=R/L}$ for the inductive circuit

## Active differentiator

### Ideal differentiator

Ideal differentiator

A differentiator circuit (also known as a differentiating amplifier or inverting differentiator) consists of an operational amplifier in which a resistor R provides negative feedback and a capacitor is used at the input side. The circuit is based on the capacitor's current to voltage relationship

${\displaystyle V=V(\infty )+[(V(0+)-V(\infty )]e^{-{\frac {t}{\tau }}},}$
${\displaystyle I=C{\frac {dV}{dt}},}$

where I is the current through the capacitor, C is the capacitance of the capacitor, and V is the voltage across the capacitor. The current flowing through the capacitor is then proportional to the derivative of the voltage across the capacitor. This current can then be connected to a resistor, which has the current to voltage relationship

${\displaystyle I={\frac {V}{R}},}$

where R is the resistance of the resistor.

Note that the op-amp input has a very high input impedance (it also forms a virtual ground due to the presence of negative feedback), so the entire input current has to flow through R.

If Vout is the voltage across the resistor and Vin is the voltage across the capacitor, we can rearrange these two equations to obtain the following equation:

${\displaystyle V_{\text{out}}=-RC{\frac {dV_{\text{in}}}{dt}}.}$

From the above equation following conclusions can be made:

• Output is proportional to the time derivative of the input. Hence, the op amp acts as a differentiator.
• Above equation is true for any frequency signal.
• The negative sign indicates that there is 180° phase shift in the output with respect to the input,

Thus, it can be shown that in an ideal situation the voltage across the resistor will be proportional to the derivative of the voltage across the capacitor with a gain of RC.

#### Operation

Input signals are applied to the capacitor C. Capacitive reactance is the important factor in the analysis of the operation of a differentiator. Capacitive reactance is Xc = 1/2πfC. Capacitive reactance is inversely proportional to the rate of change of input voltage applied to the capacitor. At low frequency, the reactance of a capacitor is high, and at high frequency reactance is low. Therefore, at low frequencies and for slow changes in input voltage, the gain, Rf/Xc, is low, while at higher frequencies and for fast changes the gain is high, producing larger output voltages.

If a constant DC voltage is applied as input, then the output voltage is zero. If the input voltage changes from zero to negative, the output voltage is positive. If the applied input voltage changes from zero to positive, the output voltage is negative. If a square-wave input is applied to a differentiator, then a spike waveform is obtained at the output.

The active differentiator isolates the load of the succeeding stages, so it has the same response independent of the load.

#### Frequency response

The transfer function of an ideal differentiator is ${\displaystyle {\frac {V_{\text{out}}}{V_{\text{in}}}}=-sRC}$, and the Bode plot of its magnitude is:

A small time constant is sufficient to cause differentiation of the input signal

#### Limitations

At high frequencies:

• this simple differentiator circuit becomes unstable and starts to oscillate;
• the circuit becomes sensitive to noise, that is, when amplified, noise dominates the input/message signal.

### Practical differentiator

In order to overcome the limitations of the ideal differentiator, an additional small-value capacitor C1 is connected in parallel with the feedback resistor R, which prevents the differentiator circuit from oscillating, and a resistor R1 is connected in series with the capacitor C, which limits the increase in gain to a ratio of R/R1.

Since negative feedback is present through the resistor R, we can apply the virtual ground concept, that is, the voltage at the inverting terminal = voltage at the non-inverting terminal = 0.

Applying nodal analysis, we get

${\displaystyle {\frac {0-V_{o}}{R}}+{\frac {0-V_{o}}{\frac {1}{sC_{1}}}}+{\frac {0-V_{i}}{R_{1}+{\frac {1}{sC}}}}=0,}$
${\displaystyle -V_{o}\left({\frac {1}{R}}+sC_{1}\right)={\frac {V_{i}}{R_{1}+{\frac {1}{sC}}}}.}$

Therefore,

${\displaystyle {\frac {V_{o}}{V_{i}}}={\frac {-sRC}{(1+sR_{1}C)(1+sRC_{1})}}.}$

Hence, there occurs one zero at ${\displaystyle s=0}$ and two poles at ${\displaystyle s=f_{1}={\tfrac {1}{2\pi R_{1}C}}}$ and ${\displaystyle s=f_{2}={\tfrac {1}{2\pi RC_{1}}}}$.

#### Frequency response

From the above plot, it can be seen that:

• when ${\displaystyle f, the circuit acts as a differentiator;
• when ${\displaystyle f_{1}, the circuit acts as a voltage follower or buffer;
• when ${\displaystyle f>f_{2}}$, the circuit acts as an integrator.

If ${\displaystyle RC_{1}=R_{1}C=RC}$ (say), there occurs one zero at ${\displaystyle s=0}$ and two poles at ${\displaystyle s=f_{a}={\frac {1}{2\pi RC}}}$.

For such a differentiator circuit, the frequency response would be

From the above plot, we observe that:

• when ${\displaystyle f, the circuit acts as a differentiator;
• when ${\displaystyle f>f_{a}}$, the circuit acts as an integrator.

### Applications

The differentiator circuit is essentially a high-pass filter. It can generate a square wave from a triangle wave input and produce alternating-direction voltage spikes when a square wave is applied. In ideal cases, a differentiator reverses the effects of an integrator on a waveform, and conversely. Hence, they are most commonly used in wave-shaping circuits to detect high-frequency components in an input signal. Differentiators are an important part of electronic analogue computers and analogue PID controllers. They are also used in frequency modulators as rate-of-change detectors.

A passive differentiator circuit is one of the basic electronic circuits, being widely used in circuit analysis based on the equivalent circuit method.