How to define Passband and Stopband Attenuation of an IIR Butterworth Filter?
34 次查看(过去 30 天)
显示 更早的评论
I want to filter real acceleration data. I have to remove the very low frequencies <1Hz that are dominating my frequency plot. I have designed a HighPass Butterworth IIR Filter usign designfilt, but I don't understand the meaning of stopband and passband attenuation. I know that attenuation at cuttoff is 3db, but how can I calculate the passband and stopband attenuation if I have defined the bandpass frequency and cutoff frequency.
My way of defining the Astop and Apass until now was by guessing, but I guess this is not the correct way of defining these. I would like to know how they can be calculated properly?
This is the PSD of raw acceleration data.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170243/image.jpeg)
This is the PSD of the filtered data.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170245/image.jpeg)
Also, this is the code I have used to define the filter
% Sampling frequency in Hz
Fs = 5000;
% Filter order
Nf = 1;
% Band-pass frequency in Hz
Fpass = 1000;
% Cut-off frequency in Hz
Fstop = 0.6;
% Passband attenuation in dB
Apass = 1;
% Stopband attenuation in dB
Astop = 10;
% Design the filter using designfilt
HighPassIIRButterworth = designfilt('highpassiir','PassbandFrequency',Fpass,...
'StopbandFrequency',Fstop,'PassbandRipple',Apass,'StopbandAttenuation',...
Astop,'SampleRate',Fs,'DesignMethod','butter');
% View the filter
fvtool(HighPassIIRButterworth)
0 个评论
回答(1 个)
Shashank
2018-2-15
编辑:Shashank
2018-2-15
This depends on the filter that you are designing. Generally, it is called Passband ripple and stopband attenuation.
The passband ripple is the amount of variation in the amplitude, within the designated passband of the filter, and stopband attenuation is the minimum attenuation level with the designated rejection band of the filter.
I would suggest you to follow this tutorial to understand more about this:
0 个评论
另请参阅
类别
在 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!