Hi, I am a recent graduate, intermediate user of MATLAB. I want to design a filter that can say chop down the harmonics of 20Hz but not 20Hz itself. I have been trying using comb notch filter but it chops down my 20Hz frequency as well.
Thanks.

 Akzeptierte Antwort

Wayne King
Wayne King am 19 Jun. 2012

1 Stimme

Hi Deep, I'm assuming that you want to try and only remove the content around the harmonics of 20 Hz, so that a general lowpass filter won't do. I'll assume a sampling frequency of 1 kHz.
Fs = 1000;
d1 = fdesign.notch('N,F0,Q,Ap',6,40,10,1,Fs);
d2 = fdesign.notch('N,F0,Q,Ap',6,60,10,1,Fs);
d3 = fdesign.notch('N,F0,Q,Ap',6,80,10,1,Fs);
Hd1 = design(d1);
Hd2 = design(d2);
Hd3 = design(d3);
Hcas = dfilt.cascade(Hd1,Hd2,Hd3);
fvtool(Hcas,'Fs',Fs);

1 Kommentar

Deep
Deep am 2 Jul. 2012
Hey thanks.
I need some more help if you dont mind. I am trying to design a filter that filters out all the harmonics of 5 Hz and itself with an order of 1500. Fs=5Khz.
Thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by