So in this video, we're going to continue our discussion of circuits that have any kind of element we want, capacitors, inductors and resistors. In the previous video, we found the solution of the circuit when the source was a complex exponential. Well, that's a mathematical We don't really, we can't really produce forces that look like that in the lab in the real world. So, is that just a mathematical thing that's kind of fun to play with, but it turns out it's much more important than that. We're going to see how to apply that knowledge we developed last time, and the source is a sinusoid. Turns out it's an easy extension of what we already have done. So let's review very quickly the way the so called Impedance method works. We start with our circuit. We pretend the source is a complex exponential and that means we can now only worry about complex amplitudes. We replace every element by, it's appropriate impedance, whatever it may be, and then we can use, what we learned from resistor circuits. Voltage divider, current divider, series parallesl relations, to figure out how the output variables, complex amplituded, is related to the complex amplitude of the source. Okay. So that's what we learned last time, except like now we're going to handle a bit more real world sources than complex exponentials. So what we did is we applied it to our simple RC circuit. we replaced it I thought about it as an impedence kind of circuit and want to make sure we note that this is a lowercase v and over here's supposed to be v and a t. This is lowercase v out of t, but over here we're only talking about the complex amplitude. So I'm thinking about this as being a complex exponential source. And now everything in this circuit is a complex amplitude. And what we discovered when we used our voltage divider for this circuit was that the amplitude of the source amplitude of the output rather, was equal to this quantity times the amplitude of the input, and I'm uncancelling the complex exponential so we get the entire answer. OK, so that's what happens when the source is a complex exponential. Well what I want now do is talk about the case where the source is a sinusoid. This sinusoid has a frequency F nought, and it has an amplitude of A. Okay, well, that's not the same as a complex exponential. So how does this result apply to the case where that's what the source really is? Well, the mathematical trick is where it's coming. We know from the Lewis formula that a cosine is equal to one half times e to the j theta, plus e to the minus j theta. A complex amp, ampli-, a complex exponential rather at an angle of, theta and a complex exponential adding angle of minus theta. That's a cosine. So that applies to the case where we have, theta here is just cosine 2 pi of naught t. So I think of this as being a positive frequency, complex exponential, and this being a negative frequency complex exponential. This may sound a little strange. Negative frequency things. But it turns out this is really very important, and the right way to think about it. So, we can figure out what the output is for each piece, at least. We know that if the source was that, is this term, that that's the output, and we know that if it's the negative frequency term, all we have to do is replace f by minus f, and we get the answer. So we know about each piece of the original cosine, and what the output is for each of those, but how about putting them together? How do we do that? Well, now we get to the really interesting conclusion. Now, so this is where we are. This, we used the complex exponential source to hop over to the impedance version. We used all of the tricks we've learned for resistance circuits, and now when the source is a I want to point out, that all cir-, the circuit elements we've been talking about, resistors, capacitors, inductors and the, interconnection laws, KVL and KCL are linear, which means superposition applies. Now, what the definition of linear was, that if the input consists of a sum of terms, the output also, the output consists of the sum of the outputs to each term considered separately, you just add them up and multiply by a constant if there are any out there. So, we're done. Based on what we've already know, we know the output, voltage. And this, notice this is lowercase v, is the output to the first term plus the output to the second term. Add it up and since there's a weighing factor of half, it goes there to, and this is because of superposition because the circuit elements we've been talking about are linear. This is why the linear concept is so important, really makes our ohms easy. Okay, so let's continue this. I'm going to show you how to simplify that answer. It looks little daunting as it seems right now, but there's little, another mathematical thing we can do. Now, so, this is Oilers formula for the cosine, and these source was 2 pi f naught t. And like I said I thought about this as a positive frequency term and a negative frequency term. There's another way of thinking about this. Suppose this is a complex number z, this is z conjugate. I'm adding them up, and dividing by 2. Well, that's the formula for the real part, and so we're actually writing the source as the real part of a complex. Pretty much. And on the output. Looks very similar, right? There's the positive frequency term. There's the negative frequency term. And that still is, something plus it's complex conjugate, divided by 2, that's the real part. So, this, if you will, is the trick. We, can think about, whne we have a source that is a sinusoid, what you think about is the real part of the complex exponential. The output is going to be the real part of the same complex exponential with the amplitude modified by what the circuit does. That we found using, voltage divider. Well, how do you find this real part? Well, mathematically, we have a situation where we have something in cartesan form, and something in polar form. And you need to, figure out how that real part, the easiest possible way. And your answer is, is to convert the Cartesian, form to Polar form. So, that's what I've done. So, the, so this is the ratio of something in Cartesian coordinates. 1, and the denominator. J2 pi F nought RC plus 1, and as I showed you, the magnitude of a ratio is the ratio of the magnitudes. So one obviously has magnitude of one, and the magnitude at the bottom is the imaginary part squared plus the real part squared, and you take the square root of result. Okay, that's where that comes from. The angle of a ratio is the angle of the numerator minus the angle of the denominator, and the angle of 1 is 0, and so what we're left with is, that's the angle. Okay, so, mpw we need to simplify further. All I'm going to do is merge the two complex exponential terms, and the term, because the exponents add, and now taking the real part is easy. Because, this is just some real number, so far as the mathematics is concerned, the only thing complex is, is this, and that's e to the j theta. And what the real part of the e to the j theta? That's just a cosine, so our answer is, we're in the source. It goes a cosine 2 pi f of t Now put is also a sine wave with a same frequency but with a different phase and a different amplitude. Very nice, and it turns out that result is quite general. So let us preview again how we found it. I really want to make sure we get this down. So, the source was a sinusoid. I thought about it as the real part. I know by converting to impedances, that this is the way the amplitude of the output is related to the amplitude of the source, and over here, that is VN. Right, because that's the amplitude of that complex exponent. We now know that the alpha is the real part, where you put in how the circuit transformed the voltage amplitudes, and just finding real part is just like using the procedure you did. converting the polar form, gives us our final answer. Looks a little complicated, but we'll, understand what this means in just a second. We'll have a clearer interpretation of it. Now, let's just handle in a little bit more general case. Suppose there was a phase, a source out of phase. Well, the way that works out is now V in is Ae to the j phi. So it really is a complex number now. Using impedances, we're always going to find that the complex amplitude of the output is equal to something what that is the circuit does, times complex amplitude of the source. This something it does is called a transfer function. And, if you look back over what we've done, it always depends on frequency. So that's why I had to put the frequency of the source, f naught. And I'm just going to define that In general, it's the ratio of the complex amplitude and the output divided by the complex amplitude of the source. This captures, the transfer function captures what the circuit does to the amplitude and what it does to the phase. So, here's what's going on. We've found using impedances that that's the transfer function in Cartesian form, and as we've seen it's, much easier to deal with mathematically if we convert that to Polar form. This is routinely what we do for any circuit. Using impedances, we're going to wind up with a result in Cartesian form. We then have to do some Calculations to figure out what it is in polar form. And then, it gets very easy to figure out what the output is. So, when the input is that, the output is always this. For any circuit containing resistors, capacitors, and inductors. That's always the answer. This is very very general. So we now can see that assuming this source was a complex exponential, it actually had a big payoff because the circuit was linear. Now I'm going to point out some mathematical details that are very important, and that is, suppose we had a sine wave, a real sine? Okay, well the easiest way to think about sin is as the imaginary part of something. When everything goes through the superposition, still goes through because of the [INAUDIBLE] formula, and you also use imaginary part, and this is very important. So, however you define, the, source is being related to a complex exponential, either by an imaginary part or a real part. You use the same representation for the ouput. Sum when it influence that, now put as this, and and that's a very, again a general result. You can use either the real part or imaginary part, whichever one is easier, on the point out that you can actually work this the hard way if you will, you can assume a cosine is the imaginary part of something. Notice the presence of this because of the phase shift by power of 2, represent the sign as the real part of something if you want to. Should actually go back, over our little example, RC circuit example, once you try and using the imaginary part and see, see if you get the same answer. We've got using the real part except we have to change the amplitude of the source by e to the j pi over 2. You better get the same answer once you simplify things, and trust me, you will. Okay. So, here's the big picture. for any circuit we have, pretend the circuit is a complex exponential [INAUDIBLE] although it really isn't. Use impedances to find the transfer function. And now we express the source as the real part or imaginary part of a complex exponential. This works for sinusoidal sources. And the output is going to be the real part or the imaginary part, whichever one we assumed. Don't try to switch them, of the transfer function times the complex exponential of the source. That's the procedure using impedances to solve any circuit that has a sinusoidal source. So, let's go through this for an example, and we ought to try something bit more interesting than, RC circuit. And, what I am showing you here, is what's known as a RLC circuit. So, our circuit now has a capacitor, a resistor, and an inductor. The source is this, and I'm going to ask you two questions. I'm going to find the transfer function, and I'm going to find the output for this input. Okay. So we now know, we know what to do. So here we go. So the first thing we do is we take our circuit and replace it by one having impedances, for again these are conflict amplitudes. Now I've done a little notational thing for you here. The impedance of this one ferrite capacity is 1 over j 2 pi f. Well, to simplify the mathematics and manipulation of these formulas. As you'll see, going to see in a second, it gets pretty complicated. I like to think of j2 pi f as a single variable s, and then write the impedance that way as just being, of the capacitors being 1 over S. What I'm going to do is, use current divider, voltage divider. those tools. And then, at the end, replace S as J2 pi F. So, the impedance of a 1 farad capacitor is 1 over s. The impedance of R2 of 2 ohm resistors is 2, and we, impedance of our 4 Henry conductor is 4s. Okay, so we now what to find V out. Okay, so The complex amplitude V-out , is pretty clear that this is a parallel combination series with that impedance. So, I use voltage divider, and I find that V-out over V-in is equal to 2, and parallel with 4s divided 2 and parallel with 4s plus 1 over s. Okay? So, now we multiply everything all out. We get 8s over 2 plus 4s divided 8s over 2 plus 4s plus 1 divided s. Bet you didn't know that electrical engineers have to very fluent with fractions. This turns out to be one of the things that happens all the time. You can see now why it did not want to write j2 pi f over it, because it's complicated enough as it is. This happens all the time obviously. Alright. So, we can, do some things to simplify this. The first thing is, notice that this ratio has some 2's in it, we can cancel. We got 4 we got 1, make that 2, we got 4, we got 2. Now we can simplify this. So, I'm going to multiply top and bottom by s. Okay. you get rid of that. That puts an S square there. Oops, squared. And that's a squared there, and we multiply top and bottom by 1 plus 2 S, which gets rid of it down and there and up there and this becomes 1 plus 2s. Okay, so, what we get, I know you can't read that. It's very difficult to read, so let me write it for you. It's 2s squared, I'm sorry, 4s squared divided by 4s squared plus 1 plus 2s. Okay? So, this is the name of the game. Use the parallel and the series rule. Here we use voltage divider, parallel rule, series rules and then we simplify it, and really makes your life a hole lot simpler to use s for j 2pi f. So, this is what you get, and now I can write it in terms of f, which is what you need to do in order to solve for our sinusoidal source. We need this h of f, and here it is in all its glory. So s squared is going to be 4 pi minus 4 pi f squared times the 4 gives us the 16 etc. So this is what it is. So, at this point, what I would like to do is find the frequency of the source. So, the, the frequency, this has to be written as 2 pi. F, t. So, 2pi f, has to be a half for this example, which means the frequency, is 1 over 4pi. Kind of a strange frequency, but it really simplifies the calculation for this example. I now want to find the value of the transfer function at that frequency. And, like I said, this is really, makes this assumption of that frequency value, really makes, the calculations very simple, because the numerator just turns out to be minus 1. Put that same term here. This becomes j, and the 1 is 1. So we get minus 1 over J, and reciprocal of J is minus j. So we get J for an answer. So our transfer function at the frequency of the source, that's all we need to know, is what the transfer function is at the frequency of the source, is J, through the phase shift. So, now we get to figure out what the output is. So, I'm going to think about our sinusoid as being the imaginary part Since it's a sine wave, probably makes it easier. And it's 10, e to the jt over 2. Well, we know that the output is going to be the imaginary part of 10j, e to the j, t over 2. Where j is that transfer function evaluated at the frequency of the source. And, j, again, it's in Cartesian form. Convert to polar form, and that's our answer. And, I know from the trig identities, that that's just cosine. So, we stick in 10, it turns out it's a very special frequency. because what this really does,at that frequency is convert the sine to a cosine, and it as the same amplitude. That's really pretty surprising, but again I have chosen a frequency that makes the calculations easy, and that's basically why that happened. In general, as we know, it's going to produce a sine wave at the same frequency with a different phase, and a different amplitude. We choose a different, frequency, this amplitude, will, definitely be different than 10. Okay. Now. I've taught this course for many years, and I've learned what students do that isn't correct. So I want to talk little bit about what not to do. How to use impedances so here's the name of the game. You start with a circuit. We know the input, provided it is the imaginary part of something, How do we find the transfer function, and we evaluate it at the frequency of the source, and we now know since I used imaginary part here, that that is the imaginary part here and that's the correct approach. Okay. Transfer function evaluated at the frequency of the source. We get that from that formula times the, complex amplitude representing, the, source, with, along with it's complex exponential frequency, we take the imaginary part. Well, I have seen students do the following. They just say well, let's assign this little source, you told me it's just the transfer function times that. Well, that's clearly wrong. At least in this example know that the transfer function of that frequency is j. So why in the world would you put in a real value input and come out with something that's complex valued? This is wrong, you have to think of the source as a complex exponential, and then things go through. So this is not correct. Another thing that isn't very good is to mix the two things together. So, you just stick in the source, multiply by the transfer function of the right frequency, and take the measuring part. Now that's not what you have to do. There's this intermediate step, remember, pretending the source is a complex exponential. That's the right formula. This is wrong. Okay. So, I hope this helps. We now know a very general result. The output for any sinusoidal input of a circuit is going to be the, a sinusoid at the same frequency, and the way we find it is by converting to complex exponential form and then taking, multiplying by the transfer function, and taking the real or imaginary part, depending on how we chose to do. Learn more about, how to use impedances to figure out what these kind of transfer functions do, and to get a much more general, broader picture of circuits.