Professional Documents
Culture Documents
7 Iir and Eq
7 Iir and Eq
b z
k
k
H ( z) !
k !0 N 1
1 ak z
k !1
k
IIR and EQ
R. C. Maher
y[ n] ! b0 x[n] b1 x[ n 1] b2 x[n 2] a1 y[ n 1] a2 y[ n 2]
ECEN4002 Spring 2003 IIR and EQ R. C. Maher 3
Z-1
-a1
b0
y[n]
Z-1
b1
-a2
b2
IIR and EQ
R. C. Maher
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
Coefficient quantization, roundoff error, and overflow error behavior can vary from one filter structure to another: choose wisely
ECEN4002 Spring 2003 IIR and EQ R. C. Maher 6
nd-order 2
Sections
Generally implement high-order IIR filters as a sum or cascade of 2nd-order filters. This reduces the sensitivity of the overall response to the precision of each coefficient Each 2nd-order filter (biquad) implements two zeros and two poles (real or complex conjugate) 1 2
b0 b1 z b2 z H ( z) ! 1 a1 z 1 a 2 z 2
IIR and EQ R. C. Maher
nd-order 2
Sections (cont.)
High-order polynomial is factored to find poles and zeros Poles and zeros are grouped in pairsusually try to group in such a way that minimizes peak gain of each section If cascaded, 2nd-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)
ECEN4002 Spring 2003 IIR and EQ R. C. Maher 9
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
ECEN4002 Spring 2003 IIR and EQ R. C. Maher 10
Customary function:
1 s z ! ] (s) ! 1 s
R. C. Maher 11
IIR and EQ
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
IIR and EQ
R. C. Maher
14