Author Topic: sweeping a value over time in LTSpice  (Read 11545 times)

0 Members and 1 Guest are viewing this topic.

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
sweeping a value over time in LTSpice
« on: May 18, 2014, 04:05:15 pm »
I know about using .step param in LTSpice but it ends up running multiple simulations and then overlapping them.
I'd like to sweep the value of a pot over time in steps and run the simulation for a certain amount of time in one long pass.
For example, this is what I get at the moment and it's not what I'm looking for.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: sweeping a value over time in LTSpice
« Reply #1 on: May 18, 2014, 05:53:00 pm »
LTspice can do time-dependent resistors directly! Just set resistance equal to a function of time:

Code: [Select]
R=1k*time

Preferable to the dependent source method, which I've found to occasionally cause convergence issues.
« Last Edit: May 18, 2014, 05:55:06 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: sweeping a value over time in LTSpice
« Reply #2 on: May 19, 2014, 02:45:44 am »
Well, I think I got it.
I now have the pitch being swept over time instead of in steps over multiple simulations. I had to replace the pot with just two resistors again.

LTspice can do time-dependent resistors directly! Just set resistance equal to a function of time:

Code: [Select]
R=1k*time

Preferable to the dependent source method, which I've found to occasionally cause convergence issues.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf