 So, in the last class, I was trying to motivate what we mean by passive circuits and the sort of conclusion that we arrived at was that passive circuits is something where the amount of energy that is supplied to the circuit, this is always positive and the amount of energy that is supplied to the circuit is bifurcated in two ways, a part of it goes into stored energy which gets stored by the energy storage, storing elements in the circuit and the other part gets dissipated, ok. So, let me write out an equation that sort of captures this idea of passivity. So, this equation is what is called dissipation equality and what it says is that power supplied is equal to dissipated power plus the rate of change in stored energy. Well, as far as dissipated power is concerned, this dissipated power is always going to be something which is positive. Therefore, I could take this rate of change of stored energy to the other side and I can always say that power supplied minus the rate of change in stored energy is some quantity which is always going to be positive. Now, in case of a circuit of course, what we can do is we can write this down, the power supplied is v dot i and so the stored energy is denoted by E then dE dt. So, v i minus dE dt is greater than equal to 0, this is greater than equal to 0. Essentially, this is in fact equal to the dissipated power and the dissipated power is always a positive quantity. So, v dot i minus dE dt is greater than equal to 0, this in fact is called the dissipation inequality and this dissipation inequality is always going to hold true for circuits which are passive. Now, how do we characterize circuits which are passive? Now, importantly, the example of the circuits that we were looking at, it has one input and one output and typically in circuits, the number of inputs is equal to the number of outputs because we think of circuits in terms of ports and each port has a voltage and a current and so one of them, either the voltage or the current you think of as the input and the other one as the output and so the circuits are the special kinds of systems where the number of inputs is equal to the number of outputs. So, of course, till now in the example that we were looking at, it was a single input single output case, but you could also look at a multi input multi output case where you have a whole vector of voltages and currents of various ports forming the input and another whole vector of the corresponding currents and voltages on those ports as the output. And then just like we talk about v dot i, you could just talk about the inner product of the input and the output giving you the energy supplied and there would be a storage function depending upon the number of depending upon the various energy storing elements which are there in the system and one could write out the dissipation inequality which says that the inner product of the input and the output minus the rate of change of the stored energy, this is always going to be greater than equal to 0 because this quantity in fact is going to be the dissipated power and the dissipated power is always a positive quantity. So, let me just constrain myself to a single input single output case and let us say the single input single output situation is given using a transfer function as ys is equal to some gs us where y is the output and u is the input. Now earlier what we had said was that u transpose y, this is the same in the case of the electrical circuit v dot i is exactly the same as u transpose y and we are saying that u transpose y integral from minus infinity to plus infinity, this particular quantity should be greater than 0 then the system is passive. Now if you are going to take the integral from minus infinity to plus infinity of u transpose y, one could take the Fourier transforms and if one takes the Fourier transforms this is the same as there would be some scaling factor k and minus infinity to plus infinity of u j omega star times g j omega g j omega star y j omega. But of course, this u transpose y I could really write it down as half of u transpose y plus half of y transpose u so sort of making it symmetric. Therefore, along with this expression there will be this other expression also which is y j omega star g j omega u j omega. So, this integral of course, this is over d omega so this integral would be equivalent to this integral after having taken the Fourier transforms so we have taken Fourier transforms. Now if you look at this expression this is the same as saying well I think I have made a mistake sorry so let me do it again. So, if you are looking at this from minus infinity to infinity of u transpose y dt this is in the time domain. This is equal to some constant of proportionality of course is u transpose y u transpose y I could write it out as a half u transpose y plus a half y transpose u. Now I could now pass over using Fourier transforms into the omega domain and I will have again integral from minus infinity to infinity of u j omega star y j omega plus y j omega star u j omega. So, last time the mistake I made was that I put this g j omega in between. Now I can bring in the g j omega by substituting you see why once you have taken the transforms y j omega is really g j omega times u j omega and so substituting this and there we would end up with integral minus infinity to plus infinity. I am just forgetting the proportionality constant you have u j omega star multiplying g j omega plus g j omega star multiplying u j omega. Now of course when I write this down there are several assumptions that are going in. The assumptions that are going in are the following. For example, we will assume that u is a compactly supported trajectory that means if this is the time axis u is non-zero only over a compact set. Now if u is non-zero over a compact set then it is easy to take the Fourier transform it makes sense to take it Fourier transform. Now if u is compactly supported because the transfer function tells us that y is equal to g times u this is the equation. Therefore, the Fourier transform of y also makes sense and if u is compactly supported in the circuit we can expect that y is also compactly supported and so then it makes sense to take the Fourier transforms. Now if you take the Fourier transforms the Fourier transform of y and Fourier transform of u is related in this way and so once you have this expression you substitute and you get this and now this integral is greater than equal to 0. So, if you look at this last expression whatever u you choose this expression must be positive and now one can show that this expression would only be positive if g j omega plus g j omega star is greater than equal to 0. But this here is really the real part of g j omega and so the real part of g j omega must be greater than equal to 0. So, this condition is the condition for passivity and the condition for passivity translates to and here of course we are only considering single input single output case. So, the single input single output case the y and the u the output and the input are related to the through this transfer function g of s and then what this translates to by this set of manipulations is that the real part of g j omega must be greater than equal to 0. So, let us look at situations where the real part of g j omega is greater than equal to 0. What does that mean? Now you see the expression that we had is g j omega plus g j omega star but this is the same as saying g j omega plus g minus j omega. Now if g j omega can be written as a plus j b then this will turn out to be a minus j b. So, the imaginary part gets cancelled out and you are just left with the real part. So, this being greater than equal to 0 is the same as saying that the real part of the transfer function g j omega must be greater than equal to 0. How to translate this condition into something more meaningful for us? One way we can translate this condition into something more meaningful is you see the image of g j omega is a Nyquist plot. So, saying that the real part of g j omega is greater than equal to 0 is the same as saying that the Nyquist plot of the transfer function should lie in the first or the second quadrant because then the real part of g j omega is going to be positive. So, what this translates to or whatever we have been doing till now this result that we have got, what it translates to is that the real part of the transfer function g j omega should be positive and what that means is that the Nyquist plot is in first and fourth quadrant. But as it turns out this Nyquist plot being in the first and the fourth quadrant is not a complete characterization of passivity. That is because mathematically the Nyquist plot lying in the first and the fourth quadrant may not necessarily translate into that particular condition that we had where you have a storage function and supply function and that interpretation that you have. First, let us look at some examples of transfer functions which are positive real. So, I did not mention that. So, those transfer functions whose Nyquist plots lie in the first and the fourth quadrant well one definition for that is positive real. So, positive real transfer function gs is such that the real part of g j omega is greater than equal to 0. I cannot claim that this is the definition of positive real because depending upon various books the definition of positive real changes. Now, the earlier interpretation that we had for passivity the one would like to say that positive real transfer functions is equivalent to passive. But that is actually strictly not true because if you give the definition of positive real to be that the real part that the Nyquist plot lies in the first and the fourth quadrant then one can show that there are some transfer functions which will satisfy this condition of positive reality but are not actually passive. So, it turns out that in many books they use the definition of positive reality to be the fact that the Nyquist plot lies in the first and the fourth quadrant whereas in many other books the definition for positive reality says that the real part of the transfer function evaluate that means the Nyquist plot lies in the first and the fourth quadrant but in addition the transfer function is stable. So, now I would give some examples to try and tell you what exactly is the difference between defining positive reality in this way and defining positive reality in the sense of this plus gs being stable. So, let us look at some examples. So, suppose you look at the transfer function gs equal to 1 by s. Now, this transfer function is it positive real? Well, if you just take this definition then g of j omega is 1 upon j omega this therefore the real part of g of j omega is equal to 0 and so the real part is greater than equal to 0. So, one can say that this transfer function is positive real. If one uses the definition that positive real means this plus gs is stable if one uses this definition then again this particular transfer function is positive real because the real part is actually 0 and this is also stable means s being a pole at 0. If you think of that as stability or marginal stability or whatever goes then one can still continue to call this positive real. So, the definition of positive reality could be just this or could be this along with gs being stable. Again, as I said earlier it depends on the books that you follow some books use only this definition but most books use this definition plus the fact that gs is stable. So, let me use a few more examples to show why there is a difference between just having this condition which is the condition that we got from the earlier equations that we derived and also having this condition that gs is stable. So, let me take another transfer function gs is s plus 1 upon s plus 2. Now, if we look at the Nyquist plot of this, the Nyquist plot of this at s equal to 0 it is at half and then so, this particular transfer function has a 0 at minus 1 and it has a pole at minus 2. So, as you go up you find at any particular j omega there is this angle which is larger than this angle and so it is going to be positive and as j omega tends to infinity this finally tends to 1. So, you end up with a Nyquist plot which looks like this goes to 1 and then when you look at the rest of it this is what you get. And so, it is clear that the real part of g j omega is greater than equal to 0. So, by that definition that the real part of g j omega is greater than equal to 0 this transfer function is positive real. Of course, if you also put in the fact that it should be stable well this transfer function is also stable. Therefore, by both the definitions this transfer function is positive real. Let me now take another transfer function which is gs is let us say s minus 1. Now, this transfer function of course is not stable. Now, if we were to draw the Nyquist plot of this it has a pole at minus 1 at plus 1 and it has a 0 at the origin. Now, if you now look if you plot this thing as you go up. So, at omega equal to 0 this gives you 0 and then as you increase the omega what you would get is the real part of g j omega is equal to the real part of minus j omega multiplying minus 1 minus j omega upon 1 plus omega squared. And this then turns out to be so perhaps I should not use a minus here I should just put plus. So, if I take this transfer function so s upon s minus 1 this is not stable and when you calculate this is plus and so you get 1 plus omega squared yeah. And so in the numerator so the real part will turn out to be omega squared upon 1 plus omega squared. And this quantity here is greater than 0 for all omega greater than equal to 0 for all omega. So, if you use the definition that the real part of the transfer function is greater than equal to 0 then this thing is positive real this transfer function is positive real. But if in addition you also put in the condition of stability this is not stable therefore, this transfer function is not positive real. Now the question is why was this condition of stability brought in to associate these transfer functions with passivity. Now that is completely dependent on what one would call the storage functions. So, it turns out that if you have a transfer function like this you are not going it would not be possible to synthesize a circuit which has this transfer function using purely passive elements. And the reason for that is because this g of s is not stable. As a result the associated storage function that you would get that you can get for this particular transfer function that storage function is not going to be positive definite. So, let me explain what I mean by that. So, earlier I had said that the storage function is a bit like a Lyapunov function that means if you set the input to 0 and then you look at the system then the storage function plays the role of the Lyapunov function. Now the Lyapunov function of course, has to satisfy certain conditions that is one of the conditions being that the Lyapunov function must be a positive definite function and its derivative must be negative definite. Now the fact that the derivative is negative definite will get satisfied because of the dissipation inequality. So, just recall that the dissipation inequality gives us something like this U transpose y is greater than equal to d dt of E where E is the storage function. But now what does this mean? If the input is 0 of course, this quantity is 0 and so 0 is greater than d dt of E which means for the system with 0 input this E can act like a Lyapunov function provided of course E is positive definite. So, if E is positive definite here this thing essentially tells us that the derivative of E is negative semi definite and as a result the resulting system, the system that you get by setting the input to 0 is a system which is stable. Therefore, it is important that this storage function that you get should be positive definite. Now when we use the definition of positive real transfer function to be equivalent to the real part of g j omega greater than equal to 0 then this condition alone gives us no guarantee about the positive definiteness of the storage function. So, this condition gives no guarantee about positive definiteness of E. So, that is why many people would like to call a transfer function positive real when not only this condition is satisfied but it also guarantees that the storage function that would result in the system is a positive definite storage function. Now in fact the guarantee for that is given by a famous lemma which is called the positive real lemma and so let me state the positive real lemma. So, let us take a transfer function g of s which is stable and let us assume that this transfer function is written in as a state space model and so you have equations dx dt equal to ax plus bu y equal to cx plus du and let us assume that this representation is a minimal representation. So, minimal representation essentially guarantees that ab is controllable and ac is observable. So, what we are saying is we start out with a transfer function of course I am just restricting myself right now to single input single output case. So, we are taking a transfer function which is stable look at the state space representation and the state space representation that we are looking at is a minimal representation which means the ab cd matrices are such that ab is controllable and ac is observable. Then the real part of gs is greater than equal to 0. So, gs is already stable that we have assumed then real part of gs is greater than equal to 0 if and only if there exist matrices p l w of appropriate dimensions such that so what we are saying is that the real part of gs is going to be greater sorry the real part of g j omega is greater than equal to 0 that means the Nyquist plot is going to lie in the first and the fourth quadrant if and only if there exist matrices p l and w of appropriate dimensions such that the following three equations hold and the three equations are a transpose p plus p a is equal to minus l transpose l p times b is equal to c transpose minus l transpose w and w transpose w is equal to d plus d transpose. Let us look at these three equations and think about it for a minute. So, what we are saying is the positive real term what it is saying is suppose you start off with a gs which is stable and you look at the state space representation which is a minimal representation which essentially is equivalent to saying a b is controllable and a c is observable then the real part of g j omega is greater than equal to 0 or in other words Nyquist plot lies in the first and the fourth quadrant if and only if there exist matrices p l and w of appropriate dimensions such that a which is a system matrix here a transpose p plus p a of course incidentally this matrix p is going to be a symmetric matrix. So, p is going to be a symmetric matrix and therefore a transpose p plus p a this whole thing is going to be symmetric and what we are saying is that this matrix is going to be minus l transpose l. Now, if you take any matrix l and you look at l transpose l that is going to be positive semi definite. I mean it is guaranteed to be positive semi definite it could be positive definite if l had the full appropriate rank but it is guaranteed to be positive semi definite. So, what the first equation is saying is that there is some matrix symmetric matrix p such that a transpose p plus p a is negative semi definite. Now, this of course already connects p and l because p has appeared here l has appeared. The next equation connects p and l and w through b and c where b and c come from the state representation it says p times b is equal to c transpose minus l transpose w and this w is something that purely depends on d. So, if you d plus d transpose this is going to be a symmetric matrix and that symmetric matrix is exactly the same as w transpose w. So, the positive real lemma is something that holds only if you assume gs is stable. So, if you take away this assumption that means you do not assume gs is stable then this condition that the real part of g j omega is greater than equal to 0 if and only if these things well this does not hold anymore. Now, the point is that this p essentially defines the storage function. So, there is one more condition that I need to add which is there exist matrices p, l and w with p being positive definite. Now, if the condition gs is stable is put in then this p is positive definite but if this condition gs is stable is not put in then this p is not guaranteed to be positive definite. So, the positive real lemma says that if you take a gs which is stable and this is the state space representation it is in a minimal representation. So, a b is controllable, a c is observable then the real part of g j omega is greater than equal to 0 if and only if there exists matrices p which is a symmetric matrix and positive definite and two other matrices l and w appropriate dimensions such that this all this is true. So, p is a symmetric matrix and p is greater than 0 then all these equations are satisfied. What does all this mean? So, I have just stated a lemma called the positive real lemma but what does this finally mean? What this finally means is that you could think of the storage function for the system. So, the storage function E one could think of the storage function as x transpose px where p came from that positive from the earlier lemma. So, p is greater than 0 then you are talking about. So, if p is positive definite then you are talking about a storage function which is positive definite. So, now if you have the storage function and you look at dE dt dE dt is equal to x dot transpose px plus x transpose px dot for x dot you substitute a transpose b because you have the state equation saying x dot is ax plus bu. So, you substitute this in for the x dot and you would end up with u transpose b transpose px plus x transpose a transpose px plus x transpose pax plus x transpose pbu. I will write this in a more compact form x transpose u transpose and then I have this matrix here and then I have x and u and out here I would have a transpose p plus pa then I would have pb here, I would have b transpose p here and 0 here. So, this expression is the same as this. So, what we have got is an expression for dE dt by just using the state space equation and using that p that had appeared in the positive real lemma and I get this. Now, throughout we have been saying that the supply is given by u transpose y. So, a moment here you see I have taken the storage function to be x transpose px ideally this is a quadratic one would put a half here and so what would happen is there would be a half appearing in all these terms because of the half that I have put there. So, I will compensate for that by taking the supply to be 2 times u transpose y and you would see that this is just a play with constants it really does not matter all that much. Now, so the supply is 2 times u transpose y, but from the state space equations we know y is cx plus du. So, the supply which is u transpose y I write it in a symmetric form. So, I will write it as u transpose y plus y transpose u and so I plug in this cx plus du in here and I would end up getting u transpose cx plus u transpose du plus x transpose c transpose x u plus u transpose d transpose u which again just like earlier I would write down as x transpose u transpose some matrix x u there is no x transpose that term is in there I have x transpose c transpose u and I have c here and here I have d plus d transpose. So, the supply turns out to be this expression here. Now, for passive systems we said supply minus the rate of change of energy this must be equal to dissipation, but this dissipation is of course going to be greater than equal to 0. Now, we found an expression for the supply. So, it is x transpose u transpose with this matrix so x u this vector you are using on either side of this matrix. So, I will just use this matrix and sort of suppress this x u. So, if I write down the supply matrix I get 0 c transpose c transpose d plus d transpose minus now d edt again I had a similar expression using x transpose and u transpose which was this and so if d edt is this particular expression. So, I can subtract this expression from the earlier expression. So, what I would get is minus a transpose p plus p a here I will have pb here I will have b transpose p and here 0. So, this whole matrix put together pre multiplied by x transpose u transpose and post multiplied by x u this must be so what I have written down here is supply minus d edt. So, this whole thing must be equal to dissipated energy and so this matrix must be a positive definite matrix is what we should have if the given system was passive. Now, if you put this together then the resulting matrix that you will have the first entry is going to be minus a transpose p minus p a let me write it down minus a transpose minus p a then here I will have c transpose minus pb here I will have c transpose now both of them are not c transpose one of them at the bottom minus c. So, the mistake c minus b transpose p and here I have d plus d transpose. So, this particular matrix is the same as this. Now, I am going to use the expressions that I derived that I had written down in the positive real lemma you see minus a transpose p minus p a if we look at the positive real lemma a transpose p plus p a is minus l transpose l. So, the negative of this is l transpose l. So, for this I could write down l transpose l. Now, if I look at the second equation it says c transpose minus pb is l transpose w. So, for c transpose minus pb I could write down l transpose w and this is just the transpose of that. So, this is w transpose l and then the last equation tells us w transpose w is d plus d transpose. So, this I could write as w transpose w but what this matrix is this is nothing but l transpose w transpose multiplying l w and this is certainly greater than equal to 0 because this is essentially like squaring a matrix. So, what we are essentially saying is, so if you go back to the positive real lemma, when you are saying gs is stable and this is true then it says that there exists all these matrices p which is a symmetric matrix greater than 0 such that these conditions and the other two matrices l and w such that all these conditions are satisfied. Now, what I have just shown here is if you start by considering e the storage function if you start by considering the storage function to be x transpose px where p is obtained from that positive real lemma then and if you think of the supply as u transpose y then when you take supply minus the rate of change of storage then you end up getting this equation and you manipulate that you get that that thing is going to be greater than equal to 0. So, what we have essentially shown is that in the positive real lemma if all these conditions hold then if all these conditions hold then you have passivity. But as far as this lemma is concerned we have not shown either way what we have shown is if these conditions are satisfied then the system is passive. So, now I seem to be out of time for this lecture and so in the next class I would show the positive real lemma and the implication the necessity and the sufficiency I would prove in the next class.