Title: -p
1Bandpass, Highpass, Etc.
Heres the amplitude response of an ideal
highpass filter We can get this by taking the
frequency response of an ideal lowpass filter
which cuts off at p, and subtracting from it the
response of a second filter which cuts off at wc.
wc
-wc
-p
p
2Bandpass, Highpass, Etc.
Heres the impulse response of the ideal highpass
filter
Again, this is the difference of two noncausal
functions, and is therefore noncausal. Well
truncate and shift the ideal impulse response to
make it causal, then taper it with a Kaiser
window
3Bandpass, Highpass, Etc.
Heres the resulting impulse response of our
highpass filter
where w(n) is a Kaiser (or any other) window.
4Bandpass, Highpass, Etc.
If N is odd, this can be simplified to
Lets try an example.
5Bandpass, Highpass, Etc.
Lets say were given the following filter
specification fs 44,100 Hz fc 8000 Hz (wc
0.3628p) Df 2205 Hz (Dw 0.1p) d
0.001 (A 60) Using the empirical formulas, we
get b 5.6533 and N 73.4 (73). Heres the
truncated, shifted, tapered impulse response
6(No Transcript)
7Bandpass, Highpass, Etc.
And heres the frequency response, and the
frequency response in dB.
8(No Transcript)
9(No Transcript)
10Bandpass, Highpass, Etc.
Lastly, heres the amplitude response of an ideal
bandstop filter This can be expressed as the sum
of a highpass filter which cuts off at wu, and a
lowpass filter which cuts off at wl.
-wl
wl
wu
-wu
-p
p
11Bandpass, Highpass, Etc.
Heres the impulse response of the ideal bandstop
filter
Once again, this is the difference of two
noncausal functions, and is therefore noncausal.
Well truncate and shift the ideal impulse
response to make it causal, then taper it with a
Kaiser window
12Bandpass, Highpass, Etc.
Heres the resulting impulse response of our
highpass filter
where w(n) is a Kaiser (or any other) window.
13Bandpass, Highpass, Etc.
Again, if N is odd, this can be simplified to
Lets try one more example.
14Bandpass, Highpass, Etc.
Heres a bandstop filter specification fs
44,100 Hz fl 8000 Hz (wl 0.3628p) fu
16,000 Hz (wu 0.7256p) Df 2205 Hz (Dw
0.1p) d 0.001 (A 60) Using the empirical
formulas, we get b 5.6533 and N 73.4
(73). Heres the truncated, shifted, tapered
impulse response
15(No Transcript)
16Bandpass, Highpass, Etc.
And heres the frequency response, and the
frequency response in dB.
17(No Transcript)
18(No Transcript)
19Parks-McClellan
The Parks-McClellan algorithm generates an
impulse response for a filter. This filters
frequency response optimally matches the
frequency response of an ideal filter. This
algorithm works for filters of even or odd
length, but well simplify the discussion by
restricting it to odd lengths (N is an odd
number). As long as N is odd, the resulting
impulse response is symmetric about its center
point, so it can be thought of as a shifted
version of the ideal (noncausal) impulse
response, which is symmetric about zero.
20Parks-McClellan
In other words, if N is odd, and a(n) is an even
sequence (symmetric about n 0), then the
impulse response can be represented as a shifted
version of a(n)
where a(n) is the impulse response of a noncausal
FIR filter. The noncausal filters frequency
response is
21Parks-McClellan
Define an error function, E(w)
Now, well choose the coefficients a(n) so
is minimized.
But well only do this minimization in the
passband and the stopband, and will allow the
transition band (which must be part of the
specification) to come out however it does (this
WILL be OK).
22Parks-McClellan
This means the width of the transition band must
be part of the filter specification (no
surprise). Lets compare this type of filter
specification to an ideal lowpass filter
23Parks-McClellan
Lets compare this type of filter specification
to an ideal lowpass filter
Ideal lowpass filter
wc
p
lowpass filter with transition band
wp
ws
p
wc
24Parks-McClellan
To put this another way,
The specified cutoff frequency, wc, is halfway
between the upper edge of the passband (wc) and
the lower edge of the stopband (ws).
25Parks-McClellan
We havent specified wc and ws, but we have
specified wc and Dw.
So this is how we get wc and ws from the filter
specification.
26Parks-McClellan
Most implementations of the Parks-McClellan
algorithm are slightly modified to allow
different error values in the passband and the
stopband, so the passband ripple and stopband
ripple dont have to be equal. When you use such
a program, you will probably need to specify
weights for the passband and stopband. If the
passband weight is 1, and the stopband weight is
10, the stopband ripple will be ten times the
passband ripple.
27Parks-McClellan
This is done by incorporating a weighting
function in the error function
When you use such a program, you will probably
need to specify weights for the passband and
stopband. If the passband weight is 1, and the
stopband weight is 10, the stopband ripple will
be ten times the passband ripple.
28Parks-McClellan
Fortunately, we dont have to write our own
implementation of Parks-McClellan. Its widely
available online, and is incorporated in the
Matlab signal processing toolkit, SystemView, and
other tools. Heres one version thats available
online.
29Problems