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.

Round-off Effects in IIR Digital Filters 559<br />

rounding operation. The details are in the MATLAB script:<br />

M = 100; B = 3; A = 1-2^(-B);<br />

a1 = A; a2 = -A; yn1 = -A; yn2 = A;<br />

m = 0:M; y = [yn2,yn1,zeros(1,length(m))];<br />

% Infinite precision<br />

for n = m+3<br />

yn1 = y(n-1); yn2 = y(n-2);<br />

y(n) = a1*yn1 + a2*yn2;<br />

end<br />

subplot(’position’,[0.08,0.2,0.24,0.6]);<br />

plot([-1,100],[0,0],’w’); axis([-1,80,-1,1]); hold on;<br />

Hs_1 = stem([-2,-1,m],y,’filled’);set(Hs_1,’markersize’,3,’color’,[0,1,0]);<br />

set(gca,’ytick’,[-1:0.25:1],’fontsize’,6); ylabel(’Amplitude’,’fontsize’,8);<br />

title(’No Limit Cycles’,’fontsize’,10);<br />

xlabel(’Sample index n’,’fontsize’,8);<br />

% Granular limit cycle<br />

for n = m+3<br />

yn1 = y(n-1); yn2 = y(n-2);<br />

y(n) = QFix(a1*yn1,B,’round’,’satur’)+QFix(a2*yn2,B,’round’,’satur’);<br />

y(n) = QFix(y(n),B,’round’,’satur’);<br />

end<br />

subplot(’position’,[0.42,0.2,0.24,0.6]);<br />

plot([-1,100],[0,0],’w’); axis([-1,80,-1,1]); hold on;<br />

Hs_1 = stem([-2,-1,m],y,’filled’);set(Hs_1,’markersize’,3,’color’,[0,1,0]);<br />

set(gca,’ytick’,[-1:0.25:1],’fontsize’,6); ylabel(’Amplitude’,’fontsize’,8);<br />

title(’Granular Limit Cycles’,’fontsize’,10);<br />

xlabel(’Sample index n’,’fontsize’,8);<br />

% Overflow limit cycle<br />

for n = m+3<br />

yn1 = y(n-1); yn2 = y(n-2);<br />

y(n) = a1*yn1 + a2*yn2;<br />

y(n) = QFix(y(n),B,’round’,’twosc’);<br />

end<br />

subplot(’position’,[0.76,0.2,0.23,0.6]);<br />

plot([-1,100],[0,0],’w’); axis([-1,80,-1,1]); hold on;<br />

Hs_1 = stem([-2,-1,m],y,’filled’);set(Hs_1,’markersize’,3,’color’,[0,1,0]);<br />

set(gca,’ytick’,[-1:0.25:1],’fontsize’,6); ylabel(’Amplitude’,’fontsize’,8);<br />

title(’Overflow Limit Cycles’,’fontsize’,10);<br />

xlabel(’Sample index n’,’fontsize’,8);<br />

The resulting plots are shown in Figure 10.12. As expected, the infinite-precision<br />

implementation has no limit cycles. The granular limit cycles are of smaller<br />

amplitudes. Clearly, the overflow limit cycles have large amplitudes spanning<br />

the −1 to1range of the quantizers.<br />

□<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!