Difference between revisions of "Parametric plot (plot measurements in relation to a swept parameter)"

From LTwiki-Wiki for LTspice
Line 15: Line 15:
 
  SPICE Error Log -> Right click -> Plot .step'ed .meas data
 
  SPICE Error Log -> Right click -> Plot .step'ed .meas data
  
Now the measurements are plotted in relation to the swept parameter, giving a much more compressed and clear visualization of the results, enabling the user to understand the circuit dependencies of the swept parameter.
+
Now the measurements are plotted in relation to the swept parameter, giving a much more compressed and clear visualization of the results, enabling the user to understand the circuit dependencies of the swept parameter. Furthermore the measurements can be exported, from the Parametric plot, to a more useful format than the "SPICE Error Log":
  
[[File:LTspice parametric plot.png]]
+
File -> Export
 +
 
 +
[[File:LTspice parametric plot.png|1200px|thumb|left]]

Revision as of 11:19, 7 March 2013

LTspice supports parametric sweeps trough the .step directive:

.step param RLoad list 5 10 15

which performs three simulations with the global parameter RLoad being 5, 10 and 15. The simulation will return three results, which can be plotted in relation to time or frequency, depending on the type of analysis (transient or AC analysis). But this way of displaying the results is very incomprehensible when having more than 3-5 steps, as the results visually stacks on each other. A way of getting more comprehensible results the .measure directive can be used to perform individual measurements in the circuit:

.measure I_RLload AVG I(RL)

which returns the average current trough the resistor RL. The results of the defined measurements are printed in the "SPICE Error Log" and can be extracted from this log file.

View -> SPICE Error Log

But LTspice actually also supports Parametric plots, which is achieved by right clicking on the open "SPICE Error Log" and selecting "Plot .step'ed .meas data":

SPICE Error Log -> Right click -> Plot .step'ed .meas data

Now the measurements are plotted in relation to the swept parameter, giving a much more compressed and clear visualization of the results, enabling the user to understand the circuit dependencies of the swept parameter. Furthermore the measurements can be exported, from the Parametric plot, to a more useful format than the "SPICE Error Log":

File -> Export
LTspice parametric plot.png