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.

470 Chapter 8 IIR FILTER DESIGN<br />

function [wpLP,wsLP,alpha] = bp2lpfre(wpbp,wsblp)<br />

% Band-edge frequency conversion from bandpass to lowpass digital filter<br />

% [wpLP,wsLP,a] = bp2lpfre(wpbp,wsbp)<br />

% wpLP = passband egde for the lowpass prototype<br />

% wsLP = stopband egde for the lowpass prototype<br />

% alpha = lowpass to highpass transformation parameter<br />

% wpbp = passband egde frequency array [wp_lower, wp_upper] for the bandpass<br />

% wsbp = passband egde frequency array [ws_lower, ws_upper] for the bandpass<br />

Using this function, develop a MATLAB function to design a bandpass filter from a<br />

prototype lowpass digital filter using the bilinear transformation. The format of this<br />

function should be<br />

function [b,a] = dbpfd_bl(type,wp,ws,Rp,As)<br />

% IIR bandpass filter design using bilinear transformation<br />

% [b,a] = dbpfd_bl(type,wp,ws,Rp,As)<br />

% type = ’butter’ or ’cheby1’ or ’chevy2’ or ’ellip’<br />

% b = Numerator polynomial of the bandpass filter<br />

% a = Denominator polynomial of the bandpass filter<br />

% wp = Passband frequency array [wp_lower, wp_upper] in radians<br />

% ws = Stopband frequency array [wp_lower, wp_upper] in radians<br />

% Rp = Passband ripple in dB<br />

% As = Stopband attenuation in dB<br />

Verify your function using the design in Problem P8.37.<br />

P8.39 We wish to use the Chebyshev-I prototype to design a bandstop digital IIR filter that meets<br />

the following specifications:<br />

0.95 ≤|H(e jω )|≤1.05, 0 ≤|ω| ≤0.25π<br />

0 ≤|H(e jω )|≤0.01, 0.35π ≤|ω| ≤0.65π<br />

0.95 ≤|H(e jω )|≤1.05, 0.75π ≤|ω| ≤π<br />

Use the cheby1 function and determine the system function H(z) ofsuch a filter. Provide a<br />

plot containing subplots of the log-magnitude response in dB and the impulse response.<br />

P8.40 Write a MATLAB function to determine the lowpass prototype digital filter frequencies<br />

from a bandstop digital filter specifications using the functions given in Table 8.2 and the<br />

procedure outlined for highpass filters. The format of this function should be<br />

function [wpLP,wsLP,alpha] = bs2lpfre(wpbp,wsblp)<br />

% Band-edge frequency conversion from bandstop to lowpass digital filter<br />

% [wpLP,wsLP,a] = bs2lpfre(wpbp,wsbp)<br />

% wpLP = passband egde for the lowpass prototype<br />

% wsLP = stopband egde for the lowpass prototype<br />

% alpha = lowpass to highpass transformation parameter<br />

% wpbp = passband egde frequency array [wp_lower, wp_upper] for the bandstop<br />

% wsbp = passband egde frequency array [ws_lower, ws_upper] for the bandstop<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!