I am doing some spectrum analysis and I am thinking of using the pwelch function with a hann window. Now, I understand that application of a window reduces the power of the signal, so usually a correction or scaling factor has to be applied.
My question is, does anyone know if the pwelch function applies this correction factor? I implemented my own welch function to compare and the result is identical, except that MATLAB's pwelch function seems to ignore the correction factor (or I am doing something wrong)
Thank you,
What makes you think you need a correction factor?
Instead of replicating what matlab does, read up on
the method you play with.
Rune
Rune,
The motivation for the correction factor comes from the fact that windowing reduces the power of the signal, therefore, the power of the psd is much lower than that of the unwindowed signal. Another way of looking at it is that the correction factor makes the power spectrum estimate asymptotically unbiased (See Hayes, Statistical Digital Signal Processing and Modeling for a reference).
Also, I read the documentation for the function, and I think my question is a fair one. I could just blindly use the function as is, but then I lose a learning opportunity.
My point is that in the applications where spectrum estimation
methods like Welch's method are used, the main focus is to get
an *impression* of the spectrum shape. The exact numbers are
irrelevant.
As I said, read up on the methods.
Rune
Thank you Rune. I think your point about getting the "impression" of the spectrum is a valid one. However, you keep implying that I am not reading the documentation. But I am and it says:
"Pxx is the distribution of power per unit frequency. For real signals, pwelch returns the one-sided PSD by default; ... Note that a one-sided PSD contains the total power of the input signal."
So once again, I am questioning whether or not the PSD does in fact contain the total power of the input signal. Maybe I am missing something fundamental, but again, I think it is a fair question.
http://www.mathworks.com/support/solutions/en/data/1-17M0Q/index.html?product=SG&solution=1-17M0Q