AutotunerPID Toolkit | ![]() ![]() |
BUTTERDESIGN Butterworth analog lowpass filter design. [B,A] = BUTTERDESIGN(N,Wc) returns the numerator and denominator for an N-th order Butterworth analog with a bandwith Wc. The resulting filter has N poles around the circle of radius Wn in the left half plane, and no zeros. Author: William Spinelli (wspinell@elet.polimi.it) Copyright 2004 W.Spinelli $Revision: 1.0 $ $Date: 2004/02/27 12:00:00 $
0001 function [B,A] = butterdesign(N,Wc) 0002 %BUTTERDESIGN Butterworth analog lowpass filter design. 0003 % [B,A] = BUTTERDESIGN(N,Wc) returns the numerator and denominator for an 0004 % N-th order Butterworth analog with a bandwith Wc. 0005 % The resulting filter has N poles around the circle of radius Wn in the 0006 % left half plane, and no zeros. 0007 % 0008 % Author: William Spinelli (wspinell@elet.polimi.it) 0009 % Copyright 2004 W.Spinelli 0010 % $Revision: 1.0 $ $Date: 2004/02/27 12:00:00 $ 0011 0012 % Poles are on the circle of radius Wn in the left-half plane. 0013 p = Wc*exp(i*(pi*(1:2:N-1)/(2*N) + pi/2)); 0014 p = [p; conj(p)]; 0015 p = p(:); 0016 if rem(N,2)==1, p = [p; -Wc]; end 0017 A = poly(p); 0018 B = real(prod(-p));
![]() | bodePIDcompare | envgui | ![]() |