4 ms·
I'll throw my hat into the ring as well. I have also recently been building a small signal AC analysis circuit simulator [1]. The main idea behind it is to conv
by sleavey 8y ago
I'll throw my hat into the ring as well. I have also recently been building a small signal AC analysis circuit simulator [1]. The main idea behind it is to convert a closed source tool that has been around for years within the LIGO scientific collaboration to one that is open source and implemented in Python. It's almost functionally complete, can simulate transfer functions and (accurate) noise from op-amps, resistors, capacitors and inductors in circuits with current or voltage sources. There is a library of popular op-amps for which we've measured the noise, open loop gain and various other parameters, available to be simulated with.
[1] https://git.ligo.org/sean-leavey/circuit https://git.ligo.org/sean-leavey/circuit
- zokier 8y agoIs there some fundamental differences between this and the more established simulators like (ng)spice and QUCS? Trying to understand the rationale of building your own
- sleavey 8y agoWhen LISO (the tool my project is based on) was first made, SPICE simulators couldn't properly handle "realistic" op-amp parameters, like finite open loop gain, strange phase shifts due to output impedance especially of FET-based op-amps, realistic noise, stability of circuits containing feedback loops, etc. Furthermore, SPICE models provided by manufacturers typically don't represent the real behaviour of their op-amps, especially when it comes to noise, so the idea was to build a tool to which you can give arbitrary, perhaps measured, noise spectra. LISO also contains a brilliant fitting routine which can take a measured transfer function or noise spectrum and fit circuit parameters (e.g. op-amp noise, resistor values, etc.) to the data. It first uses some standard fitting algorithm (e.g. Nelder-Mead) to get close to the possible minimum, then uses a custom optimisation in log space to get the global minimum. If I remember correctly the author published a paper on this, and I can try to find it if someone is interested.
- AYBABTME 8y agoLooks pretty cool but the input is pretty esoteric to a newbie like me: https://git.ligo.org/sean-leavey/circuit/blob/master/examples/liso/liso2.fil https://git.ligo.org/sean-leavey/circuit/blob/master/example... Same thing about the output format: https://git.ligo.org/sean-leavey/circuit/blob/master/examples/liso/liso1.out https://git.ligo.org/sean-leavey/circuit/blob/master/example... Is this a custom file format or a well known one? Also, the references to LISO are all behind a user/password wall, which makes it hard to learn: https://wiki.projekt.uni-hannover.de/aei-geo-q/start/software/liso#download https://wiki.projekt.uni-hannover.de/aei-geo-q/start/softwar...
- avip 8y agoIt has a familiar Fortran/Academia/FEM solver vibe. This is very, very likely a format inherited from a Fortran code.
- sleavey 8y agoAh, that might be the inspiration. The author used FORTRAN for other projects.
- sleavey 8y agoThanks for taking a look! > the input is pretty esoteric to a newbie like me Yeah, those input and output files are what LISO uses. This was developed between around 1995 and 2010, and was built mostly to solve specific problems the original author was having with circuits and not as a generic tool, hence the syntax. You can avoid using this syntax at all as everything gets parsed into Python objects - see e.g. [1]. > Is this a custom file format or a well known one? Custom. It's similar to a SPICE input file, but not identical. The author told me that he didn't know about parsing algorithms like Lex/Yacc when he wrote it, otherwise it might have been nicer. > the references to LISO are all behind a user/password wall Sorry about that. As I said, this was a tool used internally within the collaboration for many years. I am working on getting at least the manual made publicly available, but there are some proprietary libraries with unclear licences preventing public release of the binary and source code. Ideally, eventually my Python project will replicate all of the features of LISO and we won't even need the old binary any more. EDIT: if you like, I can send you the manual and binary for LISO to the email in your profile - let me know. [1] https://git.ligo.org/sean-leavey/circuit/blob/master/examples/native/circuit1.py https://git.ligo.org/sean-leavey/circuit/blob/master/example...