EE58 Digital Signal Processing University of Washington Autumn 2 Dept. of Electrical Engineering Lecture 6: Filter Design: Impulse Invariance and Bilinear Transform Nov 26, 2 Prof: J. Bilmes <bilmes@ee.washington.edu> TA: Mingzhou Song <msong@u.washington.edu> 6. Introduction to Filter Design Filter design is the most important practical application of this course. Filter, any modification of the signal according to design specifications. Frequency selectivity Causal filters (real time without delay) Note ideal filters are not realizable. We can t have perfect magnitude response. For example, the ideal low pass filter is not realizable because it requires infinite length sinc function. We would like causal filters: IIR ok FIR sometimes even better Ex: typical way to specify low pass filter Design specifications for a low pass filter is shown in Fig 6.. H(e jω ) + δ Transition δ PSfrag replacements Passband Stopband δ 2 ω p ω s π ω Figure 6.: Low pass filter design specifications. 6-
6-2 In the low pass filter, δ is the tolerance at the pass band, δ 2 is the tolerance at the stop band. In transition band, we do not care too much about what happens. The quantitative relationship for the maganitude response within the pass band and stop band are given as follows: δ H(e jω + δ, ω ω p H(e jω δ 2, ω s ω p π where δ and δ 2 are usually small positive numbers, e.g., δ can be 6 or 9. Usually discrete time filter designis done in terms of normalized discrete time. Normalization in time by T is equivalent to normalization in frequency by /T. So in frequency domain, π/t is normalized to π. Or even sometimes for plotting, frquency is further normalized by π and a normalized corresponds to π in radians. Note: If we use linear phase systems, we can just specify magnitude response, which will produce a system with only a delay and is easy to deal with. If we use IIR system, we might have to deal with phase. There are two different design procedures: ) start with continuous time filter and then map it to a discrete time filter. So we can use analog techniques to do filter design. 2) use new techniques to design filter directly in discrete time. 6.2 Design of Discrete Time Filter from Continuous Time Filter We can apply transform technique to obtain H(z) and h[n] for discrete time fiters from H c (s) and h c (t) as shown below: H c (s) h c (t) Transform Techniques H(z) h[n] Recall Laplace transfrom, a generalization of Fourier transform, is defined as X(s) = x(t)e st dt (6.) Plugging jω into X(s) we get Fourier transform X( jω). Here is a summary of three continuous time low pass filters. Butterworth Filters The magnitude response of Butterworth filters are in the following form as shown in Fig 6.2 Properties: H c ( jω) = + (Ω/Ω c ) 2N (6.2) ) N-th order filter has first (2N ) derivatives of H c ( jω). The derivatives are zero at Ω =.
6-3.9.8.7.6.5.4.3.2. 5 5 2 25 3 35 4 f (Hz) Figure 6.2: Magnitude response of Butterworth filters. 2) monotonic in stop and pass band. 3) It is hard to control where approximately the tolerance will be. 4) Error reduces as N increases, but the filter is harder to implement. Chebychev Filters The magnitude response of Chebychev filters is where H c ( jω) = + ε 2 V 2 N (ω/ω c) V N (x) = cos(n cos x) (6.3) Note V N (x) can be described by the following initial values and recurrence equation: N =, V (x) = N =, V (x) = cos(cos x) = x N = 2, V 2 (x) = cos(n cos x) = 2x 2 V N+ (x) = 2xV N (x) V N (x) The magnitude response of Chebychev filter is shown in Fig 6.3. Properties: ) equiripple in passband (resp. stop band) and monotonic in the stop band (resp. pass band) for type I (resp type II) filters. 2) better for design to have error distributed over pass band or stop band by equiripple and can often lower N which leads to simpler implementation. Elliptic Filters The magnitude response of Elliptic filters is H c ( jω) = + ε 2 V 2 N (Ω) (6.4)
6-4.9.8.7.6.5.4.3.2. 5 5 2 25 3 35 4 f (Hz) Figure 6.3: Magnitude response of Chebychev filters. where V N (Ω) is a Jacobian elliptic function. The magnitude response of elliptic filter is shown in Fig 6.4..9.8.7.6.5.4.3.2. 5 5 2 25 3 35 4 f (Hz) Figure 6.4: Magnitude response of elliptic filters. Error distribute over both pass band and stop band. This is as best as can be done for given Ω p, δ, δ 2, and transitive region (Ω p to Ω s ). 6.2. Impulse Invariance Sampling the continuous time impulse response with sampling period T d, we obtain h[n] = T d h c (nt d ) Then If H c ( jω) = for Ω π/t d, H(e jω ) = k= H(e jω ) = H c ( jω/t d) H c ( j ω T d + j 2π T d k) ω π
6-5 Will aliasing occur for the previous H c ( jω)? Yes. Consider Butterworth filter. But if order of filter N is high enough, aliasing will be small enough to be acceptable, i.e., within our tolerance δ 2. Question: Can we control aliasing by changing T d, the sampling period? Choose cut-off frequency ω c in discrete time. Transform to Ω c = ω c /T d. Larger T d needs a continuous filter with larger Ω c and wider frequency spread, so T d doesn t control aliasing. Aliasing can is controlled by order N and types of filters. Question: How to choose T d? Choose T d so that relevant details of h c (t) is captured. Continuous to Discrete-Time in terms of Laplace to z-transform If a causal LTI system has then the impulse response is H c (s) = N k= A k s s k { t < h c (t) = N k= A ke s kt t By impulse response, and h[n] = T d h c (nt d ) = u[n] N k= H(z) = T d A k e s knt d = u[n] N k= T d A k e s kt d z N k= T d A k ( e s k T d ) n The pole at s = s k in s-plane become pole at z = e s kt d in z-plane. That a stable and causal H c (s) has Re(s k ) < for all its poles implies H(z) is also stable and causal because all the poles must have e s kt d <, i.e. with the unit circle in z-plane. However, zeros have a more complex mapping. Note: impulse invariance works only for bandlimited filters, i.e., not continuous time high pass filters since that would cause big aliasing. 6.2.2 Bilinear Transform We can find z-transform directly from Laplace transform by mappling the jω axis in s-plane to the unit circle on z-plane, i.e., < Ω < maps to π < ω < π, which is a non-linear mapping. The bilinear transform is defined by which is accomplished by replacing s using Note T d has no effect again. Points: ( 2 z ) H(z) = H c T d + z (6.5) s = 2 T d z + z (6.6) ) Left half of s-plane mapping to inside of the unit circle in z-plane, i.e., s = σ + jω, σ < z <
6-6 2) Right half of s-plane mapping to outside of the unit circle in z-plane, i.e., s = σ + jω, σ > z > Hence, a causal and stable continuous time system will be mapped to a causal and stable discrete-time system. 3) jω is mapped to unit circle. Why? z = + (T d/2)s (T d /2)s = + σ(t d/2) + jω(t d /2) σ(t d /2) jω(t d /2) When σ =, which says Why is unit circle spanned? So we have z = + jω(t d/2) jω(t d /2) z = σ + jω = s = 2 T d e jω + e jω = j 2 T d tan(ω/2) Ω = 2 T d tan(ω/2) σ = Therefore which is shown in Fig 6.5 ω = 2tan (ΩT d /2) PSfrag replacements π ω Ω π Figure 6.5: ω Ω plot for bilinear transform. An example is shown in Fig 7.8 (O&S, pg 452). Some of the bilinear transform mapping relationships are shown in Fig 6.6. Points: ) 2) 3) σ < z < σ > z > jω e jω
6-7 jω s-plane 2/T d 4/T d 2/T d /T d 2/T d 4/T d σ 2/T d z-plane replacements z = /T d 3 2 2 3 Figure 6.6: Bilinear mapping between s-plane and z-plane.
6-8 4) real axis mappling the black x at z = comes from s = ± and s = ± j. the red x at z = comes from s =. as s goes from to, z goes from to. z = at s = 2/T d (light green x ). as s goes from to 2/T d, z goes from to. as s goes from 2/T d to, z goes from to. 5) the yellow line moves up, smaller yellow circles. 6) the pink line moves down, smaller pink circles. 7) light blue circle bigger than red circle ( z = ) is vertical line between σ = and σ = 2/T d. 8) dark blue circle (on the left) is vertical s-plane line. Other notes: this produces both frequency warping and phase warping, i.e., linear phase in continuous time maps to non-linear phase in discrete time. the technique is particularly good idealized functions that are piecewise constant such as high-pass filters (HPF), low-pass filters (LPF), band-pass filters (BPF), etc., since they are easy to analyze in terms of the endpoints where the responses change.