psd units convertion: dB/Hz into ms^2

조회 수: 2 (최근 30일)
Olga
Olga 2012년 2월 7일
답변: Ajay Kumar 2016년 9월 30일
I'm counting PSD of ECG signal with MATLAB. Do you know if there's a possibility that I can convert dB/Hz as it is default in Matlab into ms^2 on my y axis? I'm using this code to do this:
fs = 400;
xdft = fft(odstepRR);
xdft = xdft(1:length(odstepRR)/2+1);
xdft(2:end-1) = 2*xdft(2:end-1);
psdest = 1/(length(odstepRR)*fs)*abs(xdft).^2;
freq = 0:fs/length(odstepRR):fs/2;
plot(freq/100,10*log10(psdest));
grid on;
btw. odstepRR is my vector with NN intervals.

답변 (2개)

Guglielmo
Guglielmo 2012년 2월 14일
Is the starting signal in ms^2? If so with that code you will get (ms^2)^2/Hz, don't forget there is the spectral band.

Ajay Kumar
Ajay Kumar 2016년 9월 30일
See for this Random Road Profile I gave some input Simulink model and I added "to workspace" block I want Results in (m/s2)2/Hz plot this is the code for Random Road
% code
t=0:0.0121:10;
x=zeros(size(t));
z=zeros(2500,length(t));
freq=linspace(0.02*pi,6*pi,2500);
b0=7.8*10^(-8)*((freq).^(-2.1));
a0=sqrt(b0);
p=2*pi*rand(1,2500);
for n=1:2500
x=a0(n).*sin((n*0.628*t)-p(n));
z(n,:)=x;
end
tt=zeros(length(t),2);
tt(:,2)=sum(z);
tt(:,1)=t;
o1=0.1:0.01:3;
p1=4.5e-6*(o1.^(-2.1));
[pp ww]=pwelch(tt(:,2),45,43,[],(1/0.0121));
loglog((ww/(12.5)),(pp*(12.5)),'r',o1,p1,'g')
end
% Now, this is the code for PSD required Peaks
% code
pwelch(fuba,[],[],[],(1/0.0121));
end
The result is
I want Y-axis in (m/s2)2/Hz

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by