10.07.2015 Views

Linear Matrix Inequality

Linear Matrix Inequality

Linear Matrix Inequality

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction LMI problem Solver<strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong>Teaching Assistant:Yousof KoohmaskanNonlinear Control - Lecture 10Instructor: Dr. A. ValiYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 1 / 27


Introduction LMI problem Solver1 IntroductionPreface2 LMI problemLMI example 1LMI example 2LMI example 33 SolverUsing SolverExamplesYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 2 / 27


Introduction LMI problem SolverPreface■A hermitian n × n matrix P is positive definite iff ∀x ∈ R n andx ≠ 0,x T Px > 0■ Thus 1 x T Px > 0 ⇔ P ≻ 0■for a positive definite matrix P- all eigenvalues are positive- all sub-determinants are positive- all the diagonal components are positive1 In this lecture we use the character ≻ to display positive definiteness ofmatrix and ≽ to show semi-positive definiteness.Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 3 / 27


Introduction LMI problem SolverPreface■■LMI stands for <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong>Historically, first LMIs appeared around 1890 when Lyapunovshowed that the ODE:dx(t) = Ax(t)dtis exponentially asymptotically stable iff there exists a solution tothe matrix inequalities:PA + A T P ≺ 0, P = P T ≻ 0Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 4 / 27


Introduction LMI problem SolverPreface■■F(x) = F 0 +F ix in∑x i F i ≽ 0i=1Symmetric matricesDecision variablesConstraint ≽ means positive semidefinite e.g.(real) nonnegativeeigenvaluesStrict version e.g. F i ≻ 0 means strictly positive eigenvaluesYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 5 / 27


Introduction LMI problem SolverPreface■■The main strength of LMI formulations is the ability to combinevarious design constraints or objectives in a numerically tractablemanner.solution set of systems of n individual LMI’s:F 1 (x) ≺ 0, F 2 (x) ≺ 0, . . . , F n (x) ≺ 0,It can be shown as one single LMI: (LMI formalism)⎡⎤F 1 (x) 0 · · · 00 F 2 (x) · · · 0F(x) =≺ 0.⎢ . . .. .⎥⎣⎦0 0 · · · F n (x)Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 6 / 27


Introduction LMI problem SolverPreface■Non-linear matrix inequalities can be converted to linear matrixinequalities by Schur Complement: (LMI formalism)[ ] A BF(x) = ≻ 0C D{ A ≻ 0F(x) ≻ 0 ⇔D − CA −1 B ≻ 0{ D ≻ 0F(x) ≻ 0 ⇔A − BD −1 C ≻ 0Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 7 / 27


Introduction LMI problem SolverLMI example 1■Check Lyapunov stability of a linear systemẋ = Axusing Lyapunov quadratic functionV (x) = x T PxYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 8 / 27


Introduction LMI problem SolverLMI example 1■Lyapunov stability conditionmeans⇒ V (x) > 0⇒ ˙V (x) < 0⇒ x T Px > 0 → P ≻ 0■Finally, an LMI is appeared,⇒ ẋ T Px + x T Pẋ < 0→ x T A T Px + x T PAx < 0→ x T (A T P + PA)x < 0→ A T P + PA ≺ 0P ≻ 0, A T P + PA ≺ 0Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 9 / 27


Introduction LMI problem SolverLMI example 2■Design state-feedback that results in Lyapunov stability of alinear systemẋ = Ax + Bu, u = Kxusing Lyapunov quadratic functionV (x) = x T Px■using state-feedback yieldsẋ = (A + BK )xYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 10 / 27


Introduction LMI problem SolverLMI example 2■Lyapunov stability conditionmeans⇒ V (x) > 0⇒ ˙V (x) < 0⇒ x T Px > 0 → P ≻ 0■⇒ ẋ T Px + x T Pẋ < 0→ x T (A + BK ) T Px + x T P(A + BK))x < 0→ x((A T + BK ) T P + P(A + BK ) x < 0→ (A + BK ) T P + P(A + BK ) ≺ 0The last inequality isn’t an LMI, but applying change of variable,it can be converted to an LMI one.Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 11 / 27


Introduction LMI problem SolverLMI example 2■ Assume Q = P −1 (A + BK ) T P + P(A + BK ) ≺ 0⇒ (A + BK ) T Q −1 + Q −1 (A + BK ) ≺ 0■multiplying above inequality by Q from left and right,⇒ Q(A + BK ) T + (A + BK )Q ≺ 0⇒ (AQ + BKQ) T + AQ + BKQ ≺ 0■call Y = KQ,⇒ (AQ + BY ) T + AQ + BY ≺ 0that is an LMI.Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 12 / 27


Introduction LMI problem SolverLMI example 2■Finally there is two inequalities■(AQ + BY ) T + AQ + BY ≺ 0, Q ≻ 0after finding Q and Y through numerical solver effort, thestate-feedback controller and Lyapunov function matrix isobtained asK = YQ −1 , P = Q −1Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 13 / 27


Introduction LMI problem SolverLMI example 3■Design state-feedback that results in Lyapunov stability of adiscrete time linear systemx i+1 = Ax i + Bu i ,u i = Kx iusing Lyapunov quadratic functionV (x i ) = x Ti Px i■using state-feedback yieldsx i+1 = (A + BK )x iYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 14 / 27


Introduction LMI problem SolverLMI example 3■Lyapunov stability condition in discrete time representationmeans⇒⇒ V (x i ) > 0⇒ ∆V (x i ) = V (x i+1 ) − V (x i ) < 0x TiPx i > 0 → P ≻ 0■⇒xi+1 T Px i+1 − xi T Px i < 0→ xi T((A + BK ) T P(A + BK )x i − xi T)Px i < 0→ (A + BK ) T P(A + BK ) − P x i < 0x Ti→ (A + BK ) T P(A + BK ) − P ≺ 0The last inequality isn’t an LMI, but applying change of variable,it can be converted to an LMI one.Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 15 / 27


Introduction LMI problem SolverLMI example 3■Using Schur complement⇒[P − (A + BK ) T P(A + BK ) ≻ 0P (A + BK ) T ](A + BK ) P −1 ≻ 0■multiplying above inequality by diag{P −1 , I} from left and right,[P⇒−1 P −1 (A + BK ) T ](A + BK )P −1 P −1 ≻ 0■ Assume Q = P −1 ,[Q Q(A + BK )⇒T ]≻ 0(A + BK )Q QYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 16 / 27


Introduction LMI problem SolverLMI example 3■■or[Q⇒(AQ + BKQ)call Y = KQ,[Q⇒(AQ + BY )(AQ + BKQ) T ]≻ 0Q(AQ + BY ) T ]≻ 0Q■that is an LMI.after finding Q and Y through numerical solver effort, thestate-feedback controller and Lyapunov function matrix isobtained asK = YQ −1 , P = Q −1Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 17 / 27


Introduction LMI problem SolverUsing Solver■■There are many solvers as computer programs and speciallyMATLAB toolbox, e.g., Yalmip, CVX, Sedumi,...CVX is a suitable and user friendly MATLAB toolbox. It is free andcan be downloaded by following address:http://cvxr.com/cvx/Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 18 / 27


Introduction LMI problem SolverUsing Solver■Add CVX folder in the toolboxes of MATLABYousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 19 / 27


Introduction LMI problem SolverUsing Solver■Follow File -> Set Path... and click Add with Subfolders..., selectcvx and save it■type cvx setup in the command line + Enter and that is readynow!Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 20 / 27


Introduction LMI problem SolverSolution to analysis problem using cvx■■Analysis problem example; find Lyapunov function% stable exampleA=[-3 1; -2, -4];cvx begin sdpvariable P(2,2)minimize(0)subject toP>eye(2);A’*P+P*A


Introduction LMI problem SolverSolution to analysis problem (an unstable case)■■Since the matrix A has an unstable mode, there isn’t any solution% unstable exampleA=[3 1; -2, -4];cvx begin sdpvariable P(2,2)minimize(0)subject toP>eye(2);A’*P+P*A


Introduction LMI problem SolverSolution to design problem (continuous time)■Finding state-feedback,% Design ExamplesA=[3 1; -2, -4];B=[0;1];cvx begin sdpvariables Q(2,2) Y(1,2)minimize(0)subject toQ>0.01*eye(2);(A*Q+B*Y)’+(A*Q+B*Y)


Introduction LMI problem SolverSolution to design problem (continuous time)[cont’d]■ Solution that are obtained for P and K ,[ ]48.9032 7.8891P =7.8891 1.5687K = [ −88.1497 −10.7267 ]Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 24 / 27


Introduction LMI problem SolverSolution to design problem (discrete time)■Finding state-feedback,% Discrete time state-feedback designA=[ 1.05, 0.02; -0.04, 0.95];B=[0;1];cvx begin sdpvariables Q(2,2) Y(1,2)minimize(0)subject toQ>0.01*eye(2);[Q, (A*Q+B*Y)’; (A*Q+B*Y), Q]>0;cvx endP=inv(Q);K=Y*inv(Q)Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 25 / 27


Introduction LMI problem SolverSolution to design problem (discrete time) [cont’d]■ Solution that are obtained for P and K ,[ ]12.6311 2.3559P =2.3559 0.8317K = [ −3.7992 −1.3158 ]Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 26 / 27


Introduction LMI problem SolverNNNNNNNNNNAny Question?Yousof Koohmaskan (Nonlinear Control) <strong>Linear</strong> <strong>Matrix</strong> <strong>Inequality</strong> May 2012 27 / 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!