Hello everyone,
I am trying to solve the following cvx optimization problem:
clear all
clc
A=[0 1;-2 3];B=[0;1];Qc=[100 0;0 1];Rc=10;
h=0.05;tav=0.08;
Q2=[[4.9915 0.1284;0.1284 0.0629] [1.1616e-04;2.3852e-04] [0.0019;0.0013] zeros(2,1);…
[1.1616e-04;2.3852e-04]’ .2000 6.7902e-06 0;…
[0.0019;0.0013]’ 6.7902e-06 .2000 0;zeros(1,2) 0 0 0];
fi2=[expm(A*h) [2.0405e-04;.0206] [.0011;.0333];zeros(1,2) 0 0;zeros(1,2) 1 0];
sigma=0.01;
landa2=[0;1;0;0];
%% cvx
cvx_begin
cvx_solver sedumi
variable S(4,4) symmetric
variable w2(1,4)
variable alfa2
minimize(trace_inv(S))
subject to
[S zeros(4,4) (fi2*S+landa2*w2).’ S.’ (sqrtm(Q2)*[S;w2]).’;…
zeros(4,4) 2S-alfa2eye(4,4) (landa2w2).’ zeros(4,4) (sqrtm(Q2)[zeros(4,4);w2]).’;…
fi2S+landa2w2 landa2w2 S zeros(4,4) zeros(4,5);…
S zeros(4,4) zeros(4,4) eye(4,4)alfa2/(sigma^2) zeros(4,5);…
sqrtm(Q2)[S;w2] sqrtm(Q2)[zeros(4,4);w2] zeros(5,4) zeros(5,4) eye(5,5)]>= 0
alfa2>=0;
S>=0;
cvx_end
K2=w2*(S^-1)
status is solved, but in fact after solving ,when I check eigenvalue of the matrix:
[S zeros(4,4) (fi2*S+landa2*w2).’ S.’ (sqrtm(Q2)*[S;w2]).’;…
zeros(4,4) 2S-alfa2eye(4,4) (landa2w2).’ zeros(4,4) (sqrtm(Q2)[zeros(4,4);w2]).’;…
fi2S+landa2w2 landa2w2 S zeros(4,4) zeros(4,5);…
S zeros(4,4) zeros(4,4) eye(4,4)alfa2/(sigma^2) zeros(4,5);…
sqrtm(Q2)[S;w2] sqrtm(Q2)[zeros(4,4);w2] zeros(5,4) zeros(5,4) eye(5,5)]>= 0
values are negative!!! ( this matrix should be PD)
I have been at this issue for a while.
Help and comments are much appreciated.