iir direct form realization
TRANSCRIPT
-
8/12/2019 IIR Direct Form Realization
1/69
Copyright 2001, S. K. Mitra
Basic IIR Digital Filter
Structures The causal IIR digital filters we are
concerned with in this course are
characterized by a real rational transferfunction of or, equivalently by a constantcoefficient difference equation
From the difference equation representation,it can be seen that the realization of thecausal IIR digital filters requires some formof feedback
1z
-
8/12/2019 IIR Direct Form Realization
2/69
Copyright 2001, S. K. Mitra
Basic IIR Digital Filter
Structures AnN-th order IIR digital transfer function is
characterized by2N+1 unique coefficients,
and in general, requires2N+1 multipliersand 2Ntwo-input adders for implementation
Direct form IIR filters:Filter structures in
which the multiplier coefficients areprecisely the coefficients of the transfer
function
-
8/12/2019 IIR Direct Form Realization
3/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures Consider for simplicity a3rd-order IIR filter
with a transfer function
We can implementH(z)as a cascade of two
filter sections as shown on the next slide
33
22
11
33
22
110
1
zdzdzd
zpzpzpp
zD
zPzH
)(
)()(
-
8/12/2019 IIR Direct Form Realization
4/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures
where
33
22
1101
zpzpzppzP
zX
zWzH )(
)(
)()(
)(zH1
)(zH2
)(zW)(zX )(zY
33
22
11
21
11
zdzdzdzDzW
zYzH
)()(
)()(
-
8/12/2019 IIR Direct Form Realization
5/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures The filter section can be seen to be
an FIR filter and can be realized as shown
below]3[]2[]1[][][ 3210 nxpnxpnxpnxpnw
)(zH1
-
8/12/2019 IIR Direct Form Realization
6/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures The time-domain representation of is
given by
Realization of
follows from the
above equationand is shown on
the right
)(zH2
][][][][][ 321 321 nydnydnydnwny
)(zH2
-
8/12/2019 IIR Direct Form Realization
7/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures A cascade of the two structures realizing
and leads to the realization of
shown below and is known as thedirectform Istructure
)(zH2
)(zH1)(zH
-
8/12/2019 IIR Direct Form Realization
8/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures Note:The direct form Istructure is
noncanonic as it employs6 delays to realize
a 3rd-order transfer function
A transpose of the
direct form Istructure
is shown on the rightand is called thedirect
form I structuret
-
8/12/2019 IIR Direct Form Realization
9/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures
Various other noncanonic direct form
structures can be derived by simple block
diagram manipulations as shown below
-
8/12/2019 IIR Direct Form Realization
10/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures
Observe in the direct form structure shown
below, the signal variable at nodes and
are the same, and hence the two top delayscan be shared
1 '1
-
8/12/2019 IIR Direct Form Realization
11/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures Likewise, the signal variables at nodes
and are the same, permitting the sharing
of the middle two delays Following the same argument, the bottom
two delays can be shared
Sharing of all delays reduces the totalnumber of delays to 3resulting in a canonicrealization shown on the next slide alongwith its transpose structure
2
'2
-
8/12/2019 IIR Direct Form Realization
12/69
Copyright 2001, S. K. Mitra
Direct Form IIR Digital Filter
Structures
Direct form realizations of anN-th order IIR
transfer function should be evident
-
8/12/2019 IIR Direct Form Realization
13/69
-
8/12/2019 IIR Direct Form Realization
14/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures Examples of cascade realizations obtained
by different pole-zero pairings are shown
below
-
8/12/2019 IIR Direct Form Realization
15/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures Examples of cascade realizations obtained
by different ordering of sections are shown
below
-
8/12/2019 IIR Direct Form Realization
16/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures There are altogether a total of 36different
cascade realizations of
based on pole-zero-pairings and ordering
Due to finite wordlength effects, each such
cascade realization behaves differently from
others
)()()()()()()( zDzDzD
zPzPzPzH321
221
-
8/12/2019 IIR Direct Form Realization
17/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures Usually, the polynomials are factored into a
product of 1st-order and 2nd-order
polynomials:
In the above, for a first-order factor
k kk
kk
zz
zzpzH
22
11
22
11
01
1
)(
022 kk
-
8/12/2019 IIR Direct Form Realization
18/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures Consider the 3rd-order transfer function
One possible realization is shown below
2
221
12
222
112
111
111
1
1
1
1
0 zzpzH
zz
z
z
)(
-
8/12/2019 IIR Direct Form Realization
19/69
-
8/12/2019 IIR Direct Form Realization
20/69
Copyright 2001, S. K. Mitra
Cascade Form IIR Digital
Filter Structures
Direct form II Cascade form
-
8/12/2019 IIR Direct Form Realization
21/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures A partial-fraction expansion of the transfer
function in leads to the parallel form I
structure Assuming simple poles, the transfer function
H(z) can be expressed as
In the above for a real pole
k zz
z
kk
kkzH2
21
1
110
10
)(
012 kk
1z
-
8/12/2019 IIR Direct Form Realization
22/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures A direct partial-fraction expansion of the
transfer function inzleads to the parallel
form IIstructure Assuming simple poles, the transfer function
H(z) can be expressed as
In the above for a real pole
k zz
zz
kk
kkzH2
21
1
2210
10
)(
022 kk
-
8/12/2019 IIR Direct Form Realization
23/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures The two basic parallel realizations of a 3rd-
order IIR transfer function are shown below
Parallel form I Parallel form II
-
8/12/2019 IIR Direct Form Realization
24/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures Example - A partial-fraction expansion of
in yields
321
321
20180401
0203620440
zzzzzz
zH ...
...
)(
21
1
1 50801
2050
401
60
10
zzz
zzH ..
..
.
.
.)(
1z
-
8/12/2019 IIR Direct Form Realization
25/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures
The correspondingparallel form Irealization
is shown below
-
8/12/2019 IIR Direct Form Realization
26/69
Copyright 2001, S. K. Mitra
Parallel Form IIR Digital Filter
Structures Likewise,a partial-fraction expansion of
H(z)inzyields
The corresponding
parallel form II
realization is shown
on the right
21
11
1
1
50801
25020
401
240
zz
zz
z
zzH
..
..
.
.)(
-
8/12/2019 IIR Direct Form Realization
27/69
Copyright 2001, S. K. Mitra
Realization Using MATLAB
The cascade form requires the factorization
of the transfer function which can bedeveloped using the M-filezp2sos
The statementsos = zp2sos(z,p,k)
generates a matrixsoscontaining the
coefficients of each2nd-order section of the
equivalent transfer functionH(z) determined
from its pole-zero form
-
8/12/2019 IIR Direct Form Realization
28/69
Copyright 2001, S. K. Mitra
Realization Using MATLAB
sosis an matrix of the form
whosei-th row contains the coefficientsand , of the the numerator and
denominator polynomials of thei-th2nd-
order section
6L
2L1L0L2L1L0L
221202221202
211101211101
dddppp
dddppp
dddppp
sos
}{ ip}{ id
-
8/12/2019 IIR Direct Form Realization
29/69
Copyright 2001, S. K. Mitra
Realization Using MATLAB
Ldenotes the number of sections
The form of the overall transfer function is
given by
Program 6_1can be used to factorize an
FIR and an IIR transfer function
L
i iii
iiiL
ii
zdzdd
zpzppzHzH
12
21
10
22
110
1
)()(
-
8/12/2019 IIR Direct Form Realization
30/69
Copyright 2001, S. K. Mitra
Realization Using MATLAB
Note:An FIR transfer function can be
treated as an IIR transfer function with a
constant numerator of unity and adenominator which is the polynomial
describing the FIR transfer function
-
8/12/2019 IIR Direct Form Realization
31/69
Copyright 2001, S. K. Mitra
Realization Using MATLAB
Parallel forms I and II can be developedusing the functionsresiduezand
residue, respectively Program 6_2 uses these two functions
-
8/12/2019 IIR Direct Form Realization
32/69
Copyright 2001, S. K. Mitra
Realization of Allpass Filters
AnM-th order real-coefficient allpass
transfer function is characterized by
Munique coefficients as here the numerator
is the mirror-image polynomial of thedenominator
A direct form realization of requires
2Mmultipliers
Objective -Develop realizations of
requiring onlyMmultipliers
)(zAM
)(zAM
)(zAM
-
8/12/2019 IIR Direct Form Realization
33/69
Copyright 2001, S. K. Mitra
Realization Using Multiplier
Extraction Approach
Now, an arbitrary allpass transfer function
can be expressed as a product of 2nd-orderand/or 1st-order allpass transfer functions
We consider first the minimum multiplier
realization of a 1st-order and a 2nd-orderallpass transfer functions
-
8/12/2019 IIR Direct Form Realization
34/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
Consider first the1st-order allpass transfe
function given by
We shall realize the above transfer function
in the form a structure containing a single
multiplier as shown below1d
121122211122111 ttttztzt ,,
1d
1X
2X1
Y
2Y
-
8/12/2019 IIR Direct Form Realization
35/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
We express the transfer function
in terms of the transfer parameters of the
two-pair as
A comparison of the above with
yields1
1
11
11
zd
zdzA )(
221
21122211111
221
1211211 111 td
ttttdt
td
dtttzA
)()(
111 XYzA /)(
1211222111
221
11 ttttztzt ,,
-
8/12/2019 IIR Direct Form Realization
36/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
Substituting and in
we get
There are 4possible solutions to the above
equation:
Type 1A:
Type 1B:
121122211 tttt
111
zt 1
22 zt
22112 1 ztt
11 21212122111 tztztzt ,,,
121
112
122
111 11
ztztztzt ,,,
-
8/12/2019 IIR Direct Form Realization
37/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
Type 1A :
Type 1B :
We now develop the two-pair structure for
the Type 1Aallpass transfer function
22112
122
111 11
zttztzt ,,,
121
112
122
111 11
ztztztzt ,,,
t
t
-
8/12/2019 IIR Direct Form Realization
38/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
From the transfer parameters of this allpass
we arrive at the input-output relations:
A realization of the above two-pair is
sketched below
2112 XzXY
221
22
11
1 1 XYzXzXzY )(
-
8/12/2019 IIR Direct Form Realization
39/69
-
8/12/2019 IIR Direct Form Realization
40/69
Copyright 2001, S. K. Mitra
First-Order Allpass Structures
In a similar fashion, the other three single-multiplier first-order allpass filter structures
can be developed as shown below
Type 1B Type 1At
Type 1Bt
-
8/12/2019 IIR Direct Form Realization
41/69
Copyright 2001, S. K. Mitra
Second-Order Allpass
Structures A 2nd-order allpass transfer function is
characterized by 2unique coefficients
Hence, it can be realized using only 2multipliers
Type 2allpass transfer function:
221
11
21121
21
zddzd
zzdddzA )(
-
8/12/2019 IIR Direct Form Realization
42/69
Copyright 2001, S. K. Mitra
Type 2 Allpass Structures
-
8/12/2019 IIR Direct Form Realization
43/69
-
8/12/2019 IIR Direct Form Realization
44/69
Copyright 2001, S. K. Mitra
Type 3 Allpass Structures
R li ti U i M lti li
-
8/12/2019 IIR Direct Form Realization
45/69
Copyright 2001, S. K. Mitra
Realization Using MultiplierExtraction Approach
Example -Realize
A3-multiplier realization of the aboveallpass transfer function is shown below
321
321
20180401
40180203
zzz
zzzzA
...
...)(
)..)(.()..)(.(
211
211
50801401805040
zzzzzz
-
8/12/2019 IIR Direct Form Realization
46/69
-
8/12/2019 IIR Direct Form Realization
47/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Let
We use the recursion
where
It has been shown earlier that is
stable if and only if
mm
mm
mmmmm
zdzdzdzd
zzdzdzddm zA
)(
)(
...
...)(
11
22
11
11
22
11
1
11 ,...,, MMm],[)()(
)(
zAk
kzAm
mm
mmzzA
11
mmm
dAk )(
)(zAM
12
mk for 11 ,...,, MMm
-
8/12/2019 IIR Direct Form Realization
48/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach If the allpass transfer function is
expressed in the form
then the coefficients of are simply
related to the coefficients of through
)()(
)()(
''...'
'...'')( 1
12
21
1
121121
11
mm
mm
mmmm
zdzdzd
zzdzddm zA
)(zAm 1)(zAm
111
2
mi
d
dddd
m
immii ,'
)(zAm 1
-
8/12/2019 IIR Direct Form Realization
49/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach To develop the realization method we
express in terms of :
We realize in the form shown below
)(zAm 1)(zAm
)(zAm
)(
)()(zAzk
zAzkm
mm
mmzA1
111
1
)(zAm
)(zAm 11
X
1Y
2X
2Y
2221
1211
tt
tt
-
8/12/2019 IIR Direct Form Realization
50/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach
The transfer function of the
constrained two-pair can be expressed as
Comparing the above with
we arrive at the two-pair transfer parameters
)()()()(
zAtzAtttttm
m
mzA122
121122211111
11 XYzAm /)(
)(
)()(
zAzk
zAzkm
mm
mmzA1
111
1
-
8/12/2019 IIR Direct Form Realization
51/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach
Substituting and in the
equation above we get
There are a number of solutions for and
12211
zktkt mm,1
21122211 ztttt
122 zkt mmkt 11
122112 1
zktt m)(
21t12t
-
8/12/2019 IIR Direct Form Realization
52/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Some possible solutions are given below:
11 2112
121
2211 tzktzktkt mmm ,)(,,
mmmm ktzktzktkt 11 21
112
12211 ,)(,,
2
21
12
12
1
2211 11 mmmm ktzktzktkt ,,,
2
21
1
12
1
2211 1
mmm ktztzktkt ,,,
-
8/12/2019 IIR Direct Form Realization
53/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Consider the solution
Corresponding input-output relations are
A direct realization of the above equations
leads to the 3-multiplier two-pair shown on
the next slide
11 2112
121
2211 tzktzktkt mmm ,)(,,
212
11 1 XzkXkY mm )(
21
12 XzkXY m
R li ti U i T P i
-
8/12/2019 IIR Direct Form Realization
54/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach
The transfer parameters
lead to the 4-multiplier two-pair structure
shown below
mmmm ktzktzktkt 11 21
112
12211 ,)(,,
-
8/12/2019 IIR Direct Form Realization
55/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Likewise, the transfer parameters
lead to the 4-multiplier two-pair structure
shown below
2
21
12
12
1
2211 11 mmmm ktzktzktkt ,,,
-
8/12/2019 IIR Direct Form Realization
56/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach A2-multiplier realization can be derived by
manipulating the input-output relations:
Making use of the second equation, we can
rewrite the first equation as
212
11 1 XzkXkY mm
)(
21
12 XzkXY m
21
21 XzYkY m
-
8/12/2019 IIR Direct Form Realization
57/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach A direct realization of
lead to the2-multiplier two-pair structure,
known as thelattice structure, shown below
21
21 XzYkY m
2112 XzkXY m
-
8/12/2019 IIR Direct Form Realization
58/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Consider the two-pair described by
Its input-output relations are given by
Define
mmmm ktzktzktkt 11 21
112
12211 ,)(,,
21
11 1 XzkXkY mm )(
2
1
12 1 XzkXkY
mm
)(
21
11 XzXkV m )(
-
8/12/2019 IIR Direct Form Realization
59/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach We can then rewrite the input-output
relations as and
The corresponding 1-multiplier realizationis shown below
21
11 XzVY 112 VXY
1V
1V
-
8/12/2019 IIR Direct Form Realization
60/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Anmth-order allpass transfer function
is then realized by constraining any one of
the two-pairs developed earlier by the
th-order allpass transfer function)( 1m
)(zAm
)(zAm 1
-
8/12/2019 IIR Direct Form Realization
61/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach The process is repeated until the
constraining transfer function is
The complete realization of based onthe extraction of the two-pair latttice is
shown below
)(zAM
10 )(zA
-
8/12/2019 IIR Direct Form Realization
62/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach It follows from our earlier discussion that
is stable if the magnitudes of all
multiplier coefficients in the realization areless than 1, i.e., for
The cascaded lattice allpass filter structure
requires2Mmultipliers A realization withMmultipliers is obtained if
instead the single multiplier two-pair is used
1|| mk 11 ,...,, MMm
)(zAM
-
8/12/2019 IIR Direct Form Realization
63/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Example -Realize
332211
321
121
1
zdzdzd
zzdzdd
321
321
3 2.018.04.01
4.018.02.0)(
zzz
zzzzA
-
8/12/2019 IIR Direct Form Realization
64/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach We first realize in the form of a
lattice two-pair characterized by the
multiplier coefficientand constrained by a 2nd-order allpass
as indicated below
)(3 zA
)(2 zA2.033 dk
2.03 k
-
8/12/2019 IIR Direct Form Realization
65/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach The allpass transfer function is of the
form
Its coefficients are given by
)(2 zA
22
11
2112
''1
''
2 )(
zdzdzzdd
zA
4541667.0223
231
)2.0(1
)18.0)(2.0(4.0
1
'1
d
dddd
2708333.022
3
132
)2.0(1
)4.0)(2.0(18.0
1
'2
d
dddd
-
8/12/2019 IIR Direct Form Realization
66/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Next, the allpass is realized as a
lattice two-pair characterized by the
multiplier coefficientand constrained by an allpass as
indicated below
)(2 zA
)(1 zA2708333.0
'22 dk
,2.03 k 2708333.02k
-
8/12/2019 IIR Direct Form Realization
67/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach The allpass transfer function is of the
form
It coefficient is given by
)(1 zA
11
11
"1
"
1 )(
zd
zd
zA
3573771.02708333.1
4541667.0
1)(1
"
1 '2
'1
2'2
'1
'2
'1
d
d
d
dddd
-
8/12/2019 IIR Direct Form Realization
68/69
Copyright 2001, S. K. Mitra
Realization Using Two-Pair
Extraction Approach Finally, the allpass is realized as a
lattice two-pair characterized by the
multiplier coefficientand constrained by an allpass as
indicated below
)(1 zA
1)(0 zA3573771.0
"11 dk
,2.03 k 2708333.02k
3573771.01 k
-
8/12/2019 IIR Direct Form Realization
69/69
Cascaded Lattice Realization
Using MATLAB The M-filepoly2rccan be used to realize
an allpass transfer function in the cascaded
lattice form To this end Program 6_3can be employed