The practicing instrumentation engineer's guide to the DFT - Part 1: Understand DFT and FFT implementations
There are many books and articles on the Fourier Transform and its implementation available. A quick survey of these resources shows that they are not geared to the needs of the "Practicing Instrumentation Engineers" needs but to the needs of DSP engineers who work in many fields. What is a "Practicing Instrumentation Engineer" anyway? We have products to build and schedules to keep so we are practical, we are also in the instrumentation business so we need to understand not only relative responses and normalized graphs that are so common in DSP references but we a have need to know absolute levels of measurements, understand sources of error and apply calibrations. This is where the two worlds of DSP and Instrumentation Engineer do not come together. Many DSP books come right out and state:
"When analyzing signal spectra in practice, we're normally interested in the relative magnitudes rather than absolute magnitudes of the individual DFT outputs, so scaling factors aren't usually important to us."This is fine for many fields to be sure, but falls short for the Instrumentation Engineer. Hence a discussion of the Discrete Fourier Transform and its implementation in a practical instrumentation setting is needed. In this paper we will be discussing how to,
- Understand the DFT and FFT Implementations available
- Make waveforms and preform DFT's on real signals and calibrate the DFT output
- Understand Window functions and their sources of error on our calibration
- Look at the proper way to average DFT's to reduce variance
- Discuss practical display techniques on limited resolution screens
- Right now we live in a .NET world for the Windows based PC, so the experiments will be in Microsoft's free C# .NET Express version . C# is a easily readable language so even if you don't use C# you will be able to understand the code and port it to your language of choice.
- We will use a GNU DFT implementation and I choose ALGLIB  as it is easy to understand, easy to implement, has a version fully written in Managed C#, and others. There are many other DFT implementations available  and all of them are applicable to the discussion that follows by usually just changing a few lines of code.
- For visualization we will be using the free .NET charting software ZedGraph available on Source Forge  which happens to plug in directly with the .NET framework and is quite easy to use.
- All of the C# demonstration code is available as a free download that has working examples of every concept presented in this article .