Fast Fourier Transform in realtime

I am working on a project that involves energy consumption monitoring with a Yun. A Fourier code would be perfect for recalculating the current waves as these waves are prone to have harmonics. I'd hate paying more for the electricity bill just because some harmonics interfered.

I am new to coding and the Yun has limited memory.

Here is the library which is used: GitHub - openenergymonitor/EmonLib: Electricity monitoring library - install in Arduino IDE's libraries folder then restart the IDE