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
.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.
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.
You can simply click this icon to display the spice directive window.
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.
3. Run the Simulation. To run, simply go to “Simulate” then press “Run”.
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.
Second Method on Sweping Temperature in LTSpice
.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.
Third Method on Sweeping Temperature in LTSpice
.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.
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.
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.
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?
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.
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,…)
Use like this directive to get plots w.r.t. temperature:
.dc temp 0 100 5