Digital filter using code
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I am trying to design a simple low pass digital filter (IIR or FIR) with the following characteristics. I would like to plot the filters response and calculate its transfer function.
Order(N) = 2
Band pass frequency (normalized)(wp)= 0.1
Band pass attenuation(ap) = 0dB(or as close as possible)
Stop band frequency (sf) = 0.4
Stop band attenuation (as) = at least -30dB
I have tried several methods but with such a low order I am finding it difficult to achieve these characteristics.
I would like to try and achieve this using Matlab code only, although I have tried using the digital filter design toolbox but still could not achieve the filter characteristics.
Any help would be greatly appreciated.
Thanks
2 Kommentare
Wayne King
am 20 Dez. 2013
Please tell us which version of MATLAB you are using? When you say "digital filter design toolbox" do you mean the old MathWorks' Filter Design Toolbox?
Antworten (1)
Wayne King
am 20 Dez. 2013
Bearbeitet: Wayne King
am 20 Dez. 2013
It's going to be difficult to get a good lowpass filter with such a low order (even IIR)
FIR:
d = fdesign.lowpass('N,Fp,Ap,Ast',2,0.1,0.5,30);
Hd = design(d);
fvtool(Hd)
% requires DSP System Toolbox -- this gets you very close but you have to increase order bit
d = fdesign.lowpass('N,Fp,Fst,Ast',4,0.1,0.4,30);
Hd = design(d);
If you enter:
measure(Hd)
You get
Passband Edge : 0.1
3-dB Point : 0
6-dB Point : 0
Stopband Edge : 0.4
Passband Ripple : 0.73383 dB
Stopband Atten. : 29.9978 dB
Transition Width : 0.3
0 Kommentare
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!