Unformatted text preview:

EE 422G - Signals and Systems Laboratory Lab 4 IIR Filters written by Kevin D. Donohue Department of Electrical and Computer Engineering University of Kentucky Lexington, KY 40506 October 4, 2011 Objectives: - Use filter design and analysis tools to create IIR filters based on general filter specification. - Understand the impact of the placement of poles and zeros on the frequency response of the filter. - Use Simulink to simulate filter performance using truncation effects of embedded processors. - Understand the impact of different computational structures for filter implementations on filter performance. 1. Background Infinite impulse response (IIR) filters are an alternative to finite impulse response (FIR) filters. An IIR implementation can meet filter specifications with less computation than an FIR implementation; however, IIR filters have nonlinear phase responses, are potentially unstable, and have increased sensitive to numerical errors. Like FIR filters, IIR filters are linear time-invariant (LTI) systems that can recreate a wide range of frequency responses. IIR implementations with specified stop-band, pass-band, and transition-band properties typically require fewer filter taps (coefficients) than an FIR filter meeting similar specifications. This leads to a significant reduction in computational complexity and signal delay through the filter. However, IIR filter TFs have poles resulting in feedback, which cause instability if poles are not inside the unit circle. Feedback can increase the sensitivity to errors introduced from finite arithmetic computations (especially for fixed-point processors). In addition, IIR filters result in nonlinear phase distortion (frequency components delayed by different amounts, especially near the transition bands). Up to this point, filters used in the laboratory assignments have been implemented with the Direct Form, which is suggested by converting the transfer function (TF) directly to a difference equation, using the TF in the following form: NnnnMmmmNnnnMmmmzazbzazbzH10101111)(ˆ (1)The rational polynomial in z for Eq. (1) is factored into an all-zero filter (FIR) followed by an all-pole filter. Recall the product of TFs corresponds to connecting the systems in series in the time-domain, where the output of one filter becomes the input to the next. The factoring of Eq. (1) suggests the direct form I implementation shown in Fig. 1. Figure 1. Direct form I implementation of an IIR filter. The square blocks represent unit delays, the triangles represent multiplies, and the circles represent accumulators. The variable w[n] is an intermediate value being the output of the all-zero component and the input to the all-pole component of the filter, and a0=1 for corresponding to the IIR filter of Eq. (1). For higher order filters, the direct-form implementation involves long delays (M samples for the input and N samples for the output). This may lead to numerical instability from rounding the filter coefficients. For higher-order polynomials the roots may shift widely for small changes (i.e. rounding errors) in the filter coefficients. Therefore, it is hard to predict how small coefficient errors will impact the pole positions of a high order direct-form implementation. Different implementations (computational structures) can be realized by factoring and representing the polynomials of Eq. (1) in different ways. Consider factoring numerator and denominator polynomials into second-order stages as follows: PpNnnnMmmmzpazpazpbzpbpbGzazbzH1221122110010)()(1)()()(1)(ˆ (2) z-1 z-1 z-1 b0 b1 bM-1 bM x[n] w[n] y[n] z-1z-1z-1-a1 1/a0 -aN -aN-1where coefficient argument p denotes each filter stage, and is derived from the original direct-form single stage filter coefficients by factoring. When factoring into second order stages, pairs of real poles or complex conjugate poles are combined to ensure real coefficients. G0 is the overall gain, which can be factored out of all the b coefficients. The form of Eq. (2) suggests cascading second-order IIR filters in series. This implementation is referred to as the Cascade form. One way to improve numerical stability over a higher-order direct form implementation is to implement the IIR filter as a cascade of second-order direct form sections. The data flow for a second-order, direct-form implementation is shown in Figure 2. Note that in the direct form II implementation, as shown Fig. 2b, the delayed samples are neither input nor output samples, but are instead the intermediate values w[n]. This implementation can be derived by first applying the all-pole component of the TF and then making that the input of the all-zero component (just the opposite multiplication order of the direct form I implementation shown in Eq. (1). (a) (b) Figure 2. (a) Single stage direct form I cascade implementation of an IIR filter. (b) Single stage direct form II cascade implementation of an IIR filter. G0 is multiplier affecting the overall gain of the filter (does not change relative spectrum or waveform values). This is only applied at one stage. And a0=1 in order to correspond to the IIR filter of Eq. (2). x[n] w[n] y[n] b2(p) b1(p) b0(p) z-1z-1-a2(p) -a1(p) G0 1/a0(p) x[n] w[n] y[n] z-1 z-1 b2(p) b1(p) b0(p) -a1(p) z-1z-1G0 -a2(p) 1/a0(p)There are several IIR filter design methods that primarily affect how error or ripple is distributed over the pass and stop bands. The Matlab functions for the main IIR filter designs are Elliptical (ellip), Butterworth (butter), and Chebyshev (cheby1 and cheby2). The unique features of these approaches will be examined in the laboratory assignment. Pole-zero impact on frequency response: 1. Pole-zero diagrams are useful for understanding the approximate behavior of a filter. Recall that moving a point around the unit circle in the z-plane corresponds to a sinusoidal excitation with a frequency equal to the angle made with respect to the positive real axis. So starting at z=1+j0 corresponds to ω=0 and ending at z = -1+j0 corresponds to ω= radians or f = .5 Hz (normalized). For non-normalized frequencies the upper limit is scaled up to the half the sampling frequency, (2)fs/2 radians (fs is the sampling frequency) or fs/2


View Full Document

UK EE 422G - Lab 4 IIR Filters

Documents in this Course
Load more
Download Lab 4 IIR Filters
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 4 IIR Filters and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 4 IIR Filters 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?