Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Many years ago I helped write https://www.multisim.com

It's a full SPICE based simulator done entirely clientside



Cool, thank you for sharing.

I am interested in simulators, especially in simulators of analogue circuits. Do you have any recommendations on where to start reading about algorithms that lie at the core of simulators?

Also, how was the experience developing such product with JS?


Author of the CircuitLab https://www.circuitlab.com/ (YC W13) mixed-mode (analog and digital) simulation engine here. The "core algorithm" is probably LU decomposition on a sparse matrix: https://ultimateelectronicsbook.com/systems-of-equations/#lu... .

I answered a similar question on Electronics StackExchange where someone asked about how to build a circuit simulator: https://electronics.stackexchange.com/a/394069

From a software developer perspective: lots and lots and lots of automated tests, each of which builds a circuit, runs a simulation, and makes sure we don't see any behavior regression. More lines of code in tests than in the core simulation engine or device models!


I have been using the falstad sim for years in the developement of analog synthesizer stuff. There are some circuits that work in practise that do not work in practise (e.g. relaxation oscillators with a schmitt-trigger inverter). The model oscillates, but it is not really controlable.

Outside of that most simpler stuff (e.g. analog math using opamps, discrete stuff) works perfectly fine. I love it for education and quick "sanity check" simulations.


As /u/compumike mentioned the core spice algorithm is an LU decomposition and solve of a large matrix. Not sure what a good resource these days would be; it's been many years since I worked on this.

The JS experience wasn't great. We used emscripten and the tooling barely worked for the simulator core. The rest of the app wasn't bad, but we used polymer / webcomponents which was a big mistake IMO


Continuous System Simulation by Cellier/Kofman [0]. The focus is mainly on Modelica, but analog circuits are a "special case" of this.

[0] https://www.amazon.com/Continuous-System-Simulation-François...


The source code has the following comment:

For information about the theory behind this, see Electronic Circuit & System Simulation Methods by Pillage


https://www.ni.com/en-au/shop/electronic-test-instrumentatio...

It looks nice but Jesus... $1550AUD a year for the designer edition?


Library curation is a massive amount of work. Pretty much the reason I end up using falstad instead of a SPICE is because I end up spending all day tracking down and debugging issues with simulation models.


Yeah, these kinds of tools aren't cheap. I know really high end stuff can be > $100,000 per seat per year




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: