[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: SPICE how to?
On Saturday 16 July 2005 12:20 pm, Harold D. Skank wrote:
> I need to see the current in a particular branch of a circuit
> under SPICE simulation. I understand that a voltage source
> set to zero is supposed to be the mechanism to use, but what
> variable do I query then to view the current?
As Stuart says, in Spice you need to put a voltage source in and
probe it.
To put in another plug for gnucap .... There are lots of probes
in gnucap. You can simply probe the current in any 2-terminal
element, or any of the standard controlled sources. For a
resistor R523, ... "print tran i(r523)".
For more complex devices, you need to be more specific. For
example, a BJT, what current do you want? IC(Q3), IB(Q3),
IE(Q3) are the obvious ones. You can also probe a bunch of
internal values, including power, currents, internal variables.
You can also probe lots of stuff about each the elements that
make up the transistor, 14 of them for a fully loaded BJT. You
can even separately probe things like the current through
internal capacitances, by accessing the internal elements.
Spice-3 lets you do some of these for the operating point
analysis, with a different syntax. I don't know if it works in
ng-spice or not.