Butterworth filter cut-off frequency
2 views (last 30 days)
Show older comments
Hello,
i wrote this program:
fp=500; %f trans
fs=2000; %f stopband
ap=3; %transition atten
as=22; %stopband atten
nfp = fp/(FS1/2);
nfs = fs/(FS1/2);
[n,Wn] = buttord(nfp,nfs,ap,as) ;
[b,a] = butter(n,Wn);
[bt,at] = lp2lp(b,a,Wo)
fvtool(b,a)
But i would like it to go trough the blue point (exactly [fp,ap] point) instead of green and red - so the "critical point" is near the transition band.
Is there a easy way to modify the code to accomplish it?
I would also need it to work, if "ap" is not necessary 3dB, but e.g. 1dB.
2 Comments
Star Strider
on 23 Nov 2014
Need ‘FS1’ and ‘Wo’.
I’m guessing FS1=1E+4 but I have no idea what ‘Wo’ may be.
Answers (1)
Star Strider
on 23 Nov 2014
It may not be possible to design a Butterworth filter with that much precision. You have to make some tradeoffs to get about 3 db attenuation at 500 Hz. Consider Chebychev and fir filters as well, if you need more definite passbands and stopbands.
Changing to these selected parameters works about as well as anything else I’ve tried:
fp = 230;
n = 3;
ap = 2;
as = 40;
You probably will need to experiment yourself to get the exact characteristics you want. This tends to be heuristic at some point.
I also refer you to the yulewalk function. It lets you design filters with specific passband and stopband characteristics.
0 Comments
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!