这是我编写的程序,不知道错在什么地方
A=[-0.8 -0.01;1 0.1];
B=[0.4;0.1];
% Initial a LMI system
setlmis([]);
% Define Variables
% X is a symmetric matrix, has a block size of 2 and this block is symmetric
X = lmivar(1, [2 1]);
% R1 a symmeric matrix, size 2
R1 = lmivar(1, [2 1]);
R2 = lmivar(1, [2 1]);
Q = lmivar(1, [2 1]);
% Q, S1, S2 > 0
Y = lmivar(2, [2 1])
h=lmivar(1, [1 1])
% pos in (1, 1)
lmiterm([1 1 1 X], A./h, 1,'s');
lmiterm([1 1 1 Y], B./h, 1,'s');
lmiterm([1 1 1 X], 2/h, 1);
lmiterm([1 1 2 Q], B, 1);
lmiterm([1 2 2 Q], -1, 1);
lmiterm([2 1 1 X], -1, 1);
lmiterm([2 1 2 -Y], 1, B');
lmiterm([2 2 2 R2], -1, 1);
lmiterm([3 1 1 X], -1, 1);
lmiterm([3 1 2 X], 1, A');
lmiterm([3 2 2 R1], -1, 1);
lmiterm([4 1 1 Q], -1, 1);
lmiterm([4 1 2 Y], 1, 1);
lmiterm([4 2 2 X], -1, 1);
lmiterm([5 1 1 R1], 1, 1);
lmiterm([5 1 1 R2], 1, 1);
lmiterm([5 1 1 X], -1, 1);
lmiterm([-6 1 1 X], 1, 1); %X>0
lmiterm([-7 1 1 R1], 1, 1);%R1>0
lmiterm([-8 1 1 R2], 1, 1);%R2>0
lmiterm([-9 1 1 Q], 1, 1);%Q0
lmiterm([-10 1 1 h], 1, 1);%X>0
lmis = getlmis;
[tmin, feas] = feasp(lmis)
[ 本帖最后由 bmdlz 于 2009-7-2 23:46 编辑 ] |