Question of logdet with a complex matrix input

60 views
Skip to first unread message

Lina

unread,
May 22, 2017, 5:25:38 PM5/22/17
to YALMIP
Hi guys,

I met a problem of max min of logdet with a complex matrix variable. The objective is to max min (R_1, R_2).   I show a simple version of my code below:

H_1=(randn(2,4)+j*randn(2,4))/sqrt(2);
H_2=(randn(2,4)+j*randn(2,4))/sqrt(2);

Q_p = sdpvar(4,4,'hermitian','complex');
t=sdpvar(1,1);

Objective=t;

Constraints = [ logdet(eye(N_r)+H_2*Q_p*H_2') - real(trace(H_2*Q_p*H_2'))>t , logdet(eye(N_r)+H_1*Q_p*H_1')- real(trace(H_1*Q_p*H_1'))>t , Q_p>0 , trace(Q_p) <= 10];

sol = optimize(Constraints,-Objective);

It shows the error of:
Undefined operator '>' for input arguments of type 'logdet'.

It should be a convex optimization problem. May I know what I can do to solve the problem. Thanks.

Johan Löfberg

unread,
May 23, 2017, 1:55:10 AM5/23/17
to yal...@googlegroups.com
logdet is only meant to be used as a term in an objective when using logdet-optimizing SDP solvers.

Maybe it is possible to derive a structured problem though

You have

logdet(I+X) - z >= t

i.e.

det(I+X) >= exp(z  +t)

i.e.

det(I+X)^(1/n) >= (exp(z+t))^(1/n)

i.e.

geomean(I+X) >= exp((z+t)/n)


geomean is a concave operator, and exp is convex, hence the constraint is convex. geomean is SDP representable, and if you use the exponential-cone solver SCS which is interfaced, it supports the intersection of the semidefinite cone and the expoenential cone



Johan Löfberg

unread,
May 23, 2017, 2:01:50 AM5/23/17
to YALMIP
and note that you cannot use strict inequalities, YALMIP is screaming at you about this.

Lina

unread,
May 23, 2017, 11:13:25 AM5/23/17
to YALMIP
Thanks for your reply Johan.

I tried this method, and change the constraint into: 

Constraints = [ geomean(eye(N_r)+H_2*Q_p*H_2') >=exp((t+real(trace(H_2*Q_p*H_2')))/N_r) , geomean(eye(N_r)+H_1*Q_p*H_1')>=exp((t+real(trace(H_1*Q_p*H_1')))/N_r) , Q_p>=0 , trace(Q_p) <= 10];


but still shows the error:    

 solvertime: 0
          info: 'No suitable solver'
       problem: -2
    yalmiptime: 0.3800

I installed SDPT3, but it is still unable to solve it.

Lina

unread,
May 23, 2017, 12:15:28 PM5/23/17
to YALMIP
I added 

Constraints =[Constraints, uncertain(t)];

But still shows the error:

Error using decomposeUncertain (line 21)
There is no uncertainty description in the model.

Error in robustify (line 65)
[UncertainModel,Uncertainty,VariableType,ops] =
decomposeUncertain(F,h,w,ops);

Error in solverobust (line 64)
[F,h,failure] = robustify(varargin{:});

Error in solvesdp (line 157)
        diagnostic =
        solverobust(F(find(~unc_declarations)),h,options,recover(getvariables(sdpvar(F(find(unc_declarations))))));
        
Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});

Error in main_yalmip_testing (line 84)
optimize(Constraints,-Objective)

May I know whether there is a possible method to solve the problem? Thanks!

Johan Löfberg

unread,
May 23, 2017, 12:30:04 PM5/23/17
to YALMIP
But I told you that you had to use SCS

Johan Löfberg

unread,
May 23, 2017, 12:31:12 PM5/23/17
to YALMIP
Why would you do that? It makes no sense to declare t as an uncertain variable

Lina

unread,
May 23, 2017, 2:03:29 PM5/23/17
to YALMIP
Thanks Johan. It works! The problem I shown above can be solved successfully using "SCS". I am sorry I didn't see your suggestions carefully. 

Actually, the problem I need to solve is max min (R_1, R_2)+R_3. There is an additional logdet in the objective function. 

H_1=(randn(2,4)+j*randn(2,4))/sqrt(2);
H_2=(randn(2,4)+j*randn(2,4))/sqrt(2);
H_3=(randn(2,4)+j*randn(2,4))/sqrt(2);

Q_p = sdpvar(4,4,'hermitian','complex');
t=sdpvar(1,1);

Objective=t+ logdet(eye(N_r)+H_3*Q_p*H_3');

Constraints =[ geomean(eye(N_r)+H_2*Q_p*H_2') >=exp((t+real(trace(H_2*Q_p*H_2')))/N_r) , geomean(eye(N_r)+H_1*Q_p*H_1')>=exp((t+real(trace(H_1*Q_p*H_1')))/N_r) , Q_p>=0 , trace(Q_p) <= 10];

It is still a convex problem. But both "SCS" and "SDPT3" don't work for this problem. Could you please give me any suggestion how to solve it.

Thanks so much.

Johan Löfberg

unread,
May 23, 2017, 2:19:51 PM5/23/17
to YALMIP
logdet is an operator solely for logdet solvers (i.e., sdpt3). You t owrite it using geomean instead by using det(X) = geomean(X)^n

Objective= t+n*log(geomean(eye(N_r)+H_3*Q_p*H_3'));



Lina

unread,
May 23, 2017, 2:25:26 PM5/23/17
to YALMIP
It really works! Many Thanks! I do appreciate it!
Reply all
Reply to author
Forward
0 new messages