Many issues trying to simulate circuit

Just discovered this site today—awesome concept—thanks to everyone involved.

But I'm having extreme problems simulating a particular circuit. I had no problem doing a time domain sim of a simple RC circuit, but when I tried a larger one, the problems are so erratic that it would be confusing if I tried to list everything that it does that's unexpected. Here's the circuit:

https://www.circuitlab.com/circuit/y8twyx/ar-312/

I did get it to simulate a portion of the circuit's cycle (and it displayed the correct output and an internal test point I was looking at), but even then there were issues (sometimes it would give errors messages and abort, then work fine just by pressing the button again). But even doing a portion of the cycle with a coarse increment took an hour or so.

But after switching a couple of parts, then going back to the originals (the 1N4148 diodes have a V_j value of 20—should be less than 1—but it didn't matter when I made custom diodes so I put the stock ones back; I don't know if I broke something, but I never had the circuit work right after that).

One thing that's clearly wrong is if I try to do a sim of 4s with increment 1s, I get 257 measurements (one every 0.015625s) instead of the expected 4. (If I go for 20s by 1s, 1260 measurements. I tried millisecond ranges with similar problems.) Most arbitrary duration/increment pair I try cause the simulation to abort (but work fine on a simpler circuit).

Chrome Version 24.0.1312.45 beta (Mac), mostly, but tried it on Chrome Win7, similar issues, and latest Safari Mac.

by earlevel
December 31, 2012

BTW, this is a circuit I've already simulated in a native schematic capture and simulation app.

by earlevel
December 31, 2012

Hi earlevel, The biggest issue you're facing (and I faced) is that a node named +15 does not supply any voltage. a node named +15V supplies 15V (positive). I tried that with your schematic: but I think there are other issues. Unfortunately someone else more familiar with CL's quirks will have to get involved. It's a promising tool with a great need for more support. -Kevin

by khauser
December 31, 2012

Hi Kevin,

Thanks for having a look. Actually, +15 does supply +15V (check it out—make a simple circuit with a resistor to ground, label the free-end node +5 or whatever, and measure it).

Which brings up a point. I didn't know the node naming had that behavior (other than naming), and my first try was to have voltage sources which I chose to name +15 and -15 instead of say, Vcc...the simulation crashed, and as a guess I removed the voltage sources and measured, and found the node behavior...maybe the node should have different highlighting or something when supplying voltage.

Nigel

by earlevel
December 31, 2012

Hi Nigel, CL does have a lot of quirks (in fact I just posted a separate issue about it).

It's such a great concept I really hope they continue to improve it. Personally I wouldn't want them to spend time adding features until the existing features work better (that might be the software engineer in me...)

-Kevin

by khauser
December 31, 2012

Agreed Kevin—the concept is brilliant, and so much easier to use than what I'm familiar with (which has ugly integration with between the schematics and simulation apps).

by earlevel
December 31, 2012

BTW, Kevin, I see that you made your copy of the circuit public (listed)—I was keeping mine unlisted until it works...

by earlevel
December 31, 2012

NP, I changed it. I'll delete it in a bit (once this conversation goes stale)...

-Kevin

by khauser
December 31, 2012

On the confusion over the number of points in a simulation.

Originally CL did run the number of points as defined by (Stop Time)/(Time Step) but later that was changed:

https://www.circuitlab.com/blog/2012/07/11/simulator-improvements/

There have been other improvements:

https://www.circuitlab.com/blog/2012/08/02/80-simulation-speedup-circuitlab-browser-shootout/

but CL still seems to have some serious simulation and convergence problems with even quite modest circuits. I have pointed out elsewhere this is unbelievably frustrating, for both novices and experienced simulation tool users alike and, as Kevin has already said, really needs to be sorted out before any other features are added to CL.

:(

by signality
January 01, 2013

OK, @Signality already pointed into that direction, but let me clearly state (I’m a newbie as well, can’t explain it):

1) With Time Domain Simulation and capacitors NEVER use “ideal sources” (node +15V, CL voltage source, ….) directly to supply your circuit, simulation will fail, ALWAYS ramp up.

You have to set the start conditions. Use e.g. “+15V” and a time controlled switch (set to zero or 1ms) to supply all “Supply” nodes, or, better, ramp up the power supply using a “bench top power supply” with a PWL expression and valid Ri (e.g. 1 Ohm).

-- Otherwise capacitors will start fully loaded (I think it’s a bug, but …)

Use the forum search or e.g. see: https://www.circuitlab.com/circuit/b24363/ramped-and-glitched-signals-and-supplies-01/

https://www.circuitlab.com/circuit/gjkd5c/ntc-to-voltage-converter/

2) Always start with a small part of your circuit and simulate / test. Then next part (you may delete the other to speed up simulation, make several “New” schematics, use copy / paste).

@earlevel: Delete 3/4 of your circuit and test / simulate.

  • And: If your graph is empty you know you made a mistake ;-)

Regards, Sancho

by Sancho_P
January 01, 2013

Post a Reply

Please sign in or create an account to comment.