RLC resonant circuit

I tried to modify your RLC resonance example modyifing the value of resistance to 0 from the original 100 mohm. The output waveform on the capacitor show a decaying on the oscillation amplitude. This should not happen because with R=0 (or 1/GMAX) the oscillations should be of constant amplitude because there is no dissipative component in the circuit.

by piero.belforte
April 22, 2012

here the related screenshots

http://imgur.com/TDtCO

http://imgur.com/cFlkI

by piero.belforte
April 22, 2012

Gear integration? That damps resonant circuits ...

by signality
April 22, 2012

Hmmm ....

by signality
April 23, 2012

Actually, I'd call that a "feature".

one microhenry at 1 kilohertz has obnly 6.28 thousandths of an ohm of reactance.

Any inductor in the real world is going to have at least a thousandth of an ohm of resistance.

In addition if you did put an amp of current, you're going to get a LOT of electromagnetic radiation.

So it's not too unexpected to see a bit of dimunition of the amplitude. Even an induictor made of pure gold or silver is going to diminish a bit in amplitude from cycle to cycle.

by arduinohacker
April 23, 2012

This should be true, but I was speaking about the performance of the simulation engine, not on how to model a real inductance...

by piero.belforte
April 23, 2012

Yeah, it's a tough call, do you want your simulator to be a perfect ivory-tower simulator, or do you want it to simulate reality?

I feel bad for all the budding EE's that get a switching regulator circuit going "just fine" in SPICE but then find out that the capacitors explode because the stock room does not have any 1,000 amp capable capacitors, and that their unshielded ferrite-rod inductor blanks out AM radio reception for blocks. I'm still waiting for a version of SPICE that prints out "127dBA BANG and 0.27 grams of C3 just hit your forehead going at 4.77E+12 meters/sec".

by arduinohacker
April 24, 2012

DWS is perfect as far as you run it at small time-step (quadratic error dependence vs time step).

by piero.belforte
April 24, 2012

"do you want it to simulate reality? "

"0.27 grams of C3 just hit your forehead going at 4.77E+12 meters/sec"

Reality check:

C = 2.99E+8 m/s

Q: Reality or what?

A: What?!?!?!?

:O

by signality
April 24, 2012

Here the DWS output waveforms (R=0) for a sim time step of 100ps: https://plus.google.com/photos/118285010585894969594/albums/5734717507945270929/5734952904562328146 Persistent oscillations at the resonant frequency are generated at each edge of the square wave generator. The accuracy of the model (R=0) is critical when you try to simulate high-Q cicuits like quartz crystal oscillator...This is not a theoretical but a PRACTICAL need when you deal with this kind of circuits.

by piero.belforte
April 24, 2012

"0.27 grams of C3 just hit your forehead going at 4.77E+12 meters/sec"

... I'd configured my SPICE to print out phase velocities...... :)

by arduinohacker
April 24, 2012

So far I didn't really understand what are the actual advantages of Circuit Lab sim engine with respect a standard Spice. Someone is able to tell me something about? Is it working at fixed time step?

by piero.belforte
April 24, 2012

CircuitLab is written in JavaScript, so it runs in any modern web browser-- that includes things like iPads and iPhones and Androids, (once they get the touch interface worked out). It doesn't require any installation or setup or updating, as it's downloaded every time (I think, unless there's some cache).

It's a pretty amazing thing. When I played with JavaScript oh so long ago it was just a little and fragile toy language.

by arduinohacker
April 24, 2012

Thanks, but I continue not to understand what are they algorithmic advantages with respect Spice...

by piero.belforte
April 25, 2012

I understand that the problems with the solver are understood by the authors and are being worked on.

I expect other issues to be resolved and new features to be introduced as time permits.

:)

by signality
April 25, 2012

Andy, thanks, this is the answer I espected. Now I know more about CL... I agree, this can be a tool for hobbysts not yet at professional level. It's pretty good from a UI point of view, for the forum, the schematic entry capabilties and so on... What I do not understand yet is the reason why CL didn't choose Spice as sim engine...

by piero.belforte
April 25, 2012

SPICE was originally written in FORTRAN, then translated to C. It's a huge mess of code. There is no clear and easy path from that rats-nest of code to something that can run in a browser-- there is a huge gulf between old-style C and Javascript. The CL folks wisely started from scratch, with maybe a few peeks at the original SPICE code to get a general idea how to do things.

by arduinohacker
April 25, 2012

Yes, but at present I see only drawbacks with respect Spice...

by piero.belforte
April 25, 2012

It's not as powerful or as correct as SPICE, but it has some advantages for use in a beginning EE course, or if you can't for some reason you only have access to a web browser, not a full-blown PC.

For instance my local library has a few dozen PC's configured as web browsers, so you can use CL on them, but you're not allowed to install software like SPICE on them.

by arduinohacker
April 25, 2012

Ok, thanks, now I got a more detailed figure on how is your tool. I love very much its GUI, even if the sim engine has the above mentioned limitations. In case you need some specific comparison with my tool DWS (that will be soon available on the market) feel free to ask me about.

by piero.belforte
April 26, 2012

Here some artistic ouputs of DWS:

http://www.youtube.com/watch?v=ZWgNsz4_mxY

by piero.belforte
April 28, 2012

Post a Reply

Please sign in or create an account to comment.