EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Hawaka on September 03, 2022, 09:53:24 pm

Title: Interactive simulation software?
Post by: Hawaka on September 03, 2022, 09:53:24 pm
Hello,

Does anybody know a free, not cloud-based, interactive simulation software? What i mean by interactive is that, for exemple, while simulating a buck converter I can put a slider to control the duty-cycle and I can watch what append when moving it while the simulation is running continuously.

I do not need deep modelling of ltspice, my main focus is switching circuit. Something like Plecs would work but it's not free and I don't think it's interactive as I wish.
Title: Re: Interactive simulation software?
Post by: tooki on September 03, 2022, 10:05:17 pm
What about the offline versions of Falstad? I’m guessing Falstad’s web app is why you specified “not cloud based”, but it’s frankly the best interactive simulator I’ve found for analog circuits. It’s likely you never noticed that there’s an offline version of it available.

For digital logic simulation, there are numerous programs, like Logisim (especially Logisim evolution).
Title: Re: Interactive simulation software?
Post by: Hawaka on September 04, 2022, 02:41:48 pm
I'll surely check more deeply Falstad, thanks for the advice. It will take me some some tho, as the PWM timing I need to implement is quite complex.
Title: Re: Interactive simulation software?
Post by: RoGeorge on September 04, 2022, 02:55:54 pm
Not continuously running, but with sliders, QucsStudio:  http://qucsstudio.de/ (http://qucsstudio.de/)

Free to use, offline, and works for Windows, Linux (with WineHQ) and FreeBSD.  Should work on Mac, too (with WineHQ), but I didn't try.  This was recorded on Kubuntu:

https://www.youtube.com/watch?v=fYs7ZoVyPmM (https://www.youtube.com/watch?v=fYs7ZoVyPmM)

https://www.eevblog.com/forum/eda/qucs-qucs-s-and-qucsstudio-simulators-are-not-the-same-thing/ (https://www.eevblog.com/forum/eda/qucs-qucs-s-and-qucsstudio-simulators-are-not-the-same-thing/)

Title: Re: Interactive simulation software?
Post by: macboy on September 04, 2022, 03:18:53 pm
LTSpice isn't interactive but I do use dynamic parameters all the time. First I create a voltage source. Label the output node as e.g. Vx, then a resistor can be defined with value of e.g. R={1000*V(Vx)}. I usually configure the voltage source as a pulse with a slow rise and fall time, and on/off voltage as desired. Then that resistor (or anything else) can sweep through a range of values during the simulation. Very useful for a load resistor on power supplies, a set resistor for voltage or current set point on a power supply or load, etc. By changing from a slow sweep to a fast transition, you can also test dynamic or step response, revealing overshoot, ringing, and other nasties.
Title: Re: Interactive simulation software?
Post by: ebclr on September 04, 2022, 03:34:34 pm
The demo version is free, and it's possible to do a lot of things,

https://www.labcenter.com/ (https://www.labcenter.com/)
Title: Re: Interactive simulation software?
Post by: Nominal Animal on September 04, 2022, 06:57:41 pm
Not continuously running, but with sliders, QucsStudio:  http://qucsstudio.de/ (http://qucsstudio.de/)
The author claims but refuses to prove that "all code in QucsStudio is written by the author".  Yeah, right.  I'd consider it pirated software.  (It looks like Michael Margraf wanted to monetize Qucs, but found that the other contributors to Qucs (Mike Brinson and Vadim Kuznetsov in particular) would not give him the copyrights nor let him change the license from GPL, so he "forked" QucsStudio.  Nobody knows how much GPL'd code by other authors he's put into it.)

A typical case of "I thought I could change the license to proprietary later on, now GPL is stealing my money, bwaah!".  :palm:

Just remember this when the QucsStudio author demands money from you.
Title: Re: Interactive simulation software?
Post by: Hawaka on September 04, 2022, 07:25:15 pm
LTSpice isn't interactive but I do use dynamic parameters all the time. First I create a voltage source. Label the output node as e.g. Vx, then a resistor can be defined with value of e.g. R={1000*V(Vx)}.[…]

I'm aware of LTSpice parametrics, but I find that for switching circuit it's not the best one. Most of the times the models are too complex and it really slow down the simulation. Reverse leakage current of a diode does not interest me when I'm trying to see if my PWM timing are right.
Title: Re: Interactive simulation software?
Post by: Someone on September 04, 2022, 10:11:39 pm
LTSpice isn't interactive but I do use dynamic parameters all the time. First I create a voltage source. Label the output node as e.g. Vx, then a resistor can be defined with value of e.g. R={1000*V(Vx)}.[…]
I'm aware of LTSpice parametrics, but I find that for switching circuit it's not the best one. Most of the times the models are too complex and it really slow down the simulation. Reverse leakage current of a diode does not interest me when I'm trying to see if my PWM timing are right.
Sounds like you need to take more control of the simulation circuit and its models, rather than just recreating the actual circuit 1:1.
https://www.analog.com/en/technical-articles/ltspice-simple-idealized-diode.html (https://www.analog.com/en/technical-articles/ltspice-simple-idealized-diode.html)
Switching regulators have settling issues so you're never going to get an immediate interactive environment. Faster simulation methods dont have pretty trace outputs to look at (as they slow down the computation).
Title: Re: Interactive simulation software?
Post by: macboy on September 05, 2022, 02:10:49 am
If you want direct control over duty cycle, drive the switching device with a voltage source, set to pulse, with period and rise fall times set appropriately. Set the On time to an expression like {V(Vx)/period} so you can control that with another voltage source which you can set up to change at will throughout the simulation.