02.10.2019 Views

UploadFile_6417

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

404 Chapter 8 IIR FILTER DESIGN<br />

which returns zeros in z array, poles in p array, and the gain value k.<br />

However, we need an unnormalized Butterworth filter with arbitrary Ω c .<br />

From Example 8.1 we observe that there are no zeros and that the poles<br />

of the unnormalized filter are on a circle with radius Ω c instead of on a<br />

unit circle. This means that we have to scale the array p of the normalized<br />

filter by Ω c and the gain k by Ω N c .Inthe following function, called<br />

U buttap(N,Omegac), wedesign the unnormalized Butterworth analog<br />

prototype filter.<br />

function [b,a] = u_buttap(N,Omegac);<br />

% Unnormalized Butterworth Analog Lowpass Filter Prototype<br />

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

% [b,a] = u_buttap(N,Omegac);<br />

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

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

% N = Order of the Butterworth Filter<br />

% Omegac = Cutoff frequency in radians/sec<br />

%<br />

[z,p,k] = buttap(N);<br />

p = p*Omegac;<br />

k = k*Omegac^N;<br />

B = real(poly(z));<br />

b0 = k; b = k*B; a = real(poly(p));<br />

This function provides a direct form (or numerator-denominator) structure.<br />

Often we also need a cascade form structure. In Chapter 6 we have<br />

already studied how to convert a direct form into a cascade form. The<br />

following sdir2cas function describes the procedure that is suitable for<br />

analog filters.<br />

function [C,B,A] = sdir2cas(b,a);<br />

% DIRECT-form to CASCADE-form conversion in s-plane<br />

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

% [C,B,A] = sdir2cas(b,a)<br />

% C = gain coefficient<br />

% B = K by 3 matrix of real coefficients containing bk’s<br />

% A = K by 3 matrix of real coefficients containing ak’s<br />

% b = numerator polynomial coefficients of DIRECT form<br />

% a = denominator polynomial coefficients of DIRECT form<br />

%<br />

Na = length(a)-1; Nb = length(b)-1;<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

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

Saved successfully!

Ooh no, something went wrong!