 The next one is of course cascade connection with passive systems ok. So, this is exactly what was happening here ok. So, what I am presenting is just a simplified already distilled version of that yeah. So, what did you have here? You had a non-linear system which of course by under several assumptions could be written as a linear combination of some non-linearity non-linear drift and some outputs ok. And then there was this linear system which is of course, you have some nice properties it is passive with respect to the output and the input V yeah and there is this feedback interconnection ok. So, that is exactly what is specified here for a more general setting again even a non-linear setting yeah. If you see now I have a system that is not controlled anymore ok. I have completely removed the dependence on the second state here. There is some differences I am just trying to highlight what the differences are from here to here ok. If you notice this dynamics first, you see that there is this drift term here right. This no longer depends on the y on the x state right. Here it does it depends on the psi state right. So, I have sort of removed the dependence it is not required I mean, but it is I mean we do not necessarily need to do that. You could also have considered f sub a z comma x, but again just to keep things simple we have taken this sort of situation ok. So, of course, we will assume that this system is you know asymptotically stable right, which is what? If y equal to 0 there exists w such that this is in fact, we are actually we are only assuming stability not even asymptotic stability just less than equal to 0 ok. We are assuming that there exists some Lyapunov like function or Lyapunov function yeah. In fact, I should say maybe more carefully this is positive definite function yeah such that partial of with respect to z f a z is less than equal to 0 ok. This is essentially the Lyapunov stability condition ok. So, if I do not have any outputs then you have the passive system which is actually connected with it that is exactly what you have here. This system is passive right that is what we assumed with all this strictly positive real and all that yeah. So, this system is actually interconnected with this guy yeah because of this y yeah this is the interconnection this y goes in here that is essentially the interconnection ok. So, that is what we assume that there is this passive system now not necessarily linear, but non-linear ok. And we are seeing that this is this is interconnected to the z system how? Because this y gets fed back into the z system ok exactly the same setting yeah just that here you have non-linear there you have linear. So, the linearity here is also not required honestly speaking yeah not required. So, what are we saying? We are saying that the passive system output drives the z dynamics ok. So, what are we going to do? We of course if you have passivity you already have a storage function right for the system vx and such that what happens you already know that for this guy you will have v dot right because that is essentially passivity for this system ok. Notice again that this system has no connection to this system yeah not yet of course you will introduce it we are the control, but as of now no obvious connection ok, but we will make it an interconnection means back and forth yeah that is otherwise it remains a cascade yeah here you see this way this way there is connection both ways that is what we will do through the control ok great. What are we now seeing? We are now saying I will construct a new system new function u which I am going to claim is a storage function for this complete system ok a valid storage function let us see yeah. So, what is this u? It is just the w that I had from the stability of this guy and the v that I had from the passivity of the second guy ok just added the 2 yeah almost like back stepping yeah the reminiscent of back stepping had some function for the first system then had a function for the second system added the 2 yeah that is it that is all and now we are going to carefully take partials right because I have to compute the u dot the total derivative what do I do I take partial of w with respect to z and then z dot which is this guy the whole thing right and then I take partial of v with respect to x and then x dot notice that this does not have any del v del z and this does not have any del w del x right that should be evident because this is only a function of the x state because this is a storage function for this system this has only z states because this is a talking about asymptotic stability of this system right. So, no dependence of these functions. So, these are actually you know functions and different on different states space yeah great great. Now, what do I know? I know by stability of the first guy that this is less than equal to 0 right excellent almost ignore this I also know that this whole thing has to be less than equal to u transpose right this is the passivity assumption yeah. So, what do I know now? I am only left with this guy right because I can ignore this is less than equal to 0 anything less than equal to 0 I cannot ignore in v dot right. So, this is actually from equality I go to less than equal to and then I keep these two terms is this yeah notice what happened I have a sort of feedback passivation type of situation now what will I do? I will simply choose. So, if you see I can take y transpose common outside in both these terms. So, I have only this term left and this term left right. So, I take y transpose common and I have u from here and the transpose of sorry this guy from here ok. What will I do? I will simply choose my control u to get rid of this guy and introduce a new control v ok introduce a new control v what does that give me it gives me v dot is simply less than equal to y transpose v right. So, with this new control v and the output y that was already there this entire system is now passive right. Now, this entire system is passive ok and as soon as you have passivity you know what to do right you can construct v which is say minus k y and hopefully y equal to 0 implies x equal x and z equal to 0 you are done you have a you know asymptotically stable equilibrium excellent yeah exactly what you did look at what you have what is the control exactly this del v del x times this f i same del w del z times f whatever was multiplying the y yeah this you know the Lyapunov function for the first system the partial so basically lgv if you assume y as the control that is essentially what you chose yeah if you think of this as a controller then partial of w with respect to z times f or lgv as we sort of know in conventional terms yeah is exactly the feedback passivation term that you add yeah exactly what he did do is you if you think of y as the control this is just lgv right and that is what he chose as your feedback passivation term here and then of course a new control term ok. So, again he may have arrived at it differently with more assumptions or you know more complicated sounding assumption but actually it is the same thing that we are dealing with also ok. In fact, the linearity here is also not required right as you can see we worked with the non-linear system as long as you have a passive system and the output of the passive system drives this non-linear system yeah in this way yeah linearly of course there is a linear parameterization of course yeah cannot have y square and all otherwise this these terms cannot be combined you see that is the structural requirement yeah. So, if you have a passive system which is driving a non-linear system in this particular way yeah then and this non-linear system without the y is already stable then this entire system is also passive ok. So, stable system in cascade with passive system also passive ok. So, so or if you want to say it differently if a passive system is driving a stable system then entire system is also going to be passive ok. So, very cool result very powerful result. In fact, we will see a nice example of a very very of course if you also have zero state observability which none of these guarantee by the way zero state observability nobody guarantees that you have to verify for that particular output ok. So, notice in this case zero state observability will mean that y equal to 0 implies not just x equal to 0 but also z equal to 0 ok. But if you remember Antonio actually spoke about the zero state detectability yeah zero state detectable if y equal to 0 implies that x converges to 0 ok. And in all these cases all these results zero state detectability is enough not zero state observability is not necessarily required completely ok. Zero state detectability is more than enough ok. So, this is actually rather nice yeah that you can actually work with zero state detectability yeah please keep this in mind yeah you can even write it down in your notes. But anyway it is in Antonio's notes which I have already posted on Moodle all these ports all of these all these three are now posted on Moodle yeah. So, anyway so zero state detectability is enough zero state observability is not required. And if you see zero state detectability is rather easy to achieve in these cases because if y is equal to 0 you know that this system is anyway converging to 0 right z is going to tend to 0 as t goes to infinity right by asymptotic stability assumption. So, I am done this system is zero state detectable ok not basically zero state observable I do not know that you cannot say very easy yeah, but it is definitely zero state detectable and that is enough ok. Feedback interconnection passive systems passive passive system in cascade with a stable system also passive that is what we just did ok. Where is it useful? Attitude control of spacecraft ok of course I do very very simple setup here I do not explain anything yeah I will not of course I do not have that kind of bandwidth in this course. But this is one of the more in most important problems that you know space engineers work on which is the attitude control that is the orientation control of a satellite. So, why is orientation control required should be pretty evident. So, you have remote sensing satellites or you have you know navigation satellite like GPS satellites. They all have some kind of antennas or some instrument that has to be pointed somewhere for example, in most cases in your GPS type satellites or even in remote sensing satellites you want the antenna pointed to a particular point in earth for example, maybe in towards India yeah, but the satellite is rotating on the orbit right it is going on the orbit evolving on the orbit if you may yeah. So, obviously it is if you do nothing if you do not good put any actuation you do not do any attitude control the antennas are not going to remain pointed towards you know a fixed point on the earth right because it is going to do this if you move and the antennas do not move then it is just going to start pointing towards something else right. So, the simple task is you have to do attitude control regularly yeah because it is revolving on an orbit right same with you know if you have solar panels. So, satellites need solar panels to generate power for their equipment right or else if they are in two years of service you cannot expect to be sending a battery or anything right not a choice as of now yeah. So, they rely on solar power. So, now the solar panels also need to be pointed towards the sun. So, there is lot of equipment on the satellite that has to be pointed towards you know a particular point and therefore, attitude control is one of the key problems for space engineers ok. So, what is attitude control you make sure that the there is a frame of course, I mean again I do not talk too much about it, but I can make a small picture I guess. So, not sure if I have a picture here no. So, if you have a satellite say or what we just typically just say rigid body yeah the same ideas work also for quadrotors and stuff if you want to do orientation control of a quadrotor same equation same ideas will work there is no real difference it is a rigid body as long as you think of anything as a rigid body the same equations and everything will work ok. So, usually you have two frames of reference one is what is called actually 3, but I am going to deal with two one is called the inertial frame of reference yeah usually I denote it as n or this is a Newtonian because it is a Newtonian frame of reference which is fixed to the earth and then you have what is called the B frame or the body frame of reference ok. This is the frame that is actually connected to the spacecraft body rotates with the spacecraft body yeah and your aim is to stabilization means that I want to align the body frame with the inertial frame n. In typical set point regulation or tracking you will have another third frame which would be say an R frame yeah or a D frame whatever however you want to denote it yeah you sort of want to align the B B frame to the R frame when I say align the frame it is same as aligning the body because the body is connect body and the frame are moving together. So, if I am starting like this yeah and I want to end up like this yeah this is a B frame this is an R frame ok. So, these are all like standard you know transformations attitude or orientation transformation is a very important maneuver as you can as we have already discussed we do not assume any movement of the origin we assume that the origins are all fixed to the same point we do not consider the movement of origin because these two problems are disjoint problems you can solve them separately that is positioning the origin and then reorienting are two distinct problems. So, we work at work with them distinctly like in quadrotors you have translational control and rotational control ok. So, we do that this is the rotational control problem ok. So, one of the big challenges is how to represent rotations. So, again this is not something that I can delve too deeply into in this course, but rotations belong to what is called the typical rotation matrix actually I should not have called this R let me call this say D the typical rotation matrix between any two frames common notation can be you know yeah is belongs to a not a space I cannot call it a space a manifold called SO 3 which is basically just the space of or again sorry the manifold of orthogonal matrices 3 by 3 orthogonal matrices ok and not just that actually a little bit more yeah ok. So, anyway that tends to get hidden sometimes. So, this is the space we are working with ok again I keep saying space I apologize it is a manifold ok. Whenever you say space it means a vector space and it is linear by nature vector spaces are linear superposition principle applies some of vectors is in the same space yeah to some of two rotation matrices is not a rotation matrix ok you cannot just add two rotation matrices and get another rotation matrix which is why they are not a vector space it is not a linear space it is a manifold, but we unfortunately cannot cover all that the whole point is this leads to as you can see 9 state variables right eventually the representation whatever it is in SO 3 or whatever with some it is it has 9 variables right. So, 3 by 3 matrix right with these constraints, but still a 3 by 3 matrix you cannot reduce the number of variables that is 9 variables. So, again engineers being engineers they like to work with less variables. So, initially they started of working with these Euler angles yeah your pitch roll angles the problem was that there is a lot of singularity in Euler angles yeah that is some you can once you reach a particular configuration you can no longer represent anything beyond that yeah because there is singularity in Euler angles again not going into any detail throwing words, but these were the challenges. So, aircraft folks still like Euler angles because their rotations are smaller typical aircraft commercial aircraft not being twists and you know flips right. So, actually the phi theta psi or the Euler angles are pretty small right for any commercial plane you can imagine I mean I would not imagine anything more than 15 20 degrees ever yeah. So, so aircraft folks still work with Euler angles fighter jet folks cannot work with Euler angles because they are trying to do crazy flips and stuff spacecraft guys can definitely not work with Euler angles because they are definitely exploring all 360 degrees as soon as the spacecraft is ejected out of a you know the launch vehicle yeah into into the orbit it is basically tumbling. It is essentially like you threw something with your hand right you cannot control it is going to be just flipping and tumbling you know all over right and then if you want to stabilize. So, how do you even deal with the angles you have to deal with parameterizations which do not have similarity. So, Euler angles are a problem. So, therefore, we spacecraft folks move to quaternions which are four variables yeah instead of three therefore Euler angles were three they were four and what we are looking at here is basically a modification of the quaternions only these are called modified Rodriguez parameters these are only three yeah they have no singularity yeah and they have I mean well wherever they have singularity is not where you are interested in operating. So, you are fine okay. So, modified Rodriguez parameters is one representation of rotation matrices okay any rotation matrix can be written in terms of this row variable okay that is what the whole idea is. So, modified Rodriguez parameters are pretty good relatively singularity free and they are only three variables okay. So, they are all these parameterizations of rotation matrices are based on some ideas of projection. So, this is also based on some idea of projection okay quaternions are simply based on the idea that any rotation any rotation to initial to final configuration is not actually you do not have to think of it as three rotations it is actually one rotation about one principal axis it is called the Euler's theorem actually any rotation between initial and final configuration is actually a single rotation between around a particular axis which is called the principal axis and you have a principal angle about it okay. So, this is the Euler's theorem based on the Euler's theorem you have quaternions yeah and then you have modified Rodriguez parameters which can be derived from the quaternions okay. But the simple idea is all of these help you parameterize the rotation matrix. So, basically what I am trying to say is that this rotation matrix say between the body frame and the inertial frame can be written as a function of this row okay this 3 by 3 matrix can be written as a function of row yeah this expression is also readily available all right. What are the other things orientation means I have orientation and angular velocity also. So, there is an angular velocity which is in R3 tank line linear space there is a control which is what the thrust typically the thrust you have a thrusters are typically used in what is called attitude controller reaction control systems. So, these are basically these are only jets that are firing yeah you must have seen some visualizations yeah they just fire jets to reorient the spacecraft okay. So, this is the thrust this is the inertia matrix J equal to J transpose positive definite inertia matrix is constant in this model okay unlike the robot model inertia matrix is constant because the inertia is written in the body frame all the equations are written in the body frame okay. So, this is also in the body frame everything is in the body frame okay. So, more details on this are in a dynamics course yeah which we teach also later on at some point but remember that the model is written in the body frame therefore the inertia is actually constant yeah again for the fan if I took the frame as the one that is rotating with the fan and I wrote all my equations on that frame then inertia is a constant yeah because it because my frame is rotating with the fan therefore no change with respect to that okay. So, that is the idea we have the kinematics equation and the dynamics equation do not ask me how this comes yeah this is not a matter of again discussion in this course just take it on face value this is the equation rho dot all of these equations are derived from the equation for the rotation matrix okay and the rotation matrix derivative has a very simple equation yeah this is the equation for the evolution of the rotation how rotation matrix changes it is just actually I keep writing this R, B, N just for your convenience typically we do not write the B and N R is usually evident from what you want to work in. So, this is how the rotation matrix evolves the derivation of this is very simple I am not going to cover it yeah from this you get all these equations okay because these are just parameterizations of the rotation matrix right. So, once you know how the rotation matrix evolves you also know how these guys evolve okay. So, this is the what is called the kinematics equation the evolution of the parameters yeah or you can think in your head in terms of Cartesian as angle derivative is angular velocity right connected to angular velocity. So, that is what it is somehow angular derivatives are connected to angular velocity yeah that is the kinematics equation and the angular velocity derivatives have some dynamic terms okay this is actually very very easy this is just the Newton's second law right this is d dt of this is what this equation is d dt of j omega is equal to u okay. So, when you take derivative and so why this turns out to be like this is that remember that this vector j omega is in the body frame not in an inertial frame okay. So, this is a vector in the body frame yeah it is in a vector in a rotating frame. If I if on this fan rotating fan I put a vector right which is fixed with respect to the not necessarily fixed but it is whatever written with respect to the body frame the rotating frame it is a vector in the rotating frame okay. So, when I take the derivative of such a vector it always has two components one is the change of the vector in the frame that is j omega dot and the second piece is the inertial change yeah this is omega cross j omega yeah you would have seen this in your high school this is I think I do not use the terminology use is called transport theorem you know you sort of how you how do you take derivatives of vectors in moving frames. So, typically this in high school or in undergrad there is I am assuming there is in physics this usually taught yeah yeah you may not remember the form this particular form but it is taught if you go back and you look at you know even your high school physics problems on Newtonian mechanics you will see that you did this yeah. So, basically it is like how do you take derivatives of vectors in a rotating frame yeah if I give you a vector which is in a rotating frame not in a fixed frame then how do you take it derivative this is how you take it derivative you first find the derivative with respect to the rotating frame and then you are taking the derivative somehow of the frame with respect to the inertial frame that is omega cross j omega. So, that is what this is it is just Newton's law written in a moving frame. So, very interesting but again not I am not delving into too much details because this is not the intent of this course yeah, but that is it simple kinematics is angles derivatives related to velocity angular velocity dynamics is angular velocity derivative related to you can think at angular acceleration or control or thrust ok that is it all right.