LTspice: Vary a resistor's value over time

Unfortunately using a varistor will not work, as a varistor itself has a dependence on the voltage across it. Much simpler is to right click onto an existing resistor, and to enter a formula. E.g.

R=11-100*time

will linearily reduce the resistance from 11Ohm to 1Ohm over the time of 100ms. You can use almost all functions available for the voltage b sources (arbitrary behavioural voltage source), as well as all kinds of measurements e.g. of voltages of other nodes.


There is another way. Setup a Voltage source and choose the output you want. Label the output net VResistance. Volts on source will be exactly what the resistance is. I.e. 10KV will be the same as 10K ohm. Then use the standard resistor with the assignment R=V(Vresistance). As the voltage source changes, the resistor changes with it. The nice thing about this is the PWL file can now be used to control the resistance. Expecially nice when running things from Mathematica or Matlab.


Use the SpecialFunctions/Varistor.asy component with a time-varying voltage source

Screenshot