The Monte Carlo analysis is a statistical analysis that performs multiple consecutive simulations by varying, at random, the value of all the components for which a tolerance value has been specified. The Monte Carlo analysis allows to study the effect that the variations of the values of the circuit elements have on the performance of the circuit.

The tolerance values of the components can be specified as follows:

For resistors, capacitors, inductors, and DC generators, you can specify tolerance values directly in the SPICE attributes of the component by specifying a value for the TOLERANCE parameter. This mode is useful for including tolerance values directly in component libraries.

In the Monte Carlo analysis dialog box, you can directly specify tolerance values for component and model parameters.

Note: |
---|

To perform a Monte Carlo analysis, select Monte Carlo Analysis in the |

Tip: |
---|

A Monte Carlo analysis can produce a large amount of data causing an excessive use of memory and a lower speed of simulation. To reduce the amount of data that is stored during a simulation it may be convenient to specify the names of only the vectors of interest, in this case only the data related to the specified vectors will be stored. |

# Number of Runs

The number of simulation runs you want the Simulator to perform. For example, if you specify the number 10, eleven analyses will be performed: one nominal without changing the value of the components and ten statistical analyses by varying the value of all components at each step according to the specified tolerance values. More repetitions produce a more accurate statistical result at the expense of more simulation time.

# Seed

During the Monte Carlo analysis, the values of the components vary randomly using a random number generator. The value specified in this box allows you to initialize the random number generator so that it always produces the same sequence of numbers. To obtain an always different sequence of numbers you must specify the number 0.

# Default Distribution

During the Monte Carlo analysis, the values of the components are randomly varied according to a specified statistical distribution. In this box you must select the default distribution type to be used for all tolerance values for which a given distribution is not specified. Three types of distributions are available: Uniform, Gaussian, and Worst Case:

**Uniform**. This is a flat distribution. Values are uniformly distributed over the specified tolerance range. For example, for a 1K resistor with a tolerance of 10%, there is an equal chance of the randomly generated value being anywhere between 900Ω and 1100Ω.**Gaussian**. With the Gaussian distribution (or normal distribution) the components are more likely to assume a value close to the nominal value than a value at the ends of the tolerance band. The curve of values produced by the Gaussian distribution has the typical bell shape with the center on the nominal value of the component and the ends of the tolerance band placed at +/- 3 standard deviations. For example, a 1000 ohm resistor with a 10% tolerance has the center of the distribution at 1000 ohms and the ends of the tolerance band (900 and 1100 ohms) at +/- 3 standard deviations. With a value of 3 for the standard deviation there is a 99.7% probability that the value generated is within the tolerance band.**Worst Case**. With the worst case distribution, the components are equally likely to assume either of the two values at the ends of the tolerance band. For example, a 1000 ohm resistor with a 10% tolerance has the same probability of assuming either of the two values of 900 and 1100 ohms.

# Categories

Lists the categories of components for which you can specify a tolerance value.
If you select a category, the **Tolerances** box lists all components for which a tolerance value has been specified.
You can specify a tolerance value for component parameters, model parameters, and global parameters.

# Tolerances

In this box you can set tolerance values for component parameters, model parameters and global parameters. To add a new tolerance value, click on the Add button and then select the component, model or global parameter to be changed.

Note: |
---|

The list also shows, in green, the tolerance values specified in the SPICE attributes of the components included in the schematic. |

## Name

Specify the name of the component, model, or global parameter.
For the following categories: resistors, capacitors, inductors, and DC generators,
you can specify a default tolerance value (select **default** for the name)
that will be used for all components in the specified category for which no tolerance value is specified.

## Parameter

Specify the parameter to which the specified tolerance values are to be applied.
The term *VALUE* refers to the value of resistors, capacitors, inductors and DC generators
as specified in the value field of the component in the schematic.

## Value

You can specify a new nominal value of the parameter, or select *default* to use the current value.

## Tolerance values

You can specify either the DEV tolerance or the LOT tolerance or both. In the latter case, the tolerance values are calculated independently and added together. The combination of DEV and LOT tolerances is useful for situations where component variations are not completely correlated, but are not completely independent of each other either. For example, in a resistive network there may be a component related LOT tolerance and a smaller DEV tolerance related to the variations of individual resistors.

Each tolerance value is defined by the following three parameters:

**Dev Tol**or**Lot Tol**. It can be specified either as an absolute value or as a percentage by adding the suffix %. For example, for a 1000 ohms resistor if you specify a tolerance of 10 you will get a variation between 990 and 1010 ohms, while if you specify 10% you will get a variation between 900 and 1100 ohms.**Group**. You must assign the same group number to multiple components when you want their tolerance changes to be correlated, that is, values increase or decrease jointly. If you specify the zero group then the value of the component varies independently of all other components. Groups from 1 to 15 are available.**Distribution**. Select the type of statistical distribution.

# Analysis results

A Monte Carlo analysis consists of a first simulation in which the values of the components assume the nominal value and in a number of statistical simulations equal to the specified number of repetitions. If the number of repetitions is limited, the result of the analysis can be reported as a set of curves each of which corresponds to a certain combination of the set tolerance values. If the number of repetitions is high then it is convenient to compress the results into a single curve. The available options are as follows:

Option | Description |
---|---|

Individual |
The result is a series of curves, each of which corresponds to a different combination of tolerance values. |

Maximum Value |
The result of the analysis is the nominal value curve and the maximum value curve. |

Minimum Value |
The result of the analysis is the nominal value curve and the minimum value curve. |

Greatest Difference |
The result of the analysis is the nominal value curve and the curve with the point of greatest difference from the nominal curve. |

# Skip tolerance values specified in the symbols

Check this box to ignore the tolerance values specified in the SPICE attributes of the components. Checking this box will cause the analysis to be performed using only the tolerance values specified in the dialog box.