.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.

.save [Voltage(NodeName) or Current(PartName)]

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.

Analog Devices
LTspice XVII LT3580 demo circuit download

Enter "LT3580" in the "Search" field. A link to the LT3580 demo circuit will appear in the search results.

LTspice XVII LT3580 simulation run

First, run the simulation normally by clicking "Run" without ".save".

LTspice XVII LT3580 voltage waveform

Click "out" on the LT3580 schematic with the voltage probe to check the voltage waveform of V(out) in the waveform viewer.

LTspice XVII LT3580 voltage current waveform

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.

LTspice XVII LT3580 .save simulation

Add the ".save" syntax and click "Run" to run the simulation.

LTspice XVII LT3580 .save syntax

The syntax for ".save" is described and placed as follows:

.save V(out)

This will store only V(out) data.

LTspice XVII LT3580 only voltage probe display

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.

LTspice XVII LT3580 voltage waveform

As in a normal simulation, the voltage waveform of V(out) is displayed in the waveform viewer.

LTspice XVII LT3580 SPICE error log
LTspice XVII LT3580 SPICE error log simulation time

Simulation times can be viewed by clicking on "View-SPICE Error Log" and opening the log file.

CountSimulation Time
(Save all voltages and currents)
Simulation Time
(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.

Let's share this post !