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.

Problems 377<br />

where coefficients ˜c(n) are given by<br />

c(1) = ˜c(0) − 1 2 ˜c(1),<br />

c(n) = 1 M − 3<br />

[˜c(n − 1) − ˜c(n)] , 2 ≤ n ≤ ,<br />

2 2<br />

( ) M − 1<br />

c<br />

= 1 ( ) M − 3<br />

2 2 ˜c .<br />

2<br />

P7.5 The Type-4 linear-phase FIR filter is characterized by<br />

h(n) =−h(M − 1 − n), 0 ≤ n ≤ M − 1, M even<br />

1. Show that its amplitude response H r(ω) isgiven by<br />

M/2<br />

∑<br />

H r(ω) = d(n) sin { ω ( )}<br />

n − 1 2<br />

n=1<br />

where coefficients {d(n)} are obtained as defined in (7.16).<br />

2. Show that the above H r(ω) can be further expressed as<br />

( ) ω ∑ L<br />

H r(ω) =sin<br />

2<br />

where coefficients ˜d(n) are given by<br />

n=0<br />

d(1) = ˜d(0) − 1 2 ˜d(1),<br />

d(n) = 1 2<br />

)<br />

( M<br />

d<br />

2<br />

˜d(n) cos(ωn), L = M 2 − 1<br />

[ ˜d(n − 1) − ˜d(n)<br />

] , 2 ≤ n ≤<br />

M<br />

2 − 1,<br />

= 1 2 ˜d ( M<br />

2 − 1) .<br />

P7.6 Write a MATLAB function to compute the amplitude response H r(ω) given a linear phase<br />

impulse response h(n). The format of this function should be<br />

function [Hr,w,P,L] = Ampl_Res(h);<br />

% Computes Amplitude response Hr(w) and its polynomial P of order L,<br />

% given a linear-phase FIR filter impulse response h.<br />

% The type of filter is determined automatically by the subroutine.<br />

%<br />

% [Hr,w,P,L] = Ampl_Res(h)<br />

% Hr = Amplitude Response<br />

% w = frequencies between [0 pi] over which Hr is computed<br />

% P = Polynomial coefficients<br />

% L = Order of P<br />

% h = Linear Phase filter impulse response<br />

The function should first determine the type of the linear-phase FIR filter and then use the<br />

appropriate Hr Type# function discussed in this chapter. It should also check if the given<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!