Filter Coefficients for ButterWorth Low pass filter
8 ビュー (過去 30 日間)
古いコメントを表示
I am new to Digital Filter. I want to know filter Coefficients calculation formula manually for second order Butter Worth Low pass Filter.
And also i want to know sampling and cutoff frequency apply for the input signal. But i know fs > 2fmax for sampling is it correct or not.
Thanks in Advance,
0 件のコメント
回答 (1 件)
Jan
2013 年 4 月 29 日
編集済み: Jan
2013 年 4 月 29 日
Do you really need the "filter coefficients calculations formula", or would is be satisfying already to call the function butter() to determine the coefficients?
The sampling frequency depends on your data, and therefore this cannot be answered by the forum, but by yourself only. The cut-off frequency depends on the wanted frequency spectrum, such that it is impossible for us to guess it. The cutoff frequency cannot be higher than the half frame rate - this is more or less obvious e.g. trying to filter a signal at 1kHz must fail, when it has been recorded at 1Hz only.
[EDITED] A boiled down 2nd order Butterworth filter algorithm:
function [B, A] = myButter2ndOrder(W)
V = tan(W * 1.5707963267948966);
Sg = V ^ 2;
Sp = V * [-1-1i, -1+1i] / sqrt(2);
% Bilinear transform:
P = (1 + Sp) ./ (1 - Sp);
G = real(Sg / prod(1 - Sp));
% From Zeros, Poles and Gain to numerator and denominator:
B = G * [1, 2, 1];
A = real(poly(P));
W is the cut-off frequency in the range 0 < W < 1, so it is relative to the half sample frequency.
3 件のコメント
Jan
2013 年 4 月 29 日
Please note, that the value of the signal does not allow to determine the filter coefficients. Neither sampling nor cut-off frequency can be determined based on the values of the signal. The sampling frequency must be provided separately and the cut-off frequency depends on your needs and it is impossible to guess them.
I cannot understand, why you want the formula to calculate the filter parameters, but the implementation in the function butter() does not satisfy you. This function contains an efficient and stable implementation, so what do you want instead?
Jan
2013 年 4 月 30 日
編集済み: Jan
2013 年 4 月 30 日
@Crystal: Sorry, I'm not going to post more answers in this thread. It is a waste of my time if you offer the specifications of your question part by part only. If you want to know, what happens inside butter(), simply open this function in the editor and read it. Good luck.
参考
カテゴリ
Help Center および File Exchange で Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!