In this video, we're going to continue our discussion of general circuits. Circuits that contain resistors, capacitors, and inductors. And we're going to interpret the results we've gained already. We're going to, show, that simple circuits function like what we call filters. We'll define those in just a second. we'll extend our ideas of the equivalent circuits to the case where we have impedances and it's very straightforward and we'll also use impedances to talk about what's called complex power, makes it very easy to do power calculations when you use complex power. Okay. So, big question is what is this circuit doing? We have, we can figure out its output, but let's review how we got that output first and the solar input, and this will lead us to an understanding of what the circuit is really doing. So, what we did is that we assume that the source was a sinusoid of some sort. We assumed a times a cosine 2 pi f naught t and we wrote that as the real part. This is the critical thing, the real part of a complex exponential, because once you assume things are complex exponential, the calculation of the transfer function is very, very easy. So, we assume it was a conflict exponential. We derive a relationship between a complex input to the input and the complex input to the output by using voltage divider. Very simple calculations, and this, we're going to concentrate on, this is the transfer function. But in any case, now that we knew what the complex amplitude of the output was, it was very easy to find out what the actual waveform in time is, because we simply put it into the real part for a minute, because we used real part here. We're going to use real part calculations down there, and we discovered that the output was given by this rather complicated looking expression. But we're going to, figure out what it's really telling us in just a second. one critical thing we had to do in order to arrive this result, was we had to convert this expression for the transfer function into polar form. And it turns out that's the way we think about transfer functions, not in Cartesian form, but in polar form. So, here it is. I've written H(f) in terms of its magnitude, which is the quantity here and in terms of a phase, which was given by this, and then, those are the pieces that fit in in here. A little subtle detail here is that here, we assume the frequency is at zero and if zero occurs down in the expressions for the final output. And now, I want to think about the transfer function as a general function of f, as a function of frequency, that's going to be the key insight into what the circuit is doing. And so, you'll notice the notation of a change. So, here's that formula for the transfer function and the form for this circuit and I'm going to plot it. So, this is what it looks like. We plot the magnitude and phase, usually, they're plotted one on top of the other. There is the magnitude, there is the angle. So you can compare what's happening to the phase and the magnitude at some given frequency. Okay. So lets look at this. the general rule of exploring these transfer functions to look at what happens at very low frequencies, as f is going to zero, and at very high frequencies, as f is going to infinity. So, at zero frequency this is an easy calculation, mideterms, it has a value of one. Okay? As f gets very big, when this term is a whole lot bigger than that, because the square root, the magnitude is falling down like 1/f, going down like one over frequency. And in between, it's a nice smooth curve getting between those two extremes, the constant and behaving like 1/f. The phase, it is simply an arctangent function with a minus sign. So this is the arctangent function, very simple. It's heading toward minus pi over two as frequency gets big, and it's zero at the origin. Okay. There's something to notice here. I'm plotting this as a function of both positive frequency and negative frequency. As we saw in previous videos turns out sines and cosines actually consist of two complex exponential terms among the + and one with a -. So, negative frequency certainly exist, and this, and you should plot your magnitude and phase as a, realize that they're both positive and negative frequency components. However, it turns out there's a pretty easy thing to see in this example and it's going to happen in general. And that is, for the magnitude, it's a symmetric function about the origin having what we call even symmetry. And what that means is that a magnitude of H(f) is equal to the magnitude of H(f), of (-f), that's called even symmetry. And all magnitudes of transfer functions of circuits and general systems have this property. So, you can just tell me what the positive axis looks like and I can plot for you what happens if negative frequency very easily. It's a mirror image, so it's a very easy thing to do. The phase has very similar kind of symmetries and it has what's called odd symmetry, and that is that the angle of H(f) is equal to the negative of the angle of H(-f), and that's always true. So, again, if I tell you what happens at over the positive frequency axis, it has negative symmetry and that the odd symmetry, negative symmetry in that, this part is going to be the negative of what it is over here. So again, I gave, I give you the positive frequency part for both the magnitude and the phase. You can fill in what happens at negative frequency easily. I should mention that this is a, the e, the magnitude being even and the phase being odd, is a way of talking about what's called conjugate symmetry and that H(f) is equal to H conjugate of -f. Turns out, another way of thinking that even in, even symmetry for the magnitude, odd symmetry for the phase is that H(f) equals H conjugate of -f. And I writed that, again, to make it very clear. Conjugate symmetry means that H(f) is equal to the conjugate of what is happening at negative frequency. So all transfer functions have this property, so it makes it very easy to do your plotting and everything else. Well, okay, but what is this curve telling us? Particularly, the magnitude? So, as frequency increases, the, the output voltage, V out, will be getting smaller and smaller and smaller, so I'm assuming is that the input voltage, the amplitude of our sign wave is a constant across all frequency. And as I change the frequency of that input, the output, just because of the action of the circuit is going to get smaller and smaller and smaller. Okay? That's what we call a lowpass filter. And, I'm going to, give you the reason for the word filter here in just a second, for the lowpass I think is pretty straightforward. It's passing through, letting through, things in the low frequency range, and things at higher frequency ranges tend to be suppressed, and when we see that, how that happens, through a very simple example. Suppose our input voltage consisted of a sum of two sinusoids, f1 and f2, and you can see I've allowed them to have general amplitudes. What's the output going to be when the input consists of a sum of two sinusoid's? Well, we're going to use the principle superposition of course, because the circuits are linear. So, when you have the input is equal to the first sinusoid, we know what the output is. And the input is equal to just the second sinusoid, we know what the output is, and then the output input rather consists of the sum of those two superposition applies you just add those answers up. That is the beauty of having a linear circuit, this is the very definition of being linear. The output for sum is equal to the sum of the outputs. Okay. So, what's happening here? Let's assume that f1 is down here somewhere and lets assume that f2 is out here somewhere. So, let's assume for the sake of argument, that the amplitudes of these are about the same. Now, what's going to happen on the output side is that, the transfer function at f2 is much smaller than it is at frequency f1. So, this term, is going to be attenuated. Filter is the term. It's going to tend to filter out the high frequency term. So the terminology is that the low frequency area, the place where you get frequency region over which things get through is called the passband, the band of frequencies over signals pass through. And for frequencies that are much higher, herein, was called the stopband, the circuit, the filter tends to stop that from coming out. So this again is a low pass, because it's in the low frequency regions that get passed through and the high frequencies tend to be attenuated. So, let's get, so what's, high and what's low? Well, you can see this curve is very gradual and it's not as if there's, there's was, a clear delineation between the two. an ideal low pass would have a frequency characteristic that looks like this. So, let's say it has a gain of one at low frequencies in and in it, instantly jumps down, and at some frequency, goes to zero. That would be what we call an ideal low pass. Well, the RC filter, we have, certainly doesn't have that characteristic, but we can think about it by defining what's called a cutoff frequency. So, the cutoff frequency is generally defined with frequency at which the magnitude at that frequency is one over the square root of two times the maximum value of the magnitude, wherever that occurred in the frequency. So for a lowpass, this maximum is occuring and the orgin has a maximum of one. And you change frequency till it's, the output is equal to one over the square root of two of the value at the origin, which here is one. And the, what, why one over the square root of two, you might be asking? If you think about that for a second, what could be so important about the one over square root of two? And the answer is power, so, at this frequency, because power is proportional to signal squared. The power of this, of the sinusoid at this cutoff frequency, will be 1/2, of the value it is at the maximum. So this cutoff frequency, the power at the, in the output will be 1/2 of what it was at the origin. If you go to higher frequencies, the power output gets less, and less, and less, and less at those frequencies. So, for our RC lowpass, we need to look at the formula to figure out where the cutoff frequency is. And it's pretty easy in this case, because we know at f = 0 the value is one. And the frequency at which it's, this square root is going to be two is when this term equals one. And so solving for that, we get that the cutoff frequency is equal to one over two pi times R times C. So, when it comes to designing a circuit, suppose you wanted to design a filter that would pass yeah, it have a cutoff frequency of 1 kilohertz. Well, what you do is set this equal to, to a thousand, and what you'd find is that the only thing that you need is for the product of R and C to be over two pi. So the important point here is that it's the product of the component names. We've seen this before. You have, the only thing you need is the product to have certain property, so you can choose the resistor and capacitor separately according to whatever criteria you want. But the, the product of the two is what determines the quality frequency, and so not the individual component you use. It gives you some latitude in doing the design. Okay. So it turns out there are more kind of filters out there of lowpass. So the lowpass we've talked about. So, and generically, I'm only going to draw the positive frequency axis, because we know its going to happen through the magnitude. generally look something like that. So generic lowpass which has a cutoff frequency somewhere there, where this value here is one over square root of two times whatever the value is at the, at the, at zero frequency. You can also have a pass go through. Highpass, what it looks like is pretty easy to see where the name comes from. It tends to suppress low frequencies, let through the higher frequencies and its cutoff frequency will be similar here. And that value is one over the square root of two times whatever the value is at infinite frequency. And then finally there's the bandpass filter which, what this means is that it passes a range of frequencies and suppresses the other ones. So, if you plotted it, it tends to look something like that and this means it has two cutoff frequencies, a lower cutoff frequency and an upper cutoff frequency. We refer to the width, the distance between the two cutoff frequencies as being the bandwidth of the filter. And that's an important parameter when you start talking about band bass filters. sometimes we refer to the upper and lower cutoff frequencies. Other times, we might refer to the center of the band, and the bandwith specifying the bandpass forward whichever way seems most convenient. We're going to discover, as we go through this course, that all these folders have very important uses and occur very frequently in real world application. Okay, I want to explore what really happens when you build a RC lowpass when, because you can see, I want to use specific elements that I use for, I really constructed this circuit. The input is going to be a sine wave. And we know that, from all we've done that the output for a general filter is going to be the transfer function, magnitude of the transfer function times the sine plus the sine wave with a given, that has a phase shift given by the volt. And we have calculated this for the RC lowpass several times, and we know that what it's going to do, is the magnitude is given by this expression in the phase, is given by this. Okay. So, first thing we want to do is calculate exactly where the cutoff frequency is going to be. To do that, we need to find out where the magnitude is it's maximum value and it's pretty clear from this expression that the maximum value occurs at a frequency of zero, this is after all a lowpass filter. And then, we want to see where the magnitude is one over the square root of two times that maximum value, which in this case is one. So, it's pretty clear that it's going to be equal to one over the square root of two and this expression equals one, because we had the square root of 1 + 1, will give us what we want. So, we've calculated this several times and we know that the answer is with the cutoff frequencies given by one over two pi RC. And when you stick in the explicit values, for our circuit element values, we have 10^4 for the resistor, and this is 220 nanofarads. Like I said, you don't usually have very large value capacitors in circuits, so, and we get 72.34 Hertz. We'll have to see if that really works, really happens when you look at the out, output of the circuit that has these circuit elements. When you plot this, some things that I want to note before we go to the simulation we predict the cutoff frequency is going to be 72.34 which is a frequency somewhere like this. Well, I want to point out something, it's a special thing for this RC lowpass. Where is the phase, what is the phase at the cut off frequency? Well, then, the fc in the frequency is equal to one pi RC. This expression is one, the arctangent of one is pi over four, 35 degrees, so the phase will be - 45 at that point. Okay. So here is what we should expect. When you have frequencies less than fc, the amplitude of the output should be going up until it gets to very low frequencies, it should be about the same as the input. The phase shift will become smaller and smaller and smaller, and then again, as you go toward zero in frequency, the output in terms of its phase shift will also look like the input. On the other hand, if you go way beyond the cutoff frequency, the amplitude of the output will be going down and down and down and down and the phase shift is headed toward minus 90 degrees, minus pi over two. So, what is sine of two pi ft minus pi over two? What is that equal? And what I get is that that is minus cosine. Okay. So that's what we do, should expect. As the frequency gets very high, amptitude gets smaller and smaller and smaller, and the phase is going, the output is going to look more and more like a minus cosine when all is said and done. Well, let's see if that really happens. So here is my input, the frequency is, here is the frequency generator, is setting up a sine. This output number here is the peak to peak amplitude of the output, while 80 Hertz is a little bit above the cutoff frequency, so the amplitude should be 1.414. If we're at the cutoff frequency, it's a little lower than that, because we're too high in frequency. I've lowered it to a 74 1/2, getting closer to 1.414, but it's not quite correct. I've put in 73.2, it's getting closer. And, you, for this oscilloscope, we could have typed it in all the time. So we point out that the white line is the input to our circuit, the red line is the output. So you can see the amplitude is down by some amount and this is telling exactly what it is. Right? Well, let's explore what happens as I go to the lower frequency. So I gotta change the what's called the time base of my oscilloscope. I'm going to make it go down by a factor of ten in frequency. Right now, it's 7.3 Hertz. And as you can see, the red line, the output is almost the same as the white line, the input to the filter, and it's got very little phase shift and that's exactly what we should predict. Let's go back to 70, 73 Hertz and we can see how the amplitude's going down like it should. Now, I'm going to set it up to go up to a very high frequency and you can see the output is greatly attenuated. And if you look carefully at that waveform, it looks to me like it looks like a minus cosine to me, so all the theoretical predictions are correct. Now, what I'm going to do is go back to our original setting, original frequency, and I'm going to variate continuously now, so we can see the go up, in frequency, so the amplitude will be going down as the frequency goes up just as predicted. The phase shift keeps increasing, getting more negative. And then, if we go back the other way, we see the amp, amplitude go up and keep going down, down, down in frequency, below the cutoff frequency now, well inside, looks more and more like the input. Okay. So, let's talk about the big picture. We're going to make sure we really understand what's been happening here. We started with a circuit. We assumed complex exponential input, which meant that every voltage and every current in the circuit was also a complex exponential. Based on that notion, we defined impedance and converted the circuit to being an equivalent circuit, so far as complex amplitudes are concerned so that we had impedances representing the circuit elements. Because of this use, assuming complex exponential inputs, we can now use all the shortcuts that we developed for resistor circuits and this makes the calculations quite easy. and, I think it'd be pretty obvious that the Mayer-Norton and Thevenin equivalents follow just as well. So, since they were based simply on using that series imparallel rules and, and even a bit more generally. The Thevenin equivalent, when you have impedances, is exactly the same, except this is now an impedance and this is a complex amplitude. So the frequency of the source is implicit. All we care about in representing that circuit with a Thevenin equivalent are the equivalent source and the equivalent impedance, and the Mayer-Norton has exactly the same properties we decide, drew out the four. The two impedances are the same and that's the amplitude of the current source. And that same formula applies for that we derive, with four impedances, that the equivalent. amplitude, the amplitude is of the equivalent circuit, obey this relationship and that's the equivalent impedance, so there's no real surprise there. And you can now use these equivalents in RLC circuits just like we did for resistor circuits. Okay. Well, there's something else that becomes much very easy to talk about, when we have complex exponential or sinusoidal sources. So, again I'm going to think about all my circuit elements as being an impedance with some complex amplitude for the voltage and complex amplitude for the current coming in. And now what I'm going to do, going to do is a power calculation, so I'm going to do this in general. I'm going to assume that the complex amplitudes has a magnitude and a phase for both the current and the voltage. Okay? Which means that speaking about them back in, its time-domain quantities the, here is the magnitude, there, there is the magnitude for the voltage and there is that phase shift. So I'm thinking about my v, v(t) as being the real part of this. And for i(t) you take the real part of, of that. There you go. Well, we know what power is. Power is always voltage times current. Well, I could plug in these two formulas into here and try to simplify it. Turns out there is a much easier way, which I'm going to show you, which actually brings up a very interesting form. So, I'm going to do that calculation in a slightly different way. What I want to do is use Euler's formula. So, in addition to, we can explicitly write out the real part of the rule, formula, as being just Euler's formula. We've seen how this works before. Now, is what I want to do is I want to plug that in. I want to plug these expressions in to that product. Well, it's very easy to multiply this out and it turns that become, it really simplifies the calculations a lot. So, the way to think about this is that the voltage is now a sum, the current is now a sum, so when you multiply the two together, you get all four possible cross-products. This times this, this times that, that times that, and that times that. So if we multiply them out, you can notice that some terms, the complex exponential part cancels, and for other terms, the complex exponential adds. And when everything is said and done, this is the expression that you get. Well, this is quite interesting. Now, if we look at the, these two for example, this is the complex conjugate of that. Right? Because the conjugate of a product is the product of the conjugate. V conjugate, V, the conjugate of V is V conjugate, and the conjugate of I conjugate is just I, we get it back again. Same thing happens out here. This is the conjugate of that. So, those are real parts. And noice, because we multiply by a quarter, we would have to put a half factor in to get the real part in the final answer. So, what does this say about the power when you this is the actual power. There's nothing complex here at all. Those are actual power values, P(t) is equal to some number and then you get a term that turns out to have a frequency, which is ft, twice the frequecy of the source. So if you plot this, this term is a constant, it's a function of time now and rippling around it, somehow is the time varying part. Well, we know that energy is the integral of power, so the time varying part really doesn't contribute over the long term to energy consumption. Sometimes, it goes to zero, and this thing, and this term goes to, this pulses goes to zero and sometimes goes positive. The only thing that contributes long term is that term, and that's called the average power. this is a general result for all RLC circuits. And if the source is a exponential, I'm sorry, is a sinusoid, which we think of as a complex exponential. So, average power that is consumed is given by the real part, half the real part of the I conjugate, for these are the complex amplitudes of the circuit element where, where you met the power consumption flow. So, this is what is known as complex power. so in general the only thing that's really important is the P ave term. I'm sorry, is the P average is the real part of complex power. And, whenever we have an impedance, it turns out this formula for complex power can be rewritten in terms of impedance. So, just plugging in the relationship for impedance in the VI conjugate formula, we can write it either as z times magnitude of the current squared or one over the impedance times the magnitude of the voltage squared. I'm going to stick with this one because it is a little bit simpler. And let's see what it looks like for all the three common circuit elements. And certainly, we've seen this before. For the resistor, the power is just 1/2 R times the magnitude of the current squared and there is no imaginary part, so the real part of that is just what you've got. Again, stating its resistors that dissipate power. For the capacitor though, the impedence is complex. So, it is imaginary value, right here. So that means when you take the real part, you get zero. Again, this is saying that the capicators as well as the inductors do not dissipate power. And, what they contribute to, is that time-varying part, that part where the, the power consumption goes up and down. So, sometimes they consume power, sometimes they give it back in certain times, but in the long term is they, they don't consume or produce power when you have a sinusoidal input. Okay. So, in summary, my thinking of each element as a complex valued resistor, what we call an impedance. We get a general picture of what circuits do and how they behave. We can use to solve those circuits, we can use the series of parallel rules voltage divider, current divider. We can use the equivalent circuits, we can talk about transfer functions and filters, these are going to be very important concepts coming up, transfer functions are going to come all the time filtering thinking about transfer functions is what kind of categorize them according to what kind of filter they are. We have to plot the transfer function and see how it works out. Weou can also talk about power using just the complex amplitudes, we don't have to really go back solve for what the v and i are, and then multiply now and get it, we have a very general formula just from using the complex amplitudes. Now, I want, do want to point out, it's very important, that we, these results only apply when the source is a sinusoid. Remember, what we did was assume that the source was the real part of something that looked like a complex exponential, and so, all these formulas apply only when we have a sinusoidal input. When it's a sum of sinusoids, superposition applies and we know how to solve that. Well, you might be wondering, what happens if it's not a sinusoid? For example, suppose it's a pulse or a square wave? There's other signals we've been talking about. Have we gone down a blind alley? Is this going to go anywhere? as you might think, this is not the end of the story. We can talk about very general source, source wave forms other than sinusoids. It turns out these are the building blocks that we're going to use later in the course.