Does the PWELCH function provide unbiased estimation of the power spectral density?

Illustration
Teagan - 2021-03-18T10:44:59+00:00
Question: Does the PWELCH function provide unbiased estimation of the power spectral density?

I would like to know if I need to multiply the result of PWELCH by "norm(w)^2/sum(w)^2", where w is the window vector?   Also, I would like to know if the old function PSD can be used together with "norm(w)^2/sum(w)^2" to get the unbiased estimation of the power spectral density.

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

The PWELCH function implements Welch's method of power spectrum estimation.
 
Welch's method yields a biased estimate, (see for example Hayes, M. Statistical Digital Signal Processing and Modeling,
 
Wiley, 1996, pg. 419) although it is unbiased when the data is white noise, and asymptotically unbiased for any stationary data.
 
Under certain conditions - namely, if the width of window is narrow with respect to the spacing between a certain spectral peak and other spectral features - the bias can be approximated to (sum(w)^2/norm(w)^2)*unbiased value.
 
However, this does NOT mean that you can eliminate the bias of a particular estimate by accounting for the scale factor. It means that ON AVERAGE, if you scale appropriately, your estimate will be approximately unbiased. How that would affects a particular estimate depends on the variance of your estimator.
 
For practical purposes this is only useful if the variance of your estimator is small. The variance of Welch's method depends on both the overlap used and the window chosen for the estimate (see reference above).
 
 
 
pxx = pwelch(x) returns the power spectral density (PSD) estimate, pxx, of the input signal, x, found using Welch's overlapped segment averaging estimator. When x is a vector, it is treated as a single channel. When x is a matrix, the PSD is computed independently for each column and stored in the corresponding column of pxx. If x is real-valued, pxx is a one-sided PSD estimate. If x is complex-valued, pxx is a two-sided PSD estimate. By default, x is divided into the longest possible segments to obtain as close to but not exceed 8 segments with 50% overlap. Each segment is windowed with a Hamming window. The modified periodograms are averaged to obtain the PSD estimate. If you cannot divide the length of x exactly into an integer number of segments with 50% overlap, x is truncated accordingly.
 
 
for example

Obtain the Welch PSD estimate of an input signal consisting of a discrete-time sinusoid with an angular frequency of π/4 rad/sample with additive N(0,1) white noise.

Create a sine wave with an angular frequency of π/4 rad/sample with additive N(0,1) white noise. Reset the random number generator for reproducible results. The signal has a length Nx=320 samples.

rng default

n = 0:319;
x = cos(pi/4*n)+randn(size(n));

Obtain the Welch PSD estimate using the default Hamming window and DFT length. The default segment length is 71 samples and the DFT length is the 256 points yielding a frequency resolution of 2π/256 rad/sample. Because the signal is real-valued, the periodogram is one-sided and there are 256/2+1 points. Plot the Welch PSD estimate.

pxx = pwelch(x);

pwelch(x)

 

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!