Worst Case and Sensitivity Analyses (.WCASE)
Worst case and sensitivity analyses of the circuit are achieved with the .WCASE statement. With the chosen analysis (AC, DC or transient), parameters are varied randomly while multiple runs are performed. Only one parameter per run is varied, which allows DR. SPICE to calculate the sensitivity of the output waveform to each parameter. Once all the sensitivities are known, a final run produces the worse case waveform. The sensitivity and worst case runs are done with variations on model parameters as specified by the DEV and LOT tolerances on each .MODEL parameter. Other specifications on the .WCASE statement control the output generated by the Monte Carlo analysis.
NOTE: You cannot run .MC and .WCASE simultaneously.
General format:
.WCASE <(analysis)> <(output variable)> + <(function)> [(option)]*
Examples:
.WCASE DC {V(4,5) * V(4,5)} YMAX
.WCASE TRAN V(4,5) MAX
.WCASE AC VM (4,5) YMAX BY 0.001 DEVICES RM
The following list explains each variable:
Worst Case and Sensitivity Analyses Example
Input File, wcase.cir:
Project WCASE R1 VIN VCENT RMOD1 1K R2 FOUT 0 RMOD1 2K C1 VCENT 0 CMOD1 239PF C2 FOUT 0 CMOD1 80PF L1 VCENT FOUT LMOD1 212U VIN VIN N154 PULSE (0V 100MV 0NS 0 0 100US 200US) V0 N154 0 AC 1 0 Q1 AMP1 FOUT N163 Q2N3903 R3 N186 AMP1 RMOD1 2K R4 N163 0 RMOD1 1K V180 N186 0 DC 15V R5 N186 FOUT RMOD1 2K .TRAN 1US 200US .WCASE TRAN V([AMP1]) YMAX LIST OUTPUT ALL .PROBE/CSDF V([AMP1]) .PROBE/CSDF V([VCENT]) .PROBE/CSDF V([FOUT]) * .MODEL Q2N3903 NPN(IS = 2.96568e-15 VA = 40 TF = 6.36943e-10 + NE = 1.2851 ISE = 2.14091e-14 BF = 100.625 IKF = 0.05 + MJE = 0.345335 CJE = 4.38552e-12 MJC = 0.286574 CJC = 3.62782e-12) .MODEL LMOD1 IND (L=1 DEV/GAUSS 10%) .MODEL CMOD1 CAP (C=1 DEV/GAUSS 10%) .MODEL RMOD1 RES (R=1 DEV/GAUSS 10%) .OPTIONS ACCT NODE LIST .END
Output File (Partial), wcase.out:
************************ Circuit: * Project WCASE ************************* ********************* Run on Apr 12 1994 at 16:03:28 *********************** **** WC: v([amp1]) TEMPERATURE = 27.000 DEG C********** #1 c2(c) Increased to 1.3 #2 c1(c) Increased to 1.3 #3 l1(l) Increased to 1.3 #4 r5(r) Increased to 1.3 #5 r4(r) Increased to 1.3 #6 r3(r) Decreased to 0.7 #7 r2(r) Decreased to 0.7 #8 r1(r) Decreased to 0.7 RUN MAX DEVIATION FROM NOMINAL All Devices 4.2349 higher at time = 1.38e-06 ( 146.8 % of Nominal) r3(r) -0.00593 (4.4581e-05 sigma) lower at time = 1.896e-06 ( -0.6561 % change per 1% change in Model Parameter) r4(r) 0.005823 (4.40227e-05 sigma) higher at time = 1.896e-06 ( 0.6443 % change per 1% change in Model Parameter) r5(r) 0.00537 (1.12403e-05 sigma) higher at time = 0.0001044 ( 0.5878 % change per 1% change in Model Parameter) r1(r) -0.003537 (2.29745e-05 sigma) lower at time = 0.00010248 ( -0.387 % change per 1% change in Model Parameter) r2(r) -0.001791 (1.09665e-05 sigma) lower at time = 4.4968e-05 ( -0.1981 % change per 1% change in Model Parameter)
Output File (Partial), wcase.out (continued):
l1(l) -1.418e-05 (2.24409e-06 sigma) lower at time = 0.000102 ( -0.001557 % change per 1% change in Model Parameter) c1(c) -1.393e-05 (1.91522e-06 sigma) lower at time = 0.000102 ( -0.001529 % change per 1% change in Model Parameter) c2(c) 4.575e-06 (6.35741e-07 sigma) higher at time = 6.4e-07 ( 0.0005025 % change per 1% change in Model Parameter)