User Guide
Chapter 12 Monte Carlo and sensitivity/worst-case analyses
310
Only one of these analyses can run in any given
simulation.
Note
The AC and worst-case analysis specifications (.AC and .WC
statements) are written so that the worst-case analysis tries to
minimize Vm([OUT]) at 100 kHz.
The netlist and circuit file in Figure 85 are set up to run
either a parametric (.STEP) or worst-case (.WC) analysis of
the specified AC analysis. These simulations demonstrate
the conditions under which worst-case analysis works
well and those that can produce misleading results when
* Worst-case analysis comparing monotonic and non-monotonic
* output with a variable parameter
.lib
***** Input signal and blocking capacitor *****
Vin In 0 ac 1
Cin In B 1u
***** "Amplifier" *****
* gain increases with small increase in Rb2, but
* device saturates if Rb2 is maximized.
Vcc Vcc 0 10
Rc Vcc C 1k
Q1 C B 0 Q2N2222
Rb1 Vcc B 10k
Rb2 B 0 Rbmod 720
.model Rbmod res(R=1 dev 5%) ; WC analysis results
; are correct
* .model Rbmod res(R=1.1 dev 5%) ; WC analysis misled
; by sensitivity
***** Load and blocking capacitor *****
CoutC Out 1u
Rl Out 0 1k
* Run with either the .STEP or the .WC, but not both.
* This circuit file is currently set up to run the .STEP
* (.WC is commented out)
**** Parametric Sweep—providing plot of Vm([OUT]) vs. Rb2 ****
.STEP Res Rbmod(R) 0.8 1.2 10m
***** Worst-case analysis *****
* run once for each of the .model definitions stated above)
* WC AC Vm([Out]) min range 99k 101k list output all
.ACLin390k110k
.probe
.end
Figure 85
Amplifier netlist and circuit file.
Pspug.book Page 310 Wednesday, November 11, 1998 1:14 PM