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

📄 stabilityex.m

📁 国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题
💻 M
字号:
clc
echo on
%*********************************************************
%
% Lyapunov analysis using semidefinite programming
%
%*********************************************************

% Create a stable matrix
A = [-1 2;0 -2];
pause % Strike any key to continue. 

% Create symmetric matrix (full syntax)
P = sdpvar(2,2,'symmetric'); 
pause % Strike any key to continue. 

% Add SETs for stability
F = set(P>eye(2)) + set(A'*P+P*A<0)
pause % Strike any key to continue. 

% Find feasible solution, minimize trace(P)
solution = solvesdp(F,trace(P));
pause % Strike any key to continue. 

% Extract numerical solution
P_feasible = double(P);

% Check solution
eig(P_feasible)
eig(A'*P_feasible+P_feasible'*A)
pause % Strike any key to continue. 

% Checking the constraints can also be done with
checkset(F)

pause % Strike any key to continue. 
echo off

⌨️ 快捷键说明

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