Changes

Running Parametric Sweeps and Monte Carlo Tests

146 bytes added, 15:49, 10 November 2016
/* Parametric Sweep Tests */
===Choosing the Sweep Variables===
[[File:b2MAN_Fig214.png|thumb|480px|RF.Spice's Sweep Settings Dialog.]]
Most [[RF.Spice A/D]] Tests come with an option to "Sweep" or incrementally step a parameter over the entire run of the test. In other words, you can vary a particular parameter for each run of the test. For instance, you can step a particular resistor's resistance from 1K to 10K by increments of 2K during a Transient Test. When you run the transient test, the first run will set the resistor's value to 1K. The second run will set the resistor's value to 3K, since the increment was set at 2K. Each step of the resistor's value will result in a transient test. Therefore, the Transient Sweep test will be run 5 times, with resistor's values of 1K, 3K, 5K, 7K, and 9K. The combined results will be displayed in a graph.
Select the tab that contains the parameter you wish to vary. The Part Parameters tab contains all the available parts and their parameters. The Part Model Names tab lists the simulation models associated with all the parts. The Model Parameters tab lists all the available internal parameters of the simulation models in your circuit. The User Parameters tab lists all the user-defined parameters that you have already defined in your project. The System Parameters contains all the parameters found in the SPICE Simulation Options dialog. There are three radio buttons at the bottom of the list table: All, Some and Few. These buttons control how many parameters should appear in these lists. If you cannot find a particular parameter you are looking for, make sure to select the "All" button.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig214.png|thumb|left|720px|RF.Spice's Sweep Settings Dialog.]]
</td>
</tr>
</table>
===Setting Up a Uniform Sweep===
===Setting Up a Discrete Value Set===
[[File:b2MAN_Fig222.png|thumb|440px|RF.Spice's Select Model dialog.]]
In many cases, a certain parameter may take certain discrete values. Examples of these are the commercial resistor or capacitor part values. In such cases, rather than running a uniform parameter sweep, you may want to set your sweep variable to take a set of discrete values. To do so, after you select your sweep parameter, select the "Values List" radio button in the "Parameter Setup" section of the Sweep Settings Dialog. An edit box appears under the radio button, where you can enter the set of values for your sweep variable. You can separate the values by commas. You can also load the values from a text file using the button labeled "Load From File". The data file can be a very simple file just containing the numeric values separated by spaces or commas or one value per line.
<tr>
<td>
[[File:b2MAN_Fig222.png|thumb|left|550px|RF.Spice's Select Model dialog.]]</td></tr></table> <table><tr><td>[[File:b2MAN_Fig223.png|thumb|480pxleft|640px|Setting a device model as the sweep variable.]]
</td>
</tr>
===Sweeping Different Models for a Part===
[[File:b2MAN_Fig215.png|thumb|480px|A scenario array showing the combination of sweep variable values.]]
It is possible to sweep different models for a certain device or part in your circuit and see the differences in the response of your circuit. For example, you can try out different BJT or MOSFET models, e.g. from different manufacturers, in a amplifier circuit. To sweep models, open up the Sweep Settings dialog, and go to its "Part Model Names" tab. Select a device or model you want to sweep. In the "Parameter Setup" section of the dialog, you will notice that the third radio button, which was originally labeled "Values List", has not changed to "Model List". The edit box underneath this radio button is where you will list all the models to sweep. In the box labeled "Original Model", you will see the current model associated with your selected part. You can add this model to the sweep using the "Add Original Model" button. Click on the "Add New Model" button to open up the "Select Model Dialog". This dialog shows a list of all the available models that match with your selected part. Choose one from the list and click the "Select Model" button to close this dialog and return to the Sweep Settings dialog. You will see that the new model has been added to the model list. You may also delete a model from the list using the "Remove Model" button. Once your model list is complete, press the "Accept Changes" button to finalize your "Model" sweep variable. During each run of the sweep simulation, the designated models are replaced for the selected part one by one.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig215.png|thumb|left|640px|A scenario array showing the combination of sweep variable values.]]
</td>
</tr>
</table>
===Running Multivariable Parametric Sweeps===
<tr>
<td>
[[File:b2MAN_Fig216.png|thumb|640pxleft|720px|The output graph of a parametric sweep.]]
</td>
</tr>
28,333
edits