WEBVTT
00:00:00.090 --> 00:00:02.490
The following content is
provided under a Creative
00:00:02.490 --> 00:00:04.030
Commons license.
00:00:04.030 --> 00:00:06.330
Your support will help
MIT OpenCourseWare
00:00:06.330 --> 00:00:10.720
continue to offer high quality
educational resources for free.
00:00:10.720 --> 00:00:13.320
To make a donation or
view additional materials
00:00:13.320 --> 00:00:17.280
from hundreds of MIT courses,
visit MIT OpenCourseWare
00:00:17.280 --> 00:00:18.450
at ocw.mit.edu.
00:00:55.797 --> 00:00:57.880
ALAN V. OPPENHEIM: During
the last three lectures,
00:00:57.880 --> 00:01:01.230
we considered the design of
infinite impulse response
00:01:01.230 --> 00:01:03.150
digital filters.
00:01:03.150 --> 00:01:07.860
The two main classes of design
procedures that we discussed
00:01:07.860 --> 00:01:10.620
involved mapping
continuous time designs
00:01:10.620 --> 00:01:12.240
to discrete time designs.
00:01:12.240 --> 00:01:13.920
That was the first class.
00:01:13.920 --> 00:01:16.740
And the second class was the
use of algorithmic design
00:01:16.740 --> 00:01:18.760
procedures.
00:01:18.760 --> 00:01:21.600
In this lecture, I
would like to discuss
00:01:21.600 --> 00:01:25.890
the design of finite impulse
response digital filters.
00:01:25.890 --> 00:01:29.760
And I remind you that
as we've stressed
00:01:29.760 --> 00:01:33.840
in a number of the lectures, one
of the very important aspects
00:01:33.840 --> 00:01:36.570
of finite impulse
response digital filters
00:01:36.570 --> 00:01:39.450
is the fact that they
can be implemented
00:01:39.450 --> 00:01:42.090
to have exactly linear phase.
00:01:42.090 --> 00:01:44.730
So finite impulse
response filters,
00:01:44.730 --> 00:01:47.790
as opposed to infinite
impulse response filters,
00:01:47.790 --> 00:01:51.720
are useful for problems
where linear phase is
00:01:51.720 --> 00:01:54.120
an important constraint.
00:01:54.120 --> 00:01:55.330
It turns out also--
00:01:55.330 --> 00:01:57.360
and this isn't a point
that we'll be touching on
00:01:57.360 --> 00:01:58.590
in these lectures--
00:01:58.590 --> 00:02:02.130
but it turns out also that
finite impulse response
00:02:02.130 --> 00:02:05.730
digital filters have
some important advantages
00:02:05.730 --> 00:02:08.130
over infinite impulse
response filters
00:02:08.130 --> 00:02:10.500
with regard to round
off noise, that is,
00:02:10.500 --> 00:02:15.470
with regard to the effects
of finite register length.
00:02:15.470 --> 00:02:18.150
Now in general,
the implementation
00:02:18.150 --> 00:02:21.120
of finite impulse
response filters
00:02:21.120 --> 00:02:25.230
is considerably simpler
for discrete time systems
00:02:25.230 --> 00:02:29.070
than it is for
continuous time systems.
00:02:29.070 --> 00:02:33.840
Consequently, it turns out that
there are not really available,
00:02:33.840 --> 00:02:37.770
or a wide variety of continuous
time design procedures
00:02:37.770 --> 00:02:40.140
for finite impulse
response filters
00:02:40.140 --> 00:02:43.350
as there were for
infinite impulse response.
00:02:43.350 --> 00:02:48.540
And consequently, the continuous
time to discrete time mapping,
00:02:48.540 --> 00:02:52.410
as a design procedure,
is not particularly
00:02:52.410 --> 00:02:55.810
applicable to the design
of finite impulse response
00:02:55.810 --> 00:02:57.060
digital filters.
00:02:57.060 --> 00:03:01.890
So this includes, for example,
the impulse and variant
00:03:01.890 --> 00:03:05.580
technique, and the use of
the bilinear transformation.
00:03:05.580 --> 00:03:09.390
That is, those techniques
are not particularly useful
00:03:09.390 --> 00:03:13.230
when we are talking about
the design of finite impulse
00:03:13.230 --> 00:03:15.480
response filters.
00:03:15.480 --> 00:03:18.810
As an additional
interesting side point,
00:03:18.810 --> 00:03:24.030
if we were to begin with
a finite impulse response
00:03:24.030 --> 00:03:26.640
analog or continuous
time filter,
00:03:26.640 --> 00:03:29.340
and map it to a digital
filter using the bilinear
00:03:29.340 --> 00:03:32.580
transformation, then in
fact the resulting filter
00:03:32.580 --> 00:03:37.560
would not be a finite
impulse response filter.
00:03:37.560 --> 00:03:39.480
The algorithmic
procedures that we
00:03:39.480 --> 00:03:43.110
talked about in the previous
lectures, of course, still
00:03:43.110 --> 00:03:47.850
do apply to the design of
finite impulse response filters.
00:03:47.850 --> 00:03:51.150
And there also are some
other algorithmic procedures
00:03:51.150 --> 00:03:53.160
that are discussed in
the text, and that I
00:03:53.160 --> 00:03:58.800
will touch on just very
briefly in today's lecture.
00:03:58.800 --> 00:04:05.460
Now for the design of finite
impulse response filters,
00:04:05.460 --> 00:04:09.600
there are basically
three classes,
00:04:09.600 --> 00:04:13.140
or three types of
design techniques
00:04:13.140 --> 00:04:15.810
that we'll be discussing.
00:04:15.810 --> 00:04:18.750
And in this lecture,
what I intend to do
00:04:18.750 --> 00:04:22.380
is present the three
of these, primarily
00:04:22.380 --> 00:04:26.550
with an eye toward giving
you an appreciation for what
00:04:26.550 --> 00:04:29.550
the style of the
design techniques is.
00:04:29.550 --> 00:04:33.520
That is, to give you an overview
of these design techniques.
00:04:33.520 --> 00:04:38.470
But I won't dwell on
many of the details.
00:04:38.470 --> 00:04:42.540
So in the design of
finite impulse response
00:04:42.540 --> 00:04:46.110
digital filters,
then, we of course
00:04:46.110 --> 00:04:49.350
are talking about a
unit sample response
00:04:49.350 --> 00:04:51.570
that is a finite length.
00:04:51.570 --> 00:04:56.130
And we'll choose the length,
the interval over which the unit
00:04:56.130 --> 00:05:01.170
sample response is non-zero
to be in the range from 0
00:05:01.170 --> 00:05:03.550
to capital N minus 1.
00:05:03.550 --> 00:05:08.610
So the Z-transform of the
finite impulse response filter
00:05:08.610 --> 00:05:13.860
is then given by the sum from 0
to capital N minus 1 of h of n,
00:05:13.860 --> 00:05:17.880
z to the minus n, which of
course is a polynomial in z
00:05:17.880 --> 00:05:19.390
to the minus 1.
00:05:19.390 --> 00:05:23.250
And we know that, for this
class of systems, h of z
00:05:23.250 --> 00:05:27.240
has only zeros,
except at z equal 0.
00:05:27.240 --> 00:05:31.620
That is, the poles of h of z
can only fall at z equals 0,
00:05:31.620 --> 00:05:33.930
or z equals infinity.
00:05:33.930 --> 00:05:39.420
And I remind you also that for
linear phase finite impulse
00:05:39.420 --> 00:05:43.950
response filters, the constraint
on the unit sample response
00:05:43.950 --> 00:05:48.570
is that it basically is
symmetrical about its midpoint.
00:05:48.570 --> 00:05:50.730
In other words, as we
look at the unit sample
00:05:50.730 --> 00:05:53.740
response starting
from the left hand end
00:05:53.740 --> 00:05:55.760
and starting from
the right hand end,
00:05:55.760 --> 00:06:00.420
approaching toward the middle,
then we see the same values.
00:06:00.420 --> 00:06:02.390
In other words, there's
a symmetry that's
00:06:02.390 --> 00:06:06.290
required for linear phase.
00:06:06.290 --> 00:06:10.340
The three basic
design procedures
00:06:10.340 --> 00:06:12.650
that I'd like to talk
about in this lecture,
00:06:12.650 --> 00:06:15.110
basically introduce
in the lecture,
00:06:15.110 --> 00:06:17.900
are first of all,
a design technique
00:06:17.900 --> 00:06:21.890
which is referred to
as the window method.
00:06:21.890 --> 00:06:24.830
The second design
technique that is commonly
00:06:24.830 --> 00:06:28.780
referred to as the
frequency sampling method.
00:06:28.780 --> 00:06:33.440
And a third designed technique,
which is an algorithmic design
00:06:33.440 --> 00:06:39.020
procedure which results in
equiripple filters, which
00:06:39.020 --> 00:06:41.450
as I'll comment on
again when we get
00:06:41.450 --> 00:06:43.940
to this point in the
lecture, turn out
00:06:43.940 --> 00:06:46.280
to be important
because they have
00:06:46.280 --> 00:06:48.570
some optimality properties.
00:06:48.570 --> 00:06:52.220
So these are the three basic
design techniques, then,
00:06:52.220 --> 00:06:56.370
that I'd like to
discuss in this lecture.
00:06:56.370 --> 00:07:00.800
Well, to begin with,
the window method
00:07:00.800 --> 00:07:09.190
is basically a method based
on the following strategy.
00:07:09.190 --> 00:07:14.650
Let's suppose that we begin the
design of the finite impulse
00:07:14.650 --> 00:07:19.750
response filter with a desired
unit sample response, h sub
00:07:19.750 --> 00:07:20.590
d of n.
00:07:20.590 --> 00:07:22.270
For example, suppose
that we wanted
00:07:22.270 --> 00:07:26.290
to design a low pass filter.
00:07:26.290 --> 00:07:29.260
We could begin with
a desired unit sample
00:07:29.260 --> 00:07:31.840
response which was the
unit sample response
00:07:31.840 --> 00:07:34.400
of an ideal low pass filter.
00:07:34.400 --> 00:07:39.550
Now as you know, the unit sample
response of an ideal low pass
00:07:39.550 --> 00:07:46.180
filter basically has a sin
x over x type of envelope.
00:07:46.180 --> 00:07:48.610
In particular, the
important characteristic
00:07:48.610 --> 00:07:52.400
is that it extends from minus
infinity to plus infinity.
00:07:52.400 --> 00:07:56.410
So in fact, it doesn't
correspond to a finite impulse
00:07:56.410 --> 00:07:57.940
response filter.
00:07:57.940 --> 00:08:01.780
But we could imagine
obtaining the unit sample
00:08:01.780 --> 00:08:09.220
response of an FIR filter
by perhaps truncating
00:08:09.220 --> 00:08:14.020
this infinitely long unit sample
response so that we retain
00:08:14.020 --> 00:08:18.650
only the values in the interval
from 0 to capital N minus 1.
00:08:18.650 --> 00:08:23.890
Or more generally, we can
imagine multiplying the desired
00:08:23.890 --> 00:08:29.020
unit sample response by a
window, the window being
00:08:29.020 --> 00:08:33.559
0 outside the interval from
0 to capital N minus 1.
00:08:33.559 --> 00:08:36.370
So the window method
basically consists
00:08:36.370 --> 00:08:40.059
of beginning with a desired
unit sample response, which
00:08:40.059 --> 00:08:42.000
in general will be
infinitely long,
00:08:42.000 --> 00:08:45.280
or at least longer than the
filter that we want to design.
00:08:45.280 --> 00:08:50.630
We apply to that a window,
which is 0 outside the range 0
00:08:50.630 --> 00:08:53.041
to capital N minus 1.
00:08:53.041 --> 00:08:56.050
And the result then is
the unit sample response
00:08:56.050 --> 00:09:00.020
of the finite impulse
response filter.
00:09:00.020 --> 00:09:04.310
Well, what is the effect of
this in the frequency domain?
00:09:04.310 --> 00:09:07.570
We know that multiplication
in the time domain
00:09:07.570 --> 00:09:11.570
corresponds to convolution
in the frequency domain.
00:09:11.570 --> 00:09:16.600
And consequently, the frequency
response of the finite impulse
00:09:16.600 --> 00:09:22.510
response filter that results,
is the periodic convolution
00:09:22.510 --> 00:09:26.440
of the desired
frequency response.
00:09:26.440 --> 00:09:29.740
That is, the Fourier transform
of the desired unit sample
00:09:29.740 --> 00:09:33.580
response, that convolved
with the Fourier
00:09:33.580 --> 00:09:38.090
transform of the window, w of n
00:09:38.090 --> 00:09:42.460
For example, if we were talking
about a rectangular window,
00:09:42.460 --> 00:09:45.025
and in a rectangular
window, w of n
00:09:45.025 --> 00:09:51.650
is simply constant over the
range 0 to capital N minus 1,
00:09:51.650 --> 00:09:56.200
the magnitude of the Fourier
transform of the window
00:09:56.200 --> 00:10:00.100
has a form roughly as
I've indicated here.
00:10:00.100 --> 00:10:02.710
This is drawn for
the case, N equals 8.
00:10:02.710 --> 00:10:06.370
And it's the magnitude of
h of e to the j omega--
00:10:06.370 --> 00:10:09.400
I'm sorry, of w of
e to the j omega.
00:10:09.400 --> 00:10:11.980
If we were to remove
the magnitude sines,
00:10:11.980 --> 00:10:16.620
then every alternate lobe
would be flipped over in sine.
00:10:16.620 --> 00:10:22.550
So in fact, this is a
sin nx over sin x curve.
00:10:22.550 --> 00:10:27.130
So for the particular case
of a rectangular window,
00:10:27.130 --> 00:10:33.640
we would have not the ideal low
pass filter that we began with,
00:10:33.640 --> 00:10:37.420
but the ideal lowpass filter
frequency characteristic
00:10:37.420 --> 00:10:42.430
convolved with the Fourier
transform of the window.
00:10:42.430 --> 00:10:50.980
So that's depicted here where we
have the ideal low pass filter.
00:10:50.980 --> 00:10:55.720
Superimposed on top of it
is the Fourier transform
00:10:55.720 --> 00:10:59.380
of, in this case, a
rectangular window.
00:10:59.380 --> 00:11:04.390
And then to obtain the
resulting overall frequency
00:11:04.390 --> 00:11:07.750
response of the finite
impulse response filter,
00:11:07.750 --> 00:11:13.240
that would be obtained by
convolving these two together.
00:11:13.240 --> 00:11:16.780
And we can see that the
result of that, very roughly,
00:11:16.780 --> 00:11:20.650
is to, in fact, at
the discontinuity,
00:11:20.650 --> 00:11:25.630
the almost exact effect is to
integrate the window frequency
00:11:25.630 --> 00:11:28.900
response, the frequency
response of the window.
00:11:28.900 --> 00:11:33.400
And the resulting frequency
response for the finite impulse
00:11:33.400 --> 00:11:37.420
response filter then,
as opposed to being
00:11:37.420 --> 00:11:41.770
the ideal characteristic
that we desired, in fact
00:11:41.770 --> 00:11:44.770
has some ripples in it.
00:11:44.770 --> 00:11:50.800
Generally, then, it has some
deviation in the pass band.
00:11:50.800 --> 00:11:53.470
It has some deviation
in the stop band.
00:11:53.470 --> 00:11:57.940
And it has a transition region
from pass band to stop band.
00:11:57.940 --> 00:12:02.890
And that's introduced because of
the convolution of this window
00:12:02.890 --> 00:12:07.000
frequency response with the
desired or ideal frequency
00:12:07.000 --> 00:12:09.380
response.
00:12:09.380 --> 00:12:14.420
Now ideally, what would
we like as the frequency
00:12:14.420 --> 00:12:16.730
response of the window?
00:12:16.730 --> 00:12:19.400
Well, ideally what we
would like, of course,
00:12:19.400 --> 00:12:25.430
is we would like this
function to be an impulse.
00:12:25.430 --> 00:12:26.990
Because if it's an
impulse, then we
00:12:26.990 --> 00:12:29.600
convolve it with the
desired frequency response,
00:12:29.600 --> 00:12:34.640
and the result will again be
the desired frequency response.
00:12:34.640 --> 00:12:39.230
The overshoot that we have in
the pass band and the stop band
00:12:39.230 --> 00:12:44.870
has arisen because of the side
lobe structure of the frequency
00:12:44.870 --> 00:12:47.840
response of the window.
00:12:47.840 --> 00:12:52.190
And the transition region
has arisen because,
00:12:52.190 --> 00:12:56.600
primarily because of the
width of this central lobe.
00:12:56.600 --> 00:13:01.850
So, in fact, if we want to keep
the deviation in the pass band
00:13:01.850 --> 00:13:05.300
and stop band small,
then that implies
00:13:05.300 --> 00:13:07.010
that we would like
to keep the side lobe
00:13:07.010 --> 00:13:11.870
structure of the window
small, the window frequency
00:13:11.870 --> 00:13:14.090
response small.
00:13:14.090 --> 00:13:17.180
And if we would like to keep
the transition band narrow,
00:13:17.180 --> 00:13:22.970
that implies that we would like
to keep this main lobe narrow.
00:13:22.970 --> 00:13:27.170
And as I think that
your intuition should
00:13:27.170 --> 00:13:30.710
agree with by now,
generally, an attempt
00:13:30.710 --> 00:13:35.960
to make this function
narrower in frequency
00:13:35.960 --> 00:13:39.410
will have the general
effect of making
00:13:39.410 --> 00:13:41.780
the window longer in time.
00:13:41.780 --> 00:13:49.010
So that, in fact, as we try to
make the time window, w of n,
00:13:49.010 --> 00:13:51.890
or equivalently, the order of
the finite impulse response
00:13:51.890 --> 00:13:56.030
filter smaller,
the tendency will
00:13:56.030 --> 00:14:00.950
be toward a widening transition
band in the frequency
00:14:00.950 --> 00:14:03.110
response of the filter.
00:14:03.110 --> 00:14:06.920
Likewise, as we allow the order
of the filter to get longer,
00:14:06.920 --> 00:14:09.350
we have more flexibility
in the filter.
00:14:09.350 --> 00:14:13.250
And consequently, we're able to
control better the transition
00:14:13.250 --> 00:14:15.830
band and the overshoot
in both the pass band
00:14:15.830 --> 00:14:17.111
and in the stop band.
00:14:20.200 --> 00:14:23.620
Well, in particular,
again continuing
00:14:23.620 --> 00:14:28.240
with the example of
a rectangular window,
00:14:28.240 --> 00:14:31.060
if we look at the
frequency-- the unit sample
00:14:31.060 --> 00:14:38.980
response for the case
of an ideal low pass
00:14:38.980 --> 00:14:46.180
filter multiplied by a 51
point rectangular window,
00:14:46.180 --> 00:14:50.630
then the unit sample response
we obtain is as indicated here.
00:14:50.630 --> 00:14:53.980
Actually, I've marked this
as the desired unit sample
00:14:53.980 --> 00:14:55.060
response.
00:14:55.060 --> 00:14:58.090
It's only equal to the
desired unit sample response
00:14:58.090 --> 00:15:01.840
in the interval from 0 to 50.
00:15:01.840 --> 00:15:04.220
And the desired unit
sample response, of course,
00:15:04.220 --> 00:15:07.330
continues to be non-zero
outside that range.
00:15:07.330 --> 00:15:09.910
Whereas multiplying by
a rectangular window
00:15:09.910 --> 00:15:14.530
truncates it to be 0
outside this range.
00:15:14.530 --> 00:15:20.230
The resulting frequency response
for this particular example
00:15:20.230 --> 00:15:22.070
I've indicated here.
00:15:22.070 --> 00:15:28.930
And as opposed to the
previous frequency response
00:15:28.930 --> 00:15:32.380
that I depicted, this is shown
on a logarithmic frequency
00:15:32.380 --> 00:15:33.310
scale.
00:15:33.310 --> 00:15:35.380
There, in fact, is some
ripple in the pass band,
00:15:35.380 --> 00:15:38.920
although it's not evident on
a logarithmic frequency scale.
00:15:38.920 --> 00:15:44.890
But generally, you can see the
effect of a transition band,
00:15:44.890 --> 00:15:50.650
and then a side lobe
structure in the stop band.
00:15:50.650 --> 00:15:56.260
And you can see also that the
asymptotic behavior of this
00:15:56.260 --> 00:15:57.220
is--
00:15:57.220 --> 00:16:00.190
in the vicinity for this
particular example--
00:16:00.190 --> 00:16:04.750
is in the vicinity of minus
20 dB attenuation in the stop
00:16:04.750 --> 00:16:06.880
band.
00:16:06.880 --> 00:16:11.920
So this then is an example
of a low pass filter that
00:16:11.920 --> 00:16:15.640
could be obtained by
applying a rectangular window
00:16:15.640 --> 00:16:19.640
to the ideal low pass filter.
00:16:19.640 --> 00:16:24.940
There are other possible
choices for windows.
00:16:24.940 --> 00:16:30.460
In particular, two other
choices that I'd like to mention
00:16:30.460 --> 00:16:34.570
are what are referred
to as the Hamming window
00:16:34.570 --> 00:16:36.760
and the Bartlett window.
00:16:39.530 --> 00:16:42.170
As opposed to the
rectangular window,
00:16:42.170 --> 00:16:46.140
the Bartlett window is
a triangular window,
00:16:46.140 --> 00:16:48.470
which has the effect
basically of making
00:16:48.470 --> 00:16:52.610
the transition at the ends
of the unit sample response
00:16:52.610 --> 00:16:57.920
less abrupt than they are in the
case of a rectangular window.
00:16:57.920 --> 00:17:04.849
The Hamming window is a window
which corresponds essentially
00:17:04.849 --> 00:17:11.099
to a cosine bell sitting
on a small pedestal.
00:17:11.099 --> 00:17:15.650
So for this particular example,
again, the low pass filter,
00:17:15.650 --> 00:17:18.079
the ideal low pass
filter windowed,
00:17:18.079 --> 00:17:21.470
we can compare the
frequency response obtained
00:17:21.470 --> 00:17:24.020
with the Bartlett
window to that obtained
00:17:24.020 --> 00:17:27.869
with the rectangular window, and
also with the Hamming window.
00:17:27.869 --> 00:17:32.130
So let's take a look at that.
00:17:32.130 --> 00:17:35.480
Here we have the
frequency response
00:17:35.480 --> 00:17:37.760
of the Bartlett window.
00:17:37.760 --> 00:17:41.870
And you can see generally
that the ripples aren't
00:17:41.870 --> 00:17:44.810
as severe in the
stop band as they
00:17:44.810 --> 00:17:47.600
were in the case of
the rectangular window.
00:17:47.600 --> 00:17:51.350
And in fact, we can
compare these simply
00:17:51.350 --> 00:17:59.600
by referring back to the
rectangular window frequency
00:17:59.600 --> 00:18:02.430
response that we had previously.
00:18:02.430 --> 00:18:08.330
So the rectangular window lies
slightly under, or actually
00:18:08.330 --> 00:18:11.630
asymptotically touches the
frequency response obtained
00:18:11.630 --> 00:18:13.370
from the Bartlett window.
00:18:13.370 --> 00:18:17.810
But for the Bartlett window,
the ripples in the stop band
00:18:17.810 --> 00:18:23.690
aren't as severe as they are
for the rectangular window.
00:18:23.690 --> 00:18:29.150
Now to compare both of
these to the Hamming window,
00:18:29.150 --> 00:18:34.460
we can put on top of this
the frequency response
00:18:34.460 --> 00:18:36.590
for the Hamming window.
00:18:40.400 --> 00:18:46.030
And in this case, you can see
that the frequency response
00:18:46.030 --> 00:18:50.410
obtained with the Hamming window
applied to a low pass filter
00:18:50.410 --> 00:18:54.670
has considerably better
stop band attenuation
00:18:54.670 --> 00:18:57.490
than either the rectangular
or the Bartlett window.
00:18:57.490 --> 00:19:01.840
In particular, it comes down
to about minus 30 or minus 32
00:19:01.840 --> 00:19:04.300
or so dB.
00:19:04.300 --> 00:19:06.550
There is a slight
price paid for this.
00:19:06.550 --> 00:19:11.320
And the price is, as you
notice, that the transition band
00:19:11.320 --> 00:19:15.340
is slightly wider than it is
for either of the other two
00:19:15.340 --> 00:19:16.900
windows.
00:19:16.900 --> 00:19:21.970
And in general, this
is a type of trade off
00:19:21.970 --> 00:19:27.250
that arises again and again
in the design of-- actually,
00:19:27.250 --> 00:19:30.970
always in the design of
digital or analog filters.
00:19:30.970 --> 00:19:33.760
In particular, in
using windows, there
00:19:33.760 --> 00:19:40.420
is always this trade off between
improved stop band attenuation
00:19:40.420 --> 00:19:45.070
and a narrower-- or wider,
rather-- transition band.
00:19:45.070 --> 00:19:48.490
As you are willing to
allow the transition
00:19:48.490 --> 00:19:51.970
band to become wider,
you can generally
00:19:51.970 --> 00:19:56.540
obtain some advantage in terms
of stop band attenuation.
00:19:56.540 --> 00:19:57.040
All right.
00:19:57.040 --> 00:20:03.400
So this is a quick view
into the use of windows.
00:20:03.400 --> 00:20:06.760
In the text, in fact, there
are quite a large number
00:20:06.760 --> 00:20:10.290
of windows that are discussed,
besides the rectangular,
00:20:10.290 --> 00:20:12.580
the Bartlett, and
the Hamming window.
00:20:12.580 --> 00:20:18.550
And similar frequency
responses for filters
00:20:18.550 --> 00:20:21.780
designed using a
variety of these windows
00:20:21.780 --> 00:20:22.835
is presented in the text.
00:20:25.740 --> 00:20:31.140
The next design procedure
that I would like to discuss
00:20:31.140 --> 00:20:37.200
is the design procedure that
is referred to as the frequency
00:20:37.200 --> 00:20:39.720
sampling design procedure.
00:20:39.720 --> 00:20:44.670
And basically, the idea
behind that procedure
00:20:44.670 --> 00:20:51.000
is to argue that if we
have a desired frequency
00:20:51.000 --> 00:20:55.620
response, which I've indicated
by the continuous line--
00:20:55.620 --> 00:20:58.260
a desired frequency response--
00:20:58.260 --> 00:21:02.430
then we could think of
designing a digital filter
00:21:02.430 --> 00:21:08.940
by specifying samples
of the desired frequency
00:21:08.940 --> 00:21:12.480
response at equally spaced
points along the frequency
00:21:12.480 --> 00:21:13.620
axis.
00:21:13.620 --> 00:21:16.110
Now we know that for a
finite impulse response
00:21:16.110 --> 00:21:17.400
digital filter--
00:21:17.400 --> 00:21:19.950
in general, for any
finite length sequence--
00:21:19.950 --> 00:21:23.700
we can represent it in terms
of samples of its Fourier
00:21:23.700 --> 00:21:24.930
transform.
00:21:24.930 --> 00:21:28.060
That, in fact, is the
discrete Fourier transform.
00:21:28.060 --> 00:21:30.810
So basically what
we're saying is
00:21:30.810 --> 00:21:36.150
that we can begin with a
desired frequency response
00:21:36.150 --> 00:21:40.770
and specify the discrete Fourier
transform of the finite impulse
00:21:40.770 --> 00:21:45.810
response filter by specifying
equally spaced samples
00:21:45.810 --> 00:21:48.780
of the desired
frequency response.
00:21:48.780 --> 00:21:53.880
So we have then that the
actual frequency response
00:21:53.880 --> 00:21:57.990
will correspond to
capital N samples, equally
00:21:57.990 --> 00:22:02.040
spaced in frequency, of the
desired frequency response
00:22:02.040 --> 00:22:04.690
characteristic.
00:22:04.690 --> 00:22:11.400
Now one could say that, or one
could inquire as to whether,
00:22:11.400 --> 00:22:15.540
in fact, if we do that,
what we're able to implement
00:22:15.540 --> 00:22:20.610
is the desired digital
filter frequency response.
00:22:20.610 --> 00:22:24.120
In other words, we know that we
can implement a finite impulse
00:22:24.120 --> 00:22:31.860
response filter by using
only the values specified
00:22:31.860 --> 00:22:34.440
in the discrete
Fourier transform.
00:22:34.440 --> 00:22:38.450
And here we've specified a
discrete Fourier transform
00:22:38.450 --> 00:22:42.990
that's unity in the pass band
and it's zero in the stop band.
00:22:42.990 --> 00:22:45.660
And one can ask,
well, in fact, is
00:22:45.660 --> 00:22:50.440
that an ideal digital
low pass filter?
00:22:50.440 --> 00:22:53.020
Well, the answer to that is no.
00:22:53.020 --> 00:22:57.930
And the reason is that it
is important, very important
00:22:57.930 --> 00:23:04.350
to keep track of the fact
that just because we specify
00:23:04.350 --> 00:23:08.310
the frequency response
at equally spaced points
00:23:08.310 --> 00:23:12.390
along the frequency
axis doesn't mean
00:23:12.390 --> 00:23:15.750
that, in between those
points, the frequency
00:23:15.750 --> 00:23:18.900
characteristic has to be
particularly well-behaved.
00:23:18.900 --> 00:23:24.840
That is, the Fourier transform
of the unit sample response
00:23:24.840 --> 00:23:27.720
is a continuous
function of frequency.
00:23:27.720 --> 00:23:30.870
We're specifying samples
of that continuous function
00:23:30.870 --> 00:23:32.290
of frequency.
00:23:32.290 --> 00:23:36.390
And there is implied
an interpolation
00:23:36.390 --> 00:23:39.620
in between those samples.
00:23:39.620 --> 00:23:43.730
Well, in fact, if we were
to look at a unit sample
00:23:43.730 --> 00:23:51.810
response whose discrete Fourier
transform magnitude is unity
00:23:51.810 --> 00:23:55.540
in the pass band and
zero in the stop band,
00:23:55.540 --> 00:24:02.340
one possible choice, in fact,
is the unit sample response
00:24:02.340 --> 00:24:05.790
and frequency response
that I've indicated here.
00:24:05.790 --> 00:24:09.310
This is the unit
sample response.
00:24:09.310 --> 00:24:12.770
This is the corresponding
frequency response.
00:24:12.770 --> 00:24:17.400
The discrete Fourier
transform of h of n, in fact,
00:24:17.400 --> 00:24:21.720
is exactly unity in the pass
band and zero in the stop band.
00:24:21.720 --> 00:24:24.960
But the interpolation
in between those points
00:24:24.960 --> 00:24:28.710
is not unity in the pass band
and zero in the stop band.
00:24:28.710 --> 00:24:33.840
In fact, by simply putting
the previous view graph
00:24:33.840 --> 00:24:43.800
on top of this one, we can see
that this frequency response
00:24:43.800 --> 00:24:50.580
characteristic indeed goes
through the specified frequency
00:24:50.580 --> 00:24:52.050
points.
00:24:52.050 --> 00:24:56.760
But it is not particularly
well constrained
00:24:56.760 --> 00:24:59.020
in between those points.
00:24:59.020 --> 00:25:03.390
So, in fact, for one
example, if we chose this
00:25:03.390 --> 00:25:06.180
as the unit sample
response corresponding
00:25:06.180 --> 00:25:08.580
to this set of
frequency samples,
00:25:08.580 --> 00:25:12.540
the resulting frequency response
of the finite impulse response
00:25:12.540 --> 00:25:16.920
low pass filter would
be as we've indicated
00:25:16.920 --> 00:25:20.770
with this continuous curve.
00:25:20.770 --> 00:25:23.730
Well, we know that there
are other unit sample
00:25:23.730 --> 00:25:27.630
responses whose discrete
Fourier transforms are
00:25:27.630 --> 00:25:29.332
exactly the same.
00:25:29.332 --> 00:25:31.290
The magnitude of the
discrete Fourier transform
00:25:31.290 --> 00:25:33.960
is exactly the same as this one.
00:25:33.960 --> 00:25:37.840
In particular, we know that if
we were to circularly rotate
00:25:37.840 --> 00:25:43.470
h of n, circularly shift
h of n, the magnitude
00:25:43.470 --> 00:25:45.690
of the discrete
Fourier transform
00:25:45.690 --> 00:25:47.920
would remain exactly the same.
00:25:47.920 --> 00:25:51.420
So in fact, another
unit sample response
00:25:51.420 --> 00:25:56.370
that would correspond to a
frequency response, which
00:25:56.370 --> 00:26:00.690
likewise goes through the
same frequency samples,
00:26:00.690 --> 00:26:04.995
is the one that we have here.
00:26:07.580 --> 00:26:10.880
This unit sample response
is simply the previous one,
00:26:10.880 --> 00:26:15.170
circularly shifted by
approximately n over 2,
00:26:15.170 --> 00:26:17.330
or n minus 1 over 2.
00:26:17.330 --> 00:26:20.780
And in this case, the frequency
response characteristic
00:26:20.780 --> 00:26:24.750
is even worse than it was
in the previous example.
00:26:24.750 --> 00:26:27.290
So here we have a
frequency response
00:26:27.290 --> 00:26:31.790
that has very wild, large
fluctuations in the pass band,
00:26:31.790 --> 00:26:36.350
and even in the stop
band, but still goes
00:26:36.350 --> 00:26:39.410
through the same
frequency samples
00:26:39.410 --> 00:26:42.210
that we had
specified previously.
00:26:42.210 --> 00:26:46.160
And we can see that
by, again, putting
00:26:46.160 --> 00:26:48.090
these two on top of each other.
00:26:54.240 --> 00:26:57.560
And you can see,
in this case again,
00:26:57.560 --> 00:27:00.770
that this frequency
characteristic
00:27:00.770 --> 00:27:05.330
goes through the specified
frequency samples.
00:27:05.330 --> 00:27:10.171
But it has a very wild
behavior in between.
00:27:10.171 --> 00:27:10.670
All right.
00:27:10.670 --> 00:27:14.750
So the frequency sampling
method, then, is basically
00:27:14.750 --> 00:27:19.550
a method that consists
of specifying samples
00:27:19.550 --> 00:27:24.650
of the frequency
response, and then
00:27:24.650 --> 00:27:28.850
accepting the interpolation
in between those samples
00:27:28.850 --> 00:27:34.040
that is dictated by the form
of the unit sample response.
00:27:34.040 --> 00:27:38.780
And I stress that one has to
be careful in the phase that's
00:27:38.780 --> 00:27:40.550
applied to this,
or equivalently,
00:27:40.550 --> 00:27:43.400
the circular shift that's
applied to the unit sample
00:27:43.400 --> 00:27:46.910
response, since as we've
seen in the last several view
00:27:46.910 --> 00:27:49.940
graphs, that very
seriously affects
00:27:49.940 --> 00:27:53.810
the interpolation in between
these frequency points.
00:27:53.810 --> 00:27:57.170
Furthermore, an additional
point has been made,
00:27:57.170 --> 00:28:03.110
and that is that it is not--
even though we can implement
00:28:03.110 --> 00:28:06.080
a finite impulse
response filter using
00:28:06.080 --> 00:28:11.440
the discrete Fourier transform,
specifying the discrete Fourier
00:28:11.440 --> 00:28:14.000
transform to be unity
in the pass band
00:28:14.000 --> 00:28:17.060
and zero in the
stop band does not
00:28:17.060 --> 00:28:22.690
mean that we've implemented
an ideal low pass filter.
00:28:22.690 --> 00:28:23.190
All right.
00:28:23.190 --> 00:28:26.720
Well, we had-- this, of
course, is not a unit sample
00:28:26.720 --> 00:28:30.920
response that we would be
particularly anxious to use.
00:28:30.920 --> 00:28:33.980
Clearly, the behavior in
the pass band and stop band
00:28:33.980 --> 00:28:36.830
is very severe, and
in fact, too severe.
00:28:36.830 --> 00:28:41.210
So we could at least consider
as somewhat reasonable
00:28:41.210 --> 00:28:43.790
the unit sample
response and frequency
00:28:43.790 --> 00:28:48.560
response that we had
previously, in this case,
00:28:48.560 --> 00:28:49.910
relatively well-behaved.
00:28:49.910 --> 00:28:52.400
That is, it ripples
somewhat in the pass band
00:28:52.400 --> 00:28:55.130
and in the stop band.
00:28:55.130 --> 00:28:58.340
But now we could inquire
as to whether there
00:28:58.340 --> 00:29:04.700
is some way of improving the
pass band ripple and the stop
00:29:04.700 --> 00:29:06.320
band ripple.
00:29:06.320 --> 00:29:09.500
We know, or we anticipate,
that there's a price that we
00:29:09.500 --> 00:29:11.240
would have to pay for that.
00:29:11.240 --> 00:29:13.790
Probably the price,
and indeed it
00:29:13.790 --> 00:29:16.400
turns out that the
price we have to pay
00:29:16.400 --> 00:29:20.780
is the price of widening
the transition band.
00:29:20.780 --> 00:29:23.480
Well, how could we widen
the transition band?
00:29:23.480 --> 00:29:28.080
We could imagine beginning
with this particular design,
00:29:28.080 --> 00:29:34.460
taking as one possibility one
of the stop band constrained
00:29:34.460 --> 00:29:35.660
points.
00:29:35.660 --> 00:29:39.620
And allow it to move
into the transition band
00:29:39.620 --> 00:29:42.980
so that, in fact, we
have a wider frequency
00:29:42.980 --> 00:29:47.210
range that we're permitting
the transition from pass band
00:29:47.210 --> 00:29:50.360
to stop band to go to.
00:29:50.360 --> 00:30:00.800
And let me illustrate that
here, where now what we've done
00:30:00.800 --> 00:30:17.400
is to take one of the frequency
samples in the stop band,
00:30:17.400 --> 00:30:20.790
move it up into the
transition band.
00:30:20.790 --> 00:30:25.410
And as we do that, you can see
for this particular example,
00:30:25.410 --> 00:30:29.550
the pass band ripple
hasn't changed too much.
00:30:29.550 --> 00:30:31.590
But in fact, the
stop band ripple
00:30:31.590 --> 00:30:34.380
has changed somewhat
dramatically.
00:30:34.380 --> 00:30:38.490
As we allow this transition
point to move farther up
00:30:38.490 --> 00:30:41.430
into the transition
band, basically widening
00:30:41.430 --> 00:30:44.370
the general pass band
region, what we'll see
00:30:44.370 --> 00:30:48.990
is that the pass band ripple
become somewhat smaller.
00:30:48.990 --> 00:30:51.420
And there, in fact,
is a trade off
00:30:51.420 --> 00:30:55.680
that is introduced between the
pass band ripple and the stop
00:30:55.680 --> 00:30:56.760
band ripple.
00:30:56.760 --> 00:31:04.620
And let me illustrate that
with this next example, where
00:31:04.620 --> 00:31:10.110
in this case, we have moved the
transition point up somewhat
00:31:10.110 --> 00:31:10.610
further.
00:31:16.920 --> 00:31:19.590
So that whereas in
the previous case
00:31:19.590 --> 00:31:22.470
the transition point
was someplace down here,
00:31:22.470 --> 00:31:25.380
we've now moved it farther up
into the transition region,
00:31:25.380 --> 00:31:27.870
closer to the pass band.
00:31:27.870 --> 00:31:32.820
And the pass band ripple has
become correspondingly smaller.
00:31:32.820 --> 00:31:37.080
So this, in fact, is
a design technique
00:31:37.080 --> 00:31:44.010
that can be used for the design
of, generally, band frequency
00:31:44.010 --> 00:31:49.350
selective filters, where
we first of all specify
00:31:49.350 --> 00:31:50.970
frequency samples.
00:31:50.970 --> 00:31:52.500
In fact, this can
be used, really,
00:31:52.500 --> 00:31:56.190
for the design of any
digital filter characteristic
00:31:56.190 --> 00:31:58.800
with transition regions.
00:31:58.800 --> 00:32:04.500
And then, perhaps, [AUDIO OUT]
reducing the ripple in the pass
00:32:04.500 --> 00:32:07.650
band and/or the stop band,
or in the various bands,
00:32:07.650 --> 00:32:12.540
by allowing an additional
point to be used
00:32:12.540 --> 00:32:14.640
to widen the transition band.
00:32:14.640 --> 00:32:17.370
And as we move this
point up or down,
00:32:17.370 --> 00:32:21.320
then, we will reduce the pass
band and the stop band ripple.
00:32:21.320 --> 00:32:25.230
We can also, of course, consider
moving not just one point
00:32:25.230 --> 00:32:28.170
into the transition region,
but two points or three
00:32:28.170 --> 00:32:29.760
points or more points.
00:32:29.760 --> 00:32:34.260
Obviously, as we do that, we
will widen the transition band
00:32:34.260 --> 00:32:35.250
further.
00:32:35.250 --> 00:32:38.670
And at the same
time, that offers
00:32:38.670 --> 00:32:41.430
some additional
flexibility, which
00:32:41.430 --> 00:32:45.300
permits us to reduce the pass
band and stop band ripple.
00:32:45.300 --> 00:32:49.800
So this then is
basically the strategy
00:32:49.800 --> 00:32:57.060
in the frequency sampling
method of digital filter design.
00:32:57.060 --> 00:32:59.460
The final method
that I would like
00:32:59.460 --> 00:33:04.510
to touch on just very
briefly is a method
00:33:04.510 --> 00:33:08.970
which I referred to at the
beginning of this lecture
00:33:08.970 --> 00:33:12.300
as an equiripple design method.
00:33:12.300 --> 00:33:15.690
And basically,
the notion here is
00:33:15.690 --> 00:33:21.330
that we've seen that
there is a trade off
00:33:21.330 --> 00:33:24.820
between the transition
region on the one hand,
00:33:24.820 --> 00:33:28.350
and pass band and stop band
ripple on the other hand.
00:33:28.350 --> 00:33:31.920
Well, one could inquire
as to whether, in at least
00:33:31.920 --> 00:33:35.070
in some sense, we could
design for ourselves
00:33:35.070 --> 00:33:37.890
an optimum class of filters.
00:33:37.890 --> 00:33:40.710
And indeed, you can.
00:33:40.710 --> 00:33:44.010
And in fact, it's
possible to show
00:33:44.010 --> 00:33:49.980
that the optimum strategy in
terms of minimizing pass band
00:33:49.980 --> 00:33:53.250
or stop band ripple, or in
terms of minimizing a transition
00:33:53.250 --> 00:33:59.340
band, is to design the filter
to have an equiripple frequency
00:33:59.340 --> 00:34:02.070
response characteristic.
00:34:02.070 --> 00:34:07.200
Well, one way of setting up
the optimal condition-- and it
00:34:07.200 --> 00:34:09.659
turns out that there
are a variety of ways,
00:34:09.659 --> 00:34:13.870
and these are discussed in quite
a bit more detail in the text.
00:34:13.870 --> 00:34:18.360
But for example, if we
pick a pass band cutoff
00:34:18.360 --> 00:34:22.469
frequency and a stop
band cutoff frequency.
00:34:22.469 --> 00:34:25.860
Furthermore, if
we, of course, are
00:34:25.860 --> 00:34:28.230
going to allow some
deviation in the pass band
00:34:28.230 --> 00:34:32.260
and some deviation in the
stop band, if in addition,
00:34:32.260 --> 00:34:39.030
we fix the ratio of stop
band to pass band ripple,
00:34:39.030 --> 00:34:42.989
and if we then inquire as to
what sort of characteristic
00:34:42.989 --> 00:34:47.159
should result if
delta 1, the pass band
00:34:47.159 --> 00:34:49.949
ripple, or
equivalently, delta 2,
00:34:49.949 --> 00:34:52.949
the stop band ripple
is minimized--
00:34:52.949 --> 00:34:55.889
this should be delta 2--
00:34:55.889 --> 00:35:00.240
so if delta 1 and
delta 2 are minimized,
00:35:00.240 --> 00:35:04.110
it turns out it can be
shown that that implies
00:35:04.110 --> 00:35:08.190
an equiripple characteristic
in the pass band,
00:35:08.190 --> 00:35:11.790
and an equiripple
characteristic in the stop band.
00:35:11.790 --> 00:35:14.130
That is, the ripples
in the pass band
00:35:14.130 --> 00:35:18.660
should alternate between
the upper and lower limits.
00:35:18.660 --> 00:35:21.030
And the ripples in
a stop band should
00:35:21.030 --> 00:35:24.890
alternate between the
upper and lower limits.
00:35:24.890 --> 00:35:29.580
In the text, there are discussed
several algorithmic procedures
00:35:29.580 --> 00:35:32.040
for actually designing
equiripple filters.
00:35:32.040 --> 00:35:35.190
We won't go through those
details in this lecture.
00:35:35.190 --> 00:35:37.230
Mainly, I want to
emphasize the point
00:35:37.230 --> 00:35:41.700
that there are procedures that
allow you to implement designs
00:35:41.700 --> 00:35:42.840
of this type.
00:35:42.840 --> 00:35:47.010
And that designs of
this type are optimum.
00:35:47.010 --> 00:35:54.240
Let me just show you one example
of an optimum equiripple finite
00:35:54.240 --> 00:35:59.400
impulse response filter that
was designed when our computer
00:35:59.400 --> 00:36:02.880
budget was particularly big.
00:36:02.880 --> 00:36:08.640
This is an example of a length
251 point finite impulse
00:36:08.640 --> 00:36:12.450
response digital
filter, designed
00:36:12.450 --> 00:36:16.950
using one of the algorithms
that is discussed in the text.
00:36:16.950 --> 00:36:22.440
And you can see that, indeed,
the equiripple characteristics
00:36:22.440 --> 00:36:26.130
are evident in the pass band.
00:36:26.130 --> 00:36:29.850
This curve corresponds to
the frequency characteristics
00:36:29.850 --> 00:36:32.430
plotted in dB.
00:36:32.430 --> 00:36:35.160
So the pass band
ripple doesn't show up.
00:36:35.160 --> 00:36:38.520
So with that scale expanded,
we can see the ripple.
00:36:38.520 --> 00:36:43.260
And then we have the
ripple in the stop band.
00:36:43.260 --> 00:36:47.230
There should be 125
ripples all together.
00:36:47.230 --> 00:36:49.609
And in fact, we could
see if that was true.
00:36:49.609 --> 00:36:51.150
We could [AUDIO OUT]
one, two, three.
00:36:51.150 --> 00:36:53.700
But let's not do that.
00:36:53.700 --> 00:36:57.030
Obviously, there's a very
sharp transition band.
00:36:57.030 --> 00:37:02.130
And what turns out to be
minus approximately 80--
00:37:02.130 --> 00:37:07.230
approximately minus 85 dB
attenuation in the stop band.
00:37:07.230 --> 00:37:13.230
So this is an example of a very
high order equiripple optimum
00:37:13.230 --> 00:37:16.620
finite impulse response
digital filter that
00:37:16.620 --> 00:37:19.675
was designed using one of
the algorithms discussed
00:37:19.675 --> 00:37:20.175
in the text.
00:37:23.590 --> 00:37:24.090
OK.
00:37:24.090 --> 00:37:29.880
Well, this, as I indicated at
the beginning of the lecture,
00:37:29.880 --> 00:37:36.390
was intended primarily
as a very brief overview
00:37:36.390 --> 00:37:40.500
of finite impulse response
digital filter design.
00:37:40.500 --> 00:37:44.850
Hopefully, it gives
you some appreciation
00:37:44.850 --> 00:37:47.880
for the style of the
design techniques.
00:37:47.880 --> 00:37:51.450
There are, of course, a
large number of details,
00:37:51.450 --> 00:37:54.450
some of which are discussed
in the text and some of which
00:37:54.450 --> 00:37:55.800
aren't.
00:37:55.800 --> 00:38:00.660
But in any case, this, then,
concludes our discussion
00:38:00.660 --> 00:38:04.110
of the design of
infinite impulse response
00:38:04.110 --> 00:38:07.500
and finite impulse
response digital filters.
00:38:07.500 --> 00:38:12.300
In the next lecture, we will
begin a new topic, specifically
00:38:12.300 --> 00:38:14.940
the topic involving
the computation
00:38:14.940 --> 00:38:17.050
of the discrete
Fourier transform.
00:38:17.050 --> 00:38:18.810
Thank you.