You are on page 1of 34
Digital Filter Design Synopsis ¢ Overview of filter design problem ¢ Finite impulse response filter design ¢ Infinite impulse response filter design IIR vs. FIR Filters FIR filter equation yln] = agx[n]+ ayx[n-1]}+--+ay_yxln—-(M—1)] TIR filter equation y[n] = ayx[n]+ a,x[n —1]+- ++day_x[n—(M —1)] —by[n-1]—by[n—2]-----byyln—- NJ IIR filters can generally achieve given desired response with less computation than FIR filters It is easier to approximate arbitrary frequency response characteristics with FIR filters, including exactly linear phase Infinite Impulse Response (ITR) Filter Design: Overview IIR digital filter designs are based on established methods for designing analog filters Approach is generally limited to frequency selective filters with ideal passband/stopband characteristics Basic filter type is low pass Achieve highpass or bandpass via transformations Achieve multiple stop/pass bands by combining multiple filters with single pass band IIR Filter Design Steps * Choose prototype analog filter family — Butterworth —Chebychev Type I or IT — Elliptic ¢ Choose analog-digital transformation method — Impulse Invariance — Bilinear Transformation IIR Filter Design Steps (cont.) Transform digital filter specifications to equivalent analog filter specifications Design analog filter Transform analog filter to digital filter Perform frequency transformation to achieve highpass or bandpass filter, if desired Frequency Response | H(@)I Prototype Filter Types Analog Butterworth Filter 0.8 0.6 0.4 0.2 Frequency @ Prototype Filter Types (cont.) Analog Chebychev Type I Filter 0.8 0.6 0.4 0.2 Frequency Response | H(@)l Frequency @ Prototype Filter Types (cont.) Butterworth Chebychev Type I 1 BQ 08 0.8 y 0.6 0.6 3 0.4 0.4 g 02 N=8 0.2 N=8 g 0 0 & we Chebychev Type IT Elliptic > 1 1 2 08 0.8 2, 06 0.6 o 04 0.4 mH 02 N=8 0.2 N=8 0 0 Frequency @ Transformation via Impulse Invariance * Sample impulse response of analog filter ha{n] = Th, (nT) 140=¥ HUS-kID) k 0 arg — Note that aliasing may occur Impulse Invariance (cont.) * Implementation of digital filter — Partial fraction expansion of analog transfer function (assuming all poles have multiplicity 1) N H,(s)= -- ke — Inverse Laplace transform N h,(t)= SY Ae uo) k=1 Impulse Invariance (cont.) — Sample impulse response N hyln}=Th,(nT)=T > Aye" (nT) k=1 N k=1 — Take Z transform TA H,(2)= rere ot k Impulse Invariance (cont.) — Combine terms 7 -~(M— Ay + QZ Ve tay 42 ia N Ay(Z)= —___, **-_—_—yr a@) 14+)27! FD) Z tt byZ — Corresponding filter equation y[n] = agx[n]+ a,x[n—1]+++-+ay_.xIn-(M-1)] —by[n-1-byln—-2]----byyln-N] Impulse Invariance Example * Design a second order ideal low pass digital filter with cutoff at @, = 7/5 radians / sample (Assume T=1) — Analog cutoff frequency 4 =_£=01H Ses oF Z @, =2nf,= 71/5 rad/sec ¢ Use Butterworth analog prototype Hi= 0.3948 a Ts — (0.4443 + j0.4443)][s — (-0.4443 — j0.4443)] Impulse Invariance Example (cont.) « Apply partial fraction expansion —j0.4443 1 j0.4443 H,(s)= : - [s—(—0.4443 + j0.4443)] [s—(—0.4443 — j0.4443)] * Compute inverse Laplace transform h @=[- j0.4443 eO-43+70449) 4. 59.4443 e(-0.4443~ 0.44431 je) Ih : : ¢ Sample impulse response hain] = [— 70.4443 6 OMB 10M + j0.4443 e043 JOM Mn - [- 0.4443(0.6413e/°)" + 70.4443 (0.6413¢-/9°)"utn) Impulse Invariance Example (cont.) * Compute Z Transform —j0.4443 _ j0.4443 1—0.6413e°82-! * 1-0,6413e 48271 Ay(2= ¢ Combine terms 0.245027! 1=0.6413e°#3-"1)\(1 —0.6413e 9827) Ay(2)= ( _ 0.24502! 1-1.1581z 1 +0.4113z7 ¢ Find difference equation y[n] = 0.2450x[n —1]+ 1.158 1y[n -1]-0.4113y[n - 2] Impulse Invariance Example (cont.) o 3 1 — < . . es r Design of 2nd order digital 5 08 Butterworth filter via es impulse invariance Oo 5 06 = 3 xX o4 \ an \ ° » 3 . B 02 = 5b H,(@,)— . ee = 0 = °0 05 1 152) (253 @, (rad /sec) or @, (rad / sample) Impulse Invariance Method - Summary * Preserves impulse response and shape of frequency response, if there is no aliasing Desired transition bandwidths map directly between digital and analog frequency domains Passband and stopband ripple specifications are identical for both digital and analog filters, assuming that there is no aliasing The final digital filter design is independent of the sampling interval parameter T Summary (cont.) * Poles in analog filter map directly to Poles i in digital filter via transformation p, =e” ¢ There is no such relation between the zeros in the two filters * Gain at DC in digital filter may not equal unity, since sampled impulse response may only approximately sum to 1 Bilinear Transformation Method ¢ Mapping between s and z 2(1-<" s=— I T\U+z H,(2)=H,) 2( == ue") Tz alt T/2)s 1-(T/2)s Bilinear Transformation (cont.) * Mapping between s and z planes Y Re(s) 7 Re(e) NOD Bilinear Transformation (cont.) * Mapping between analog and digital frequencies 3 | QO, = 2arctan( 22 } 2 @, (rad / sample) 1 I ! ! l I 4 -20 -10 0 10 20 @, (rad / sec) Bilinear Transformation - Example No. 1 ¢ Design low-pass filter — cutoff frequency @,, = 72/5 rad/ sample — transition bandwidth and ripple A@, =0.27 radians / sample =0.1 cycles / sample 6=0.1 —use Butterworth analog prototype -set T=1 Bilinear Example No. 1 (cont.) ay | om - |Hy(@a)| |Hy(@q)|\=1-€ |Hy(@q)|=5 Bilinear Example No. 1 (cont.) * Map digital to analog frequencies 2 @, = —tan(@, /2 a F (@,/2) @y, =2/5-0.10 @,, =0.3168 rad /sec Oy =2/54+010 @,) =1.0191 rad/sec Bilinear Example No. 1 (cont.) * Solve for filter order and cutoff frequency 1 [Ha (@s yf “1+(@, /@,)% H,(@q))|=1-€ |H, (@q3)| =6 ae log(@,2 / @,1) O,9 —_ (a, (@p)?-1) Bilinear Example No. 1 (cont.) ¢ Result: N=3 O,, = 0.4738 ¢ Determine transfer function of analog filter 1 yn H,(s)H,(-8) = +G/jo,)™" * Poles are given by (a, 1% 27k n,m ,2mk y= oye ON my), k=0,1,...,2N-1 Bilinear Example No. 1 (cont.) * Take N poles with negative real parts for H(s) 5) = 0.2369 + j0.4103 = 0.4738¢/°"° 5, = 0.4738 + j0.0000 = 0.47387" 5 = 0.2369 — j0.4103 = 0.4738e 7"? ¢ Transfer function of analog filter 3 ac H,(s) =“ —— (5 — 5p (8 — 8, )(S — $y) ¢ Transform to discrete-time filter nw (2(tez neuf] Bilinear Example No. 1 (cont.) o;.(1 + zy MO = eqs l-2 sz =) 0.0083 + 0.0249z7! + 0.02492 + 0.0083z° 1.0000 — 2.076927! + 1.5343z? —0.3909z > Bilinear Example No. 1 (cont.) Digital Butterworth Filter Designed by Bilinear Transformation 1 ost -- €=0.01 1 08 1 5=0.01 0.7 ' >= 06 \ @,, = 0.3142 rad/sam i ! 8 = 05 ' @g =0.9425 rad /sam a 04 \ 0.3 N=3 0.2 1 orp -4t--- @,, = 0.4738 rad /sec I 0 0 0.5 1 15 2 2.5 3 @, (rad/sample) Comparision between Bilinear Transformation and Impulse Invariance |Hy(a,)I 2nd order digital Butterworth filters designed for same | . cutoff frequency , «—Bilinear Transformation ~-

You might also like