Hello folks,
I am trying to simulate a circuit at different parameter values or corners and plot them together to compare… These are transient sims. Is there a simple/elegant way to get this done?
Thanks,
Arash
Hello folks,
I am trying to simulate a circuit at different parameter values or corners and plot them together to compare… These are transient sims. Is there a simple/elegant way to get this done?
Thanks,
Arash
There is no simple/elegant way to achieve this, as he Eeschema/ngspice interface is dedicated to a single run, single plot.
A relatively simple way may be to run one simulation after the other, each time changing the parameters, save the data for each run, and then use plain ngspice to load all data and plot them together
Is this a permanent situation, or will kicad eventually support parameter sweeps & multiple plots?
I rely very heavily on comparing overlaid plots with parameter sweeps, and consider this the most important / essential feature I need from spice. Every design I run involves a dozen or more .STEP parameter sweeps, and usually a Monte Carlo (hundreds to thousands of runs). Truly a must-have feature, and I believe it’s the case for most practicing engineers.
I’m really enthusiastic about the simulation improvements in KiCad 8, but can’t replace LTspice without this.
So I hope I can appeal to put this high on the wishlist / development roadmap.
Some examples of things I do with my simulations:
Efficiency in the workflow is key.
Writing several lines of .control loop code is slow and error-prone compared to a simple .STEP statement that can be written in seconds. Same with exporting data from multiple runs to a separate program for plotting. When I’m working on a design, I need to change the .STEP parameters, click a button and see new results as fast as the sim can run them. Then iterate with a revised .STEP statement to see immediately how my changes affected the design.
I hope the utility / necessity of this kind of function is apparent.
Thanks,
Chad.
I am the ngspice developer, not a KiCad developer.
To make this feature requests aware of in the KiCad dev community, you might open an (wishlist) issue at Issues · KiCad / KiCad Source Code / kicad · GitLab.
Overlaid plots from different simulation runs are not available. This is an Eeschema issue.
Multiple plots in Eeschema have been asked for already (whishlist: support dual plot pane in simulator (#15960) · Issues · KiCad / KiCad Source Code / kicad · GitLab). You may give it a thumbs up.
.step command to stepping parameters is not available in ngspice, might be added there (my task), probably by automating the (then internal) script generation. But may also be added by Eeschema.
Monte Carlo is currently available only by ngspice scripts. Maybe integrated, but is not scheduled.
ako is available in ngspice, but has never been looked at by Eeschema.
Thank you so much for your helpful reply, it’s much appreciated.
I will look into the linked KiCad dev issues and provide my participation there as appropriate.
For future reference, should you consider adding worst-case (with optimized # of runs) or Monte Carlo functionality, the methodology I currently use in LTspice is nicely documented here: K6JCA: Monte Carlo and Worst-Case Circuit Analysis using LTSpice Perhaps this will be a useful source of inspiration if/when the time comes.
ako integration I can imagine might be a little tricky given the way Eeschema handles schematic symbol to model mapping, I’m not sure. But anyway it’s of less importance than parameter sweeps.
Regards,
Chad.
Well then, give him a bit of extra This forum keeps track of these things, and with it some measure of appreciation they get from forum users. There is a similar system on gitlab in which you can vote for issues / feature requests. Two of my proposals got transferred to a backlog due to lack of interest from users. But also understandable with 1500 open issues and developer resources being scarce.
Gitlab also already has an issue for Monte Carlo Runs with Uncertainty Shown in Plots (#17641) · Issues · KiCad / KiCad Source Code / kicad · GitLab