semidefinite progamming with complex matrices

167 views
Skip to first unread message

Andreas Steimer

unread,
Sep 14, 2017, 9:40:37 AM9/14/17
to YALMIP
Hi guys,

I have the following semidefinite program, which is optimized just fine when all matrices involved are real. However, when I switch the matrices to be complex YALMIP returns 'Lack of progress' in most (but not all) cases. Any idea why this might be the case? The following code is for the complex version, for the real version only the matrices have to be redefined accordingly.

much thanks in advance, any help is appreciated




solverSettings = sdpsettings('solver','sdpt3','debug',0,'verbose',0 ); % the default solver settings

S0 = some complex hermitian matrix
n_old = some pos. integer (not needed really)
summedWs = some pos. real number
al_lam = some pos. real number
Lam_lam_old = some pos. real number
al_gam = some pos. real number
Lam_gam_old = some pos. real number

Ko = sdpvar(D,D,'hermitian','complex');
L = sdpvar(D,D,'hermitian','complex');

constraints = [Ko-L>=0, L>=0]; % enforce positive semidefiniteness
objective = n_old*trace( (Ko-L)*S0 ) - n_old*summedWs*logdet(Ko-L) + n_old*al_lam/Lam_lam_old * sum(abs(Ko(:))) + n_old*al_gam/Lam_gam_old * trace(L);
sol = optimize( constraints, objective, solverSettings );

Johan Löfberg

unread,
Sep 14, 2017, 9:47:19 AM9/14/17
to YALMIP
You would to be more specific as the following shows no problems

D = 10;
S0 = randn(D)+randn(D)*sqrt(-1);S0 = S0+S0' + eye(D)*10;
n_old = 3
summedWs = 1;
al_lam = 1;
Lam_lam_old = 1;
al_gam = 1;
Lam_gam_old = 1

Ko = sdpvar(D,D,'hermitian','complex');
L = sdpvar(D,D,'hermitian','complex');

constraints = [Ko-L>=0, L>=0]; % enforce positive semidefiniteness 
objective = n_old*trace( (Ko-L)*S0 ) - n_old*summedWs*logdet(Ko-L) + n_old*al_lam/Lam_lam_old * sum(abs(Ko(:))) + n_old*al_gam/Lam_gam_old * trace(L);
sol = optimize( constraints, objective)





Andreas Steimer

unread,
Sep 14, 2017, 9:58:46 AM9/14/17
to YALMIP
My first question is whether there are some specific problems associated with YALMIP when used in a complex matrix setup.
Anyway using the following settings cause a 'lack of progress' error:

D = 5

S0 =   
   5.5226 + 0.0000i  -1.1045 - 4.8661i   0.6130 - 4.8471i   1.7699 + 1.4319i   3.2963 + 2.8009i
  -1.1045 + 4.8661i   4.9103 + 0.0000i   5.1417 + 1.9183i  -2.4769 + 2.2562i  -4.5402 + 2.1200i
   0.6130 + 4.8471i   5.1417 - 1.9183i   7.1936 + 0.0000i  -2.1895 + 5.0185i  -5.8135 + 4.0870i
   1.7699 - 1.4319i  -2.4769 - 2.2562i  -2.1895 - 5.0185i   5.1893 + 0.0000i   4.2627 + 3.9803i
   3.2963 - 2.8009i  -4.5402 - 2.1200i  -5.8135 - 4.0870i   4.2627 - 3.9803i   8.4819 + 0.0000i

n_old = 5
summedWs = 1;
al_lam = 0;
Lam_lam_old = 4.7886e+09;
al_gam = 0;
Lam_gam_old = 1.0127e+08

Johan Löfberg

unread,
Sep 14, 2017, 10:09:04 AM9/14/17
to YALMIP
If I set S0 = real(S0), I still get numerical problems so it is not related to being real.

However, the problem appears violently ill-conditioned/unbounded. Ko and L tend to infinity. If you disallow that, it does not run into numerical problems, but it moves to the limit, indicating you really have an unbounded problem

sol = optimize([ constraints,norm(Ko) <= 1e5], objective)
norm
(Ko)



Andreas Steimer

unread,
Sep 14, 2017, 10:14:32 AM9/14/17
to YALMIP
Thanks Johan, I will have a look at the boundedness issue, which seems to change when I move from real to complex matrices (where the real part changes as well). How come that you are always so trustworthy and fast in respopnding high-quality answers?

best,

   Andreas

Johan Löfberg

unread,
Sep 14, 2017, 11:15:53 AM9/14/17
to YALMIP
because it is a nice break from correcting an exam or reading a budget proposal.

Wanming Hao

unread,
Jul 19, 2018, 4:03:10 AM7/19/18
to YALMIP
I would like to solve the following plroblem:

X=sdpvar(4,4,'hermitian','complex')
Obj=logdet(X+1)+X
F=[trace(X)<=10]
ops = sdpsettings('solver','sdpt3','verbose',1);
sol = solvesdp(F,-Obj,ops);


But the results show that "Only scalar terms can be added to a logdet term", if there is any method can be used   to solve the above problem? Thank you.

Johan Löfberg

unread,
Jul 19, 2018, 4:33:26 AM7/19/18
to YALMIP
well, as it says, the objective makes no sense. What does it mean to minimize X when X is a matrix?? Perhaps you mean trace(X)
Reply all
Reply to author
Forward
0 new messages