필터 지우기
필터 지우기

Why bandpass filter doesn't do what it supposed to do?

조회 수: 4 (최근 30일)
azarang asadi
azarang asadi 2021년 11월 8일
댓글: Star Strider 2021년 11월 8일
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
Dave B
Dave B 2021년 11월 8일
Your original signal was at 1Hz...so it's not in the pass band?
azarang asadi
azarang asadi 2021년 11월 8일
fixed it but still I have the same problem

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

답변 (1개)

Star Strider
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
azarang asadi
azarang asadi 2021년 11월 8일
The original signal is way different than the filtered one. Also my original signal is positive, how do I end up with negative for filtered signal?
Star Strider
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 CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by