02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

408 Chapter 8 IIR FILTER DESIGN<br />

8.3.4 MATLAB IMPLEMENTATION<br />

The preceding design procedure can be implemented in MATLAB as a<br />

simple function. Using the U buttap function, we provide the afd butt<br />

function to design an analog Butterworth lowpass filter, given its specifications.<br />

This function uses (8.50).<br />

function [b,a] = afd_butt(Wp,Ws,Rp,As);<br />

% Analog Lowpass Filter Design: Butterworth<br />

% -----------------------------------------<br />

% [b,a] = afd_butt(Wp,Ws,Rp,As);<br />

% b = Numerator coefficients of Ha(s)<br />

% a = Denominator coefficients of Ha(s)<br />

% Wp = Passband edge frequency in rad/sec; Wp > 0<br />

% Ws = Stopband edge frequency in rad/sec; Ws > Wp > 0<br />

% Rp = Passband ripple in +dB; (Rp > 0)<br />

% As = Stopband attenuation in +dB; (As > 0)<br />

%<br />

if Wp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!