⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maxdetex.m

📁 国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题
💻 M
字号:
clc
echo on
%*********************************************************
%
% Determinant maximization problem
%
%*********************************************************
%
% YALMIP can be used to model determinant maximization 
% problems, and solve these problems using any SDP solver 
% (i.e., the dedicated solver MAXDET is not needed)
pause
clc
% Consider the discrete-time system x(k+1)=Ax(k+1)+Bu(k), u = -Lx
A = [1 0;0.4 1];
B = [0.4;0.08]; 
L = [1.9034 1.1501];

% We want to find the largest possible invariant ellipsoid x'(Y^-1)x < 1
% for which a control constraint |u|<1 is satisfied
% This can be formulated as a determinant maximization problem
pause % Strike any key to continue. 

% Define the symmetric matrix Y
Y = sdpvar(2,2);
pause % Strike any key to continue. 

% Define LMI for invariance and constraint satisfaction
F = set( [Y Y*(A-B*L)';(A-B*L)*Y Y] > 0);
F = F + set(L*Y*L' <1);
pause % Strike any key to continue. 

% Y should be positive definite and we want to maximize det(Y)
%
% YALMIP solves this by maximizing det(Y)^(1/(2^ceil(log2(length(Y)))))
% which can be modeled using semidefinite and second order cone
% constraints. 
%
% This function is  obtained by using the nonlinear operator geomean2
% (the name comes from the relation between this function and the geometric
% mean of the eigenvalues of P)
%
% NOTE : if you want to use the dedicated solver MAXDET, you must use
% the objective function -logdet(Y) instead. The command logdet may
% however become obsolete in a future version.
%
solution = solvesdp(F,-geomean2(Y));
pause % Strike any key to continue. 

% Get result
Y = double(Y)
pause % Strike any key to continue.
echo off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -