 So, I am going to go over quickly again this example of feedback passivation that we did this is on the standard Euler Lagrange model for a robotic manipulator ok. So, this is a very general model if you remember we talked about this you can use any kind of coordinates that is why they are called the queues are called generalized coordinates they could be the angle coordinates or they could be the linear coordinates yeah. So, your robot could have this motion or it could have you know sort of elongation and you know you can have a pneumatic actuator which sort of elongates and you know gets bigger and so on and so forth or you could have them or you could have spherical joints whatever you can have different kinds of variables and that is why it is called generalized coordinates it is not just Cartesian coordinates it is also may be angle coordinates and it is very much possible to write all of them in this form yeah no problem yeah. The only cases where you cannot write them in this form the robot dynamics in this form is typically the non-holonomic cases yeah where you have some non-holonomic constraints we are we have not talked about those. So, do not worry about it in those cases the model looks different yeah because there is some you have to have redundant variables because there are non-holonomic constraints. So, that is the only case where you will have different kind of models than this one, but otherwise most robotic manipulators can be modeled in this. In fact, even mobile robots can be modeled in this if the wheels are of omni if it is an omni directional robot yeah if you have omni directional mobile robot that can also be modeled like this no problem ok. So, that is sort of the nice thing this encapsulates a lot of different systems ok the control is on the right hand side typically you will see the control as being motors mounted on the joints for angular motion for linear motion also you can have linear actuators ok. So, that is the control typically like a torque or a force ok alright. If you remember I mentioned that this M matrix is the inertia matrix it is symmetric and positive definite always ok. C is the damping or well C is not the damping C is the centrifugal and Coriolis forces ok and D is the viscous damping yeah we are not a modeling course otherwise we can talk we would have talked about how to arrive at these matrices. So, we are not going to talk about how to arrive at these we just give you some of these matrices alright. G is of course, the gravity term yeah if your gravity is a factor then you have to add the gravity terms also alright. You one of the facts that is known about this model is at m dot minus 2 c is q symmetric ok. What is the value of this? It means that any quadratic form that you construct with any vector eta on this on a skew symmetric matrix that is 0 ok quadratic form of a skew symmetric matrix is always 0 ok this is again standard result alright. Suppose the aim is to track a constant reference yeah I was careful we discussed this if it is a time varying reference then you have to do a little bit more jugglery it is not this simple. So, if you have a constant reference qr ok then your error model yeah error is q minus qr the error model actually looks exactly similar ok again because I chose a constant reference r that is it. If you chose time varying you will have to slightly modify how you work with this problem yeah we may look at it later, but not right now yeah. So, constant reference model would mean that it is a what we what we called set point regulation problem yeah it means I started some configuration and I ended some configuration ok I give a start configuration and an end. So, whatever you folks if you work with quadrotas typically you give way points right it is this you go from one way point to the other you are not giving a trajectory in between sometimes, but more often than not you would also want to specify the trajectory in between. So, that you are not following very very bad trajectories to reach from one point to the other that is not covered here we are only going from one set point to another set point ok. So, that is what this qr is you construct an error you get the error dynamics yeah and we want e equal to 0 to be globally asymptotically stable all right ok. For some kp equal to kp transpose positive we consider this control law for feedback passivation ok. What what were we doing in feedback passivation we were saying that we will specify the control. So, that the resulting system becomes feedback passive in the new control ok that is what we are sort of doing yeah I am already saying what u is yeah because I know this will work. So, this is gq minus kp e plus v which is the new control and I am going to claim that the system is feedback passive with this control and some output we have not yet decided the output either all right output is not decided either. If I plug in this control what happens if I plug this in here what happens this and this cancel out right and this kp e goes to the left hand side becomes a positive term ok that is it that is what I have written here ok. So, now once I have this structure and I know this is a very nice structure even for you it should be evident it is a very nice structure why first of all m is positive definite yeah always the term on the highest derivative should be positive definite symmetric yeah it is already nice think about the Routh criteria all generation of that only because it is almost a linear looking system not very non-linear actually it is almost a linear looking system right because this is e e dot and again a e dot and then you have an e double dot and the second order almost linear looking system yeah and also the term in the connecting to the highest derivative is positive yeah again generalization of positive yeah. So, if you think Routh or its criteria also it is nice yeah because the coefficient on the highest power should be positive right. So, that is already something nice that is happening ok, but we since we are in the world of Lyapunov and energy functions and so on and so forth we are going to actually construct a storage function right for passivity we need a storage function ok what is the storage function this guy yeah and in the context of what Antonio told talked about this is the energy of the system ok why because by introducing this element ok this element is somehow a spring element I do not know if you understand this see this or not yeah this is like a spring yeah. So, this is sort of a spring energy yeah and spring energy is what it is like half kx squared right this is spring energy type of a term and what is the spring energy it is potential energy always potential energy spring energy seeing as potential energy. So, we sort of created a fake spring where is this spring connected yeah it is very interesting this spring is sort of if you have this initial state I am just going to draw this kind of a revolute joints only to make my life easy and say this is the final state yeah this set point right and so what am I trying to do I want to go from this angle to this angle right and this angle say I measure from horizontal angle. So, I want to go from this angle to well actually may be better to measure it from this guy suppose I measure from this guy no I should measure from horizontal that was easier I apologize because this is also measured from horizontal I am measuring all angles from the horizontal ok. So, this angle I want to go to I draw a parallel here so I want this to go to this guy yeah makes sense yeah I am just trying to go to fine that is ok yeah. So, I want to change these angles in this way the first angle goes here second angle goes here all right. Now, what is this spring this spring is a artificial spring that is pulling me there is one spring between these and one spring this way you can think of it as two torsional springs fake torsional springs or pseudo torsional springs which are making me move from here to here and here to here yeah it is. So, this is a very standard thing in robotics just like you know you think you give way point to quadrotors and then the quadrotor moves from one way point to the other then when you design a control in reality not in reality, but in pseudo terms or in energy terms what you are actually doing is you are creating a spring with center at that way point and then the control is sort of pulling it towards that way point you can just think of it in your mind in your head if you think like it it makes so much more sense that all I am doing is giving it up there is a spring connected to my way point and then to my quadrotor body and it is just pulling it. So, you know it will get to that point or you can think about the damped spring. So, obviously it stays there yeah you pull it then the next way point next way point pulls it and then the next way point pulls it okay. So, this is exactly like that I am creating an artificial spring yeah and that is this spring energy this term is just the spring energy which is a potential energy okay and this term is obviously the kinetic energy right anything with the velocities is the kinetic energy. So, I constructed a potential in terms of what Antonio was saying the storage function actually energy function yeah just that I have created some fake pseudo energies yeah which is should not be so worrisome for you because that is how we design Lyapunov functions yeah we are creating some pseudo energies anyway that is the whole idea yeah. So, great once I have this constructed I am just going to take the derivative because I want to claim that v dot is less than equal to some u transpose y and so on and so on. So, basically the same deal as energy gained is less than equal to u transpose y okay great. So, what is the derivative e dot m e double dot that is the first term yeah because the half goes away because it is quadratic similarly I get e transpose k p e dot the second term but I have an additional term yeah which you should not forget as you can see I also had forgotten it very easy to forget. So, I wrote it later on yeah m is time varying right m is a m has variables in it is not constant yeah if it is constant great for you but usually never will it be constant for any robot yeah just think about it this arm is moving in a fixed frame okay but the second arm is moving in the frame of the first term okay. So, you have it will never be a fixed m matrix it will. So, if you think of inertia now now think inertia if I want to write the inertia in a fixed frame I mean you have to choose some frame to write the inertia if I choose to write the inertia in this frame then this is okay will be fixed well this will also not be fixed actually because as this moves there is a problem but suppose I choose this frame to write my inertia the rotating frame but then this guy is still rotating with respect to that frame yeah. So, if your object is moving in the frame then inertia is changing right just like you think of this fan yeah well if it is on yeah right now I will put a frame on that the thing that is the beam that is hang that with the with which it is hanging inertia is constant right because the mass distribution is constant fan is not moving I turn on the fan it is not constant anymore right no yeah you seem confused how really mass distribution remains the same even if it is a fan is rotating where is the mass in the fan on the fins yeah the center object yes it is a it is a symmetric object what you are thinking is symmetry correct if it is a symmetric object which is the center disc sure that inertia does mass distribution does not change with rotation because all directions are the same does not matter but the fins they are they have mass right and their orientation their location keeps changing with respect to the axis and inertia is nothing but mass distribution mass distribution is time varying okay. So, if I write the inertia with respect to that fixed frame my inertia is time varying or state varying yeah it is not actually time varying it is state varying just like that you will have for more often than not you will have you know state varying inertia okay very obvious yeah but it will not depend on so so that it will not depend on q dot it will depend on only the q okay the the not the velocity states depend on the position states only yeah so so this is there is also an m dot q okay which is the time derivative of m by the way yeah you can think of this is a little bit of abuse of notation this m dot is actually dm by dt the total derivative so it is actually partial of m with respect to q times q dot okay so remember that it is just yeah I have just written it like this and now I am claiming this is less than equal to v transpose y okay this is what you have to prove yeah you have to find the output yeah notice I already used the new input I am using the new input I am not using the old input anymore I am claiming that this is less than equal to v transpose y what you have to do is you have to use this fact that m dot minus 2c is q symmetric that is any quadratic form with m dot minus 2c is 0 you have to use this and you will get a very nice y you will get a very nice y if you remember I do not know it is like not in this example but it was somewhere energy shaping yeah in this energy shaping whatever this example this was interesting energy shaping stuff he had passivity with respect to q dot in this case if you remember he got passivity with respect to the q dot variable okay so accordingly you have to I do not know if you remember or not but in this case the passivity was always with respect to the q dot variable see if you yeah you had something like this okay so anyway so basically in this case also what I need you to do is complete the v dot expression and you should get something like a v transpose y for some y okay you have to come back and tell me what is the y okay and you have to of course construct a feedback yeah this is pretty easy once you have a y you your feedback is just v equal to minus phi y such that y transpose phi y is positive definite yeah pretty easy actually I mean if you are free yeah I mean if you if you get a y the simplest feedback is minus k y itself as you can imagine right we we already did this in this example yeah right yeah because it is v transpose y right so if you if you are if you know the y then you construct y is minus k y then v transpose y is minus k norm y squared negative definite in y okay so that is already done yeah you can of course construct you see these saturated controls also like this minus k tan hyperbolic y yeah this just ensures that your control remains within some range okay like a saturated control all right but otherwise yeah once you identify a y doing this is very easy however you have to also ensure that or show in this case that with this particular output y you get zero state observability this was a little bit more work yeah so basically what is the zero state observability it is that if you are if the output you chose is zero then the state also has to be zero there is no other way about it or if you want to define it the way I defined it the set of outputs equal the set containing output equal to zero can contain nothing but the trivial solution that is x equal to 0 okay you have to also show zero state observability because only with these two conditions does this control work yeah you need two conditions not just passivity you also need the zero state observability all right okay