# Lecture 12, Filtering | MIT RES.6.007 Signals and Systems, Spring 2011

The following content is provided under a Creative Commons license Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free To make a donation or view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu PROFESSOR: In discussing the continuous-time and discrete-time Fourier transforms, we developed a number of important properties Two particularly significant ones, as I mentioned at the time, are the modulation property and the convolution property Starting with the next lecture, the one after this one, we’ll be developing and exploiting some of the consequences of the modulation property In today’s lecture though, I’d like to review and expand on the notion of filtering, which, as I had mentioned, flows more or less directly from the convolution property To begin, let me just quickly review what the convolution property is Both for continuous-time and for discrete-time, the convolution property tells us that the Fourier transform of the convolution of two time functions is the product of the Fourier transforms Now, what this means in terms of linear time-invariant filters, since we know that in the time domain the output of a linear time-invariant filter is the convolution of the input and the impulse response, it says essentially then in the frequency domain that the Fourier transform of the output is the product the Fourier transform of the impulse response, namely the frequency response, and the Fourier transform of the input So the output is described through that product Now, recall also that in developing the Fourier transform, I interpreted the Fourier transform as the complex amplitude of a decomposition of the signal in terms of a set of complex exponentials And the frequency response or the convolution property, in effect, tells us how to modify the amplitudes of each of those complex exponentials as they go through the system Now, this led to the notion of filtering, where the basic concept was that since we can modify the amplitudes of each of the complex exponential components separately, we can, for example, retain some of them and totally eliminate others And this is the basic notion of filtering So we have, as you recall, first of all the notion in continuous-time of an ideal filter, for example, I illustrate here an ideal lowpass filter where we pass exactly frequency components in one band and reject totally frequency components in another band The band being passed, of course, referred to as the passband, and the band rejected as the stopband I illustrated here a lowpass filter We can, of course, reject the low frequencies and retain the high frequencies And that then corresponds to an ideal highpass filter Or we can just retain frequencies within a band And so I show below what is referred to commonly as a bandpass filter Now, this is what the ideal filters looked like for continuous-time For discrete-time, we have exactly the same situation Namely, we have an ideal discrete-time lowpass filter, which passes exactly frequencies which are the low frequencies Low frequencies, of course, being around 0, and because of the periodicity, also around 2pi We show also an ideal highpass filter And a highpass filter, as I indicated last time, passes

frequencies around pi And finally, below that, I show an ideal bandpass filter passing frequencies someplace in the range between 0 and pi And recall also that the basic difference between continuous-time a discrete-time for these filters is that the discrete-time versions are, of course, periodic in frequency Now, let’s look at these ideal filters, and in particular the ideal lowpass filter in the time domain We have the frequency response of the ideal lowpass filter And shown below it is the impulse response So here is the frequency response and below it the impulse response of the ideal lowpass filter And this, of course, is a sine x over x form of impulse response And recognize also or recall that since this frequency response is real-valued, the impulse response, in other words, the inverse transform is an even function of time And notice also, since I want to refer back to this, that the impulse response of an ideal lowpass filter, in fact, is non-causal That follows, from among other things, from the fact that it’s an even function But keep in mind, in fact, that a sine x over x function goes off to infinity in both directions So the impulse response of the ideal lowpass filter is symmetric and continues to have tails off to plus and minus infinity Now, the situation is basically the same in the discrete-time case Let’s look at the frequency response and associated impulse response for an ideal discrete-time lowpass filter So once again, here is the frequency response of the ideal lowpass filter And below what I show the impulse response Again, it’s a sine x over x type of impulse response And again, we recognize that since in the frequency domain, this frequency response is real-valued That means, as a consequence of the properties of the Fourier transform and inverse Fourier transform, that the impulse response is an even function in the time domain And also, incidentally, the sine x over x function goes off to infinity, again, in both directions Now, we’ve talked about ideal filters in this discussion And ideal filters all are, in fact, ideal in a certain sense What they do ideally is they pass a certain band of frequencies exactly and they reject a band of frequencies exactly On the other hand, there are many filtering problems in which, generally, we don’t have a sharp distinction between the frequencies we want to pass and the frequencies we want to reject One example of this that’s elaborated on in the text is the design of an automotive suspension system, which, in fact, is the design of a lowpass filter And basically what you want to do in a case like that is filter out or attenuate very rapid road variations and keep the lower variations in, of course, elevation of the highway or road And what you can see intuitively is that there isn’t really a very sharp distinction or sharp cut-off between what you would logically call the low frequencies and what you would call the high frequencies Now, also somewhat related to this is the fact that as we’ve seen in the time domain, these ideal filters have a very particular kind of character For example, let’s look back at the ideal lowpass filter And we saw the impulse response The impulse response is what we had shown here Let’s now look at the step response of the discrete-time ideal lowpass filter And notice the fact that it has a tail that oscillates And when the step hits, in fact, it has an oscillatory behavior Now, exactly the same situation occurs in continuous-time Let’s look at the step response of the

continuous-time ideal lowpass filter And what we see is that when a step hits then, in fact, we get an oscillation And very often, that oscillation is something that’s undesirable For example, if you were designing an automotive suspension system and you hit a curve, which is a step input, in fact, you probably would not like to have the automobile oscillating, dying down in oscillation Now there’s another very important point, which again, we can see either in continuous-time or discrete-time, which is that even if we want it to have an ideal filter, the ideal filter has another problem if we want to attempt to implement it in real time What’s the problem? The problem is that since the impulse response is even and, in fact, has tails that go off to plus and minus infinity, it’s non-causal So if, in fact, we want to build a filter and the filter is restricted to operate in real time, then, in fact, we can’t build an ideal filter So what that says is that, in practice, although ideal filters are nice to think about and perhaps relate to practical problems, more typically what we consider are nonideal filters and in the discrete-time case, a nonideal filter then we would have a characteristic somewhat like I’ve indicated here Where instead of a very rapid transition from passband to stopband, there would be a more gradual transition with a passband cutoff frequency and a stopband cutoff frequency And perhaps also instead of having an exactly flat characteristic in the stopband in the passband, we would allow a certain amount of ripple We also have exactly the same situation in continuous-time, where here we’ll just simply change our frequency axis to a continuous frequency axis instead of the discrete frequency axis Again, we would think in terms of an allowable passband ripple, a transition from passband to stopband with a passband cutoff frequency and a stopband cutoff frequency So the notion here is that, again, ideal filters are ideal in some respects, not ideal in other respects And for many practical problems, we may not want them And even if we did want them, we may not be able to get them, perhaps because of this issue of causality Even if causality is not an issue, what happens in filter design and implementation, in fact, is that the sharper you attempt to make the cutoff, the more expensive, in some sense, the filter becomes, either in terms of components, in continuous-time, or in terms of computation in discrete-time And so there are these whole variety of issues that really make it important to understand the notion nonideal filters Now, just to illustrate as an example, let me remind you of one example of what, in fact, is a nonideal lowpass filter And we have looked previously at the associated differential equation Let me now, in fact, relate it to a circuit, and in particular an RC circuit, where the output could either be across the capacitor or the output can be across the resistor So in effect, we have two systems here We have a system, which is the system function from the voltage source input to the capacitor output, the system from the voltage source input to the resistor output And, in fact, just applying Kirchhoff’s Voltage Law to this, we can relate those in a very straightforward way It’s very straightforward to verify that the system from input to resistor output is simply the identity system with the capacitor output subtracted from it Now, we can write the differential equation for either of these systems and, as we talked about last time in the last several lectures, solve that equation using and