PSD question

4 ビュー (過去 30 日間)
Baba
Baba 2011 年 11 月 1 日
What are the units of the Y axis of this code? I think it's dB/Hz but I'm not sure.
fs=2000;
Hs=spectrum.periodogram; % Use default values
psdest = psd(Hs,Signal,'Fs',fs);
semilogx(psdest.Frequencies,10*log10(psdest.Data));
grid on;

採用された回答

Wayne King
Wayne King 2011 年 11 月 1 日
Yes, it is dB/Hz.
psdest.Data are the power estimate, proportional to magnitude-squared of the DFT. So 10*log10() is in dB

その他の回答 (1 件)

Wayne King
Wayne King 2011 年 11 月 1 日
Hi, below I provide an example using just the DFT and then applying the proper scaling and the spectrum.periodogram object, so you can see how to do it the "brute force" way.
dt=1/10000;
t=0:dt:.1024-dt; %time vector of length 1024
y=cos(2*pi*1000*t)+randn(size(t));
h=spectrum.periodogram; %spectrum object (periodogram)
psd_est_1side=psd(h,y,'spectrumtype','onesided','Fs',10000);
y_fft=abs(fft(y)).^2;
Y_fft=y_fft(1:513); % we only keep the positive frequencies.
Y_fft=(dt/1024)*Y_fft;
Y_fft(2:end-1)=2*Y_fft(2:end-1);
%compare
plot(psd_est_1side.Frequencies./1000,10*log10(Y_fft));
xlabel('kHz'); ylabel('Power/Hz (dB)'); grid on;
figure;
plot(psd_est_1side);

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by