8
$\begingroup$

I'm attempting to create a real-time scalogram (from a 1 dimensional signal) in the style of a spectrogram;

Looking through various papers+books; the Gabor wavelet, or complex Morlet seems to be favoured for keeping a close relation to frequency.

Though I was hoping to use a real valued wavelet though due to computational complexity concerns... What wavelet would be recommended?

$\endgroup$
1

3 Answers 3

3
$\begingroup$

The mother wavelet of your scalogram should have a similar shape to the usual peak shapes you want to detect (I suppose you use it to detect peaks of your signal). However, I would like to ask you what would you like to use wavelets for? I could give you a more specific answer for your question.

$\endgroup$
9
  • 1
    $\begingroup$ I essentially want to create a spectrogram using wavelets instead of the STFT. So the 'shapes' I want to detect would just be sinusoids I guess... $\endgroup$ Commented Mar 5, 2012 at 9:20
  • $\begingroup$ I would use the same shape function g(t) in wavelet than in STFT. You could find differences between these two transforms in Doc. $\endgroup$ Commented Mar 5, 2012 at 10:28
  • $\begingroup$ Do you mean that (eg) if I want something like an STFT using a Hamming window; my wavelet should be a modulated Hamming window? $\endgroup$ Commented Mar 5, 2012 at 12:43
  • 1
    $\begingroup$ that´s it. Mother wavelet (shape function) should be similar in both cases. $\endgroup$ Commented Mar 5, 2012 at 13:00
  • $\begingroup$ Does that necessitate a complex window then? (where it's absolute value is = to the hamming window) Or can I just drop the imaginary component? $\endgroup$ Commented Mar 6, 2012 at 1:16
2
$\begingroup$

Unfortunately it's for 2D signals (image analysis), but I believe his conclusion would also apply to 1D signal. J.F. Kirby, "Which wavelet best reproduces the Fourier power spectrum?", Computers & Geosciences 31 (2005) 846–864

Basically, his conclusion is to go with the Fan wavelet, which is a 2D rotated version of the Morlet wavelet. In 1D, I'd suggest the complex Morlet. It's the mix of real and complex part that allows for a good similarity to a Fourier power spectrum.

In better precision, here what it should look like, converted to 1D from Kirby (2005): $$ \Psi = exp\Big(-\frac{ik_0x}{\lambda} - \frac{x^2}{2\lambda^2}\Big),$$ where $\lambda$ is the scale you're looking at, and $k_0=5.336$ is a constant selected to give the best "scale sampling" vs "frequency sampling". I didn't include the normalization constant because in every computational situation, it's better to just divide the final wavelet by its maximum value, and subtract its average. It gives pretty much the same result with less headache.

Basically, the complex Morlet wavelet is a Fourier transform "wave" ($exp(-i k_0 x/\lambda)$) bounded by a Gaussian kernel ($exp(-x^2/2)$). I suspect you might get a good power spectrum using only the real part (using $cos(x) \cdot exp(-x^2/2)$), but you would loose phase information.

Try comparing the spectrum obtained from a Fourier transform, from a complex Morlet and from a real Morlet. Watch out for bad/non-standard normalization found in many FFT algorithms.

$\endgroup$
2
  • $\begingroup$ As noted in question; I need a real values wavelet. I ended up going with the discrete meyer FWIW. $\endgroup$ Commented Sep 30, 2012 at 4:13
  • $\begingroup$ Off course, if you cannot use complex values in your computations, the Morlet wavelet looses some of its charm... Still, the mathematics are not that much more complex, so when memory and computing power are not the limiting factor, I recommend to go with the Morlet. One of my friend/colleague made himself a program to compare, and if you take the average value of the wavelet transform at each scale, you end up with an exact copy of a Fourier power spectrum. Unfortunately, he has not published his results yet, so I do not have a source to cite (beside Kirby(2005)). $\endgroup$
    – PhilMacKay
    Commented Oct 1, 2012 at 21:25
0
$\begingroup$

The discrete Meyer was my end choice; it provides a relatively clean sub-band separation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.