Spectral Transformations of IIR Digital Filters

advertisement
Spectral Transformations of
IIR Digital Filters
• Objective - Transform a given lowpass digital
transfer function GL (z ) to another digital
transfer function GD (zˆ ) that could be a
lowpass, highpass, bandpass or bandstop filter
−1
• z has been used to denote the unit delay in
−1
the prototype lowpass filter GL (z ) and zˆ
to denote the unit delay in the transformed
filter GD (zˆ ) to avoid confusion
1
Copyright © S. K. Mitra
Spectral Transformations of
IIR Digital Filters
• Unit circles in z- and ẑ -planes defined by
jω ,
jω
ˆ
z=e
zˆ = e
• Transformation from z-domain to
ẑ -domain given by
z = F (zˆ )
• Then
GD ( zˆ ) = GL {F ( zˆ )}
2
Copyright © S. K. Mitra
Spectral Transformations of
IIR Digital Filters
• From z = F (zˆ ), thus
> 1,

F ( zˆ ) = 1,
< 1,

z = F (zˆ ) , hence
if z > 1
if z = 1
if z < 1
• Recall that a stable allpass function A(z)
satisfies the condition
3
Copyright © S. K. Mitra
Spectral Transformations of
IIR Digital Filters
< 1, if z > 1

A( z ) = 1, if z = 1
> 1, if z < 1

• Therefore 1 / F ( zˆ ) must be a stable allpass
function whose general form is
L  1 − α* zˆ 
1
l , α < 1
= ± ∏ 
l

F ( zˆ )
l =1 zˆ − α l 
4
Copyright © S. K. Mitra
Lowpass-to-Lowpass
Spectral Transformation
• To transform a lowpass filter GL (z ) with a
cutoff frequency ωc to another lowpass filter
GD (zˆ ) with a cutoff frequency ω̂c , the
transformation is
1
1 − α zˆ
−
1
=
z =
F ( zˆ ) zˆ − α
where α is a function of the two specified
cutoff frequencies
5
Copyright © S. K. Mitra
Lowpass-to-Lowpass
Spectral Transformation
• On the unit circle we have
e
− jω
− jω
ˆ
e
−
α
=
1 − α e − jωˆ
• From the above we get
− jω
ˆ
e
−1
− jω
−
α
e
e
m1 =
m 1 = (1 ± α) ⋅
− jω
ˆ
1− α e
1 − αe − jωˆ
• Taking the ratios of the above two expressions
tan(ω / 2) =  1 + α  tan(ω
ˆ / 2)
1 − α 
− jω
ˆ
6
Copyright © S. K. Mitra
Lowpass-to-Lowpass
Spectral Transformation
sin ((ωc − ω
ˆ c ) / 2)
α=
sin ((ωc + ω
ˆ c ) / 2)
• Example - Consider the lowpass digital filter
• Solving we get
7
0.0662(1 + z −1 )3
GL ( z ) =
−1
−1
−2
(1 − 0.2593 z )(1 − 0.6763 z + 0.3917 z )
which has a passband from dc to 0.25π with
a 0.5 dB ripple
• Redesign the above filter to move the
passband edge to 0.35π
Copyright © S. K. Mitra
Lowpass-to-Lowpass
Spectral Transformation
• Here
sin(0.05π)
α=−
= − 0.1934
sin(0.3π)
• Hence, the desired lowpass transfer function is
GD ( zˆ ) = GL ( z ) z = zˆ + 0.1934
−1
−1
1+ 0.1934 zˆ −1
Gain, dB
0
-10
G (z)
G (z)
L
D
-20
-30
8
-40
0
0.2
0.4
0.6
ω/π
0.8
1
Copyright © S. K. Mitra
Lowpass-to-Lowpass
Spectral Transformation
• The lowpass-to-lowpass transformation
1
1 − α zˆ
−
1
=
z =
F ( zˆ ) zˆ − α
can also be used as highpass-to-highpass,
bandpass-to-bandpass and bandstop-tobandstop transformations
9
Copyright © S. K. Mitra
Lowpass-to-Highpass
Spectral Transformation
10
• Desired transformation
−1
zˆ + α
−1
z =−
−1
1 + α zˆ
• The transformation parameter α is given by
cos((ωc + ω
ˆ c ) / 2)
α=−
cos((ωc − ω
ˆ c ) / 2)
where ωc is the cutoff frequency of the
lowpass filter and ω̂c is the cutoff frequency
of the desired highpass filter
Copyright © S. K. Mitra
Lowpass-to-Highpass
Spectral Transformation
• Example - Transform the lowpass filter
−1 3
0.0662(1 + z )
GL ( z ) =
(1 − 0.2593 z −1 )(1 − 0.6763 z −1 + 0.3917 z −2 )
11
• with a passband edge at 0.25π to a highpass
filter with a passband edge at 0.55π
• Here α = − cos(0.4π) / cos(0.15π) = −0.3468
• The desired transformation is
−1
z
ˆ − 0.3468
−1
z =−
−1
1 − 0.3468 zˆ
Copyright © S. K. Mitra
Lowpass-to-Highpass
Spectral Transformation
• The desired highpass filter is
GD ( zˆ ) = G ( z ) z
−1
zˆ −1 −0.3468
=−
1−0.3468 zˆ −1
0
Gain, dB
−20
−40
−60
−80
0
12
0.2π
0.4π
0.6π
0.8π
Normalized frequency
π
Copyright © S. K. Mitra
Lowpass-to-Highpass
Spectral Transformation
• The lowpass-to-highpass transformation can
also be used to transform a highpass filter
with a cutoff at ωc to a lowpass filter with
a cutoff at ω̂c
and transform a bandpass filter with a center
frequency at ωo to a bandstop filter with a
center frequency at ω̂o
13
Copyright © S. K. Mitra
Lowpass-to-Bandpass
Spectral Transformation
• Desired transformation
2αβ −1 β − 1
zˆ −
zˆ +
β +1
β +1
−1
z =−
β − 1 − 2 2αβ −1
zˆ −
zˆ + 1
β +1
β +1
−2
14
Copyright © S. K. Mitra
Lowpass-to-Bandpass
Spectral Transformation
• The parameters α and β are given by
cos((ω
ˆ c2 + ω
ˆ c1 ) / 2 )
α=
cos((ω
ˆ c2 − ω
ˆ c1 ) / 2 )
β = cot ((ω
ˆ c2 − ω
ˆ c1 ) / 2 ) tan(ωc / 2)
15
where ωc is the cutoff frequency of the
lowpass filter, and ω
ˆ c1 and ω
ˆ c 2 are the
desired upper and lower cutoff frequencies
of the bandpass filter
Copyright © S. K. Mitra
Lowpass-to-Bandpass
Spectral Transformation
16
• Special Case - The transformation can be
simplified if ωc = ω
ˆ c2 − ω
ˆ c1
• Then the transformation reduces to
−1
−1
−1 zˆ − α
z = − zˆ
−1
1 − α zˆ
where α = cos ω
ˆ o with ω̂o denoting the
desired center frequency of the bandpass
filter
Copyright © S. K. Mitra
Lowpass-to-Bandstop
Spectral Transformation
• Desired transformation
2αβ −1 1 − β
zˆ −
zˆ +
1+ β
1+ β
−1
z =
1 − β −2 2αβ −1
zˆ −
zˆ + 1
1+ β
1+ β
−2
17
Copyright © S. K. Mitra
Lowpass-to-Bandstop
Spectral Transformation
• The parameters α and β are given by
cos((ω
ˆ c2 + ω
ˆ c1 ) / 2 )
α=
cos((ω
ˆ c2 − ω
ˆ c1 ) / 2 )
β = tan ((ω
ˆ c2 − ω
ˆ c1 ) / 2 ) tan(ωc / 2)
18
where ωc is the cutoff frequency of the
lowpass filter, and ω
ˆ c1 and ω
ˆ c 2 are the
desired upper and lower cutoff frequencies
of the bandstop filter
Copyright © S. K. Mitra
Least Integral-Squared Error
Design of FIR Filters
• Let H d (e jω ) denote the desired frequency
response
• Since H d (e jω ) is a periodic function of ω
with a period 2π, it can be expressed as a
Fourier series
jω
∞
H d (e ) = ∑ hd [n]e
where
19
− jωn
n = −∞
1 π
jω j ωn
hd [n] =
H
(
e
)e dω, − ∞ ≤ n ≤ ∞
∫ d
2π − π
Copyright © S. K. Mitra
Least Integral-Squared Error
Design of FIR Filters
• In general, H d (e jω ) is piecewise constant
with sharp transitions between bands
• In which case, {hd [n]} is of infinite length
and noncausal
• Objective - Find a finite-duration {ht [n]}
of length 2M+1 whose DTFT H t (e jω )
jω
H
e
(
) in
approximates the desired DTFT d
some sense
20
Copyright © S. K. Mitra
Least Integral-Squared Error
Design of FIR Filters
• Commonly used approximation criterion Minimize the integral-squared error
1 π
jω
jω 2
Φ=
∫ H t ( e ) − H d ( e ) dω
2π − π
where
jω
M
H t (e ) = ∑ ht [n]e
− jωn
n=− M
21
Copyright © S. K. Mitra
Least Integral-Squared Error
Design of FIR Filters
• Using Parseval’s relation we can write
∞
2
n = −∞
M
2
Φ = ∑ ht [n] − hd [n]
− M −1
= ∑ ht [n] − hd [n] + ∑
n=− M
22
n = −∞
2
hd [n] +
∞
2
∑ hd [n]
n = M +1
• It follows from the above that Φ is
minimum when ht [n] = hd [n] for − M ≤ n ≤ M
• ⇒ Best finite-length approximation to ideal
infinite-length impulse response in the
mean-square sense is obtained by truncation
Copyright © S. K. Mitra
Least Integral-Squared Error
Design of FIR Filters
• A causal FIR filter with an impulse response
h[n] can be derived from ht [n] by delaying:
h[n] = ht [n − M ]
• The causal FIR filter h[n] has the same
magnitude response as ht [n] and its phase
response has a linear phase shift of ωM
radians with respect to that of ht [n]
23
Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal lowpass filter HLP(e j )
sin ωc n
hLP [n] = π n , − ∞ ≤ n ≤ ∞
1
– c 0
c
• Ideal highpass filter HHP (e j )
1
– c
24
0
c
 1 − ωc ,
=
n
0
π

hHP [n] = 
sin(ωc n)
− πn , n ≠ 0

Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal bandpass filter HBP (e j )
–1
– c2 – c1
c1
c2
sin(ωc 2 n) − sin(ωc1n) , n ≠ 0
πn
 πn
hBP [n] = 
ωc 2 ωc1

−
=
,
0
n
π
π

25
Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal bandstop filter HBS (e j )
1
– c2 – c1
c1
c2
 1 − (ωc 2 − ωc1 ) ,
=
n
0
π

hBS [n] = 
sin(ωc1n) sin(ωc 2 n)
 πn
−
, n≠0
π
n

26
Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal multiband filter H ML (e jω ) = Ak ,
HML (e j )
A5
A1
A4
A2
A3
0
1
2
3
4
ωk −1 ≤ ω ≤ ωk ,
k = 1, 2,K, L
sin(ωL n)
hML [n] = ∑ ( Al − Al +1 ) ⋅ πn
L
l =1
27
Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal discrete-time Hilbert transformer  j, − π < ω < 0
H HT (e ) = 
− j , 0 < ω < π
jω
for n even
 0,
hHT [n] = 
2/π n, for n odd
28
Copyright © S. K. Mitra
Impulse Responses of Ideal
Filters
• Ideal discrete-time differentiator jω
H DIF (e ) = jω,
0≤ ω ≤π
n=0
 0,
hDIF [n] = cos π n
 n , n ≠ 0
29
Copyright © S. K. Mitra
Gibbs Phenomenon
• Gibbs phenomenon - Oscillatory behavior in
the magnitude responses of causal FIR filters
obtained by truncating the impulse response
coefficients of ideal filters
Magnitude
1.5
1
0.5
0
30
N = 20
N = 60
0
0.2
0.4
0.6
0.8
1
ω/π
Copyright © S. K. Mitra
Gibbs Phenomenon
31
• As can be seen, as the length of the lowpass
filter is increased, the number of ripples in
both passband and stopband increases, with
a corresponding decrease in the ripple
widths
• Height of the largest ripples remain the
same independent of length
• Similar oscillatory behavior observed in the
magnitude responses of the truncated
versions of other types of ideal filters
Copyright © S. K. Mitra
Gibbs Phenomenon
• Gibbs phenomenon can be explained by
treating the truncation operation as an
windowing operation:
ht [n] = hd [n] ⋅ w[n]
• In the frequency domain
π
1
jϕ
j ( ω− ϕ )
Ψ
H t ( e jω ) =
H
(
e
)
(
e
) dϕ
∫ d
2π − π
32
• where H t (e jω ) and Ψ (e jω ) are the DTFTs
of ht [n] and w[n] , respectively
Copyright © S. K. Mitra
Gibbs Phenomenon
jω
H
(
e
) is obtained by a periodic
• Thus t
continuous convolution of H d (e jω ) with
Ψ ( e jω )
33
Copyright © S. K. Mitra
Gibbs Phenomenon
• If Ψ (e jω ) is a very narrow pulse centered at
ω = 0 (ideally a delta function) compared to
variations in H d (e jω ), then H t (e jω ) will
approximate H d (e jω ) very closely
• Length 2M+1 of w[n] should be very large
• On the other hand, length 2M+1 of ht [n]
should be as small as possible to reduce
computational complexity
34
Copyright © S. K. Mitra
Gibbs Phenomenon
• A rectangular window is used to achieve
simple truncation:
1, 0 ≤ n ≤ M
wR [n] = 
0, otherwise
jω
• Presence of oscillatory behavior in H t (e )
is basically due to:
– 1) hd [n] is infinitely long and not absolutely
summable, and hence filter is unstable
– 2) Rectangular window has an abrupt transition
to zero
35
Copyright © S. K. Mitra
Gibbs Phenomenon
• Oscillatory behavior can be explained by
jω
examining the DTFT ΨR (e ) of wR [n] :
Rectangular window
30
Amplitude
20
M = 10
10
M=4
0
-10
-1
jω
36
-0.5
0
ω/π
0.5
1
• ΨR (e ) has a main lobe centered at ω = 0
• Other ripples are called sidelobes
Copyright © S. K. Mitra
Gibbs Phenomenon
37
• Main lobe of ΨR (e jω ) characterized by its
width 4π /( 2 M + 1) defined by first zero
crossings on both sides of ω = 0
• As M increases, width of main lobe
decreases as desired
• Area under each lobe remains constant
while width of each lobe decreases with an
increase in M
jω
• Ripples in H t (e ) around the point of
discontinuity occur more closely but with
no decrease in amplitude as M increases
Copyright © S. K. Mitra
Gibbs Phenomenon
• Rectangular window has an abrupt transition
to zero outside the range − M ≤ n ≤ M , which
results in Gibbs phenomenon in H t (e jω )
• Gibbs phenomenon can be reduced either:
(1) Using a window that tapers smoothly to
zero at each end, or
(2) Providing a smooth transition from
passband to stopband in the magnitude
specifications
38
Copyright © S. K. Mitra
Download