Other types of errors due to using a finite no. of bits: Round- off error due to rounding of products

Similar documents
ECE Unit 4. Realizable system used to approximate the ideal system is shown below: Figure 4.47 (b) Digital Processing of Analog Signals

ECE 8440 Unit 13 Sec0on Effects of Round- Off Noise in Digital Filters

Stability Condition in Terms of the Pole Locations

ECE 8440 Unit 17. Parks- McClellan Algorithm

Optimum Ordering and Pole-Zero Pairing of the Cascade Form IIR. Digital Filter

Analysis of Finite Wordlength Effects

Digital Signal Processing

Lecture 7 - IIR Filters

Digital Signal Processing

EE 521: Instrumentation and Measurements

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

ELEG 305: Digital Signal Processing

ECE4270 Fundamentals of DSP Lecture 20. Fixed-Point Arithmetic in FIR and IIR Filters (part I) Overview of Lecture. Overflow. FIR Digital Filter

Lecture 7 Discrete Systems

Lecture 18: Stability

Optimum Ordering and Pole-Zero Pairing. Optimum Ordering and Pole-Zero Pairing Consider the scaled cascade structure shown below

Sec$on The Use of Exponen$al Weigh$ng Exponen$al weigh$ng of a sequence x(n) is defined by. (equa$on 13.70)

Digital Signal Processing IIR Filter Design via Bilinear Transform

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

Let H(z) = P(z)/Q(z) be the system function of a rational form. Let us represent both P(z) and Q(z) as polynomials of z (not z -1 )

Optimal Design of Real and Complex Minimum Phase Digital FIR Filters

2. Typical Discrete-Time Systems All-Pass Systems (5.5) 2.2. Minimum-Phase Systems (5.6) 2.3. Generalized Linear-Phase Systems (5.

EEL3135: Homework #4

Lecture 19 IIR Filters

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. Fall Solutions for Problem Set 2

EE 313 Linear Signals & Systems (Fall 2018) Solution Set for Homework #7 on Infinite Impulse Response (IIR) Filters CORRECTED

Digital Signal Processing

PS403 - Digital Signal processing

Responses of Digital Filters Chapter Intended Learning Outcomes:

ECE503: Digital Signal Processing Lecture 5

Digital Signal Processing Lecture 8 - Filter Design - IIR

ELEG 305: Digital Signal Processing


FINITE PRECISION EFFECTS 1. FLOATING POINT VERSUS FIXED POINT 3. TYPES OF FINITE PRECISION EFFECTS 4. FACTORS INFLUENCING FINITE PRECISION EFFECTS

Transform Analysis of Linear Time-Invariant Systems

Filter Analysis and Design

Signals and Systems. Lecture 11 Wednesday 22 nd November 2017 DR TANIA STATHAKI

Chapter 7: IIR Filter Design Techniques

Discrete-Time Signals and Systems. Frequency Domain Analysis of LTI Systems. The Frequency Response Function. The Frequency Response Function

Quadrature-Mirror Filter Bank

ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

EE482: Digital Signal Processing Applications

IT DIGITAL SIGNAL PROCESSING (2013 regulation) UNIT-1 SIGNALS AND SYSTEMS PART-A

Z Transform (Part - II)

Discrete-time signals and systems

Butterworth Filter Properties

Digital Signal Processing Lecture 4

APPLIED SIGNAL PROCESSING

CITY UNIVERSITY LONDON. MSc in Information Engineering DIGITAL SIGNAL PROCESSING EPM746

Filter structures ELEC-E5410

Finite Word Length Effects and Quantisation Noise. Professors A G Constantinides & L R Arnaut

UNIT-II Z-TRANSFORM. This expression is also called a one sided z-transform. This non causal sequence produces positive powers of z in X (z).

DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

Discrete-Time Fourier Transform (DTFT)

On the Frequency-Domain Properties of Savitzky-Golay Filters

EECE 301 Signals & Systems Prof. Mark Fowler

INF3440/INF4440. Design of digital filters

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

Z-Transform. 清大電機系林嘉文 Original PowerPoint slides prepared by S. K. Mitra 4-1-1

How to manipulate Frequencies in Discrete-time Domain? Two Main Approaches

Your solutions for time-domain waveforms should all be expressed as real-valued functions.

DSP Configurations. responded with: thus the system function for this filter would be

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

Discrete Time Systems

Lecture 2 OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE

z-transform Chapter 6

EE102B Signal Processing and Linear Systems II. Solutions to Problem Set Nine Spring Quarter

Multidimensional digital signal processing

University of Illinois at Urbana-Champaign ECE 310: Digital Signal Processing

Lecture 5 - Assembly Programming(II), Intro to Digital Filters

1 1.27z z 2. 1 z H 2

Higher-Order Σ Modulators and the Σ Toolbox

ECE-314 Fall 2012 Review Questions for Midterm Examination II

Design of IIR filters

DIGITAL SIGNAL PROCESSING. Chapter 6 IIR Filter Design

Multirate signal processing

Chapter 5. Fourier Analysis for Discrete-Time Signals and Systems Chapter

Use: Analysis of systems, simple convolution, shorthand for e jw, stability. Motivation easier to write. Or X(z) = Z {x(n)}

LECTURE NOTES DIGITAL SIGNAL PROCESSING III B.TECH II SEMESTER (JNTUK R 13)

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

Today. ESE 531: Digital Signal Processing. IIR Filter Design. Impulse Invariance. Impulse Invariance. Impulse Invariance. ω < π.

ECE503: Digital Signal Processing Lecture 6

Review of Fundamentals of Digital Signal Processing

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

Fourier Series Representation of

Basic Multi-rate Operations: Decimation and Interpolation

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer Functions

Signals and Systems. Problem Set: The z-transform and DT Fourier Transform

z-transforms Definition of the z-transform Chapter

Multirate Digital Signal Processing

Detailed Solutions to Exercises

Convolution. Define a mathematical operation on discrete-time signals called convolution, represented by *. Given two discrete-time signals x 1, x 2,

Digital Filters Ying Sun

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

Digital Wideband Integrators with Matching Phase and Arbitrarily Accurate Magnitude Response (Extended Version)

Analog and Digital Filter Design

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Very useful for designing and analyzing signal processing systems

LINEAR-PHASE FIR FILTERS DESIGN

Transcription:

ECE 8440 Unit 12 More on finite precision representa.ons (See sec.on 6.7) Already covered: quan.za.on error due to conver.ng an analog signal to a digital signal. 1 Other types of errors due to using a finite no. of bits: Round- off error due to rounding of products Example: mul.plying two B+1 bit numbers produces a 2B+1 bit product (or 2B+2 bit product), and it may be necessary to round or truncate the product to the closest B+1 bit representa.on. Coefficient quan.za.on errors. Example: Design of digital filters produces filter coefficients that cannot be represented perfectly using a finite number of bits. Overflow errors Example: In the process of implemen.ng a digital filter, an intermediate term may be generated that is larger than the maximum value that can be accurately represented with the available number of bits.

Number Systems for Binary Representa.ons - Sign and magnitude (one bit indicates + or -, the remaining bits represent the magnitude. - - One's complement (binary values are negated by changing 0's to 1's and 1's to 0's) Two's complement (more oyen used) (binary values are negated by changing 0's to 1's and 1's to 0's, then adding 1 to the least significant bit posi.on.) 2 We will use the two's complement system to represent scaled frac.ons, as shown below: x = X m b 0 + b i 2 i i=1 (equa.on 6.75) where b and each b 0 of the terms is either 0 or 1. The range of values that can be represented i this way is from - X m to (almost) X m, where X m is an arbitrary scale factor. If =1 and all other terms are 0, then x = - X m. Example: 10000000000... 0 b 0 b i If = 0 and all other terms are 1, then x - - > X m as the number of bits - - > b 0 b i. Example: 01111111111... 1 In general, an infinite number of bits is required for a perfect representa.on. If the number of bits for a two's complement representa.on is limited to B+1, then the quan.zed representa.on is B ˆx = Q B (x) = X m b 0 + b i 2 i i=1 = X mˆx B. (equa.on 6.76)

The above representa.on involves an implicit binary point between the upper two bits. For example, has the following form: ˆx B 3 ˆx B = b 0.b 1 b 2 b 3...b B If B = 2, then 1.00 = - 1 1.01 = -.75 1.10 = -.5 1.11 = -.25 0.00 = 0 0.01 =.25 0.10 =.5 0.11 =.75 If a total of B bits are used (in addi.on to that can be represented) is Δ = X m 2 B. b 0 ), the resolu.on (smallest difference between values The quan.za.on error is defined as the difference between the desired value and the closest value that can be represented using B+1 bits: e = Q B [x} x. (equa.on 6.79)

If values to be quan.zed are rounded to the closest two- complement representa.on that uses B + 1 bits, then the range of quan.za.on error is (Δ / 2) < e (Δ / 2). If instead the true values are truncated (rounded down) to the next available B+1 bit two's complement representa.on, the range of quan.za.on error is Δ < e 0. 4 Effect of Coefficient Quan.za.on Designing a digital filter produces a system func.on H(z) whose parameters are the mul.pliers of powers of z in the numerator and denominator of H(z). When these are given an imperfect representa.on due to using a finite number of bits, these modified coefficient values effec.vely cause the loca.ons of the poles and zeros of the designed filter to move to modified posi.ons in the z- plane. This, in turn, causes the frequency response of the filter to change. Example: (12- th order bandpass ellip.c filter) Design specifica.ons: 0.99 H(e jω ) 1.01, 0.3π ω 0.4π H(e jω ) 0.01, ω 0.29π and 0.41π ω π

Table 6.1 shows the unquan.zed values (64- bit floa.ng point, 15 decimal digital accuracy) of the a k and b k coefficients of the designed filter. 5

6 Table 6.2 shows the loca.ons of poles and zeros for the filter with unquan.zed coefficients.

Figure 6.48 provides a plot of the poles and zeros for a direct form (non- factored) Implementa.on for (a) the case of unquan.zed coefficients and (b) for the case of coefficients represented using 16- bit accuracy 7 Note that for the case of 16- bit coefficient, the filter has become unstable, poles have moved outside the unit circle in the z- plane.

If the filter is factored into the product of six 2 - nd order sec.ons, the unquan.zed coefficients are shown below 8

If these coefficients are quan.zed to a 16- bit two- complement representa.ons, they have the following values: 9 TABLE 6.4

For bejer comparison, the coefficients for the k = 1 cascade sec.on are shown below for both the "unquan.zed" case and the 16- bit quan.zed case: a 11 a 21 b 01 b 11 b 21 unquan.zed 0.737904-0.851917 0.137493 0.023948 0.137493 16- bit 2's comp. 0.738403-0.850830 0.135841 0.026268 0.135841 10 The following figure shows the frequency of the filter for the following cases: "unquan.zed" coefficients (parts a and b of figure) 16- bit coefficients, with filter implemented in cascade form (part c of figure) 16- bit coefficients, with filter implemented in parallel form (part d of figure) 16- bit coefficients, with filter implemented in direct form (part e of figure) unquan.zed case

11 unquan.zed case 16- bits, cascade form 16- bits, parallel form 16- bits, direct form

Key points from figure: Minor degrada.on in response for 16- bit cascade and 16- bit parallel forms. Major degrada.on in response for 16- bit direct form. 12 The above is an example of the following general case: If poles or zeros are.ghtly clustered, then small errors in the filter coefficients can cause a significant shiy in pole or zero posi.ons (and therefore major changes in the frequency response.) Therefore, it is almost always best to implement any IIR filter in the cascade or parallel form. Note: Because they implement different complex- conjugate poles and zeros independently, the cascade and parallel forms are generally much less sensi.ve to coefficient quan.za.on errors, as compared to the direct form. Possible loca.on of poles and zeros using quan.zed coefficients. Consider a sec.on order filter with poles at z = re jθ and. z = re jθ The denominator polynomial can be wrijen as (1 z 1 re jθ )(1 z 1 re jθ ) = 1 2r cos(θ)z 1 + r 2 z 2

The direct form implementa.on of this filter is shown below: 13 Figure 6.49 Direct- form implementa.on of a complex- conjugate pole pair. If the coefficients 2r cos(θ) and are represented using 4- bit accuracy, the possible loca.on of r2 poles in the z- plane are shown below (for the first quadrant in the z- plane):

In the above plot, note that the spacing of possible pole loca.ons is not uniform. If 7- bit quan.za.on is used to represent the coefficients for this filter, the possible pole loca.ons become much more dense, as shown in the figure below: 14 Figure 6.50 Pole- loca.ons for the 2 nd - order IIR direct- form system of Figure 6.49. (a) Four- bit quan.za.on of Coeficients (b) Seven- bit quan.za.on

Another implementa.on of a 2- pole sec.on is shown below: 15 Figure 6.51 Coupled- form implementa.on of a complex- conjugate pole pair. This implementa.on could be implemented using the following two difference equa.ons: v(n) = x(n) r sin(θ)y(n 1) + r cos(θ)v(n 1) and y(n) = r sin(θ)v(n 1) + r cos(θ)y(n 1) As seen above, the coefficients of this implementa.on are r sin(θ) and r cos(θ). If these coefficients are quan.zed to 4- bit accuracy (part a of figure) or to 7- bit accuracy (part b of figure), the possible pole loca.ons are shown below:

16 Figure 6.52 Pole loca.ons for coupled- form 2 nd - order IIR system of Figure 6.51. (a) Four- bit quan.za.on of coefficients (b) Seven- bit quan.za.on Effects of Coefficient Quan.za.on in FIR Filters In FIR systems, the filter coefficients are one and the same as the h(n) values, since for a causal system M- th order system, y(n) = b k x(n k) and M k =0 M y(n) = h(k)x(n k). k=0

We may relate the desired h(n) values with the quan.zed values ĥ(n) = h(n) + Δh(n) using The system implemented using the quan.zed coefficients can then be expressed as Ĥ(z) = where ΔH(z) = M n=0 M ĥ(n)z n Δh(k)z n. k=0 = H(z) + ΔH(z) ĥ(n) 17 The following figure provides a block diagram representa.on of coefficient quan.za.on for the case of FIR filters: Figure 6.53 representa.on of coefficient quan.za.on in FIR systems Research has shown that coefficient quan.za.on in FIR filters has the most effect if zeros of the filter are close together. (This is consistent with the case of zeros and poles of IIR filters.) Note: Since zeros of linear phase FIR filters are typically not as.ghtly clustered as zeros of IIR filters, it is common prac.ce to implement FIR filters directly, without factoring into lower order sec.ons.

Example: Effect of Quan.za.on of Coefficients in Op.mum FIR Lowpass Filter Design specifica.ons: 0.99 H(e jω ) 1.01, 0 ω 0.4π H(e jω ) 0.001, 0.6π ω π 18 The lowest order FIR filter that sa.sfies these specifica.on is M = 27. The table below provides a comparison of the "unquan.zed" coefficients with coefficients quan.zed to 16 bits, 14 bits, 13 bits, and 8 bits.

The approxima.on error is shown below for the cases of 16 bits, 14 bits, 13 bits, and 8 bits, along with the approxima.on error and the frequency response for the unquan.zed case. 19 Figure 6.54 FIR quan.za.on example. (a) Log magnitude for unquan.zed case. (b) Approxima.on error for unquan.zed case. (Error not defined in transi.on band.) (c) Approxima.on error for 16- bit quan.za.on.

20 Figure 6.54 (con.nued) (d) Approxima.on error for 14- bit quan.za.on. (e) Approxima.on error for 13- bit quan.za.on. (f) Approxima.on error for 8- bit quan.za.on.

Note that the filter design specifica.ons are met when 16 bit or 14 bits are used, and are almost sa.sfied for the case of 13 bits. However, for the 8 bit case, the approxima.on error exceeds the specifica.on by a factor of approximately 2 in the passband and by a factor of approximately 20 in the stopband. 21 To relate the observa.ons of this example with previous statements about the rela.onship of sensi.vity to clustering of zeros, the zero loca.ons for the 16- bit case, 13- bit case, and 8- bit case are shown below, along with the zero loca.ons for the unquan.zed case.

22 Figure 6. 55 Effect of impulse response quan.za.on on zeros of H(z) (a) Unquan.zed (b) 16- bit quan.za.on (c) 13- bit quan.za.on (d) 8- bit quan.za.on In the above figure, note the increased clustering of zeros on the unit circle for the 13 bit case, and especially for the 8- bit case.

Maintaining Generalized Linear Phase in FIR filters, Even with Quan.za.on of Coefficients. 23 If an FIR filter is implemented directly (without factoring), then generalized linear phase is automa.cally maintained ayer quan.za.on, since the symmetry condi.ons that guarantee generalized linear phase are not affected by quan.za.on. Recall that the symmetry condi.ons are for Types I and II filters and for Types III and IV filters. Quan.za.on affects h(n) and h(m n) exactly the same, therefore preserving symmetric condi.ons. h(n) = h(m n) h(n) = h(m n) If it is desired to implement an FIR filter in factored form, we can preserve generalized linear phase even though quan.za.on is present, by recalling that zeros of a generalized phase filters occur in special pajerns, each of which is considered below: Group of 2 consis.ng of 2 complex- conjugate zeros on unit circle - The corresponding second- order factor of H(z) has the form (1 z 1 e jθ )(1 z 1 e jθ ) = 1 z 1 2cos(θ) + 1 Any quan.za.on error in represen.ng the value of 2cos(θ) changes only the angle, not the radius of the zeros. Thus, they will s.ll be complex conjugates on the unit circle.

Group of 4 consis.ng of 2 complex- conjugate zeros not on unit circle and their reciprocals - The corresponding fourth order factor of H(z) has the form (1 z 1 re jθ )(1 z 1 re jθ )(1 z 1 1 r e jθ )(1 z 1 1 r e jθ ) = (1 z 1 2r cos(θ) + z 2 r 2 )(1 z 1 2 z 2 cos(θ) + r r ) 2 24 = (1 z 1 2r cos(θ) + z 2 r 2 ) 1 r 2 (r2 z 1 2r cos(θ) + z 2 ) Since both pairs of zeros have the same coefficients, 2r cos(θ) and r 2, any quan.za.on error will affect both zero- pairs the same way, and the conjugate- reciprocal property of the 4 zeros will be preserved. Group of two real zeros not on unit circle (1 z 1 a)(1 z 1 1 a ) = 1 z 1 (a + 1 a ) + z 2 (a + 1 a ) If quan.za.on error is present in the representa.on of the mul.plier involved will s.ll be real reciprocals, as shown below: First, let c = (a + 1. a ) The zeros of 1 cz 1 + z 2 are, the two zeros c + c 2 4 2 and c c2 4 2

Now show that the reciprocal of the first term above is in fact the second term: 25 2 c + c 2 4 = 2(c c 2 4) (c + c 2 4)(c c 2 4) 2(c c 2 4) c 2 (c 2 4) = c c2 4 2 zeros at 1 or - 1 Factors of the form (1 z 1 ) and (1+ are not subject to quan.za.on error. z 1 )