This is my circuit:
What I do not understand is the un-stability of the derivative:
I would expect a flat line... What can be wrong
Of course a derivative of 200K=200000 is huge, atan(200000)-Pi/2=5E-6 so very very close to Pi/2.Taking a much bigger max timestep of 0.5usec instead of 0.01usec gives a better result with much less noise. Not sure why...
It was just a setting: I made the relative tolerance 10 times smaller than the default value:
and now the gain looks great even with very small timestep of 0.01 usec:
You just tighten the accuracy and hence smooth line.