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
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.
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.
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.
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.
Simulation result when the box for Start external DC supply voltage at 0V is ticked.
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.
How to Sweep Resistance in LTSpice using List 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.
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.
2. Setup the transient command as below. Click on “Simulate” icon bar then “Edit Simulation Cmd” to show the Transient section.
Below is the Vout reading for 10, 20, 30, 40, 50 and 60 ohms R1 values with a transient command started from 0V.
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.