필터 지우기
필터 지우기

how to calculate and plot power spectral density of a given signal

조회 수: 77 (최근 30일)
arash
arash 2014년 2월 5일
댓글: Rahul Gulia 2023년 1월 3일
I have signal and i want to plot it's power spectral density , What should i do? is it right if i first calculate the FFT of a signal and then get the square abs of it's value?
  댓글 수: 1
Rahul Gulia
Rahul Gulia 2023년 1월 3일
Yes, I agree. We need to take the FFT to get its frequency components and then generate its absolute value plot to learn about its PSD.

댓글을 달려면 로그인하십시오.

채택된 답변

Wayne King
Wayne King 2014년 2월 5일
편집: Wayne King 2014년 2월 5일
If you have the Signal Processing Toolbox, it is easiest to use periodogram().
That handles all the scaling for you.
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*100*t)+randn(size(t));
[Pxx,F] = periodogram(x,[],length(x),Fs);
plot(F,10*log10(Pxx))
If you do not have the Signal Processing Toolbox, the PSD is proportional to the absolute value squared of the DFT (calculated by fft())
For more information on that scaling, please see:

추가 답변 (0개)

카테고리

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