CVX can't give the same result for reformed problem


(Yuan Xing) #1

I replace " maximize( real( log_det(eye(N) + Sig’SigQtest1) ));" by " maximize( real(log_det(eye(N) + SigQtest2Sig’) ));", the CVX give out a better result however it’s “inaccurate/solved”. However, in math, real( log_det(eye(N) + Sig’SigQtest1) ) is definite equal to real(log_det(eye(N) + SigQtest2Sig’) ). What’s the problem?
%%%%%%%%%%%%%%%%%
N = 8; % Num of antennas

En = 10;

P = 15;
R = 15;

H = randn(N) + 1i*randn(N);

g1 = randn(N,1) + 1i*randn(N,1);

[U, Sig, V] = svd(H);

cvx_begin
variable Qtest1(N,N) complex semidefinite;
maximize( real( log_det(eye(N) + Sig’SigQtest1) ));
subject to
%trace(Qtest1) <= P;
real(g1’Qtest1g1) <= En;
cvx_end

R_max1 = cvx_optval

cvx_begin
variable Qtest2(N,N) complex semidefinite;
maximize( real(log_det(eye(N) + SigQtest2Sig’) ));
subject to
%trace(Qtest2) <= P;
real(g1’Qtest2g1) <= En;
cvx_end

R_max2 = cvx_optval

figure(1)
mesh(abs(Qtest1))

figure(2)
mesh(abs(Qtest2))


(Mark L. Stone) #2

You are solving 2 DIFFERENT problems. Even in exact arithmetic they would be different problems.

Sig is diagonal, so it doesn’t matter whether Sig or Sig' appears.

Consider this example:

A = [1 0;0 2]; % diagonal
B = [4 1;1 1] % semidefinite

>> disp(A'*A*B)
ans =
     4     1
     4     4

>> disp(A*B*A')
ans =
     4     2
     2     4

The first formulation isn’t even symmetric, but CVX 2,.1 lets you get away with it. CVX 3.0beta correctly produces an error message that the argument of det_rootn is not symmetric.