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

Re: gEDA-user: NGSpice GUI infinite loop



On Monday 15 September 2008, Gary L. Roach wrote:
> What am I doing wrong.

I was waiting for the NGspice people to answer .. oh well..

Gnucap has a problem with this too.

There are two problems with your circuit.

The first is that there is no ground.  All simulators require 
a "DC path to ground" at all nodes.  Gnucap will fake it if you 
don't provide one, but that can lead to surprises. 

The second problem is that a bridge rectifier has a region with 
all diodes open, which may leave some nodes completely floating 
(no DC path to ground) only at some operating points.  This can 
lead to a situation where the initial DC solution works, but at 
some point the transient analysis fails.

The solution is simple .. For the first, you need something 
connecting to node 0.  For the second, probably the easiest way 
to deal with it is to increase "gmin".  Basically, it shoves 
resistors of value 1/gmin all over the place to avoid this 
problem.  The default value of gmin is 1e-12, which means to 
put resistors of 1e12 everywhere.  This is a good value to use 
for small signal and MOS circuits that are most common.  For 
power supplies, the impedances are lower and currents are 
higher, so you can increase it (which decreases the R) 
considerably.  With gnucap, I get good results if I set gmin 
to .01p (.01e-6 or 1e-8), which is equivalent to having 100 
megohm resistors everywhere.  This fixes both problems.

Someday, I need to make this automatic.

Fix this, and it works.

But there are other issues with your circuit that you may not 
realise.

You only need one ".MODEL RL201".

You are not using the "VJ" parameter correctly.  The forward 
voltage drop is set indirectly by the "IS" parameter. 
(saturation current).  A while back I posted an example of how 
to determine IS.  I need to dig it up.

What is "R200" for?

In gnucap, you can probe device voltages and currents directly.

I have started to make an example power supply, showing things 
like inrush current, capacitor current waveforms, and other 
stuff.  It is on hold.  I should be able to get back to it in a 
few days.  For the last week or so I have been tied up 
producing technical exhibits for a community radio station, 
defending our right to have a radio station.  You can't just 
apply for a license and expect to get it.  The process is 
extremely intimidating.  A blatant effort to suppress freedom 
of the press.





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