So, this video represents the combination of our exploration of signals in the frequency domain. Today, we're going to talk about non-periodic signals. These are the ones where we finally need to build up to. After today, we could handle both periodic and periodic signals with equal facility. The mathematical tool we're going to use is known as the Fourier transform. And so, we need to explore those properties and I think there will be no surprises there, we'll, we have seen a lot of them already. And finally, we will show you how you can figure out what happens when you filter a signal, be it periodic or non-periodic. Okay. So, first of all, we have to derive what the Fourier transform is. And it turns out what I'm going to do is I'm going to play with the period T. So, I'm going to be explicit here about what the period of the signal is. And as we have had and seen, the Fourier series coefficient is given by a formula that looks like this. And the one difference here are the range of integration. Turns out you can find the Fourier coefficient by integrating over any period, as long as you integrate over one period. So, for this derivation, I'm integrating from -T/2 to T/2 instead of zero to T. It doesn't really make any difference. I'm also throwing in over here the fact that the C sub k is are a function of what the period is. That doesn't really change anything. Now, I'm going to make a little simple definition. And that is that ST of f is just T * Ck of t. So, what I'm doing is just bringing that to the other side. And, of course, that's what you get. The other thing here is I'm defining f to be k/T, so that appears in the formula there and it appears over there. So, so far I'm just manipulating into finding things I haven't really done anything. Now, we know what the Fourier series expression is for the signal in terms of the ST(f). Since the ST(f) is just this in order to have the Fourier series formula, I have to divide by T and f is k/T. So it's, nothing has really changed. So, here's the fun. Here's where we start the mathematics. What happens if we make the period go to infinity? So, if you think about, for example, the periodic pulse string. So, it looks like that. Drawing way out there. T, there's even one over here at -T. I'm sorry, -T over here, goes on and on. What happens if T goes to infinity? Well, what's going to happen is all of the signals, all the pulses here are going to go out there because they have to be shifted out. And this one, these are going to go to minus infinity. So, the only thing that's left is a single pulse around the origin. It doesn't shift. And the reason for that, just to recall, is that if this is p(t), this is p(t) - T. So, when we let T go to infinity it shifts out. Okay. So, we, that's the mathematics. We need to look and, at what happens when t goes to infinity. So just repeating what we just looked at, and now, what happens if t goes to infinity. Well, what happens is that this, you can consider as a remind sum. So, when T goes to infinity, 1/T turns out to be the separation between any two frequency values. And so, that becomes df. What's happening here is that since f in here is k/T as you're letting t go to infinity, you have to change the harmonic numbers so to keep you at that same frequency. And, that's essentially a detail, but we're now done. And the sum which is represented by the Fourier series expression, becomes an integral as we let the period go to infinity. So, to show you that that's kind of thing that's happening, I show two examples here of the period pulse sequence, periodic pulse train, with two different periods. Here, the T is 1. Here, I made it 5 times bigger, and you can see how the spectral lines fill in here. They get very dense. So, the sum, which is, corresponds to this term becomes an integral because the lines get closer and closer and closer until it get into a continuum. Okay. So now, we have what's known as the Fourier Transform Pair. So, if you're given a signal, you can find its spectrum by just doing, doing this calculation. If you have the spectrum, you can find the signal in the time domain. Here's the signal in the frequency domain. Here's the signal in the time domain. So, just like before with the Fourier series, you can express a signal either in a frequency domain or in a time domain. And the Fourier transform is your way going between the two. The definition is, this slide is what's called the Fourier transform, and you've heard that terminology. That's what they mean going from time to frequency. And the inverse Fourier transform is going from frequency to time. Just a terminology, nothing else. But, we can now calculate either the, the spectrum from the time domain's function, functional version of the signal or the time domain version from a frequency domain function or version of this. we point out this as a very interesting symmetry to it or they look very similar. The only difference between these two formulas is the sign of that exponent. So, the Fourier transform gets the minus sign in the exponential and the inverse Fourier transform gets the plus sign. That's going to be a very handy thing to note when we explore it's properties. Let's do a little example first. Let's take the Forier transform of a pulse. So, if you remember, a pulse is a standard definition, we've seen it many times. It's a pulse of type one, and with delta. Since it is zero out here, that makes our life very simple. When we plug it into this formula, we don't need to integrate from minus infinity to infinity, we know the integral over these areas is going to be zero. So, we just integrate from zero to delta. So, we plug it in and we just integrate one from zero to delta times the complex exponential. And that integral is easily calculated. And this should look very familiar to you. We're going to pull our same math trick. And we're going to write this. Pull out half the phase and simplifying, you get our very familiar sinc function. So, this is the spectrum of a pulse. And now, there are no spectral lines. It's a continuous function of f, the magnitude of p of f. Looks like a sync. Okay? And then, the first zero which is always an interesting place, is going to be the frequency at which this is equal to one because the sign is zero at integer multiples of pi. So, the first one out here is when f delta equals one, and so this frequency is one over delta. So, if you will, most of the energy and power in the spectrum is, is between -1 over delta and one over delta, and then it decays by one/f. Okay. Let me do another example for you. And, this one is a decaying exponential times a unit step. Okay. So, what does this thing look like? So since the unit step is zero, for t less than zero, how about here that product is zero? For t greater than zero, the unit step is one. So, out here, we just get the decaying exponential. Okay. So, the a is positive in this case. So, to plug this into our Fourier transform expression, again we're just going to ingrate the exponential from zero to infinity, alright? And here's what we get for an answer. And I'll show you how to get that. So, instead you get the integral from zero to infinity, with e^-at, e^-j2πft dt. And you combine the exponentials [SOUND] to get a very easy integral to do. And I think it's pretty easy to see is that this is what you're going to get for the result. there's an important little detail in here and that a is positive so that when you evaluate the exponent and the infinity you get zero because this will dominate. Okay. So, this should look like a very familiar quantity here. and we'll get ot that in just a second. Okay. So, here's some interesting properties of spectra. None of these should be a surprise. We have a Parseval's Theorem. So, signal power is equal, has roughly the same expression except for the magnitude in either the time domain or frequency domain, will look very, very simple. So, you can calculate power in the frequency domain or time domain, whichever is easier. And if you decide one integral looks very hard, you can use the Fourier transform to go into the other domain and see if the integral looks simpler over there. We play that kind of game all the time because of the Fourier transform's properties. And, we have conjugate symmetry for real signals. And again, if it's even, the spectrum is even. And if it's odd, the signal in the time domain is odd, it's odd in the frequency domain. And furthermore, because of the conjugate symmetry properties, it's either real or imaginary depending if the time domain version is even or odd. No real surprises there, you should be able to prove these yourself quite easily. Let's go into some more interesting Fourier Transform Properties, okay? First one is, one that you've seen before. And then, if I delay in the time domain, that corresponds to the multiplying in the frequency domain by e^-j2πf times the delay, okay? We've seen this with the with the Foutier series and I think it's pretty easy to see when you plug that same formula, use the same mathematics in this case, too. However, what's really interesting is what happens if you delay in frequency. You take this spectrum and shift it over by f0. Because these two formulas were so similar, you know that the answer has to be it's multiplied by complex exponential. However, because of this sign difference in this formula, it's either the plus here. So, delaying infrequency corresponds to multiplying in the time domain but either the +j2πft0t. Whereas, if your delay in time corresponds in multiplying by e^-j2πf tap. Okay? So, this is where the, you can really use to your advantage these symmetry properties, the fact that these look so similar. You can mathematically, if you can drive one property, one domain, you can use it to see what happens in kind of the reverse sense, okay? Let's explore another property here. And this one is really easy. And that the signal at the origin in the time domain and it's value at the origin has to be the integral of the spectrum over all frequency. And the way to see that is to take this formula and just replace this by zero. Well, the complex exponential is of zero is just one, and so you just left with the integral. And that's pretty easy to see. And, of course, use the same thing over here and just just f at zero. So, the value of the spectrum at the origin is equal to the integral of the signal. And here's one, and it's a bit more exciting. The spectrum of the derivative of a signal is j2πf times the spectrum of the original signal S, okay? And how do you derive that? And the answer is, I'm simply going to take the derivative of this formula. So, ds(t)/dt is equal to, [SOUND] okay. So, what I'm going to do is I'm going to take this derivative and move it inside the integral. The only place that t occurs is right there in that complex exponential. Well, the derivative of complex exponential is just j2πf times the complex exponential times e^+j2πf t/dt. Well, this is the inverse Fourier transform formula. However, what it has in it, what you're taking inverse transform of is that. So that means these are related to each other. So, really pretty cool and that if you take a spectrum and you multiply it by j2πf, that corresponds in the time domain to taking a derivative. Very interesting. Well, if multiplying by j2πf corresponds to taking the derivative, guess what? Dividing by j2πf corresponds, too. Well, that's got to correspond to the equation. And again, you can show that by plugging this into the formula over here. I'll let you do that. It's pretty easy. and you can easily see that this is the way it works. I have a little question for you. What happens, what is the spectrum of this second derivative of a signal? What's the spectrum the second derivative of a signal? So, d^2s(t)/dt, well that's just a derivative of the derivative, right? So, the spectrum of this thing is j2 path. The spectrum corresponding to this is to multiply by a minus, another, another j2πf. And so, what you get is -4π^2f^2 *. s(f), okay? The minus sign of course is j^2. So, you can also talk about the, the double integral, the signal if you will, integrating it twice and all that. That, of course, when it's dividing twice by j2πf. Really interesting point. So, here's the summary of all those examples and properties that have done in the previous slides. And, they are very important for us. And we will use these properties over and over and over again with an example that's coming up is going to be particularly important to remember the integral, and to remember this. You'll see that in just a second. And I guess, that one's going to be important. First, I want to talk about a very interesting case that's very important. What is the spectrum of one plus the signal times the cosine? Okay. And s here is assumed to be a non-periodic signal, it has no special properties other than it's some signal. In fact, it could be something like a speech signal or something. So first of all, we note that if you just multiply everything through that we have a periodic part and we have a non-periodic part. The reason that this is non-periodic, the cosine might be periodic, but once you multiply by something that's not periodic, you get something that is clearly not going to be periodic. Okay. So, how do you find the spectrum of this? The way you do it, is you use the Fourier series for the periodic part. And now we know what to do. That gives you terms only at plus and minus fc, you'll see that in just a second. And we're going to use the Fourier transform on the non-periodic part. And then, because the Fourier transform is linear, the integral of a sum is the sum of the integral so it's easily seen to be linear. We're going to add the results together. Our only work is going to be on this second term. Okay. So, I don't want to, I don't like doing integral. I like using the properties. And, the way to get at those properties is through Euler's formula. Euler's formula comes up a lot and there's a reason for that. It's very very useful. So, cosine is easy plus, plus e to the minus. And put the s of t to the side. But from our properties we know that when you multiply in the time domain by a complex exponential, that corresponds to a delay or an advance in the frequency. And that's what each of these terms is. So, you write down the answer. It's easy to show that the Fourier transform of some signal times the cosine is going to be the spectrum of that signal, delayed, and advanced in frequency. And the amount of the frequency delayer advance is f sub c, okay? And the half is there because you get the half of Euler's form. So, and now we know what the Fourier series is and we now can add the spectrum. And we get the following plot. So, I like to use this example spectrum. it's called a rooftop spectrum because it sort of looks like a rooftop. And notice it has to be this, has to be symmetric, right? What happens in positive frequency has to occur in negative frequency and it has to be a conjugate symmetric which means for what I'm showing here, it's got to be an even function. We're going to use this a lot. So, the part that's due to the periodic part, that was of those lines, like we always do stem plots for things relative Fourier series. And the frequency at which they occur is -fc and +fc. For the non-periodic part, that's this, that's why you get this thing delayed and advanced in frequency. Let me add up. So you now, once you multiply by the cosine, you shift it up so the spectrum of the original signal now gets centered to f sub, f sub c. Okay. This is a very important example because this is amplitude modulation, and we're going to be very interested in how that, how radio signals work. but we have to do that a little bit later. Right now, it's just and example for us exploring Fourier transforms. Okay. Let's start filtering. I think it's pretty easy to see that the integral of a signal is just a sum. So, we're summing up complex exponentials to create our signal X(t). So, in terms of the spectra in the frequency domain, the Fourier transform of the output is just equal to the transfer function times the Fourier transform of the input. So, to figure out how to filter a signal, like on our friend the pulse, with our friend the RC low-pass, what we're going to do is all we have to do is find the Fourier transform of our pulse, which we've already done. Transfer functions are already in the frequency domain, in most cases. So, we're going to figure out what X(f) is going to be p, P(f), going to be that, multiply them together. And then, we have to find the inverse transform of of Y(f) to figure out what Y(t) is. That's the program. Okay. So, we know what the spectrum is. I'm not going to write it in terms of the sync function because there's a reason that you'll see in just a second, okay? So, we've already calculated the spectrum little bit earlier. And now, we're going to multiply them together and I think, and this is the answer for the H * X is this complicated thing. So, all we need to do is find it's inverse for a transform. Okay. And so, we just need to plug all of that, [LAUGH] into there. I don't know about you but I don't think that's going to be in an integral table anywhere. It's a little too complicated. And it's got lots of working, moving pieces. And again, I hate doing integrals, I'd rather use the properties if I can. This is what I normally do. I try to use the properties first. And if those fail, then I result to doing integral. You get a lot more incite of what's going on if you use the properties. In, I'm going to use this example to show you what I mean by that. So, I'm just going to look at this expression of the Y(f) in some detail. Well, some things ought to stand out for you. First of all, what's this do? So here we have some spectrum over here. We multiply it by one, we just get it back. What happens when we multiply it by e^-j2πf delta? Multiply the spectrum e^-j2πf delta, what happens in the time domain? So, if we call this S(t), that's this inverse Fourier transform, this means time delay. And so, this term in the time domain is going to be S(t) minus delta. So, all we have to figure out is what's the inverse transform of this term. Okay. To do that, I'm going to reorder things just a little change to make it a little bit clearer. And what this looks like to me is I have some spectrum multiplied by 1/j2πf. Well, that means integrate. What's the spectrum? Okay. I'm going to point out that one of the examples we did was this decaying exponential formula, and we found out that the Fourier transform of this was that. This is almost as the same form as that. And to give it in that form, I'm going to multiply and divide this by RC, and I think we can see now that a in the formula corresponds to R1/C. We have this one up top. I'm going to divide by multiply by a, and that multiplies this side by a. Again, because the Fourier transform formulas are linear. If you multiply one by a constant, the other one gets multiplied by a constant. And so, I know that the inverse Fourier transform of this term is this. And now, we're almost done. Now, I just have to, I know that to j, 1/j2πf means integrate, so I just have to integrate this term again. This is an integral from minus infinity to T, it's always a definite integral, that's what integrate means. And so, that's what you get When you, perform the integral. And note that since this signal is zero for t less than zero, so is its integral. And everything in infinity is zero. Okay. And so, we're almost done. We know that this turnout here means delay. So, the final answer is that. It looks a little complicated, but actually we've seen this already. Remember, what happened when we took the periodic pulse train and sent it to our RC low-pass filter? I showed you some plots. I want to bring back one of those plots. So, the input here, if you recall, was the periodic pulse train. So, we have pulse there and the period was one millisecond. And it was like that. And you got that for an answer. Well, I can think about this periodic pulse train as being a superposition of pulses delayed, okay? So, that means I can think of the output as being the superposition of these outputs. And so, this formula should apply to that term. So, let's just not ignore this part for a second because that corresponds to this. And what we've done is put in a single pulse to figure out the answer. So now, I have a much clearer understanding of how this signal is constructed, but its structure is. Okay. So, let's go through it. The, this starts at zero, and what its going to do is go up and keep on going. And it has an asymptotic value of one, okay? The second term here, u(t) minus delta. Notice everything here is delay, delayed by delta, so this doesn't start until delta and it's going to be the negative of what we have over here, okay? So, at delta, you get the same thing headed toward -1. And when you add them up, you get this adds up and then it turns down, it goes down and it's going to go to zero since +1 and -1 will cancel when you add them up. And that's what is going on in this wave form. So, the shark fins that I referred to when we talked about the Fourier series, they actually consist of a rising exponential even, when minus, even -t of RC and then a decaying exponential, they are properties of this circuit because RC only comes from the circuit. I should point out that the formula for decaying exponential is frequently written like this, and it has a tail. And this is called the time constant of the exponential, just terminology. And so, the time constant of these exponentials here is RC. just a little fact, and R, so units of R * C by the way, are time, which is kind of interesting. Okay. So, this shows you how at least I calculate the output of a linear filter to any signal coming in. I find the Fourier transform of the signal, and then try to use the properties of the integrals, properties rather of the Fourier transform, to figure out what's going on. So we have finally finished our story of singnals in the frequency domain. So, if you have a periodic signal its spectrum is given by a Fourier series. If we have a non-periodic signal, it's the Fourier transform and its inverse Fourier transform that describe how you go back and forth. We now know how to filter anything in the frequency domain. we, if it's periodic, we use the Fourier series version of things. And if it's not periodic, we use the Fourier transform version of things. we either always decompose a signal into it's periodic, non-periodic parts, and then filter each separately and then add the results back in. Superposition, we use over, and over, and over again, it's very important. Well, we now know a lot, about how to think about signals. We can think about their structure in the time domain, we can think about their structure in the frequency domain. Our next video is going to talk about speech. I'm going to talk about the structure of speech and how it has both time domain and frequency domain parts. Really kind of interesting, in fact.