필터 지우기
필터 지우기

setting coefficients of particular frequency components to zero

조회 수: 1 (최근 30일)
Stefan
Stefan 2014년 8월 6일
댓글: Chad Greene 2014년 8월 6일
Hello,
How to set the set the coefficients of particular frequency components to zero of a signal(for example coeffcients of from 1) 0.2Hz to 0.5Hz 2)0.8 to 6Hz frequency components coefficients to zero.
How to convert bakc iti into time domain after removing the frequency compoents coefficients.
Can I someone explain this with an example.
Thanks.
  댓글 수: 4
Star Strider
Star Strider 2014년 8월 6일
You need to design two separate notch filters, then cascade them. Your resulting digital filter will filter them in the time domain, so no conversion back to the time domain will be necessary. See the documentation for the Signal Processing Toolbox for details.
Stefan
Stefan 2014년 8월 6일
Thankyou for your suggestions.
Can someone explain me how to do this for the attached data.

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

답변 (1개)

Chad Greene
Chad Greene 2014년 8월 6일
fs = 10; % Hz sampling rate (I made this up, you need to fix it)
filteredSignal = bandstop_butterworth(signal_data,[.2 .5],fs,1);
plot(signal_data,'b')
hold on
plot(filteredSignal,'r')
  댓글 수: 7
Stefan
Stefan 2014년 8월 6일
Thanks for the explanation.
Can you please suggest me any solution for this(if there is one). Any alternate methods to filter only a particular frequency components.
Chad Greene
Chad Greene 2014년 8월 6일
I can't think of any physically-reasonable methods. Think about a mass oscillating on a spring. It naturally wants to make smooth arcs as it swings, and it would take energy to stop or sharply divert the mass as it moves. Your signal abruptly stops at y=0 as if someone put energy into stopping a mass. If you remove some frequency energy from your signal you'll essentially be taking away some of the energy that it would take to stop a swinging mass. If you want a brute-force method of keeping a filtered signal from going to zero, you can end the lines of code you've already created with
finalsignal(finalsignal<0)=0;

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

카테고리

Help CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by