Power spectral density of a under sampled signal

1 回表示 (過去 30 日間)
DIPAN KAR
DIPAN KAR 2020 年 5 月 9 日
編集済み: DIPAN KAR 2020 年 5 月 19 日
Hi ,
I have a under sampled signal x. which is a 2k Hz signal. This same signal is under sampled at 50Hz. I tried to extract to freq response of this signal but as the siganl is sampled below the Nyquest rate I am not able to get it. I also tried with pwelch() function but it is also not giving me correct reasult.
How should I calculate the power spectral density of this signal x?
fs = 50
t = 0:1/fs:2^22- 1/fs;
x = sin(2*pi*2000*t) ;
plot(t,x);
y = fft(x);
f = (0:length(y)-1)*50/length(y)*80;
plot(f,abs(y))
title('Magnitude')
figure(2)
num_segments = 32;
window_length = floor(length(x)/num_segments);
[PSDphase ,f] =pwelch(x ,window_length ,[] ,[] ,50 ,'twosided');
h=semilogx( f, (10* log10(PSDphase)), 'b'); %hold on;
grid on;

回答 (1 件)

Navya Seelam
Navya Seelam 2020 年 5 月 12 日
Increase the sampling frequency of the signal to get expected results. When a signal is undersampled , aliasing happens and hence you are not able to get correct result.
  3 件のコメント
Navya Seelam
Navya Seelam 2020 年 5 月 14 日
Hi,
One thing to notice here is the signal x is of the form sin(2*pi*n) with n being an integer. So x is actually a zero signal or nearly zero signal (due to precision limitations) and we cannot perform any operation on a zero signal.
DIPAN KAR
DIPAN KAR 2020 年 5 月 19 日
編集済み: DIPAN KAR 2020 年 5 月 19 日
Thank you for pointing out the error. But I wanted to do fft of the phase and extract the PSD from it. Is this is the correct way?
fs = 50
t = 0:1/fs:2^22- 1/fs;
x = 2*pi*2000*t;
plot(t,x);
y = fft(x);
f = (0:length(y)-1)*50/length(y)*80;
plot(f,abs(y))
title('Magnitude')
figure(2)
num_segments = 32;
window_length = floor(length(x)/num_segments);
[PSDphase ,f] =pwelch(x ,window_length ,[] ,[] ,50 ,'twosided');
h=semilogx( f, (10* log10(PSDphase)), 'b'); %hold on;
grid on;

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by