Why is wvd output time vector twice the size of the input

4 Ansichten (letzte 30 Tage)
Jacob
Jacob am 23 Sep. 2021
Kommentiert: Prachi Kulkarni am 27 Okt. 2021
Dear community,
Background: I want to demonstrate energy conservation in the Wigner-Ville distribution by comparing the variance of the time signal with the sum of the time marginal of the WVD.
Problem: Looking at the output from the wvd function, I see twice as many time samples as are in the input (and the same goes for the frequencies by the way). I have made a small example code below. Even if the hilbert transform is implicitly applied (which a glance at wvd.m seems to imply - why is this enforced and not an option by the way?) I don't see why this should yield twice the number of time samples in the output. Can anyone explain this behavior?
That being said, energy is conserved despite the difference in number of samples, I just need to normalize by the size of the output. I just find it hard to explain if I don't understand the size of the output...
Hope someone can help clarify.
Thanks in advance.
Best, Jacob
>> t = 0:0.01:0.99;
>> x = sin(2*pi*30*t);
>> [dOut,fOut,tOut] = wvd(x, 100);
>> size(t)
ans =
1 100
>> size(tOut)
ans =
200 1

Antworten (1)

Prachi Kulkarni
Prachi Kulkarni am 19 Okt. 2021
Hi,
The output time vector tOut of the wvd function is twice the size of the input because the default value for the NumTimePoints argument is 4*ceil(length(x)/2).
Please refer to the following documentation for details about how to change the value of NumTimePoints.
  2 Kommentare
Jacob
Jacob am 27 Okt. 2021
Hi,
Thank you for the answer.
However, I am trying to compute the "unsmoothed" WVD, and the NumTimePoints parameter can only be set when using the smoothedPseudo argument. Hence, apparently naïvely, I would expect that NumTimePoints was only honored when using smoothedPseudo, and not when I have no control of the parameter.
In the first paragraph of wvd help I do see that "By default, the output D is a L-by-2L matrix where L = 2*ceil(length(X)/2)". I just find this behaviour odd, when it cannot be changed - especially when using Matlab in a teaching situation.
So I guess my posts boils down to the (related) questions:
1) With all due respect, why have Mathworks decided that I ALWAYS want my input data to be oversampled by x2? What is the rationale behind this decision?
2) Why is it not possible to change this behavior?
Best, Jacob
Prachi Kulkarni
Prachi Kulkarni am 27 Okt. 2021
Hi,
According to the theory, the WVD is the Fourier transform of the instantaneous autocorrelation of the signal. The instantaneous autocorrelation can be non-zero as long as the signal can overlap with itself. Hence, as per theory, the length of the output time vector is twice the length of the input time vector.
In the smoothed pseudo WVD, the length of the window is varied to give more weightage to neighbouring time points. Hence, the number of time points can be varied for the smoothed pseudo WVD.
Please refer to the references given at the bottom of the wvd documentation for the relevant theory.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by