How to view the filter coefficients from thebandpass fitler desinged
8 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I designed a bandpass filter as below
d = fdesign.bandpass('N,F3dB1,F3dB2',40,500,1500,6000);
Hd = design(d,'butter');
fvtool(Hd)
But how to get(or see) these filter coefficients. Thanks.
0 件のコメント
採用された回答
Wayne King
2014 年 1 月 30 日
The following will get you very close:
Hd = fdesign.bandpass('N,Fc1,Fc2',40,500,1500,6000);
B = design(Hd);
Compare
fvtool(B,1);
fvtool(BPF_coefficients,1)
0 件のコメント
その他の回答 (2 件)
Wayne King
2014 年 1 月 30 日
Hi Stefan, the filter design here uses second-order sections a matrix of quadratic polynomials in z^{-1}. Each row of Hd.sosMatrix is a polynomial of the form
b_0+b_1z^{-1}+b_2z^{-2}+1+a_1z^{-1}+a_2z^{-2}
This results in a robust IIR design. You can obtain the filter coefficients in the form of B and A vectors by using:
[B,A] = sos2tf(Hd.sosMatrix,Hd.ScaleValues);
However (big however), you should realize that second-order sections are used for a reason and you may find that the resulting B and A design is not as well-behaved as the original SOS design
fvtool(Hd); figure;
fvtool(B,A);
2 件のコメント
thanh nguyen
2020 年 3 月 24 日
Hi, i have an issue with this filter desig too. When i designed a filter as below:
d = fdesign.bandpass('N,F3dB1,F3dB2',40,500,15000,60000);
Hd = design(d,'butter');
fvtool(Hd);
i received the resull as below:![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/279020/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/279020/image.png)
So how can i get the coefficient as in the equatation:
y[n] = b0*x[n] + b1*x[n-1] +...+ bN*x[n-N] - a1*y[n-1] - ... - aM*y[n-M]
参考
カテゴリ
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!