Presentation is loading. Please wait.

Presentation is loading. Please wait.

IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.

Similar presentations


Presentation on theme: "IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002."— Presentation transcript:

1 IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002

2 ECEN4002 Spring 2002IIR and EQ R. C. Maher2 IIR Filter Description We will consider IIR filters with a rational transfer function (M  N):

3 ECEN4002 Spring 2002IIR and EQ R. C. Maher3 IIR Direct Form I Rational transfer function leads to a direct implementation: Z -1 + b0b0 b1b1 b2b2 x[n] x[n-1] y[n] x[n-2] Z -1 -a 1 -a 2 y[n-1] y[n-2]

4 ECEN4002 Spring 2002IIR and EQ R. C. Maher4 IIR Direct Form II Re-order feed-forward and feed-back sections: b0b0 b1b1 b2b2 x[n]y[n] -a 1 -a 2 Z -1 ++

5 ECEN4002 Spring 2002IIR and EQ R. C. Maher5 Implementation Issues Coefficient quantization –Precision usually limited to word size (24 bits on 56300) –Want coefficients to be large in magnitude to use as many significant bits as possible Roundoff error (least significant bits lost) –Result from big accumulator (e.g., 60 bits) must be stored back as a single word (24 bits) –Roundoff error can accumulate due to recursive (feedback) structure of IIR filters

6 ECEN4002 Spring 2002IIR and EQ R. C. Maher6 Implementation Issues (cont.) Overflow error (most significant bits lost) –Occurs when arithmetic result is too large to fit in accumulator or in storage word size –Overflow can linger due to feedback –Requires scaling of the input and output Coefficient quantization, roundoff error, and overflow error behavior can vary from one filter structure to another: choose wisely…

7 ECEN4002 Spring 2002IIR and EQ R. C. Maher7 Engineering an IIR filter Verify filter performance with quantized coefficients Assess roundoff error by modeling the truncation as a noise source in the filter structure. Determine the transfer function from each roundoff noise source to the output. Calculate overflow situations by looking for peaks in frequency response from input to each accumulation point in the filter.

8 ECEN4002 Spring 2002IIR and EQ R. C. Maher8 2 nd -order Sections Generally implement high-order IIR filters as a sum or cascade of 2 nd -order filters. This reduces the sensitivity of the overall response to the precision of each coefficient Each 2 nd -order filter (biquad) implements two zeros and two poles (real or complex conjugate)

9 ECEN4002 Spring 2002IIR and EQ R. C. Maher9 2 nd -order Sections (cont.) High-order polynomial is factored to find poles and zeros Poles and zeros are grouped in pairs—usually try to group in such a way that minimizes peak gain of each section If cascaded, 2 nd -order sections are usually ordered from lowest gain to highest gain to minimize overflow likelihood Scaling may be needed for overall response or for each section individually (computation vs. quality)

10 ECEN4002 Spring 2002IIR and EQ R. C. Maher10 Bilinear Transform Design algorithms for continuous-time filters are well known, while Nyquist issues make discrete-time IIR filter design somewhat complicated Concept: use a continuous-time filter design, then transform s-plane poles and zeros to the z-plane Need: an invertible mapping function between s and z planes

11 ECEN4002 Spring 2002IIR and EQ R. C. Maher11 Bilinear Transform (cont.) Mapping function must: –Take j  axis in s-plane and map it to unit circle in z-plane (warped frequency response) –Take left half of s-plane and map to interior of unit circle (stable poles remain stable poles) –Have a smooth, monotonic warping Customary function:

12 ECEN4002 Spring 2002IIR and EQ R. C. Maher12 Bilinear Transform (cont.) Inverse mapping is: Frequency warping: z=e j 

13 ECEN4002 Spring 2002IIR and EQ R. C. Maher13 Bilinear Transform (cont.) Plan: –Determine required critical frequencies and levels in digital domain, then use bilinear transform to find analog specs –Design continuous-time filter meeting warped specs –Inverse transform to get resulting digital design –Verify, then alter and repeat process as necessary

14 ECEN4002 Spring 2002IIR and EQ R. C. Maher14 Lab Exercise #4 MATLAB functions: butter, scope, iirtable –Write IIR filter function using output from iirtable. Use a “do loop” with iterations determined from iirtable. –Verify with file I/O and real time observation –Get working, then consider optimizations Parametric equalizer (EQ) filter –Tune gain, center freq, and bandwidth –Adjust parameters with debugger and verify


Download ppt "IIR Filters and Equalizers R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002."

Similar presentations


Ads by Google