Bandpass filter

15 Ansichten (letzte 30 Tage)
Magda
Magda am 7 Mär. 2012
I would like to filter out from my signal, what goes beyond the frequency range eg. 2-11 Hz. If someone could give me some advices on how to design such a filter?

Akzeptierte Antwort

Wayne King
Wayne King am 7 Mär. 2012
Hi Magda, We need to know your sampling frequency to give some exact code, but I'll give you a general example and assume a sampling frequency.
I'll assume the data are sampled at 200 Hz. Again you need to use the correct sampling frequency. I'll simply choose to use 40 dB of attenuation in the stopband.
d = fdesign.bandpass('Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2',1,2,11,12,40,0.5,40,200);
Hd = design(d);
fvtool(Hd); % view the filter magnitude response
% filter data with filter()
output = filter(Hd,input);
Note that
Hd = design(d,'butter');
gives a less expensive (computationally) IIR design. Depending on your sampling frequency and how much attenuation you need, your design can be very expensive.
  1 Kommentar
Magda
Magda am 7 Mär. 2012
Thanks a lot! This is what I need.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by