[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Why the current is negative(of ngspice)?



al davis wrote:
>> Yang Hawk wrote:
>>> and How could I check current between any two nodes?
> 
> On Saturday 17 May 2008, Dan McMahill wrote:
>> I'm assuming you mean "how could I check current in any
>> branch".  You can insert a zero volt DC voltage source in any
>> branch and monitor the current through it.
> 
> In gnucap, just ask for the current ..
> 
> .probe tran i(d1) ij(d1) ic(d1) ic(q1) ie(q1) ice(q1) 
> 
> or whatever ...
> 
> i(d1) = total current  (ij + ic)
> ij(d1) = junction current
> ic(d1) = current in the diode's capacitance
> 
> ic(q1) = current flowing into the collector
> ie(q1) = current flowing into the emitter.  (probably negative)
> ice(q1) = current that flows into the collector through the 
> transistor and out of the emitter
> 
> There are lots more!
> 
> Putting zero volt sources every place I want to measure current 
> is a royal pain.

not only is it a royal pain, as far as I know you can't get the break 
out of currents in junctions with spice like Al's gnucap example here. 
In other words, I think if you want to monitor the junction current vs 
the current charging a diodes capacitance in spice you have to do 
incredibly ugly things like monitor the voltage across it and have it 
drive another diode that has a model with C set to zero and similar 
hacks.  Not at all straightforward.  In gnucap, as Al points out, it is 
simple.  This has implications for understanding noise in high frequency 
bipolar oscillators.

-Dan



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user