Changes

Running Parametric Sweeps and Monte Carlo Tests

137 bytes added, 15:51, 10 November 2016
/* Monte Carlo Tests */
==Monte Carlo Tests==
 
[[File:b2MAN_Fig217.png|thumb|480px|RF.Spice's Monte Carlo Settings Dialog.]]
===Choosing the Monte Carlo Variables===
The parameters listed under each tab are similar to those of the Sweep Settings Dialog, except for the last tab called "Lot Parameters". You can set the number of Monte Carlo runs (i.e. the number of times to randomly vary a chosen parameter) in the box labeled "No. Iterations". For each run, a set of device parameters is assigned randomly according to the parameter's range and distribution type.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig217.png|thumb|left|720px|RF.Spice's Monte Carlo Settings Dialog.]]
</td>
</tr>
</table>
===Setting Statistical Distribution and Tolerance of Device Parameters===
[[RF.Spice A/D]] offers two different ways of settings the statistical distribution and tolerance of various device parameters: (1) from the Schematic Editor, and (2) from the Monte Carlo Settings Dialog. The main types of distributions are Gaussian (Normal) and Uniform. The Gaussian distribution is the bell-shaped distribution concentrated around a mean value and defined by a standard variation (sigma). The Uniform distribution gives any value in the specified range an equal probability. If you specify "Tolerance" as a percentage, then it will be interpreted as a percentage boundary on either side of the individual parameter's given value. The given value is assumed to be the statistical mean. When running a Monte Carlo simulation, at each simulation iteration, parameters are set to values that are different than their specified values according to their tolerances.
 
[[File:b2MAN_Fig221.png|thumb|350px|The Monte Carlo Tolerance Settings dialog accessible from Schematic Editor.]]
===Setting Tolerances from Schematic Editor===
You can set the statistical distributions and tolerances for the resistor values, capacitor values and inductor values as well as all the shared properties of other devices from the Schematic Editor. To do so, open the property dialog of the part by double-clicking its symbol in the schematic editor. If a parameter is available for settings its tolerance, you will see a button labeled "Set Tolerance..." in the property dialog. In the case of active devices with shared process models, you have to choose a parameter from the list and this button appears above the "Accept Value" button. Clicking on the Set Tolerance button, open up the "Monte Carlo Tolerance Settings Dialog". There are two rows of boxes labeled "Tolerance", "Is Percent?", "Distribution" and "Group". The top row is for the selected part's instance in your circuit, while the bottom row is for the lot the part belongs to. Using these boxes you can set the value of Tolerance and whether it is expressed in percent or as an absolute value. You can also assign a statistical distribution to the parameter and finally associate it with a group. More will be discussed later in this section about part groups.
<table><tr><td>[[File:b2MAN_Fig218b2MAN_Fig221.png|thumb|370pxleft|480px|The Parameter Distribution Monte Carlo Tolerance Settings dialog accessible from Monte Carlo Settings DialogSchematic Editor.]]</td></tr></table>
===Setting Tolerances from Monte Carlo Settings Dialog===
To select and set up the statistical properties of parameters from the Monte Carlo Settings Dialog, select the appropriate parameter from the one of the lists in the available tabs. Resistor and capacitor distributions are set through their own dedicated buttons because Monte Carlo tolerance is built into their models and requires its own setup. For other devices, use the "Edit Distribution" button to set up each particular parameter for Monte Carlo analysis. This opens up the "Parameter Distribution Settings Dialog". The name of the Part/Parameter that you are setting the distribution for is displayed in the "Parameter" box. Make sure to check the checkbox labeled "Override Schematic Value". Use the "Random Type" drop-down box to set the distribution type. The "random Type" drop-down list is set to "Fixed" by default, meaning that the selected parameter is currently deterministic. Change the distribution type to "Uniform" or "Gaussian (Normal". You can also choose the "Discrete Value List" option. In that case, either enter the discrete values manually in the edit box provided or use the "Load From File" button to import the numeric values from a text file. Enter the tolerance in the box labeled "Std Deviation" (or sigma) and indicate if it is expressed as a percentage. You can also associate the percentage with multiple sigmas. Enter a value larger than one in the box labeled "# Std Deviations", and the sigma value is adjusted accordingly. You can set "Max Cutoff" and "Min Cutoff" values for the parameter. However, you need to enable these options. In that case, if the designated random distribution generates a parameter value that fall below the Min Cutoff or above the Max Cutoff, it will be eliminated, and a new legitimate value will be generated.
<table>
<tr>
<td>
[[File:b2MAN_Fig218.png|thumb|left|480px|The Parameter Distribution Settings dialog accessible from Monte Carlo Settings Dialog.]]
</td>
</tr>
</table>
===Output of a Monte Carlo Simulation===
<tr>
<td>
[[File:b2MAN_Fig220.png|thumb|640pxleft|720px|The histogram output of a Monte Carlo test.]]
</td>
</tr>
28,333
edits