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.

542 Chapter 10 ROUND-OFF EFFECTS IN DIGITAL FILTERS<br />

Distribution of e 1<br />

Distribution of e 2<br />

4128<br />

3128<br />

2128<br />

1128<br />

4128<br />

3128<br />

2128<br />

1128<br />

SAMPLE SIZE N = 500000<br />

ROUNDED T0 B = 2 BITS<br />

MEAN = 3.4239e–005<br />

MIN PROB BAR HEIGHT = 0.007446<br />

MAX PROB BAR HEIGHT = 0.00828<br />

SIGMA = 0.072073<br />

0<br />

−0.5 −0.375 −0.25 −0.125 0 0.125 0.25 0.375 0.5<br />

Normalized error e 1<br />

SAMPLE SIZE N = 500000<br />

ROUNDED T0 B = 2 BITS<br />

MEAN = 3.4396e–005<br />

MIN PROB BAR HEIGHT = 0.000334<br />

MAX PROB BAR HEIGHT = 0.015212<br />

SIGMA = 0.063851<br />

0<br />

−0.5 −0.375 −0.25 −0.125 0 0.125 0.25 0.375 0.5<br />

Normalized error e 2<br />

FIGURE 10.3 A/D quantization error distribution for the sinusoidal signal in<br />

Example 10.1, B =2bits<br />

Through these examples we hope to learn how small error e must be (or<br />

equivalently, how large B must be) for the above assumptions to be valid.<br />

□ EXAMPLE 10.1 Let x(n) = 1 {sin(n/11) + sin(n/31) + cos(n/67)}. This sequence is not periodic,<br />

and hence its samples never repeat using infinite-precision representation.<br />

3<br />

However, since the sequence is of sinusoidal nature, its continuous envelope is<br />

periodic and the samples are continuously distributed over the fundamental<br />

period of this envelope. Determine the error distributions for B = 2 and 6 bits.<br />

Solution<br />

To minimize statistical variations, the sample size must be large. We choose<br />

500,000 samples. The following MATLAB script computes the distributions for<br />

B =2bits.<br />

clear; close all;<br />

% Example parameters<br />

B = 2; N = 500000; n = [1:N];<br />

xn = (1/3)*(sin(n/11)+sin(n/31)+cos(n/67)); clear n;<br />

% Quantization error analysis<br />

[H1,H2,Q, estat]] = StatModelR(xn,B,N); % Compute histograms<br />

H1max = max(H1); H1min = min(H1); % Max and Min of H1<br />

H2max = max(H2); H2min = min(H2); % Max and Min of H2<br />

The plots of the resulting histogram are shown in Figure 10.3. Clearly, even<br />

though the error samples appear to be uniformly distributed, the samples<br />

are not independent. The corresponding plots for B = 6 bits are shown in<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!