Hacker News new | past | comments | ask | show | jobs | submit login
Mastering The Fourier Transform in One Day (dspdimension.com)
104 points by profquail on July 11, 2009 | hide | past | favorite | 18 comments



You may be able to understand the logic of the FT in one day -- and someone with a background in math may understand the maths in one day -- but the problem is usually understanding what the output means. With sound the notion of 'frequency' is reasonably intuitive, but with FT's of other datasets, the notion of 'frequency' can take a few days to settle in, before yielding to interpretation.


Absolutely true. Cute little writeups like this one are just the gateway drug. It's like trying to get people to learn to play Go. "I can teach you the rules in ten minutes!" You try not to mention the part where the implications of the rules will take up the rest of your life.

You're even underselling the complexity of sound. If one doesn't understand dispersion and coherence one doesn't even understand sound, let alone things like lasers or the band structure of solids. And I don't think students can absorb all of that in one day. It took me something more on the order of a decade.


Fourier Transforms when used in the fluid turbulence theory and analysis can be thought of as a decomposition of the flow into eddies of a spectrum of sizes. Here the Fourier variable is length not time and the wavelength of a Fourier component defines the size of and eddy in the decomposition, the amplitude of the Fourier component defines the amount of kinetic energy in an eddy and the cutoff wavelength of the eddy decomposition is related to the viscosity of the flow. The problem to be solved by Fluid Turbulence Theory is to understand the transfer of energy over time between the eddies representing the flow field as defined by the Fourier representation of the Navier-Stokes Equation.

Your are correct to note that the interpretation of a Fourier series has a great variance and can become quite abstract.


Typically "frequency" means the same thing: something that is repeated over time. I'll mention a specific economic example I've seen (sorry, can't recall exactly where) to illustrate.

Economists wanted to explain a productivity gap between male and female employees at some employer. So after looking at the Fourier transform of timeseries of sick days, they noticed that men's sick days behaved like a bump function near 0. Essentially, if you are sick today, this increases the odds of him being sick tomorrow.

On the other hand, the Fourier transform of women's sick days had spikes at f=1/28 days as well as the bump at 0. This means if a woman is sick today, the odds are increased that she will be sick n x 28 days from now (n an integer).

That's what the Fourier transform does: if your signal has a component which repeats over time, the Fourier transform will find it.


I would use an autocorrelation for that, not a Fourier transform.


"Autocorrelation is essentially the convolution of a function with the same function reversed in time."

Source: http://documents.wolfram.com/applications/signals/Mathematic...

EDIT: This means that autocorrelation can be calculated using a Fourier transform, so essentially you'd be using it anyway.


The power-spectral density is the fourier-transform of the autocorrelation of a time series. So yes, it is the transform dual. But doing the straight autocorrelation immediately gives you the number of lags before the series repeats itself and is probably the best way to attack that type of problem.


The best way to attack that problem is by using common sense, some women have very heavy periods so it leads to the conclusion that they will periodically (pun unavoidable) be indisposed.

No heavy math required, said period being 28 days.


Right, for this particular case the math is simply overkill. In the general case, autocorrelation is a reasonable simple method to determine the periodicity of a time-series.


Yeah, that's the better way to go and might be what they did. Wish I could find that paper now.

But I still thought it was a nice example to illustrate frequencies and periodicity in a non-wave example.


There is a camp of economists who enjoy applying math which is far too complicated for the situation. It's great fun.


How would you quantify this effect without using fourier transforms/autocorrelation?


Quite an interesting read. Another resource I used when I tried to delve into transforms and DSP was "The Scientist and Engineer's Guide to Digital Signal Processing" (the whole book is available for free at http://www.dspguide.com/). This was quite helpful, even for me with a linguistics background.


Seconded. Very well written introductory text.


...sinusoid, which is Greek...

On a pedantic note, sinusoid is at best half Greek. -oid is Greek ("form of"), but sinus is Latin, referring to, among other things, the fold of a toga. The English word 'sine', by the way, is rooted in mistranslation from Arabic:

http://www.etymonline.com/index.php?term=sine


Numerical Recipes' two chapters on FT (one on implementation, one on applications) is a longer introduction. It does especially well at addressing Confusion's point by making FTs' meaning intuitive, across many domains.

http://www.amazon.com/gp/product/0521880688/


NR books are gratis online:

http://www.nrbook.com/a/

That's the previous "legacy" C version along with Fortran.

The latest version is available as well, behind nasty frames and URLs hidden in "accept our terms first" javascript div { display: none; } crap.

P.S. I want to be able to write CSS as:

   typedef div { display: none} hidden_div;     :-D


From the comments...

"Can I build a multi effects processor for my electric guitar using a DSP with the Fourier stuff and the C++ programming?"

"Sure!"

Lol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: