Title: Ideal Lowpass Filter
1Ideal Lowpass Filter
An ideal lowpass filter is like a rectangular
window in the frequency domain.
2Ideal Lowpass Filter
An ideal lowpass filter is like a rectangular
window in the frequency domain.
-wc
wc
p
-2p
2p
-p
3Ideal Lowpass Filter
To find the ideal lowpass filters impulse
response, evaluate its inverse DTFT integral
4The impulse is applied at n 0
5Ideal Lowpass Filter
From this plot, it is apparent that the impulse
response begins before the impulse is applied.
The ideal lowpass filter is noncausal, so it
cant be realized. A truncated and shifted
version (which is nonideal) can be realized, as
we will see.
6Simple FIR Filter
As weve see, the ideal lowpass filter cant be
realized in the real world because its
noncausal. However, if we can come up with a
filter thats causal but otherwise similar to the
ideal lowpass filter, it should be realizable.
If were careful and lucky, we can also make it a
pretty good lowpass filter.
7Simple FIR Filter
Well create this filter by doing two things to
the ideal lowpass filters impulse response 1.
Shift hi(n) so Its peak is centered at
2. Truncate hi(n) so its zero outside the
interval
8Simple FIR Filter
Performing these steps on hi(n) results in the
following impulse response sequence
9Simple FIR Filter
This can also be written as
Wed like to find the frequency response of this
filter, H(ejw). If we use the properties of the
DTFT, this is not as hard as you would think.
10Simple FIR Filter
First, we know the DTFT of hi(n). Its just the
frequency response of an ideal lowpass filter
This is shifted to the right by (N-1)/2 samples
in the time domain. The shifting property of the
DTFT is
11Simple FIR Filter
Truncation of hi(n) is like multiplication of
hi(n) by r(n). Of course, time domain
multiplication is equivalent to you-know-what
Applying these two properties yields the FIR
filters frequency response
12Simple FIR Filter
Refer to the figures on pages 209 - 211 of the
textbook to see what the frequency response looks
like Note that increasing N (lengthening the
filter) results in a filter which cuts off more
abruptly. A longer filter approximates an ideal
lowpass filter more closely.
13Simple FIR Filter
The cases weve looked at were constructed so the
truncated impulse response was shifted to the by
an integer number of samples. In such cases,
each sample of the original (unshifted) sequence
is merely moved over by an integer number of
samples, and the shifted sequence is an exact,
shifted copy of the unshifted sequence.
Its also possible to shift a sequence by a
non-integer (i.e., real) number of samples.
14Simple FIR Filter
Consider the following sequence
Now, lets say we want to shift it by a
non-integer number of samples
Imagine a continuous time signal xa(t) which can
be sampled with sampling period T, resulting in
the sequence x(n)
15Simple FIR Filter
We can produce the shifted sequence, x(n-a), by
shifting xa(t) by a and resampling
In terms of the DTFT, first consider the
unshifted sequence
16Simple FIR Filter
Now, insert the shift
So,
17Generalized Linear Phase
Consider an LSI discrete time system whose
frequency response (DTFT) can be written in the
following form
Wed like to have this in polar form
18Generalized Linear Phase
its already in polar form
If
If we plot qH(w), it is simply a line with slope
a. A system with such a phase function is said
to have linear phase.
19Generalized Linear Phase
it can be put in polar form.
If
It can be written as
Note that
So
20Generalized Linear Phase
This type of system is said to have generalized
linear phase.
Why is this important? Consider a complex signal
x(n)
which is the input to a system with generalized
linear phase. The output can be expressed as
21Generalized Linear Phase
If
this can be written so
If
In either case, the output sequence y(n) is
merely the input sequence x(n), scaled by the
magnitude of A(f) (i.e., the amplitude response),
and delayed by a samples. Notice that the delay
a does not depend on the frequency f. This is
the consequence of phase linearity, and is called
constant group delay.
22Generalized Linear Phase
In this example, the input signal was a complex
exponential a single, pure frequncy. It was
delayed by a samples, independent of its
frequency. If the input had been the sum of two
complex exponentials, each of them is delayed by
a samples. Since any waveform can be expressed
as a sum of complex exponentials, and all of them
are delayed by the same number of samples, an
arbitrary waveform is delayed by a samples. Its
shape may be changed due to the amplitude
response function, but its duration is unchanged.
23Generalized Linear Phase
Any system whose impulse response is symmetric
about its midpoint, such as the window-based FIR
filter, has generalized linear phase. Read
Cartinhours explanation of this, but mine is as
follows An FIR filter works by summing scaled
and delayed samples of the input. The delays do
not depend on frequency, so the overall phase
response does not depend on frequency.
24Principal Value vs. Unwrapped Phase
Consider a sequence x(n), whose DTFT can be
expressed in polar form
This means that integer multiples of 2p may be
added to or subtracted from qX(w) without
changing X(ejw).
25Principal Value vs. Unwrapped Phase
qX(w) can take on any real value. If it is
allowed to be greater than p or less than p,
this is called unwrapped phase. It can be kept
between p and p by adding or subtracting 2p
whenever it goes outside this range. If it is
plotted in that way, it is called a principal
value plot.
26FIR Filter Design
Weve seen how to design a simple FIR lowpass
filter using a rectangular window.
- We will now see how to design lowpass, highpass,
bandpass and band-reject (bandstop) filters using
two techniques - The Kaiser window (a better window than the
rectangular window - The Parks-McClellan algorithm
27FIR Filter Design
Both methods result in filters which have linear
phase characteristics
Where A(w) is a real-valued function, and
N is the length of the impulse response.
Within the passband, A(w) is real and
nonnegative. This means the resulting filter has
linear phase, not merely general linear phase
28FIR Filter Design
Within the passband, A(w) is real and
nonnegative. This means the resulting filter has
linear phase, not merely general linear phase.
These equations apply
Outside the passband, the filter may have jump
discontinuities in its phase characteristic
(general linear phase), but since this isoutside
the passband, they have little significance.
29The Window Method
Weve seen how to design lowpass filters using a
rectangular window.
The rectangular window truncates the impulse
response to a length of N samples.
30The Window Method
Heres another way of writing the impulse
response
Where wc is the cutoff frequency, and w(n) is the
rectangular window function.
31The Window Method
The window function is
The frequency response of the resulting filter
can be written
32The Window Method
The frequency response of the resulting filter
can be written
W(ejw) is the DTFT of the rectangular window, and
Hi(ejw) is the frequency response function of the
ideal lowpass filter.
33The Window Method
When this convolution is performed, the shape of
the main lobe and sidelobes of W(ejw) modify the
shape of the frequency response. Instead of
being rectangular, the frequency response has
ripple in the passband and the stopband.
34(No Transcript)
35The Window Method
It would be good to reduce the amount of ripple.
Maybe this can be done by using a window whos
shape is different. In particular, if the
windows DTFT has sidelobes which are smaller in
magnitude relative to the mainlobe, the ripple
will be reduced. A tapered window will have
smaller sidelobes, and a wider main lobe both
desirable characteristics.
36The Window Method
As an example, heres the Hamming window
A 29-point Hamming window is plotted on the next
slide
37(No Transcript)
38The Window Method
Next, a plot of the impulse response of a 29-tap
FIR lowpass filter, wc 0.46p, based on an ideal
lowpass, followed by its frequency response Note
the magnitude of the impulse responses
sidelobes, and the passband ripple
39(No Transcript)
40(No Transcript)
41The Window Method
The next plot is the impulse response shown
previously, but windowed by a Hamming
window. This is followed by the filters
frequency response. Note the reduced sidelobe
magnitude, and the reduced passband ripple
However, the transition from passband to
stopband is not as sharp. The sharpness can be
restored by increasing the filter length.
42(No Transcript)
43(No Transcript)
44The Window Method
The Hamming window tapers the impulse response.
Other windows taper the impulse response more,
or less, than the Hamming window. The
rectangular window is an extreme example it
tapers the impulse response LESS!! A window which
tapers more will have a wider main lobe (less
sharp transition), but smaller sidelobes (less
ripple).
45The Window Method
If were given a filter specification, it will
usually include the cutoff frequency. This may
be wc (radians per sample) or fs (Hertz). It
will also give the width of the transition band,
and the minimum stopband attenuation. We must
choose the window function, and the filter length
in order to meet the specification.