LTspice-DC Sweep Analysis(.dc)

In this article, we will explain in detail the DC sweep analysis(.dc) method in LTspice.

DC sweep analysis sweeps the DC voltage of the input signal of the electronic circuit.

It is used to analyze DC characteristics of diodes, transistors, op amps and so on.

For the types of analysis, please see the following article.

TOC

Prepare a schematic

First, prepare a schematic for DC sweep analysis with LTspice.

LTspice XVII DC Sweep Analysis Schematic

Perform DC sweep analysis using the schematic in the following article. If you have not drawn a schematic with LTspice, we recommend that you draw a schematic before analysis.

In addition, since the schematic was prepared here, if you want to start analysis immediately, download it by clicking the link below.

Signal source setting

1

We have already set the signal source in the article of "How to Draw a Schematic".

LTspice XVII Edit Source

Open the “Independent Voltage Source” screen by “right-clicking” the signal source V1 of the schematic with the mouse.

2
LTspice XVII Signal source setting

Select none.
(DC sweep analysis can be performed even if the signal source is SINE, but it is misleading, so we recommend changing it.)

3
LTspice XVII SINE(0 2 500)

Confirm that "SINE (0 2 500)" described near the signal source V1 has disappeared.

Signal source setting

Refer to the following article for the detailed setting method of the signal source.

DC Sweep Analysis(.dc) Setting

1
LTspice XVII Edit Simulation Cmd

Click “Simulate”-“Edit Simulation Cmd” in the menu bar to open the “Edit Simulation Command” screen.

2
LTspice XVII DC Sweep Analysis(.dc) Setting

Select “DC sweep” and enter “Name of first source to sweep: V1, Type of sweep: Linear, Start value: 0, Stop value: 4, Increment: 1”. You should see ".dc V1 0 4 1" at the bottom of the screen.

Now the source V1 is increased by 1V between 0 and 4V, and it is set to perform DC sweep analysis.

In addition, LTspice can use auxiliary units as shown in the following table.

Auxiliary unit of LTspice

Unit
(prefix)
UnitMultiple
Ttera1012
Ggiga109
Megmega106
kkilo103
mmilli10-3
umicro10-6
nnano10-9
ppico10-12
ffemto10-15
How to set up detailed DC sweep analysis

Refer to the following article for the detailed setting method of DC sweep analysis.

3
LTspice XVII Place .dc command

As “.dc V1 0 4 1” of dot command appear, place it at an appropriate position. In this article, it was placed near source V1.

Dot command can be created with Edit Text on the Schematic

Although the “.dc” of dot command was created from the screen of “Edit Simulation Command”, it can also be created by “Edit Text on the Schematic”.

LTspice XVII SPICE directive

Click “SPICE Directive” on the toolbar to display “Edit Text on the Schematic” screen.

Make sure that the “SPICE directive” is selected, enter the dot command syntax (“.dc V1 0 4 1” in this case), and click OK to place the created dot command.

Simulation

1
LTspice XVII Simulation

Click “Run” on the toolbar to run the simulation. The simulation time varies depending on the size of the circuit.

2
LTspice XVII Graph pane Displayed

After simulation, the graph pane will appear at the top of the schematic with the default settings of LTspice.

If you want to lay out the schematic editor and graph pane, see the following article, “Display the schematic editor and waveform graph side by side”.

Analysis result

In this article, we would like to easily check the analysis results with the LTspice voltage probe.

1
LTspice XVII Voltage Probe

After simulation, when you move the cursor close to the schematic wiring, the cursor changes to “voltage probe”.

Click “Vin” and “OUTPUT” with the voltage probe.

2
LTspice XVII Analysis Result

The voltage waveforms of Vin and OUTPUT appear on the graph pane.

3
LTspice XVII V(Vin) V(OUTPUT)

You can see that the output voltage V(OUTPUT) is -2 times the input voltage V(Vin) by the inverting amplifier circuit of the op-amp.

How to use Waveform Viewer

In this article, we only used the waveform viewer to check the voltage waveforms of V(Vin) and V(OUTPUT) with the voltage probe.

For more information on how to use the waveform viewer, see the following articles:

The schematic used for the DC sweep analysis can be downloaded from the link below.

Let's share this post !
TOC