LMI实例

例1 
 setlmis([])
P=lmivar(1,[2 1]);
A1=[-1 2;1 -3];
A2=[-0.8 1.5;1.3 -2.7];A3=[-1.4 0.9;0.7 -2.0];
lmiterm([1 1 1 P],1,A1,'s') % LMI #1
lmiterm([2 1 1 P],1,A2,'s') % LMI #2
lmiterm([3 1 1 P],1,A3,'s') % LMI #3
lmiterm([-4 1 1 P],1,1) % LMI #4: P
lmiterm([4 1 1 0],1) % LMI #4: I
lmis=getlmis;
[tmin,xfeas]=feasp(lmis) ;
P=dec2mat(lmis,xfeas,P)

 Solver for LMI feasibility problems L(x) < R(x)
    This solver minimizes  t  subject to  L(x) < R(x) + t*I
    The best value of t should be negative for feasibility

 Iteration   :    Best value of t so far 
 
     1                        0.972718
     2                        0.870460
     3                       -3.136305

 Result:  best value of t:    -3.136305
          f-radius saturation:  0.000% of R =  1.00e+09
 

P =

  270.8553  126.3999
  126.3999  155.1336
例2
setlmis([])
P=lmivar(1,[2 1]);
A1=[-1 2;1 -3];
A2=[-0.8 1.5;1.3 -2.7];A3=[-1.4 0.9;0.7 -2.0];
lmiterm([1 1 1 P],1,A1,'s') % LMI #1
lmiterm([2 1 1 P],1,A2,'s') % LMI #2
lmiterm([3 1 1 P],1,A3,'s') % LMI #3
lmiterm([-4 1 1 P],1,1) % LMI #4: P
lmiterm([4 1 1 0],1) % LMI #4: I
lmis=getlmis;
[tmin,xfeas]=feasp(lmis,[0,0,10,0,0],-1)  ;
P=dec2mat(lmis,xfeas,P)


Solver for LMI feasibility problems L(x) < R(x)
    This solver minimizes  t  subject to  L(x) < R(x) + t*I
    The best value of t should be negative for feasibility


Iteration   :    Best value of t so far
     1                        0.988505
     2                        0.872239
     3                       -0.476638
     4                       -0.920574
     5                       -0.920574
***                 new lower bound:    -3.726964
     6                       -1.011130
***                 new lower bound:    -1.602398


Result:  best value of t:    -1.011130
          f-radius saturation:  91.385% of R =  1.00e+01


P =


    7.1539    2.0697
    2.0697    5.1989

链接如下:
http://read.pudn.com/downloads104/ebook/428541/LMI 工具箱介绍.pdf

你可能感兴趣的:(代码)