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

From LTwiki-Wiki for LTspice
(Created page with "LTspice supports parametric sweeps trough the .step directive .step param RLoad LIST 5 10 15 which performs three simulation with global parameter RLoad being 5, 10 and 15.")
 
Line 1: Line 1:
 
LTspice supports parametric sweeps trough the .step directive
 
LTspice supports parametric sweeps trough the .step directive
  
  .step param RLoad LIST 5 10 15
+
  .step param RLoad list 5 10 15
  
which performs three simulation with global parameter RLoad being 5, 10 and 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 are very in-comprehensive when having more than 3-4 steps. 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
 +
 
 +
View -> SPICE Error Log

Revision as of 10:32, 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 are very in-comprehensive when having more than 3-4 steps. 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

View -> SPICE Error Log