 Welcome to class on nonlinear control. So, let us go back to where we were. We had started talking about feedback linearization alright and we were actually doing a couple of of course I mean we introduced some notation yeah which probably was a little bit complicated, but then we also did an example. So, hopefully you know there is a little bit of clarity and you also hope that some of you did go back and actually try to look through this material. I posted it already on Moodle yeah. So, the lectures are already on there. So, this is what I have been using and I plan to use subsequently also alright. So, the only two real notations and then of course extended versions of this there is the Li derivative which is basically the derivative the directional derivative of a scalar valued function along a vector field and then there was the Li bracket which basically takes two vector fields and gives you a sort of a solve a skew symmetric operation yeah it is like a dgf minus dfg and this kind of an operation. And then there was of course the add notation which is basically just a different way of writing iterated Li brackets right. We had used this to of course look at systems of this form with output which looks like this and we want to sort of come up with this diffeomorphism this transformation. So, if you remember the feedback linearization is two pieces there is a state linearization or a state transformation and there is a feedback which uses which is then finally used to linearize the system or make the system look linear yeah I would not say linearize yeah. So, the idea is you just take successive derivatives of this output yeah and you try to see in which derivative the input shows up and that is called the relative degree yeah and that is basically qualified with this sort of expression yeah because as you take derivatives of y the time derivatives of y you will start seeing the dynamics again and again and again right and that is what happens you have y is h and then you have the first derivative is Lfh if you assume that the you know that that Lgh is 0 right similarly the second derivative is becomes Lf squared h if you assume that Lglfh is 0 and so on and so forth yeah and this does happen because you assumed relative degree R. So, this happens until k equal to R minus 2 ok after that you get something nonzero all right. So, notice that we are still working with a scalar valued control ok this is a single input system yeah the idea is again work for the multi input case but this things is become a little bit more complicated yeah. So, easier to work here with the single input case ok alright. So, so that is the idea we essentially try to compute the relative degree by seeing how many derivatives of the output you need to get to the input right and these then say sort of say that this is how this is the part of the dynamics that you can actually linearize by a feedback ok. So, this R the dynamics of size R is what you can linearize. So, it is like a partial feedback in addition and the rest of it is some additional dynamics ok. So, in order to get to this sort of nice linear sort of structure we need a few inequalities that is in order to verify that these things this y equal to h its derivative with second derivative they do form new coordinates we need some equalities. The first one basically said that if you have these qualities to be 0 that is Lglh Lglf Lglf square all the way to Lglf k to be 0 then it is equivalent to saying that Lgl add fg L add kg all the way is 0 ok. These two are equivalent ok. So, and the key the very, very key identity that we used to prove all of this is basically this guy ok this is what you need alright this is what you need. So, I can even highlight this yeah. So, this is really what you will require in order to complete all of this proof we actually looked at the proof ok. So, once you have that this sort of an iterated relationship yeah there is an equality that is between Lglf k to L add f kg yeah there is a similarity here there is an equivalence here you can actually start talking about independence of these vectors ok. What are these vectors this is just the Jacobian corresponding to this new coordinates that is the new coordinates are h Lfh all the way to this Lfr minus 1h ok. And so, if you take the d which is just a partial you get a Jacobian structure alright. So, because dh is a row vector d Lfh is a row vector. So, you essentially get you know a Jacobian and we used we want to prove that we want to prove that this is linearly independent ok these are row vectors are in fact linearly independent. And how did we do that? We did that by looking at the multiplication of this guy with some other vector ok which was very smartly chosen ok. Why was it smartly chosen? Because once I do the multiplication here we actually did it very carefully right once I do the multiplication here you can see that every row basically just contains you know things like this this guy right and then this guy and so on and so forth. So, basically you start seeing a lower triangular structure alright why this is because of the first equality that we proved ok this is just coming from the first equality right. In this case you have this last term to be non-zero in the second row you have last two terms to be non-zero and so on and so forth. So, you have a lower triangular form alright and it is well known that the lower triangular form whatever is the number of non-zero rows is the rank ok. So, the product of this matrix these two matrices is an r by r matrix and we have proven that r by r matrix has rank r ok which means individually each of these guys also have to have rank r right and therefore these are linearly independent and these are also linearly independent ok. So, you simultaneously proved that all of these are in fact linearly independent ok alright. So, this is where we were yeah of course with the linear independence you once you have this linear independence you can construct this change of coordinates right and since this gives me only r number of coordinates I actually add a few more what is how many more n minus r more because I started with an n dimensional you know state space. So, I have to go to another n dimensional state space. So, I have this r and then I have this n minus r where these phi are simply chosen to make sure that this whole map phi capital phi is a diffeomorphism ok which essentially means that the Jacobian is invertible ok has to be an has to have an invertible Jacobian right. So, that is essentially what it this says this guy has full rank ok yeah full rank means invertible in this case yeah because you can see that phi is its n dimensional x is also n dimensional. So, when I take the Jacobian it is an n by n matrix right. So, full rank means it is an invertible matrix your del phi del x or d phi however you want to write it is supposed to be an invertible matrix. Now, in order to help with that we already know that this the Jacobian of this is invertible or full rank sorry not invertible in this case maximal rank right why because of the lemma for 0.2 right lemma 0.2 basically just said that that this is maximal rank or this is rank R if these rows are rank R then obviously the Jacobian of this is exactly this guy right and that is also rank R ok. So, this helps us obviously. So, lemma 0.2 is what helps us in claiming that these are in fact independent coordinates this is what it means for the coordinates to be independent I mean we are not used to I mean we are not used to this because we just say that x 1 x 2 x 3 are our coordinates and we think they are independent yes because they are in orthogonal frames right. So, we never think about it, but now if I transform this x 1 x 1 x 2 x 3 non-linear to some other function other 3 functions ok. So, I say x 1 square plus x 2 square minus x 3 square x 1 square plus x 2 square plus x 3 square x 1 square minus x 2 square plus x 3 square I just give you some non-linear transformation. Now, what is the guarantee that these new coordinates are in fact coordinates that is the linearly independent ok the only way to claim that is by checking the Jacobian ok you have to take the d phi ok and then you have to see that it is full rank right and if it is you are good and that is really what we are trying to do. So, because of these are independent coordinates because it gives me maximal rank not full rank in this case, but maximal rank. So, all I have to do is to make sure that the d phi of these that is partials of these are also linearly independent ok that is it ok. And we actually looked at an example right this DC motor example right what did we do we we actually verified both the lemmas right. First is this equality lemma which is basically saying that you know this L G L F and L G L F all the way to L G L F R minus 2 is 0 which means that you want to prove that L add F R minus 1 is 0 ok sorry L add F R minus 2 is 0 ok. And that is what we did basically it is easy to see that L add F K is 0 in this case because what does R turn out to be what was the relative degree of the system the relative degree was just 2 it is very simple we just we did all the computations what did we do we computed L G L F first we computed L G H it was 0. Then we computed L F H which was theta x 1 x 2 then we computed L G L F H which was theta x 2. So, this itself came out to be non-zero right. So, this is just the first power. So, so basically you have R equal to 2 right because this 1 is equal to R minus 1. So, R is basically equal to 2 ok. So, we got relative degree 2 right. And so all we had to prove was that L add F 0 G H is equal to 0 and that is what we proved it is very easy already done yeah. So, lemma 0.1 was easy to prove then we wanted to look at the rank of you know the lemma 0.2 which is basically saying that the H and L F H which are our new coordinates. So, in this case H is basically your x 3 and L F H is theta x 1 x 2 these are the 2 new coordinates right. And we wanted to see if their Jacobian has maximal rank. So, we computed that right we actually computed the Jacobian it is d H is 0 0 1 because H is x 3 right and then L F H is theta x 1 x 2. So, d L F H is basically this guy and for this to be maximal rank we just need for x 1 x 2 to be non-zero ok. Then the way we chose our phi that is the third coordinate was just to make sure that I get a full rank Jacobian ok. And what did I recommend I well I thought I I just thought I will make the third row orthogonal to the second row because this first and the second row already orthogonal notice because the dot product of first and second is 0 already right. So, the first and second are already orthogonal. So, I just made sure that the second and third are orthogonal. So, to do that I chose this sort of a y 3 right. So, everything looks non-linear and of course now I know that if x 1 x 2 is not equal to 0 0 then this is a full rank matrix right. So, I am good to go this is a valid new set of coordinates ok. The other choice which I had sort of used earlier was taking the third coordinates as x x 2 minus b right. In that case I would have got 0 1 0 let actually I have written it here yeah corresponding to this I would get the third row as 0 1 0 yeah this is fine to the only problem is in this case we saw that you need x 2 to be non-zero for this to be full rank yeah. If x 2 is 0 then you see that the second and third rows are exactly the same alright and that is a problem ok. So, if x 2 is non-zero all of this works no problem this new coordinate also works there is value in looking at this we will look at we will see this immediately subsequently ok alright. So, now great we now are in a position to sort of talk about the transform system what does it look like. So, if you look at this this sort of new representation or new variables in which we are writing the dynamics ok and you start computing the derivatives right you start computing these derivatives this is basically well I mean this is written in terms of this guy right that is z is basically looked upon as all these coordinates these new coordinates are just written as z I used y that is not a big deal ok alright. So, this is just writing in terms of the capital phi this is not very useful to us just look at this part ok z 1 is basically the actual output of the system. So, z 1 dot is actually Lfh has to be because Lgh is 0 that is how we have been doing right and that is equal to z 2 itself because z 2 is Lfh. Now, if you take the derivative again of z 2 it is d dt Lfh, but that is going to be Lf squared h because again Lglfh is 0 right this is again how we have got the relative degree right this is by the relative degree assumption right. So, therefore, you have z 2 dot is Lf square h which is z 3 ok and you can keep on going like this you essentially form an integrator a chain of integrators ok z 1 dot is z 2 z 2 dot is z 3 and so on and so forth until you get to z r dot right which is now the last coordinate this guy. Now, when I take the derivative of this I will get what Lfrh plus Lglfr minus 1h right just by taking the standard derivative right and plugging in the dynamics ok. Now, you know that this is not 0 because of a again relative degree r assumption right. So, I am going to write this as some Bz plus Azu where Az is not 0 ok. So, that is what the linear part looks like right it is just a bunch of integrators and then the final state has some nonlinearity in its derivatives ok. So, notice I started with a nonlinear system which was nonlinear everywhere right in all the states probably yeah just like in the DC motor case, but now I have because of my state transformation I have reached a stage where I actually have linear integrators everywhere and only in the last state there is a nonlinearity but I will just define this as my new input V right and that is possible because U is actually V minus V divided by A and A is nonzero right. Therefore, I can do this assignment from V I can compute U no problem there is no singularity if you are anything because A is nonzero by my relative degree assumption ok. Therefore, I just had a chain of integrators here. So, this is the partial linearization that we have achieved ok you cannot do anything more whatever is the relative degree of your output that is the best you can do. If you can find an output for which your relative degree is n then this entire thing will look like a bunch of integrators ok. I hope that is clear that if relative degree is equal to n then this is just all going to be looking like a bunch of integrators ok. So, you effectively completely linearize the system ok, all right great. Now, for the rest of the dynamics if we assume that the phi is ok until now that the way we were choosing phi was just to ensure that you got a diffeomorphism that is you got Jacobian full rank which is what we did here right. We just gave a row which sort of made sure that you know this is a full rank Jacobian and from that I went back and constructed the additional phi states right. But here we are saying suppose I have another assumption on phi that in the phi dynamics the control does not show up ok. So, that is the assumption. So, that is what is the normal form. If control does not appear in phi i dot ok, if the control does not appear in phi i dot equations then that is how you choose the phi which means what does it mean? It means that l g phi i x is equal to 0, is that is the way control will not appear right because this is the control vector field right. If I take phi i dot I get l f phi i plus l g phi i times control right. So, if l g phi i is 0 then no control appears in the phi equations right and with such choice of phi if you wrote this dynamics you have what is called the normal form ok. And the d dt phi i is l f phi i and we just call it q i z because q i is just a new notation because now we are writing in terms of the new variables z that is all alright. So, what do I have then in the normal form? In the normal form I again have this bunch of integrators that does not change here control does not appear anyone ok. Control does not appear here because I choose the phi's in a smart way right. So, that phi dot does not have the control alright does that make sense ok. Now, if you go back now to our example ok you look at this choice of y 1, y 2 and then y 1, y 2 is what they are we cannot really play with them yeah we chose this guy what is y 3 dot this guy yeah but control appears in that equation right. So, this choice of transformations does not give me the normal form ok does not give me the normal form it just gives me a linearized form, but it is not the normal form usually in feedback integration control theories prefer to work with the normal form why because it is just nice right you have a non-linear system right whatever non-linearities there are, but there is no control in that, but then you have a linear system sort of driving this non-linear system alright and this driving system is linear ok. So, you can do a lot of things with the driving system right remember again with the cas go back to the cascade idea right there was a driving system or a driven system. So, here this will become the driving system and the output of this will go to this right because we will look at it how that happens yeah, but the point is there is non-linearities here with no control and then there is this linearity here where you can control these states very well basically you can make sure these days do whatever you want yeah because it is linear and has a very nice structure ok. So, this is the normal form what I am trying to say is what we chose as y 3 does not get us to the normal form this on the other hand gives us the normal form why because if you look at z 3 dot ok what is z 3 dot z 3 dot is just x 2 dot right what was x 2 dot no control no control in x 2 dot ok. So, but remember this was a restrictive choice right because this was a valid choice only when x 2 is non-zero ok this is a valid transformation only if x 2 is non-zero ok. So, it is a slightly more restrictive choice here we had the freedom of having either x 1 or x 2 non-zero anything being non-zero was good enough for here, but here no we definitely need x 2 to be non-zero, but although this is a restrictive choice it still gives us the normal form ok which is why this is also an important sort of transformation I think that is what I wrote here yeah this this transformation for the DC motor system is what gives you the normal form ok it gives you z 1 dot is z 2 z 2 dot is this guy and z 3 dot is this no control here notice the control does not appear here ok alright. So, that is how you do it you get to the normal form in addition to trying to get to a diffeomorphism you make sure that the in the derivative of the extra states or the phi states the control does not appear alright. So, that is how you get to the normal form alright. So, now you have essentially what is called a partially linearized system yeah because like I said with this choice of v you have the z 1 to z r states being a linear system right just bunch of integrators actually not any linear system, but a very specific linear system and then you have a bunch of non-linear systems alright we will see what can be done in these cases yeah how to control in these cases, but before we do that we want to define the notation of a 0 dynamics alright. So, we are denoting by psi these partially linearized states which is z 1 to z r and by eta the rest of the states ok just for notation sake. So, the psi dot system is again in this form integrator form right. So, in this integrator form yeah. So, and the eta system is some non-linear form right we do not know what it is, but it is some non-linearity the only thing that we know is a because of it is a normal form the control does not appear right. So, it is some function of psi and eta. So, what we have done is we have split the z states into psi and eta states ok. So, I have split the z states into the psi states and the eta states that is all yeah the psi states correspond to the linear part and the eta correspond to the non-linear part yeah. Now, suppose that the output is identically 0 then all its derivatives are also identically 0 right which means psi is identically 0 ok. What this does to the psi dynamics or the whatever I mean the way. So, if you look at the z r dynamics. So, z r dot is also 0 ok and that essentially is equal to this guy I mean it was just plugging in psi equal to 0 in this right hand side yeah no because this is this can this is depending on all the states see if you go back here let us go back here all this entire state right entire z I cannot control that that is coming from all this L F H and L G H that you cannot control it is not just depending on these states yeah it can depend on both. So, all I am doing is I am splitting the z into these two pieces alright right. So, anyway this is anyway too much detail to get to the basic point. The basic point is that what you call the 0 dynamics is when psi is 0 here ok. This is remember this is the one on linear part and if you put psi equal to 0 here what you get is the 0 dynamics ok. Why this is of interest why this is of value is because this psi system is the linear system right the assumption is that I can do anything with it. So, I can even drive it to 0 as fast as I want. So, if you remember even in the cascade case right what did we say that we had a stable system which is being which is an additive term which is the which is basically coming out of a passive system which is the output of a passive system. So, we were putting a non-linear stable system in cascade with a right you had this guy. So, here what did you have you had a stable system here right and you had in addition to it this basically this wise guy that was coming out of a passive system right. It is very similar to that here if I make this 0 right that was the whole idea right. If y is 0 right then this system is just z dependent and this is a stable system right. But if but we also know that I can do nice things with y because of passivity in this case in this case it was passivity and that is what is driving this system. So, similarly you have this idea that this size states not passive in this case but they are basically a linear system coming from a linear system. So, the assumption is I can do whatever I want with it therefore it is important to actually study the 0 dynamics that is what happens or how does this system the non-linear system behave when the linear part goes away or decays or dies down to 0 what happens ok and that is important alright ok.