Tunable IIR Digital Filters

Download Report

Transcript Tunable IIR Digital Filters

Tunable IIR Digital Filters
• We have described earlier two 1st-order and
two 2nd-order IIR digital transfer functions
with tunable frequency response
characteristics
• We shall show now that these transfer
functions can be realized easily using
allpass structures providing independent
tuning of the filter parameters
Copyright © 2001, S. K. Mitra
Tunable Lowpass and
Highpass Digital Filters
• We have shown earlier that the 1st-order
lowpass transfer function
1     z 1 

H LP ( z )  1 
2  1   z 1 
and the 1st-order highpass transfer function
1    1  z 1 


H HP ( z ) 
2  1   z 1 
are doubly-complementary pair
Copyright © 2001, S. K. Mitra
Tunable Lowpass and
Highpass Digital Filters
• Moreover, they can be expressed as
H LP ( z )  1 [1  A1( z )]
2
H HP ( z )  1 [1 
2
A1( z )]
where
   z 1
A1( z ) 
1   z 1
is a 1st-order allpass transfer function
Copyright © 2001, S. K. Mitra
Tunable Lowpass and
Highpass Digital Filters
• A realization of H LP (z ) and H HP (z ) based
on the allpass-based decomposition is
shown below
H HP (z )
• The 1st-order allpass filter can be realized
using any one of the 4 single-multiplier
allpass structures described earlier
Copyright © 2001, S. K. Mitra
Tunable Lowpass and
Highpass Digital Filters
• One such realization is shown below in
which the 3-dB cutoff frequency of both
lowpass and highpass filters can be varied
simultaneously by changing the multiplier
coefficient 
Copyright © 2001, S. K. Mitra
Tunable Lowpass and
Highpass Digital Filters
• Figure below shows the composite
magnitude responses of the two filters for
two different values of 
1
 = 0.4
 = 0.05
Magnitude
0.8
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
1
w/p
Copyright © 2001, S. K. Mitra
Tunable Bandpass and
Bandstop Digital Filters
• The 2nd-order bandpass transfer function

1  
1  z 2


H BP ( z ) 
2  1  (1  ) z 1   z  2 
and the 2nd-order bandstop transfer
function

1  
1   z 1  z  2


H BS ( z ) 
2  1  (1  ) z 1   z  2 
also form a doubly-complementary pair
Copyright © 2001, S. K. Mitra
Tunable Bandpass and
Bandstop Digital Filters
• Thus, they can be expressed in the form
H BP ( z )  1 [1  A2 ( z )]
H BS ( z ) 
where
2
1 [1 
2
A2 ( z )]
  (1  ) z 1  z 2
A2( z ) 
1  (1  ) z 1   z 2
is a 2nd-order allpass transfer function
Copyright © 2001, S. K. Mitra
Tunable Bandpass and
Bandstop Digital Filters
• A realization of H BP (z ) and H BS (z ) based
on the allpass-based decomposition is
shown below
• The 2nd-order allpass filter is realized using
a cascaded single-multiplier lattice structure
Copyright © 2001, S. K. Mitra
Tunable Bandpass and
Bandstop Digital Filters
• The final structure is as shown below
• In the above structure, the multiplier 
controls the center frequency and the
multiplier  controls the 3-dB bandwidth
Copyright © 2001, S. K. Mitra
Tunable Bandpass and
Bandstop Digital Filters
• Figure below illustrates the parametric
tuning property of the overall structure
 = 0.5
1
 = 0.4
 = 0.05
0.6
0.4
0.2
0
0
 = 0.8
 = 0.1
0.8
Magnitude
Magnitude
0.8
 = 0.8
1
0.6
0.4
0.2
0.2
0.4
0.6
w/p
0.8
1
0
0
0.2
0.4
0.6
0.8
1
w/p
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
Realization of an All-pole IIR Transfer
Function
• Consider the cascaded lattice structure
derived earlier for the realization of an
allpass transfer function
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• A typical lattice two-pair here is as shown
below
Wm1 ( z )
Wm (z )
S m1 ( z )
S m (z )
• Its input-output relations are given by
Wi ( z )  Wm1( z )  km z 1Sm ( z )
Sm1( z )  km Wm ( z )  z 1Sm ( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• From the input-output relations we derive
the chain matrix description of the two-pair:
1  W ( z )

W
(
z
)
1
k
z
 i 1  
 i 
i


1
 Si 1 ( z )  k


S
(
z
)
z


i

i
• The chain matrix description of the
cascaded lattice structure is therefore
1   1
1   1 k z 1  W ( z )

1
k
z
X
(
z
)
k
z
 1 
 1 
3
2
1
 Y1 ( z )  k3 z 1  k2
z 1  k1 z 1   S1 ( z ) 
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• From the above equation we arrive at
X1( z )  {1  [k1(1  k2 )  k2k3 ]z 1
 [k2  k1k2 (1  k2 )]z 2  k3 z 2}W1( z )
 (1  d1z 1  d2 z 2  d3 z 3 )W1( z )
using the relation S1( z )  W1( z ) and the
relations
k1  d1", k2  d2' , k3  d3
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• The transfer function W1( z) / X1( z) is thus an
all-pole function with the same denominator
as that of the 3rd-order allpass function A3( z ):
W1 ( z )
1

X1 ( z ) 1  d
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
Gray-Markel Method
• A two-step method to realize an Mth-order
arbitrary IIR transfer function
H ( z)  PM ( z) / DM ( z)
• Step 1: An intermediate allpass transfer
M
1
function AM ( z )  z DM ( z ) / DM ( z ) is
realized in the form of a cascaded lattice
structure
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Step 2: A set of independent variables are
summed with appropriate weights to yield
the desired numerator PM (z )
• To illustrate the method, consider the
realization of a 3rd-order transfer function
P3 ( z ) p0  p1z 1  p2 z 2  p3 z 3
H ( z) 

D3 ( z ) 1  d1z 1  d 2 z 2  d3 z 3
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• In the first step, we form a 3rd-order allpass
transfer function
A3( z )  Y1( z ) / X1( z )  z 3 D3 ( z 1 ) / D3 ( z )
• Realization of A3(z ) has been illustrated
earlier resulting in the structure shown below
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Objective: Sum the independent signal
variables Y1 , S1 , S2 , and S3 with weights { i }
as shown below to realize the desired
numerator P3(z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• To this end, we first analyze the cascaded
lattice structure realizing and determine the
transfer functions S1( z) / X1( z) , S2 ( z ) / X1( z ) ,
and S3 ( z ) / X1( z )
X1
Y1
• We have already shown
S1 ( z )
1

X 1 ( z ) D 3( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• From the figure it follows that
1
1
"
)S1( z )  (d1  z )S1( z )
S2 ( z )  (k1  z
and hence
1
"
S2 ( z ) d1  z

X1( z ) D3( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• In a similar manner it can be shown that
S 3( z )  (d 2'  d1' z 1  z  2 )S1( z )
• Thus,
S 3( z ) d 2'  d1' z 1  z  2

X1( z )
D3 ( z )
• Note: The numerator of Si ( z ) / X1( z ) is
precisely the numerator of the allpass
transfer function Ai( z )  Si ( z ) / Wi ( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• We now form
Yo ( z )
X1 ( z )
S3 ( z )
Y1 ( z )
 1
 2
 3
X1 ( z )
X1 ( z )
S2 ( z )
S1 ( z )
 4
X1 ( z )
X1 ( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Substituting the expressions for the various
transfer functions in the above equation we
arrive at
1
2
3
1(d3  d 2 z  d1z  z )
'  d ' z 1  z  2 )   ( d "  z 1 )  


(
d
Yo ( z )
2 2
1
3 1
4

X1( z )
D3 ( z )
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Comparing the numerator of Yo ( z ) / X1( z )
with the desired numerator P3 (z ) and
equating like powers of z 1 we obtain
1d3   2d 2'   3d1"   4  p0
1d 2   2d1'   3  p1
1d1  2  p2
1  p3
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Solving the above equations we arrive at
1  p3
2  p2  1d1
 3  p1  1d 2   2d1'
 4  p0  1d3   2d 2'   3d1"
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Example - Consider
P3 ( z ) 0.44 z 1  0.362 z 2  0.02 z 3
H ( z) 

D3 ( z ) 1  0.4 z 1  0.18 z 2  0.2 z 3
• The corresponding intermediate allpass
transfer function is given by
z 3D3 ( z 1)  0.2  0.18 z 1  0.0.4 z 2  z 3
A3( z ) 

D3 ( z )
1  0.4 z 1  0.18 z 2  0.2 z 3
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• The allpass transfer function A3( z ) was
realized earlier in the cascaded lattice form
as shown below
X1
Y1
• In the figure,
k3  d3  0.2, k2  d2'  0.2708333
k1  d1"  0.3573771
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
• Other pertinent coefficients are:
d1  0.4, d2  0.18, d3   0.2, d1'  0.4541667
p0  0, p1  0.44, p2  0.36, p3  0.02,
• Substituting these coefficients in
1  p3
2  p2  1d1
 3  p1  1d 2   2d1'
 4  p0  1d3   2d 2'   3d1"
Copyright © 2001, S. K. Mitra
IIR Tapped Cascaded Lattice
Structures
1  0.02,  2  0.352
3  0.2765333,  4   0.19016
• The final realization is as shown below
k1  0.3573771, k2  0.2708333, k3   0.2
Copyright © 2001, S. K. Mitra
Tapped Cascaded Lattice
Realization Using MATLAB
• Both the pole-zero and the all-pole IIR
cascaded lattice structures can be developed
from their prescribed transfer functions
using the M-file tf2latc
• To this end, Program 6_4 can be employed
Copyright © 2001, S. K. Mitra
Tapped Cascaded Lattice
Realization Using MATLAB
• The M-file latc2tf implements the
reverse process and can be used to verify
the structure developed using tf2latc
• To this end, Program 6_5 can be employed
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• An arbitrary Nth-order FIR transfer function
of the form
N
H N ( z )  1  n1 pn z n
can be realized as a cascaded lattice structure
as shown below
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• From figure, it follows that
Xm ( z )  Xm1( z )  km z 1Ym1( z )
Ym ( z )  km Xm1( z )  z 1Ym1( z )
• In matrix form the above equations can be
written as
 X m ( z )   1 km z 1   X m 1 ( z )
1   Y
 Ym ( z )  k

(
z
)
z

m

1

m
where m  1, 2, ..., N
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• Denote
Xm ( z )
Hm ( z ) 
,
X 0 ( z)
Ym ( z )
Gm ( z ) 
X 0 ( z)
• Then it follows from the input-output
relations of the m-th two-pair that
Hm ( z )  Hm1( z )  km z 1Gm1( z )
Gm ( z )  km Hm1( z )  z 1Gm1( z )
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• From the previous equation we observe
H1( z )  1  k1z 1, G1( z )  k1  z 1
where we have used the facts
H0 ( z )  X 0 ( z ) / X 0 ( z )  1
G0 ( z )  Y0 ( z ) / X 0 ( z )  X 0 ( z ) / X 0 ( z )  1
• It follows from the above that
G1( z )  z 1( z k1  1)  z 1H1( z 1)
•
G1( z) is the mirror-image of H1( z )
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• From the input-output relations of the m-th
two-pair we obtain for m = 2:
H2 ( z )  H1( z )  k2 z 1G1( z )
G2 ( z )  k2 H1( z )  z 1G1( z )
• Since H1( z ) and G1( z) are 1st-order
polynomials, it follows from the above that
H 2 ( z ) and G2 ( z ) are 2nd-order polynomials
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• Substituting G1( z )  z 1H1( z 1) in the two
previous equations we get
H2 ( z )  H1( z )  k2 z 2 H1( z 1)
G2 ( z )  k2 H1( z )  z 2 H1( z 1)
• Now we can write
G2 ( z )  k2 H1( z )  z 2 H1( z 1)
 z 2[k2 z 2 H1( z )  H1( z 1)]  z 2 H 2 ( z 1)
•
G2 ( z ) is the mirror-image of H 2 ( z )
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• In the general case, from the input-output
relations of the m-th two-pair we obtain
Hm ( z )  Hm1( z )  km z 1Gm1( z )
Gm ( z )  km Hm1( z )  z 1Gm1( z )
• It can be easily shown by induction that
Gm ( z )  z m Hm ( z 1), m  1, 2, ..., N  1, N
Gm (z ) is the mirror-image of Hm (z )
•
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• To develop the synthesis algorithm, we
express Hm1( z ) and Gm1( z ) in terms of
H m(z ) and G m (z ) for m  N , N  1, ...,2,1
arriving at
1
HN 1( z ) 
2 { HN ( z )  k N GN ( z )}
(1k N )
1
GN 1( z ) 
{k N HN ( z )  GN ( z )}
2

1
(1k N ) z
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• Substituting the expressions for
HN ( z )  1  
N
n
p
z
n 1 n
and
N 1

N

1
GN ( z )  z HN ( z )  n0 pn z n  z  N
in the first equation we get
1
N 1
n
H N 1( z ) 
{(
1

k
p
)

(
p

k
p
)
z

N N
n
n N n
n 1
2
1  kN
 ( pN  k N ) z  N }
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• If we choose k N  pN , then HN 1( z )
reduces to an FIR transfer function of order
N  1 and can be written in the form
N 1
HN 1( z )  1  n1 pn' z n
pn  k N p N n
, 1 n 
2
1 k N

N 1
where
• Continuing the above recursion algorithm,
all multiplier coefficients of the cascaded
lattice structure can be computed
pn'
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• Example - Consider
H4 ( z )  1  1.2 z 1  1.12 z 2  0.12 z 3  0.08 z 4
• From the above, we observe k4  p4   0.08
• Using
pn k4 p4n
'
pn 
, 1 n  3
2
1k4
we determine the coefficients of H3 ( z ) :
p3'  0.2173913, p2'  1.2173913
p1'  1.2173913
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• As a result,
H3 ( z )  1  1.2173913 z 1  1.2173913 z 2
 0.2173913 z 3
• Thus, k3  p3'  0.2173913
• Using
pn'  k3 p2'  n
pn" 
, 1 n  2
2
1 k3
we determine the coefficients of H2 ( z):
p2"  1.0, p1"  1.0
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Structures
• As a result, H2 ( z )  1  z 1  z 2
• From the above, we get k2  p2"  1
• The final recursion yields the last multiplier
coefficient k1  p1" /(1  k2 )  0.5
• The complete realization is shown below
k1  0.5, k2  1, k3  0.2173913, k4   0.08
Copyright © 2001, S. K. Mitra
FIR Cascaded Lattice
Realization Using MATLAB
• The M-file tf2latc can be used to
compute the multiplier coefficients of the
FIR cascaded lattice structure
• To this end Program 6_6 can be employed
• The multiplier coefficients can also be
determined using the M-file poly2rc
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra
Copyright © 2001, S. K. Mitra