 Yeah, so so Strikas asked me to give you a short lecture on passivity So what we will do is I will revise some concepts about passivity the definitions and such And then do something about on passivity base control So this is the plan for part of the of the talk I will speak about the passivity systems theory and also passivity passivity base control and Yeah passivity base control That will be like the last the second part of the of the talk so Passivity if you have studied stability in the sense of Lyapunov passivity is some kind of dual of Lyapunov or compliment you have to leave behind the story about a Model with a differential equation and so on passivity is is really a black block box perspective on system analysis So for instance an electrical network transforms voltages into currents Radiators from current into heat etc. Right so a falling object that transforms gravitational force into speed of folding and so on So you have a system that has inputs and has outputs and it transforms the inputs into into outputs So let's let's look at passivity through through the examples of Electrical networks because it kind of start that way Basically, you have us in electrical network You you have this this input here for a voltage that you apply to the terminals and then you have a load And you have this current flowing through through the load You can see that as a black box system, right? So you have the voltage that goes in and the current that goes out You cannot say that there is a difference of potential that this is here right and a difference of potential as you know, it's just the difference between two two charges of opposite signs and That will produce the current right so considering that the load is a conducting element It will actually oppose to probably to to the passage of this of these currents So all into the loss of magnetism that the charge q plus Will I mean this is a convention will move through the load towards the charge q minus and This movement of the charges is actually the the current, right? So as we know the current is the derivative of the charge with respect to time how these these charges essentially are moving inside the wire In terms of energy We say that there is an electrical potential energy that is transformed into kinetic energy, right? So again, we we apply an input voltage That's a potential energy that we are that we have there because we will have some some potential energy stored probably in a capacitor or in Adapter and it is injected into the circuit and it generates kinetic energy generates movement Meaning the the charges are moving if there is this current that is being generated So the key thing here is that the electric there is a transformation of energy, right? So hence the dynamic the dynamic system now if we assume that the load is purely resistive And we apply a voltage at the input then we have We are what we are doing is we are supplying some energy into the system, right? So There is a supply of energy. This is this is an important keyword in passive systems Naturally the resistive element will warm up, right? So then some energy will be lost. So again, there is there is voltage There is an energy transformation. There is currently generated it goes through the load But some of the energy that is generated or transformed actually will dissipate in the form of heat because because the load is heating up Then we speak of systems that are dissipating energy, right? So it's energy that is kind of lost well not lost because well It's it's lost in this in the sense that you you are not using it But it is there, right? It's just transformed and it transformed in the form of heat Maybe you are too young to know the tungsten In the incandescent bulbs now that they are all leds But there was a time when they were resistive elements and they could get pretty hot So that that would be an example in which you have this energy energy loss, right? Another part of the energy maybe maybe perhaps recovery for some purpose nowadays We we see a lot of research applied research into going in this direction. How can we recover energy from? these type of systems in France for instance, they are working in In Alstom the company that makes trains. They are trying to figure out how to recover energy when from from the Breakage of the of the trains when they break when they come to stop they they want to recover the energy that is This is a classical example. Otherwise of a passive system, right of energy transformation Adam you have some water here. There is a difference difference of level in the water So there is a difference of potential, right? So there is some potential energy Stored you to the to the difference in the levels of the water And then when you open the valves and the water flows here that you create a movement because then there is this transformation of energy once more of Potential into kinetic it goes, you know the story it goes into a turbine it makes it turn etc. You convert it to electrical energy and so so this is just one more example of how you can transform energy and And that's what we want to do essentially when we do when we deal with passivity and passivity base control So to study all these in a more formal way What we do is we need some some tools right some definitions and some some theorems and so on So what we are going to do is to start with this energy transformation equation Yeah, which to co-resolve what I have been Been saying so far and this energy balance equation what it says is that The energy that you have available at some time T Is the same as the the energy that you had at the beginning of of your experiment whenever that beginning was and minus or the energy that was dissipated that you lost into into heat in the bulb or whatever and of course The energy that you have available also Depends on the the energy that you put into the into the system, right? So you have some supplied energy What you had at the beginning and what was dissipated to somewhere in the way If there is no dissipation Ideally we can think of that of course in reality there are no systems that are lossless You always lose some energy But mathematically you could say that if you don't have dissipation then you you would have an equality here And we would call it lossless system Otherwise this energy balance equation is telling you that in a passive system You can only recover as much energy as I mean the maximum energy you can recover from it is of course Smaller than whatever you supplied into it plus Whatever was was already there, right? So very very simple inequality So in the example of the circuit we have that We have this energy Inequality and this energy balance equation Satisfying be due to the energy dissipation in the current, right? So one cannot pull out more energy out of a passive circuit than what was fed into it. That's that's a very Clear statement, right? So let's let's look a little bit closer into into circuits at least that's what people did well many decades ago and Came up with this interpretation of passivity of linear systems There is a whole theory in the frequency domain, but I will not go there So let's imagine our circuit is is a narrow c-circuit So it has a resistive and inductive and a capacitor Elements each of these systems is of each of these elements Have a key role in the in the passivity of the of the circuit so first of all if we apply Kirchhoff's law we can see that the we have this this Equation here so the the the voltage equations Law of Kirchhoff it says that the voltage that you put in the at the input It's equals to the voltage to the sum of the voltages in each of the elements, right? So the voltage in the inductor the voltage in the capacitor and the voltage that is dissipated in the in the In the resistor element, right? So this is the the Kirchhoff's law of balance of voltages if we multiply by by the current on both sides so everywhere We obtained the power balance equation, right? So you can see the first you could see it as a force balance equation and the second one It's a power balance equation, right? So you are multiplying the current by the The voltage now what we are doing here I said that the the current is the output and the the voltage is the input, right? So this is you should see it in a more general way as the product of the input and the output That's a that's a power balance it gives you a power balance equation So the power in your in your circuit is equal to the power dissipated through the resistor element the power in the capacitor and the power in the in the inductor, right? If we integrate that on both sides so we integrate this on both sides we put integrals everywhere We will obtain this, right? So then we have the integral of power. Well, it's it's energy, right? So we have the energy balance equation that this is on the on the slide so this is the energy in in dissipated in the in through the resistive elements due to the passage of the current This is the energy in the inductor and this is the energy in the capacitor now The the as you can see I'm using the letters V and T here to assimilate these part of energy in the inductor as a kinetic energy, right? Because Yeah, the the the energy stored in the in the inductor is considered to be kinetic energy and the energy in the capacitor Is potential energy, right? So it depends on the charges on the on the circuit so but but we have stored in the capacitor and Yeah, so all that is so this is a dissipated energy This is this is potential energy and this is kinetic energy now you have The integral from zero to T so that gives you the energy available at any time T And here we have the energy that was available initially both in the capacitor and the inductor And on the other side you have the integral of the input and the output the product of the input on the up This is called This expression here is called sometimes inner product. Okay, so the inner product of E and V and Yeah, it's written So this is written sometimes like this Maybe you have seen it So that would be Just this this integral Yeah, so this is the energy balance equation as I said if we rearrange all the all these terms we put this and this guy together Over here. We will call that available energy at the time T And these two guys which come from here and here That will be the initial energy that was in my circuit and then These as I already said is the dissipated energy, right? And this is what I supplied. I Just put it on on the other side. I guess there should be a Minus there. No, maybe not No, this one this this one went on the other side and then got a minus. So this is the the energy balance equation, right? So What I can pull out of my circuit at any moment equals what was there in the beginning minus what was dissipated plus what I Supplied into into my my circuit very simple The nice thing about passivity is that well, basically somehow any System I would say probably is passivity in some in some way, right? But it just depends what you mean by passivity as as you have as you have seen everywhere here We have an input and we have an output. So when we talk about passivity, we just need to be clear Passivity, what do you mean from from which input to which output? Okay, but then you take any basically any system in in real life and there will be somehow some Mapping there between some input and some output and you should have this possibility property so In engineering, I know a typical example of a passive system is is a pendulum, right? So so let's see a little bit about about pendulum how this this passivity works So let's say we have this this pendulum here with There is some torque applied to it Here and it moves with certain velocity q dot and then it acquires a Position and angle that we are calling q with respect to the to the horizontal axis you can define it the way you Prefer but I'm doing this way I'm assuming that the mass is right there at the all concentrated here then we have this center of mass there and the gravitational Acceleration acting there so there is a force applied and L is the distance from the Joint from the axis of rotation to the to the center of mass So the force balance equation for this system as we see it so for the for the circuit Now the fourth balance for this for the system is equal to this right so we have mass times acceleration Then we have mgl sign of q which is the gravitational force, right? We view to the to the gravity that is acting on the on the mass here, and we have some torque that we are Putting in in our system to move it, right? So this is a force balance equation We we apply some force and then there are forces that are Natural to from to to our system one force that comes from kinetic energy and one force that comes from potential energy So we have this force balance equation, and we can also compute the energy balance equation So the energy balance equation will be given by this expression here It's going to be this the addition of kinetic energy and potential energy, right? So quadratic function on the angular velocities and this term of potential energy Now the the energy balance equation can be can be obtained as follows the total time derivative of the the energy equation equating the force Balance equation is this Let me Recall what I'm doing here. So if we take derivative on both sides of this of this Equality here everywhere, right the derivative of that we will obtain this equation here So the derivative of the energy equals q dot times times tau The details are not here But you can see that actually what we have is that so the derivative of that So the derivative of these with respect to t is going to be Mgl Sign of q right Times q dot so when you take the derivative of that you will obtain You will obtain and then from the derivative of these you get M times q dot Times q double dot that comes from here. So that's going to be tau minus Mgl Plus sign of q times q dot and all that is Yeah Sorry All these all should be divided by no, this is this is fine, right? This is q double dot is Yeah divided by M Anyway, this I think there is a wrong sign there But the the the thing is that these should go away with that and you are left only with this with this term here Is there a sign wrong there? It's minus right out here. Yeah So, yeah, anyway Normally you should get you should get these so the the thing is that all the nonlinear terms go away and You only have on one side the derivative of the of the energy and on the other side you have the You have q dot that we are going to call output and you have tau that we are going to call We are going to call input. Yeah, so we have this energy balance equation once once more as we had before Current integral of current times times voltage equals Equals energy or the derivative of the energy equals current times voltage in the in the electrical circuit Now if you integrate on both sides of this equation, you get of course the energy balance equation At this here's the available energy equals the initial energy plus the supplied energy So the supplied energy was supplied Through the torque that you injected into your in your system, right? So this is the external input If you are trying to control this system that will be your your control input in this in this pendulum as you see there is no This is an ideal pendulum without friction, which obviously does not exist, but if we add friction what will happen is that We will recover from from the same energy equation We will recover Yeah, this dynamic equation with Some dumping here. Okay, so this this is a friction coefficient That is dumping our Our our system, right? So like if we just let it go it will go down and then eventually it will stop oscillating and Just go to the natural equilibrium Due to this due to this dumping in the previous example if you just It's an ideal pendulum that you you can just push and it will just keep oscillating forever Or or maybe just small oscillations, but of course that also does not exist Yeah, the energy balance equation for this system with the dumping now will be These so the derivative of the energy equals minus b q dot plus Square plus q dot times tau. So once again the the output times the input the dissipativity term and the energy the derivative of the energy if we integrate that Then we get again this energy balance equation, right? So Available energy equals initial energy Minus what was lost due to the due to the friction and the of course the supplied energy. So we can get The maximum energy that we we can get at any moment He amounts to maximum the initial energy plus what we supplied into it, right? So the moral of the story is that a passive electrical Element is a device that does not generate generate of course Voltation because we know that it's not possible to generate energy, but just to transform it But let's say a passive element is is a system that does not generate energy, but it only consumes it Okay, so at best it doesn't We don't lose anything, but yeah, normally it consumes energy, right? So In in electrical circuits theory, we say that the voltage source is an active device, right? It's the one that is injecting energy actually probably taking it from somewhere else and And the resistance is a passive device, right? Because it is it is the one that is actually dissipating energy Passivity is an energy transformation concept. You want to see a System as a black box that is just transforming inputs into outputs and in that way It's just transforming the some kind of energy into some other kind of energy and In this in this process, there is necessarily some energy that this is consumed and probably dissipated so Overall is an input output perspective into into analysis of systems Okay, so we don't care so much about about what is inside When we don't want to do use passivity to control the system, of course We want to look into the into the model, but we will see how these concepts help to to design controllers From a very engineering viewpoint Trying to manipulate this this energy so but other than that in this in this theory the system is really a black box and What else we have here since we regard the nature of the inputs and outputs and also the loss of physics Then a passive system may be modeled by a transfer function So of course there is a lot of theory and passive systems for For linear systems using transfer functions using the frequency in the frequency domain, but we can also But it's it's a it's way more general because again, it's input apples in your black box. You can have whatever right? It can be no linear it can be discontinuous time varying with You are just you don't even basically care what's inside as long as you just have inputs and outputs So it's it's really very general