Why bandpass filter doesn't do what it supposed to do?
3 ビュー (過去 30 日間)
古いコメントを表示
I created a synthetic signal in Matlab:
t = linspace(0,1,1080);
original = sin(100*2*pi*t)+1;
Then I added some noise to the signal with frequency of 5 Hz and 500 Hz.
LFnoise = sin(5*2*pi*t)+1;
HFnoise = sin(500*2*pi*t)+1;
s_noisy = original+LFnoise+HFnoise;
and the I applied the bandpass filter to remove noise and recover my original signal back as follows:
s_filtered = bandpass(s_noisy,[20 400],1080);
and what I get is not my original signal! Why is that?
I need to bandpass filter my signal with a cutoff of [20 400]. How to do that?
2 件のコメント
回答 (1 件)
Star Strider
2021 年 11 月 8 日
I do not see what the problem is.
t = linspace(0,1,1080);
original = sin(100*2*pi*t)+1;
LFnoise = sin(5*2*pi*t)+1;
HFnoise = sin(500*2*pi*t)+1;
s_noisy = original+LFnoise+HFnoise;
s_filtered = bandpass(s_noisy,[20 400],1080);
figure
plot(t, s_noisy, '-b', t, s_filtered,'-r')
grid
xlim([0 0.1]) % 'Zoom' To Show Detail
legend('Noisy','Filtered', 'Location','best')
To me, it appears that the filter works as designed.
.
2 件のコメント
Star Strider
2021 年 11 月 8 日
The filter eliminated the D-C (constant) offset from the original signal, since the D-C component was beyond the low-frequency stopband of the filter. (Properly designed bandpass filters always do this.) Also, there is some heterodyning of the noise signals with the original signal, and that appears as part of the filtered signal (see the Wikipedia article section on Angle sum and difference identities). The result being that the filter cannot completely reproduce the original signal, however it comes close enough.
参考
カテゴリ
Help Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!