Should I trust Matlab FFT?

Discussion in 'General Electronics Chat' started by Veracohr, Mar 18, 2016.

  1. Veracohr

    Thread Starter Well-Known Member

    Jan 3, 2011
    I wanted to measure the distortion of my function generator, and I discovered my oscilloscope seems to distort the signal slightly (always second and third harmonics around -40dB even after filtering). So I recorded the function generator as audio and tried two different FFT options to measure the distortion.

    The first is an audio spectrum analyzer plugin which gave about 0.3% THD. This sort of thing isn't really intended for distortion analysis, but I figured FFT is pretty straight forward and there's not a lot of room for variation right?

    Then I put the same audio file in Matlab and ran the FFT there, which gave me 0.06% THD. Now I wonder which to trust.
  2. bertus


    Apr 5, 2008

    What kind of window is the FFT using?
    In audacity you can choose several types of FFT windows, like Bartlet, Hamming, Hanning, Blackman and Blackman-Harris :

  3. Veracohr

    Thread Starter Well-Known Member

    Jan 3, 2011
    The plugin I used was Voxengo Span, and it has no window options nor does the product info mention which window:

    Adjusting the settings that are available doesn't change the relative harmonic levels.

    In Matlab I used a Blackman window.