1
\$\begingroup\$

I know how to simulate a variable resistor in LTSpice. For example for a heating resistance the equation can be made by considering heating equation and can be expressed like R=(Ri-Ao*EXP(-time/To)) and further simulated,

But how to write a more complex mathematical expression like below- enter image description here

\$\endgroup\$
2
\$\begingroup\$

If you open up the manual (F1) and look under LTspice > Circuit Elements > B, you'll see a table of functions, among which idt() (or sdt()) is the one you're looking for. For indefinite integration use simply idt(x), where x can be the variable time, and for definite integration you can use that in association with delay() (or absdelay()): idt(x-delay(x,1/T)), for example. The idt() function time keyword has no meaning in .AC analysis. Also see this.

\$\endgroup\$
1
\$\begingroup\$

One other way to integrate signals worth mentioning is to set the window time to the period that you want to integrate and then ctrl+click on the signal (can even be resistance) and it will give you and average and RMS value for the window time.

\$\endgroup\$
  • \$\begingroup\$ thanks, that also some useful info. :) \$\endgroup\$ – Divyam Jun 14 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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