Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter passes certain frequency components without any distortion and blocks other frequency components
1
Filtering
The range of frequencies that is allowed to pass through the filter is called the passband, and the range of frequencies that is blocked by the filter is called the stopband In most cases, the filtering operation for analog signals is linear
2
Filtering
The filtering operation of a linear analog filter is described by the convolution integral y (t ) = h(t ) x()d
where x(t) is the input signal, y(t) is the output of the filter, and h(t) is the impulse response of the filter
3
Filtering
A lowpass filter passes all low-frequency components below a certain specified frequency f c , called the cutoff frequency, and blocks all high-frequency components above f c A highpass filter passes all high-frequency components a certain cutoff frequency f c and blocks all low-frequency components below
4
Filtering
A bandpass filter passes all frequency components between 2 cutoff frequencies, f c1 and fc 2, where f c1 < f c 2 , and blocks all frequency components below the frequency f c1 and above the frequency fc 2 A bandstop filter blocks all frequency components between 2 cutoff frequencies, f c1 and fc 2, where f c1 < f c 2 , and passes all frequency components below the frequency f c1 and above the frequency fc 2
5
Filtering
Figures below illustrate the lowpass filtering of an input signal composed of 3 sinusoidal components of frequencies 50 Hz, 110 Hz, and 210 Hz
I p ts n l n u ig a 4 2 A plitude m 0 2 4 0 A plitude m 1 0 .5 0 - .5 0 1 0 L wasf ro tp t o p s ilte u u
2 0
4 0 6 0 T e me im, s c
8 0
10 0
2 0
4 0 6 0 T e me im, s c
8 0
10 0
Filtering
Figures below illustrate highpass and bandpass filtering of the same input signal
Highpass filter output 1 0.5 Amplitude 0 -0.5 -1 Amplitude 1 0.5 0 -0.5 -1 0 Bandpass filter output
20
40 60 Time, msec
80
100
20
40 60 Time, msec
80
100
Filtering
There are various other types of filters A filter blocking a single frequency component is called a notch filter A multiband filter has more than one passband and more than one stopband A comb filter blocks frequencies that are integral multiples of a low frequency
8
Filtering
In many applications the desired signal occupies a low-frequency band from dc to some frequency fL Hz, and gets corrupted by a high-frequency noise with frequency components above fH Hz with fH > fL In such cases, the desired signal can be recovered from the noise-corrupted signal by passing the latter through a lowpass filter with a cutoff frequency f c where f L < f c < f H
9
HHP (e j ) 1
c 0
HBP (e j ) 1
HBS (e j ) 1
12
c2 c1
c1 c2
c2 c1
c1 c2
c 0
13
c2 c1
c1 c2
14
c2 c1
c1 c2
H ML (e j ) = Ak , k 1 k , k = 1, 2, , L
19
For example, the magnitude response G (e ) of a digital lowpass filter may be given as indicated below
20
22
24
26
27
+ p2 z + d2 z
2 2
+ + pM z ++ dN z
d 0 + d1z
, M N
29
H(z) must be a stable transfer function and must be of lowest order N for reduced computational complexity
For FIR digital filter design, the FIR transfer function is a polynomial in z 1 with real coefficients: H ( z ) = h[n] z
n =0 N n
30
For reduced computational complexity, degree N of H(z) must be as small as possible If a linear phase is desired, the filter coefficients must satisfy the constraint: h[n] = h[ N n]
31
33
35
Gibbs Phenomenon
Gibbs phenomenon - Oscillatory behavior in the magnitude responses of causal FIR filters obtained by truncating the impulse response coefficients of ideal filters
1.5 N = 20 N = 60 Magnitude 1
0.5
36
0.2
0.4 /
0.6
0.8
1
Copyright 2005, S. K. Mitra
Gibbs Phenomenon
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 2005, S. K. Mitra
37
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 H t ( e j ) =
1 2
H d (e j ) (e j () ) d
38
Gibbs Phenomenon
Thus H t (e j ) is obtained by a periodic H d (e j ) with continuous convolution of ( e j )
39
Copyright 2005, S. K. Mitra
Gibbs Phenomenon
If (e j ) is a very narrow pulse centered at = 0 (ideally a delta function) compared to H d (e j ), then H t (e j ) will variations in approximate H d (e j ) very closely Length M+1 of w[n] should be very large On the other hand, length M+1 of ht [n] should be as small as possible to reduce computational complexity
40
Copyright 2005, 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
41
summable, and hence filter is unstable 2) Rectangular window has an abrupt transition to zero
Copyright 2005, S. K. Mitra
Gibbs Phenomenon
Oscillatory behavior can be explained by j examining the DTFT R (e ) of wR [n] :
Rectangular window 30 20 Amplitude 10 0 -10 -1 M = 10 M=4
-0.5
42
0 /
0.5
43
Main lobe of R (e j ) characterized by its width 4 /( 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 Ripples in H t (e j ) around the point of discontinuity occur more closely but with no decrease in amplitude as M increases
Copyright 2005, S. K. Mitra
Gibbs Phenomenon
Gibbs Phenomenon
Rectangular window has an abrupt transition to zero outside the range M / 2 n M / 2 , which H t ( e j ) results in Gibbs phenomenon in 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
44
Copyright 2005, S. K. Mitra
Using a tapered window causes the height of the sidelobes to diminish, with a corresponding increase in the main lobe width resulting in a wider transition at the discontinuity Hann: 2 n
w[n] = 0.5 + 0.5 cos( M ),
M /2 n M /2
Hamming:
M /2 n M /2
Blackman:
45
0 -20
Gain, dB Gain, dB
Gain, dB Gain, dB
-100 0
0.2
0.4
0.6
0.8
-100 0
0.2
0.4
0.6
0.8
46
-100 0
0.4
0.6
0.8
48
Copyright 2005, S. K. Mitra
Observe H t (e j (c + ) ) + H t (e j (c ) ) 1 j c H t (e ) 0.5 Thus, Passband and stopband ripples are the same
49
Copyright 2005, S. K. Mitra
54
-50
-50
Gain, dB
-50
-100
55
0.2
0.4 /
0.6
0.8
56
where is an adjustable parameter and I 0 (u ) is the modified zeroth-order Bessel function of the first kind: (u / 2) r 2 I 0 (u ) = 1 + [ ] r! r =1 Note I 0 (u ) > 0 for u > 0 20 (u / 2) r 2 ] In practice I 0 (u ) 1 + [ r! r =1
Copyright 2005, S. K. Mitra
57
Choose M = 24
58
Copyright 2005, S. K. Mitra