1

I am trying to give for Wigner-Ville Distribution Hamming Window of length 64 with 60% overlap here. I can create Hamming window of length 64 by

h=hamming(64);

Here is some theoretical pieces of advice about the issue. The window seems to be some sort of convolution of three Hamming waves with 60% probability for convolution.

The overlap seems to be some sort of convolution of three functions. My try for three windows and their overlaps

conv(conv(hamming(64), hamming(64)), conv(hamming(64), hamming(64)))

My try for two windows and their overlaps

h = conv(hamming(64), hamming(64));

Both of the results do not seem to give me any better Wigner-Ville distribution results. Many cloudy peaks are still visible. So the key seems to separate in time the windows, since the current result of the window function returns exactly the same picture as with hamming(64) window only.

Thinking the 60% overlap

The dimensions of hamming(64) are 64x1 double, while of conv(hamming(64), hamming(64)) 127x1 double. To make a probabilistic algorithm of 60% chance is not straightforward, because we cannot iterate both functions linearly.

How can you create hamming window with 60% overlap?

Community
  • 1
  • 1
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
  • 2
    Based on your "theoretical piece of advice" link, I think the overlap comes about from choosing the hop length (in other words, you can only have overlap if the consecutive windows have some overlap between them; if your window is 64 long, you need maybe a hop of 36 to get 60% overlap between consecutive samples). Then you can leave the Hamming window itself alone. Sorry I don't have time to dig into this more deeply (and don't have matlab handy right now to test this out). – Floris Dec 24 '13 at 17:44
  • @Floris Please, see my answer based on your comment. Is that what you mean? Thank you for your great comment! – Léo Léopold Hertz 준영 Dec 24 '13 at 22:00

2 Answers2

1

A quick search indicated buffer might be worth attempting.

h = hamming(64);
y = buffer(h, 1, floor(64 * 0.6));

But my Matlab version does not support this function, so I didn't try.

lennon310
  • 12,503
  • 11
  • 43
  • 61
  • I think the order of parameters should be reversed. The number of overlap comes last like *y = buffer(h, floor(64 * 0.6), 1)*; – Léo Léopold Hertz 준영 Dec 24 '13 at 16:31
  • I am not sure if the result is working or not. The picture seems to be the same when passing to the Wigner-Ville distribution. – Léo Léopold Hertz 준영 Dec 24 '13 at 16:33
  • The dimensions of the buffer is 38x2 double, while hamming(64) 64x1 double. I am not sure if the buffer is doing the right thing by leaving out 40% of points and multiplying the number of columns to two. Probably, the convolution should be connected to this thing now. – Léo Léopold Hertz 준영 Dec 24 '13 at 16:36
0

Based on Floris' comment. Run Wigner-Ville distribution with 60% overlap of Hamming window 64.

h = hamming(64);
h2 = hamming(38);
h = conv(h, h2);
[B,T,F] = tfrwv(data, 1:length(data), length(data), h);

The picture seems to be exactly the same as with hamming-64 window. The picture should not be the same, since the vector hamming-64 and this windowing function differ in values. So probably the norm should be studied to estimate the thing.

The log(abs(data)) gives on the left-hand-side, while the original on the right-hand side

enter image description here

Here now logarithmic function applied to distribution with Hamming 64 and to the other with Hamming 64 but with overlap 60%

enter image description here

The pictures seem to be the same after logaritmic function too.

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
  • I do not understand why there is so little change compared to the picture here http://stackoverflow.com/questions/20750660/to-scale-values-from-wigner-ville-distribution-to-real-range-in-matlab The pictures seem to be exactly the same. – Léo Léopold Hertz 준영 Dec 24 '13 at 22:07
  • Did you compare the magnitude of both spectrogram figures? Maybe try log(abs(B)) to observe more details. – lennon310 Dec 25 '13 at 04:00
  • @lennon310 The picture gets yellow when taking the logarithm. Is this supposed to be so? – Léo Léopold Hertz 준영 Dec 25 '13 at 11:20
  • Masi, are they still exactly the same? I mean the logarithm on magnitude for tfrwv and spectrogram? – lennon310 Dec 25 '13 at 15:24
  • @lennon310 Please, see the new added picture. The pictures seem to be exactly the same, although the windows are different. It seems that the window function does not get applied at all. – Léo Léopold Hertz 준영 Dec 25 '13 at 16:19
  • did you still get the same result if you change h to some other parameters? like a constant, or ones(64,1) window, gaussian....etc – lennon310 Dec 25 '13 at 16:31
  • @lennon310 Yes, I did get the same result. This means that I am using wrongly the function of Auger et al. – Léo Léopold Hertz 준영 Dec 25 '13 at 16:32
  • 1
    it seems like the h parameter doesn't function at all (make sure you clear all every time before you re-run the program with another configuration..). you may have to ask them about the issue...or if you can get the raw code on tfrwv.m, you can investigate how the h is used. – lennon310 Dec 25 '13 at 16:34
  • @lennon310 I moved the discussion of Applying the window function on the distribution here http://stackoverflow.com/questions/20777252/to-apply-window-function-on-wigner-ville-distribution-in-matlab This thread solved now, since we know how to create Hamming-64 with 60% overlap. – Léo Léopold Hertz 준영 Dec 25 '13 at 22:26
  • thank you I will take a look later. Merry Christmas by the way – lennon310 Dec 25 '13 at 22:59