Sunteți pe pagina 1din 27

# MATLAB LMI Lab LMI: Linear Matrix Inequality

Reza Abiri and Yousof Koohmaskan Department Of Electrical Engineering Amirkabir University of Technology (Tehran Polytechnic) Instructor: Dr. H. A. Talebi

## May 18, 2010

Introduction to LMI
I I

LMI stands for Linear Matrix Inequality Historically, rst LMIs appeared around 1890 when Lyapunov showed that the ODE: d x(t) = Ax(t) dt is exponentially asymptotically stable i there exists a solution to the matrix inequalities: P A + AT P 0, P = PT 0

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

History of LMI
I

1960s: Yakubovich, Popov, Kalman, Anderson et al obtained the positive real lemma. 1970s: Willems focused on solving algebraic equations such as Lyapunovs or Riccatis equations (AREs), rather than LMIs. Then most of the work dedicated to numerical algebra, development of Matlab (1984), focus on solving control AREs. 1994: Research eort in control culminated in the LMI book by Boyd, El Ghaoui, Feron, Balakrishnan - Contributions also by Apkarian, Bernussou, Gahinet, Geromel, Peres and many others.

Denition
n

F (x) = F0 +
i=1

xiFi

## Fi Symmetric matrices xi Decision variables

I

Constraint eigenvalues

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

The main strength of LMI formulations is the ability to combine various design constraints or objectives in a numerically tractable manner. solution set of systems of n individual LMIs: F1(x) 0, F2(x) 0, . . . , Fn(x) 0,

It can be shown as one single LMI: (LMI formalism) F1(x) 0 0 F2(x) F (x) = . . ... . . 0 0
Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

0 . . Fn(x)

Non-linear matrix inequalities can be converted to linear matrix inequalities by Schur Complement: (LMI formalism) F (x) = A B C D 0

F (x)

A 0 D CA1B D 0 A BD1C

F (x)

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

LMI problems
First Test whether there exists x1, x2, . . . , xn such that F (x) 0.

Second Minimization of a linear objective under LMI constraints. Minimize c1x1 + c2x2 + + cnxn = cT x over all x1, x2, . . . , xn that satisfy F (x) 0 Third Generalized eigenvalue minimization problem: Minimize over x Rn subject to: 1) C(x) D(x) 2) 0 B(x) 3) A(x) B(x)

## Matlab LMI LAB

Introduction
I

The LMI Lab is a high-performance package for solving general LMI problems, with powerful LMI solvers for three generic LMI problems.

I

Specify LMI systems either symbolically with the LMI Editor or incrementally with the lmivar and lmiterm commands Retrieve information about existing systems of LMIs Modify existing systems of LMIs Solve the three generic LMI problems (feasibility problem, linear objective minimization, and generalized eigenvalue minimization) Validate results
7

## List of problems by LMI techniques

I I

Robust stability of systems with LTI uncertainty (-analysis) Robust stability in the face of sector-bounded nonlinearities (Popov criterion) Quadratic stability of dierential inclusions Lyapunov stability of parameter-dependent systems Input/state/output properties of LTI systems (invariant ellipsoids, decay rate, etc.) Multi-model/multi-objective state feedback design Robust pole placement Optimal LQG control Robust H control
8

I I I

I I I I

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

I I I I

Multi-objective H synthesis Design of robust gain-scheduled controllers Control of stochastic systems Weighted interpolation problems

## Specication of a system of LMI

key functions setlmis Initialize description of LMI system syntax: setlmis([]) lmivar Specify matrix variables in LMI problem syntax: X = lmivar(type,struct) type=1 Symmetric matrices with a block-diagonal structure. struct= [a b] a: size of matrix(symmetric) b: type(another!) of block (1 for full, 0 for scalar, -1 for zero block) type=2 full m-by-n rectangular matrix. Set struct = [m,n] in this case. type=3 Other structures.
Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic 10

Example 1
I

We want to specify following matrix in LMI Lab: X= 33 1 2 25 3I2 4I3 three matrix, here; X1 symmetric matrix, full, unstructured 33 and two scalars 1 and 2 X2 rectangular matrix 2 by 5 25 X3 two identity matrix, scalar at diagonal 3I2 and 4I3

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

11

setlmis([]) X1 = lmivar(1,[3 1; 1 0; 1 0]) % Type 1 X2 = lmivar(2,[2 5]) % Type 2 of dim. 2x5 X3 = lmivar(1,[2 0;3 0]) % Type 1

12

## setlmis Specify term content of LMIs syntax: lmiterm(termID,A,B,flag)

I

LMI terms are one of the following entities; outer factors constant terms (xed matrices) variable terms AXB or AXT B where X is a matrix variable and A and B are given matrices called the term coecients. for example lmiterm([1 1 1 X],A,1) yields AX in element (1,1) in the left hand side of rst LMI, and zero in right hand side, i.e.AX < 0 Setting flag = s allows you to specify following expressions with a single lmiterm command, AXB+(AXB)T lmiterm([1 1 1 X],A,1,s) yields AX+(AX)T =AX+XT A since A is symmetric.

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

13

Example 2
Consider the following LMI 2AX2AT x3E + DDT T X1 B
T T T B T X1 T CX1 C + CX1 C <M 0 I

0 M f X2

here X1, X2 are matrix variables of Types 2 and 1, respectively, and x3 is a scalar variable. After initializing the LMI description with setlmis and declaring the matrix variables with lmivar, the terms on the left-hand side of this LMI are specied by: lmiterm([1 1 1 X2],2*A,A) % 2AX2AT lmiterm([1 1 1 x3],-1,E) % -x3E lmiterm([1 1 1 0],D*D) % D*DT lmiterm([1 2 1 -X1],1,B) % XT B 1
Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic 14

lmiterm([1 2 2 0],-1) % -I and now right lmiterm([-1 lmiterm([-1 lmiterm([-1 hand side: 0 0 0],M) % outer factor M 1 1 X1],C,C,s) % CX1CT +CXT CT 1 2 2 X2],-f,1) % -fX2

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

15

LMI Solver
LMI solvers are provided for the following three generic optimization problems
I

Feasibility problem Find x Rn that satises the LMI system A(x) < B(x) The corresponding solver is called feasp.

Minimization of a linear objective under LMI constraints minimize cT x subject to x1F1 + x2F2 + + xnFn + G < 0 The corresponding solver is called mincx.

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

16

Generalized eigenvalue minimization problem minimize subject to A(x) < B(x) The corresponding solver is called gevp. over x Rn C(x) < D(x) 0 < B(x)

17

## Some of used functions

mat2dec Extract vector of decision variables from matrix variable values dec2mat Extract matrix variable value from vector of decision variables lmiinfo Information about existing system of LMIs lminbr Number of LMIs in LMI system dellmi Remove LMI from system of LMIs delmvar Remove matrix variable from LMI problem

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

18

Example 3
Consider the optimization problem Minimize Trace(X) subject to AT X + XA + XBB T X + Q < 0 where 1 2 1 2 1 A= 3 1 2 1 1 B = 0 1 1 1 0 Q = 1 3 12 0 12 36

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

19

First we use from Schur Complement: A B C D so we have: minimize trace(X) AT X + XA + Q XB subject to <0 BT X I 0 A BD1C 0, D 0

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

20

Second setlmis ([]) X = lmivar(1,[3 1]) % variable X, full symmetric lmiterm([1 1 1 X],1,A,s) lmiterm([1 1 1 0],Q) lmiterm([1 2 2 0],-1) lmiterm([1 2 1 X],B,1) LMIs = getlmis Third c = mat2dec(LMIs,eye(3)) Fourth options = [1e-5,0,0,0,0]; % precision [copt,xopt] = mincx(LMIs,c,options) Fifth Xopt = dec2mat(LMIs,xopt,X)
21

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

Results copt= -18.7167 xopt= -6.3542 -5.8895 -6.2855 2.2046 2.2201 -6.0771

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

22

After step 5th : Xopt = -6.3542 -5.8895 2.2046 -5.8895 -6.2855 2.2201 2.2046 2.2201 -6.0771

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

23

Summary
[1] Transform to LMI problem

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

24

N N N N N N N N N N N N N N N N N N N N

Thank You

## Matlab LMI Lab - Abiri, Koohmaskan - Tehran Polytechnic

25

References
[1] Professor H. A. Talebi, Lecture Notes on Robust Control, Dept. of Electrical Engineering, Tehran Polytechnic, Iran, 2007 [2] Matlab LMI Lab, MathWorks 2009

26