How pwelch window affects PSD shape
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a question regarding behavior of pwelch function. Here is an example. I have a data from a gyroscope collected over the period of 30 minutes with 500 Hz sampling rate (2 msec sampling). I would like to plot PSD of the collected data.
[Pxx_1k, f_1k] = pwelch(data,1000,[],[], 500);
[Pxx_20k, f_20k] = pwelch(data,20000,[],[], 500);
[Pxx_100k, f_100k] = pwelch(data,100000,[],[], 500);
loglog(f_1k, Pxx_1k, f_20k, Pxx_20k, f_100k, Pxx_100k);
legend('1k window', '20k window', '100k window');
xlabel('Frequency, Hz', 'FontSize', 20);
ylabel('Power Density, rad^2/Hz', 'FontSize', 20);
As one can see from the code I run pwelch function on my set of data 3 times with different window sizes: 1k corresponds to 0.5 seconds intervals (1 Hz Nyquist frequency ) , 20k - 10 sec intervals (0.2 Hz Nyquist frequency), 100k - 200 sec intervals (0.01 Hz Nyquist). I am surprised that the PSDs are all different by order of magnitude at same frequencies. Does this happen because the total power of the signal is preserved? Therefore total energy of the signal is distributed between frequency bins and in case of higher number of frequency bins PSD looks "lower" compared to small number of freq. bins? What would be the best practice to get rid off this "window size dependence"? Thanks a lot K
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!