Electronic – LTSpice: How to offset the start time in a transient simulation

ltspicesimulationtransient

I see how to set the total run time for a transient simulation, but what if I didn't want the simulation to start at 0s?

For example, if I have two voltages sources that are stepping at offset times from each other, and one of them doesn't start until time = 1s. How can I shift the simulation to start at 1s instead?

Best Answer

As the others have said, any SPICE solver needs to actually solve the circuit up until the time of your interest, but you can also use the simulation card to only save from a certain time:

.tran 0 {total_simulation_time} {time_to_start_saving_data} {optional_timestep}

For example, if you need 5s of simulation, but you need to discard the forst 3s, then the card would look like this: .tran 0 5 3.


That's quite different. :-) If you are using the builtin PULSE source, then it's as easy as setting the td parameter, for example a unity 1kHz pulse with 0.3 width, 1% rise/fall times, and 666us delay would look like this:

PULSE 0 1 666u 10u 10u 0.299u 1m

If you're using behavioural sources, then you'd want to use the delay(x,y) function. And if you're having some other custom circuitry, depending on the type of signal (digital or analog), you could either use the same behavioural source with delay(), a tline or ltline (these work with both analog and digital), or a dedicated A-device with td=<...>. The manual has more details about them. Or see ltwiki.