dsp lect 11 iir design
TRANSCRIPT
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 1/50
Discrete Time Systems
Lecture # 11
IIR Filter Design
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 2/50
Filter Design Specifications
• The filter design process
Dr Sajjad Zaidi - DS !
"nalysis Design Implementation
$agnitude Response
hase response%ost&comple'ity
FIR&IIR
Su(type order
Transfer
function
r o ( l e m
erformance
%onstraints
latformstructure
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 3/50
erformance %onstraints
• )) in terms of magnitude response*
Dr Sajjad Zaidi - DS +
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 4/50
erformance %onstraints
• ,est Filter
– improing one usually .orsens others
• ,ut* increasing filter order /i)e) cost0 – improes all three measures
Dr Sajjad Zaidi - DS
Transition
,and
ass(andRipple
$in Stop(and
"ttenuation
2arro.est
Smallest
3reatest
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 5/50
ass(and Ripple
• "ssume pea4 pass(and gain 5 1
• then minimum pass(and gain 5
• 6r7 ripple
Dr Sajjad Zaidi - DS 8
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 6/50
Stop(and Ripple
•
ea4 pass(and gain is "9 larger than pea4 stop(and gain• :ence7 minimum stop(and attenuation
Dr Sajjad Zaidi - DS ;
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 7/50
Filter Type %hoice FIR s IIR
Dr Sajjad Zaidi - DS <
FIR IIR2o Feed(ac4/just =eros0
Feed(ac4/poles > =eros0
"l.ays sta(le $ay (e unsta(le%an (e linear phase Difficult to control phase
:igh order /!? @ !???0
Typ A 1&1?6rder of FIR /-!?0
Bnrelated to %T filtering Derie from analogprototype
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 8/50
FIR s) IIR
• If you care a(out computational cost –
Bse lo.-comple'ity IIR – %omputation no o(ject C L FIR
• If you care a(out phase response – Bse linear-phase FIR
– hase unimportant C go .ith simple IIR0
Dr Sajjad Zaidi - DS
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 9/50
INFINITE IMPULSE RESPONSE FILTERS
Dr Sajjad Zaidi - DS E
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 10/50
IIR Filter Design
• IIR filters are directly related to –
analog filters /continuous time0 – ia a mapping of :/s0 /%ontinuous Time0
• to :/=0 /Discrete Time0
– It preseres many properties
• "nalog filter design is sophisticated – decades of pre-DS signal processing
• Design IIR filters ia analog prototype –
hence7 need to learn some %T filter design
Dr Sajjad Zaidi - DS 1?
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 11/50
"nalog Filter Design
• Decades of analysis of transistor-(ased –
filters @ sophisticated7 .ell understood• ,asic choices*
– ripples s) flatness in stop and&or pass(and
– more ripples C narro.er transition (and
Dr Sajjad Zaidi - DS 11
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 12/50
%T Transfer Functions
• "nalog systems* s-transform /Laplace0
Dr Sajjad Zaidi - DS 1!
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 13/50
,utter.orth Filters
• $a'imally flat in (oth pass > stop (ands
Dr Sajjad Zaidi - DS 1+
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 14/50
,utter.orth Filters
Dr Sajjad Zaidi - DS 1
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 15/50
,utter.orth Filters
• :o. to meet design specifications
Dr Sajjad Zaidi - DS 18
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 16/50
,utter.orth Filters
Dr Sajjad Zaidi - DS 1;
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 17/50
,utter.orth G'ample
Dr Sajjad Zaidi - DS 1<
Design a ,utter.orth filter
.ith 1 d, cutoff at 14:= and
a minimum attenuation of ?
d, at 8 4:=
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 18/50
Steps in Filter Design
• The general filter design pro(lem can (e (riefly stated as
follo.s)
H3ien some ideal freuency response7 D/f07 find a reali=a(le IIR or
FIR digital filter .hose freuency response7 :/f07 appro'imates D/f0J
• The reali=a(le filter is found (y optimi=ing some measure
of the filterKs performance7 e)g – $inimi=ing the filter order /IIR0 or the filter length /FIR07 – $inimi=ing the .idth of the transition (ands7
– Reducing the pass(and error and&or stop(and error
• Setting up the specifications for the general filter design
pro(lem .ill define these parameters and sho. .hichtrade-offs are possi(le)
Dr Sajjad Zaidi - DS 1
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 19/50
,utter.orth G'ample
• 6rder 2 5 .ill satisfy constraints
• Mhat are Nc and filter coefficients
– from a loo4up ta(le7 N-1d, 5 ?)8 .hen Nc 5 1
• So Nc 5 1???&?)8 5 1)1 4:=
– from a ta(le7 get normali=ed coefficients for
– 2 5 7 scale (y 11
• 6r7 use $atla(*
– O(7aP 5 (utter/27Qc7KsK0
Dr Sajjad Zaidi - DS 1E
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 20/50
"nalog Filter Types Summary
Dr Sajjad Zaidi - DS !?
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 21/50Dr Sajjad Zaidi - DS !1
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 22/50Dr Sajjad Zaidi - DS !!
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 23/50
Steps in Filter Designing
• Follo.ing are the steps to design a filter
1) %reate the Design Specifications
!) 6(tain Specs Deried from "nalog Filtering
+) Specifying an Grror $easure
) Select the Filter Type and 6rder
8) Design the Filter
;) Reali=e the Designed Filter
Dr Sajjad Zaidi - DS !+
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 24/50
Infinite Input Response Filter
• The impulse response h(n) has an infinite number of non-
zero samples (infinite length)
– "s an e'ample7 for a general IIR filter7 h(n)≠0 only for N o<n<∞,
where N o is a non-negatie integer
• The freuency response H(ω) is a rational funtion, i!e!, a
ratio of two finite-"egree polynomials in e #ω of the form
.here N o is an integer onstant!
• $he or"er of an %%& filter is e'ual to N, whih is the degree
of the denominator
• Bsually the degree of numerator is not greater than N
Dr Sajjad Zaidi - DS !
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 25/50
Infinite Input Response Filter
• &emember – $he or"er N also "etermines the number of preious output
samples that need to (e stored and then fed (ac4 to compute the
current output sample)
– Therefore7 IIR systems are also 4no.n as feedback systems!
– $he filter oeffiients *bn + an" *an + in the ' correspond to the
un4no.n parameters of the design)
Dr Sajjad Zaidi - DS !8
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 26/50
Infinite Input Response Filter
• Designing an IIR filter amounts to finding the rational
function
• $he H(ω ) shoul" best approimates the design
specifications)• In the freuency domain7 this is done (y computing the
HoptimalJ /relatie to some criteria0 coefficients bn + an" *an +
• $he filter or"er N is usually fie", but an also be
onsi"ere" as a free parameter to (e optimi=ed)
Dr Sajjad Zaidi - DS !;
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 27/50
Infinite Input Response Filter
• Filter transfer function7 denoted (y :/=07 is the =-transform
of h/n0 and is useful for studying the sta(ility of the system)
• For LSI filters7 sta(ility implies that a bounded input to the
filter .ill al.ays result in a bounded output)
• For IIR filters7 :/=0 is a rational function in the comple'
aria(le = and is gien (y
Dr Sajjad Zaidi - DS !<
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 28/50
Infinite Input Response Filter
• ,ecause the impulse response is infinitely long7
conolution can no longer (e used to implement the IIR
filters)
• Instead7 IIR filters are efficiently implemented using
fee"ba. "ifferene e'uations
• The noise characteristics of an IIR filter can (e a major
consideration .hen doing an implementation7 especially in
fi'ed-point arithmetic)
• %oefficient uanti=ation degrades the actual filter response
from that designed (y high-precision soft.are)
• $ore critical is round-off noise sensitiity .hich can (e
amplified (y the feed(ac4 loops in the filter)
Dr Sajjad Zaidi - DS !
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 29/50
Infinite Input Response Filter - ros• %ompared to FIR filters7
– IIR filters can achiee the desired design specifications .ith a relatiely lo. order /as fe.
as to ; poles0)
• Fe.er un4no.n parameters need to (e computed and stored7 .hich might
lead to a lo.er design and implementation comple'ity)
• :o.eer7 the phase response of IIR filters is neer linear7 .hich leads to the
use of all pass filters to compensate the group delay7 and – Thus raises the order of the filter and
– The comple'ity of the design process)
• IIR filters are commonly designed (y using closed-form design formulas
corresponding to classical filter types
– The order-estimating formulas for IIR filters are e'act since they are deried from
the mathematical properties of the classical prototypes)
– These formulas are ery useful to o(tain the IIR filter order needed to satisfy thedesired design specifications)
Dr Sajjad Zaidi - DS !E
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 30/50
Designing the Filter
• IIR filters are %ommonly designed (y – Transforming the digital design specifications in to analog design
specifications
– erforming the filter design in the analog domain)
– Transforming the analog filter into a digital filter using a suita(le
transformation)
•
opular $ethod are – ,ilinear Transformation method
1) ,utter.orth7
!) %he(yshe I
+) %he(yshe II
) Glliptic – Digital-only IIR design methods
Dr Sajjad Zaidi - DS +?
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 31/50
Dr Sajjad Zaidi - DS +1
G'ample @ IIR Filter Design
uestion Design a digital lo.-pass ,utter.orth filter .ith a +d, cut-off freuency
of !4:= and minimum attenuation of +?d, at )!84:= for a sampling rate of 1?4:=)
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 32/50
Dr Sajjad Zaidi - DS +!
R li i th D i d Filt
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 33/50
Reali=ing the Designed Filter
• Reali=ing the designed digital filter corresponds to
computing the output of the filter in response to any gien
input)
• For LSI filters7 this is simplified (y the fact that the input
and output signals are related through a simple conolution
operation in the time&space domain)
• If '/n0 is the input7 y/n0 the corresponding output7 and h/n0
the impulse response of the LSI filter7 then this relation is
gien (y
.here 2172! are the indices of the 1st and last non-=ero samples of h/n0)
Dr Sajjad Zaidi - DS ++
R li i th D i d Filt
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 34/50
Reali=ing the Designed Filter
• In the freuency /Fourier transform0 domain7 the
conolution relation /11)10 corresponds to multiplication of
the respectie Fourier transforms*
.here /Q07 :/Q07 and U/Q0 are the DTFT of '/n07 h/n07 and y/n07 respectiely)
• ,ut The aria(le is continuous and7 therefore7 it cannot (e
implemented in practice
• "n implementa(le ersion is o(tained (y using the Discrete
Fourier Transform /DFT07 .hich is a sampled ersion of the
DTFT and .hich consists of samples of the DTFTealuated at the points
Dr Sajjad Zaidi - DS +
20, , 1
DFT
k k N
N
π ω = = −K
2DFT is the si=e of the DFT and
corresponds to the num(er of
sample points .ithin the period !V
Si l IIR L
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 35/50
Simple IIR Lo.pass
• IIR C feed(ac47 =eros and poles7
– conditional sta(ility7 hOnP less useful
+8
1
1
1[ ]
1 LP
z H z K
z α
−
−
+=
−
scale to ma4egain 5 1 at Q 5 ?
pole-=erodiagram freuencyresponse FR onlog-log a'es
W 5 /1 - X0&!
Dr Sajjad Zaidi - DS
Si l IIR L
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 36/50
Simple IIR Lo.pass
• %utoff fre) Qc from
Dr Sajjad Zaidi - DS +;
1
1
1
[ ] 1 LP
z H z K
z α
−
−
+=
−
Si l IIR :i h
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 37/50
Simple IIR :ighpass
Dr Sajjad Zaidi - DS +<
1
1
1[ ]
1 HP
z H z K
z α
−
−
−=
−
ass Q5V
::/-1051W5/1YX0&!
:i h d L
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 38/50
:ighpass and Lo.pass
• %onsider lo.pass filter*
•
then
• :o.eer
/unless :/e j.0 is pure real @ not for IIR0
Dr Sajjad Zaidi - DS +
Si l IIR , d
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 39/50
Simple IIR ,andpass
Dr Sajjad Zaidi - DS +E
Si l Filt G l
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 40/50
Simple Filter G'ample
Tas4
–
Design a second order IIR (andpass filter .ith Qc5?)V7+d, (and.idth of ?)1V
Dr Sajjad Zaidi - DS ?
Simple IIR ,andstop
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 41/50
Simple IIR ,andstop
Dr Sajjad Zaidi - DS 1
%ascading Filter
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 42/50
%ascading Filter
• Repeating a filter /cascade connection0 ma4es its
characteristics more a(rupt*
Dr Sajjad Zaidi - DS !
Repeated roots in =-plane*
%ascading Filter
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 43/50
%ascading Filter
• %ascade systems are higher order
• e)g) longer /finite0 impulse response*
• In general7 cascade filters .ill not (e optimal for a gien
order
Dr Sajjad Zaidi - DS +
Linear phase Filters
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 44/50
Linear-phase Filters
• :/e jQ0 alone can hide phase distortion – differing delays for adjacent freuencies can mangle the signal
• refer filters .ith a flat phase response – e)g) [/Q0 5 ? H=ero phase filterJ
• " filter .ith constant delay \p 5 D at all freKs has
– [/Q0 5 ]DQ Hlinear phaseJ
• Linear phase can ^shiftK to =ero phase
Dr Sajjad Zaidi - DS
Time reersal filtering
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 45/50
Time reersal filtering
• "chiees =ero-phase result
• 2ot causal_ 2eed .hole signal first
8
x[n] :/=0Time
reersal:/=0
Time
reersal
w[n
]
u[n]v[n]
y[n]
Dr Sajjad Zaidi - DS
Some Filter Types
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 46/50
Some Filter Types
• Me hae seen the (asics of filters and a range of
simple e'amples• 2o. loo4 at a couple of other classes*
– %om( filters - multiple pass&stop (ands
– "llpass filters - only modify signal phase
Dr Sajjad Zaidi - DS ;
%om( Filter
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 47/50
%om( Filter
• Replace all system delays =-1 .ith longer delays =-L
• C System that (ehaes ^the sameK at a longer timescale
Dr Sajjad Zaidi - DS <
%om( Filter
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 48/50
%om( Filter
• ^arentK filter impulse response hOnP (ecomes com( filter
output – gOnP 5 hO?P ? ? ? ? hO1P ? ? ? ? hO!P))`
• Thus7
• Thus freuency response*
• :igh-pass response C
• pass Q 5 V&L7 +V&L7 8V&L)))
• cut Q 5 ?7 !V&L7 V&L)))
Dr Sajjad Zaidi - DS
"llpass Filter
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 49/50
"llpass Filter
• "llpass filter has "/e jQ0! 5 W Q∀ – i)e) spectral energy is not changed
• hase response is non=ero /elsetriial0 – phase correction or special effects
• e)g)
• "llpass has special form of systemfn
• "$/=0 has poles .here D$/0 5 ?
C "$/=0 has =eros b 5 1&
Dr Sajjad Zaidi - DS E
7/23/2019 DSP Lect 11 Iir Design
http://slidepdf.com/reader/full/dsp-lect-11-iir-design 50/50
3ood Luc4