psd units convertion: dB/Hz into ms^2
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Guglielmo
el 14 de Feb. de 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 comentarios
Ajay Kumar
el 30 de Sept. de 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175144/image.jpeg)
I want Y-axis in (m/s2)2/Hz
0 comentarios
Ver también
Categorías
Más información sobre Spectral Estimation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!