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

Using (10.41) and (10.47), the output SNR is<br />

SNR = △ σ2 y (1 −|α|)2 12 ( 1 −|α| 2)<br />

σq<br />

2 =<br />

3(1−|α| 2 ) 2 −2B<br />

=4 ( (10.48)<br />

2 2B) (1 −|α|) 2 =2 2(B+1) (1 −|α|) 2<br />

or the SNR in dB is<br />

SNR dB<br />

△<br />

=10log10 (SNR) = 6.02 + 6.02B +20log 10 (1 −|α|) (10.49)<br />

Let δ =1−|α|, which is the distance of the pole from the unit circle.<br />

Then<br />

SNR dB =6.02+6.02B +20log 10 (δ) (10.50)<br />

which is a very informative result. First, it shows that the SNR is directly<br />

proportional to B and increases by about 6 dB for each additional bit<br />

added to the word length. Second, the SNR is also directly proportional<br />

to the distance δ. The smaller the δ (or nearer the pole to the unit circle),<br />

the smaller is the SNR, which is a consequence of the filter characteristics.<br />

As an example, if B =6and δ =0.05, then SNR = 16.12 dB and if B =12<br />

and δ =0.1, then SNR = 58.26 dB.<br />

10.2.6 ANALYSIS USING MATLAB<br />

To analyze the properties of the round-off errors in IIR filters we will<br />

simulate them using the MATLAB function QFix with quantization mode<br />

’round’ and overflow mode ’satur’.Ifproper scaling to avoid overflow is<br />

performed, then only the multiplier output needs to be quantized at each<br />

n without worrying about the overflow. However, we will still saturate<br />

the final sum to avoid any unforeseen problems. In previous simulations,<br />

we could perform the quantization operations on vectors (i.e., perform<br />

parallel processing). Since IIR filters are recursive filters and since each<br />

error is fed back into the system, vector operation is generally not possible.<br />

Hence the filter output will be computed sequentially from the first to the<br />

last sample. For a large number of samples, this implementation will slow<br />

the execution speed in MATLAB since MATLAB is optimized for vector<br />

calculations. However, for newer fast processors, the execution time is<br />

within a few seconds. These simulation steps are detailed in the following<br />

example.<br />

□ EXAMPLE 10.11 Consider the model given in Figure 10.19b. We will simulate this model in<br />

MATLAB and investigate its output error characteristics. Let a =0.9, which<br />

will be quantized to B bits. The input signal is uniformly distributed over<br />

the [−1, +1] interval and is also quantized to B bits prior to filtering. The<br />

scaling factor X max is computed from (10.44). Using 100, 000 signal samples<br />

and B =6bits, the following MATLAB script computes the true output y(n),<br />

the quantized output ŷ(n), the output error q(n), and the output SNR.<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!