lowpass filter not filtering

3 ビュー (過去 30 日間)
Jay
Jay 2019 年 5 月 27 日
コメント済み: Jay 2019 年 5 月 27 日
Test of low pass filter to filter noise at a much higher frequency than the main signal. Lowpass as I've used it here doesn't seem to filter the data.
t=0:3.13e-8:1e-3;
y=sin(2*pi*200000*t); %noise
y2=sin(2*pi*20000*t); %signal
ysum=y+y2;
plot(t,ysum);
y40khz=lowpass(ysum,40000,1/3.13e-8);
plot(t,y40khz)
A test of this with a smaller ratio of filter to sample frequency works as expected.
tslow=0:1e-5:1e-3;
y=sin(2*pi*20000*tslow);
y2=sin(2*pi*4000*tslow);
ysum=y+y2;
y5khz=lowpass(ysum,5000,1/1e-5);
plot(tslow,ysum)
hold
plot(tslow,y5khz)
Why does the first filter not seem to work while the second example does?

採用された回答

Jan
Jan 2019 年 5 月 27 日
As expected Matlab does filter the data, of course:
t=0:3.13e-8:1e-3;
y=sin(2*pi*200000*t); %noise
y2=sin(2*pi*20000*t); %signal
ysum=y+y2;
y40khz=lowpass(ysum,40000,1/3.13e-8);
plot(t, y40khz - ysum) % Show the difference
ylim([-1.5e-3, 1.5e-3])
According to the chosen filter parameters, the difference is small.
  1 件のコメント
Jay
Jay 2019 年 5 月 27 日
Ok, thank you. Maybe I should have asked what operations should I do to extract the signal from the noisy data in this example? I was thinking that what I had tried would pass frequencies less than 40 kHz and so remove the 200 kHz 'noise'.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by