Design Article
Comment
john66ny
I can't access page 2 and beyond, is it just me? (Next button reloads the same ...
LostInSpace2010
Spectral Analysis is probably the main application of the DFT/FFT. Spectral ...
The practicing instrumentation engineer's guide to the DFT - Part 1: Understand DFT and FFT implementations
Steve Hageman
6/19/2012 4:58 PM EDT
Introduction
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:
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 [1]. 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 [2] 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 [3] 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 [4] 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 [5].
Navigate to related information


Audi McAvoy
6/20/2012 3:53 PM EDT
Is http://www.codeplex.com/ the complete link to the project files? I'm not seeing it.
Sign in to Reply
LostInSpace2010
6/21/2012 9:14 PM EDT
My bad. The actual link to the code is,
http://code.google.com/p/practicing-engineers-guide-to-the-dft/
I gave the Editor the wrong information - Sorry..... That's the internet for you... Errors at the speed of light!
Sign in to Reply
rich.pell
6/21/2012 9:35 PM EDT
And corrections almost as fast! :)
Sign in to Reply
LostInSpace2010
6/21/2012 10:14 PM EDT
Oh yeah! In 1980, I would have to wait for a week to get the magazine, then I would find an error. That would make me write a letter to the editor, then in 3 months a correction could be printed.
Sign in to Reply
David in Norway
6/21/2012 4:10 AM EDT
That was an interesting article, and I intend to study it a bit more when I get the time. But I have a complaint about the software. You are /not/ using "totally free software", we do /not/ live in a Windows world (you are targeting embedded engineers here), and even those that want to do their DFT's on a Windows PC mostly do not use C#.
While I agree that C# is marginally more readable than C++ for those unfamiliar with it, I think an article like this would be better off using C or C++ (ALGLIB is also available for C++) since this is what is used in the real world in embedded systems. The alternative is to pick a language that really is practical for quick and easy tests, experiments and investigations on a PC, such as Python (with SciPy).
Sign in to Reply
LostInSpace2010
6/21/2012 9:13 PM EDT
David - Thanks for the comments. The point of presenting the code in C# is that probably more people have access to a PC running windows so they can with minimum fuss download and play with all the software for free (All the code is free to play with) - I think that will serve a greater number of people in the world. C# on a PC is a great way to quickly prototype code and here, where we are graphing results as well then using a PC is simply very quick and easy.
Sign in to Reply
JoaoL
6/29/2012 1:33 PM EDT
Steve,
Could you please state the problem (or class of problems) that the DFT or FFT are used to solve. That will make it easy to follow your tutorial.
Thanks
Leo
Sign in to Reply
LostInSpace2010
7/6/2012 10:17 AM EDT
Spectral Analysis is probably the main application of the DFT/FFT. Spectral Analysis involves the transformation of data in the time domain into data of the frequency domain. A search of “DFT FFT applications” will yield many more articles on the subject.
Sign in to Reply
john66ny
12/19/2012 12:59 PM EST
I can't access page 2 and beyond, is it just me? (Next button reloads the same page.)
Sign in to Reply