0:00:05.600,0:00:10.290 >> Now, I want to spend some time talking about operational amplifiers. 0:00:10.290,0:00:15.645 Operational amplifiers are a device that gets used a lot in electrical circuits. 0:00:15.645,0:00:18.460 You will see them over and over again this semester. 0:00:18.460,0:00:20.670 They get used a lot in instrumentation systems. 0:00:20.670,0:00:24.030 They get used a lot in control systems, etc, etc. 0:00:24.030,0:00:27.450 They're quite often the basis for electrical circuits, 0:00:27.450,0:00:30.210 which perform mathematical operations. 0:00:30.210,0:00:33.450 That's why they're called operational amplifiers. 0:00:33.450,0:00:37.595 Now, there's one point that has to be made very clear up front. 0:00:37.595,0:00:40.055 These are not a passive device. 0:00:40.055,0:00:43.370 So far, with the exception of our power sources, 0:00:43.370,0:00:48.440 all of our circuit elements have been passive than resistors, essentially. 0:00:48.440,0:00:55.115 That means that the energy delivered by the circuit to the element is non-negative. 0:00:55.115,0:01:01.405 This element does not create power out of somewhere else and provide it to the circuit. 0:01:01.405,0:01:06.180 Okay, it has to get any energy that it has from the circuit. 0:01:06.520,0:01:11.255 Operational amplifiers are in active device. 0:01:11.255,0:01:15.690 Okay. They will deliver power to your circuit. 0:01:16.210,0:01:23.630 The way they deliver power to your circuit is because they have an external power supply. 0:01:23.630,0:01:27.560 There's some other magical device somewhere that is feeding 0:01:27.560,0:01:31.685 these guys power, which these guys can then provide to your circuit. 0:01:31.685,0:01:37.415 I will tend to abbreviate operational amplifiers as op-amps. 0:01:37.415,0:01:41.610 That's very common, primarily, just to save syllables. 0:01:41.860,0:01:45.215 Quick overview of operational amplifiers. 0:01:45.215,0:01:48.395 We're going to think of operational amplifiers as a device. 0:01:48.395,0:01:51.835 It's something that performs some task. 0:01:51.835,0:01:55.670 So, we're going to think of them as a black box. 0:01:55.670,0:01:58.860 There is a bunch of internal circuitry in these guys. 0:01:58.860,0:02:02.390 We won't be analyzing these on that level. 0:02:02.390,0:02:04.340 Okay. They're going to be a black box that has 0:02:04.340,0:02:06.665 essentially some input output characteristic. 0:02:06.665,0:02:08.824 That's all we care about. 0:02:08.824,0:02:13.670 One of the drawbacks of dealing with things this way is that it may 0:02:13.670,0:02:18.230 appear as if KCL and KVL don't apply to these guys. 0:02:18.230,0:02:19.745 That's not true. 0:02:19.745,0:02:25.520 If you model the internal circuitry, these guys do satisfy KVL and KCL. 0:02:25.520,0:02:29.575 It's just that there's something very complicated going on inside there. 0:02:29.575,0:02:32.180 Number one, they've got an external power supply that's 0:02:32.180,0:02:35.180 feeding them current or voltage or whatever, 0:02:35.180,0:02:38.360 that we are generally not going to worry too much about when we're 0:02:38.360,0:02:41.970 looking at the op-amp as part of an overall circuit. 0:02:41.970,0:02:46.250 So, what we're going to end up with are several rules 0:02:46.250,0:02:48.940 for how the op-amp is going to behave. 0:02:48.940,0:02:53.705 Okay. Those are based on an analysis of the internal circuitry, 0:02:53.705,0:02:56.270 but we aren't going to worry about that translation. 0:02:56.270,0:02:58.100 We're just going to have a few rules that we're going to say 0:02:58.100,0:03:00.290 this is the way this device behaves, 0:03:00.290,0:03:04.740 we're going to forget about it until a 400-level class later on. 0:03:04.740,0:03:09.200 So, we're going to use op-amps to perform operations, 0:03:09.200,0:03:13.370 but we don't need to actually design and build the operational amplifiers 0:03:13.370,0:03:19.050 themselves or analyze them on a detailed level at this stage in our career. 0:03:19.370,0:03:26.465 Here's a schematic of a very common 741 operational amplifier. 0:03:26.465,0:03:28.370 You can see that it's pretty complex. 0:03:28.370,0:03:31.895 It has a whole bunch of bipolar junction transistors in it. 0:03:31.895,0:03:36.410 It has a bunch of resistors. It has a couple of inputs. 0:03:36.410,0:03:40.850 It has an output. It has a couple of external power supplies and 0:03:40.850,0:03:44.405 it's got some stuff here that we don't even need to worry about yet. 0:03:44.405,0:03:47.810 But we aren't going to deal with this internal view of 0:03:47.810,0:03:52.320 the operational amplifier, we're going to treat it as a black box. 0:03:52.360,0:03:57.200 Okay, our high level view of an operational amplifier is going to be to 0:03:57.200,0:04:01.570 represent it just as this rightward pointing triangle. 0:04:01.570,0:04:07.280 This device has three terminals. There are two input terminals. 0:04:07.280,0:04:10.190 They have a positive and a negative sign associated with 0:04:10.190,0:04:13.775 them and one output terminal here. 0:04:13.775,0:04:20.149 V_n is the voltage applied at the inverting or negative input terminal. 0:04:20.149,0:04:26.525 V_p is the voltage applied at the non-inverting or positive input terminal. 0:04:26.525,0:04:32.020 The out comes at the output of the operational amplifier. 0:04:32.020,0:04:34.730 Now, there are a number of parameters that 0:04:34.730,0:04:39.900 this operational amplifiers operation is going to be characterized relative to. 0:04:39.900,0:04:44.330 They're not necessarily these individual values, they're something else. 0:04:44.330,0:04:47.210 The first of these is the difference in 0:04:47.210,0:04:50.605 voltage between the inverting and non-inverting terminals. 0:04:50.605,0:04:54.060 The change in voltage between V_p and V_n. 0:04:54.060,0:05:02.555 So, Delta V_in is V_p minus V sub n. That's the voltage difference. 0:05:02.555,0:05:06.950 Keep in mind that generally, according to our operational amplifier behavior, 0:05:06.950,0:05:09.650 we don't care what these individual voltages are, 0:05:09.650,0:05:13.105 we just care what the difference is between them. 0:05:13.105,0:05:15.800 The other thing that you use to characterize 0:05:15.800,0:05:20.650 operational amplifier behavior are the currents into the input terminals. 0:05:20.650,0:05:25.865 We'll have some current into the positive or non-inverting terminal and 0:05:25.865,0:05:29.680 some other current into the negative or inverting terminal. 0:05:29.680,0:05:32.390 Okay, these parameters are what we're going to base 0:05:32.390,0:05:36.230 our rules of operational amplifier behavior on. 0:05:36.230,0:05:39.920 Now, I want to provide the rules by which we will 0:05:39.920,0:05:43.100 characterize the operational amplifiers behavior. 0:05:43.100,0:05:45.740 In order to do that, I want to give a slightly more 0:05:45.740,0:05:49.295 complete symbol for the operational amplifier. 0:05:49.295,0:05:55.190 I said that the operational amplifier requires an external power supply to do its job. 0:05:55.190,0:05:57.890 The power supplies are provided here and here. 0:05:57.890,0:06:00.860 There are actually two additional terminals 0:06:00.860,0:06:04.295 that we need to worry about for five terminals in all. 0:06:04.295,0:06:08.480 Generally, when I'm analyzing a circuit, I'll leave these off 0:06:08.480,0:06:12.080 and just in the back of my mind, recognize that they're there, 0:06:12.080,0:06:14.875 but for right now, I need to put them back in. 0:06:14.875,0:06:19.610 Now, I said earlier, that the operation is going to be characterized by this difference in 0:06:19.610,0:06:27.230 voltage delta V_in and the currents into the non-inverting and inverting input terminals. 0:06:27.230,0:06:30.380 So, when we see one of these devices, 0:06:30.380,0:06:32.615 we're going to make the following assumptions. 0:06:32.615,0:06:37.820 These assumptions are relative to ideal operational amplifiers. 0:06:37.820,0:06:42.110 We will assume that the current into 0:06:42.110,0:06:47.270 the non-inverting and the inverting input terminals are both zero. 0:06:47.270,0:06:52.075 This device is not accepting any power into these terminals. 0:06:52.075,0:06:57.080 So, any power that comes into the output comes from the power 0:06:57.080,0:07:00.560 supplies that you've connected up here and here. 0:07:00.560,0:07:05.000 We're also going to assume that the difference in voltage 0:07:05.000,0:07:10.500 between the positive and negative terminals has to be zero. 0:07:10.600,0:07:23.880 Therefore, V_p is going to be equal to V_n. 0:07:23.880,0:07:30.995 One other thing has to be true for operational amplifiers, this output voltage. 0:07:30.995,0:07:39.725 The amount of output voltage you can get here is constrained by these two power supplies. 0:07:39.725,0:07:44.810 This voltage has to be greater than the negative power supply 0:07:44.810,0:07:48.520 and less than the positive power supply, 0:07:48.520,0:07:50.760 and those are strict inequalities. 0:07:50.760,0:07:54.275 Generally, most operational amplifiers you can only get to within 0:07:54.275,0:07:59.370 a volt or two of your power supply voltages. 0:07:59.660,0:08:03.965 Okay, a few points about operational amplifier behavior. 0:08:03.965,0:08:07.460 The output current is generally not known, 0:08:07.460,0:08:10.945 you cannot make any assumptions relative to the output current. 0:08:10.945,0:08:14.615 Right? It's provided by the external power supplies. 0:08:14.615,0:08:17.600 That's where people sometimes early on get themselves into trouble. 0:08:17.600,0:08:20.400 They say, "Okay, there's no current into the input terminals, 0:08:20.400,0:08:22.730 but I've got some current out of the output terminals. 0:08:22.730,0:08:25.385 KCL doesn't apply." Well, it does. 0:08:25.385,0:08:27.830 The current coming out of the operational amplifier is 0:08:27.830,0:08:29.930 coming from the external power supplies, 0:08:29.930,0:08:32.000 you know nothing about those. 0:08:32.000,0:08:35.090 You don't know anything about the output current unless you 0:08:35.090,0:08:38.809 analyze the circuit to determine what that is. 0:08:38.809,0:08:42.770 In general, when I'm analyzing an operational amplifier, 0:08:42.770,0:08:47.795 I will start out by applying KCL at the input nodes. 0:08:47.795,0:08:52.255 Okay. It doesn't always cure all of your problems, 0:08:52.255,0:08:55.730 but it's generally a good place to start. 0:08:55.730,0:09:03.065 The operation of the operational amplifiers is generally based on Delta V_in. 0:09:03.065,0:09:09.035 If I look at this amplifier as an input-output relationship, 0:09:09.035,0:09:14.150 what it looks like is that I have some Delta V_in, 0:09:14.150,0:09:19.505 I multiply that by some large number K. 0:09:19.505,0:09:28.230 That gives me V_out. 0:09:28.230,0:09:32.160 Now, for an ideal operational amplifier, 0:09:35.810,0:09:40.095 we assume that K goes to infinity. 0:09:40.095,0:09:43.730 Okay. For non-ideal or realistic operational amplifiers, 0:09:43.730,0:09:45.635 K is on the order of millions. 0:09:45.635,0:09:48.050 We'll assume it's infinite. 0:09:48.260,0:09:55.190 Also, I mentioned earlier the output voltage is limited by the external power supplies. 0:09:55.190,0:10:00.740 Okay, your output voltage must be lower than the positive power supply. 0:10:00.740,0:10:04.625 It must be higher than the negative power supply. 0:10:04.625,0:10:08.900 These two things in conjunction with one another lead 0:10:08.900,0:10:13.225 us to the conclusion that Delta V_in has to be equal to zero, 0:10:13.225,0:10:20.530 because if V_out is infinity times Delta V_in and V_out must be finite. 0:10:24.690,0:10:30.310 Right, we can only apply so much voltage at the power supply terminals. 0:10:30.310,0:10:32.785 In order to make this a finite number, 0:10:32.785,0:10:37.010 if this is infinite, this guy has to be zero. 0:10:39.900,0:10:47.320 Okay, let's do an example of analyzing an operational amplifier based circuit. 0:10:47.320,0:10:52.960 Here is my op-amp. It has two inputs and one output, okay? 0:10:52.960,0:10:57.760 It also has some other voltage supplies and some resistors hanging around here, 0:10:57.760,0:11:01.255 and what I haven't shown are the external power supplies. 0:11:01.255,0:11:07.090 I generally won't show those. Generally, when I start out analyzing one of these, 0:11:07.090,0:11:12.775 the first thing I'm going to do is employ my op-amp rules, okay? 0:11:12.775,0:11:17.590 There is no voltage difference between the inverting and non-inverting terminals. 0:11:17.590,0:11:23.470 So this delta V is zero. I've tied the non-inverting terminal to ground. 0:11:23.470,0:11:29.500 So, this voltage is zero volts. That means that since I 0:11:29.500,0:11:32.515 can't have a voltage difference between here and here, 0:11:32.515,0:11:35.810 this voltage is zero volts. 0:11:37.110,0:11:43.690 Likewise, the current here into the non-inverting terminal is zero, 0:11:43.690,0:11:48.760 the current here into the inverting terminal is also zero. 0:11:48.760,0:11:53.440 Now, I've labeled everything that I know about this operational amplifier. 0:11:53.440,0:11:59.590 I can go ahead and analyze it to determine V_out, okay? 0:11:59.590,0:12:04.420 As usual, I'll start out applying KCL at an input node. 0:12:04.420,0:12:07.000 KCL at an input node is kind of a good idea, 0:12:07.000,0:12:08.560 because you already know something's there. 0:12:08.560,0:12:11.635 You know there's no current into the op-amp itself. 0:12:11.635,0:12:18.470 So if I call this node A and do KCL at A, 0:12:19.380,0:12:24.070 the current through R_in is this voltage, 0:12:24.070,0:12:31.735 V_in minus this voltage which the op amp is constraining to be zero volts over RN. 0:12:31.735,0:12:36.325 So V_in minus zero over R_in, 0:12:36.325,0:12:41.110 this current into this node is equal to this current out of the node, 0:12:41.110,0:12:44.200 because there's no current flow through this leg, here. 0:12:44.200,0:12:49.930 This current is this voltage minus this voltage over R_f. 0:12:49.930,0:12:58.645 So that's equal to zero minus V_out over R_f. 0:12:58.645,0:13:01.120 V_in, as my input voltage, 0:13:01.120,0:13:02.140 I don't know what it is, 0:13:02.140,0:13:05.830 but I have to be told it before I can determine a number for V_out. 0:13:05.830,0:13:12.865 So V_out, let's multiply this by R_f, 0:13:12.865,0:13:21.460 is R_f over Rn times V_in taking this negative sign over here. 0:13:21.460,0:13:28.270 V_out is equal to minus R_f over R_in times V_in. 0:13:28.270,0:13:31.660 So whatever you give me for V_in, 0:13:31.660,0:13:35.155 I'm going to multiply that by a number, 0:13:35.155,0:13:37.330 take the negative of that, 0:13:37.330,0:13:41.690 and this op-amp will give you that as V_out. 0:13:42.570,0:13:46.450 This has a particular name. 0:13:46.450,0:14:02.260 This is an inverting voltage amplifier, okay? 0:14:02.260,0:14:04.585 It's amplifying voltage. 0:14:04.585,0:14:05.905 You give it a voltage in, 0:14:05.905,0:14:07.345 it gives you a voltage out. 0:14:07.345,0:14:08.605 It inverts that. 0:14:08.605,0:14:12.235 The voltage out you get as the negative of the voltage in. 0:14:12.235,0:14:14.440 It is also amplifying that, 0:14:14.440,0:14:18.415 according to whatever you choose for R_f and R_in. 0:14:18.415,0:14:21.790 If R_f is 10 ohms and R_in is one ohms, 0:14:21.790,0:14:24.910 then this is going to be 10 and the output voltage is 0:14:24.910,0:14:29.030 going to be negative 10 times whatever the input voltage is. 0:14:29.220,0:14:33.130 Let's analyze another operational amplifier circuit. 0:14:33.130,0:14:38.380 I want to find V_out with this operational amplifier based circuit. 0:14:38.380,0:14:41.890 Notice, again, that I have my three terminal device. 0:14:41.890,0:14:47.470 It has some non-inverting and inverting terminal in and output terminal. 0:14:47.470,0:14:49.690 I'm not showing my power supplies, 0:14:49.690,0:14:51.805 but if I wired this circuit up in the lab, 0:14:51.805,0:14:55.150 I would need to provide power to it, okay? 0:14:55.150,0:14:57.565 So let's find V_out as a function of V_in. 0:14:57.565,0:15:02.380 The first thing I want to do is apply my op-amp rules. 0:15:02.380,0:15:07.645 This voltage source is insisting that 0:15:07.645,0:15:13.495 the voltage at the non-inverting terminal is going to be set to be V_in. 0:15:13.495,0:15:17.110 The op-amp itself is insisting that 0:15:17.110,0:15:20.305 there is no voltage difference between these two terminals, 0:15:20.305,0:15:24.550 therefore I must have voltage V_in at this terminal. 0:15:24.550,0:15:29.990 Therefore, this voltage here is V_in. 0:15:30.180,0:15:36.220 Now, I have no current into these terminals. 0:15:36.220,0:15:44.055 Notice, very importantly, this voltage source is not providing any power, okay? 0:15:44.055,0:15:46.230 The current out of the voltage source is zero. 0:15:46.230,0:15:50.165 It's not providing any power in order to create this output voltage. 0:15:50.165,0:15:55.360 Any power in this output signal is coming from the external power supplies. 0:15:55.360,0:15:57.385 So these currents are zero. 0:15:57.385,0:15:59.425 I know something about that current. 0:15:59.425,0:16:04.060 Now I'm going to my old fallback standard position. 0:16:04.060,0:16:06.865 I'm going to do KCL at the input nodes. 0:16:06.865,0:16:11.515 Let me call this node A. I'll apply a KCL there. 0:16:11.515,0:16:18.085 Let me say that this current through the resistor Rf is I_f, 0:16:18.085,0:16:21.520 and this current through R_1 is I_1, 0:16:21.520,0:16:24.475 and those are going to be my positive directions. 0:16:24.475,0:16:31.330 So KCL, at A, tells me that the current going into node A 0:16:31.330,0:16:33.760 is equal to the current coming out of node A, 0:16:33.760,0:16:37.915 so I_f is equal to I_1. 0:16:37.915,0:16:42.760 This current is zero, right? 0:16:42.760,0:16:45.970 I don't need to list it in my KCL. 0:16:45.970,0:16:51.190 Now, I_f is this voltage minus this voltage, over R_f. 0:16:51.190,0:17:01.450 So, V_out minus V_in over R_f is equal to the current going through here, 0:17:01.450,0:17:03.775 which is just V_in minus, 0:17:03.775,0:17:05.290 I'm going to take this as my reference, 0:17:05.290,0:17:07.819 it's going to be zero volts. 0:17:08.579,0:17:15.040 V_in minus zero over R_1. 0:17:15.040,0:17:21.040 So V_out over R_f is equal 0:17:21.040,0:17:27.880 to V_in over R_f taking this term over to the other side, 0:17:27.880,0:17:32.635 plus V_in over R_1. 0:17:32.635,0:17:39.805 Grouping terms, V_out is equal to R_f 0:17:39.805,0:17:48.100 times one over R_f plus one over R_1 times V_in. 0:17:48.100,0:17:52.105 This becomes a one plus R_f over R_1. 0:17:52.105,0:18:00.100 So therefore, V_out is equal 0:18:00.100,0:18:06.740 to one plus R_f over R_1 times V_in. 0:18:10.860,0:18:16.015 This device takes a voltage V_in, 0:18:16.015,0:18:19.375 multiplies it by a number, 0:18:19.375,0:18:22.225 and actually a positive number. 0:18:22.225,0:18:24.250 In order to get V_out, 0:18:24.250,0:18:33.440 this is a non-inverting voltage amplifier. 0:18:36.990,0:18:41.830 Okay, you're still amplifying voltage by taking your input voltage, 0:18:41.830,0:18:44.635 multiplying it by a number to get the output voltage, 0:18:44.635,0:18:48.010 but you're not changing the sign, it not-inverting. 0:18:48.010,0:18:54.415 Now one quick thing I want to point out about both this example and the previous one. 0:18:54.415,0:18:57.820 Both of these had a resistor which was 0:18:57.820,0:19:01.510 feeding back from the output to one of the input terminals. 0:19:01.510,0:19:04.720 That is very typical of op-amp based circuits. 0:19:04.720,0:19:07.315 It's generally called the feedback loop. 0:19:07.315,0:19:14.425 Almost invariably you will feedback from the output to the inverting input terminal. 0:19:14.425,0:19:19.145 That's necessary in order to keep this entire device stable. 0:19:19.145,0:19:22.020 If I feedback to the positive terminal, 0:19:22.020,0:19:25.485 generally this device will do what is called going unstable, 0:19:25.485,0:19:28.470 the output will try to go to infinity. 0:19:28.470,0:19:32.190 So what you'll have happen is that your output voltage will either 0:19:32.190,0:19:36.130 go to the positive or the negative voltage rail, and stay there. 0:19:36.130,0:19:37.540 It can't get to infinity, 0:19:37.540,0:19:40.420 but it's going to go as high as it can go, 0:19:40.420,0:19:42.800 and it's not going to come back. 0:19:42.990,0:19:46.015 Okay, this concludes Lecture 12. 0:19:46.015,0:19:50.185 Next lecture, we'll do some more work with operational amplifiers. 0:19:50.185,0:19:52.810 We'll look at their operation in a little bit more depth, 0:19:52.810,0:19:58.240 we'll talk more about the voltage rails applied by the power supplies, 0:19:58.240,0:20:02.515 and we'll start looking at them as dependent sources. 0:20:02.515,0:20:06.340 Okay, later on in your schooling career you'll see a lot of dependent sources. 0:20:06.340,0:20:11.090 We'll just start kind of looking at things in that way in this class.