Tutorial - FFT size

Discussion in 'Measurement Setups, Systems, and Standards' started by atomicbob, Jan 17, 2018.

  1. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    This will be a mostly visual guide to FFT size and effect on frequency resolution and bin residual noise.

    Each of the following graphs are the exact same measurement of an ADI-2 Pro DAC output looped back to ADC input using HpW Works.

    Test conditions:
    DAC reference level 0dBFS = +19 dBu
    DAC filter is SD Sharp,
    DAC output adjusted to -20 dBFS which translates to -1 dBu
    DAC output looped back to ADC input
    ADC reference level = +19 dBu
    Sample rate is 44.1 KHz

    The only change between each graph is the FFT size and thus bin frequency resolution. They represent the same measurement with different FFT resolutions. Notice how the SNR, THD and THD+N are relatively consistent in all graphs. The residual energy per bin lowers as the FFT size increases. Visually it becomes easier to see harmonics and distinguish from noise spurs at higher resolutions. By 8M points it becomes debatable if there is any further information to be gained by increased resolution for this particular measurement.

    Look carefully at all the information on each graph. Outside of my tongue-in-cheek labels, the following information can be seen:
    1. Y axis units
    2. Number of measurements averaged together
    3. FFT size in number of points
    4. Date and Time of measurement
    5. X axis units
    6. SNR
    7. THD
    8. THD+N
    9. DC level
    10. RMS level of measurement signal
    11. Sample rate
    12. Channel displayed
    13. FFT window used
    14. Bandwidth filter if any
    15. Weighting filter if any

    FFT = 4K
    20180117-01 ADI-2 Pro Bal 1 KHz THD THD+N 4K FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 16K
    20180117-02 ADI-2 Pro Bal 1 KHz THD THD+N 16K FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 65K
    20180117-03 ADI-2 Pro Bal 1 KHz THD THD+N 65K FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 262K
    20180117-04 ADI-2 Pro Bal 1 KHz THD THD+N 262K FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 1M
    20180117-05 ADI-2 Pro Bal 1 KHz THD THD+N 1M FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 8M
    20180117-06 ADI-2 Pro Bal 1 KHz THD THD+N 8M FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 16M
    20180117-07 ADI-2 Pro Bal 1 KHz THD THD+N 16M FFT- ASIO -20 dBFS - HpW.PNG

    FFT = 33M
    20180117-08 ADI-2 Pro Bal 1 KHz THD THD+N 33M FFT- ASIO -20 dBFS - HpW.PNG

    This last graph is an overlay consisting of the 4K, 262K and 16M FFT measurements.
    20180117-09 ADI-2 Pro Bal 1 KHz THD THD+N 4K 262K 16M FFT- ASIO -20 dBFS - HpW.PNG


     
    • Like Like x 17
    • Epic Epic x 1
    • List
    Last edited: Jan 18, 2018
  2. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    In this example a Bottlehead Crack is measured at 40 Hz.

    This BH Crack has the following modifications:
    Tungsram e80cc (PS rebiased for this driver tube)
    Chatham 5998 output tube
    No speedball upgrade
    Output caps are 820 uF Nichicon electrolytics
    1 uF film bypass capacitors to signal path electrolytics
    1 uF film bypass cap to last C in power supply filter
    First R in power supply filter replaced with Triad C7X choke (10H, 270R)

    Test conditions:
    RME ADI-2 Pro used for stimulus and response measurement
    DAC and ADC Reference 0 dBFS = +19 dBu
    DAC filter SD Sharp
    Sample rate = 44.1 KHz
    Signal level presented to BH Crack = -11 dBu (conveniently -30 dBFS)
    BH Crack gain knob adjusted for input to output gain = 0 dB
    BH Crack output load = 300R

    FFT bins are distributed linearly through the frequency domain. But we wish to display with a logarithmic frequency x axis to more closely match how the Human Auditory System perceives sound. Note how the bins at low frequency cover more Hz per bin than at higher frequencies. Our measurements have greater resolution at high frequency than low frequency. FFT size should be chosen carefully with this in mind. Another thing to keep in mind is higher FFT sizes require longer measurement and computation times. 65K runs in a few seconds while 16M can take 13 minutes for a single measurement at 44.1 KHz.

    FFT = 4K
    20180107-20 BH Crack e80cc 5998 40 Hz THD THD+N 4K FFT- ASIO -30 dBFS - HpW.PNG
    4K is not a good choice in this measurement as we are unable to discriminate the fundamental (40 Hz), bins for 2nd (80 Hz) and 3rd (120 Hz) harmonics are too broad in the frequencies they represent.

    FFT = 16K
    20180107-21 BH Crack e80cc 5998 40 Hz THD THD+N 16K FFT- ASIO -30 dBFS - HpW.PNG
    16K offers improvement in identifying 40, 80 and 120 Hz components

    FFT = 65K
    20180107-22 BH Crack e80cc 5998 40 Hz THD THD+N 65K FFT- ASIO -30 dBFS - HpW.PNG
    65K appears to be a reasonable choice for compromise between resolution and time for measurement.

    FFT = 262K
    20180107-23 BH Crack e80cc 5998 40 Hz THD THD+N 262K FFT- ASIO -30 dBFS - HpW.PNG
    Greater frequency resolution at 262K is apparent. Beginning to notice 40 Hz is really a little above 40Hz as the signal generator was set for coherent operation. This nudges the desired test frequency a little to minimize issues with FFT windows (another topic for another post.)

    FFT = 1M
    20180107-24 BH Crack e80cc 5998 40 Hz THD THD+N 1M FFT- ASIO -30 dBFS - HpW.PNG
    Notice the 3rd harmonic identifier on the graph dropped to half the height of the displayed spur. Now consider that the nudged signal generation was from 40 Hz to 40.375 Hz and that second harmonic of power supply mains in this lab is 120 Hz, which is also 3rd harmonic of 40 Hz.

    FFT = 8M
    20180107-25 BH Crack e80cc 5998 40 Hz THD THD+N 8M FFT- ASIO -30 dBFS - HpW.PNG
    Again the 3rd harmonic identifier is at half height of the displayed spur. Also note increased frequency resolution dropped residual energy per bin below our current Y axis minimum of -160 dBFS

    FFT = 8M with Y axis raised
    20180107-25a BH Crack e80cc 5998 40 Hz THD THD+N 8M FFT- ASIO -30 dBFS - HpW.PNG
    Raising the Y axis allows us to see the residual energy per FFT bin again.

    FFT = 8M with X axis zoomed
    20180107-25b BH Crack e80cc 5998 40 Hz THD THD+N 8M FFT- ASIO -30 dBFS - HpW.PNG
    Remember the nudged signal generation was from 40 Hz to 40.375 Hz and that second harmonic of power supply mains in this lab is 120 Hz, which is 3rd harmonic of 40 Hz. On this expanded graph we see the separation of the power supply 2nd harmonic of 120 Hz from the stimulus signal 3rd harmonic of 121.13 Hz. So why don't we always perform 8M FFT's? 3.5 minute measurement times. Maybe a better solution would be to choose a different stimulus frequency taking into account the power supply mains frequency and harmonics. See the next post.
     
    Last edited: Jan 18, 2018
  3. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    BH Crack with 45 Hz stimulus.

    FFT = 16K with 45 Hz stimulus
    20180108-30 BH Crack e80cc 5998 45 Hz THD THD+N 16K FFT- ASIO -30 dBFS - HpW.PNG
    At this resolution power supply mains 2nd harmonic and stimulus 3rd harmonic are still visually co-mingled.

    FFT = 32K with 45 Hz stimulus
    20180108-31 BH Crack e80cc 5998 45 Hz THD THD+N 32K FFT- ASIO -30 dBFS - HpW.PNG
    Visual separation of power supply mains 2nd harmonic and stimulus 3rd harmonic are clearly visible.

    FFT = 65K with 45 Hz stimulus
    20180108-32 BH Crack e80cc 5998 45 Hz THD THD+N 65K FFT- ASIO -30 dBFS - HpW.PNG
    Greater resolution again provides enhanced visual resolution for discriminating between stimulus frequency + harmonics (45, 90, 135 Hz) and power supply mains + harmonics (60, 120 Hz), though once again an overlap will occur at 180 Hz. So we solved on problem but created another. Maybe a better choice for the future would be 42 or 43 Hz.

    FFT = 262K with 45 Hz stimulus
    20180108-33 BH Crack e80cc 5998 45 Hz THD THD+N 262K FFT- ASIO -30 dBFS - HpW.PNG
     
    Last edited: Jan 18, 2018
  4. murray

    murray Friend

    Pyrate
    Joined:
    Sep 29, 2015
    Likes Received:
    478
    Trophy Points:
    63
    Location:
    N.Z.
    Thanks @atomicbob for such a good visualisation. I find it helpful to understand that the noise floor drops with larger FFT sizes due to each individual bin becoming proportionately narrower. The narrower the bin, the less bandwidth it has, and noise is measured by bandwidth (sqrt Hz).
     
  5. GoodEnoughGear

    GoodEnoughGear Evil Dr. Shultz‎

    Pyrate
    Joined:
    Oct 25, 2015
    Likes Received:
    3,070
    Trophy Points:
    113
    Location:
    Cape Town, South Africa
    Thanks @atomicbob and other more educated and sharper than I...I'll be trying to understand this in more technical detail as the thread evolves. Pointers to resources for the untrained would be welcome.
     
  6. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    The header of my more recent Technical Measurements posts include the following:

    If you are unfamiliar with audio measurements please use a search engine with the query:
    "audio measurements" or "audio measurement handbook"
    Look for publications by Richard C. Cabot and also by Bob Metzler, both from Audio Precision. There are other useful publications as well. These will provide basic knowledge.

    Also note that I have added material to posts 2 and 3 above.
     
  7. Clemmaster

    Clemmaster Friend

    Pyrate Contributor
    Joined:
    Sep 28, 2015
    Likes Received:
    3,268
    Trophy Points:
    113
    Weird that this handbook isn't included with the fancy APx555 :rolleyes:
     
  8. Cspirou

    Cspirou They call me Sparky

    Pyrate
    Joined:
    Sep 27, 2015
    Likes Received:
    8,200
    Trophy Points:
    113
    Location:
    Northwest France
    Those spurs at 160db are disturbing. Put that ADI-2 in the garbage.
     
  9. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    Unfortunately the only prerequisite to owning expensive test equipment is sufficient funds. AP makes really good equipment, as do Prism Sound. Rohde & Schwarz, and a number of other vendors.

    I was enduring another cardiac episode while posting the updates today. This made me really laugh, thank-you!
     
  10. jowls

    jowls Never shitposts (please) - Friend

    Pyrate
    Joined:
    Oct 3, 2015
    Likes Received:
    4,495
    Trophy Points:
    113
    Location:
    42°S
    Your measurements are always appreciated but health comes first. Look after yourself Bob.
     
  11. atomicbob

    atomicbob dScope Yoda

    Pyrate BWC MZR
    Joined:
    Sep 27, 2015
    Likes Received:
    18,653
    Trophy Points:
    113
    Location:
    On planet
    Thank-you for the kind sentiments, which I receive often from a great number of people.

    Paroxysmal atrial fibrillation is a way of life for millions of people on the planet. There are dietary restrictions, meds, cardiac procedures, etc to manage the issue. Some more or less successfully. I've had one procedure and likely need another. Meanwhile I have my regimen with oversight of several cardiologists. It is a matter of episode management. Calming music and keeping the mind occupied are also helpful in my case. However I avoid any critical decision making during an episode. Sitting and stewing about it makes my episodes worse so it is a good time to stay busy with something useful. This FFT tutorial has served just such a purpose.
     
  12. Garns

    Garns Friend

    Pyrate
    Joined:
    Jul 9, 2016
    Likes Received:
    2,483
    Trophy Points:
    93
    Location:
    Sydney, AUS
    Thanks Bob, great stuff.

    ...on account of which I am now imagining Head-Fi HQ like this:
    tmp_14020-serveimage(5)2027365691.jpg
     

Share This Page