Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
Topics covered: Sampling and aliasing with a sinusoidal signal, sinusoidal response of a digital filter, dependence of frequency response on sampling period, periodic nature of the frequency response of a digital filter.
Instructor: Prof. Alan V. Oppenheim
Lecture 9: The Discrete Fou...
Related Resources
The Discrete Fourier Transform (PDF)
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 MITOpenCourseWare at ocw.mit.edu.
[MUSIC PLAYING]
ALAN OPPENHEIM: Hi. So it turns out that you guys missed out on some of the best parts of these lectures, which is all the kibitzing that goes on in back of the cameras just before they get started. Well, in the last lecture, we stressed the equivalence of finite length and periodic sequences. In particular, as hopefully you recall, we talked about a finite length sequence, x of n, which was of length capital N. In other words, it's equal to 0, except in the range 0 to capital N minus 1.
We stressed also the fact that if the sequence is considered a finite length capital N, then it can also be considered of longer length than that, or equivalently the statement that it's a finite length doesn't imply that some of the values in the interval 0 to N minus 1 can't also be 0.
In relating a finite length sequence to a periodic sequence, we generated a periodic sequence, x tilde of n, by simply repeating the finite length sequence over and over again with a period of capital N. That is x of n was added to itself, shifted by capital N, shifted by 2 capital N, shifted by 3 capital N. And because of the fact that it's a finite length, there is no interference between each of these individual replicas of x of n. The result then is a periodic sequence, one period of which corresponds to the finite length sequence.
Well, we'll have occasion frequently to refer to this periodic sequence in describing the finite length sequence. And consequently it's convenient to use a slightly different notation than the summation that we've been using. In particular, we can rewrite this as the periodic sequence, x tilde of n, equal to x of n modulo capital N. That is x of n modulo capital N, in other words, the argument of x of n is little n taken modulo capital N. Another way of writing that notationally which is convenient, is just to simply express that as a double parentheses with a subscript capital N, so that this means x of n, the argument n, taken modulo capital N.
So, you can see then that as little n varies over the interval 0 to capital N minus 1, we see the finite length sequence x of n as little n is equal to capital N. Capital N taken modulo, capital N is 0. So we'll see x of 0 back again. And as little n varies in the range capital N to 2 capital N minus 1. That argument taken modulo N again repeats the values of x of n the range n equals 0 to capital N minus 1.
Expressing it this way or equivalently expressing it this way, as I stressed before in the previous lecture, corresponds to taking the finite length sequence, x of n, and simply wrapping it around the circumference of a cylinder. As we run around the circumference of the cylinder, we see x of n repeated over and over again. Likewise, we were able to get back to the finite length sequence from the periodic sequence by simply multiplying by a rectangular sequence, in other words extracting a single period. A single period of the periodic sequence corresponds to the finite length sequence that we began with.
In the last lecture we then introduced the discrete Fourier series of x tilde of n, and the discrete Fourier series coefficients we denoted as capital X tilde of k, and chose to interpret them, as you recall, as a periodic sequence, periodic in k with a period of capital N. The discrete Fourier series representation, just to summarize it again for you, we've rewritten here that is a sum of complex exponentials harmonically related generate x tilde of n. And the Fourier series coefficients, capital X tilde of k were given by this expression. And I stress again the fact that we chose to interpret the Fourier series coefficients as a periodic sequence. And it didn't particularly matter, because in any case we only use a single period of that in constructing the periodic sequence, x tilde of n.
Now in this lecture, what we'd like to do is apply the idea of the discrete Fourier series and the similarity or basically the equivalence of finite length and periodic sequences to a Fourier series representation of finite length sequences. And basically the idea is that we can convert the finite length sequence to a periodic sequence. We've seen how to do that, and go back and forth. Generate a Fourier series representation for that, and then simply interpret the Fourier series coefficients as what we'll call the discrete Fourier transform of the finite length sequence.
So, the discrete Fourier transform then is given by the sum from n equals 0 to capital N minus 1 of x of n times w sub capital N to the nk, corresponding to the fact that if we generate a periodic sequence from x of n, we can recognize that in this summation for the Fourier series coefficients, in fact, we only use one period of x tilde of n anyway. So that we could simply replace in here x tilde of n by x of n. And of course, since the summation runs from 0 to capital N minus 1, we can't tell the difference.
This then is by definition the discrete Fourier transform of the finite length sequence, x of n. And it is denoted by x of k. It corresponds to the Fourier series coefficients of the periodic equivalent sequence for x of n, except that it is useful to maintain the duality between the time domain and frequency domain by interpreting the Fourier transform, the discrete Fourier transform to be a finite length sequence, since the sequence that we're computing the Fourier transform from likewise starts as a finite length sequence.
Well, that's straightforward. It just simply involves taking the Fourier series coefficients for k in the range 0 to capital N minus 1, and simply setting them to 0 outside that range. In other words, the discrete Fourier transform, x of k of a finite length sequence x of n, is equal to the Fourier series coefficients of the periodic equivalent of x of n multiplied by a rectangular sequence to extract a single period.
We can likewise then get the Fourier series coefficients from the discrete Fourier transform, x of k, by simply periodically repeating x of k with a period of capital N. Or equivalently, we can write that the Fourier series coefficients, x tilde of k, are equal to the discrete Fourier transform values with the argument taken modulo capital N. This corresponds to simply periodically repeating capital X of k, like wrapping capital X of k around the circumference of a cylinder, running around the circumference again and again. And what we see are the Fourier series coefficients.
Now perhaps this sounds a little involved or intricate. The idea is really very simple. It just simply is that the discrete Fourier transform corresponds to the Fourier series coefficients for the periodic equivalent of the finite length sequence. And to maintain the duality, in this case, we choose to simply extract one period of the Fourier series coefficients so that now we have a finite length sequence. Its discrete Fourier transform is likewise a finite length sequence.
And the properties of the discrete Fourier transform, as we'll see, the differences in the properties between this and the Fourier transforms we've talked about in previous lectures are related very closely to the implied periodicity in the sequence or in the discrete Fourier transform. Before discussing the properties, however, it's useful to relate the discrete Fourier transform to the Z transform, as we've talked about it previously.
In particular, here we have the Fourier transform, the discrete Fourier transform relationship, capital X of k is the sum from n equals capital N minus 1 of x of n, w sub N to the nk. Although that has to be multiplied by R sub n of k to extract a single period. The inverse discrete Fourier transform relationship then is the inverse Fourier series relationship 1 over capital N the sum x sub k w sub of capital N to the minus nk. And again, since we're no longer talking about a periodic sequence, it's necessary to extract one period, this multiplied by R sub capital N of n.
On the other hand, the Z transform of the finite length sequence is the sum of x of n times z to the minus n. In general, of course, the sum running from minus infinity to plus infinity, but because this is a finite length sequence, this is a sum from n equals 0 to capital N minus 1, because of the fact that the sequence x of n is 0 outside the range n equals zero to capital N minus 1.
Well, to relate the Z transform to the discrete Fourier transform, we simply need to compare this expression with this expression. And what we see, ignoring for a moment the capital R sub N of k, that these two expressions are equal if we pick z equal to w sub capital N to the minus k. So the discrete Fourier transform coefficients are equal to the Z transform, if we choose z equal to w sub capital N to the minus k, and look at this for values of k equal to 0, 1, up through capital N minus 1.
What that says then, is that the discrete Fourier transform corresponds to samples of the Z transform; and where are those samples? Well, those samples are on the unit circle. Because the magnitude of w is equal to 1. And for example, if we chose the case were capital N was equal to 8, then we would find that the discrete Fourier transform coefficients fall at points on the unit circle, equally spaced in angle with eight points around the unit circle; 1, 2, 3, 4, 5, 6, 7, 8. I did it right.
So these are equally-spaced points around the unit circle. For capital N equal to 8, then the discrete Fourier transform corresponds to sampling the Z transform at these eight points. And then the only effect that this capital R sub N of k has is that it requires that we interpret this as a finite length sequence, the set of eight values, rather than running around, and around, and around the unit circle over and over again.
So, we have then the discrete Fourier transform. We have the notion that the discrete Fourier transform really is nothing different. It's exactly the same as the discrete Fourier series, except that it's one period of a discrete Fourier series extracted. And furthermore, it corresponds to sampling the Z transform at equally-spaced points around the unit circle. Apparently because of the fact that the sequence is finite length, from that set of samples we're able to get back exactly the sequence x of n.
That isn't obviously true, in general. If we had an arbitrary x of n, and we sampled a Z transform around the unit circle, in general we wouldn't be able to get x of n back again. But if x of n is a finite length, then we are able to obtain x of n from the samples of its Z transform.
OK. Well, I'd like now to look at some of the properties of the discrete Fourier transform. Again, there are lots of properties that we can talk about. I'll focus on a few, and primarily what I want to focus on is the difference between the properties for the discrete Fourier transform and the properties for the Fourier transform or the Z transform as we have been talking about them over the last several lectures.
Well, let's look first of all at the shifting property. And let me stress that all of the properties, as we go through them, as we present them for the discrete Fourier transform, will relate to the corresponding property for the periodic equivalent of the finite length sequence. So when we want to ask what happens to the discrete Fourier transform when we do such and such to the sequence, the basic idea that basically what we want to ask is what happens to the Fourier series coefficients for the periodic equivalent of that finite length sequence.
All right. Let's talk about the shifting property. We have a sequence, x of n. It has a discrete Fourier transform capital X of k. And then we have the periodic equivalent of x of n, x tilde of n. And it has a discrete Fourier series coefficients, which are the periodic extension of the discrete Fourier transform. Well, the shifting property that we want to introduce then corresponds to the finite length sequence which is implied by shifting the periodic sequence, x tilde of n.
We know that if we shift the periodic sequence, x tilde of n plus m, the Fourier series coefficients that we get are x tilde of k multiplied by a complex exponential w sub capital N to the minus km. So the shifting property that we want to introduce then for the discrete Fourier transform, corresponds to extracting shifting x of n in such a way that it corresponds to extracting one period of the shifted periodic sequence, x tilde of n.
If we do that, if we extract one period of x1 tilde of n to get a finite length sequence back, then we get a discrete Fourier transform, which corresponds to extracting one period of this periodic sequence. And that then is simply the original discrete Fourier transform capital X of k multiplied again by w sub capital N to the minus km.
Now this shifting that we're talking about is a little different than the kind of shifting that we've been doing normally in the Fourier transform and Z transform. And it has to be. Because we're talking about a sequence that's a finite length. That is it's 0 outside the range, 0 to capital N minus 1. And if we just simply shift that sequence linearly, then we're going to end up with a sequence that no longer is 0 outside the range 0 to capital N minus 1. So there's a slightly different kind of shifting that we're talking about. It's referred to as a circular shift. and I'd like to illustrate what that shifting corresponds to by referring to one of the view graphs.
Here I have a sequence, x of n, which is a finite length. So it's nonzero only in the region of the blue values. And to generate the shifted, quote, "shifted" version of x of n, we first generated the periodic sequence, x tilde of n. So this is the periodic replica or equivalent of this finite length sequence. So we simply have this period repeated over here, repeated here, repeated there, et cetera. It was this sequence that we shift. So for example, if we shifted to the left by two values, we then have this periodic sequence shifted to the left by two values. But to recover, to extract one period again in the range 0 to capital N minus 1, we want to extract this period of this periodic sequence. That's what the function capital R sub capital N of n does for us. And the result then is this one period extracted, and the rest of the sequence, 0.
Now, we could of course, when we go through this shifting, carry ourselves through all of these steps. But there's a more straightforward way to look at how you get this sequence directly from this one. You can see that we could have interpreted the change from here to here, either by linearly shifting this sequence or by taking each one of the periods in this sequence and circularly shifting. As this shifts to the left, taking points as they drop out of this period and recirculating them around to the beginning of the period, or to the side of the period.
Well, you can see that that's in essence, what we got here. And in fact, it's in essence, what we get here. This corresponds not to a linear shift of x of n, but to a circular shift of x of n. As we shift this sequence to the left by two values, instead of just simply having these points drop off the end of this period from 0 to n minus 1, we wrap them around to the other side so that they come in over here instead of wrapping around there.
Now one way to look at this is to think of x of n, again as we've been trying to do, wrapped around the circumference of a cylinder. And what we've done in the kind of shift that we're talking about here, is just simply rotated the cylinder by two points, rather than the usual kind of linear shift where we have the sequence stretched out in a straight line and we shift the sequence linearly. Here we have a circular shift. Think of the sequence wrapped around the circumference of a cylinder, and the cylinder just rotated by two points so that the result is that the two points that are shifted out of this window between 0 and n minus 1 get shifted in from the other side.
Notationally a way to say that is as I've done here, really what this expression corresponds to is that we started with x of n. We formed the periodic replica of that using the modular notation that we introduced at the beginning of the lecture. Shift that by two points, and then extract a single period. So this is a long way-- well I guess it's really a short way of going through all these steps. But it's the idea and not the mathematical formalism that's important. Think of this as a circular shift of this finite length sequence inside the interval 0 to capital N minus 1.
OK. So this then is our shifting property. I've rewritten it in a slightly different way here, corresponding to using the modular sort of notation. That is the statement is that a circular shift of x of n-- and that's what all this means is just simply a circular shift-- has as its discrete Fourier transform the original discrete Fourier transform multiplied by this complex exponential. Because of the fact that we've interpreted the discrete Fourier transform as a finite length sequence, we have again a duality between the time domain and the frequency domain. In particular, if we apply a circular shift to the discrete Fourier transform values, the resulting finite length sequence is the original finite length sequence multiplied by a complex exponential.
Well, the details of the algebra involved in working this out aren't important right now. You'll have plenty of opportunity to look at those at your leisure in the text, also to work some of this in the study guide. The important concept right now, the important thing to cement, is the notion of a circular shift of a finite length sequence. And think of it as the finite length sequence as it shifts, points that come outside the interval 0 to capital N minus 1, wrap around and come in on the other side.
Now we also have symmetry properties for the discrete Fourier transform, which are basically a consequence of the symmetry properties for the discrete Fourier series. I'll remind you that for the discrete Fourier series, for a periodic sequence that's real, we had the symmetry property that said that the real part of the Fourier series coefficients are even. And we wrote that in a couple of ways. One of which was to state that x sub R of k is equal to x sub R of capital N minus k. And the imaginary part of the Fourier series coefficients are odd. That is they're equal to minus x sub I of capital N minus k.
Well, the discrete Fourier transform is one period of the discrete Fourier series. And consequently, this implies the same type of symmetry properties for the discrete Fourier transform, keeping in mind again that we want to relate these properties just to a single period. So we have the discrete Fourier transform. Again, we'll assume that x of n is real. And the statement then, implied by simply extracting one period out of the discrete Fourier series, is that the real part of the discrete Fourier transform coefficients are equal to one period extracted out of the periodic sequence, which is x sub R of N minus k, repeated over and over again. Periodically that's what the modular notation did for us, one period extracted out of that that's what this rectangular window does for us.
And we have a similar type of statement about the imaginary part. This is basically a statement that says that the real part is even, if we interpret even correctly. And the imaginary part is odd, if we interpret odd correctly. And in particular, the interpretation is a little different than the way we've been talking about even and odd sequences. Well, to see what this expression means, it looks a little involved. It's got some modular things in it, and multiplying by a rectangular window. But that's mainly notational formalism. And what these two expressions are saying are very straightforward.
Let's look, for example, at what this implies for k equal to 0 or for k equal to 1. For k equal to 0, we have x sub R of capital N modulo capital N, or equivalently up here we have capital X sub R of 0 is X sub R of N minus 0 modulo capital N times R sub N of 0. Well, R sub N of 0, according to the way that we've defined this rectangular window, is unity. And what is all this equal to?
Well, it's capital N modulo capital N, which is 0. In other words, this argument at 0, this simply is a trivial statement that says that X Sub R of 0 is equal to X sub R of 0. And that really doesn't tell us too much. For k equal to 1, we add that X sub R of 1 is X sub R of capital N minus 1 modulo capital N times R sub capital N of 1. This again is unity. And since capital N minus 1 is in the range 0 to capital N minus 1 that taken, modulo N is just simply X sub R of capital N minus 1.
So what this says is X sub R of 0 is equal to X sub R of 0. So as X sub R of 1 is equal to X sub R of N minus 1. And if we repeated this, we'd find X sub R of 2 equal to X sub R of N minus 2. And that's in the context of the discrete Fourier transform, what we mean by the Fourier transform being even. So as an example, here we have what can correspond to a real part. And we have X sub R of k. We have X sub R of 1 equal to X sub R of capital N minus 1. Well, that says that this value is equal to that value. X sub R of 2 equal to X sub R of N minus 2. That says that this value is equal to that value. And likewise this value is equal to this one. This one is equal to that one, et cetera.
In a similar way, we have a statement that tells us that the imaginary part is odd in exactly the same sense. In other words that there's a symmetry as we look at the imaginary part coming in from both sides of the sequence. Incidentally, I've indicated here by a dotted line what would correspond to the periodic extension of this set of DFT values. In other words, this would be this one repeated over again. And if we were thinking of the discrete Fourier series, this would just be periodic replicas. Although in fact, the discrete Fourier transform, since we've interpreted it as a finite length sequence, the discrete Fourier transform would have 0 values on both ends of this.
All right. So the corresponding symmetry for the imaginary part says that if we look at the imaginary part at n equals 1, then that's equal to minus the imaginary part at capital N minus 1. If we look at the imaginary part at n equals 2, then that's equal to minus the imaginary part at capital N minus 2. In other words, there is an antisymmetry as we look at the imaginary part coming in from both ends of the period. So that's the kind of evenness and oddness that we're talking about when we talk about the symmetry properties for the discrete Fourier transform.
In other words, it's an even function in the sense that as we come in from the two ends, we see a symmetry. The real part is even. The imaginary part is odd, in the sense that we see an antisymmetry. As we come in from the two ends of the period.
OK. That is just a simple introduction to the symmetry properties. We have also as we've talked about with our other transforms, the convolution property. And the convolution property relates very heavily to the type of convolution that we were talking about for the discrete Fourier series. What we want to ask is, what is the sequence, finite length sequence x3 of n, whose discrete Fourier transform is the product of the discrete Fourier transform of x1 of n, and the discrete Fourier transform of x2 of n.
Well, we know what the sequence is, the periodic sequence is, whose discrete Fourier series is the product of the discrete Fourier series of the periodic equivalent of x1 of n and the periodic equivalent of x2 of n. And this sequence must just simply be one period extracted from x3 tilde of n. In other words, x3 of n is equal to x3 tilde of n multiplied by a rectangular sequence.
Well, we know how to form from the last lecture, the convolution that corresponds to multiplying the discrete Fourier series together. And that convolution was the periodic sequences x1 tilde of m and x2 tilde of n minus m, summed over one period that is from m equals 0 to capital N minus 1. Well, the finite length sequence, x3 of n that corresponds to the product of these two discrete Fourier transforms, corresponds then to extracting a single period from this periodic sequence, in other words, multiplying this by R sub capital N of n.
So this then is the kind of convolution that results from multiplying the discrete Fourier transforms together, or we could write this in a different way. We can express this periodic sequence using our modular notation in terms of x1 of m, as x1 of m taken modulo capital N. And this periodic sequence is x2 of n minus m that argument taken modulo capital N. Well, we can take one additional step here, which may or may not be useful. Observe that we only use values of m in this expression in the interval from 0 to capital N minus 1. So in fact, although this is a periodic sequence, we're only using one period of it. So this piece is equivalently x1 of m. And what is this? Well, think back to the kind of circular shifting that we were talking about doing with finite length sequences.
What this basically corresponds to doing is applying not a linear shift to x2 of n, but a circular shift, flipping x2 and applying a circular shift to x2 of n. And then of course, this is just in here to allow us to extract a single period. This then corresponds to what we'll refer to as a circular convolution of this sequence, or rather the sequence x1 of n, and the finite length sequence x2 of n. It's a circular convolution. And notationally we'll denote that as x1 of n, circularly convolved, keeping track of what the circumference of this cylinder is that we're wrapping the finite-length sequences around, circularly convolved, an endpoint circular convolution with x2 of n.
Now, I wouldn't expect at this point that what this circular convolution is in detail, I wouldn't expect that to be very clear. We have some modular notation in there, and we're multiplying by this. And there was some periodic something somewhere, and where did we extract the period. A lot of our attention at this point, and in fact through most of the next lecture, is going to be focused on interpreting and getting a feeling for what the circular convolution means. There are lots of pictures that I'll try to suggest to help in forming an idea of circular convolution.
Let me just offer one now and show you a simple example of circular convolution, with the notion that in the next lecture we'll be focusing almost entirely on what circular convolution means in relation to linear convolution, et cetera. But look. Here's what this means. First of all, linear convolution, what do we do? We have two sequences. They're laid out flat. We do a linear convolution by flipping one of the sequences, and then shifting the two sequences linearly with relation to each other, multiplying and adding up the values from minus infinity to plus infinity.
The circular convolution basically corresponds to wrapping one of the sequences around the circumference of a cylinder, taking the other sequence, flipping it, wrapping that around the circumference of another cylinder, putting the two cylinders inside each other, and then the shifting as we change the value of n can be thought of as rotating one of the cylinders inside the other, multiplying the sequence values together, and then adding that product around the cylinder. That is adding from m equals 0 to capital N minus 1. And what this thing does basically, since it extracts one period of a periodic sequence, it corresponds essentially to just simply cutting the cylinder and laying the answer around flat again. That's the notion of circular convolution, and it results from the fact that we're thinking of the arguments in the convolution taken modulo capital N.
Well, let's just look at a simple example with the idea that as we go on to the next lecture, we'll be concentrating some more on the interpretation of what circular convolution means.
All right. Here we have a sequence x1 of m. Remember that in the circular convolution, we're summing over an index m. So here we have x1 of m. Here we have x2 of m. And what we want to form is x2 of n minus m taken modulo capital N. So first of all, here we have x2 of minus m, modulo capital N. And what that corresponds to is flipping x2 of m, flipping it over, and then repeating it periodically. And the periodic replicas I've designated here with dashed lines, so that we focus completely on the interval 0 to capital N minus 1.
So in fact, notice that we could have thought of flipping this modulo capital N by first flipping it, and then taking the values over here, and just simply replacing them on the right-hand side. In other words, it's these values that ended up over here. When we flip this sequence, of course, the value at 0 stays where it is, and the rest of those values end up again in the range 0 to capital N minus 1, but flipped over. If we shift this periodic sequence by one value to the left, then what we have is-- sorry, shift it by one value to the right, then we end up with this periodic sequence. Again, concentrate on the range 0 to capital N minus 1, and you can see that that is a circular shift of one point of one period of this periodic sequence.
In other words, if you circularly shift this to the right, that point comes back in on the other side. Here is the same thing shifted. Again, another point, so we can think of having taken this one period, shifting it to the right, and this point comes back in again on the other side. Of course, the way we're really getting it is-- or another way to think of it is-- it's the corresponding value from the next period over that gets shifted in. But I'd prefer now that you begin thinking of it as a circular shift of just that one period.
So, you can see that as we continue changing the value of n, then this one period gets circularly shifted. This value will end up over here, then this value will end up over here, et cetera. Well, if we carry out the convolution of x1 of m and x2 of m, for example for little n equals 1, we take this, multiply it by that, and sum up the values in the range 0 to capital N minus 1. Similarly for little n equals 2, we take this and multiply it by that, sum up the values in the product in the range 0 to capital N minus 1.
One thing that you should be able to see in this example is that the answer will look quite a bit different than a linear convolution of these two, because in fact, notice that we're multiplying always by-- let's call this amplitude 1. We're multiplying always by 1. And no matter how we circularly shifted this one period, each value would still get multiplied by the same amount. And consequently, the resulting values in the convolution will be the sum of these values no matter how much circular shifting that we do.
So that for this particular example, the convolution comes out to look like this. That is the values in the convolution are constant over the range 0 to capital N minus 1. Then of course, we had this either cutting the cylinder, if you want to look at it that way, or multiplying it by R sub capital N of n, and consequently we get 0 outside that range.
All right. Well, what I would hope at this point, I would certainly expect that the idea of circular convolution isn't totally clear. I would expect that a little bit of the notion is coming out of the haze. That is the notion that things are being shifted circularly to implement the convolution. That's the kind of idea that I would hope is becoming somewhat clearer. And in the next lecture, what I intend to focus on entirely is the additional interpretation of circular convolution, with the hope that by the end of the next lecture the notions of the circular shifting and the difference between circular convolution and linear convolution will be clear. Thank you.