# Differentiator

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Differentiator
> Markdown URL: https://mediated.wiki/source/Differentiator.md
> Source: https://en.wikipedia.org/wiki/Differentiator
> Source revision: 1318072580
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Type of circuit}}{{More citations needed|date=June 2025}}

In [electronics](/source/electronics), a '''differentiator''' is a [circuit](/source/Electrical_network) that outputs a [signal](/source/signal) approximately proportional to the [rate of change](/source/rate_of_change_(mathematics)) (i.e. the [derivative](/source/derivative) with respect to [time](/source/time)) of its input signal.<ref name=":0">{{Cite web |title=Differentiator |url=https://www.britannica.com/technology/differentiator |access-date=2025-06-01 |website=Britannica |language=en}}</ref> Because the [derivative of a sinusoid](/source/Sine_wave) is another [sinusoid](/source/sinusoid) whose amplitude is multiplied by its [frequency](/source/frequency), a true differentiator that works across all frequencies can't be realized (as its [gain](/source/Gain_(electronics)) would have to increase indefinitely as frequency increase).{{Citation needed|date=June 2025}} Real circuits such as a 1{{Sup|st}}-order [high-pass filter](/source/high-pass_filter) are able to approximate differentiation at lower frequencies by limiting the gain above its [cutoff frequency](/source/cutoff_frequency).{{Citation needed|date=June 2025}} An '''active differentiator''' includes an [amplifier](/source/amplifier), while a '''passive differentiator''' is made only of [resistor](/source/resistor)s, [capacitor](/source/capacitor)s and [inductor](/source/inductor)s.{{Citation needed|date=June 2025}}

==Passive differentiator==
The four-[terminal](/source/Terminal_(electronics)) 1{{Sup|st}}-order passive high-pass filter circuits depicted in figure, consisting of a [resistor](/source/resistor) and a [capacitor](/source/capacitor),<ref name=":0" /> or alternatively a resistor and an [inductor](/source/inductor),{{Citation needed|date=June 2025}} approximate differentiation at frequencies well-below each filter's cutoff frequency.{{Citation needed|date=June 2025}}

{{multiple image
| align             = center
| image1            = Passive_differentiator_circuit_1.png
| caption1          = Capacitive differentiator
| image2            = Passive_differentiator_circuit_2.png
| caption2          = Inductive differentiator
| total_width       = 400
}}

According to [Ohm's law](/source/Ohm's_law), the voltages at the two ends of the ''capacitive differentiator'' are related by the following [transfer function](/source/transfer_function) (which has a [zero in the origin and a pole](/source/Zeros_and_poles) at <math>s {=} \tfrac{\text{-}1}{RC}</math>):
:<math>Y=\frac{Z_R}{Z_R+Z_C}X =\frac{R}{R+\frac{1}{sC}}X =\frac{sRC}{1+sRC}X \implies Y\approx sRCX \quad \text{for} \ |s|\ll \frac{1}{RC}</math>
which is a good approximation of an ideal differentiator at frequencies well below the filter's cutoff frequency of <math>\tfrac{1}{2\pi RC}</math> in [hertz](/source/hertz) or <math>\tfrac{1}{RC}</math> in [radians](/source/radians).

Similarly, the transfer function of the ''inductive differentiator'' has a zero in the origin and a pole in <math>s {=} \tfrac{\text{-}R}{L}</math>, corresponding to a cutoff frequency of <math>\tfrac{R}{2\pi L}</math> in hertz or <math>\tfrac{R}{L}</math> in radians.

[[Image:Passive_differentiator_circuit_transfer_function.png|center|thumb|350px|[Frequency response function](/source/Frequency_response_function) of the passive differentiator circuits, with frequency axis normalized to the cutoff frequency of <math>\omega_0 {=} \tfrac{1}{RC}</math> for the capacitive circuit or <math>\omega_0 {=} \tfrac{R}{L}</math> for the inductive circuit]]

==Active differentiator==

===Ideal differentiator ===
thumb|300px|Ideal differentiator.
A differentiator circuit (also known as a '''differentiating amplifier''' or '''inverting differentiator''') consists of an ideal [operational amplifier](/source/operational_amplifier) with a [resistor](/source/resistor) ''R'' providing [negative feedback](/source/Negative-feedback_amplifier) and a [capacitor](/source/capacitor) ''C'' at the input, such that:

* <math>V_\text{in}</math> is the voltage across ''C'' (from the op amp's [virtual ground](/source/virtual_ground) negative terminal).
* <math>V_\text{out}</math> is the voltage across ''R'' (also from the op amp's virtual ground negative terminal).
* <math>I</math> is the current flowing from the input through both ''R'' and ''C'' to the circuit's output.
** No current flows into the ideal op amp's inputs because they have [very high](/source/High_impedance) [input impedance](/source/input_impedance).

According to the [capacitor's current–voltage relation](/source/Capacitor), this current <math>I</math> as it flows from the input through the capacitor to the virtual ground will be proportional to the derivative of the input voltage:
:<math>I = C \, \frac{dV_\text{in}}{dt} \, .</math>

This same current <math>I</math> is converted into a voltage when it travels from the virtual ground through the resistor to the output, according to [ohm's law](/source/Ohm's_law):
:<math>0 - V_\text{out} = IR \, .</math>

Inserting the capacitor's equation for <math>I</math> provides the output voltage as a function of the input voltage:

:<math>V_\text{out} = -RC \frac{dV_\text{in}}{dt}.</math>

Consequently,
* The output voltage is proportional to the time derivative of the input voltage with a [gain](/source/Gain_(electronics)) of <math>RC .</math> Hence, the circuit acts as a differentiator and amplifier.
* The negative sign indicates the output has a 180° [phase shift](/source/phase_shift) (inversion) with respect to the input.
* The equation is true for any frequency signal, assuming an ideal op amp (though a real op-amp has limited bandwidth).

The op amp's low-impedance output isolates the load of the succeeding stages, so this circuit has the same response independent of its load.

If a constant DC voltage is applied as input, 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.

====Operation as high pass filter====
Treating the capacitor as an [impedance](/source/Electrical_impedance) with [capacitive reactance](/source/capacitive_reactance) of ''X''<sub>c</sub> = {{sfrac|2''πfC''}} allows analyzing the differentiator as a high pass filter. The inverse-proportionality to frequency means that at low frequency, the reactance of a capacitor is high, and at high frequency reactance is low. Since the feedback configuration provides a gain of {{sfrac|''R''<sub>f</sub>|''X''<sub>c</sub>}}, that means the gain is low at low frequencies (or for slow changing input), and higher at higher frequencies (or for fast changing input).

====Frequency response====
The [transfer function](/source/transfer_function) of an ideal differentiator is <math>\tfrac{V_\text{out}}{V_\text{in}} = \text{-}sRC</math>, resulting in the [Bode plot](/source/Bode_plot) of its magnitude having a positive +20 dB per decade slope over all frequencies and having [unity gain](/source/unity_gain) at <math>f_\text{0dB} {=} \tfrac{1}{2\pi RC} \, .</math>

====Advantages====
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 high frequency noise that, when amplified, dominates the input signal.
* the limited [gain–bandwidth product](/source/gain%E2%80%93bandwidth_product) of real op amps will put an upper frequency limit for differentiation

===Practical differentiator===
thumb|right
In order to overcome the limitations of the ideal differentiator, an additional small-value capacitor ''C''<sub>1</sub> is connected in parallel with the feedback resistor ''R'', which prevents the differentiator circuit from oscillating, and a resistor ''R''<sub>1</sub> is connected in series with the capacitor ''C'', which limits the increase in gain to a ratio of {{sfrac|''R''|''R''<sub>1</sub>}}.

Since negative feedback is present through the resistor ''R'', we can apply the [virtual ground](/source/virtual_ground) concept, that is, the voltage at the inverting terminal is the same 0 volts at the non-inverting terminal.

Applying nodal analysis, we get
:<math>\frac{0 - V_o}{R} + \frac{0 - V_o}{\frac{1}{sC_1}} + \frac{0 - V_i}{R_1 + \frac{1}{sC}} = 0,</math>
:<math>-V_o \left(\frac{1}{R} + sC_1\right) = \frac{V_i}{R_1 + \frac{1}{sC}}.</math>

Therefore,
:<math>\frac{V_o}{V_i} = \frac{-sRC}{(1 + sR_1C)(1 + sRC_1)}.</math>

Hence, there occurs one zero at <math>s {=} 0</math> and one pole at <math>s {=} \tfrac{\text{-}1}{R_1C}</math> (corresponding to a corner frequency of <math>f_1 {=} \tfrac{1}{2\pi R_1C}</math>) and another pole at <math>s {=} \tfrac{\text{-}1}{RC_1}</math> (corresponding to a corner frequency of <math>f_2 {=} \tfrac{1}{2\pi RC_1}</math>).

====Frequency response====
This practical differentiator's frequency response is a [band-pass filter](/source/band-pass_filter) with a +20 dB per decade slope over frequency band for differentiation. A [straight-line approximation of its Bode plot](/source/Bode_plot) when normalized with <math>R_1 C {=} 10^{1}</math> and <math>R C_1 {=} 10^{\text{-}1}</math> is:

421x421px

For the above plot:
* Below <math>\omega_1</math>, the circuit attenuates, and well below <math>\omega_1</math> acts like a differentiator.
* Between <math>\omega_1</math> and <math>\omega_2</math>, the circuit acts as a [voltage follower](/source/Buffer_amplifier) or buffer.
* Above <math>\omega_2</math>, the circuit attenuates, and well above <math>\omega_2</math> acts like an [integrator](/source/Active_integrator_circuit).

Setting <math>RC_1 {=} R_1C {=} RC</math> will produce one zero at <math>s {=} 0</math> and two poles at <math>s {=} \tfrac{\text{-}1}{RC}</math> (corresponding to one corner frequency of <math>\omega_1 {=} \tfrac{1}{RC}</math>), resulting in the following frequency response (normalized using <math>RC {=} 1</math>):

414x414px

For the above plot:
* Well below <math>\omega_1</math>, the circuit acts like a differentiator;
* Well above <math>\omega_1</math>, the circuit acts like an [integrator](/source/Active_integrator_circuit).

===Applications===
The differentiator circuit is essentially a [high-pass filter](/source/high-pass_filter). It can generate a [square wave](/source/Square_wave_(waveform)) from a [triangle wave](/source/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](/source/integrator) on a waveform, and conversely. Hence, they are most commonly used in [wave-shaping circuits](/source/Waveshaping) to detect high-frequency components in an input signal. Differentiators are an important part of electronic [analogue computer](/source/analogue_computer)s and analogue [PID controller](/source/PID_controller)s. They are also used in [frequency modulators](/source/Frequency_modulation) as rate-of-change detectors.

A passive differentiator circuit is one of the basic [electronic circuit](/source/electronic_circuit)s, being widely used in circuit analysis based on the [equivalent circuit](/source/equivalent_circuit) method.

==See also==
* [Integrator](/source/Integrator)
* [Inverting differentiator](/source/Operational_amplifier_applications) at op amp applications

==References==
{{Reflist}}

Category:Analog circuits

---
Adapted from the Wikipedia article [Differentiator](https://en.wikipedia.org/wiki/Differentiator) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Differentiator?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
