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 283<br />

Infinite Precision (DF)<br />

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

Magnitude Response<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Magnitude Response<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

16–bit (1+1+14) Precision (CF)<br />

11–bit (1+1+9) Precision (CF)<br />

Magnitude Response<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

Digital Frequency in π Units<br />

Magnitude plots for direct- and cascade-form structures in Exam-<br />

FIGURE 6.33<br />

ple 6.27<br />

Magnitude Response<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

Digital Frequency in π Units<br />

Solution<br />

Unlike the previous example, some of the filter coefficient values (specifically<br />

those of the autoregressive part) are greater than one and hence require bits for<br />

the integer part. This assignment is done for all coefficients since in practice,<br />

the same bit-pattern is used for the filter representation. These and other steps<br />

are given in the following MATLAB script.<br />

% The following 3 lines produce filter coefficients shown in Table 6.1.<br />

wp = [0.35,0.65]; ws = [0.25,0.75]; Rp = 1; As = 50;<br />

[N, wn] = ellipord(wp, ws, Rp, As);<br />

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

w = [0:500]*pi/500; H = freqz(b,a,w); magH = abs(H);<br />

magHdb = 20*log10(magH);<br />

% 16-bit word-length quantization<br />

N1 = 15; [bahat,L1,B1] = QCoeff([b;a],N1);<br />

TITLE1 = sprintf(’%i-bits (1+%i+%i)’,N1+1,L1,B1);<br />

bhat1 = bahat(1,:); ahat1 = bahat(2,:);<br />

Hhat1 = freqz(bhat1,ahat1,w); magHhat1 = abs(Hhat1);<br />

magHhat1db = 20*log10(magHhat1); zhat1 = roots(bhat1);<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!