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.

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

(b) Sign-Magnitude Format<br />

(b) Ones-Complement Format<br />

(b) Two-Complement Format<br />

0.75<br />

0.5<br />

x<br />

xhat<br />

0.75<br />

0.5<br />

x<br />

xhat<br />

0.75<br />

0.5<br />

x<br />

xhat<br />

0.25<br />

0.25<br />

0.25<br />

xhat<br />

0<br />

xhat<br />

0<br />

xhat<br />

0<br />

−0.25<br />

−0.25<br />

−0.25<br />

−0.5<br />

−0.5<br />

−0.5<br />

−0.75<br />

−0.75<br />

−0.75<br />

−1<br />

−1 −0.75 −0.5 −0.25 0<br />

x<br />

0.25 0.5 0.75<br />

FIGURE 6.28<br />

−1<br />

−1<br />

−1 −0.75 −0.5 −0.25 0 0.25 0.5 0.75<br />

−1 −0.75 −0.5 −0.25 0 0.25 0.5 0.75<br />

x<br />

x<br />

Rounding error characteristics in the fixed-point representation<br />

B = 2;<br />

% Select bits for Rounding<br />

x = [-1:2^(-10):1-2^(-B-1)]; % Sign-Magnitude numbers between -1 and 1<br />

y = sm2tc(x);<br />

% Sign-Mag to Two’s Complement<br />

yq = round(y*2^B)/2^B;<br />

% Rounding<br />

xq = tc2sm(yq);<br />

% Two’-Complement to Sign-Mag<br />

The resulting plots for the sign-magnitude, ones-, and two’s-complement<br />

formats are shown in Figure 6.28. These plots do satisfy (6.59).<br />

□<br />

Comparing the error characteristics of the truncation and rounding<br />

operations given in Figures 6.25 through 6.28, it is clear that the rounding<br />

operation is a superior one for the quantization error. This is because the<br />

error is symmetric with respect to zero (or equal positive and negative<br />

distribution) and because the error is the same across all three formats.<br />

Hence we will mostly consider the rounding operation for the floatingpoint<br />

arithmetic as well as for further analysis.<br />

6.7.2 FLOATING-POINT ARITHMETIC<br />

In this arithmetic, the quantizer affects only the mantissa M. However,<br />

the number x is represented by M × 2 E where E is the exponent. Hence<br />

the quantizer errors are multiplicative and depend on the magnitude of<br />

x. Therefore, the more appropriate measure of error is the relative error<br />

rather than the absolute error, (Q[x] − x). Let us define the relative error,<br />

ε, as<br />

ε = △ Q[x] − x<br />

(6.60)<br />

x<br />

Then the quantized value Q[x] can be written as<br />

Q[x] =x + εx = x (1 + ε) (6.61)<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!