 So, we have a linear device, the output is a linear function of input and the gain of this device is negative and it is given by R 2 by R 1. This is called an inverting configuration or inverting amplifier. This is not new, this is something that we had in fact we had tailored the specification of this op-amp to produce this kind of op-amp. Let us look at something which is different from that. This time we want a configuration in which the input provides no current at all. In the previous one, V in provided a current which was V in by R 1, but we do not want to draw any current from the input at all. That means we should not connect anything other than the input of the op-amp to that point. So, we connect and therefore we use this point and this is my V in. I can draw any amount of current from the output, that is not a problem. So, I can connect my R 2 here and so that current flows provide a path to that current by connecting R 1 here and grounding this. It is very similar to the previous circuit. However, the input is now directly applied to the positive input. The feedback is still the same through R 2, but the R 1 resistor rather than going to the input is going to ground. Let us work out what is the output voltage now. So, this is V out and we will make use of the virtual shot. You can do it without that then you will have to assume infinite gain and do similar kind of algebra that we did earlier, but now we have this powerful tool in our hand. So, therefore, we already know that the voltage here is how much that is equal to V in. So, now let us find out what is the output. Essentially, you are saying what is that value of V out which when goes through this potential divider it produces an output equal to V in right because this value is V in and no current is flowing through this. So, if you look at this circuit it is just a potential divider. So, the V out divided by R 2, R 1 should give me V in to provide the virtual shot. So, what is the value here in terms of V out and R 2 by R 1? The current is V out divided by R 1 plus R 2 and into R 1 and that should be equal to V in. That is quite straight forward and therefore, V out divided by V in that should be R 1 plus R 2 divided by R 1 times V in and that is 1 plus R 2 by R 1 into V in. Notice a few differences from the previous configuration. The previous configuration the gain was negative. In this configuration the gain is positive. The output swings in the same direction as input. There is no negative sign. Therefore, this is called the non-inverting amplifier. The output is not inverted with respect to input. The gain is a little higher in this case. Earlier the gain was minus R 2 by R 1. In absolute terms now it is 1 plus that value right 1 plus R 2 by R 1. So, now the minimum gain is in fact 1. We cannot have gain less than 1 in this case. In the other case it just dependent on the ratio. We could have a gain less than 1. We could have a gain greater than 1. So, that configuration could have been used as an attenuator as well as an amplifier. This configuration can only be used to amplify the output. That stands to reason because the fraction of the output given by this potential divider has to equal to be in. Therefore, the output has to be greater than we begin with. So, that when it is divided down by this potential divider it is still equal to be in. So, the gain is higher and third point that we are now drawing no current from our input source. The input source is connected directly to this input and nothing else is connected to it. So, the input source is providing no current. Very often you have situations like this. For example, the old times you are probably not exposed to this. Music used to be played on records using a piezoelectric pickup right. So, the piezoelectric pickup has very high impedance. It produces charges in response to a crystal being distorted. So, there are very minute distortions of this crystal because the needle vibrate and that results in charges being generated. But if you take away those charges then it will produce nothing at all. Therefore, you must draw zero current from it. Only notice the voltage changes. Similarly, a capacitive mic. Suppose you have some charge placed on a mic. Now, if I put the mic in front of my mouth and speak what will happen? The two plates will vibrate. The capacitance will change. The total charge is the same. But the corresponding voltage must change because the capacitance is changing right. What do you have? This charge must remain constant and as the capacitance changes the voltage must change. As long as I do not take away this charge I am fine. I shall now be able to use this condenser microphone right. And therefore, I need a configuration in which I draw no current from the input and this configuration is the appropriate one for you. Because now if I connect it to an infinite input impedance that charge will not be taken away. That charge will remain where it is and those voltage fluctuations how so ever small they are they can be amplified by choosing appropriate values of r 2 by r 1. So, there are many configurations in which you do want to make use of the infinite impedance. And for those configurations it is better to use the non-inverting configuration. Also the gain is a little higher. However, its range is limited. You cannot make the output smaller than input. You can only make it larger than input. The inverting configuration is good because it has a direct ratio of 2 resistors as its output. It can be used for amplifying as well as attenuating the output. The output can be more than input. It could be less than input. However, it does draw current from the input. The source has to provide current. So, depending on the situation that you have, you can have an amplifier which is either inverting or non-inverting and you choose depending on what the conditions of the input and the output are and the gain that you require. These are the two major configurations of this. But these are not the only two ones. These are only resistive combinations. Let us just for the sake of argument see what happens if I replace one of these resistors in the inverting configuration just for the sake of argument that is simpler. Suppose, I replace one of the resistors by a capacitor. So, let us draw that configuration. I am referring to this configuration. I have replaced R 1 by C and because we have only one resistor, we will just call it R. So, R 2 is now called R. But R 1 has been replaced by C. Suppose, I have a voltage here which is a function of time. As this voltage changes, what is the amount of current which flows in this branch? Remember there is a virtual shot. There is negative feedback. Therefore, this potential must be maintained at 0 because of the negative feedback. So, this point is held at 0 and this point is fluctuating as a function of time. V of t has some dependence on time. It could be sinusoid. It could be much more complex. Some function of time. So, how much current will flow through this capacitor? What is current? It is d cube by d t and that is equal to d by d t of C times V where V is the voltage difference across the two plates. One of the plates is maintained at 0. The other plate is at V in of t. So, the voltage difference between the two plates is nothing but V in C times V in of t. Now, C is a constant. It can be taken out from the differential. So, the current which is flowing here in this path is C times d V in by d t. Rate of change of the input. If the input is changing faster, there is more current through the capacitor. If it is changing very slowly, then there is less current. If it is at d C, there is no current at all. Now, what should the output voltage be? This current cannot get into this op-amp. Input impedance is infinite. The only way for this current to flow is through this resistor and as we had seen earlier, the output makes it possible for that much current to flow. It adjusts itself such that precisely that much current will flow. If it did not, then this point will not remain at 0. Therefore, to keep the virtual ground at ground, the output must adjust its value such that this much current flows through this R. Therefore, that is only possible if out is negative because this is 0. What is the value of the output? R times this current. Therefore, V out should be minus R times this i which is equal to minus R C d V in by d. So, I have got a differentiator here. I can produce a differential. Indeed, it is possible to just take this output and you can take it. You know that op-amps do not disturb you or at least not too much. You take your output and feed it to another differentiator and then you will get the double differential. Indeed, you could actually make differential equations using op-amp and indeed, they used to be computers which made use of it which solved differential equations by making circuits. Those were called analog computers and complicated differential equations could be solved just by making an analog circuit using op-amp. Now, suppose you have a second order differential equation with the first order term with some boundary condition whatever. Just set up a circuit and voltages at various nodes will be the solution of that problem. So, you can solve in fact differential equations using this because you can have any number of differentiators following one to the other. This R C time, this is the normalizing factor of this differential. Output is not equal to the differential. It is R C times that differential. That stands to reason because R C has dimensions of time. So, we have divided the dimension of time here by T. Therefore, I must multiply by T to get back a voltage. So, this time must be multiplied. So, rate of change of input voltage, this is essentially tells you the rate of change of input voltage average not really average, but normalized by the R C time constant of this circuit. If R is large and C is small for the same time constant, then you will get the same output voltage, but now you will draw less current from your source. So, if you are worried about drawing current from your source, you must use a small value of C, but to get the same output it correspondingly large value of R that you can do here. Now, quickly let us say that if I had connected them in another way before we go away from here. Suppose, this V of T was a sinusoid. It was some sine omega T. What will be the output? Suppose, V in of T is some A times sine omega T. So, this will be output, it will be minus R C times A into omega cos omega T. We are taking the differential with respect to time and the angle here is omega T. It tells us something, it says that the output amplitude will increase with increasing frequency. That makes sense because higher frequency means greater rate of change. Therefore, the differentiator should produce a higher output, because the differentiator measure the rate of change and the rate of change is higher at higher frequency. So, it produces an output which increases linearly with the frequency and such a circuit is called a filter. It is called a high pass filter. That means, it prefers high frequencies versus low frequency. Indeed, if the frequency goes to 0 that means you have a DC, the output will be 0. Therefore, low frequency is blocked, indeed DC is blocked completely. If you have only a DC output will be 0, but otherwise you have a frequency which is linearly increasing with omega. Such things are called filters and these are called linear filters, because I have a linear amplifier. I have just replaced the R 1 by R 2 by that figure. That is only V out. That is right. We will make the correction. Here I have written V out by V in, whereas I am writing V in here. So, in fact, this should actually be removed. I have already carried the V in on this side, difficult to align. This V in should not be there. Thank you. We put the R here and put the C in the feedback path and let us see what happens. We are grounding the positive input again. Therefore, this point is at 0. So, how much is this current and how much is this current? This is equal to the differential current. So, that is again d by d t of C times output. The potential difference between these two, but that is equal to, so it is d by d t of C into 0 minus V out. This is the potential difference across this capacitor. This plate is at 0, held at 0. This is held at V out. Therefore, this output will be minus C times d V out by d t. Therefore, what is d V out by d t equal to minus V in divided by R. Therefore, V out is the integral of V in d t. Now, I have got an integrator. This will integrate the input. Notice that this will do naughty things if the input is at d c, because the integral of a d c is not 0, unlike a differential. The integral of a d c is a ramp. It will continuously increase. That makes sense. If you look at this circuit, suppose I put a d c here, then I am forcing a steady current into the input. That means the output should be a ramp whose differential is that steady current. So, the output must continuously change to produce a current which cancels this steady current. Therefore, this output will continuously charge up or charge down. In a practical case, it will stop when it hit either the positive supply or the negative supply. So, I must make sure that it does not happen. It does not saturate. We will see later what practical steps are taken for doing that. However, again suppose I was to give a sinusoid to the input. What will be the output? Integral of sine omega t. What is the integral of sine omega t? Minus 1 by omega cos omega t. So, you will get omega in the denominator. So, you will get 1 by omega r c amplitude divided by cos into cos omega t. If the input was a sin omega t. That means the amplitude of the sinusoidal wave is now divided by omega. Higher the frequency, lower is the output. That means this one is a low pass circuit. It does not allow high frequencies to pass. It allows only low frequencies to pass. Indeed, as omega goes to 0, you can see that the output goes to infinity eventually and that is what we had seen. That if we give it a d c, it will continuously ramp up till it goes to infinity or till it is brought short by practical consideration. So, this has very high gain at low frequencies and low gain at high frequencies. Therefore, it is a filter and this filter will then pass low frequencies preferentially over high frequency and this is the property of an integrator. An integrator essentially if the frequency changes here, then at very high frequency the current will just pass through this capacitor without requiring too much voltage across it at high frequency. So, the corresponding voltage difference from 0 will be very small and the output voltage will be very small. So, essentially this integrator and this differentiator can also be alternatively used as a filter and it is a linear circuit. As you can see, if the input is changed linearly, the output will change linearly. This amplitude just comes here as it is. If I change the amplitude or if I mix two waves, then the output will be just the superposition of the output. So, that is the next thing to be understood that in case of complicated configuration, this is actually a linear circuit. In one configuration, when you had both resistors, the output was minus R 2 by R 1 into V in. That is a linear circuit. If V in is 0, output is 0. In the other case, it was 1 plus R 2 by R 1 times V in again linear. What would happen if you had inputs at both? That is to say, I have a configuration like this and I applied two inputs V 1 and V 2 and I have my familiar R 1 and R 2 connected there. How do we analyze a circuit like this? So, first let us do it the painful way. There is negative feedback here. Therefore, this voltage must be V 2 because of the virtual short because there is net negative feedback. This voltage must be V 2. Therefore, how much current is flowing here? V 1 minus V 2 divided by R 1. That much current is flowing. So, V out must be such that the same amount of current flows through R 2. That means, V 2 minus V out divided by R 2. This end of the resistor is at V 2. This end is at V out. Therefore, V 2 minus V out divided by R 2 should be the same current which is equal to V 1 minus V 2 upon R 1. So, now I can take V 2 by R 2 to that side. Just collect all V 1 and V 2 terms on one side and V out on the other. So, if I now multiply by minus R 2, what I get is V out equal to V 2 R 2. Sorry, one of these should be R 2. V 2 by R 2. So, it is R 2. I have multiplied by minus R 2. So, these minus signs will go for V 2. So, I will get 1 by R 1 plus 1 by R 2 minus R 2 by R 1 V 1. If I take this R 2 inside, what you will get is V 2 into 1 plus R 2 by R 1 minus R 2 by R 1 minus V 1. So, it appears as if the inverting amplifier and the non-inverting amplifier are acting independently. Suppose V 1 was not there. Suppose V 1 was grounded. What would be the output? V 2 into 1 plus R 2 by R 1 namely this. If V 1 was there, but V 2 was not there was grounded. Then, the output will be minus R 2 by R 1 V 1. So, therefore, principle of superposition applies. It is a linear circuit. If you have two independent inputs, you can assume that the other input is 0. Calculate the output. Then, make the first one 0 and calculate the output and now you can just add it as in linear circuit. Indeed, notice that instead of this R, it could be j omega c or anything. So, these are linear circuits and the corresponding filters are called linear filters. Because they use active devices like amplifiers and so on, they are called active filters. So, we can make active filters using simple op amp circuits and these are linear circuits. That means if I have inputs impressed on both the inputs, then it is as if you analyze one, then analyze the other and just add them. Assuming the other input is reduced to ground. This is the hallmark of linear circuit and that makes the analysis of these circuits quite easy. Just as an interesting circuit, let us look at this somewhat symmetric looking circuit. All resistors are equal. Can we quickly calculate what the output will be? So, we are going to apply superposition. So, how do we apply superposition? You make one of the input 0 and calculate with respect to the other and then the other way round. So, let us make V 2 0. If you make V 2 0, the potential here is 0. So, it is like an inverting amplifier. What is V out? Equal to minus r by r times V in. So, it is equal to minus V in. Now, ground V 1 and see with respect to V 2. Now, notice what is the voltage at this point? This is a potential divider. No current is going into the op amp. So, the voltage here is V 2 by 2 and this is grounded. So, it is like the non-inverting amplifier. The voltage here is V 2 by 2. What is the gain of this? 1 plus r by r. That means the gain is 2. So, 2 into half overall the gain is 1. So, it is minus V. I am calling V 1 and V 2. So, it is minus V 1 plus V 2 as simple as that. It is a true difference amplifier with a gain of 1. That extra factor of 1 plus r 1 by r 2 is nullified by attenuating this using the same. Therefore, you can make all kinds of interesting difference amplifiers where the two inputs never look at each other. One input arrives at the positive side, the other input arrives at the negative side. Now, the virtual shot assures that both these inputs are at V 2 by 2. Now, this is a very flexible device that we have, this op amp. We can make all kinds of amplifiers, all kinds of linear filters, all kinds of frequency dependent circuits and indeed it is such that it is not bothered what is connected to its output and it bothers its input either not at all or very little. As a result, it is possible to design simple modules and just stack them up one after the other. This is the kind of example that I had talked about where you have a differentiator and it is followed by another differentiator. Now, you can get the second differentiator. So, very complicated systems can now be mimicked in analog fashion by using this versatile device that we got out of our wish list and therefore, it is quite a popular device indeed and it turns out that it is not so difficult to make. The insides of this are quite horrendous looking, very painfully made, but it sells in such large quantities that the prices of ordinary op amp are quite small. If you start demanding perfection, then of course, these can be quite expensive. If you say that the offset voltage should be truly 0 or that it should go to very high frequencies or indeed that its input bias current should indeed be truly 0. So, if you start asking for total perfection, then they can be quite expensive, but for ordinary run of the mill work, they are very convenient and very cheap. So, you choose your op amp which work appropriately for the signal range, choose the configuration which provides the gain and behavior that you want and now you can make, if that is too complicated, you can break it up into modules and each module provides a function that you want and these functions then just can be stacked together and now you can have a system. That means, analog design has been elevated to the level of analog system design which earlier we did not see through. We thought that system design was possible only with digital components, where you have a complicated system and now you could break it down finally, we make it as a combination of logic gates and so on. Similar things can now be done with analog, where filters and adders and gain stages and attenuators, subtractors all of these can be constructed and just stacked together to perform it and give you the functionality of the system as you desire. So, that is the big thing about op amp and in the subsequent lectures, we will see that how these op amps can then be used to make many useful functional blocks. So, we will stop this lecture here.