 So, we have discussed the solution of algebraic action by using numerical variable control algorithms. That algorithm is the Schur method. We could not complete this mole derivation of this one. So, just continue that one and after that we will discuss the frequency domain interpretation of LQR control systems. So, if you recollect this one our method is we have to solve the algebraic Riccati equation by using Schur method which is numerically more reliable than any other iterative methods for solution of algebraic Riccati equation. So, these algorithm steps if we recollect this one what we did it first you form a Hamiltonian matrix with the knowledge of system matrices A, B and the performing index matrices the stativating matrix Q and R. So, we can form Hamiltonian matrix then with the help of what is called Q or decomposition technique or algorithms we convert H m into upper Schur form. What is upper Schur form that we have converted H m with a transformation that is with a transformation W that so that W transpose H m W will convert into a new matrix S agree that S is having a special structure and the structure of S is we have discussed that into this form S 11, S 12 dot dot S 1 K and we have a such block S 11, S 22 is a K block and each block S 11 or S 22, S 33 block will be either 1 by 1 block scalar quantity or 2 by 2 blocks and remain lower blocks or lower parts of this matrix is a 0 all these things. So, it is a upper triangular structure and each diagonal block either 1 by 1 or 2 by 2 matrixes. So, this and how to convert this thing using that is Q or decomposition method we are discussing this one that suppose any matrix A is given then you assign a matrix A 0. So, you decompose this thing that Q 0 into R 0 matrix and Q 0 is the orthogonal matrix R 0 is upper triangular matrix then rewrite this equation that A 0 the reverse the order R 0 into Q 0 that is not equal to A 0. So, we are writing A 1 is equal to R 0 Q 0 which can be written is in place of R 0 I can write it Q 0 inverse A 0 and since Q 0 is a orthogonal matrix that inverse is nothing but a Q 0 transpose. So, Q 0 transpose A 0 this and that A 0 that now A 1 is decompose this A 1 is now decompose Q 1 into R 1 that Q R decomposition then rewrite in opposite reverse order R 1 and Q 1 that will not be same is equal to A 1. So, A 2 and this R 1 value you put it from this equation what is R 1 R 1 is nothing but a Q inverse A 1. So, I put the value of Q inverse A 1 Q inverse is orthogonal Q 1 inverse is orthogonal matrix Q 1 is orthogonal matrix. So, that transpose will be Q 1 transpose this one. So, if you proceed like this way if you proceed like this way again we will get at kth iteration is like this way Q 0 initial 0th iteration Q 0 Q 1 Q 2 dot dot Q n Q k minus 1 whole transpose A 0 Q 0 Q 1 Q k minus 1 since each is an orthogonal matrix Q 0 Q 1 Q 2 dot dot Q k minus 1 they are product also orthogonal matrix. So, we have written that all products together is Q transpose and A 0 and now we when it will stop this one until and unless it has converted into a that matrix A is converted into a k is converted into a upper triangular form. Not only upper triangular form you have to that what is called A 1 1 that final value a k 1 1 a k 2 2 a k 3 3 in this way whatever the matrix will get it each block will be either 1 by 1 matrix or 2 by 2 matrix then will stop it. So, this has converted into a upper sure form. So, we have discussed up to this last class then we will see that is our remark it can be shown that by it can be shown that sequence of a k that means A 0 A 1 A 2 in this way by using the Q R decomposition technique in this way sequence of a k converges to RSF reduced R means reduced sure form converges to a sure form this is. So, this we know this one that if you do like this way ultimately that a k will converge to the sure form. So, just in short the theorem we can write it now like this way let A is n cross n matrix at a real matrix real matrix let us call common form then there exist this symbol is there exist and n cross n orthogonal matrix n cross n orthogonal matrix W whose dimension is n in this such that that such that that S is equal to W transpose A W and this W is n cross n what is W if you consider the earlier discussion this W is nothing but a Q what is Q Q is a sequence of orthogonal transformation what we made it Q R decomposition Q 0 Q 1 Q 2 dot dot Q k is W k this if you see. So, this is the way you can do it where S is equal to S 1 1 S 1 2 dot dot S 1 k S 2 2 this is 0 dot dot S 2 k and in this way last will be S k k. So, that dimension is n cross n this dimension is n cross n. So, this is structure of S 1 1 S 2 2 S k k is are either 1 by 1 or 2 by 2 matrix and it is upper triangular form. So, next is that what is our next step our algorithm first step is form a Hamiltonian matrix then convert into a what is called if you see the our second that is our second step is you with the help of Q R decomposition you convert into sure form agree that sure form we know how to do it. But in before that you must know how to decompose a matrix into Q R algorithm agree or using a what is called orthogonal transformation or using a householder transformation householder transformation is an orthogonal transformation is a special case of orthogonal transformation householder transformation. So, our step 3 step 2 that Hamiltonian matrix is converted into a sure reduced sure form and Hamiltonian matrix you see the dimension of a Hamiltonian matrix is 2 n cross 2 n n is the order of the systems and they this matrix contains the a set of Eigen values in the left half of the plane and the set of Eigen values in the right half of the S plane and the Eigen values in both S plane number of Eigen values in S plane and what is called S plane in the left half and the number of poles in the S plane in the right half plus R number R in same. So, and they are mirror image of each other. So, now next step is the sure form the sure form 2 that means this is the our algorithm steps if you look this is the algorithm 1 and the equation number 1 and this is the equation number 2 let us call this is the equation number 1 that whatever we got is sure form this blocks S 1 1 S 2 2 all this thing block are either 1 by 1 or 2 by 2, but their Eigen values are may be stable or unstable throughout this block S 1 1 2 S k k. So, now we have to rearrange the Eigen values first we will make all the stable Eigen values of S matrix first and remaining blocks will be the unstable Eigen values of H m matrix means H m matrix. So, from the sure form 2 is reordered reordered with the help of some orthogonal matrix let us call V which dimension is twice n into twice n because H is a dimension of H m is a dimension 2 n cross 2 n and with using the householder transform some transform orthogonal transformation we convert into a S S is nothing but a W transpose H m into W m and H m is twice n into twice n dimension and W is twice n twice n into twice n. Again on S we are doing some transformation orthogonal transformation so that the S matrix is convert into a special form means it will be upper triangular form, but only the all Eigen values which are stable that will be put first and the unstable Eigen values will be put next. So, this using this transformation matrix if you do this one V transpose S V this dimension is 2 n ultimately reordering only reordering of S R matrix that S matrix can be done by using elementary row and column operations that one can do it into reordering. So, let us call after reordering we got it that if it is a V transpose then what is S if you recollect S is W H m W then V so you consider this is U so it is nothing but a U transpose H m U and this U dimension is 2 cross twice cross as this. So, let us call this is equation number 3 and the structure of S S R if you see this structure of S R will be like this way that S R 1 1 S R 1 2 dot dot S R 1 S R 1 k then or ok like it like this way S R 1 1 S R 2 2 what is mean S R 1 1 block is this is n cross this is n cross n and this is n rows and this is a n columns. So, S R 1 1 contains all the Eigen values of stable Eigen values of H m which are stable in S R block means n cross n blocks it will consider and S R 1 block is a upper triangular form S R block in the upper triangular form each block of S R 1 1 is either 1 by 1 or 2 by 2 matrix and all Eigen values of L S R 1 1 are stable Eigen values and S R 2 S R 2 2 all Eigen values of S R whose dimension is n cross n Eigen values are unstable but reverse sign with a stable Eigen values of S R 1 1 this unstable Eigen values. So, we from S R we converted into S R so from S we converted into S R by rearranging that one so that first stable block n cross n contains the stable Eigen values and next n cross n block of this one diagonal block is considered the unstable Eigen values of H m. So, that is this one so just I am writing it what is S R 1 1 S R 1 1 whose dimension is n cross n again is upper triangular matrix and its diagonal block is either 1 1 or 2 2 block matrix its Eigen values are stable means lambda i less than 0 for i is equal to 1 2 dot dot n whereas S R 2 is unstable Eigen values unstable Eigen values of H m because how because we know the transformation if you do the transformation that we have got S W transpose S is a W transpose H m W the Eigen values of H m is same as the Eigen values of S or in other words you can say Eigen values of S is same as the Eigen values of H m because this is the similarity transformation like this. Since we have done again on similarity some transformation on S that is S R is equal to we got it U transpose H m and U that Eigen values of S R is remain the same as the Eigen values of H m where U is equal to if you see this we have written U is equal to W V this. So, once you done this second third step we have converted into a what is called sure form by reordering once again we have reordered only this that is only difference from the second step 2 step 3 is different from step 2 we have reordered the matrix sure form S R form S R matrix. So, that stable Eigen values will come first and next is unstable Eigen values. So, from this statement we can write it from equation 3 see the equation 3 that equation this equation equation 3. So, if you multiply by this if you multiply it by both side by U both side by U then what will get it this nothing but a H m U is equal to U S R both side I multiplied by U U is orthogonal matrix. So, U transpose U or U transpose U into U transpose or U transpose into U is equal to identity matrix. So, this we can write it that from 3 you can write it from 3 then you write the detailed structure of U if you recollect the U is a 2 n cross 2 n matrix. So, I am just putting into that 2 by 2 blocks U 11 U I am writing U 12 U 21 U 22 this number of rows n this number of columns n the number of columns n here the number of rows is n. So, you know all these things then U U 11 U 12 U 21 U 22 similarly dimension if you partition in this way you can know this one and S R dimension is what S R 11 S R 12 S R 12 then 0 S R 22 agree this is the thing now you see I just multiply this into this form then what will get it this dimension this is 2 cross into 2 cross agree. So, now if you multiply by this by this then what will write it H m I multiply by this block by H m. So, it is nothing but a U 11 U 21 similarly I have to multiply this matrix with this block is equal to this block is U 11 U 12 this multiplied by this this this multiplied by this this multiplied by this. So, it is U 11 S R 1 then this multiplied by this this multiplied by this this multiplied by this plus this multiplied by this it will be U 21 S. So, I can write U R 11 of this both side this. So, this is this matrix this matrix is the stable Eigen values of H m matrix agree. So, now you see this one the Eigen values and Eigen vector difference the matrix A multiplied by each column how many columns are there and columns how many rows are there twice and rows. So, each vector represents the Eigen vector of the matrix Eigen vector of the matrix H m corresponding to Eigen values of S R 11 the first element S R 11 structure is what is the upper triangular structure. So, if you multiply it by this if you multiply it by this then it will be coming that one just see this one I multiply it by there is a how many columns are there n columns are the first column multiplied by H m first column multiplied by H m is equal to that first column multiplied by S R S R is structure is what S R 11 structure is what if you see this is this is this 0 0 0 form then this 0 0 0 form and similarly this will be this form 0 0 0 form and it is something like this structure. So, if you multiply it by this then what you will get it that each column corresponding to the suppose first column this first column of this one corresponding to Eigen value of the matrix S R 1 of this is the Eigen values this is another Eigen values of this one either 1 by 1 or 2 by 2 Eigen values of the matrix this. So, this vector corresponding the Eigen vectors corresponding to the stable Eigen values of H m matrix this is the Eigen vectors of the matrix H m corresponding to the stable Eigen values of H m that this is the Eigen vectors. So, you partition this one and we have proved this one with the knowledge of Eigen values and Eigen vectors of the matrix we can get the solution of algebraic equation. Once I know the Eigen vectors of H m matrix then I can find out what is the solution of this one by using the method we have discussed in method 2. So, next step so if you want to write it here this is the Eigen vectors corresponding to Eigen values of S R 1 or the stable Eigen values of H m. So, now step 4 we can write this immediately we can write step 4 the solution of our Riccati equation. So, solution of our algebraic Riccati equation in other words the A transpose P plus P A minus P B R inverse B transpose P plus Q is equal to 0 this is n cross n is P U 2 1 matrix multiplied by U 1 1 whole inverse of that one. Now see this one this matrix this vector you got it the dimension of the vector is twice n cross n. So, first n rows you retrieve from the vectors that is U 1 1 and the remaining vectors of n cross n will be U 2 1. So, you just complete like this way and you will get the solution of the Riccati equation that what in step 3 is done we have evaluated the Eigen vectors of the matrix H m corresponding to the stable Eigen values by Q R decomposition techniques which is numerically more reliable than what is called our earlier simple Eigen vector Eigen vector Eigen values Eigen vector methods. So, we have used the different techniques to find out the Eigen vector of the H m matrix corresponding to the stable Eigen values numerically reliable algorithm we have used it. So, one can solve this one instead of directly taking the inverse I can do it like this way that P U 1 1 is equal to U 2 1 this I can write it like this way that this is unknown. So, since this we can solve it the solve P using Gauss elimination method just to avoid the inversion of this matrix if it is a large dimensional problem that one should avoid the inversion of this problem and solve it by Gauss elimination method. So, the advantage of this method is if you see the advantage of this method we can just tell the advantages of sure method for solving ERE method ERE equation one advantage is there the numerical hazard is not will not face any numerical hazard. So, not suffer any numerical hazards while competing the Eigen vectors associated with multiple Eigen values of H m. Second is significant speed is speed of solution of this Riccati equation time required for solution of this Riccati equation is significantly improved compared to the any other iterative method. So, second step is significant speed in comparison other iterative method ETERative. Disadvantage only disadvantage is computer storage requirement is high because it requires 2 n cross 2 n. So, next is your compare computer storage disadvantage is the storage requirement of at least 2 n cross 2 n array. So, one can solve the solution of algebraic Riccati equation by sure method one can solve by iterative method. But the sure method is numerically more reliable compared to the iterative method because when you have a rather direct Eigen value Eigen vector meters when you have a multiple Eigen values are there multiple Eigen values are there. So, we have to find out generalized Eigen vectors of this one. So, this will create problem if you use the standard Eigen value Eigen vector meters. So, this technique that is your decomposition technique will avoid such type of problems when you have a multiple Eigen values of a system matrix where next we will go for what is called our frequency domain interpretation. We have designed the controller that is LQR controller and we have studied the LQR controller that whether a a minus b k of the closed loop system will be stable or not. We have seen the requirement is q must be positive definite matrix and r positive semi definite matrix r must be positive definite matrix that suffice that the closed loop system is stable. Now, of course this before that we have to see that a and b must be controllable at least stabilizable or a and q must be detectable this. Now, frequency the now this controller what we have designed it now one has to interpret the results more in depth or details in frequency domain in the sense in frequency domain you can say what is the phase margin and gain margin of the corresponding design controller closed loop system design controller what is the phase and gain margin of this one. So, that will investigate or you will study this one that phase and gain margin of the LQR control systems. So, frequency domain interpretation frequency domain interpretation of LQR design control LQR control system design problems. So, let us consider the our plan dynamics plan dynamics x dot is equal to a x t plus b u of t x of t is equal to x of 0 is the initial condition initial condition. So, our problem in and the corresponding performing index performing index is j is equal to half 0 to infinity x transpose t this is infinity x transpose t q x of t plus u transpose of t r u of t d t. So, our problem is given the system design a controller u of k u of k t such that the performing index is minimized again and the performing index this is given the performing index is minimized then this problem statement given the plan you design a you design or you can write design design a controller u of t is equal to minus k of x t assume all the states are available design k of t such that the performing index is minimized. So, before that we have to make an assumption that assumptions one a and b is controllable or at least stabilizable to a and q use the this is detectable detectable. This two condition we have to check it once it is stable then we are we are we are we are going for designing a controller u of k and the k can be found out k can be found out by solving the algebraic rickety equation agree. Once you solve the algebraic rickety equation get the value of p then your k e is nothing but a k e is nothing but a you see r inverse b transpose p and this p is the solution of algebraic rickety equation that we know all these things. So, let us call this is the equation number one this is the equation number one this is the equation number two and using the control law in the given system then the optimal control law u is equal to u of k t is equal to minus r inverse b transpose p into x t and which is nothing but a x of k t agree and p is the solution of rickety equation that were a where p is obtained from the from the solution of algebraic rickety equation agree this solution you get agree. So, this is let us call this is equation number three this is the equation number three. So, now what is the closed loop system equation in system equation one you put u is equal to minus k x from one and using is equal to minus k x we get that x dot is equal to x dot is equal to a minus b k x of t and this is nothing but a closed loop systems you see this denoted by a c agree. So, this is let us call equation number four and this is asymptotically stable that we have proved it this m minus b k e is asymptotically stable that we have proved earlier this one and it is corresponding. So, the characteristics equation of the closed loop system characteristics equation of the closed loop system is given by what is the closed loop system characteristics equation determinant of let us call you denoted by this is the c is closed loop system determinant of that our closed loop systems determinant of s i minus our closed loop system a minus b k this. So, let us call this is equation number five. So, this is the nothing but a if you take the determinant of this one you will get a polynomial of order n is equal to zero this is the characteristics equation. So, if you take the determinant of this one you will get a polynomial in s of order n because this dimension of this one is n cross n. So, now this you can write it or determinant of s i minus a this plus b k of this is equal to zero which you can write it into this form i plus b k into s i minus a whole inverse this whole bracket into s i minus a same as this one. So, you push it s i minus a inside. So, this will be i intimates b k s i minus a this is b k b k s i minus a inverse s i it is i intimates. So, it is b k and this will be s i minus a so it will remain same that one. So, this I can write it now into this form that you know this property is the determinant of that let us call f e and f e is the matrix f is the matrix with proper dimension is equal to determinant of e into determinant of f. So, that property I will use it here here one matrix this is another matrix. So, you write a determinant of s i minus a into determinant of i plus b k into s i minus a inverse of that one is equal to zero. Now, we just consider this let us call this is equal to m and this b is equal to n. So, once again I can write it the determinant of s i minus a is same as the determinant of s i minus a is determinant of this is same as this plus k s i minus a whole inverse into b. So, order is reverse. So, this is the property of this one determinant of one plus i plus m n is same as determinant of i plus n m agree. This we have written is here that property we have used it the reverse the order this is I consider m this is n I just reverse the order. So, now we can write it the determinant characteristics equation of the closed loop system characteristics equation is nothing but a determinant of this one and determinant of that one we can write it this form agree. So, let us see the two that controller what we have designed LQR controller in time domain representation what is the block diagram we have already seen it now. Now, we will seen in frequency domain then what is your block diagram representation of this one in time domain. So, since it is a regulator problem LQR is a regulator problem and reference input is zero because it is this controller is designed if there is any initial disturbances there in the state then regulator will take care of to bring that state affected state to bring it in to its equilibrium position agree. So, the controller job is that one only. So, b then this integrated that output of x t this is x dot of t then this a then this is your u t and the controller is designed this is r inverse r inverse b transpose p this is nothing but a k controller gain k minus 1 and that is coming to here plus this plus. So, this is r is equal to r of t is the reference input is zero. This is a regulator problem means that due to the initial state it happens the controller will bring the state to equilibrium position by minimizing a performing index that is that this. So, this is our the controller if you see that part this part is our plant this is the plant and this part is our controller this is the controller then output of this controller is u t and this figure if you see more carefully it is a l q r best control systems and it is represented in time domain agree it is represented in time domain. Now, let us see in the frequency domain representation of that l q r control systems agree frequency equivalent representation in frequency domain the equivalent representation equivalent representation in as domain or frequency domain or you can say frequency domain. So, look at this expression this is nothing but a this block nothing but representation is x dot is equal to a x plus b u. So, that is nothing but a x dot is equal to a x plus b u time domain and what is the frequency domain representation of that one s i minus take both side Laplace transform assuming that initial condition is zero then this is a x of this is equal to b u of s that one. So, that time now representing this one so x of s so s i minus a whole inverse into b this output is x of s. So, this is the input u is the input and this is the output x of s so output is this input is this u of s that output then this is going to the controller in as domain our controller is r inverse b transpose p then multiplied by minus 1 and that will come to here that is our u of s and this is r is r of s is equal to zero. Now, see this is our representation in as domain that this figure is that your l q are best control system bracket in frequency domain. So, this is our case if you see this is our controller once again if you want to equivalent to this one this is our controller this is our controller and controller and controller how it is related u s u s is equal to nothing but a that minus this corresponded to k is a constant matrix multiplied by our input is x of s this is the input this is the output from the controller u s is the output from the controller and x s is the output of the plant input to the plant is u s. So, this is our controller and this is our plant so this is now so let us see this one that now what we are doing it here adding and subtracting adding and subtracting p into s p is our that solution of the Riccati equation that p s is the as domain s that frequency domain agree 2 3 3 means equation 3 say this equation number 3 of that one. So, equation 3 is our algebraic Riccati equation with this equation we are adding p into s and subtracting. So, the resultant expression will remain unchanged. So, if you do this one p then s i minus a plus p s I am adding the minus p s minus sorry so minus s i minus a into p plus p b are inverse b transpose p minus q is equal to 0 nil and cross n what I did it if more specifically first that algebraic Riccati equation equation number 3 I multiplied by minus 1 and then I have added p s subtracted p s and by manipulating we got it like this way. So, let us call this is equation number we have gone up to equation number I think 5 this is the last equation is 5 agree. So, we can see the this is the equation number 6. So, this we can write it if you take q is right inside I can write it that p s i minus a plus s i minus a p plus p b are inverse b transpose p is equal to q agree. So, now I both side both side I multiplied by both side I multiplied by pre multiplied by pre multiplied by pre multiplied by that b transpose minus s i minus a whole inverse and post multiplied by s i minus s i minus a inverse b. So, this equation this equation I pre multiplied by b transpose s i minus a inverse and post multiplied by that one. So, if you pre multiplied post multiplied by that that one then what will this come s s that is b transpose. So, b transpose minus s i minus a whole inverse p into that expression I am writing now. So, s i minus a plus minus s i minus a p plus p b are inverse b transpose p then this multiplied by post multiplied by s i minus a whole inverse b is equal to b transpose s i minus a s i minus a inverse q then s i minus a whole inverse b. So, I multiplied by both side this one then what we can do it with this equation I pre multiplied the left hand side right hand side I may pre multiplied by this one and post multiplied by this one that is what I have written it here. Then after that after simplification of this one we will be getting that one that b transpose s i minus a whole inverse see this one if I multiplied by this if I pre multiplied by this one and post multiplied by you post it this inside. So, s i minus a inverse will be identity matrix. So, p b will be there so p b will be there. So, this will be a p b only plus see that one this multiplied by this. So, s i minus a whole inverse multiplied by s i minus a. So, that will be identity matrix. So, it will be b transpose p into s i minus a inverse b. So, b transpose p p is a symmetric. So, b transpose p into s i minus a whole inverse b then this multiplied by this one and post multiplied by this one. So, this we have to write as it is what we got it. So, this will be b transpose s i minus a whole inverse p b or inverse b transpose p into s i minus a inverse b is equal to right hand side as it is s i minus a whole inverse q s i minus a inverse b. Let us call this is equation number 7. So, what I did it here if you say I am pre multiplied by post multiplied by that as I mentioned here and then pushing this pre multiplied by part of this one pushing in this expression and this also pushing in the inside this bracket then we got it that one using now using now using k is equal to r inverse b transpose p which we can write it r k is equal to b transpose p using this expression in 7 and adding both side adding to both sides r we finally get what we will get it what we use in this expression whenever I will get b transpose p I will use r k or p b I will write k transpose r in k transpose r transpose since r is a symmetric matrix it is r only. So, we will get it this expression finally that right hand side we will get it as it is the right hand side of equation right hand side of 7 we will get it b transpose s i minus a whole inverse q s i minus a whole inverse b and left hand side of s of 7 we will get it the in place of this one I will write it in b transpose s i minus a and in place of b it is a k transpose r then r k this is will be a into this what is this one this will be coming r k s i minus a whole inverse b agree this. So, I will discuss the what is called next class that what we have to the remaining reduction we will do next class agree. So, we will stop it now here.