Power spectrum with pwelch & question about Parseval's

조회 수: 3 (최근 30일)
AR
AR 2022년 8월 26일
댓글: AR 2022년 8월 26일
I have xt, a complex sequence of size length N. I use the pwelch function to compute a PSD, using
[yf, ys] = pwelch(xt, w, 0, fsize, fs, 'centered')
fs is the sampling rate. fsize is the fftsize, which is set such that I have some 300 averages or so (say N/300). w is some window function with the same number of points as fsize. Freq resolution on the spectrum is fs/fsize = fstep, say.
I estimate power in the spectrum as sum(ys)*fstep. I want to estimate the power in xt, and expect to find equivalence (by Parseval's relationship). I estimate this as: sum(abs(xt).^2). The two powers are not equal, and bear no sensible relationship to each other either. I have tried 7 different sequences for xt. Power(xt) > Power(ys) by factors ranging from 216 to 1670.
Further, when I upsample xt by a factor of 4, I find that sum(abs(xt_upsampled).^2) is 4 times greater than sum(abs(xt).^2). This is using the resample command. I thought resample was supposed to normalize the power. I am now very uncertain how to estimate power in the time-domain. Any suggestions? Does pwelch do something that invalidates Parseval's or am I wrongly applying it?
  댓글 수: 2
AR
AR 2022년 8월 26일
I just realized that the power estimate from xt was actually energy, and that I haven't accounted for time. So let me rework that and come back if there's still some problem.
AR
AR 2022년 8월 26일
Following up, once the power estimate is corrected as sum(abs(xt).^2)/(fs*total_time_length), it is correct and matches the spectral estimate. One could also just use the bandpower function. Apologize for not having thought about this properly before asking - please scratch the question if that makes sense.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Estimation에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by