Lecture 15: Generalized Linear Phases and FIR Types 15.1

advertisement
EE518 Digital Signal Processing
Autumn 2001
University of Washington
Dept. of Electrical Engineering
Lecture 15: Generalized Linear Phases and FIR Types
Nov 21, 2001
Prof: J. Bilmes <bilmes@ee.washington.edu>
TA: Mingzhou Song <msong@u.washington.edu>
15.1 Generalized Linear Phase
A system is referred to as a generalized-linear-phase system if
H(e jω ) = A(e jω )e− jαω+ jβ
A(e jω ) is real function of ω. The phase is
(15.1)
θ(ω) = −αω + β
Note the phase could be called affine phase since the phase is an affine transformation of ω.
The group delay is
grp[H(e jω )] = −
dθ(ω)
=α
dω
Recall (O&S Problem 5.51) if 2α is an integer, we might have impulse response symmetry about α.
Since
H(e jω ) = A(e jω )[cos(β − ωα) + j sin(β − ωα)]
and
H(e jω ) =
∞
∑
∞
h[n] cos(ωn) − j
n=−∞
we have
tan(β − ωα) =
Therefore
∞
∑
∑
h[n] sin(ωn)
n=−∞
h[n] sin(ωn)
sin(β − ωα)
∑∞
= − ∞n=−∞
cos(β − ωα)
∑n=−∞ h[n] cos(ωn)
h[n] sin[ω(n − α) + β] = 0
∀ω
(15.2)
n=−∞
That is constant group delay implies Equation 15.2, so Equation 15.2 is a necessary condition for generalized linear
phase. However Equation 15.2 is not a sufficient condition for generalized linear phase.
As examples, two types of generalized linear phase systems are given below:
1. The type of systems is defined by
β = 0 or π
2α = M = an integer
h[2α − n] = h[n]
It is easy to show
∞
∑
h[n] sin[ω(n − α)] = 0
n=−∞
(We will show why such a system has generalized linear phase later.)
15-1
15-2
2. The type of systems is defined by
π
3π
or
2
2
2α = M = an integer
h[2α − n] = −h[n]
β=
It is easy to show
∞
∑
h[n] cos[ω(n − α)] = 0
n=−∞
(We will show why such a system has generalized linear phase later.)
Note there are other types of systems that are different from the above two systems but also have generalized linear
phases.
15.1.1
Causal Generalized Linear-Phase Systems
Now we look at causal systems whose impulse response h[n] is real.
If
h[n] =
h[M − n],
0,
0≤n≤M
otherwise
(15.3)
then
H(e jω ) = Ae (e jω )e− jωM/2 )
where Ae (e jω ) is a real, even and periodic function of ω.
If
h[n] =
−h[M − n],
0,
0≤n≤M
otherwise
(15.4)
then
H(e jω ) = Ao (e jω )e− jωM/2 )
where Ao (e jω ) is a real, odd and periodic function of ω.
Equations 15.3 and 15.4 are sufficient conditions for generalized linear-phase but they are not necessary conditions.
Type I FIR Linear-Phase Systems
Type I FIR’s are symmetric about an integer.
A Type I FIR is characterized by
h[n] = h[M − n],
0≤n≤M
and
M is an even integer
15-3
We can show Type I FIR’s have linear-phase by checking its Fourier Transform.
M
H(e jω ) = ∑ h[n]e− jωn
n=0
M/2−1
∑
=
h[n]e− jωn + h[M/2]e− jωM/2 +
n=0
∑
h[n]e− jωn + h[M/2]e− jωM/2 +
n=0
∑
M
∑
h[M − k]e− jω(M−k)
(k = M − n)
k=M/2+1
M/2−1
=
h[n]e− jωn
n=M/2+1
M/2−1
=
M
∑
h[n]e− jωn + h[M/2]e− jωM/2 +
n=0
M
∑
h[k]e− jω(M−k)
(h[k] = h[M − k])
k=M/2+1
M/2−1
=
∑
h[n](e− jωn + e− jω(M−n) ) + h[M/2]e− jωM/2
n=0
"
M/2−1
=e
− jωM/2
∑
n=0
#
M
h[n]2 cos(n − )ω + h[M/2]
2
The first term e− jωM/2 gives a phase of −ωM/2 to H(e jω ). Since h[n] is real, the second term in the product above
contribute a phase of 0 or π to H(e jω ). So the overall phase of H(e jω ) is
−ω
M
2
or
−ω
M
+π
2
The phase of H(e jω ) is linear by definition of linear-phase − jα + β, where
α=
M
,
2
β = 0 or π
Type II FIR Linear-Phase Systems
Type II FIR’s are symmetric about the half of an integer.
A Type II FIR is characterized by
h[n] = h[M − n],
0≤n≤M
and
M is an odd integer
15-4
We can show Type II FIR’s have linear-phase by checking its Fourier Transform.
M
H(e jω ) = ∑ h[n]e− jωn
n=0
(M−1)/2
∑
=
M
∑
h[n]e− jωn +
n=0
n=(M+1)/2
(M−1)/2
∑
=
M
∑
h[n]e− jωn +
n=0
∑
h[M − k]e− jω(M−k)
(k = M − n)
k=(M+1)/2
(M−1)/2
=
h[n]e− jωn
M
∑
h[n]e− jωn +
n=0
h[k]e− jω(M−k)
(h[k] = h[M − k])
k=(M+1)/2
(M−1)/2
∑
=
h[n](e− jωn + e− jω(M−n) )
n=0
"
(M−1)/2
− jωM/2
=e
∑
n=0
#
M
h[n]2 cos(n − )ω
2
The first term e− jωM/2 gives a phase of −ωM/2 to H(e jω ). Since h[n] is real, the second term in the product above
contributes a phase of 0 or π to H(e jω ). So the overall phase of H(e jω ) is
−ω
M
2
−ω
or
M
+π
2
The phase of H(e jω ) is linear by definition of linear-phase − jα + β, where
α=
M
,
2
β = 0 or π
Type III FIR Linear-Phase Systems
Type III FIR’s are anti-symmetric about an integer.
A Type III FIR is characterized by
h[n] = −h[M − n],
0≤n≤M
and
M is an even integer
Note that at n = M/2,
h[M/2] = −h[M − (M/2)] = −h[M/2]
So we have h[M/2] = 0.
15-5
We can show Type III FIR’s have linear-phase by checking its Fourier Transform.
M
H(e jω ) = ∑ h[n]e− jωn
n=0
M/2−1
∑
=
h[n]e− jωn + h[M/2]e− jωM/2 +
n=0
∑
M
∑
h[n]e− jωn +
n=0
∑
h[M − k]e− jω(M−k)
(h[M/2] = 0, k = M − n)
k=M/2+1
M/2−1
=
h[n]e− jωn
n=M/2+1
M/2−1
=
M
∑
M
h[n]e− jωn −
n=0
∑
h[k]e− jω(M−k)
(h[k] = −h[M − k])
k=M/2+1
M/2−1
∑
=
h[n](e− jωn − e− jω(M−n) )
n=0
"
− jωM/2
=e
(− j)
M/2−1
∑
n=0
M
h[n]2 sin(n − )ω
2
#
The first term e− jωM/2 gives a phase of −ωM/2 to H(e jω ). Since h[n] is real, the second term in the product above
jω
jω
contribute a phase of π2 or 3π
2 to H(e ). So the overall phase of H(e ) is
−ω
M π
+
2
2
−ω
or
M 3π
+
2
2
The phase of H(e jω ) is linear by definition of linear-phase − jα + β, where
α=
M
,
2
β = 0 or π
Type IV FIR Linear-Phase Systems
Type IV FIR’s are anti-symmetric about the half of an integer.
A Type IV FIR is characterized by
h[n] = −h[M − n],
0≤n≤M
and
M is an odd integer
15-6
We can show Type IV FIR’s have linear-phase by checking its Fourier Transform.
M
H(e jω ) = ∑ h[n]e− jωn
n=0
(M−1)/2
∑
=
M
∑
h[n]e− jωn +
n=0
n=(M+1)/2
(M−1)/2
∑
=
M
∑
h[n]e− jωn +
n=0
∑
h[M − k]e− jω(M−k)
(k = M − n)
k=(M+1)/2
(M−1)/2
=
h[n]e− jωn
M
∑
h[n]e− jωn −
n=0
h[k]e− jω(M−k)
(h[k] = −h[M − k])
k=(M+1)/2
(M−1)/2
∑
=
h[n](e− jωn − e− jω(M−n) )
n=0
"
− jωM/2
=e
(M−1)/2
∑
(− j)
n=0
#
M
h[n]2 sin(n − )ω
2
The first term e− jωM/2 gives a phase of −ωM/2 to H(e jω ). Since h[n] is real, the second term in the product above
jω
jω
contributes a phase of π2 or 3π
2 to H(e ). So the overall phase of H(e ) is
−ω
M π
+
2
2
or
−ω
M 3π
+
2
2
The phase of H(e jω ) is linear by definition of linear-phase − jα + β, where
α=
M
,
2
β=
π
3π
or
2
2
The four types of FIR filters all have linear-phase, which is a desirable characteristic in many situations since we can
concentrate on the magnitude response when designing filters. What is the difference among the different types?
Low Pass Filters – Anti-symmetric FIR’s are NOT good choice. Why?
For anti-symmetric h[n], after the input is convolved with it, the output is mostly difference between samples. Larger
difference corresponds to higher frequency components of the input signal.
High Pass Filters – Symmetric FIR’s are NOT good choice. Why?
For symmetric h[n], after the input is convolved with it, the output is towards summation of the samples. Summation
tends to keep lower frequency components and attenuates higher frequency components of the input.
Ex: Linear Regression Slope Filter
We want to fit a line through x[n − M1], · · · , x[n], · · · , ..., x[n + M1 ]. Using least squares criterion, we find the slope s[n]
is
M1
kx[n − k]
∑k=−M
1
s[n] =
M1
∑k=−M1 k2
which is essentially a band pass filter, because for very low frequency components, slopes are close to zero and on the
other hand for very high frequency components also the fitted line also tends to be flat with close to zero slope.
The impulse response is
(
h[n] =
n
,
M1
k2
∑k=−M
−M1 ≤ n ≤ M1
1
0,
otherwise
15-7
We can shift h[n] by M to make it a causal filter h1 [n], then
( n−M1
h1 [n] =
M
1
k2
∑k=−M
0 ≤ n ≤ 2M1
,
1
0,
otherwise
Note that h1 [n] is a Type III filter, because
h1 [2M1 − n] =
2M1 − n − M1
M1
k2
∑k=−M
1
=
M1 − n
M
1
k2
∑k=−M
1
= −h1 [n]
and M = 2M1 is an even integer.
The linear regression slope filter is realized using a Type III FIR filter with bandpass characteristic.
15.1.2
Locations of Zeros for FIR Linear-Phase Systems
Symmetric Systems (Type I & II)
Since
h[n] = h[M − n],
we have
0≤n≤M
M
M
n=0
k=0
H(z) =
∑ h[M − n]z−n = ∑ z−(M−k) = z−M H(z−1 )
If H(z0 ) = 0, then
−1
z−M
0 H(z0 ) = H(z0 ) = 0
that is
H(z−1
0 )=0
If h[n] is real, then
H(z∗0 ) = H ∗ (z0 ) = 0
Using the symmetry of h[n] again for H(z∗0 ) = 0, we get
H(1/z∗0 ) = 0
−1
∗ −1
∗ −1 −1
Then H(z) will have factors (1 − z0 z−1 )(1 − z−1
0 z )(1 − z0 z )(1 − (z0 ) z ).
If z0 = e jθ , then H(z) have factors (1 − z0 z−1 )(1 − z∗0 z−1 ).
If z0 = ±1, then H(z) have factors (1 ± z−1 )
Note that if z0 = −1,
H(−1) = (−1)M H(−1)
So, when M is even (Type I FIR), H(−1) can be of any value; When M is odd (Type II FIR), H(−1) = 0 is the only
value for z = −1.
Anti-Symmetric Systems (Type III and Type IV)
h[n] = −h[M − n] 0 ≤ n ≤ M
we have
H(z) =
M
M
n=0
k=0
∑ −h[M − n]z−n = − ∑ z−(M−k) = −z−M H(z−1 )
15-8
If H(z0 ) = 0, then
−1
z−M
0 H(z0 ) = −H(z0 ) = 0
that is
H(z−1
0 )=0
If h[n] is real, then
H(z∗0 ) = H ∗ (z0 ) = 0
Using the symmetry of h[n] again for H(z∗0 ) = 0, we get
H(1/z∗0 ) = 0
−1
∗ −1
∗ −1 −1
Then H(z) will have factors (1 − z0 z−1 )(1 − z−1
0 z )(1 − z0 z )(1 − (z0 ) z ).
If z0 = e jθ , then H(z) have factors (1 − z0 z−1 )(1 − z∗0 z−1 ).
If z0 = ±1, then H(z) have factors (1 ± z−1 )
Note that at z = 1,
H(1) = −H(1)
That is H(z) has to be zero at z = 1 for anti-symmetric systems.
At z = −1,
H(−1) = −(−1)M H(−1)
So, when M is even (Type III FIR), H(z) = 0 for z = −1; When M is odd (Type IV FIR), H(−1) can take any value
for z = −1.
From the zeros we can see that:
• It is impossible for Type II FIR’s to be a high pass filter because it has a zero at z = −1 (ω = π).
• It is impossible for Type III and Type IV FIR’s to be low pass filters because they have zero at z = 1 (ω = 0)
• It is impossible for Type III FIR’s to be a high pass filter because it has zero at z = −1 (ω = π).
Download