Using Device & System Parameters as Variables

From Emagtech Wiki
Jump to: navigation, search
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 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

The User-Defined Parameters dialog.

B2.Spice A/D allows you to define any number of global parameters that you can use as values for various parts of your circuit. This is done by selecting "User-Define Parameters..." from the Edit Menu. At the top of the User-Define Parameters dialog, there is a list of parameters showing the Name, Description and Value of each parameter. In order to introduce a new parameter, click the "New Parameter" button on the right. A new parameter with the default name "NewParam" is inserted in the table. Change the name of the new parameter as you desire. Then select its type from the "Data Type" drop-down list. The available type options include Number, Flag (Boolean) and String. Then enter a value for your parameter and optionally write a description of it in the box provide. Once you are done with the editing, make sure to click the "Accept Parameter" button to save the changes and make them effective. You can select any parameter from the table and delete it using the "Delete Parameter" button on the right.

 

Analyzing Circuits Using B2.Spice A/D Tests   Larr.png   Back to B2.Spice A/D Wiki Main Page   Rarr.png   Parametric Sweeps and Monte Carlo Tests