Pages

Wednesday, 18 April 2012

FFT of shortwave radio

Fourier transforms are a bit magical, and I've never permanently grokked any of the FFT algorithms. No matter, FFTW will just apply them for me. The result is this: my FFTW client utility. (Remember to link against libfftw3 when building it.)

A few nights ago I had the shortwave receiver on, and there was someone working another station I didn't hear. Eager to test my little Fourier transform utility, I captured some audio from my laptop microphone and fed it into the FFT. At one point the signal consisted of a long run of "dit"s, which is makes the audio signal quite spectrally pure. Here's a part of the result, featuring that stream of dits:


The audio carrier is visible at about 1002Hz, and then a number of sidebands each side, showing how the carrier is modulated with dits running at about six every second. Since the signal itself was pretty clean, a number of odd-numbered harmonics are also visible: the 3rd, 5th, and beyond, depending on your standards of evidence. This reflects a square wave's spectrum: odd harmonics only.

Pop quiz: does the human ear work in the time domain or frequency domain?