.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.
".save" syntax
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:
.save V(n001)
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:
.save V(out)
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.
Count | Simulation Time (Save all voltages and currents) | Simulation Time (Save only voltage V(ss)) |
---|---|---|
1st | 16.908sec | 15.449sec |
2nd | 16.654sec | 15.422sec |
3rd | 16.535sec | 15.427sec |
4th | 16.510sec | 15.301sec |
5th | 16.626sec | 15.411sec |
Average | 16.6466sec | 15.4020sec |
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.