bjmoloi
Newbie level 3
hi i need help understanding this code, the code works perfectly, i am just not sure what the part highlighted in red does specifically, ie Qd, alpha values. thanx for the help
%%code
function [B,A] = bandpass(Fc, Fs, N)
%butterworth 2N order 1/3 third octave bandpas filter
Fpass = Fc/(2^(1/6));
Fstop = Fc*(2^(1/6));
Qr = Fc/(Fstop-Fpass);
Qd = (PI/2/N)/(SIN(PI/2/N))*Qr;
alpha = (1+SQRT(1+4*QD^2))/2/Qd;
W1 = Fc/(Fs/2)/alpha;
W2 = Fc/(Fs/2)*alpha;
[B,A] = butter(N, [W1 W2]);
%%code
function [B,A] = bandpass(Fc, Fs, N)
%butterworth 2N order 1/3 third octave bandpas filter
Fpass = Fc/(2^(1/6));
Fstop = Fc*(2^(1/6));
Qr = Fc/(Fstop-Fpass);
Qd = (PI/2/N)/(SIN(PI/2/N))*Qr;
alpha = (1+SQRT(1+4*QD^2))/2/Qd;
W1 = Fc/(Fs/2)/alpha;
W2 = Fc/(Fs/2)*alpha;
[B,A] = butter(N, [W1 W2]);