How to do PSD measuremnet for the given signal
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am doing PSD (ms2) analysis for the frequency spectrum attached in the figure. I am able to find PSD but the results are not in PSD(ms2).
Here is the code:
figure
[pxx,f] = pwelch(rwave_decimate_1,[],[],[],fs/N);
%the mean
mean = 0;
for i=1:length(pxx)
mean = mean + pxx(i);
end
M = mean/length(pxx);
%the Varaince
var = 0;
for j=1:length(pxx)
var = var + (pxx(j)-M)^2;
end
V = var/length(pxx);
plot(f,pxx)
It plots the PSD as in the attached figure. however, I want PSD in (ms2 or s2) on yaxis as in the figure 2, to make proper analysis on LF/HF region. Also, how can I highlight the LF and HF region with some shadded areas as in the figure2 ?
:- ms2 = mean-variance square
it would be appreciated if someone give solution.
Thanks in the advacnce.
2 个评论
dpb
2021-7-5
M=mean(pxx);
V=var(pxx);
Don't use mean as a variable that aliases the builtin mean function in MATLAB.
回答(1 个)
Arthi Sathyamurthi
2021-7-19
Hello Sarfaraz,
The units of the PSD estimate from the pwelch function are in squared magnitude units of the time series data per unit frequency. Thus, if the input data, rwave_decimate is in ms and the sample rate given as fs/N is in Hz, the PSD estimate which in your case pxx, ms^2/Hz.
3 个评论
Arthi Sathyamurthi
2021-7-20
If the input data, rwave_decimate is in ms and the sample rate given as fs/N is in Hz, the PSD estimate pxx will be in ms^2/Hz.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!