SV: Re: [sdiy] Simulating SW?
Magnus Danielson
cfmd at bredband.net
Sat Nov 19 16:29:44 CET 2005
From: René Schmitz <uzs159 at uni-bonn.de>
Subject: Re: SV: Re: [sdiy] Simulating SW?
Date: Sat, 19 Nov 2005 16:37:42 +0100
Message-ID: <437F46C6.4050600 at uni-bonn.de>
>
>
> Magnus Danielson wrote:
> > Well, not quite... you are correct in the sense that one really
> > should attempt to match the window length to an integer number of
> > periods, however this will always be difficult to do in real life,
> > but if you can come close to it and use propper windowing you are
> > probably going to get the best result.
>
> You're right of course, in a general context it isn't always possible.
> In the context of circuit simulation however, you should be able to
> choose the number of points.
Yes, I agree, within the context you should be able to do it, but it is very
important to learn when such tricks does not really ripple over to another
application of FFT. However, there is still a detail to remember, in a
simulation it may take some time for the simulation to settle, and the
transient response curve must die off sufficiently before start sampling, or
else that transient behaviour will cause similar artifacts since it is still in
action and doesn't comply with the Fourier Transform requirements for a "clean"
analysis. The devil is as always in the detail.
> > The FFT algorithm is not limited to powers of 2, I agree, but it is
> > the easiest to implement. You can acheive practically any length, but
> > if you have prime- number lengths you have problems. Powers of 2 is
> > quite nice...
>
> Yes, factoring primes is a bit difficult. :-P You would need to do a DFT...
Indeed. The computational efficiency of power of 2 FFTs is a strong reason to
keep to those numbers, even if not strictly necessary. If you can, use the
FFTW package, you will probably not come up with something better in a coffie-
break anyway. It is a quick shooter!
> > The choice of window function greatly affect the broadening, but it
> > improves relative to non-windowed data.
>
> Windowing IMO is a (sometimes neccessary) kludge to make the long time
> transform into a short time transform. (I.e. generating some sense of
> time-resolution, which the FT actually doesn't have.)
Indeed. It is a kludge, wart or whatever way you want to describe it, but it is
handy when you want to clean up and does not really care about other details.
Unfortunatly it has prohibited twisting other knobs (DFT/FFT size) which would
have helped.
> My point is that in this special case one can use the properties of the
> FFT so that one gets the same result as with a true FT of an infinitely
> long signal (which can't be technically realised due to it starting at
> t=-inf.).
For a true signal, you may start at t=0 or t=whatever... it doesn't really
care as long as you go to t=inf, if you can wait that long. ;O)
> > The longer window, the less will the artifacts at the ends of the
> > window apply. There is no absolute truth in Fourier analysis, since
> > the artifacts by its missuse cripples the data. For the FFT to make
> > good data, you must have a true integer multiples of waveform in the
> > window and when the window is extended to represent the signal from
> > -inf to +inf it shall be the same signal, i.e. transient signals or
> > non-covered amplitude changes may not apply.
>
> True, but in the context of THD measurements, you can assume (or rather
> enforce) a steady input sinewave without any transients or amplitude
> changes. So if you can perform a FFT that is essentially simulating a
> long term analysis you get the results you would expect.
Indeed. This is the implications naturally...
> > The curse with FFTs is that people don't understand the basic
> > limitations of the tool and learns to trim their setups accordingly.
>
> That goes for circuit simulations as well...
It certainly does, I could not agree more. You *NEED* to understand the
limitation of the tools before you trust them, and also learns when to trust
them and not, and what to do to tweak them into trustability. FFT and circuit
simulations are tools which are very nifty, but they unfortunatly turns off the
thinking process very quickly in the designer. I've found myself being called
into the lab to analyze things, and just by applying the right tools for the
problem I have many times been able to walk away in 5-10 min after pointing at
a screen saying "THIS is your problem - fix it!". Many times it has involved
tweaking the oscilloscope setup, at other times hauling over the spectrum
analyser, network analyser or TDR... your ability to analyse is limited to the
toolbox you know and understand.
Cheers,
Magnus
More information about the Synth-diy
mailing list