Using circuit simulating software like SPICE can be a powerful tool for modeling the behavior of a circuit in the real world. On the other hand, it’s not always necessary to have all of the features of SPICE available all the time, and these programs tend to be quite expensive as well. To that end, [Wes Hileman] noticed an opportunity for a specific, quick method for performing impedance calculations using python without bulky, expensive software and came up with a program which he calls fastZ.
The software works on any network of passive components (resistors, capacitors, and inductors) and the user can specify parallel and series connections using special operators. Not only can the program calculate the combined impedance but it can perform frequency analysis at a specified frequency or graph the frequency response over a wide range of frequencies. It’s also running in python which makes it as simple as importing any other python package, and is also easy to implement in any other python program compared to building a simulation and hoping for the best.
If you find yourself regularly drawing Bode plots or trying to cobble together a circuit simulation to work with your python code, this sort of solution is a great way to save a lot of headache. It is possible to get the a piece of software like SPICE to to work together with other python programs though, often with some pretty interesting results.
Readers might also be interested in lcapy, a more mature project along the same lines.
https://github.com/mph-/lcapy
I have done impedance calculations using MS exel. I use its equation mode where one can call up all of the functions. I write out the basic nodal and loop equations with the basic circuit laws. I enter them into exel and works great. This way, I don’t have to learn any new “tricks” etc.
I wrote something in Excel for evaluating impedance of mixed values decoupling cps over frequency. I used Excel a lot for work as I can email the files and the recipient doesn’t need to use weird tools or some training courses to play with it. I pushed for LTSpice at another place and we all end up using that a lot.
Does anybody have experience with a free (preferably python based) network synthesis software? I saw, that https://github.com/mph-/lcapy supports network synthesis. Are there any further recommendations? Thanks in advance.
BTW l used LTSpice for 2 projects for work. Both of them work as designed on first rev and passed compliance tests for EMC, power surges test at first try when I am a newbie dealing with that. I usually got assigned left field projects that no one else want to pick on and learn a lot on the job.
Unlike the narrative here, it is easy to use without coding. Learn theproper tool for simulation and not fool around as projects have real dead lines. Not sure what you are pushing here. Also for Excel for doing engineering design, my manager have no problem playing with my work sheets. Can’t say that for your python code.
Attempting to find some wise words to add here and arrived at:
“There is no spoon”
Perhaps followed by:
“I have spoken”
Maybe I need less coffee? Nobody’s pushing this as the be all and end all. It’s just thrown into the wild. I for one quite like seeing other people’s approaches, especially on a topic such as this. Quite close to my PhD topic which was math around basic circuit theory for waveform generators. While python was dabbled with, I must confess to having used spreadsheets too. They’re just so convenient and approachable. And yes, LT spice also, but usually only when I pass the node limit in SiMetrix intro.
Good work passing EMC compliance tests. Hat tipped!
LTSpice is how real engineers model analog circuits. It’s free, and it takes about 10 minutes to install.
It’s not the only tool. I use Excel too. But to call analog simulators expensive software is a mistake.
NGspice is pretty seamlessly integrated into KiCAD by default since 5.0 came out, and is pretty easy to use. You do need to use parts that have spice models available. (But in most cases, if you don’t have a spice model for a specific part you’re going to be challenged finding any other way to model it, either.)
This seems like a solution without a corresponding problem. The first simulator I used, 25 years ago, was Pspice, and it was free for students and fit on a single floppy. LTSpice, as others have mentioned, is free to everybody, and is already included in the EDA software we already have installed. Problem solved, long ago.
Berkeley SPICE is available free for Linux. In my limited experience, it is more accurate than LTSpice
Your friends are “abstol” and “reltol”