 class we have discussed that what a derivation of infinite time linear quadratic regulator problems and then corresponding optimal controller if you use to the system then its stability analysis is also studied. So, let us explain or illustrate that LQR problem with a numerical example. So, let us consider our dynamic system which is given is a second order dynamic system x dot is equal to x 2 of t and x 2 dot of t is equal to minus twice x 1 of t plus 2 x 2 of t plus u of t and we have some initial condition is given this is given. So, our problem is to determine a control law if you recollect that our infinite time regulator problem our problem is to determine the control law u such that this performing index quadratic performing index is minimized. The first problem first is you determine the optimal control law u of t small u of t because it is scalar input small u of t is equal to minus k into x of t where x of t is equal to we have a two states are there x 1 of t x 2 of t and this is the controller gain LQR controller gain LQR controller gain and is nothing but a state feedback. What is the information of the state you know from the system that we are being some linear combination of the states will give you the control law u this is the control law. So, we determine the optimal control law key u of t such that such that such that the performing index j is equal to 0 to infinity because it is infinite time regulator problem of horizon infinite horizon control problem is a x 1 square of t plus x 2 square of t plus twice u square of t whole d t is minimized you design a control law u of t such that this performing index is minimized. And this interpretation we have already discussed suppose this is the input free system this equilibrium position is the linear system the equilibrium position is origin is the equilibrium position and due to this initial disturbance or initial condition of the state the state x 1 x 2 will deviate from the equilibrium position and our this interpreted system in interpreters that deviation from the equilibrium point means on the origin x 1 state over the interval 0 to infinity that quantity you have to minimize not only that in addition to that control effort u square u transpose q u transpose r u t which is e re is in this case is twice u square t of this also you have to minimize. So, this is the first problem you have to solve first part of the problem first part is that one second part of this problem is check after designing the controller check the stability of the of the closed loop this is the closed loop closed loop system this is thing. Then third part of this problem is simulate the systems or get the response of the system simulate the system with and without controller with u t is equal to 0 means without controller without when u t is equal to 0 without controller with and with that controller without controller using the designed l q r controller l q r controller with initial state x of 0 is equal to 2 4 2 this one. So, let us solve this problem and if you recollect the basic steps of solving the l q r problem is first step is to solve the algebraic rickety equation first we have to solve the algebraic rickety equation what is the algebraic rickety equation solution we are adding solution. So, first we write the algebraic rickety equation the algebraic rickety equation is before that you see you have to identify which one is a matrix b matrix q matrix r matrix these are the four matrices information is required to solve the infinite time regulator problems. So, we have to identify from the system model what is system matrix a input matrix b and state waiting matrix q and control waiting matrix r that we have to identify it is easily can be seen from the system equation we can write it that x dot is equal to x dot t is equal to 0 1 if you write matrix in vector form is a minus 2 2 into x of t plus 0 1 u of t. So, from this one immediately you can write a is equal to our 0 1 minus 2 2 and this is b is equal to b is equal to 0 1 and if you see this one if you just if you see this our q and r matrix if you see here our q and r matrix this matrix we can easily write it this performance index we have to convert into a standard form that means here itself we can write if you like if you permit me I can write it half because that what is called the performance index that one we should be half into 0 to infinity since I divided by half multiplied by twice x 1 square plus twice x 2 square plus 4 u square of t whole dt why I have made it half our standard formulation you will say half is there this half is we have created there in the derivation because when you will do the partial derivation derivation of this square problem throughout the derivation derivation process the two will come two and this two will be cancelled for this one and based on this one we have derived all our expression. So, that is why I have just in order to make it into standard form I divided by half multiplied by 2. So, this is the standard form from this equation you see that q is what r is what from this. So, our q is if you see this is nothing but a 2 0 0 2 and our r is equal to 4 this is 2 cos 2 matrix this is this. So, once you know a b q r this is the first step identify a b q r from the statement of the problem once you identify this one then you can write it next step is to check that what is the what is stability condition check the controllability condition you check the controllability condition whether you will be able to drive all the states into the what is called desired location or if the open loop poles are unstable whether you will be able to drive this that unstable poles to the stable poles mean the from the right up poles to the left up poles whether you will be able to do it or not that you have to check it and that is done suppose you have a system before that I am just telling you how to check this one if you have a system described by x dot is equal to a x plus b u of t then how to check the controllability of the system means controllability of the system means you will be able to drive the state from initial state to a desired state with a finite time within a finite time by using appropriate control law whether it is possible or not before that we can check it whether the system is controllable or not we can check it that you find out the rank of this matrix rank of let us call the matrix is w is how will you form the rank of the matrix b a b and dot dot a n minus 1 b this you form it this is a n cross 1 n cross n matrix then state of the system is n states so you form a matrix up to a n minus into b so find out the rank r small r is indicates rank of this matrix if the rank of the matrix is n the system is this implies the system is completely controllable the system is completely controllable that may all the states will be able to drive from any position to the n i what is called any other desired position that is so we will check whether system is controllable or not at least it should be stabilizable so if you check this one then we will find out that our rank of rank of b a b in our case rank of b matrix is what 0 1 is a vector in this case or you can matrix of dimension 2 cross 1 this b then a b if you multiply a into b that will be coming say this a into b a into b this will reflect the last column of that one so that will reflect the last column of that one so it will be coming that 1 2 so that ring that rank of this matrix clearly is equal to 2 and which is equal to n in our case n is equal to 2 if you see number of order of the system is 2 so the system is controllable so these are then we can proceed if the system is not controllable or at least is not stabilizable then you have to check whether system is stabilizable or not means stabilizable means if you have a open loop system is a unstable mode that unstable mode should be stabilizable in the sense you will be able to drive the unstable poles or the Eigen values to the from the left half from the right half of the s plane to the left half of the s plane you will be able to drive it by using a control effort if you satisfy that condition then it will be told the system is stabilizable but uncontrollable mode is not controllable then it is not stabilizable hence it indicates that we cannot apply the LQR control problems so unstable in other sense you can unstable modes means Eigen values unstable modes of open loop system must be must be stabilizable so this is the important thing so first if you check the controllability test if it is completely controllable we can proceed first then our step is if you recollect one by one step we have to solve the algebraic equation since it is infinite time regulator the time is 0 to infinity in the performance index integral part 0 to infinity so it is infinite time regulator problems so our equation is h transpose p plus p a minus p b are inverse b transpose p plus q is equal to 0 null matrix of dimension n cross n we know a b r q so only unknown is p you have to solve it by some means we will discuss in details what is the different methods are there to solve the algebraic equation for the time being we just use since it is a smaller dimension 2 by 2 or 3 by 2 we can do algebraic solution of this one because we will get a set of non-linear equations set of algebraic non-linear equation then how to solve this one with a smaller dimension we can do it with a hand calculation let us see I will put the value of that one a transpose a is what this is the a a transpose you write it so this will be a 0 1 minus 2 2 a transpose and then p p is a symmetric matrix and positive definite solution you should get positive definite p 11 p 12 since it is a symmetric matrix p 12 is equal to p 12 p 12 plus again this one p p 11 p 12 p 12 p 22 then multiplied by a 0 minus 2 1 2 this is that one p a all this thing then then minus p p I am writing p p 11 p 12 p 12 p 22 p b b is what 0 p b 0 1 then r inverse r is 4 1 by 4 then b transpose b transpose is 0 1 then multiplied by p so this cross I am writing here next page cross multiplied by that is our p p is p 11 p 12 p 12 p 22 then plus q q is a diagonal matrix is 2 if you see so this and right hand side is equal to 0 0 0 0 again so now you see you multiplied by this into this a a transpose p unknowns are 3 unknowns are there 3 equation at least we are getting 3 equations so we can we will be able to solve but when you will equate left hand side is right hand side you will get in general is non-linear algebraic edicati equation that we have to solve it so that you multiplied by this into this this into this is a minus 2 p 12 so I will write it left hand side minus p 12 is equal to so first we will write it minus this this into this into this so it will be a minus 2 p 12 then it will be next is this row multiplied by this minus 2 p 22 minus 2 p 22 then this row multiplied by this column p 11 twice p 12 p 11 plus twice p 12 then this row p 12 then this row multiplied by this p 12 p 12 plus twice p 22 agree so this and this part this is a transpose p this one and this we have shown this value now look at this one one one cannot solve one not necessary to solve p a so p a is nothing but a transpose of this one once you got the product of this one take the transpose to get p a to take the results of that one a transpose a transpose p take its results transpose then you will get p a so I will take the transpose of that one so this will be a one minus twice p 12 minus 2 p 22 p 11 plus twice p 12 then p 12 plus twice p 22 so this quantity is nothing but a transpose p transpose of this one is nothing but a p a transpose of that quantity is nothing but this one so you can ever this so next is if you see you multiplied by p b are inverse b transpose p agree if you do this one this second part of this one that p b if you multiplied by this you will get the last column of p because you see this 0 1 so it will come last column of this so this into this so ultimately it will come from this one last column of this one that will be p 11 p 1 that will be p 22 that multiplied by r inverse r inverse is what 1 by 4 that means 0.25 now you see this one b p b are inverse and p b if you know it if you take the transpose of that one b transpose p so this you need not to compute from the knowledge of this results I can take the transpose of p b then if you take the transpose of p b I will get it p b transpose p so this is p 11 p 22 then multiplied by what is this p b transpose then p p b transpose we have done it so this part is over p b we have calculated r inverse is 1 by 4 means 0.5 and transpose of this one we have calculated this plus q q is 2 0 0 2 is equal to 2 0 0 0 now now you element wise left hand side right hand side you equate this element means a 11 position so you add this one plus this one plus after multiplying by this you add it so if you see that quantity this quantity after multiplying by this it will be a 1 4th this is 1 4th means point minus 0.25 and this is nothing but a p 11 square p 11 p 22 this then this will be a p 11 p 22 then p 22 square I am writing this quantity only so just like now adding this quantity a 11 element a 11 element this one is this one a 11 element then a 11 element is equal to that one so element wise if you equate now you will get it element wise so I am getting 11 element left hand side and right hand side if you equate I am getting minus 0.25 p 12 minus 4 p 12 plus 2 is equal to 0 you see this and this 4 this is 2 4 2 and this is coming 0.25 p 12 0.25 p 12 what is this this or this is I did mistakes here you just see here if you multiply it by this and this that this and this it is p 12 this row multiplied by this it is p 12 this this row multiplied by the p 22 so it is not a p 11 p 12 so this is also p 12 so this will be coming p 12 multiplied by this this is p 12 again so now I am getting 0.5 p 12 square plus 4 p 1 0 1 element then I write it 2 2 element 2 2 element 2 2 element is that one you see this plus this this is the 2 2 element this is the 2 2 element and here 2 2 element is this one plus 2 2 element is 0 here is right hand side 0 so if you see the 2 2 element minus minus 0.25 minus 2 225 p 22 p 22 square then you will get it twice twice see this one p 22 element p 22 then this so it will come now I am telling sorry that p 22 element that that that means forget about not this one p 2 element is that that one so this one this one and your case is that that one this is the p 2 element I am writing so this is 0.25 p 22 square 0.25 p 22 square what I have written it then this twice here is this one p 12 2 p 22 then p 12 2 p 22 the twice of this one plus 2 so I am writing this one twice of p 12 plus 2 p 22 plus 2 is equal to 0 this is another now I am writing either p 12 element element is same as p 21 element because it is a symmetric matrix so now in this case you see what is that quantity p 12 element is this one agree this one then this one and this is this one and this is 0 this one and this is this one so if you write it that one I can write it p 12 elements are that minus this 0.25 point minus 0.25 p 12 whole square then your minus minus 2 p 22 2 p 22 then your plus p 11 plus twice p 12 is equal to . Just I am writing this quantity 1 2 element 1 2 element is 0.2 p 11 2 p 1 2 p 1 1 2 p 1 2 p 1 2 element this is p this is the thing p 1 2 element minus point 2 5 p 1 1 p 2 2 p 1 1 p 2 2 this quantity and then I am writing p 1 2 p 2 2 p 2 2 p 2 1 2 p 1 1 plus twice p 1 2 twice p 1 2 this. So, I am writing clearly this 1 point 2 5 p 1 1 p 2 2 then minus twice p 2 2 plus p 1 1 plus twice p 1 2. So, you have a three equation p 1 2 and three equation and the three equation if you solve it you will get the solution of p 1 1 p 1 2 p 2 2. So, let us solve this three equation then what will get it let us solve from equation one from equation one what we can write it this is a quadratic equation we can write p 1 2 is equal to that is minus b plus minus root over. So, if you just divided by multiplied by what is 4 both side then it will come this if you multiplied by both side by 4 minus 4 then p 1 2 square minus 16 p 1 2 this is minus minus plus minus 8 is equal to 0 that quantity is that one this if you multiplied by minus 4 then this will plus plus minus. So, it will be minus b plus minus root over b square means 16 square minus 4 a c divided by 2 into a. So, we will get this if you solve it you will get 2 values of p 1 2 that is value is 0.485 or I will get minus 16.485. So, out of this two whether we have to accept both the values or one of them we have to accept that will see let us stage. So, let us say once I know p 1 2 from equation 2. So, from equation 2 I know p 1 2 p 1 2 value here if you put up p 1 2 value here you will get a quadratic equation in p 2 2 form and a quadratic equation p 2 form. So, if you just put the values of that one p that expression once again I multiplied by minus 4 both sides both sides minus 4. So, it will be coming if you multiplied by minus 4 both sides it will be coming p 2 2 square minus 16 again 16. Then it will be p 2 2 this is 2 16 how it is coming 2 2 4 multiplied by 4 means it is 16 minus 16 p 2 2 minus 8 I am multiplied by 4 minus 4 minus 2 is there. So, minus 8 p 1 2 minus 8 p 1 2 p 1 2 value is what if I consider 485 first this is the p 1 2 value and minus next is minus 8 is equal to 0. This is minus 4 both side this is minus 4 is equal to 0. So, ultimately our equation is that one p 2 2 square minus 16 p 2 2 minus 11.88 is equal to 0. So, the solution of this is equal to 16 plus minus 256 16 square minus 4 into a into 11.88. So, there divided by twice a and that value will get 2 values of this one 16.7111 value and another value will come what is this is plus minus. So, it will be what is called minus sign minus sign will precede with a that minus more than 16 will get. So, this next quantity will be negative term agree one can easily find out that negative term is what. So, this negative term cannot be considered because our if is a silvestre inequality test if you see a matrix should be positive definite first condition is all diagonal elements must be positive. But here the other values of p roots are negative. So, we cannot discard the negative values of p 2 2 discard the negative value of p 2 2. So, we will consider this one and this is a positive definite. This is the one value of p 1 2 which is 0.485 suppose if you consider the value of p 1 2 is that one. Then you will get solution of p 2 2 is complex. So, we will not consider that values. So, this will give you the we will accept that value accept and this will give you this will give the solution of p what you got p 2 2 this will give the solution of p 2 2 complex value. So, we will consider our this is the we will accept it p value is this one p 2 2 value once I know p 1 2 value and p 2 2 value once I know p 2 2 value and p 1 2 value immediately I can find out from equation 3 the p 1 1 this is known this is known p 1 2 is known and which value we have accepted that we know and we can get the solution of p 1 1. So, from 3 using p 1 2 is equal to 0.485 and p 2 2 is equal to 16.711. We get p 1 1 is equal to 0.25 p 1 2 p 2 2 plus 2 p 2 2 minus p 1 2 that is the equation number 3. So, this equation once again I multiplied by 4 that will be a minus 4. So, this will 4 p 1 2 this or as it is keep it does not matter for this one. So, 0.25 p 1 1 p 2 2 if you take that side agree that p 1 2 p 2 2 values this p 2 2 values this and p 1 p 1 2 values twice p 1 2 values and from this equation you see one can write it this equation p 1 2 this you have to take that side 0.25 p 1 1 p 2 2 which I have written in that one. Then it is a 2 p 2 2 if you take that side is a plus p 2 2 then your twice p 1 2 just see this one twice p 1 2 equation twice p 1 2 then p 1 1. So, minus twice p 1 2 this is twice p 1 2. So, if you use this values of this then p 1 1 value you are getting 3 4 34.48 p 1 2 from this equation I just find out this is the only unknown thing this is the unknown. So, I can get by using the values of p 1 2 p 2 2 value with appropriate values of p 1 2 p 1 2 and p 2 2 and now you check it p should be a positive definite matrix. So, p is p 1 1 p 1 2 p 1 2 p 2 2. So, if you put this values of p 1 2 34.48 then p 1 2 is minus 0.485 then 0.485 then 16.71. So, and that matrix is positive definite matrix you can check it either finding out the Eigen values of this matrix or Eigen values will be a positive or you can use the silvestre test for testing the what is the matrix is similar whether matrix is positive definite matrix or negative definite matrix or positive definite matrix or negative definite matrix that can be checked by using the silvestre inequality conditions. So, this so our case is p is greater than 0. So, positive definite matrix so this implies that our the controller the way we will design the controller controller will stabilize the systems. So, let us find out the controller gain controller gain. So, controller gain so you know k is equal to R inverse B transpose P you just use the values R inverse means 0.25 B is 0 1 and P is just now we got it is a 34.48 0.4085 0.485 0.485 and that we got 16.71 if you multiply it by this last row will be reflected. So, 0.25 into last row 0.25 into 0.85 16.71. So, multiplied by 0.4 divided by this each element by 4 then you will get it this is 0.121 then 4.178. So, this is the controller gain so this is the controller gain we got it. So, once you know the controller gain immediately I can find out the control law and which is nothing but u of t is equal to minus x of t we assume that these are all accessible measurable by the users this one. So, you know k immediately you can implement u of t. So, u of t is nothing but a minus 0.1210 not 0.4 point just now we got it 4.178 this into that our x is x 1 of t x 2 of t. So, this is our control law and if this control law you apply to the system then it will stabilize the system not only stabilize it will drive the state to a what is called equilibrium position from the initial state x to 0 to the equilibrium position agree in a optimum manner by minimizing the that performance index. So, our check the closed loop system stability so our x dot is equal to a is equal to a of x t plus b u of t u of t and if you put the value of u of t is equal to minus k x of t and our closed loop system will become we take the x of t common then b of k is x of t and this is nothing but a suffix c x of t and this is the our closed loop system matrix. Now, system is stable or not you just find out the Eigen values of this matrix if Eigen values of this matrix with a negative real parts then system is stable. So, find out the what is called Eigen values of this matrix the closed loop system the part 2 is the if you see the part 2 of the problem our the check the stability of the closed loop system part 2 of the problem is check the stability of the closed loop system. So, you find out the Eigen values of Eigen values of a c matrix a c means a minus b k matrix if all the Eigen values of this one with negative real parts the system is stable. So, find out it is just we know how to find out the Eigen values the determinant of a c minus lambda i of this equal to 0 and you will get because a c is known lambda is unknown. So, you will get a polynomial of order in general n where n is the dimension of the system matrix or dimension of the state variables agree. So, this will be the order polynomial you will get in terms of lambda which order will be n same as n is the order of the system matrix. So, you just find out first is a c a c is our a n a is our 0 1 minus 2 2 and b is your 0 1 and your k k we got it 0.1 2 1 4.1 7 8. So, now if you simplify this one ultimately you will get this matrix is 0 1 minus 2.1 minus 2.1 7 8 this is the closed loop system. So, the Eigen values of this one how you find out. So, determinant of what is called matrix a c minus lambda i is equal to 0. So, if you do this one so, I will leave it exercise to this one is nothing but a a c symbol is lambda i of this is equal to 0. If you do this one you will get it the determinant of lambda square is equal to plus twice 0.1 7 8 lambda plus 2.1 2 1 is equal to 0 that Eigen values of this 2 will be this is quadratic equation minus b plus minus root over b square minus 4 a c if you do it you will get it minus 1.01 plus minus 0.967 i. So, this is the real part of this one is negative. So, system is stable that means with the application of this controller the system response will be stable means it will bring back to the state from initial state to an equilibrium state. So, our conclusion this implies that our the closed loop system design with LQR approach stabilize the systems with LQR approach stabilizes the closed loop system design with LQR approach stabilizes. So, this is our conclusion now third part of the third part of the problem is if you see it is nothing but a that is what you call find the system response with the application of that what is called LQR optimal control law and optimal control law is designed based on the LQR. So, you are asked to simulate the system get the response T versus you find out x 1 of T then x 2 of T this is. So, our initial state if you see it is a x 2 if it is a this is 4 0 and it is a 2 4 6 8 10 12 and 16 something like this then our initial state is starting from that our x 1 0 is this one this is the initial state for x 1 of 0 is equal to 4 this is the initial state x 2 of 0 is equal to state by using this what is called control law you find out the response of the systems. Let us call the response of the system just say you have to solve it how it would solve it x dot is equal to x dot is equal to a x plus a x of t plus b u of t or you can write a x minus b k of x t. So, it is a solution of autonomous that autonomous system is a closed loop system you know the value of given x dot x t 0 is equal to x 0 is given. So, you can solve this one say let us call the solution may be like this way ultimately to come g 0 and this is the solution of other state solution may be like this way it is coming to g 2 like this. So, you find out the response of this system and you know the this matrix and you can solve it. So, this will leave it I leave this in an exercise to solve this one. Now, let us say with closed loop control system how it looks like in a block diagram form. So, if you see our system is this is our f integration this is the integration and this is our x dot 2 x dot of t output of this is the integration output of this one is x 2 of t which is nothing but a x 1 dot of t as per the description of the system dynamics and that goes to the integrator. Let us go to the integrator and the output of the integrator this is the integrator. So, output of this one is x 1 of t and this output is going to the minus and this is the summer and x 2 is multiplied by 2 gain 2 you can say x 1 is gain 2 amplifier you can realize this one is in a prepare this is the your plus and this is state information is minus 2 and then it is. So, this is our this portion we x dot is equal to x. So, you have a b u. So, you have a this so x and x 2 information must be available to the controller. So, our controller this is one. So, this is our x 1 x 1 of t and this value is what point 1 2 1 1 2 1 and this value is your this value is 4.178 this is our x 2 of t. So, these 2 signals multiplied and then it is a minus k x negative and this multiplied by your b u and what is our b u and this is u is coming only the you see that in dynamics of that one u is coming only in the second state that makes 2 dot expression. So, this directly I can write it this is nothing but our u u of t. So, if you see this portion from here to here this is our plant or system plant or system and our controller is that part this is the controller that is the controller and this controller is what type of controller that controller is l q r controller. So, one can look at this expression one can change the controller gain by selecting the state weighting matrix q and r this is only the tuning parameter designer have that I can tune the controller parameters that k values by tuning the q and r. So, if so long our response is not satisfied we can always tune q and r to get the desired response of this one. So, this is our the this scheme is the infinite time l q r problem solution this is the thing. Let us now go back to what is we call the how to solve the what is called the algebraic equation how to solve the algebraic equation by different techniques or different methods solution of algebraic equation solution algebraic equation. So, first method is the simplest method, but it takes much time to get the converse value of p. So, method one is the iterative method iterative. So, a re solution so what is our a re equation a transpose p plus p a minus p b r inverse b transpose p plus q is equal to null matrix of dimension n cross n where n is the order of the system matrix or the number of states in the systems this is n. So, this can we can rewrite into this form look carefully how we are writing this one a b a minus b r inverse b transpose p whole transpose p then plus p a minus b r inverse b transpose p this plus q plus p b r inverse b transpose p is equal to null matrix. Now would see this manipulation we have done also earlier when you have discussed the finite time regulator problem what I did it here this term is this and this term I have written a transpose if you see a transpose p this term is there then this will be a transpose then multiply by p. So, it will be a p then it will come b r inverse b transpose into p. So, I am getting that one you know the this a b c whole transpose is equal to c transpose b transpose a transpose that properties I have used it here. So, this is the that equation then this equation then I mean p a this is a commutative p a minus p r inverse b transpose p this. So, this is a one term I have taken more. So, I have added p b r inverse b transpose p. So, this can say that ultimately this remains same. So, this I am writing into this form a minus b r inverse b transpose let us call this is I am writing p suffix k the value of p transpose p k plus one then p a minus b r inverse b transpose this is I am writing k plus one is iteration this is k is equal to if I take this is my that side is equal to q then p k b r inverse b transpose p k what is the k indicates the k iteration what is the value of p let us call starting iteration is zero iteration p of zero and this is means next iteration what is the value of p that is k plus one in this way I have just inside the bracket is a kth iteration outside the bracket is p value is k plus one iteration in this way. So, now you see this matrix q is positive definite matrix positive definite matrix r is positive definite matrix. So, this product will be because it is multiplied by some matrix then positive definite matrix and transpose of that maybe post multiplied by transpose of pre multiplied matrix again. So, this matrix in turn the whole matrix is becoming a positive definite matrix. So, positive definite matrix and positive semi-definite matrix, the result will be positive definite matrix. So, it is something like a standard leaponna function method function, if you consider then you have to find the stability of the autonomous system we know our condition is A transpose p plus p A is equal to minus q, you assign some positive definite matrix. If A is stable that solution of P must be positively defined so that we are using here so our expression now it is coming if you see if I consider a k this is the whole thing is a k a k transpose p k plus 1 plus p k plus 1 a k is equal to minus that one q plus p k plus b or inverse b transpose p k so this please note down what I am written here suppose if I have a x dot is equal to a x is there you want to study the stability of this system by using leoponov function method then our condition is that this solution if you do the solution of this one and with a assigned value of q is equal to positive definite if you get the solution of a is a is if you know a p if you get the solution of p is positive definite it indicates the matrix a is a stable matrix means all eigen values of a matrix is negative real parts so here also how to solve this iteration this one k is equal to 0 1 2 dot dot when is equal to k is equal to 0 means p of 0 so you assign p of 0 value positive definite matrix in such a way so that this matrix is stable so you choose initial value of our required equation solution p in such a way p 0 so that a minus b r inverse b transpose is stable then then this is I just mentioned this this is a positive definite matrix so this is this is a stable matrix this is a positive definite matrix then the solution of this one I will get positive definite matrix whatever the you got it this positive definite use it here once again then you solve this equation and repeatedly you do and you will see finally that you will get the solution of p at k tends to infinity p is converse to a constant value that will discuss in detail next class that convergence of solution of recursive manner if you solve it the convergence of this one solution exist and it tends to a some constant value so here I will stop it