# Differentiator stability 2

In the previous post the transfer function of an op-amp differentiator was derived:
$\dfrac{V_{o}}{V_{i}}=\dfrac{-s\dfrac{A}{\tau}}{s^{2}+s\dfrac{\tau+RC}{\tau RC}+\dfrac{1+A}{\tau RC}}$

To check this function isn’t way off, I’ve compared the step response using GNU Octave (a freeware Matlab competitor I’ve only recently discovered) with the step response in LTspice. For the purposes of the comparison I used the following values:

 Parameter Value Units Comment A 100 kV/V Op-amp DC voltage gain τ 1/(2π) rad/s Op-amp corner frequency of 1 Hz R 10 kΩ C 100 nF

Here is the Octave code for plotting the first millisecond of the step response:

And here is the resulting response of the differentiator circuit to a 1V step (only the first millisecond is shown):

A first-order op-amp model was used to derive the transfer function that’s being verified. Luckily, LTspice includes such a model: the three terminal “opamp” model which is described as an “ideal single-pole operational amplifier”. This model is very useful in situations where you’re more interested in testing a theory than attempting to simulate a real device. Here is the test circuit:

To match the A and τ values used in the Octave program, the U1 Aol was set to 100k and GBW was set to 100k (the product of A and τ).  Here is the LTspice plot:

The two plots are very similar which gives me some faith in the transfer function.

I used the Mingw32 Windows install of Octave version 3.6.1 with the Control toolbox. Installation instructions can be found here: http://wiki.octave.org/Octave_for_Windows