Help with transient response of current sourced circuit SOLVED

Hello,

I'm trying to model the transient response of the relatively simple circuit shown below. It is current sourced with a couple capacitors and resistors.

I can model the charging portion just fine, but when I add a voltage compare switch, it can't handle it. I'm guessing it has to do something with an infinite spike somewhere when the switch closes, but my limited circuitry knowledge is failing me.

Here's the circuit. You can see it fail by running the time domain simulation.

Any suggestions?

Thanks

by JackNewlin
January 17, 2013

Hi Jack,

Sorry, no answer, but questions:

  • What is the purpose of your circuit?

Current sources here are “ideal current sources”, thus they drive (here 750A) regardless of the voltage they’d need and the circuit’s resistance, thus all your cap charging is pointless here.

  • Is shorting the 750A and the 25A source what you want to do?

  • Caps with 17+ kiloFarad are quite big, hmmm … ???

The TDS has some “quite reasonable” (?) strange effects (I call that a bug), thus you should not start with an ideal source.

For some info see: https://www.circuitlab.com/forums/support/topic/kq6zmn6f/loading-a-capacitor/

Regards, Sancho

by Sancho_P
January 17, 2013

Hi Sancho,

This is actually a representation of a thermal system I'm modeling. Amps are analogous to Watts, volts to temperature differential (K or C), resistance to K/W, and capacitance to J/K.

So the ridiculously large caps come from the heat capacitance of a vessel and the liquid contained inside. The far left "ideal current source" was the easiest way to provide a constant heat source, and the other current source represents heat loss. The switch is supposed to be an easy way to "turn off" the heat source by shorting it to ground when a specific temperature differential (voltage differential) is met. This would let the heat capacitors discharge to ambient temperature (ground voltage).

Maybe this additional information will help?

Maybe there is a way to model my heat source as a voltage source instead, I agree that would be a better start.

Thanks, Jack

by JackNewlin
January 17, 2013

I think the problem is that you've hit the end stops of CL's numerical dynamic range.

The error message is warning of a non-finite range.

That suggests that something is being divided by something else and the result is too big to be expressed as a valid numerical value. As far as the computer - or maybe the CL code - is concerned, it is infinite.

You have enormous capacitor and current values with relatively very small resistances - including some that are zero in the components - together with a very long simulation time and, more importantly, Time Step.

Although not directly applicable to CL:

Chapter 8 Convergence and Accuracy

Transient Analysis:-

What Causes Non-convergence?

in:

http://www.simetrix.co.uk/Files/manuals/7.0/SimulatorReference.pdf

will give you some good info.

Now, I'm not sure if it's is what you're expecting but this runs:

https://www.circuitlab.com/circuit/ct45wz/charge-and-discharge-scaled/

What I've done is scale the circuit:

i) divide the capacitors by 1G (1e9);

ii) multiply the resistances by 1G;

iii) divide the currents by 1k (1e3);

iv) divide the times by 1k

That reduces some of the absolute values and probably more importantly reduces the derivatives (dV/dt, dI/dt etc.).

by signality
January 18, 2013

Post a Reply

Please sign in or create an account to comment.