0
$\begingroup$

I am studying some code for smoothed Wigner-Ville distribution.

update 3- solution, graph was over amplified in a 2d overdrive/oversaturation effect. if i divide by 20 only a line is visible.

Update - indeed there is a bug, the current image is from 128 samples of a $44.1\textrm{ kHz}$ signal where sample[i] = sin[i/10.0]; i.e. a $4410 \textrm{ Hz}$ sine wave, to fit inside the 128 samples.

As suggested by JazzManiac, here is the code which is causing errors, it's actually P Kootsookos Cohens.C code, with a minor change, instead of a .raw input audio TFD file i am using a sine wave array in get_my_signal function... A trivial and simple patch, wouldnt you agree? that can't be the error?!

I have a professional C programmer who has been coding for 30 years who provided this version of the code, it's just setting the argc and argv options in advance, to spwvd, hamming, and default window (was 128, is now 1024).

Is smoothed Wigner-Ville the same as smoothed pseudo Wigner-Ville?...

enter image description here


The original author (i.e. me) gets this for each of the three test cases:

enter image description here

$\endgroup$
  • $\begingroup$ Giving frequencies in Hz but not specifying the sampling rate is meaningless. And no, those do not look correct. You have weird artefacts at what appears to be the pixel level and the distributions do not look remotely correct. And unless you show your input signals and your code, you quite certainly won't get any deeper insight than this. $\endgroup$ – Jazzmaniac Apr 13 '16 at 18:29
  • $\begingroup$ It looks like you provided us with a nice looking graphics, but without any axes. Please consider updating them. $\endgroup$ – jojek Apr 13 '16 at 19:35
  • $\begingroup$ Hi there, there is certainty that it's a bug, i thought it was aliasing due to the window size being only 128 samples... However JM is right there is indeed an error. I have edited the question and provided the code. Can you please confirm that the get_my_signal generated array should work isntead of a .raw file? $\endgroup$ – com.prehensible Apr 13 '16 at 19:51
  • $\begingroup$ Thanks jojek regarding the graphics, it's actually a 2d graph supplied to the geometry shader of the graphics card, so all the dots are vertices. $\endgroup$ – com.prehensible Apr 13 '16 at 20:04
  • 1
    $\begingroup$ I am getting well proportioned graphs now, sometimes the solution is so easy!!! i had to divide the output figures by 20 in order to not multiply all the transients into a mess. So now i am getting super clear straight lines, the last trouble is to figure out why a srate of 44100 is giving me the same as with 441hz and 120hz sine is dissapearing off the graph altogher... don't know why it could be de-tuned. Thanks i am onto something now. display in graphics card is awesome it enables fast zooming and brightness contrans adn post processing via ultra fast gpu parallel tricks very nice! $\endgroup$ – com.prehensible Apr 14 '16 at 18:20
1
$\begingroup$

The graph is over amplified. If the image in blue is divided by factor of 20, the transients vanish and only a line of the detected frequency is visible.

$\endgroup$
1
$\begingroup$

Is smoothed Wigner-Ville the same as smoothed pseudo Wigner-Ville?...

The Wigner-Ville is calculated using a window length that is the same as the signal length. The pseudo Wigner-Ville is computed using a window length that is shorter than the signal length.

So, no, they are not the same as they are smoothing two different things.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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