Changes

Running Parametric Sweeps and Monte Carlo Tests

10 bytes removed, 01:40, 3 August 2015
[[File:b2MAN_Fig4.png|thumb|220px|B2.Spice A/D Circuit Parameters Tab.]]
Each part in [[B2.Spice A/D]] has one or more [[parameters]]. Most of these [[parameters]] have numeric values like the resistance of a resistor, or the capacitance of a capacitor, or the forward beta (bf) of a bipolar junction transistor. Some other [[parameters]] might be Boolean, that is, they take only binary values: "True" of "False". There are also string [[parameters]] such as the name or label of a part. Most of device [[parameters]] can be changed during a simulation. Besides device [[parameters]], there are also system [[parameters]] like temperature, time of a transient simulation or frequency of an AC analysis, or SPICE simulation [[parameters]]. You can also define your own [[parameters]] and use them as the values for other [[parameters]]. Device and system [[parameters]] can be varied during a "Sweep" or "Monte Carlo" test. To find out more about these types of [[tests]], please refer to the section on [[B2_sweep | Parametric Sweeps and Monte Carlo Tests]].
 
You can also vary [[parameters]] in real time during a live simulation. Oddly named but quite useful, the [[Parameters]] tab of the Toolbox presents a small spreadsheet-like grid which lists all the parts in the circuit available for scrutiny. This includes only those parts which allow value changes such as resistors, capacitors, current and voltage sources, and inductors, but not the ground. The part’s name is displayed in the left cell, while its value is displayed in the right cell. Use the radio buttons labeled "All", "Some" and "Few" (default) to expand to shrink the list of displayed devices and properties. The "Few" button lists just the primitive devices and their values, such as a resistor's resistance, inductor's inductance, and so forth. The "Some" button will add more sources and their properties, and the "All" button lists every device and parameter that is accessible in your project.
 
Clicking on the value allows you to edit the value either by typing in a new value and then pressing the "Accept" button (Enter Arrow) or using the slider at the top of the tab to control the value. The "Recenter" button makes the current value the center of the slider. This is handy when you hit the end of the slider's range and want to go further. In this case, clicking on the Recenter button will make the slider's end value the new center which will then allow you to continue modifying the parameter.
 
Using the [[Parameters]] Panel in conjunction with a live Simulation, you can examine how changing a part's values will influence the function of your circuit. Once the simulation is running and the circuit is "Live", take advantage of the [[Parameters]] Panel to modify device [[parameters]] in real time and see the immediate effects on your circuit's response. The results can be observed either on [[Virtual Instruments]] or by enabling Circuit [[Animation]]. Please keep in mind that while a simulation is running, modification of device [[parameters]] by double clicking on the device itself is not allowed. You will receive a warning message telling you to either stop the simulation first or use the [[Parameters]] panel instead.
 
==User-Defined Parameters==
* Part [[Parameters]]
 
* Part Model Names
 
* Model [[Parameters]]
 
* User [[Parameters]]
 
* System [[Parameters]]
 
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.
The results of a Parametric Sweep Test can be displayed either in a 2D graph or in a table or both. The procedure to define your data plots is very similar to a basic (single-run) test. This is done in the "2D Output" section of the "Sweep" tab at the bottom of the test setup panel. Check either the "Graph" or "Table" or both checkboxes and click one of the buttons labeled "Preset Graph Plots" or "Preset Table Plots" to open up the "Edit Plot List" dialog. The main difference with a basic test graph or table is that the sweep results appear as a family of Cartesian curves on the 2D graph or a set of data columns in a table. Each individual curve or data column corresponds to one sample of the sweep variable. These are differentiated by bracketed indices like variable_name[i], i = 0,1,2, ...
 
==Monte Carlo Tests==
28,333
edits