Brad Ormand's Second Fourier Transform - Noise

11.14.2014 – Fourier

Awesome!  I got the Fast Fourier Transform to work!   There has been a lot leading up to this, and it feels good to have done a custom implementation of it.  During tests, I was surprised to find out that, yes, confirmed, it *is* indeed faster than the DFT, alone.  Haha.  Of course it is, but I had to do it to *really* believe it…   Yes, it runs on the order of 10 times faster than my earlier DFT implementation.  In an interpreted JavaScript environment, it ran at about 1 millisecond, on average, whereas with the DFT alone, it was averaging at about 15 milliseconds!  What a difference that is. But, yeah, the FFT was a muuuch more difficult thing to implement, as the code was over 6 times as long, and the nested matrix adds in the butterflies were a bit hard to comprehend when I had to comined them with i, k , and j iterators in loops.  But, it turned out great, in the end, and the savings speak for themselves.  Love when it works out.

Brad Ormand's First FFT

This pic (above) shows the FFT taken of (about a) 1k sine wave (very clean, without those weird harmonics I was getting earlier).  I also tried to construct a square wave from sines.  I just went as close as possible, going up to the 11th harmonic.  Here’s another screenshot of the combined waves (you can see the Gibb’s peaks forming there).  This one is about up to the 7th harmonic.  And, due to combining the waves, the amplitude is a bit clipped (visibly, in the FFT spectral and waveform chart), but oh well, it was an experiment.  I really just wanted to move on to the embedded implementation…

Brad Ormand - Combined Sines

Later, I started the C implementation and got it showing up on the display as a crude set of dots, and the sample rate and sample window are much less.  So, there’s more work to be done there, of course.  I did confirm, however, that different frequencies produced a sweep across the bands and that it works as expected.  Ah, it’s just amazing stuff – love this kinda thing 🙂


One thought on “11.14.2014 – Fourier”

Comments are closed.