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.

278 Chapter 6 IMPLEMENTATION OF DISCRETE-TIME FILTERS<br />

□ EXAMPLE 6.25 Consider the digital resonator in Example 6.24. Determine the change in the<br />

pole locations using MATLAB.<br />

Solution<br />

The filter coefficients, a 1 = −0.9 and a 2 =0.81 can be quantized using<br />

>> x = [-0.9,0.81]; [y,L,B] = Qcoeff(x,3)<br />

y = -0.8750 0.7500<br />

L = 0<br />

B = 3<br />

as expected. Now using the following MATLAB script, we can determine the<br />

change in the location of the poles:<br />

% Unquantized parameters<br />

r = 0.9; theta = pi/3; a1 = -2*r*cos(theta); a2 = r*r;<br />

p1 = r*exp(j*theta); p2 = p1’;<br />

% Quantized parameters: N = 3;<br />

[ahat,L,B] = Qcoeff([a1,a2],3); rhat = sqrt(ahat(2));<br />

thetahat = acos(-ahat(1)/(2*rhat)); p1hat = rhat*exp(j*thetahat); p2 = p1’;<br />

% Changes in pole locations<br />

Dp1 = abs(p1-p1hat)<br />

Dp1 = 0.0344<br />

This is the same as before.<br />

□<br />

□ EXAMPLE 6.26 Consider the following IIR filter with 10 poles closely packed at a radius of<br />

r =0.9 around angles ±45 ◦ with a separation of 5 ◦ . Due to large number of<br />

poles, the denominator coefficients have values that require 6 bits for the integer<br />

part. Using 9 bits for the fractional part for a total of 16-bit representation, we<br />

compute and plot the new locations of poles:<br />

r = 0.9; theta = (pi/180)*[-55:5:-35,35:5:55]’;<br />

p = r*exp(j*theta); a = poly(p); b = 1;<br />

% Direct form: quantized coefficients<br />

N = 15; [ahat,L,B] = Qcoeff(a,N);<br />

TITLE = sprintf(’%i-bit (1+%i+%i) Precision’,N+1,L,B);<br />

% Comparison of Pole-Zero Plots<br />

subplot(1,2,1); [HZ,HP,Hl] = zplane(1,a);<br />

set(HZ,’color’,’g’,’linewidth’,1); set(HP,’color’,’g’,’linewidth’,1);<br />

set(Hl,’color’,’w’); axis([-1.1,1.1,-1.1,1.1]);<br />

title(’Infinite Precision’,’fontsize’,10,’fontweight’,’bold’);<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!