Keyboard Shortcuts
Likes
Search
FFT Resolution
Actually I think we are in complete agreement. ?I just misunderstood the intent of what you wrote before. ?My bad.
Regards,
Andy |
Good Day? John? I am a simple soul? ( BTW maybe we are both Brits ) If one conducts an FFT on a pure sinewave in theory there should be a single spike of infinite height and zero width.? The more the spike departs from those unattainable ideals shows the accuracy of the process.? What I have seen in LTPSPICE is far off and essentially useless? I hope to be shown the errors of my ways |
Please define "far off" and "essentially useless". I have not found either to be the case. Jim Wagner Oregon Research Electronics From: ronw6wo@... To: LTspice@... Sent: Tuesday, December 17, 2013 10:28:47 AM Subject: Re: [LTspice] Re: FFT Resolution Good Day? John? I am a simple soul? ( BTW maybe we are both Brits ) If one conducts an FFT on a pure sinewave in theory there should be a single spike of infinite height and zero width.? The more the spike departs from those unattainable ideals shows the accuracy of the process.? What I have seen in LTPSPICE is far off and essentially useless? I hope to be shown the errors of my ways |
¿ªÔÆÌåÓýYour second assumption is wrong.? An FFT is a finite-length, discrete approximation to the continuous time Fourier Transform.? Read about windows perhaps starting with
? Because the FFT is finite-length, you always have some window function whether you like it or not.? ? ? From: LTspice@... [mailto:LTspice@...]
On Behalf Of ronw6wo@...
Sent: Tuesday, December 17, 2013 10:29 AM To: LTspice@... Subject: Re: [LTspice] Re: FFT Resolution ? ? Good Day? John? ? I am a simple soul? ( BTW maybe we are both Brits ) If one conducts an FFT on a pure sinewave in theory there should be a single spike of infinite height and zero width.? The more the spike departs from those unattainable ideals shows the accuracy of the process.? ? What I have seen in LTPSPICE is far off and essentially useless? ? I hope to be shown the errors of my ways
|
ronw6wo?wrote, "
It will have finite height, not infinite. ?The finite height is related to the amplitude of the sine wave.
Zero width isn't quite true either because the FFT is discrete in the frequency domain. ?Ideally (when done properly) it will "fill" only one "slot" in the frequency domain and not the adjacent slots. ?In that sense, your intent is probably correct; but it technically isn't zero width.
"What I have seen in LTPSPICE is far off and essentially useless"
Then perhaps you should try Mike Engelhardt's sinewave FFT example in LTspice's Help pages. ?Start Help, go to: ? Waveform Viewer > Waveform Arithmetic and scroll down to the bottom. ?Notice that there is one narrow spike in the FFT's spectrum. ?He uses a SPICE Netlist, but it's almost a no-brainer to replicate that as a schematic. ?Or you could type it in as a Netlist (LTspice accepts those too).
Regards, Andy |
John Woodgate
In message <l8q4um+1ikvaao@...>, dated Tue, 17 Dec 2013,
ronw6wo@... writes: I am a simple soul? ( BTW maybe we are both Brits )I am, I don't know about you. (;-) The height is just the voltage; not infinite. The width would be zero if the sine-wave started at the Big Bang and went on till the Big Crunch. A sine wave of finite duration doesn't have a precise zero bandwidth. Having said that, if you do a FFT on exactly a whole number of cycles, the result is the same as for the truly infinite-duration signal. But since it is a digital process, the apparent width of the line is limited by the bit-depth. Similarly, the line width in an analogue Fourier analysis is limited by the settling time of the analogue filter. The FFT can give useless results if it's not set up correctly. That's why I spent some time trying to get a clear statement of the process. I've now filed that for future reference: LTspice FFT resolution settings To get x Hz resolution, you should, in practice, simulate for 2/x seconds. You can simulate for longer to get a clearer spectrum display, say N/x seconds. To get a spectrum up to X Hz, you then need more than 2*N*X/x samples, preferably the next higher power of 2. -- OOO - Own Opinions Only. With best wishes. See www.jmwa.demon.co.uk Nondum ex silvis sumus John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK |
It is also really important to have compression off! Jim Wagner Oregon Research Electronics From: "John Woodgate" To: LTspice@... Sent: Tuesday, December 17, 2013 11:20:02 AM Subject: Re: [LTspice] Re: FFT Resolution In message , dated Tue, 17 Dec 2013, |
?
toggle quoted message
Show quoted text
No it is not useless, because all FFT algorithms
have errors because necessarily the precision of the floating point arithmetic
is finite. There are many such FFT algorithms all based of discrete Fourier
transformation. The computation yielding transformation from time domain to
frequency domain - the spectrum- requires complex number arithmetic thus one has
so tos speak a double limitation?due to?finite precision of floating
point arithmetic. Especially a pure sine has a very narrow Fourier integral thus
requires precision far above the precision of a for ex. double variable
type.
?
?
?
|
Yes? I can appreciate there are various? sources of inaccuracy? Those? I have seen are not even close to a narrow band response.for example 1.5 MHz at 14MHz, similar bandwidth % at 1kHz If someone can send me the set-up details to show what is possible for a simple square-wave it would be enormously helpful? |
ronw6wo wrote, "If someone can send me the set-up details to show what is possible for a simple square-wave it would be enormously helpful". I uploaded two examples to the "Temp" folder; one with a 1 kHz square wave and one with a 10 MHz square wave. I played around a bit with the Maximum Timestep but for these square waves it seems to have very little or no effect, so in the end I just left it alone. Andy |