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

arithmetic including the sign bit. Then the resolution (∆) is given by<br />

∆=2 −B {<br />

absolute in the case of fixed-point arithmetic<br />

relative in the case of floating-point arithmetic<br />

(6.45)<br />

6.7.1 FIXED-POINT ARITHMETIC<br />

The quantizer block diagram in this case is given by<br />

x −→ Quantizer<br />

Infinite−precision<br />

B, ∆<br />

Q[·] −→<br />

Q[x]<br />

Finite−precision<br />

where B, the number of fractional bits, and ∆, the resolution, are the parameters<br />

of the quantizer. We will denote the finite word-length number,<br />

after quantization, by Q[x] for an input number x. Let the quantization<br />

error be given by<br />

e = △ Q[x] − x (6.46)<br />

We will analyze this error for both the truncation and the rounding<br />

operations.<br />

Truncation operation In this operation, the number x is truncated<br />

beyond B significant bits (that is, the rest of the bits are eliminated) to<br />

obtain Q T [x]. In MATLAB, to obtain a B-bit truncation, we have to first<br />

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

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

statement xhat = fix(x*2^B)/2^B; implements the desired operation.<br />

We will now consider each of the 3 formats.<br />

Sign-magnitude format If the number x is positive, then after truncation<br />

Q T [x] ≤ x since some value in x is lost. Hence quantizer error for<br />

truncation denoted by e T is less than or equal to 0 or e T ≤ 0. However,<br />

since there are B bits in the quantizer, the maximum error in terms of<br />

magnitude is<br />

|e T | =0 00<br />

} {{<br />

···0<br />

}<br />

111 ···=2 −B (decimal) (6.47)<br />

B bits<br />

or<br />

−2 −B ≤ e T ≤ 0, for x ≥ 0 (6.48)<br />

Similarly, if the x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!