There are many Open Source and Commercial implementations around the web and in textbooks for computing Fourier Transforms. Unfortunately most are flawed in a number of ways,
- They produce an un-calibrated result that changes depending on the number of points transformed.
- They include no built in methods to scale for Windowing of the input data.
- They always have no proper way to measure noise accurately.
- They don't size the returned spectrum to have just the real part of the spectrum.
- They implement their own Complex number type. Ignoring .NET 4's built in Complex data type.
- They aren't complete. You have to add a bunch of helper routines every time.
- They have restrictive Open Source Licenses.
All of these things take hours of tweaking to get a usable FFT or DFT running from even the best of the currently available libraries.
I decided to solve this problem for myself and my clients by making a pretty complete Fourier Transform Library that implements,
- Properly Scaled Fast Fourier Transforms.
- Properly Scaled Discrete Fourier Transforms.
- Properly Scaled Data Windowing.
- Proper functions to scale for noise and signals in the correct manor.
- Signal Generation for Testing.
- Useful Array Math routines.
This work is the culmination of about 5 years worth of work using, revising and tweaking other libraries and implementations, both open source and commercial before I wrote my own.
DSPLib is the first Fourier Transform Library that can take any time domain signal input, like from an ADC, apply one of the 27 built in window types and produce a correctly scaled Spectrum Output for either signal or noise analysis with no code tweaking required at all.
The library is released under the very non restrictive MIT License and is essentially royalty free for any use, even commercial.
The complete write up is at codeproject.com – take a look and enjoy never needing to spend hours tweaking Fourier Transform code again.
Article By: Steve Hageman www.AnalogHome.com
We design custom: Analog, RF and Embedded systems for a wide variety of industrial and commercial clients. Please feel free to contact us if we can help on your next project.