How to design a filter to pass frequencies between 0 and 12Hz

3 ビュー (過去 30 日間)
HF
HF 2020 年 10 月 29 日
回答済み: Star Strider 2020 年 10 月 30 日
Hello, I trying to design a filter in order to allow only certain frequency to pass the filter. I have a set of data and I am only interested in frequencies between 0 and 12Hz.
My approach was following:
filtCoeff = designfilt('bandstopiir', 'FilterOrder', 20,...
'HalfPowerFrequency1',11, 'HalfPowerFrequency2',498,...
'SampleRate', Fs);
acc_x = filter(filtCoeff,acc_x_unfiltered);
acc_y = filter(filtCoeff,acc_y_unfiltered);
Is this correct? Can someone help me?
Thank you in advance!

採用された回答

Star Strider
Star Strider 2020 年 10 月 30 日
If you only want to pass 0 Hz to 12 Hz, and you have R2018a or later, use the lowpass function. If you want to reject those frequencies, use the related highpass function (linked to at the end of the lowpass documentation page).

その他の回答 (1 件)

Sriram Tadavarty
Sriram Tadavarty 2020 年 10 月 30 日
Hi Hishan,
You can confirm if your filter designed meets the requirements, by looking at the frequency response of the filter using FVTool or freqz or any equivalent.
For easy way of designing a filter with required specifications, i suggest to use Filter Designer. This is a GUI interface showing the frequency response there itself.
For more insighits of designing a practical filter, you can look over this.
Hope this helps.
Regards,
Sriram

カテゴリ

Help Center および File ExchangeFilter Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by