3
\$\begingroup\$

In the given circuit I plotted I(R1) with respect to time and tried to plot it's derivative using d(I(R1)).

enter image description here

However d(I(R1)) doesn't look like the derivative of I(R1), so I'm wondering what went wrong.

Sorry, if this is a basic question, but I just started out with LTspice and I couldn't find a straight forward answer. Thanks!

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Try plotting them separately. \$\endgroup\$
    – Andy aka
    Apr 17 at 21:51
  • \$\begingroup\$ Make a behavioral source (e.g. bv) and use V= ddt(stuff) \$\endgroup\$
    – tobalt
    Apr 17 at 21:58

1 Answer 1

3
\$\begingroup\$

Setting the initial voltage across the inductor creates an initial current through R1 which messes up the scaling of the derivative plot. You want start the voltage source at zero. Your derivative plot shows the correct results, but you need to zoom in to see what's happening.

There are a few ways to set the initial conditions. One way is to add startup to the .tran card to start voltage sources at zero. You can also set .ic I(L1)=0.

The following shows that the derivative function works as advertised in the following simulation. The cursors show a slope of 12.1958 and the derivative graph shows something similar.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.