Electrical – how to set seed in LTspice simulation

ltspicenoiserandom

I am using LTspice to simulate voltage measurements from a circuit. I noticed, with exactly the same circuit components, each time I obtain different results. I assume it is due to thermal noise. (is that right?)

Then I wonder is there a way I can set seed to the SPICE simulation so that my results are reproducible.

To provide more detail: I did a Transient analysis. I am running a circuit with amplifiers, multipliers, resistors and capacitance for 200mS. I run the same circuit with nothing changed (I literally quit LTspice, open again, and hit Run button for the same schema), I found the voltage measurements at one node for the two runs are different. They stay the same for the initial ~30mS, then start to have a lag, then go on completely different tracks. Since nothing about the circuit has changed, I suspect it is caused by thermal noise. Please let me know if there could be other reasons.

Many thanks!

Best Answer

LT spice should be consistent from run to run. Thermal noise is not simulated in a normal transient simulation. If your seeing differences from run to run they could most likely be explained from a numerical solver standpoint and differences on rounding, which some circuits can be quite sensitive to.

Another explanation may be that the models you are using have b-sources with a .rand statement in it, but this is unlikely.

If you are using a .rand statement, there isn't a way to set the seed (documented anywhere that I know of). If you need a .rand section to be repeated from run to run, use a PWL source, record the data as a .wav or PWL file and use that to make the runs consistent.