psd units convertion: dB/Hz into ms^2
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (2)
Guglielmo
le 14 Fév 2012
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.
0 commentaires
Ajay Kumar
le 30 Sep 2016
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
0 commentaires
Voir également
Catégories
En savoir plus sur Parametric Spectral Estimation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!