When doing FFT simulations, as with any sampled-data type of situation,
frequency components that appear beyond the Nyquist rate (half the effective
"sampling rate" of your FFT) are aliased (folded) back down into the Nyquist
bandwidth. For waveforms that have a large number of higher-frequency
harmonics, this can result in a confusing array of spurs to have to sort
through, many of which may have originated beyond the frequency range that you
care about.

This can be easily remedied by including a simple antialias
filter on the output of your signal of interest. Instead of plotting your circuit output directly, plot the output of the antialias filter. The attachment to this
email shows a plot of the spurs cleanup I got from using the filter in a simulation.

Note, you should ideally set the break frequency of your filter at
least a decade below the effective Nyquist frequency of your FFT, which will guarantee that
all alias components are attenuated by at least 40dB (assuming a 2-pole filter is used). To figure out your
Nyquist frequency, take the inverse of your sample spacing and divide by two.
Or, just look at your DFT spectrum; the spectrum always ends at the Nyquist
frequency. (**User beware!** Do not set the corner so low as to attenuate
signals that you really do care about!)

The "**Scalable ideal 2-pole RLC filter**" that has been described in a different "Tip of the Week" posted to this forum can be used to do the spectrum cleanup.

Another way to reduce aliasing is to increase the sample rate (i.e. by increasing the number of DFT samples taken over the same sample interval), which extends the Nyquist frequency further out, reducing the number of spurs that are aliased. This produces a proportionately larger data set, however.

- Hugh

*Originally posted in cdnusers.org by*

**Hugh**