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.

The Process of Quantization and Error Characterizations 271<br />

1<br />

0.75<br />

x<br />

xhat<br />

0.5<br />

0.25<br />

xhat<br />

0<br />

−0.25<br />

−0.5<br />

−0.75<br />

FIGURE 6.27<br />

−1<br />

−1<br />

−0.75 −0.5<br />

−0.25<br />

0<br />

x<br />

0.25<br />

0.5<br />

0.75<br />

Truncation error characteristics in the two’s-complement format<br />

1<br />

Rounding operation In this operation, the real number x is rounded<br />

to the nearest representable level, which we will refer to as Q R [x]. In<br />

MATLAB, to obtain a B-bit rounding approximation, we have to first<br />

scale the number x up by 2 B , then use the round function on the scaled<br />

number, and finally scale the result down by 2 −B . Thus the MAT-<br />

LAB statement xhat = round(x*2^B)/2^B; implements the desired<br />

operation.<br />

Since the quantization step or resolution is ∆ = 2 −B , the magnitude<br />

of the maximum error is<br />

|e R | max<br />

= ∆ 2 = 1 2 2−B (6.58)<br />

Hence for all three formats, the quantizer error due to rounding, denoted<br />

by e R , satisfies<br />

− 1 2 2−B ≤ e R ≤ 1 2 2−B (6.59)<br />

□ EXAMPLE 6.23 Demonstrate the rounding operations and the corresponding error characteristics<br />

on the signal of Examples 6.20–6.22 using the three formats.<br />

Solution<br />

Since the rounding operation assigns values that can be larger than the unquantized<br />

values, which can create problems for the two’s- and one’s-complement<br />

format, we will restrict the signal over the interval [−1, 1 − 2 −B−1 ]. The following<br />

MATLAB script shows the two’s-complement format rounding, but other<br />

scripts are similar (readers are encouraged to verify).<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!