How to Sweep Temperature in LTSpice with Step by Step Tutorials

In this article we will learn the ways on how to sweep temperature in LTSpice. In voltage, current and resistance sweeping you need to declare a certain parameter inside curly braces. In temperature sweeping you don’t have to. When a temperature sweep is used, LTSpice automatically vary the properties of components with respect to desired temperatures. For instance, the forward voltage of a diode will change over different temperatures, the VBE of transistors, the RDSon of MOSFET and so on. The mostly affected components are semiconductor as we know they are more heat sensitive than passive devices like resistors, inductors and capacitors.

First Method on How to Sweep Temperature in LTSpice

LTSpice temperature sweep command

.temp temp1 temp2 temp3 …

Where temp1, temp2 and temp3 are the specific temperatures

Example: In below circuit, the temperature is to be varied to 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100’C.
We are going to monitor the waveform of Vout what is the impact by running a transient command.

figure 2

1. 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. Enter the same thing as below in the spice directive window.

LTSpice temperature sweep command

You can simply click this icon to display the spice directive window.

figure 4

2. The next step is to setup a transient command.

Click on “Simulate” icon bar then “Edit Simulation Cmd” to show the Transient section. In this particular example we are using a transient command. You can use other commands in conjunction with the temperature sweep.

figure 5

3. Run the Simulation. To run, simply go to “Simulate” then press “Run”.

figure 6

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

figure 7

Second Method on Sweping Temperature in LTSpice

LTSpice temperature sweep command

.step temp list temp1 temp2 temp3 …

Where temp1, temp2 and temp3 are the desired temperatures. Actually, the outcome of this method is the same with the first method. Apply the steps in the first method but this time use the above syntax.

figure 9
figure 10

Third Method on Sweeping Temperature in LTSpice

LTSpice temperature sweep command

.step temp initialtemp finaltemp interval

The third way on how to sweep temperature in LTSpice is by using the so called linear sweeping.

This is the preferred way of sweeping wider temperature ranges. Instead of doing temperature listing such as in method 1 and 2, you can do it like this.

figure 12

To simulate the example using this method, just follow same procedures with the first method but use the specified syntax above. You can get the same result as illustrated below.

figure 13

To summarize, there are three methods on how to sweep temperature in LTSpice. You can use any of these in your simulation. You may be interested also on how to sweep voltage, current and resistance in LTSpice.

4 comments

  1. Hey, thank you for this great article. Only now i know that it’s possible to sweep temperature in LTSpice. I have a question, will the circuit operation change when I sweep temperature from 0 to 70’C?

    1. Kyle, thank you.
      If the circuit is composed of semiconductors, yes the effect is significant because semiconductor properties changes when temperature is more than 25’C. However if the circuit is passive like resistor, capacitors and inductors, the effect is not that big because passive devices has higher temperature stability than semiconductors.

  2. Hello,
    I am trying to simulate the temperature sweep in the temperature sensor circuit. The core problem is that it is not possible to simulate the temperature sweep by the different in voltage of one element within the circuit only. Because we use this way the LTSpice will understand that you are gonna change the temperature of the whole circuit. But my indication is to simulate the output voltage based on the different temperature of one element in the whole circuit (for example diode,…)

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.