Main Content

setmvar

Instantiate matrix variable and evaluate all LMI terms involving this matrix variable

Syntax

mnewsys = setmvar(lmisys,X,Xval)

Description

setmvarsets the matrix variableXwith identifierXto the valueXval. All terms involvingX一个re evaluated, the constant terms are updated accordingly, andXis removed from the list of matrix variables. A description of the resulting LMI system is returned innewsys.

The integerXis the identifier returned bylmivarwhenXis declared. InstantiatingXwithsetmvardoes not alter the identifiers of the remaining matrix variables.

The functionsetmvaris useful to freeze certain matrix variables and optimize with respect to the remaining ones. It saves time by avoiding partial or complete redefinition of the set of LMI constraints.

Examples

Consider the system

=Ax+Bu

一个nd the problem of finding a stabilizing state-feedback lawu=KxwhereKis an unknown matrix.

By the Lyapunov Theorem, this is equivalent to findingP> 0 andKsuch that

(A + BK)P+P(A + BKT) +I< 0.

With the change of variableY:=KP, this condition reduces to the LMI

AP+PAT+BY+YTBT+I< 0.

This LMI is entered by the commands

n = size(A,1) % number of states ncon = size(B,2) % number of inputs setlmis([]) P = lmivar(1,[n 1]) % P full symmetric Y = lmivar(2,[ncon n]) % Y rectangular lmiterm([1 1 1 P],A,1,'s') % AP+PA' lmiterm([1 1 1 Y],B,1,'s') % BY+Y'B' lmiterm([1 1 1 0],1) % I lmis = getlmis

To find out whether this problem has a solutionKfor the particular Lyapunov matrixP=I, setPtoIby typing

news = setmvar(lmis,P,1)

The resulting LMI systemnewshas only one variableY=K. Its feasibility is assessed by callingfeasp:

[tmin,xfeas] = feasp(news) Y = dec2mat(news,xfeas,Y)

The computedYis feasible whenevertmin< 0.

版本历史

Introduced before R2006a

See Also

|