.save : LTspice -- Limit the Quantity of Saved Data
This article details the use of the dot command ".save".
Simulation time can be shortened by using ".save" to specify the save data.
The ".save" syntax is as follows. Normally, when a simulation is performed, all voltage and current data in the schematic are saved, but ".save" allows the user to specify the saved data for voltage and current.
The ".save" syntax is not so difficult. For example, to save only the data of V(n001), the syntax is as follows:
Examples of ".save" simulation
As an example of ".save" simulation, we would like to shorten the simulation time by specifying saved data using ".save" in the demonstration circuit of the LT3580, a boost/inverting DC-DC converter.
Click on the link below to go to the Analog Devices demo circuits download page.
Enter "LT3580" in the "Search" field. A link to the LT3580 demo circuit will appear in the search results.
First, run the simulation normally by clicking "Run" without ".save".
Click "out" on the LT3580 schematic with the voltage probe to check the voltage waveform of V(out) in the waveform viewer.
However, in a normal simulation, even if you only want to check the voltage waveform of V(out), the simulation will take a long time because multiple voltages and currents are stored as described above.
Add the ".save" syntax and click "Run" to run the simulation.
The syntax for ".save" is described and placed as follows:
This will store only V(out) data.
After simulation, click on the "OUT" wire only as the voltage probe appears.
If you move the cursor to other connections or components, you will notice that the voltage and current probes are not displayed.
As in a normal simulation, the voltage waveform of V(out) is displayed in the waveform viewer.
Simulation times can be viewed by clicking on "View-SPICE Error Log" and opening the log file.
(Save all voltages and currents)
(Save only voltage V(ss))
Comparing the simulation time when all voltages and currents are saved and when only the voltage V(ss) is saved using ".save", you see that the simulation time is shortened by 1.2446 seconds on average.
In this simulation example, the simulation time could not be shortened that much, but if the circuit is large, the effect of shortening the simulation time will be significant.