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

TOC

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

1

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.

2
LTspice XVII LT3580 simulation run

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

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

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

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

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

7
LTspice XVII LT3580 voltage waveform

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

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

9
CountSimulation Time
(Save all voltages and currents)
Simulation Time
(Save only voltage V(ss))
1st16.908sec15.449sec
2nd16.654sec15.422sec
3rd16.535sec15.427sec
4th16.510sec15.301sec
5th16.626sec15.411sec
Average16.6466sec15.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.

Let's share this post !
TOC