Presentation is loading. Please wait.

Presentation is loading. Please wait.

DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF.

Similar presentations


Presentation on theme: "DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF."— Presentation transcript:

1 DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF

2 27 March 2003P Baudrenghien AB/RF2 Quantization of coefficients The coefficients a k and b r must be quantized into our two’s complement fractional This creates a distortion in the achieved frequency response We measure the sensitivity to coefficient quantization by comparing the poles/zeros of the infinite precision and finite precision realizations

3 27 March 2003P Baudrenghien AB/RF3 Displacement of the poles (1) Our transfer function has N poles p 0, p 1, …, p N-1 defined by the zeros of the denominator (Nth order polynomial with coefficients a 0, a 1, …, a N ) Let us introduce an error  a m on the coefficient a m This displaces all poles: p 0 -> p 0 +  p 0, p 1 -> p 1 +  p 1, … The displacement  p n of the n th pole due to the error  a m is given by

4 27 March 2003P Baudrenghien AB/RF4 Displacement of the poles (2) High sensitivity if the filter has many poles. High order some poles are close together Potentially unstable if one pole is displaced outside the unit circle Conclusions use cascade of biquads (only 2 poles per transfer function) beware of poles close to the unit circle

5 27 March 2003P Baudrenghien AB/RF5 Elliptic IIR. Direct Form (1) Consider the fourth order Elliptic IIR LPF (Example 4, slide 11 in lecture 5, Part II) Direct Form II implementation (slide 15 in lecture 5, Part II) Quantize its coefficients with 8 bits … … and the filter becomes unstable. Two poles are moved outside the unit circle Pole/zero plot of the infinite precision (blue) and finite precision (red) Elliptic IIR. Direct Form II, 8 bits coefficients.

6 27 March 2003P Baudrenghien AB/RF6 Elliptic IIR. Direct Form (2) … so we increase the number of bits: 9 bits coefficients … … and it is stable but the frequency response shows severe distortion Pole/zero plot of the infinite precision (blue) and finite precision (red) Elliptic IIR. Comparison of the achieved frequency response (green) with the reference (blue). Direct Form II, 9 bits coefficients.

7 27 March 2003P Baudrenghien AB/RF7 Elliptic IIR. Direct Form (3) …we have to use 12 bits coefficients to obtain a reasonable result … but there still is a big ripple at the end of the Pass-band Comparison of the achieved frequency response (green) with the reference (blue). Direct Form II, 12 bits coefficients

8 27 March 2003P Baudrenghien AB/RF8 Elliptic IIR. Cascade of biquads We now implement the IIR with a cascade of 2 biquads (slide 16, lecture 5, Part II) The realization is now stable with only 8 bits coefficients The frequency response is a reasonable match to the reference Comparison of the achieved frequency response (green) with the reference (blue). Cascade of two biquads, 8 bits coefficients Lesson: Always use a cascade of biquads!

9 27 March 2003P Baudrenghien AB/RF9 Equiripple FIR (1) Coefficient quantization displaces the zeros as well and the FIR response will also suffer distortion Consider the 31 coefficients Equiripple FIR (slide 17, lecture 5, Part I) First use 8 bits coefficients. The result is quite good Pole/zero plot of the infinite precision (blue) and finite precision (red) Equiripple FIR. Comparison of the achieved frequency response (green) with the reference (blue). 8 bits coefficients.

10 27 March 2003P Baudrenghien AB/RF10 Equiripple FIR (2) So we decrease the resolution further: 5 bits coefficients… … the impulse response is much distorted … … the zeros are not displaced much … Impulse response of infinite precision (blue dots) and finite precision (green squares). Pole/zero plot of the infinite precision (blue) and finite precision (red). Equiripple FIR. 5 bits coefficients

11 27 March 2003P Baudrenghien AB/RF11 Equiripple FIR (3) … and the frequency response is still acceptable. It is actually almost within specs … Comparison of the achieved frequency response (green) with the reference (blue). Equiripple FIR. 5 bits coefficients. Lesson: FIR are much less sensitive to coefficient quantization

12 27 March 2003P Baudrenghien AB/RF12 Zero Input Limit Cycle Back to the quantization of data So far (Part I) we have considered that the quantization noise sources (e 1 (n),e 2 (n),…) were white and independent of the input data x(n). This does not hold if the data covers a very small portion of the dynamic range

13 27 March 2003P Baudrenghien AB/RF13 Zero Input Limit Cycle. Rounding First order system We have IC: y(0)=1 switch input off: x(n) = 0 precision = 1 decimal digit a = -0.9 Rounding (downwards) to the first fractional digit Limit cycle of frequency ½ and amplitude 0.4

14 27 March 2003P Baudrenghien AB/RF14 Zero Input Limit Cycle. Truncation Truncation With zero input, an oscillation can be present at the output of a first order filter if rounding is used. For second and higher order filters a zero input limit cycle can appear with both rounding and truncation. The frequency of the limit cycle is close to the frequency where the filter has maximum response No limit cycle

15 27 March 2003P Baudrenghien AB/RF15 Bound on Zero Input Limit Cycle Let h(n) be the impulse response from the quantization noise e(n) to the filter output f(n), we have: This bound is often largely over-estimated.

16 27 March 2003P Baudrenghien AB/RF16 Floating Point Format IEEE 32 bits standard No need for scaling … Dynamic range covers 77 decades!

17 27 March 2003P Baudrenghien AB/RF17 Quantization error with float Quantization error introduced by both additions and multiplications By rounding (or truncating) the mantissa of x(n) to the b+1 bits format, we get Q[x(n)] where The quantization noise is an additive error term The noise is proportional to the signal (constant SNR) and the overall performance is much better


Download ppt "DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF."

Similar presentations


Ads by Google