Monte Carlo Analysis

Monte Carlo analysis shows you the effect of component variations on circuit characteristics, so you can determine how well your design will do in production. You specify component tolerances and how many different versions of your circuit you want to run. DR. SPICE runs the specified analysis for each version, varying the component values each time based on their tolerances.

 

Entry Description
Function The function to perform to current the waveform to a single value.
YMAX = select for the largest variation from the nominal.
MIN = select for the minimum value across all runs.
MAX = select for the maximum value across all runs.
RISE_EDGE = select and enter the value for the first point the output variable from any run rises above the value.
FALL_EDGE = select and enter the value for the first point the output variable from any run falls below the value.
Analysis Type of analysis to run Monte Carlo in conjunction with. AC, DC and TRAN are the options and at least one of these must be specified in the circuit file.
Output VariableThe node voltage or branch current of interest.
Number of Runs The number of times an AC, DC or TRAN analysis is run.
Monte Carlo / Worst Case The syntax for Monte Carlo and Worst Case is very similar. This indicates which analysis type is of current interest.
Preview Select this button to view the equivalent DR. SPICE syntax.
Options... Select this button to view more options for Monte Carlo / Worst Case analysis.
Output Controls how often waveforms are generated by DR. SPICE.
All = select to generate waveforms for all the runs.
Every = select and enter a value to generate waveforms once every value runs.
First = select and enter a value to generate waveforms for the first value runs.
List = select and enter a list of the runs for which to generate waveforms.
Range Limits the range that Function will be applied from Xlow to Xhigh. The
default is the entire range.
List Select this to print out unique model parameters for each run.

 

The Monte Carlo Analysis dialog box is analogous to the .MC analysis command found in the circuit file.

Specifying Component Tolerances in .MODEL

Assign tolerances to component parameters by adding modifiers to the parameters in the component’s .MODEL statement. You can specify the tolerance as an absolute amount, or as a percentage. The tolerance amount should never exceed the parameter value. There are two kinds of tolerances:

Example:

.MODEL CRES RES (R=1 DEV 4% TC1=.02 TC2=.0045)
.MODEL CL CAP (C=1.5 DEV 1% LOT 10%)

Creating the .MC Statement

Use the .MC statement to invoke Monte Carlo analysis after you have assigned component tolerances. The parameters on the .MC statement determine the following:

How much output is to be generated Statement:

.MC <(#runs)value> <(analysis)> +<(output variable)> <(function)> +[(option)]*

Examples:

.MC  8 TRAN V(4,5) YMAX
.MC 20 AC VM (4,5) YMAX
.MC  5 DC I (VIN) YMAX  LIST OUTPUT ALL

The following list explains variables and abbreviations in the statement:

<(function)> = one of the functions listed below. These are used to abstract the results from the multiple runs into a single set of values that can provide insight into the effects of component variations on the output variable you are examining. The available functions are:

 

Name Description
YMAX The largest variation in the output variable from its value with nominal component values.
MAXThe maximum value of the output from all runs.
MIN The minimum value of the output from all runs.
RISE_EDGE(value)The first time where the output goes from below value to above it.
FALL_EDGE(value)The first time where the output goes from above value to below it.

 

 

Name Description
LIST Before each run, print the values used for the model parameters to the output file.
OUTPUT <type>Print output for selected runs. Acceptable values of <type> are:
ALL (all runs)
FIRST <N>(the first N runs)
EVERY <N> (every Nth run)
RUNS <a,b,...>(output information for the specific runs listed)

 

Monte Carlo Analysis Example:


Project MONTE .MC 6 TRAN V([AMP1]) YMAX LIST OUTPUT ALL 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 .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), monte.out:

**** MC: v([amp1]) TEMPERATURE = 27.000 DEG C ************************************************************************ MEAN = -0.02346 SIGMA = 0.9301 RUN MAX DEVIATION FROM NOMINAL Pass 1 -1.622 (0.0157917 sigma) lower at time = 1.896e-06 ( -17.9% of Nominal) NO 1 c2 7.71636e-11 NO 1 c1 2.40128e-10 NO 1 l1 0.000208161 NO 1 r5 2068.36 NO 1 r4 890.624 NO 1 r3 2318.25 NO 1 r2 2186.98 NO 1 r1 975.55 Pass 6 1.329 (0.00247278 sigma) higher at time = 4.4968e-05 ( 14.7% of Nominal) NO 6 c2 8.65681e-11 NO 6 l1 0.000234794 NO 6 r5 2166.32 NO 6 r4 995.95 NO 6 r3 1894.62 NO 6 r2 1569.84 NO 6 r1 923.975 Pass 5 -0.6321 (0.00618933 sigma) lower at time = 1.896e-06 ( -6.99% of Nominal) NO 5 c2 8.51048e-11 NO 5 c1 2.39304e-10 NO 5 l1 0.000221236 NO 5 r5 1983.81 NO 5 r4 858.094 NO 5 r3 1939.5 NO 5 r2 1960.61 NO 5 r1 967.404 Pass 2 0.6286 (0.00455347 sigma) higher at time = 1.384e-06 ( 6.95% of Nominal) NO 2 c2 8.95509e-11 NO 2 c1 2.61527e-10 NO 2 l1 0.000211652 NO 2 r5 1968.42 NO 2 r4 1118.2 NO 2 r3 1926.7 NO 2 r2 2288.03 NO 2 r1 971.915 Pass 3 0.3559 (0.00701241 sigma) higher at time = ( 3.94% of Nominal) NO 3 c2 8.62801e-11 NO 3 c1 2.29989e-10 NO 3 l1 0.000205155 NO 3 r5 1930.98 NO 3 r4 900.345 NO 3 r3 1575.47 NO 3 r2 2044.91 NO 3 r1 1064.17 Pass 4 -0.2078 (0.00545516 sigma) lower at time = 1.896e-06 ( -2.3% of Nominal) NO 4 c2 7.91179e-11 NO 4 c1 2.57387e-10 NO 4 l1 0.000219139 NO 4 r5 1901.53 NO 4 r4 951.076 NO 4 r3 2161.29 NO 4 r2 1599.93 NO 4 r1 891.727

Waveforms in DR. SPICE:

Monte Carlo Analysis Output File

Return to main help menu