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.

Quantization of Filter Coefficients 279<br />

Infinite Precision<br />

16–bit (1+6+9) Precision<br />

1<br />

1<br />

Imaginary Part<br />

0.5<br />

0<br />

−0.5<br />

10<br />

Imaginary Part<br />

0.5<br />

0<br />

−0.5<br />

10<br />

−1<br />

−1<br />

−1 −0.5 0 0.5 1<br />

−1 −0.5 0 0.5 1<br />

Real Part<br />

Real Part<br />

FIGURE 6.31 Pole-zero plots for direct-form structure in Example 6.26<br />

subplot(1,2,2); [HZhat,HPhat,Hlhat] = zplane(1,ahat);<br />

set(HZhat,’color’,’r’,’linewidth’,1); set(HPhat,’color’,’r’,’linewidth’,1);<br />

set(Hlhat,’color’,’w’); title(TITLE,’fontsize’,10,’fontweight’,’bold’);<br />

axis([-1.1,1.1,-1.1,1.1]);<br />

Figure 6.31 shows the pole-zero plots for filters with both infinite and 16-<br />

bit precision coefficients. Clearly, with 16-bit word length, the resulting filter<br />

is completely different from the original one and is unstable. To investigate finite<br />

word-length effect on the cascade-form structure, we first converted the<br />

direct-form coefficients into the cascade-form coefficients using the dir2cas<br />

function, quantized the resulting set of coefficients, and then converted back<br />

to the direct-form for pole-zero plotting. We show results for two different word<br />

lengths. In the first case, we used the same 16-bit word length. Since the cascade<br />

coefficients have smaller integer parts that require only one integer bit,<br />

the number of fractional bits is 14. In the second case we used 9 fractional bits<br />

(same as those in the direct form) for a total word length of 11 bits.<br />

% Cascade form: quantized coefficients: Same N<br />

[b0,B0,A0] = dir2cas(b,a); [BAhat1,L1,B1] = Qcoeff([B0,A0],N);<br />

TITLE1 = sprintf(’%i-bit (1+%i+%i) Precision’,N+1,L1,B1);<br />

Bhat1 = BAhat1(:,1:3); Ahat1 = BAhat1(:,4:6);<br />

[bhat1,ahat1] = cas2dir(b0,Bhat1,Ahat1);<br />

subplot(1,2,1); [HZhat1,HPhat1,Hlhat1] = zplane(bhat1,ahat1);<br />

set(HZhat1,’color’,’g’,’linewidth’,1); set(HPhat1,’color’,’g’,’linewidth’,1);<br />

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

title(TITLE1,’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!