In this video, we're going to define the Fourier Transform for digital signals.
It's known by the complicated name of a discrete-time Fourier Transform.
it's so long-winded, everybody calls it the DTFT.
We're going to see that it looks very similar to what we've already encountered
and we're going to talk about its properties.
Many of which are shared with the Fourier Transform we've already defined for
analog signals. So this is a fairly easy leap to go into
the discreet time world. So, let's define it and like I said the
definition looks very similar What we have for analog signals.
the big difference is, like I keep saying, is.
That it's a function of f, which has no units.
And f is in the range minus a half to a half or zero to one.
is the case may be we'll figure this out a little bit later.
You want to point out the notational change this is written, the DTFT is
written as S(e^jt2pif) the variable is f but this helps us distinguish it from the
Fourier Transform of an analog c So, this is the notation we're going to use for
the DTFT, and when I, when you see a s(f), you'll know that means an analog
Fourier Transform. And f in that case has units of hertz.
Okay, so again the all spectra are periodic with period 1.
And as we know, that comes from the fact that this is periodic.
with a period of 1 as a function of f so it has to be periodic and I'm going to
show you an example to show you how that works.
So, here's a little simple example. It's a exponential signal.
And let's plot it, so we understand it. So, a^n u(n).
Okay, the first thing to note is that the unit
step multiplies the a^n. So unit step, you recall Use 0 for the
negative and it's 1 for n = 0 and positive.
And that's going to the part that's back here for -n is going to set to 0 the
exponential, so the only thing we get Is the exponential for positive, index
values. Positive time values.
And it may look something like that. If A is bigger than 1 this thing could
take off. It's still 1 at the origin.
But it could very big very quickly if A is bigger than 1.
So, what I have done here is some example here with a [UNKNOWN].
Ok, well let's compute spectrum and way that proceeds the best referred I am just
going to Plug in for s and I'll plug in what my signal is.
There it is. And, again what the unit step does is
that it sets to zero anything for n negative so I can change the limits of
the sum and therefore get rid of the u(n) and get a much simpler for where I can
play with. And I'd like to point out that the
complex exponential here can be thought of as e to the minus j, 2pi f, all raised
to the nth. And that means, I can merge those 2.
Exponential's in the formula.This is going to be the key step for getting a
analytic expression from the spectrum. So here's what I did same thing.
And now we have to recall the geometric series, very important in digital signal
processing to know this property. You sum up a exponential in alpha, in
zero to infinity. As long as the absolute value of alpha.
The magnitude of alpha is less than 1. It's hidden by this very concise formula.
So I'm going to use that formula. Because that's exactly what I have here.
And this formula works, even if the alpha is complex valued.
The only thing that matters is that its magnitude is be, is less than 1.
Which it certainly is, in this case. If I assume that the absolute value of A
is less than 1. Alright.
So we can use it. Very simple formula pops up.
There it is. And so, that is the spectrum of the
exponential, signal. let's plot it.
And for a specific value of a, which we have a half.
And here you see the periodic, nature of it, you can go between -1/2 and 1/2 or 0
to 1, whichever you want. I want to, show you how I plotted those
curves for the magnitude and phase. you'll notice I didn't actually give you
a formula for the magnitude and the phase.
it turns out that for, discreet time spectra, those expressions can be fairly
unwieldy. So, just recall here's what the transfer
function was for our example. The exponential signal.
And what I want to show you, is that by, in using modern tools, like MATLAB Our
octave. It turns out you can basically type this
expression in as it stands. And get all the information about the
magnitude and phase that you want. So, let's see how that works.
So here, I have the MATLAB command window.
And I'm going to type in. [SOUND] A range of frequencies going
between minus 2 and 2. that's sort of what was shown in the
previous figure. And I'm going to say that A is a half,
which is what we had. And I'm going to type in the formula for
h. [SOUND] And you notice I'm literally
typing it in [SOUND] J and all. Turns out the default in MATLAB and
Octave is that J is equal to the square root of minus 1.
And the only, and the only thing that's interesting here is, notice the dot
slash. What that means is term by term divide.
Because f is a vector. And the exponential here of the,
of an expression containing an f, is also a vector.
And so, when you want turn by turn division, which is exactly what I want,
this is the expression you'll want. You'll want to put that in.
Okay. That's that.
I'm going to create a subplot, it's called, in my plot window here.
And, I'm just going to plot it. Plot f.
Now, we want to plot the magnitude and in MATLAB an octave it's ab, abs function
for absolute value. And there it is.
Turn on the grid. So, the [UNKNOWN] range is between -1/2
and 1/2 that's the range of which the frequencies are really an interest, the
rest is periodic so you can get the Everything else is a periodic repetition
just like we've been talking about. So that's negative frequency, that's
positive frequency, negative, positive, negative etc.
Notice how easy it was to apply, just type in the expression for the spectrum
and there it is. Alright,
so now I'm going to do the angle. [SOUND] [INAUDIBLE] plot,
and I'm going to go back and change that to angle.
That's the function you want. Now, it turns out, this is going to
return an angle in radians, and I'm not you, but I find degrees a little bit
easier to understand, so the way to do that is multiply your angle by 180/pi.
And also, I should point out that [INAUDIBLE] octave know what pi is, too.
That's a predefined variable. I didn't have to define, to very many
digits. And there's the [INAUDIBLE].
turn on the grid abd now we can see that the
angle never really gets beyond about 30 degrees.
That's kind of interesting. you can prove that the phase at the
origin, 0 frequency, is either going to be 0 or pi.
It has to be real valued, and that's going to be the same at a half.
Now, the the half may seems a little odd, until you realize what the complex
exponential is? So, if you look at e to the minus j(2pif)
and then evaluated at f equal a half. And you've already done that,
that's minus 1 to the n. So when you calculate your spectrum, your
DTFT at that frequency. It only contains real numbers.
So again, the phase has to be either zero or pi.
And so phase tends to have this rather complicated appearance to it.
But also, we need to point out that the phase is odd and the magnitude is even,
just like they should be and both are periodic because these are the J(2pi) of
n's. But the real point of this segment is.
How easy it is to plot very complicated transfer functions, once you have a
formula for the, transfer function or the spectrum that you want.
Okay, what's the inverse DTFT? Well, we are
going to use under the [UNKNOWN] relationship that we used long time ago
for [UNKNOWN] series and we show that the [UNKNOWN] for two different industries
here was equal to this expression. [UNKNOWN] we can write as a uni Much more
concisely than writing it like that. You know, a same kind of thing follows.
We are going to multiply, our expression for the spectrum by the complex
exponential integrate. And that will give us back our signal.
So, driving the inverse. DTFT is very easy and again just like we
had for analog signals, we can go back and find the time domain and the
frequency domain, using these formulas. We go from time domain to the frequency
domain using the DTFT and the inverse that So, just like we had before, we can
think about a signal either way depending on the application.
So, let's explore some of the properties of the DTFT.
None of these should be terribly surprising of course, the DTFT is linear
because it's just a A sum of terms, you can sum, a sum this way, or do it
directly. So, it's linear, very important property
it has conjugate symmetry, which is easy to show, so it negative frequency's the
same Hence, the conjugated positive frequencies.
And they also show through the properties of the complex exponential.
Because it's periodic with period 1, it's also, what's at negative frequency also
occurs at 1-f. So, the old time delay formula still
works if you delay. A signal by, n zero, values.
And in-, indices samples, if you will. That's the same as multiplying the
spectrum by a complex exponential, having it delayed.
But there, and the other way around, if you multiply by a complex,
Exponential in the time domain is the same as shifting the spectrum in the
frequency domain by the frequency [UNKNOWN] of the complex modulation.
And of course our old friend Parseval's theorems still applies.
Now in a computer, um,the power in the signal is not That role, not that
important. So, this is definitely an abstraction
about calling that a power, but what else we want to call it.
And of course you can find it in the frequency domain or in the time domain,
whichever is easier using Parseval's Theorem.
The proof of this is just like it was Of all of the previous examples we've gone
through. So, the DTFT shares many of the
properties of the Fourier Transform we've already encountered for analog signals.
It's very important to note all spectra are periodic and the reason for that is
Just because of the way the math works out.
Tthat's one way of looking at it. And because it has to be periodic, the
highest possible frequency it can have in the Discrete-Time world is 1/2.
There is no higher frequency in math because it has to be periodic.
We'll get used to that. Now What we've talked about with the DTFT
is how to, compute it. We've defined it,
Remember back when we talked about signals? There are some signals for which
there are no formulas. In particular, speech.
How in the world did I show you that speech spectrogram several videos ago?
How do they do it, I don't have a formula so it's going to be a little difficult to
compute this directly and how we do that is the subject of the next video.