Filter Design Techniques
Filter Design Techniques
• Filter
– Filter is a system that passes certain
frequency components and totally
rejects all others
• Stages of the design filter
– Specification of the desired properties
of the system
– Approximation of the specification using
a causal discrete-time system
– Realization of the system
Review of discrete-
time systems
Frequency response :
• periodic : period = 2π
• for a real impulse response h[k]
Magnitude response H ( e ) is even function
jω
1
Nyquist frequency
e jπk = ...,1,−1,1,−1,1,...
0 .5
−π π
0
-4 -2 0 2 4
-5
-4 -2 0 2 4
Review of discrete-
time systems
`Popular’ frequency responses for filter design :
low-pass (LP) high-pass (HP) band-pass (BP)
π π π
band-stop multi-band …
π π π
Review of discrete-
time systems
“FIR filters” (finite impulse response):
B(z) −1 −N
H (z) = N
= b 0 + b1 z + ... + b N z
z
• “Moving average filters” (MA filters)
• N poles at the origin z=0 (hence guaranteed stability)
• N zeros (zeros of B(z)), “all zero” filters
• corresponds to difference equation
y [ k ] = b 0 u [ k ] + b1 u [ k − 1 ] + ... + b N u [ k − N ]
• impulse response
h [ 0 ] = b 0 , h [1] = b1 ,..., h [ N ] = b N , h [ N + 1] = 0 ,...
Linear Phase FIR Filters
Non-causal zero-phase filters :
example: symmetric impulse response
h[-L],….h[-1],h[0],h[1],...,h[L]
h[k]=h[-k], k=1..L
k
frequency response is L
+L L
jω
H (e ) = ∑ h[k ]e
k =− L
− jω . k
= ... = ∑ ak cos(ωk )
k =0
LP/HP/BP LP/BP HP
Linear Phase FIR Filters
u[k]
• efficient direct-form realization. Δ Δ Δ Δ
example: Δ Δ Δ Δ
+ + + + +
bo b1 b2 b3 b4
x x x x x
y[k] + + + +
• PS: IIR filters can NEVER have linear-phase property !
Filter Specification
Ex: Low-pass 1.2
Passband Ripple
1
1−δP 0.8
ωP ωS
0.6 Passband Cutoff -> <- Stopband Cutoff
0
0 0.5 1 1.5 2 2.5 3
Filter Design Problem
• Design of filters is a problem of
function approximation
a0 ,..., a L ∫
) − H d (ω ) dω = min ∫ W (ω ) A(ω ) − Ad (ω ) dω
jω 2
ω
2
min W ( ) H ( e
a0 ,..., a L
−π −π
1 4444244443
F ( a0 ,..., a L )
x T = [a0 a1 ... a L ]
π
Q = ∫ W (ω )c (ω )c T (ω ) dω
0
π
p = ∫ W (ω ) Ad (ω )c (ω ) dω
0
Ad (ω ) = 1, ω < ω P
0.8
(pass - band)
Passband Cutoff -> <- Stopband Cutoff
Ad (ω ) = 0, ω S ≤ ω ≤ π
0.6
(stop - band)
0.4 Stopband Ripple
ωP +π 0
0 0.5 1 1.5 2 2.5 3
F ( a0 ,..., aL ) = ∫ A(ω ) − 1 dω + γ . ∫ A (ω )dω = ...
2 2
1
0
442443 1ω4 S
4244 3
pass - band stop - band
i.e.
W (ω ) = ...
Filter Design by Optimization
• a simpler problem is obtained by replacing the F(..) by…
2
⎧ ⎡ a0 ⎤ ⎫
⎪ ⎪
F (a0 ,..., aL ) = ∑ W (ωi ) A(ωi ) − Ad (ωi ) = ∑ W (ωi )⎨cT (ωi ) ⎢⎢ : ⎥⎥ − Ad (ωi )⎬
2
i i ⎪ ⎢⎣aL ⎥⎦ ⎪
⎩ ⎭
where the wi’s are a set of n sample frequencies
The quadratic optimization problem is then equivalent to a least-squares
problem
min Ax − b = min { x T x − 2 xT {
A b + b{
2 T T T
2
A A
{ b}
x x
∑ W (ω i ) c (ω i ) c T (ω i ) ∑ ... ∑ ...
i i i
xLS = (A A)−1 A b
T T Compare to p.12
+++ : simple
--- : unpredictable behavior in between sample frequencies.
Filter Design by Optimization
• …then all this is often supplemented with
additional constraints
x T = [a0 a1 ... aL ]
subject to AP x ≤ bP (pass-band constraints)
AS x ≤ bS (stop-band constraints)
= `Quadratic Linear Programming’ problem
Filter Design by Optimization
(II) `Minimax’ Design :
• select one of the basic forms that yield linear phase
e.g. Type-1 H (e jω ) = e − jωN / 2 a[ k ] cos(ωk ) = e − jωN / 2 A(ω )
L
∑
k =0
h[k ] = hd [k ]w[k ]
H ( z ) = H d ( z ) ∗W ( z )
• candidate windows : Han, Hamming, Blackman, Kaiser,…. (see
textbooks)
• window choice/design = trade-off between side-lobe levels
(define peak pass-/stop-band ripple) and width main-lobe
(defines transition bandwidth)
Windowing Effect
Gibbs phenomenon
Windowing
Equiripple Design
• Starting point is minimax criterion, e.g.
min max W (ω ) A(ω ) − Ad (ω ) = min max E (ω )
a0 ,..., a L 0 ≤ω ≤π a0 ,..., a L 0 ≤ω ≤π