1

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

divyam
  • 146
  • 9

2 Answers2

1

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.

a concerned citizen
  • 21,167
  • 1
  • 20
  • 40
1

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.

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208