MATLAB 离散时间LMI不等式可行解
时间: 2023-07-31 10:11:36 浏览: 67
在MATLAB中,可以使用Robust Control Toolbox和YALMIP等工具箱来求解离散时间LMI不等式可行解。
在Robust Control Toolbox中,可以使用函数dlyap和lmiinfo来求解离散时间LMI不等式可行解。例如,假设要求解以下离散时间LMI不等式可行解问题:
```
find P > 0 such that A'PA - P < 0
```
其中,A是已知矩阵,P为变量。则可以使用以下代码求解:
```matlab
A = rand(3);
P = dlyap(A', eye(size(A)));
[~,info] = lmiinfo(A'*P*A - P);
if info.feasible
disp('Feasible');
else
disp('Infeasible');
end
```
在YALMIP工具箱中,可以使用sdpvar、sdpsettings等函数来定义变量和设置求解器参数。例如,假设要求解以下离散时间LMI不等式可行解问题:
```
find P > 0 such that A'PA - P < 0
```
则可以使用以下代码求解:
```matlab
A = rand(3);
P = sdpvar(3,3,'symmetric');
constraints = [A'*P*A - P <= 0, P >= 0];
options = sdpsettings('solver','sdpt3');
sol = optimize(constraints,[],options);
if sol.problem == 0
disp('Feasible');
else
disp('Infeasible');
end
```
其中,求解器选择了sdpt3。