Professional Documents
Culture Documents
Lecture 17: FIR Design by Windowing, Kaiser Window & Optimal Approximation
Nov 28, 2001
The FIR techniques are based purely in discrete-time, unlike the previous techniques for IIR design that were designed
from the transformation of filters specified in continuous time.
Recall ideal LPF
1 |ω| < ωc
jω
H(e ) =
0 else
and
sin ωc n
hd [n] = ∀n
πn
hd [n] −M ≤ n ≤ M
h[n] =
0 else
∞
Hd (e jω ) = ∑ hd [n]e jωn (ideal response) (17.2)
n=−∞
17-1
17-2
If f (t) is a square wave, we get Gibbs phenomenon. (converge in mean square sense, i.e., energy ?? (manuscript p 2)
converge).
Recall uniform convergence:
fN , N = 1, 2, · · · converge uniformly on a domain E to a function f if for every ε > 0, there exists an N such that for
n ≥ N,
| fn (x) − fN (x)| ≤ ε ∀x (17.3)
But this is not uniform convergence. This does give us mean square convergence (MSC) (energy of difference goes to
zero):
lim ( fN (x) − f (x))2 dx = 0
N→∞
So, this is the same thing.
Hd (e jω ) is the (complex) periodic seq (??).
hd [n] is the “Harmonic series”, i.e., Z π
1
hd [n] = Hd (e jωn )dω
2π −π
and
N
Hd (e jω ) = ∑ hd [n]e− jωn
(N)
n=−N
will exhibit ripple for any finite N.
The big question is how to design w[n] so that we can control for ripple.
N
H(e jω ) = ∑ hd [n]e− jωn
n=−N
Z π
1
= Hd (e jθ )W (e j(ω−θ) )dθ (circular convolution)
2π −π
17-3
Note:
∞
w[n] = 1, ∀n =⇒ W (e jω ) = ∑ 2πδ(ω + 2πk)
k=−∞
Approach: taper off the window generally. (i.e., multiply by w[n]), to get other trade offs of mainlobe width, filter
length M, and side lobe height.
Rectangular:
1, 0≤n≤M
w[n] =
0, else
Bartlett (triangular):
2n/M, 0 ≤ n ≤ M/2
Hanning:
0.5 − 0.5 cos(2πn/M), 0≤n≤M
w[n] =
0, else
Hamming:
0.54 − 0.46 cos(2πn/M), 0≤n≤M
w[n] =
0, else
17-4
Blackman
0.42 − 0.5 cos(2πn/M) + 0.08 cos(4πn/M), 0≤n≤M
w[n] =
0, else
Note the above windows are all “linear phase”, i.e., shifted version of a symmetric window.
There exist many of these window functions (lots of research papers on this stuff in the 1960’s and 1970’s).
• rectangular has narrowest main lobe, but peak side lobe is ?? (manuscript p5) -13dB down =⇒ aliasing
Linear phase
Since
w[M − n], 0≤n≤M
w[n] =
0, else
|H(e jω )|
1 + δ1
PSfrag replacements
1 − δ1
∆ωm
Stopband
Passband
δ2
Transition
ω p1 ωc ω p2 π ω
∆ω =ωs − ω p
A = − 20 log10 δ
and
A−8
M=
2.285∆ω
This makes it very easy to do filter design very quickly.
Key: this gives the window w[n], which is to be multiplied by the ideal impulse response h d [n] to get the actual filter
h[n] = w[n]hd [n].
M does not change ripple error (to achieve δ) this is determined by the sidelobe amplitude (determined by β, or type
of window).
Show table O&S 7.1 again.
So, better widths at same approximation error =⇒ Kaiser window is probably the best so far.
Simple truncation minimizes ε2 , but this has bad properties as we see =⇒ this is a poor error criterion. Why?
1) all frequency regions are weighted equally (we might need to put more emphases on certain frequencies)
2) why not minimize the maximum errors so that the error is distributed more evenly over the regions we are
interested in.
Recall Butterworth filter is overly accurate in one place. However, the elliptic filter has equiripple so that error
is distributed.
|H(e jω )|
1 + δ1
1 − δ1
PSfrag replacements
δ2
ωp ωs π ω
1, 0 ≤ ω ≤ ωp
jω
Hd (e ) =
0, ωs ≤ ω ≤ π
and
δ2 /δ, 0 ≤ ω ≤ ωp
W (ω) =
1, ωs ≤ ω ≤ π
So
E(ω) = W (ω)[Hd (e jω ) − Ae (e jω )]
When δ = δ2 , E(ω) is max error.
Then find he [n] that minimizes the maximum error
he [n] = argmin max |E(ω)|
he [n]:0≤n≤L ω6∈transition band