Stability margins - continuous case

24 views
Skip to first unread message

Mariusz

unread,
Aug 11, 2014, 6:44:08 AM8/11/14
to yal...@googlegroups.com
Hi,

I want to solve the following optimization problem

maximize Alpha
subject to:
             A * P + P * A '+ 2 * Alpha * P> 0
             P> 0
             Alpha> 0

My code:

function rP=LMIStabilityMargins(A)

%% set options for given solver
options
=sdpsettings;
options
.solver='sedumi';
options
.showprogress=0;
options
.verbose=0;
warning
('off','YALMIP:strict');

%% size of matrix A
n
=size(A,1);

%% clear yalmip state
yalmip
('clear');

%% define variable matrices
P
= sdpvar(n,n,'symmetric');
alpha_
=sdpvar(1);

%% define inequalities LMI
LMIs = set([ ]);

%% use LMI variables
main_lmi
= [P*A + A'*P + 2*alpha_*P];

LMIs = LMIs + set (alpha_ > 0, ['
alpha_ > 0']);
LMIs = LMIs + set (P > 0, ['
P > 0']);
LMIs = LMIs + set(main_lmi < 0,  '
main_lmi < 0');          

%% solve it
res=solvesdp(LMIs,-alpha_ , options);

%%
if res.problem == 0  
    fprintf('
=================================================================================\n');
    fprintf('
Problem ...: %d\nInfo ......: %s\n', res.problem, res.info);
    if all(checkset(LMIs)>=0)
        fprintf('
Everythings is all right :-)\n');
        fprintf('
=================================================================================\n');
    else
        %disp(LMIs);
        %checkset(LMIs)
        fprintf('
### Some LMIs are not feasible :-( ###\n');
        fprintf
('=================================================================================\n');
   
end
    rP
= double(P);
else
   res
.problem
   P
=0;
end


When I want to solve, I have the following message:

Warning: Solver not applicable (sedumi)

ans =

     
-4

Where is the problem in my code?


Regards,

Johan Löfberg

unread,
Aug 11, 2014, 6:46:04 AM8/11/14
to yal...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages