1. 程式人生 > 其它 >matlab中LMI工具箱函式feasp的用法

matlab中LMI工具箱函式feasp的用法

技術標籤:matlab

LMI例子,考慮下面的問題,找到滿足P>I的對稱矩陣P,使得

其中
在這裡插入圖片描述
%這個問題是二次穩定性問題中提取出來的,首先確定已知的LMI,再呼叫函式feasp
%常數
A1 = [-1 2;1 -3];
A2 = [-0.8 1.5;1.3 -2.7];
A3 = [-1.4 0.9;0.7 -2.0];
%初始化LMI
setlmis([]);
% 定義變數
P = lmivar(1,[2,1]);
% 新增項
lmiterm([1 1 1 P],1,A1,‘s’);
lmiterm([2 1 1 P],1,A2,‘s’);
lmiterm([3 1 1 P],1,A3,‘s’);

lmiterm([-4 1 1 P],1,1);%注意還有一個I<P
lmiterm([4 1 1 0],1);
% 獲取LMI系統描述
lmisys = getlmis;
[tmin,xfeas] = feasp(lmisys) %options 引數可以自己設定,也可以預設
執行結果如下:
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

tmin =

-3.1363

xfeas =

270.8553
126.3999
155.1336
從執行結果看tmin<0,表明LMI系統是可行的。下面使用dec2mat來得到可行矩陣變數的值:
pmat = dec2mat(lmisys,xfeas,P)
執行結果如下:
pmat =

270.8553  126.3999
126.3999  155.1336