17

Wikipedia's Wavelet article contains this text:

The discrete wavelet transform is also less computationally complex, taking O(N) time as compared to O(N log N) for the fast Fourier transform. This computational advantage is not inherent to the transform, but reflects the choice of a logarithmic division of frequency, in contrast to the equally spaced frequency divisions of the FFT.

Does this imply that there's also an FFT-like algorithm that uses a logarithmic division of frequency instead of linear? Is it also O(N)? This would obviously be preferable for a lot of applications.

rchard2scout
  • 180
  • 1
  • 8
endolith
  • 25,479
  • 34
  • 128
  • 192
  • It's an interesting idea. I'm not sure how useful though: would the waveforms with the logarithmic frequencies form a complete basis and if not, what use are they? (Not to say it's not useful, I really mean I'm not sure.) – tom10 Jul 14 '09 at 02:47
  • I was assuming it would be similar to the FFT, but with the bins in the result logarithmically spaced. An audio spectrum analyzer, for instance, would benefit from this because it would have higher resolution at low frequencies and lower resolution at high frequencies (http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.0/userguide-9.0/sound_audacity_spectrum.png), and the higher speed of computation would allow it to refresh at a much faster rate or provide greater resolution overall. – endolith Jul 14 '09 at 13:54
  • Now that I understand it better, a complex Morlet wavelet transform would probably do what I was imagining, for a spectrum analyzer, at least. – endolith Oct 14 '09 at 21:42
  • @endolith: or [constant-Q transform](http://www.eecs.qmul.ac.uk/~anssik/cqt/) http://dsp.stackexchange.com/q/6266/29 – endolith Apr 12 '13 at 14:34
  • Very intersting, thanks. I also found the wikipedia page on the constant-Q transform to be useful: http://en.wikipedia.org/wiki/Constant_Q_transform – tom10 Apr 12 '13 at 16:01
  • Hi think that the answers to *"How can I compute a log-spaced power spectrum?"* at http://dsp.stackexchange.com/questions/129/how-can-i-compute-a-log-spaced-power-spectrum give very good complements. – Pierre H. Feb 25 '14 at 18:36

3 Answers3

15

Yes. Yes. No.

It is called the Logarithmic Fourier Transform. It has O(n) time. However it is useful for functions which decay slowly with increasing domain/abscissa.

Referring back the wikipedia article:

The main difference is that wavelets are localized in both time and frequency whereas the standard Fourier transform is only localized in frequency.

So if you can be localized only in time (or space, pick your interpretation of the abscissa) then Wavelets (or discrete cosine transform) are a reasonable approach. But if you need to go on and on and on, then you need the fourier transform.

Read more about LFT at http://homepages.dias.ie/~ajones/publications/28.pdf

Here is the abstract:

We present an exact and analytical expression for the Fourier transform of a function that has been sampled logarithmically. The procedure is significantly more efficient computationally than the fast Fourier transformation (FFT) for transforming functions or measured responses which decay slowly with increasing abscissa value. We illustrate the proposed method with an example from electromagnetic geophysics, where the scaling is often such that our logarithmic Fourier transform (LFT) should be applied. For the example chosen, we are able to obtain results that agree with those from an FFT to within 0.5 per cent in a time that is a factor of 1.0e2 shorter. Potential applications of our LFT in geophysics include conversion of wide-band electromagnetic frequency responses to transient responses, glacial loading and unloading, aquifer recharge problems, normal mode and earth tide studies in seismology, and impulsive shock wave modelling.

endolith
  • 25,479
  • 34
  • 128
  • 192
Jason Harrison
  • 922
  • 9
  • 27
  • 2
    Ohhh, so the time-domain signal needs to be sampled logarithmically, too? (Meaning the samples are not equally spaced in time?) – endolith Jul 13 '09 at 18:09
1

EDIT: After reading up on this I think this algorithm is not really useful for this question, I will give a description anyway for other readers.

There is also the Filon's algorithm a method based on Filon's qudrature which can be found in Numerical Recipes this [PhD thesis][1]. The timescale is log spaced as is the resulting frequeny scale.

This algorithm is used for data/functions which decayed to 0 in the observed time interval (which is probably not your case), a typical simple example would be an exponential decay.

If your data is noted by points (x_0,y_0),(x_1,y_1)...(x_i,y_i) and you want to calculate the spectrum A(f) where f is the frequency from lets say f_min=1/x_max to f_max=1/x_min log spaced. The real part for each frequency f is then calculated by:

A(f) = sum from i=0...i-1 { (y_i+1 - y_i)/(x_i+1 - x_i) * [ cos(2*pi*f * t_i+1) - cos(2*pi*f*t_i) ]/((2*pi*f)^2) }

The imaginary part is:

A(f) = y_0/(2*pi*f) + sum from i=0...i-1 { (y_i+1 - y_i)/(x_i+1 - x_i) * [ sin(2*pi*f * t_i+1) - sin(2*pi*f*t_i) ]/((2*pi*f)^2) }

[1] Blochowicz, Thomas: Broadband Dielectric Spectroscopy in Neat and Binary Molecular Glass Formers. University of Bayreuth, 2003, Chapter 3.2.3

mrossi
  • 437
  • 6
  • 8
1

To do what you want, you need to measure different time Windows, which means lower frequencies get update least often (inversely proportional to powers of 2).

Check FPPO here: https://www.rationalacoustics.com/files/FFT_Fundamentals.pdf

This means that higher frequencies will update more often, but you always average (moving average is good), but can also let it move faster. Of course, if plan on using the inverse FFT, you don't want any of this. Also, to have better accuracy (smaller bandwidth) at lower frequencies, means these need to update much more slowly, like 16k Windows (1/3 m/s).

Yeah, a low frequency signal naturally travels slowly, and thus of course, you need a lot of time to detect them. This is not a problem that math can fix. It's a natural trade of, and you can't have high accuracy a lower frequency and fast response.

I think the link I provide will clarify some of your options...7 years after you asked the question, unfortunately.