LTspice-Parametric Analysis(.step)

In this article, we will explain in detail the parametric analysis(.step) method in LTspice.

Parametric analysis analyzes while changing parameters such as resistance, capacitor, inductor, and power supply of electronic circuit.

It is performed simultaneously with transient analysis, AC analysis, DC sweep analysis, etc.

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

TOC

Prepare a schematic

First, prepare a schematic for parametric analysis with LTspice.

LTspice XVII Parametric Analysis Schematic

Perform parametric 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", but let's check it just in case.

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

Check that SINE is selected and DC offset [V]: 0, Amplitude [V]: 2, Freq [Hz]: 500 is input.

Signal source setting

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

Resistance setting

It is necessary to set the part which changes the parameter in parametric analysis. This time, set the feedback resistor R2 of the op-amp.

1
LTspice XVII Edit Resistance

Open the edit screen of resistance R2 by "right clicking" the resistance R2 of the schematic with the mouse.

2
LTspice XVII Resistance setting

Enter {R2} for the Resistance[Ω]. This time I set the variable to R2, but anything with alphanumeric characters is fine.

3
LTspice XVII {R2}

Make sure that the parameter of R2 is {R2}.

Transient Analysis(.tran) Setting

Parametric analysis is performed simultaneously with transient analysis, AC analysis, DC sweep analysis and so on. This time, we set up transient analysis to be performed simultaneously with parametric analysis.

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 Transient Analysis(.tran) Setting

Select “Transient” and enter “10 m” for Stop time. You should now see “.tran 10m” at the bottom of the screen.

Now, it is set to perform transient analysis for 10msec.

LTspice can use auxiliary units other than “m” as shown in the following table.

Of course, it does not matter if you enter “0.01” instead of “10m” without using auxiliary units.

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 transient analysis

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

3
LTspice XVII Place .tran command

As “.tran 10m” 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 “.tran” 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 (“.tran 10m” in this case), and click OK to place the created dot command.

Parametric Analysis(.step) Setting

1
LTspice XVII SPICE directive

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

2
LTspice XVII SPICE directive .step

Make sure the "SPICE directive" is selected and enter ".step".

3
LTspice XVII Place .step

The ".step" of dot command appears, so place it at an appropriate position. In this article, it was placed near source V1.

After placement, right-click ".step" of the mouse to open the ".step Statement Editor" screen.

4
LTspice XVII .step Statement Editor

Input Name of parameter to sweep: R2, Nature of sweep: Linear, Start value: 100, Stop value: 400, Increment: 100. You should see ".step param R2 100 400 100" at the bottom of the screen.

This is the setting for performing a parametric analysis that changes the variable R2 from 100 to 400 ohms in 100 ohm linear steps.

Of course, if you know the syntax format, you can also enter it on the "Edit Text on the Schematic" screen.

5
LTspice XVII .step param R2 100 400 100

Confirm that ".step" of the dot command is displayed as ".step param R2 100 400 100".

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 “OUTPUT” with the voltage probe.

2
LTspice XVII Analysis Result

The voltage waveforms of OUTPUT appear on the graph pane.

3
LTspice XVII Voltage Waveform OUTPUT

If you check the voltage waveform of OUTPUT, you can see that it increases from 2V to 8V each time the parameter of feedback resistor of op amp increases.

How to use Waveform Viewer

In this article, we only used the waveform viewer to check the voltage waveforms of 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 parametric analysis can be downloaded from the link below.

Let's share this post !
TOC