Professional Documents
Culture Documents
10-1
10. Design of FIR filters
10-2
The filter design problem
PM
k=0 bk z −k
IIR filters: H(z) = P N
(rational transfer function)
1+ k=1 ak z −k
PM
FIR filters: H(z) = k=0 bk z −k (polynomial transfer function)
10-4
Filter specifications
10-5
Absolute specifications: example for a lowpass filter
passband: 1 − δp ≤ |H(ejω )| ≤ 1 + δp , 0 ≤ ω ≤ ωp
stopband: |H(ejω )| ≤ δs , ωs ≤ ω ≤ π
10-6
Relative specifications: example for a lowpass filter
− passband ripple:
1+δ
Ap , 20 log10 1−δpp > 0(≈ 0)
stopband ripple:
− 1+δp
As , 20 log10 δs
> 0( 1)
1 − δp
passband: ≤ |H(ejω )| ≤ 1, 0 ≤ ω ≤ ωp
1 + δp
δs
stopband: |H(ejω )| ≤ , ωs ≤ ω ≤ π
1 + δp
10-7
Relative specifications: example for a lowpass filter
− passband ripple:
1+δ
Ap , 20 log10 1−δpp > 0(≈ 0)
stopband ripple:
− 1+δp
As , 20 log10 δs
> 0( 1)
10-9
Paley–Wiener theorem
conversely, if H(ejω ) is square integrable and the integral (∗) is finite, then
we can obtain a phase response ∠H(ejω ) so that the filter H(ejω ) is causal;
the solution ∠H(ejω ) is unique if H(z) is minimum phase
10-10
Implications of the Paley–Wiener theorem
given the magnitude response H(ejω ) of a causal and stable system,
we cannot assign its phase response ∠H(ejω ) arbitrarily
10-11
Optimality criteria for filter design
10-12
Mean-Squared-Error (MSE) approximation
10-13
Minimax approximation
10-14
Maximally-flat approximation
(truncated Taylor series expansions)
2 2
we want A(ω) , H(ejω ) very close to Ad (ω) , Hd (ejω ) at ω = ω0
(1) (2)
Ad (ω0 ) A (ω0 )
Ad (ω) = Ad (ω0 ) + (ω − ω0 ) + d (ω − ω0 )2 + · · ·
1! 2!
A(1) (ω0 ) A(2) (ω0 )
A(ω) = A(ω0 ) + (ω − ω0 ) + (ω − ω0 )2 + · · ·
1! 2!
10-15
Maximally-flat approximation
(truncated Taylor series expansions)
if m is finite,
the approximation is optimum according to the maximally flat criterion
10-16
10. Design of FIR filters
10-17
Ideal lowpass filter with linear phase
e−jαω , if |ω| < ωc
frequency response: Hlp (ejω ) =
0, if ωc < |ω| ≤ π
sin ωc (n − α) sin Ωc (t − αT )
= hclp (t)t=nT
impulse response: hlp [n] = =
π(n − α) π(t − αT ) t=nT
is the sequence hlp [n] = hclp (nT ) also symmetric? not for every value of α
10-18
Ideal lowpass filter with linear phase
1. α is an integer:
hlp [n] is symmetric about n = α
2. 2α is an integer:
hlp [n] is symmetric about the middle
between α − 1/2 and α + 1/2
3. 2α is not an integer:
there is no symmetry at all
(because of misalignment between
CT impulse response and sampling grid)
10-19
Causal FIR filters with linear phase
10-20
Magnitude response vs amplitude response
jω jω
H(ejω ) = |H(ejω )|ej∠H(e )
= A(ejω )ejΨ(e )
where
A(ejω ): amplitude response (real and even, both positive and negative)
Ψ(ejω ): unwrapped (unbroken) phase response (truly linear)
10-21
Illustration on linear-phase FIR filters
10-22
Type-I FIR linear-phase filters
even symmetry h[n] = h[M − n] with even order M
in general, we have
M/2
X
H(ejω ) = a[k] cos ωk e−jωM/2 , A(ejω )e−jωM/2 ,
k=0
where A(ejω ) is a real, even, and periodic with coefficients given by
in general, wehave
(M +1)/2
X 1 e−jωM/2 , A(ejω )e−jωM/2 ,
H(ejω ) = b[k] cos ω k −
2
k=1
where A(ejω ) is a real, even, and periodic with coefficients given by
in general, we have
M/2
X
H(ejω ) = c[k] sin ωk je−jωM/2 , jA(ejω )e−jωM/2 ,
k=1
jω
where A(e ) is a real, odd, and periodic with coefficients given by
10-26
Type-III FIR linear-phase filters
odd symmetry h[n] = −h[M − n] with even order M
in general, we have
(M +1)/2
X 1 −jωM/2
H(ejω ) = d[k] sin ω k − je , jA(ejω )e−jωM/2
2
k=1
jω
where A(e ) is a real, odd, and periodic with coefficients given by
10-28
Type-IV FIR linear-phase filters
odd symmetry h[n] = −h[M − n] with odd order M
˜ or h[k]
at ω = 0: A(ejω ) = 0, independent of d[k]
the frequency response is imaginary
⇒ type-IV filter are most suitable for the design of differentiators
10-29
Amplitude response function of FIR filters with linear phase
[a[k], b[k], c[k], d[k] better suited for MSE approximation]
10-30
Unified representation
where
this representation unifies the design of the four types of FIR filter
with linear phase using the minimax criterion
10-31
Unified representation
˜ better suited for minimax approximation]
[ã[k], b̃[k], c̃[k], d[k]
10-32
10. Design of FIR filters
10-33
Design of FIR filters by windowing
10-34
Direct truncation of an ideal impulse response
∞
X
ideal IIR: Hd (ejω ) = hd [n]e−jωn
n=−∞
10-35
Effect of windowing in the frequency domain
1, if 0 ≤ n ≤ M
impulse response: h[n] = hd [n]w[n], with w[n] =
0, otherwise
Z π
1
frequency response: H(ejω ) = Hd (ejθ )W (ej(ω−θ) )dθ
2π −π
10-36
Effect of windowing in the frequency domain
(
1, if |ω| ≤ ωc
Ad (ejω ) ,
0, if ωc < |ω| ≤ π
sin(ω(M + 1)/2)
AW (ejω ) ,
sin(ω/2)
10-37
Effect of windowing in the frequency domain
the windowed impulse response h[n] = w[n]hd [n] has the same symmetry
with the ideal impulse response hd [n]
windowing a FIR filter with linear phase does not change its type
10-39
Smoothing the frequency response using fixed windows
10-40
Comparison of fixed (attenuation) windows
6. compute the impulse response h[n] = hd [n]w[n] using the chosen window
7. check whether the design filter satisfies the predicted specifications; if not,
increase the order M and go back to 5.
10-42
Example
10-44