Professional Documents
Culture Documents
Topic 7:
Filter types and structures
1. More filter types
2. Minimum and maximum phase
3. Filter implementation structures
1
1. More Filter Types
We have seen the basics of filters
and a range of simple examples
Now look at a couple of other
classes:
Comb filters - multiple pass/stop bands
2
Comb Filters
Replace all system delays z-1 with
longer delays z-L
y[n]
x[n] z-L + z-L
z-L z-L
3
Comb Filters
‘Parent’ filter impulse response h[n]
becomes comb filter output as:
g[n] = {h[0] 0 0 0 0 h[1] 0 0 0 0
h[2]..} L-1 zeros
Thus, G z g n zn
n
hnz nL H z L
n
4
Comb Filters
Hence frequency response:
parent frequency response
H(e )
G e j
j
H e jL & repeated L times
G(e j )
compressed
L copies
Low-pass response → of H(e j )
pass = 0, 2 π/L, 4 π/L...
cut = π/L, 3 π/L, 5 π/L... useful to enhance
a harmonic series
5
Allpass Filters
Allpass filter has A(ej )2 = K for all i.e.
spectral energy is not changed Phase
response is not zero (else trivial)
phase correction 5
special effects
e.g. |H(ω)|
0
Magnitude (dB)
−5
−10
−15
−20
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
−100
θ(ω)
Phase (degrees)
−200
−300
−400
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
6
Allpass Filters
Allpass has special form of system fn:
dM dM 1z 1M
... M 1 z
M
DM z
polynomials
8
M
Allpass Filters
Why do mirror-img poly’s give const gain?
Conj-sym system fn can be factored as:
K i z * 1
i
o * 1
i
AM z
z
λ ej
i *
i i
H(ej )
2 2
.. same
1 1 mag..
0 0
0.5 0.5
.. added
H(ej) 0
0
phase
-0.5
-
0.5 lag
- -
0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8
11
Minimum/Maximum Phase
For a given magnitude response
All zeros inside u.circle → minimum
phase
12
Minimum/Maximum Phase
Note:
Min. phase + = Max. phase
Allpass o o
o pole-
zero
cancl’n
o
o o
z z
1 1*
z z
1
1*
z z x =
z z z z
*
13
Inverse Systems
i h [n] is called the inverse of hf[n] iff
hi n h f n n
Z-transform: H f (e j ).H i (e j ) 1
x[n] w[n]
y[n] Hf (z) Hi
(z)
wn xn 14
Inverse Systems
What is Hi(z)? Hi zH f z 1
Hi z 1/ H f z
Hi(z) is reciprocal polynomial→ofzeros
Hf(z)of
P z poles of
bwd
zeros of fwd
fwd
H f z H i z → poles of
Dz
D z bwd
Just swap o
poles P z o
zeros:
and H f (z) o
Hi(z)
15
Inverse Systems
When does Hi(z) exist?
Causal+stable → all Hi(z) poles inside u.c.
→ all zeros of Hf(z) must be inside u.c.
→ Hf(z) must be minimum phase
Hf(z) zeros outside u.c. → unstable Hi(z)
Hf(z) zeros on u.c. → unstable Hi(z)
j j lose...
H i (e ) 1 H f (e ) 1 0
20
2
0
Block Diagrams
Useful way to illustrate implementations
Z-transform helps analysis:
z
Everything else is just multiplicative
21
Block Diagrams
More complex example:
w1 w2
x[n] + + W1 X z1
- - W23 W1
+ z-1 2
y[n] + z-1 w3 Wz1Wz 1W
3 2
Y z1W W W2 W
3 W2
1 1 2 1 1
Y
z1 2
zz1
1
1
z1 zstackable W3 W
X
z 2nd order section z
1
1
22
Delay-Free
Loops
Can’t have them!
x + u y = B(v + Au) u = x + y
Α
Β c y = B(v + A(x + y))
y
+ v
At time n = 0, setup inputs x and v ;
need u for y, also y for u →can’t calculate
1
Algebra: 1 +
y(1 — BA) = Bv + x BA u
BA
BAx Bv + 1 B B
y BA +
y 1 1 v
BAx
1 - BA can
BA simplify...
BA
=
23
Equivalent Structures
Modifications to block diagrams that do
not change the filter
e.g. Commutation H = AB = BA
A B ≡ B A
Factoring AB+CB =
x1 (A+C)·B x1
A(z)B(z) y
+ +
A(z) B(z)
x2 y x2
C(z)B(z) C(z)
fewer blocks less computation
24
Equivalent Structures
Transpos x b1 + y
e reverse paths z-1 b2
z-1
adders<—>nodes b3
Input<—>output ≡
y + b1 x
1 2
Y b1X b2z X b3 z X z-1
b2
+
1 1
b1X b2 X z b 3 X z-1 b3
z
25
FIR Filter Structures
Direct form “Tapped Delay Line”
x z-1 z-1 z-1 z-1 yn h0 4xn h1xn 1
h0 h1 h2 h3 h4
y ... k0 hk xn k
+ + + +
Transpos
x e
h4 h3 h2 h1 h0 z-1 z-1
y
+ + + +
z-1 z-1
D z
p0 + +
z-1 p1 -d1 z-1
all-pole
FIR
z-1 z-1 IIR
p2 -d2
29
IIR Filter Structures
Hence, Direct form I
p0 +
z-1 p1 -d1 z-1
z-1 z-1
-d2
Commutation
p2 → Direct form II
(DF2) + p0 • same signal
+
-d1 z-1 p1 ∴ delay lines merge
z-1 • “canonical”
-d2
= min. memory usage
p2 30
3
0
IIR Filter Structures
Use Transpose on FIR/IIR/DF2
x p0 + y
z-1
p1 + -d1
z-1
p2 + -d2
31
Factored IIR Structures
Real-output filters have
conjugate-symm roots: -
1
H z
1 ( j )z 1
1 (
j )z 1
p0 1 1z 1
2
Can always1 group
1
2
into
2 z1
( 2
2 2
2 )z
2nd 2order2 terms
...
H z 1 1
with real coefficients:
1
( 2 2 )z 2
...
1z 22 z
32
Cascade IIR Structure
Implement as cascade of fwd gain
second order sections (in DFII) factored
out
x + + + + + + y
p0 z-1
z-1 z-1
1 - 1 22 z-1 -2 2 z-1
( 22 22 ) 22 22
(quantization)
e.g. Matlab’s zp2sos
attempt to put ‘close’ roots in same
section intersperse gain & attenuation?
34
Second Order Sections
Factorization affects intermediate values
Factorization 1
Factorization 2
Original System
(2 pair poles, zeros)
35
Parallel IIR Structures
Can express H(z) as sum of terms 1(IZT)
H (z) consts 1 z F
z
1
11
z
N
Or, second-order
zterms:
0 k 1kz 1
H (z) 0 k 1 1kz12
2
kz
Suggests parallel realization...
36
Parallel IIR Structures
0 y
Sum terms become
x
parallel paths
+
01
Poles of each SOS
+ +
- 1
z-1 11 are from full TF
-21 z-1 System zeros arise
02
+ +
from output sum
-12
z-1
12 Why do this?
-22 z-1 stability/sensitivity
reuse common terms
37