# Judging the output of a filter - FFT

Discussion in 'General Electronics Chat' started by atferrari, Jan 28, 2015.

1. ### atferrari Thread Starter AAC Fanatic!

Jan 6, 2004
2,672
785
A square signal (variously pre-filtered / buffered), enters the same type of filter trying to get the best approach to a sinewave of 3960 Hz. (corrected)

For four different topologies, LTSpice gives the attached FFT. My questions:

Which one is the best in terms of purity no matter if that "best" is still a poor one? Could anyone tell briefly what are the main points to know which one is?

How do you judge the height of the harmonics against the height of the fundamental? Or is it the wrong way to see this?

Last edited: Jan 28, 2015
2. ### crutschow Expert

Mar 14, 2008
13,520
3,386
Yes, you want to determine the height of the harmonics relative to the fundamental. The lower the relative value of the harmonics, the better.
To do that, enlarge the part of the display with the fundamental and the harmonics of interest to get better resolution.
Then double-click on the signal node name at the top of the display to get two cursors.
Move one cursor to measure the fundamental peak and the other cursor to measure the harmonic of interest.
The display box will also show the difference between the fundamental and the harmonic value which you can convert to a distortion percentage if you like.

3. ### atferrari Thread Starter AAC Fanatic!

Jan 6, 2004
2,672
785
Gracias for replying Carl...and so fast!

Additional question: A dB value of the fundamental, is it expression of what? Maybe comparison against the total of power (!) involved? If this is ridiculous, sorry. My first steps in all this.

Could you outline that briefly? Thanks again.

4. ### crutschow Expert

Mar 14, 2008
13,520
3,386
Strictly speaking, dB is a power ratio defined as 10*log(P2/P1) where log is the base 10 logarithm.
Since power is proportional to the square of the voltage (for a given load resistance) than a dB is also commonly expressed as the ratio of two voltages or 10*log (V2^2/V1^2).
And since the square of a log value is the same as multiplying the log by a factor of two, then the voltage dB (sometimes shown as dBv) also equals 20*log (V2/V1).

LTspice arbitrarily uses a value of 1 Vrms for V1 with V2 being the measured voltage in Vrms.

To calculate the percent distortion convert the dB difference to a ratio. Thus, for example, if the 3rd harmonic was 40dB below the fundamental (or -40dB) then the ratio is 10^(-40dB/20) = 10^(-2) = .01 = 1%.

#12 likes this.