Digital Filter Deign Objetive - Determinatin f a realiable tranfer funtin G() arximating a given frequeny rene eifiatin i an imrtant te in the develment f a digital filter If an IIR filter i deired, G() huld be a table real ratinal funtin Digital filter deign i the re f deriving the tranfer funtin G() Digital Filter Seifiatin Uually, either the magnitude and/r the hae (delay) rene i eified fr the deign f digital filter fr mt aliatin In me ituatin, the unit amle rene r the te rene may be eified In mt ratial aliatin, the rblem f interet i the develment f a realiable arximatin t a given magnitude rene eifiatin Digital Filter Seifiatin We diu in thi ure nly the magnitude arximatin rblem There are fur bai tye f ideal filter with magnitude rene a hwn belw H LP(e j ) H BP (e j ) H HP(e j ) H BS(e j ) 4 Digital Filter Seifiatin A the imule rene rrending t eah f thee ideal filter i nnaual and f infinite length, thee filter are nt realiable In ratie, the magnitude rene eifiatin f a digital filter in the aband and in the tband are given with me aetable tlerane In additin, a tranitin band i eified between the aband and tband Digital Filter Seifiatin Fr examle, the magnitude rene G( e f a digital lwa filter may be given a indiated belw ) Digital Filter Seifiatin A indiated in the figure, in the aband, defined by ω ω, we require that G( e ) with an errr ± δ, i.e., δ G( e ) + δ, ω ω In the tband, defined by ω ω π, we require that G( e ) with an errr δ, i.e., G ( e ) δ, ω ω π 5 6
7 Digital Filter Seifiatin ω - aband edge frequeny ω - tband edge frequeny δ - eak rile value in the aband δ - eak rile value in the tband Sine G( e ) i a eridi funtin f ω, and G( e ) f a real-effiient digital filter i an even funtin f ω A a reult, filter eifiatin are given nly fr the frequeny range ω π 8 Digital Filter Seifiatin Seifiatin are ften given in term f l funtin A ( ω) lg G( e ) in db Peak aband rile α lg( δ ) db Minimum tband attenuatin α lg ( δ ) db Digital Filter Seifiatin Magnitude eifiatin may alternately be given in a nrmalied frm a indiated belw Digital Filter Seifiatin Here, the maximum value f the magnitude in the aband i aumed t be unity / + ε - Maximum aband deviatin, given by the minimum value f the magnitude in the aband - Maximum tband magnitude A 9 Digital Filter Seifiatin Fr the nrmalied eifiatin, maximum value f the gain funtin r the minimum value f the l funtin i db Maximum aband attenuatin - αmax lg( + ε ) db Fr δ <<, it an be hwn that α lg ( δ ) db max Digital Filter Seifiatin In ratie, aband edge frequeny F and tband edge frequeny F are eified in H Fr digital filter deign, nrmalied bandedge frequenie need t be muted frm eifiatin in H uing Ω πf ω πft FT FT Ω πf ω πf T F F T T
Digital Filter Seifiatin Examle-Let F 7 kh, F kh, and F T 5 kh Then π(7 ) ω. 56π 5 π( ) ω. 4π 5 4 Seletin f Filter Tye The tranfer funtin H() meeting the frequeny rene eifiatin huld be a aual tranfer funtin Fr IIR digital filter deign, the IIR tranfer funtin i a real ratinal funtin f : + H ( ) d + d + + d + L+ + L+ d M M N N, M N H() mut be a table tranfer funtin and mut be f lwet rder N fr redued mutatinal mlexity 5 Seletin f Filter Tye Fr FIR digital filter deign, the FIR tranfer funtin i a lynmial in with real effiient: H ( ) h[ n] n n Fr redued mutatinal mlexity, degree N f H() mut be a mall a ible If a linear hae i deired, the filter effiient mut atify the ntraint: h[ n] ± h[ N n] N 6 Seletin f Filter Tye Advantage in uing an FIR filter - () Can be deigned with exat linear hae, () Filter truture alway table with quantied effiient Diadvantage in uing an FIR filter - Order f an FIR filter, in mt ae, i niderably higher than the rder f an equivalent IIR filter meeting the ame eifiatin, and FIR filter ha thu higher mutatinal mlexity 7 Digital Filter Deign: Bai Arahe Mt mmn arah t IIR filter deign - () Cnvert the digital filter eifiatin int an analg rttye lwa filter eifiatin () Determine the analg lwa filter tranfer funtin H a () () Tranfrm H a () int the deired digital tranfer funtin G() 8 Digital Filter Deign: Bai Arahe Thi arah ha been widely ued fr the fllwing rean: () Analg arximatin tehnique are highly advaned () They uually yield led-frm lutin () Extenive table are available fr analg filter deign (4) Many aliatin require digital imulatin f analg ytem
9 Digital Filter Deign: Bai Arahe An analg tranfer funtin t be dented a Pa ( ) Ha ( ) D ( ) where the ubrit a eifially indiate the analg dmain A digital tranfer funtin derived frm hall be dented a P( ) G ( ) D( ) a H a () Digital Filter Deign: Bai Arahe Bai idea behind the nverin f H a () int G() i t aly a maing frm the -dmain t the -dmain that eential rertie f the analg frequeny rene are reerved Thu maing funtin huld be uh that Imaginary ( jω) axi in the -lane be maed nt the unit irle f the -lane A table analg tranfer funtin be maed int a table digital tranfer funtin Digital Filter Deign: Bai Arahe FIR filter deign i baed n a diret arximatin f the eified magnitude rene, with the ften added requirement that the hae be linear The deign f an FIR filter f rder N may be amlihed by finding either the length-(n+) imule rene amle r the (N+) amle f it frequeny rene H ( e ) { h[n] } Digital Filter Deign: Bai Arahe Three mmnly ued arahe t FIR filter deign - () Windwed Furier erie arah () Frequeny amling arah () Cmuter-baed timiatin methd IIR Digital Filter Deign: Bilinear Tranfrmatin Methd Bilinear tranfrmatin - T + Abve tranfrmatin ma a ingle int in the -lane t a unique int in the -lane and vie-vera Relatin between G() and H a () i then given by G( ) H a ( ) T + 4 Bilinear Tranfrmatin Digital filter deign nit f te: () Devel the eifiatin f H a () by alying the invere bilinear tranfrmatin t eifiatin f G() () Deign H a () () Determine G() by alying bilinear tranfrmatin t H a () A a reult, the arameter T ha n effet n G() and T i hen fr nveniene 4
5 Bilinear Tranfrmatin Invere bilinear tranfrmatin fr T i + Fr σ + jω ( + σ) + jω ( + σ) + Ω ( σ ) jω ( σ) + Ω Thu, σ σ σ < < > > 6 Bilinear Tranfrmatin Maing f -lane int the -lane r Bilinear Tranfrmatin Fr e jω e + e Ω tan(ω/ ) with T we have / / / e ( e e ) / / / e ( e + e ) jin( ω/ ) j tan( ω/ ) ( ω/ ) Bilinear Tranfrmatin Maing i highly nnlinear Cmlete negative imaginary axi in the - lane frm Ω t Ω i maed int the lwer half f the unit irle in the -lane frm t Cmlete itive imaginary axi in the - lane frm Ω t Ω i maed int the uer half f the unit irle in the -lane frm t 7 8 9 Bilinear Tranfrmatin Nnlinear maing intrdue a ditrtin in the frequeny axi alled frequeny waring Effet f waring hwn belw Ω Ω tan(ω/) Bilinear Tranfrmatin Ste in the deign f a digital filter - () Prewar( ω, ω ) t find their analg equivalent ( Ω, Ω ) () Deign the analg filter H a () () Deign the digital filter G() by alying bilinear tranfrmatin t H a () Tranfrmatin an be ued nly t deign digital filter with reribed magnitude rene with ieewie ntant value Tranfrmatin de nt reerve hae rene f analg filter 5
IIR Digital Filter Deign Uing Bilinear Tranfrmatin Examle- Cnider Ω Ha( ) + Ω Alying bilinear tranfrmatin t the abve we get the tranfer funtin f a firt-rder digital lwa Butterwrth filter Ω ( ) ( ) ( ) + G H a ( ) + Ω ( + ) + IIR Digital Filter Deign Uing Bilinear Tranfrmatin Rearranging term we get where G ( ) α + Ω α + Ω α tan( ω + tan( ω / ) / ) IIR Digital Filter Deign Uing Bilinear Tranfrmatin Examle-Cnider the end-rder analg nth tranfer funtin + Ω Ha( ) + B + Ω fr whih H a ( jω ) Ha( j) Ha( j ) Ω i alled the nth frequeny If Ha( jω ) Ha( jω) / then B Ω i the -db nth bandwidth Ω 4 IIR Digital Filter Deign Uing Bilinear Tranfrmatin Then where G( ) H a ( ) + ) + ) + ( + Ω ) ( Ω ( + Ω ( + Ω + B) ( Ω ( + Ω + α β + β ( + α) + α α β + + Ω + Ω Ω + Ω B tan( B B + tan( B ω w w / ) / ) ) B) 5 IIR Digital Filter Deign Uing Bilinear Tranfrmatin Examle- Deign a nd-rder digital nth filter erating at a amling rate f 4 H with a nth frequeny at 6 H, -db nth bandwidth f 6 H Thu ω π(6/ 4). π B w π(6/ 4). π Frm the abve value we get α.999 β.587785 6 IIR Digital Filter Deign Uing Bilinear Tranfrmatin Thu.954965.687 +.954965 G( ).687 +.999 The gain and hae rene are hwn belw Gain, db - - - -4 5 5 Frequeny, H Phae, radian - - 5 5 Frequeny, H 6
7 IIR Lwa Digital Filter Deign Uing Bilinear Tranfrmatin Examle-Deign a lwa Butterwrth digital filter with ω. 5π, ω. 55π, α.5db, and α 5 db Thu ε.85 A. 6777 If G( ) thi imlie e j j.5π lg G( e ).5 j.55π lg G( e ) 5 8 IIR Lwa Digital Filter Deign Uing Bilinear Tranfrmatin Prewaring we get Ω tan( ω / ) tan(.5π/ ).446 Ω tan( ω / ) tan(.55π/ ).78496 The invere tranitin rati i Ω.86689 k Ω The invere diriminatin rati i A 5.84979 k ε 9 IIR Lwa Digital Filter Deign Uing Bilinear Tranfrmatin lg Thu N lg (/ k) (/ k) We he N T determine we ue H a ( jω Ω ) + ( Ω / Ω ).6586997 N + ε 4 IIR Lwa Digital Filter Deign Uing Bilinear Tranfrmatin We then get Ω.4995( Ω ).58848 rd-rder lwa Butterwrth tranfer funtin fr Ω i H an ( ) ( + )( + + ) Denrmaliing t get Ω.58848 we arrive at H ( ) H a an.58848 Magnitude 4 IIR Lwa Digital Filter Deign Uing Bilinear Tranfrmatin Alying bilinear tranfrmatin t H a () we get the deired digital tranfer funtin G( ) H ( ) a + Magnitude and gain rene f G() hwn belw:.8.6.4...4.6.8 ω/π Gain, db - - - -4..4.6.8 Cyright ω/π 5, S. K. Mitra 4 Deign f IIR Higha, Banda, and Bandt Digital Filter Firt Arah - () Prewar digital frequeny eifiatin f deired digital filter G D () t arrive at frequeny eifiatin f analg filter H D () f ame tye () Cnvert frequeny eifiatin f H D () int that f rttye analg lwa filter H LP () () Deign analg lwa filter H LP () 7
4 Deign f IIR Higha, Banda, and Bandt Digital Filter (4) Cnvert H LP () int H D () uing invere frequeny tranfrmatin ued in Ste (5) Deign deired digital filter G D () by alying bilinear tranfrmatin t H D () Deign f IIR Higha, Banda, and Bandt Digital Filter 44 Send Arah - () Prewar digital frequeny eifiatin f deired digital filter G D () t arrive at frequeny eifiatin f analg filter H D () f ame tye () Cnvert frequeny eifiatin f H D () int that f rttye analg lwa filter H LP () 45 Deign f IIR Higha, Banda, and Bandt Digital Filter () Deign analg lwa filter H LP () (4) Cnvert H LP () int an IIR digital tranfer funtin G LP () uing bilinear tranfrmatin (5) Tranfrm G LP () int the deired digital tranfer funtin G D () We illutrate the firt arah 46 IIR Higha Digital Filter Deign Deign f a Tye Chebyhev IIR digital higha filter Seifiatin: F 7 H, F 5 H, α db, α db, F T kh Nrmalied angular bandedge frequenie πf π 7 ω. 7π FT πf π ω 5. 5π F T 47 IIR Higha Digital Filter Deign Prewaring thee frequenie we get tan( ω / ).9665 tan( ω / ). Fr the rttye analg lwa filter he Ω Ω Ω Uing Ω ˆ we get Ω. 965 Analg lwa filter eifiatin: Ω, Ω.965, α db, db α 48 IIR Higha Digital Filter Deign MATLAB de fragment ued fr the deign [N, Wn] hebrd(,.9665,,, ) [B, A] heby(n,, Wn, ); [BT, AT] lh(b, A,.9665); [num, den] bilinear(bt, AT,.5); Gain, db - - - -4-5..4.6.8 ω/π 8
49 IIR Banda Digital Filter Deign Deign f a Butterwrth IIR digital banda filter Seifiatin: ω. 45π, ω. 65π, ω. π, ω. 75π, α db, α 4dB Prewaring we get tan( ω / ).85487 tan( ω / ).6857 tan( ω / ).59554 tan( ω / ).4456 5 IIR Banda Digital Filter Deign Width f aband B w ˆ Ω.77777 ˆ Ω ˆ ˆ Ω Ω.97 ˆ ˆ Ω.5 Ω We therefre mdify that and exhibit gemetri ymmetry with reet t We et.577 Fr the rttye analg lwa filter we he Ω 5 IIR Banda Digital Filter Deign Uing Ω Ω Ω Bw we get.97.788.6767.577.77777 Seifiatin f rttye analg Butterwrth lwa filter: Ω, Ω. 6767, α db, 4 db α 5 IIR Banda Digital Filter Deign MATLAB de fragment ued fr the deign [N, Wn] buttrd(,.6767,, 4, ) [B, A] butter(n, Wn, ); [BT, AT] lb(b, A,.85647,.77777); [num, den] bilinear(bt, AT,.5); Gain, db - - - -4-5..4.6.8 ω/π 5 IIR Bandt Digital Filter Deign Deign f an elliti IIR digital bandt filter Seifiatin: ω. 45π, ω. 65π, ω. π, ω. 75π, α db, α 4dB Prewaring we get.85486,.6857, Ω ˆ.59554,. 446 Width f tband. 77777 B w ˆ Ω.97. 54 IIR Bandt Digital Filter Deign ˆ ˆ We therefre mdify Ω that and Ω exhibit gemetri ymmetry with reet t We et.577 Fr the rttye analg lwa filter we he Ω B Uing w Ω Ω we get ˆ ˆ Ω Ω.59554.77777 Ω.446.97.787 9
IIR Bandt Digital Filter Deign MATLAB de fragment ued fr the deign [N, Wn] ellird(.446,,, 4, ); [B, A] elli(n,, 4, Wn, ); [BT, AT] lb(b, A,.85647,.77777); [num, den] bilinear(bt, AT,.5); - 55 Gain, db - - -4-5..4.6.8 ω/π