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.

Lowpass Filter Design Using MATLAB 447<br />

The system function is<br />

H(z) = 0.1797 ( 1+0.5574z −1 + z −2)( 1 − 1.0671z −1 + z −2)<br />

(1 − 0.4183z −1 +0.1503z −2 )(1− 1.1325z −1 +0.7183z −2 )<br />

which is the same as in Example 8.19. The frequency-domain plots were shown<br />

in Figure 8.28.<br />

□<br />

□ EXAMPLE 8.24 Digital elliptic lowpass filter design:<br />

>> % Digital Filter Specifications:<br />

>> wp = 0.2*pi; %digital Passband freq in rad<br />

>> ws = 0.3*pi; %digital Stopband freq in rad<br />

>> Rp = 1; %Passband ripple in dB<br />

>> As = 15; %Stopband attenuation in dB<br />

>> % Analog Prototype Specifications:<br />

>> T = 1; %Set T=1<br />

>> OmegaP = (2/T)*tan(wp/2); %Prewarp Prototype Passband freq<br />

>> OmegaS = (2/T)*tan(ws/2); %Prewarp Prototype Stopband freq<br />

>> % Analog Elliptic Filter order calculations:<br />

>> ep = sqrt(10^(Rp/10)-1); %Passband Ripple Factor<br />

>> A = 10^(As/20); %Stopband Attenuation Factor<br />

>> OmegaC = OmegaP; %Analog Prototype Cutoff freq<br />

>> k = OmegaP/OmegaS; %Analog Prototype Transition Ratio;<br />

>> k1 = ep/sqrt(A*A-1); %Analog Prototype Intermediate cal.<br />

>> capk = ellipke([k.^2 1-k.^2]);<br />

>> capk1 = ellipke([(k1 .^2) 1-(k1 .^2)]);<br />

>> N = ceil(capk(1)*capk1(2)/(capk(2)*capk1(1)));<br />

>> fprintf(’\n*** Elliptic Filter Order = %2.0f \n’,N)<br />

*** Elliptic Filter Order = 3<br />

>> % Digital Elliptic Filter Design:<br />

>> wn = wp/pi; %Digital Passband freq in pi units<br />

>> [b,a]=ellip(N,Rp,As,wn); [b0,B,A] = dir2cas(b,a)<br />

b0 = 0.1214<br />

B = 1.0000 -1.4211 1.0000<br />

1.0000 1.0000 0<br />

A = 1.0000 -1.4928 0.8612<br />

1.0000 -0.6183 0<br />

The system function is<br />

H(z) = 0.1214 ( 1 − 1.4211z −1 + z −2)( 1+z −1)<br />

(1 − 1.4928z −1 +0.8612z −2 )(1− 0.6183z −1 )<br />

which is the same as in Example 8.20. The frequency-domain plots were shown<br />

in Figure 8.29.<br />

□<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!