Hey Community,
has anybody of you -ever- got an FFT Plot to work in KiCad? I am a “migrant” from LTspice, and FFT Analysis was (is…) my daily bread. I tried several things to make KiCad understand, what i want, but i failed … It seems NGSpice is able to do the trick, but KiCad is not.

If it is generally impossible (i assume this), because it is not (currently) supported, then please consider this post as my add to the famous “wishlist”.

Best Regards…

What’s special about an “FFT Plot” as opposed to an AC Plot?

What version of KiCad do you run?
In the nightly (development, unstable) it is “built in”, but in the stable 7.0-series you have to run ngspice externally in order to create an FFT-plot.

AC is magnitude/phase response and is purely linear (ie, non-linearities like clipping at a rail is not seen). FFT is crunched on a block of time-domain levels on a signal trace, and will show such non-linearities.

Ah.
So using the IAM/VAM, IPULSE/VPULSE, IPWL/VPWL, ISFFM/VSFFM etc. plus custom sources for simulation make no sense in AC simulation?
Open question, I’m still in the learning phase here.
Thanks.

For using fft with external ngspice, there is an (KiCad 6) example at Simulation examples for KiCad/Eeschema/ngspice - #4 by holger, project “Using the 555, a police “Dee-Dah” Siren”.

ac
Calculate an operating point of the circuit (according to given dc bias)
Linearize all circuit elements at the operating point (done automatically.
Inject an ac signal, given by source V node11 node12 dc 0 ac 1 …, irrespective of what has been given in …
Evaluate the response at every node, best evalluated relative to input signal, therefore ac 1, outputs are given by magnitude and phase.

fft
Run a transient simulation (node outputs versus time)
(Linearize to achieve uniform time steps, command given by user, not always necessary)
Run fft (Evaluate all frequency components in the tran signal, get output versus frequency)
Evaluate output versus frequency.

Quote:

What version of KiCad do you run?
In the nightly (development, unstable) it is “built in”, but in the stable 7.0-series you have to run ngspice externally in order to create an FFT-plot.

Could you please elaborate on that? What do you mean with “built-in” - does it work like in LTspice? Do you have a screenshot? I won’t mess with nightly builds on my fresh linux, until i am 100% sure, that it will do, what i want.

One more Comment: Hijacking threads is not a fine thing to do, its a serious forum disease - anyways… ( - I formulated a clear question. Anyways…Thanks hmk for considering a useful answer…

After a bit of search, i found this by myself. I guess, this is what hmk means with “built-in”.

Hey: Question answered. Somebody -actually- GOT it to work. V7.

Yes, that’s what it looks like in the nightly development version (7.99).

Yes, that’s 7.99 (aka 8.0 pre-release), not 7.0.

Can you, please, show the steps how to make this FFT plot?

Hi I had the same problem and since you did not mention your solution even though you were kindly answered by the community I am going to describe the solution.

You need to use Global Labels for the FFT of the signals you want to plot (This could be improved in the future, because there is not a reason for a particular labeling type). However I only manage to make it work for voltages and I could not find a workarround for currents.

One more Comment: Pedantic replies are not a fine thing to do, its a serious forum disease - anyways… ( - Thanks @Hagverde for considering being a little more humble…

1 Like