You are on page 1of 4

Least Integral-Squared Error

Least Integral-Squared Error


Design of FIR Filters
• Let H d (e jω ) denote the desired frequency
Design of FIR Filters
response • In general, H d (e jω ) is piecewise constant
• Since H d (e jω ) is a periodic function of ω with sharp transitions between bands
with a period 2π, it can be expressed as a • In which case, {hd [n]} is of infinite length
Fourier series and noncausal

H d (e jω ) = ∑ hd [n]e − jωn • Objective - Find a finite-duration {ht [n]}
where n = −∞ of length 2M+1 whose DTFT H t (e jω )
1 π
jω jωn
approximates the desired DTFT H d (e jω ) in
hd [n] = ∫ H d (e )e dω, − ∞ ≤ n ≤ ∞ some sense
2π − π
1 2
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Least Integral-Squared Error


Least Integral-Squared Error
Design of FIR Filters
Design of FIR Filters • Using Parseval’s relation we can write

• Commonly used approximation criterion - Φ = ∑ ht [n] − hd [n]
2
Minimize the integral-squared error n = −∞
M − M −1 ∞
1 π jω jω 2 = ∑ ht [n] − hd [ n] + ∑ hd2 [n] + ∑ hd2 [n]
2
Φ= ∫ H t (e ) − H d (e ) dω n=− M n = −∞ n = M +1
2π − π
• It follows from the above that Φ is
where minimum when ht [n] = hd [n] for − M ≤ n ≤ M
M
H t (e jω ) = ∑ ht [n]e − jωn • ⇒ Best finite-length approximation to ideal
n=− M
infinite-length impulse response in the
3 4 mean-square sense is obtained by truncation
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Impulse Responses of Ideal


Least Integral-Squared Error
Filters
Design of FIR Filters • Ideal lowpass filter -
HLP(e j )
• A causal FIR filter with an impulse response
h[n] can be derived from ht [n] by delaying: sin ωc n
hLP [n] = πn , − ∞ ≤ n ≤ ∞
1

h[n] = ht [n − M ] – c 0 c

• The causal FIR filter h[n] has the same • Ideal highpass filter -
magnitude response as ht [n] and its phase HHP (e j )
⎧ 1 − ωc , n=0
response has a linear phase shift of ωM ⎪ π
radians with respect to that of ht [n]
1
hHP [n] = ⎨
sin(ω n)
⎪− πnc , n ≠ 0
5 6
– c 0 c

Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

1
Impulse Responses of Ideal
Impulse Responses of Ideal
Filters
Filters
• Ideal bandstop filter -
• Ideal bandpass filter - HBS (e j )

HBP (e j )
1
–1

– c2 – c1 c1 c2
– c2 – c1 c1 c2

⎧sin(ωc 2 n) − sin(ωc1n) , n ≠ 0 ⎧ 1 − (ωc 2 − ωc1 ) , n=0


⎪ π
⎪ πn πn hBS [n] = ⎨
hBP [n] = ⎨ sin(ω n) sin(ωc 2n)
ωc 2 ωc1 ⎪ πnc1 −
⎪ πn , n ≠ 0
⎩ π − π , n=0 ⎩
7 8
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Impulse Responses of Ideal Impulse Responses of Ideal


Filters Filters
• Ideal multiband filter -
• Ideal discrete-time Hilbert transformer -
H ML (e jω ) = Ak ,
j
HML (e )

⎧ j, − π < ω < 0
H HT (e jω ) = ⎨
A5
A1
A4
ωk −1 ≤ ω ≤ ωk , ⎩− j , 0 < ω < π
A2
A3
0 1 2 3 4 k = 1, 2,K, L
⎧ 0, for n even
L sin(ω n) hHT [n] = ⎨
hML [n] = ∑ ( Al − Al +1) ⋅ πnL ⎩2/π n, for n odd
l =1
9 10
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Impulse Responses of Ideal Gibbs Phenomenon


Filters • Gibbs phenomenon - Oscillatory behavior in
• Ideal discrete-time differentiator - the magnitude responses of causal FIR filters
obtained by truncating the impulse response
H DIF (e jω ) = jω, 0≤ ω ≤π coefficients of ideal filters
1.5
N = 20

⎧⎪ 0, n=0 1
N = 60
Magnitude

hDIF [ n] = ⎨cos π n
⎪⎩ n , n ≠ 0 0.5

0
0 0.2 0.4 0.6 0.8 1
11 12 ω/π
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

2
Gibbs Phenomenon Gibbs Phenomenon
• As can be seen, as the length of the lowpass • Gibbs phenomenon can be explained by
filter is increased, the number of ripples in treating the truncation operation as an
both passband and stopband increases, with windowing operation:
a corresponding decrease in the ripple ht [n] = hd [n] ⋅ w[ n]
widths • In the frequency domain
• Height of the largest ripples remain the π
H t ( e jω ) = jϕ j ( ω− ϕ)
1
same independent of length 2π ∫ H d (e ) Ψ ( e ) dϕ
−π
• where H t (e jω ) and Ψ (e jω ) are the DTFTs
• Similar oscillatory behavior observed in the
magnitude responses of the truncated
of ht [n] and w[n] , respectively
13 versions of other types of ideal filters 14
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Gibbs Phenomenon
Gibbs Phenomenon
• Thus H t (e jω ) is obtained by a periodic
continuous convolution of H d (e jω ) with • If Ψ (e jω ) is a very narrow pulse centered at
Ψ (e jω ) ω = 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
15 16
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

Gibbs Phenomenon Gibbs Phenomenon


• A rectangular window is used to achieve • Oscillatory behavior can be explained by

simple truncation: examining the DTFT ΨR (e ) of wR [n] :
⎧1, 0 ≤ n ≤ M Rectangular window

wR [n] = ⎨
30

⎩0, otherwise 20
M = 10 main lobe
Amplitude

• Presence of oscillatory behavior in H t (e jω ) 10


M=4 side lobe
is basically due to: 0

– 1) hd [n] is infinitely long and not absolutely -10


-1 -0.5 0 0.5 1
summable, and hence filter is unstable ω/π

– 2) Rectangular window has an abrupt transition • ΨR (e ) has a main lobe centered at ω = 0
to zero • Other ripples are called sidelobes
17 18
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

3
Gibbs Phenomenon Gibbs Phenomenon
• Main lobe of ΨR (e jω ) characterized by its • Rectangular window has an abrupt transition
width 4π /( 2 M + 1) defined by first zero to zero outside the range − M ≤ n ≤ M , which
crossings on both sides of ω = 0
results in Gibbs phenomenon in H t (e jω )
• As M increases, width of main lobe
decreases as desired • Gibbs phenomenon can be reduced either:
• Area under each lobe remains constant (1) Using a window that tapers smoothly to
while width of each lobe decreases with an zero at each end, or
increase in M (2) Providing a smooth transition from
• Ripples in H t (e jω ) around the point of passband to stopband in the magnitude
discontinuity occur more closely but with specifications
no decrease in amplitude as M increases
19 20
Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra

You might also like