How to Sweep Resistance in LTSpice with Step by Step Tutorials

In this article I will hand to you how to sweep resistance in LTSpice with step by step tutorials. Unlike voltage and current, resistance sweeping is not possible to do in the DC Sweep section under Edit Simulation Command. The convenient way to sweep resistance is through the spice directive. The same process on how to setup a voltage sweep or current sweep using the spice directive, the resistor to be varied must be enclosed in curly braces.

How to Sweep Resistance in LTSpice using Incremental Sweeping

LTSpice resistance sweep command

The first method I will teach on how to sweep resistance in LTSpice is by using incremental sweeping. Meaning, you are going to sweep a resistance value from a specific starting value towards a specified end value with a fixed interval. This is also called as linear sweeping.

In below circuit we want to vary the value of R1 and monitor the Vout level.

figure 2

1. On spice directive window, enter the step command as below. Press keyboard letter “T” to show the spice directive. Do not forget to tick the “Spice directive”. Otherwise, your inputs will be treated as comment only and it will not run.

LTSpice resistance sweep command

In this setup, R1 value is varied from 1 ohm to 100 ohms with an increment of 1 ohm.

Another way to show the spice directive is by clicking the icon below.

figure 4

2. Setup the transient command as below. Click on “Simulate” icon bar then “Edit Simulation Cmd” to show the Transient section. In this example Transient command is being used. However it does not mean that you cannot use the other commands.

figure 5

Simulation result when the box for Start external DC supply voltage at 0V is ticked.

figure 6

When the “Start external DC supply voltages at 0V” is ticked, the simulation will start at zero and the ramping or rising of the waveforms will be shown. Otherwise, the waveform will only show the steady state.

Below is the simulation result when the box for “Start external DC supply voltage at 0V” is unticked.

figure 7

How to Sweep Resistance in LTSpice using List Command

LTSpice resistance sweep command

Another way on how to sweep resistance in LTSpice is through a list command. In the above resistance sweep method, the interval is fixed and the value of R1 is varied with this interval until the end final value is reached. In list command, the resistance is not necessarily swept with a fixed interval. Instead you can just specify the resistance value that you want use. This is sometimes useful than the above method so worth to learn it also.

figure 9

In above circuit for instance, the desired value of R1 is 10, 20, 30, 40, 50 and 60 ohms. Instead of sweeping it from 10 to 60 ohms with an increment of 10 ohms, a list is being used. List command is more specific than sweeping with a fixed interval.

1. On spice directive window, enter the step command as below. Press keyboard letter “T” to show the spice directive.

LTSpice resistance sweep command

2. Setup the transient command as below. Click on “Simulate” icon bar then “Edit Simulation Cmd” to show the Transient section.

figure 11

Below is the Vout reading for 10, 20, 30, 40, 50 and 60 ohms R1 values with a transient command started from 0V.

figure 12

Both methods on how to sweep resistance in LTSpice has its advantages so better familiarize it. Anyway, it is not that difficult to memorize the syntax. You may be interested on how to sweep voltage, current and temperature in LTSpice as well.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.