Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help understanding code

Status
Not open for further replies.

bjmoloi

Newbie level 3
Joined
Jun 8, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
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]);
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top