Linear Quadrai Regulaor (LQR) - Sae Feedbak Design A sysem is expressed in sae variable form as x = Ax + Bu n m wih x( ) R, u( ) R and he iniial ondiion x() = x A he sabilizaion problem using sae variable feedbak he following formulaes he sabilizaion problem using sae variable feedbak We assume ha all he saes are measurable (or observable) and seek o find a sae-variable feedbak (SVFB) onrol u = Kx + v whih guaranees obaining he desired losed-loop properies he losed-loop sysem using his onrol beomes x = ( A BK) x + Bv = A x + Bv wih A he losed-loop plan marix and v() he new inpu for he losed loop sysem he sabilizaion problem has soluion if and only if he sysem is sabilizable (reahable), ie he reahabiliy marix is inverible If here is only one inpu so ha m=1, hen Akermann's formula gives a sae variable feedbak gain K ha plaes he poles of he losed-loop sysem as desired (suh ha he losed loop sysem is sable and has he desired performanes speified by he engineer) We now inrodue a mehod of designing onrollers whih produe opimal response of he losed loop sysem, in he sense of minimizing a erain performane index Unlike Akermann s formula, ha an only be used o deermine a onroller for a single-inpu sysem, he ehnique ha we now inrodue works for any number of inpus B Opimal sabilizaion problem using sae variable feedbak o design a sae variable feedbak gain ha is opimal, we define he performane index (PI) J = x Qx+ u Ru d he objeive of opimal sae variable feedbak design is o sele he sae variable feedbak gain K whih sabilizes he sysem and also minimizes he performane index J Sine he plan is linear and he performane index is quadrai, he problem of deermining he sae variable feedbak whih minimizes J is alled he Linear Quadrai Regulaor (LQR) he word 'regulaor' refers o he fa ha he funion of his feedbak is o regulae he saes o zero hus in his ase we assume ha he inpu signal v() is equal o zero sine our only onern here are he inernal sabiliy properies of he losed-loop sysem 1
Compared o he sae feedbak sabilizaion problem, where he performane of he losed loop sysem was speified by desired posiions of he poles of he losed loop, in his ase he desired performane of he sysem is given by he values of he wo maries Q and R presen in he performane index o be minimized he performane index J an be inerpreed as an energy funion, suh ha making i small keeps small he oal energy of he losed-loop sysem Noe ha boh he sae x() and he onrol inpu u() are weighed in J, so ha if J is small, hen neiher x() nor u() an be oo large Also, if J is minimized, hen i is erainly finie, and sine i is an infinie inegral of x(), his implies ha x () as his guaranees ha he losed-loop sysem will be sable C Wha is he inuiion behind hoosing he wo maries Q and R? his performane index desribes a balane beween he amoun of energy used o ahieve desired performanes and he speified desired performanes his balane is desribed by he hoie of he wo maries Q (an n n marix) and R (an m m marix) whih are seleed by he design engineer Depending on how hese design parameers are seleed, he losed-loop sysem will exhibi a differen response a Seleing Q large means ha, in order o keep J small, he sae x() mus be smaller his means ha larger values of Q generally resul in he poles of he losed-loop sysem marix A = ( A BK) being furher lef in he s-plane so ha he sae deays faser o zero b Seleing R large means ha he onrol inpu u() mus be smaller o keep J small Larger R means ha less onrol effor is used, so ha he poles are generally slower, resuling in larger values of he sae x() One should sele Q o be posiive semi-definie and R o be posiive definie his means ha - he salar quaniy x Qx is always posiive or zero a eah ime for all funions x(), and he salar quaniy u Ru is always posiive a eah ime for all values of u() - in erms of eigenvalues, he eigenvalues of Q should be non-negaive, while hose of R should be posiive - if boh maries are seleed diagonal, hen all he enries of R mus be posiive while hose of Q should be posiive, wih possibly some zeros on is diagonal Noe ha if R is hosen posiive definie hen R is inverible
D Under whih ondiions an we find a onroller wih a finie value for he os funion? Before proeeding o he derivaion of he opimal sae feedbak onrol poliy whih minimizes he infinie horizon performane index, firs we would like o know under whih ondiions we would be able o derive a onroller whih would resul in a finie value for he os funion In oher words, if for any iniial value for he sae and for any onrol u() we obain ha he os funion is equal o infiniy, hen he problem of obaining an opimal sae feedbak onroller whih minimizes J would have no meaning When is he opimizaion problem solvable? he ondiion whih makes possible obaining a sae feedbak onrol poliy whih has a finie os is ha he sysem is reahable (ie he reahabiliy marix is inverible, or ( AB, )- reahable) Say ha he sysem is reahable, hen here exiss a sae feedbak onroller u = Kx suh ha he losed loop sysem is sable Considering ha he iniial sae of he sysem is x hen he rajeories of he saes of he losed loop sysem would be ( A BK) ( A BK) ( A BK) ( ) ( A BK) ( A BK) ( A BK) u () = Ke x hen he os funion (performane index) beomes Define J = x e Q+ K RK e dx x () = e x and he onrol inpu M = e ( Q+ K RK) e d hen, if he losed loop sysem is sable, J = x Mx < (he os is finie) E How an we alulae he opimal onroller? One an show ha if he sysem is reahable (ie he reahabiliy marix is inverible) hen he minimum value of he performane index, for any iniial ondiion of he sae veor, is = J ( x ) x Px where P is he posiive semi-definie soluion of he algebrai Riai equaion (ARE) A P + PA + Q PBR B P = (Showing his is beyond he objeive of his leure) Using he above resul we will now derive he opimal sae feedbak gain Say ha u = K x is he opimal sae feedbak onrol poliy whih deermines he minimum value of he performane index and sabilizes he sysem Noie ha = + J ( x ) x ( Q K RK ) xd J ( x ) = x Px = ( x Px)' d 3
where we assumed ha he losed-loop sysem is sable so ha x () as hen we an wrie Knowing ha x ( Q+ K RK ) x= ( x Px)' whih is x Px+ x Px + x Qx+ x K RK x= x = ( A BK ) x= Ax hen we obain ( + + + ) = x A Px+ x PA x+ x Qx+ x K RK x= x A P PA Q K RK x he las equaion has o hold for every x() herefore, he erm in brakes mus be idenially equal o zero hus one sees ha ( A BK) P+ PA ( BK) + Q+ K RK = A P+ PA+ Q+ K RK K B P PBK = his is a marix quadrai equaion whih we an wrie as A P+ PA+ Q PBR B P + PBR B P+ K RK K B P PBK = Now remember ha A P + PA + Q PBR B P =, hen PBR B P+ K RK K B P PBK =, whih an be wrien as ( K R B P) RK ( R B P) = Sine R is a posiive definie marix hen his relaion will hold only if K R B P= hus he opimal sae feedbak onroller whih minimizes he given quadrai os index is given by K = R B P where he P marix is he soluion of he ARE A P + PA + Q PBR B P = Noie ha he minimal value of he performane index, obained using he opimal onroller gain, is J ( x ) = x Px and only depends on he iniial ondiion and he soluion of he ARE his means ha he os of using he opimal sae variable feedbak an be ompued from he iniial ondiions before he onrol is ever applied o he sysem F When is he opimal onrol poliy is also a sabilizing poliy? I an be shown ha even if he opimal value of he os funion is finie he opimal rajeories of he saes ould go o infiniy ake for example he sysem x = x+ u 4
and he os funion o be minimized is J = u d hen he ARE is p p = and has soluions p =, p = aking p = hen u = is he opimal onroller for any iniial ondiions and he opimal value of he performane index is However he rajeory of he sae is x () = ex, and goes o infiniy wih ime his shows ha he opimal onroller is no a sabilizing one Now we ask he quesion: Wha ondiion has o be saisfied suh ha he opimal onrol poliy is also a sabilizing poliy? he answer is If ( AB, ) is reahable and ( Q, A ) is observable hen he opimal sae feedbak onroller K = R B P, wih P a symmeri posiive semidefinie soluion of he ARE, is also a sabilizing onrol poliy Reall ha reahabiliy an be verified by heking ha he reahabiliy marix n U = [ B AB A B A B] has full rank n C CA Reall ha observabiliy an be verified by heking ha he observabiliy marix V = CA has full n 1 CA rank n If V is no square hen reall he use of he observabiliy grammian G Design proedure for finding he LQR feedbak gain K he design proedure for finding he LQR feedbak gain K is: 1 Verify if he sysem is reahable a If i is NO hen LQR design is impossible SOP If YES, he sele design parameer maries Q and R 3 Verify if he pair ( Q, A ) is observable a If NO hen go bak o sep and hoose a differen Q marix 4 If YES, solve he algebrai Riai equaion for P (he unique posiive semidefinie soluion) 5 Find he opimal sae variable feedbak using K = R B P here exis very good numerial proedures for solving he ARE he MALAB rouine ha performs his is named lqr(a,b,q,r) 5