Beigebag FAQ 2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>B2 Spice AD FAQ</title> <meta name="keywords" content="EDA, simulation, spice simulation, schematic capture, PCB, schematic, electronic, CAD, CAM, Spice, spice software, circuit simulation, circuit design, electronics, ac circuits, DC circuits, transformers, diodes, rectifiers"> <script type="text/javascript" src="Templates/dropdown.js"> </script> </head>
www
<body bgcolor="#FFFFFF" background="images_v5/bgtile_new.gif" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
| <a href="http://www.beigebag.com"><img src="images_v5/bblogo_ds_single.gif" width="375" height="37" border="0" alt="Beige Bag Software"></a> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<a name="q23"></a>How do I convert a PSpice model foruse in B2 Spice? |
<p>A specific PSPICE specific conversion to look for is how PSPICE denotes resistors, capacitors, and inductors in the .model line. PSPICE uses RES, CAP, and IND where Berkeley SPICE uses R, C, and L respectively. For instance, a resistor model in PSPICE will be something like .model
rmod RES ... Also, PSPICE's dependent sources can use a VALUE= syntax and then an equation for the voltage or current. SPICE doesn't have this syntax but the conversion for this is to replace the device with a non-linear source, depending on the original PSPICE device type. For instance: PSPICE: SPICE: The "VALUE =" with a "V=" to denote a voltage source because the original device was an "E" voltage controlled voltage source and the "V =" means "voltage equals". If the original device were a current source F or G type device, the instead of "V=", you would use "I =" Also there are simply some model parameters that just have no SPICE equivalent and must be left out. I don't have a complete list of the non-SPICE syntax but our program will let you know if it doesn't recognize a parameter and then ignore it so really nothing has to be done. But it's worth keeping in mind that the effects of the omission are unknown and must be considered. The hardest thing to convert is PSPICE's ability to use If-Then equations. There is a convoluted way to use logical syntax in SPICE and one of our users was kind enough to write up a guide on doing so: http://www.beigebag.com/case_logical_1.htm. These are the most common problems when trying to convert PSpice to Berkeley SPICE and there will probably be more specific problems that are not covered here. PSPICE to Berkeley SPICE conversion is as much art as science and there's no set way to convert all cases of PSPICE to Berkeley SPICE. If you have problems, you can always submit it to us for help. |
||||||||||||||||||||||
| <a name="q22"></a>Is there any way to speed up my simulation? |
<p>There are a couple of things to try if you believe that the simulation that you're running is going slower than it should. The first thing to try is to make sure that circuit state animation is turned off. For more information about this, refer to the <a href="#q18">this FAQ item</a>. If you have ammeters or voltmeters in your circuit, you can speed up your simulation by turning off the values display. Go to the "Edit->Options" menu and uncheck the "Show part values' option. This will turn off the redraw of the ammeter/voltmeter values as the simulation is running. Another thing you can do is to try to change your simulation parameters. If you're running a Transient simulation, you can try increasing the step size if you don't mind losing a bit of resolution. Or if you have "use initial conditions" checked when you really don't need to, turn that off. Also in Transient simulation, you can try going to the Miscellaneous Options in the Simulation menu and playing with the minbreak parameter. One of our users reported good results using a value of 1n and increasing from there. Too large a value might result in convergence problems. Finally, you can try altering the convergence options found under the "Simulations->Convergence Options" menu. By default, we have pre-set some parameters to avoid the most common convergence problems. However, you can try increasing the "reltol" parameter since we've set it to something finer than it needs to be. Try 1e-3 instead of the given 1e-4. But keep in mind that this might affect the accuracy of your simulation. You might need to change your step size to compensate. |
||||||||||||||||||||||
<a name="q21"></a>I've just imported a model into the
Database and everything went smoothly. When I place it
in a circuit and run a simulation, I get an error saying
"unrecognized parameter (parameter) - ignored".
What's up? |
<p>This
message means that the simulation engine encountered
a model parameter that isn't recognized by Berkeley
Spice. For instance, the following line will produce
an error: Another
PSPICE notation that can cause problems is PSPICE's
way of denoting resistors, capacitors, and inductors
in the .MODEL line. PSPICE uses RES, CAP, and IND, respectively
while Berkeley SPICE uses R, C, and L, respectively.
Just make these changes and the model should import
correctly. An example is below: |
||||||||||||||||||||||
<a name="q20"></a>I'm using v4.2 and a part that I placed
on the schematic is shown in red. What does that mean?
I ran a simulation and the log says that part XXX doesn't
have a simulation model. What does that mean? |
One of the new capabilities of v4.2 was the ability to import and export schematics to Eagle PCB. Part of this process involved importing the Eagle libraries into the B2 Spice database. Most of these Eagle parts don't have a simulation model and aren't meant for simulation, just for schematics. If the part that you're using is shown in red and has the pins X'ed out then the part does not have a simulation model. Parts with no simulation model will also be flagged in the simulation log. The part will be left out of the simulation, which can produce unexpected results. To get around this, just replace the parts with no simulation models with parts that have them. It might be that there isn't an equivalent part, in which case you'll have to find an alternate part. In the parts browser, you can filter out the non-simulating part by checking the "show only parts with simulation model" check box. This should filter out all the Eagle schematic parts. |
||||||||||||||||||||||
<a name="q19">When</a> a simulation is run, an error message
appears saying "Illegal type for token...".
What does this mean? |
This error message could mean a number of things, but
the most common problem is that in the circuit a part's
value is incorrectly stated, usually using the European
convention for decimals. For example, if you're
using 4K3 to denote 4.3K, that would cause the error.
Just fix the notation and it should proceed without a
problem. |
||||||||||||||||||||||
<a name="q18">With</a> version 4.2, Workshop now seemsto run much slower than before. What happened? |
One of the new features of version 4.2 is the ability to show animated circuits, i.e., showing voltages and current flow with dynamic symbols and colors. To see an example of this click <a href="v4_animation.htm">here</a>. This feature, while very useful, does take up a significant amount of computing power as it redraws the circuit wires with each simulation interval. If you value speed over visuals, you can tu rn off the animations (which are on by default) by going to the respective simulation setup dialog and unchecking ALL the options in the "Schematic State Display" area. |
||||||||||||||||||||||
<a name="q17">Workshop</a>
used to work fine but now crashes immediately upon starting.What can I do? |
Version 4.1.2 and earlier: This is probably due to Workshop
saving a corrupted autosave circuit in the previous session.
Now when you try to start Workshop, it tries opening the
corrupted circuit and is crashing as a result. To get
around this, you'll have to remove the setting that tells
workshop to try to open the autosaved document. To do
so, run the Registry Editor by going to the Start menu
and selecting "Run...". Type in "regedit' to run
the registry editor. Navigate to the "HKEY_CURRENT_USER\Software\Beige
Bag Software" branch and look for the "B2 Spice A/D v4
Pro" folder. Click on that to highlight it and then press
the delete key to delete it. Close the registry editor
and try rerunning Workshop. If it still crashes, please
see the note <a href="#q16">below</a> before contacting
us.
Version 4.1.3: The application now prompts the user before loading autosaved circuits. If you choose to load the autosaved circuit, and the program crashes while loading it, then run the program again and choose NO, i.e. don’t load the autosaved circuits. |
||||||||||||||||||||||
<a name="q16">Workshop</a>
crashes whenever I start the program, open a circuit,
print, or at other odd times. What's going on and
what's the fix? |
We've
had scattered reports of problems of this nature with
A/D v4. From our investigations, it seems that the problem
can be traced back to either old buggy printer drivers
or printer drivers that are conflicting with our program.
In one case, the problem was related to a old buggy video
driver.
and what to do about it, click <a href="adv4_pnt_prblms.htm">here</a>. |
||||||||||||||||||||||
<a name="q1">I'm</a>
looking for a certain part and it just isn't in the database.How do I get it? |
While
we strive to have as many parts from as many manufacturers
as we can, some parts just aren't available as Spice Models.
If you know a certain part from a certain manufacturer
is available but isn't in our database, you can import
it yourself. Please refer the the help file and
do a search for "Creating a Device from a Subcircuit
Model Using the New Device from the Text File feature".
If you're having problems, let us know and we'll try to
help. If you're not sure or just curious if such
a part exists, drop us an <a href="mailto:thien@beigebag.com">email</a>
asking so. We'll look into it and get back to you. |
||||||||||||||||||||||
<a name="q2">I've</a>
imported a model using the Database Editor and have set
it up correctly. When I try to simulate how come
I get "unknown parameter" errors in the log
window? |
More
often than not, the problem is that the model you've imported
is not Berkeley Spice compatible. The Database Editor
can convert older Berkeley Spice format but it can't convert
from PSpice, IBIS, and some other formats to Berkeley
Spice. So if you're having this kind of error, then
<a
href="mailto:thien@beigebag.com">email us</a> about it and include the
model text. We'll see if we can't get something
working for you. |
||||||||||||||||||||||
| <a name="q3">How</a> do I set up a time dependent switch? | A
time dependent switch has been added in A/D 2000 version
3.0.2. You can upgrade from our tech support page
at <a
href="http://www.beigebag.com/tech.htm">www.beigebag.com/tech.htm</a>.
For users who haven't done so yet here's how to set up
such a switch:
You will need to set up two circuits - one will be your main circuit containing the switch and the other (independent) circuit will contain a simple voltage source set up as a Piece-Wise Linear source and set the change time to whatever you wish and the change voltage to 1. In your main circuit, use a voltage controlled switch and set its controlling source as the PWL voltage source. When the PWL changes to 1 volt, then the switch should close. |
||||||||||||||||||||||
<a name="q4">When</a>
I run a simulation, I get errors in the log file that
say "no
such subcircuit: XXX". What's going on? |
In
versions 3.0.1.1 and lower. Some parts in the database make calls to external (not inside its own subcircuit) subcircuits or models. For one reason or another, the part can't find these external subcircuits and reports the errors that you see in the log. There are actually 2 problems and workarounds.
<p>Users of B2 Spice A/D Lite who don't have the
Database Editor that is necessary in adding the missing
subcircuits should <a
href="mailto:info@beigebag.com">contact us</a> for further instructions.
This problem should be fixed up in the next revision release. |
||||||||||||||||||||||
<a name="q5">Im</a>
getting "Timestep too small" errors in the logwindow. What am I doing wrong? |
The
most common problem is that the transient simulator is
giving up too easily. You need to increase the Upper Transient
Iteration Limit (ITL4) in the Convergence Options dialog
box from 10 to 100. If this doesnt solve the problem,
then try 1000 for itl4. If it still doesnt work,
then follow these steps.
|
||||||||||||||||||||||
<a name="q6">Im
</a>getting "Iteration limit reached" errorsin the log window. What can I do to fix it? |
See above- the same advice should help fix the problem. | ||||||||||||||||||||||
<a name="q7">Im</a>
getting "Singular Matrix" errors in the logwindow. What can I do to fix it? |
See above- the same advice should help fix the problem. | ||||||||||||||||||||||
<a name="q8">Im</a>
getting "GMIN/Source Stepping failed" errorsin the log window. What can I do to fix it? |
See
above- the advice for getting the operating point analysisto converge should help fix the problem. |
||||||||||||||||||||||
<a name="q9">I
have</a> an oscillating circuit that does not simulateproperly. What can I do to fix it? |
First,
set initial conditions in the circuit. You can do this
in either of two ways. The recommended method is to place
markers in the circuit and set the initial voltage of
the markers by double clicking on the markers and entering
values for initial voltage and then checking the box to
use initial voltage. Some oscillating circuits require
an initial state that is not symmetric. Also, in the transient
simulation set-up window, check the box for Use Initial
Conditions.
If this does not get the circuit to work, then follow the advice in the item above on getting the circuit with switches to simulate. </font></td> </tr> | ||||||||||||||||||||||
<a name="q10">How</a>
do I perform a temperature sweep?</td> | Set
up a DC Sweep and use temperature as the source name and
leave the property name blank. However, not all parts
are temperature dependent by default. For example, you
must use temperature dependent resistors and set their
TC1 and TC2 parameters in order for the resistor to vary
with temperature. Also, leave the instance-specific temperature
blank if you want the temperature of that instance to
be swept. If you specify the temperature of a resistor,
for example, then the program keeps the temperature of
that resistor at that fixed value even while the temperature
for the circuit is sweeping.
<p>The
same principals apply when performing parameterized
transient and ac sweeps with temperature as the parameter.
</td>
</tr>
| ||||||||||||||||||||||
<a name="q11">How</a>
do I examine a specific component as it heats up?</td> | Perform
a dc sweep analysis, a parameterized ac sweep, or a parameterized
transient sweep depending on whether you want to observe
the changes to the dc characteristics, ac characteristics,
or transient characteristics of the circuit.
<p>Use
the device name whose temperature is to be swept for
the source name and the parameter named "temp"
if it is available for the property name. If you are
sweeping a resistors temperature, then make sure
that it is a temperature dependent resistor and give
it TC1 (and possibly TC2) values.
</td>
</tr>
| ||||||||||||||||||||||
<a name="q12">The</a>
displayed sine wave signal looks choppy. Can I smooth
the shape of it?</td>
| Yes,
using the Step Ceiling parameter in the transient simulation
set-up window. The shape of the curve is influenced
by the TMAX parameter. You can set the TMAX parameter
as approximately 1/16 of period of a voltage or current
source signal. </td>
</tr>
| ||||||||||||||||||||||
<a
name="q13">How</a> do I export the results of an analysis to Excel?</td> |
<p>Alternatively, you can select all of the text in the
table, then copy it, then open Excel and paste into
a worksheet.
</td>
</tr>
| ||||||||||||||||||||||
<a name="q14">How</a>
do I probe a current in the circuit?</td> | You
can splice an ammeter into any wire before running the
simulation and the graph will automatically show the current
for that ammeter.
<p>After
the simulation has been run, choose Edit Plot List from
the graphs menus and look through it for any signals
starting with I(. These are currents and
you can add them to the graph. Also, in More Simulation
Options, you can Generate Extra Signals. This will add
internal transistor currents and other internal device
currents to the list of plots available for viewing.
</td>
</tr>
| ||||||||||||||||||||||
<a name="q15">How</a>
do I measure the power across a device?</td> | Place
an ammeter in series with the device and place a voltmeter
across the device. After the simulation is complete, edit
the plot list, and add a plot named power and give it
the expression v(voltmeter) * I(ammeter) with the voltmeter
string replaced with the actual voltmeter name and the
ammeter string replaced with the actual ammeter name.
<p>In
the case of an ac circuit analysis, you will need to
take into account the fact that the signals are complex.
B2 Spice A/D will take care of the complex multiplication
behind the scenes for you, but you will still probably
want to take the magnitude of the power: mag(v(voltmeter)
* I(ammeter))
</td>
</tr>
</table>
</center>
</div>
<p>
</center>
</div>
<p align="center">
</td> </tr> | ||||||||||||||||||||||
</td> </tr> </table> </body> </html> |
|||||||||||||||||||||||