Unbounded problem

cvx_begin
variable w2(Nt2,cluster2)
variables x2(usertotal2,1) y2(usertotal2,1)
expressions U(usertotal1,1) MSE1(cluster1,1) MMSE1(cluster1,1)
expressions W2(Nt2,Nt2,cluster2) F2(Nt2,Nt2,cluster2,user2) G2(Nt2,usertotal2) X2(Nt2,Nt2,cluster2,user2) Y2(Nt2,Nt2,cluster2,user2) Z2(Nt2,Nt2,cluster2,user2) C2(Nt2,Nt2,cluster2,user2) T2(Nt2,Nt2,cluster2,user2) t2(Nt2,usertotal2) O(usertotal2,1) w22(cluster2,1) MSE2(cluster2,1) s2(usertotal2,1) wm2(Nt2,cluster2-1) MMSE2(cluster2,1) SUM(Nt1,Nt1)

    for l=1:cluster2
     w22(l)=pow_pos(norm(w2(:,l)),2);
     W2(:,:,l)=2*real(wStart2(:,l)*(w2(:,l)-wStart2(:,l))')+wStart2(:,l)*wStart2(:,l)';
 end
 for m=1:cluster1  
     for n=1:user1
         wm1=[w1(:,1:m-1),w1(:,m+1:cluster1)];
         U((m-1)*user1+n)=(pow_abs(h1(:,(m-1)*user1+n)'*w1(:,m),2)+sigma1^2*pow_pos(norm(w1(:,m)),2))*(a1(m,n)+eta1*sum(a1(m,n+1:user1))+sum(a1(m,1:n-1)))+pow_pos(norm(h1(:,(m-1)*user1+n)'*wm1),2)+sigma1^2*(sum(w11(1:m-1))+sum(w11(m+1:cluster1)))+trace(diag(f1(:,(m-1)*user1+n)')*A*diag(f1(:,(m-1)*user1+n))*sum(W2,3))+1;
         MSE1((m-1)*user1+n)=v1((m-1)*user1+n)*v1((m-1)*user1+n)'*U((m-1)*user1+n)+1-2*sqrt(a1(m,n))*real(v1((m-1)*user1+n)'*w1(:,m)'*h1(:,(m-1)*user1+n));
         MMSE1((m-1)*user1+n)=real(beta1((m-1)*user1+n))*MSE1((m-1)*user1+n);
     end
 end
 for l=1:cluster2 
     for s=1:user2
         wm2=[w2(:,1:l-1),w2(:,l+1:cluster2)];
         O((l-1)*user2+s)=trace(diag(f2(:,(l-1)*user2+s))*A*diag(f2(:,(l-1)*user2+s))'*W2(:,:,l))*(a2(l,s)+eta2*sum(a2(l,s+1:user2))+sum(a2(l,1:s-1)))+trace(diag(f2(:,(l-1)*user2+s))*A*diag(f2(:,(l-1)*user2+s))'*(sum(W2,3)-W2(:,:,l)))+(l==1)*(pow_pos(norm(h2(:,(l-1)*user2+s)'*w1),2)+sigma1^2*sum(w11))+1;
         MSE2((l-1)*user2+s)=v2((l-1)*user2+s)*v2((l-1)*user2+s)'*O((l-1)*user2+s)+1-2*real(sqrt(a2(l,s))*exp(-sigma2^2/2)*w2(:,l)'*f2(:,(l-1)*user2+s)*v2((l-1)*user2+s)');
         MMSE2((l-1)*user2+s)=real(beta2((l-1)*user2+s))*MSE2((l-1)*user2+s);
         C2(:,:,l,s)=diag(f2(:,(l-1)*user2+s))'*((a2(l,s)/gamma2-(eta2*sum(a2(l,s+1:user2))+sum(a2(l,1:s-1))))*W2(:,:,l)-(sum(W2,3)-W2(:,:,l)))*diag(f2(:,(l-1)*user2+s));
         X2(:,:,l,s)=real(C2(:,:,l,s));
         Y2(:,:,l,s)=imag(C2(:,:,l,s));
         for i=1:Nt2
            for j=1:Nt2
                if i==j
                   F2(i,j,l,s)=sigma2^2*(X2(i,j,l,s)-sum(X2(i,:,l,s)));
                else 
                   F2(i,j,l,s)=sigma2^2*X2(i,j,l,s);
                end
            end
         end
         for j=1:Nt2
             G2(j,(l-1)*user2+s)=sigma2*sum(Y2(j,:));
         end
         t2(:,(l-1)*user2+s)=G2(:,(l-1)*user2+s);
         s2((l-1)*user2+s)=sum(sum(C2(:,:,l,s)))-norm(htotal2(:,(l-1)*user2+s)'*w1)^2-1;
     end
 end

minimize( real(sum(MMSE1))+real(sum(MMSE2)) )

cvx_end

Status: Failed
Optimal value (cvx_optval): NaN

I delete the constraints, but the result is NaN.
However I got the value of objective function which was a real value not NaN. Why did this happen?
real(sum(MMSE1))+real(sum(MMSE2))

ans =

-32.0468

The problem is reported as being unbounded. Try following the advice at https://yalmip.github.io/debuggingunbounded/

thank you very much!

stop: progress is too slow
Status: Failed
Optimal value (cvx_optval): NaN

I delete the constraints, but the result is NaN.
However I got the value of objective function which was a real value not NaN. Why did this happen?
real(sum(MMSE1))+real(sum(MMSE2))

ans =

-32.0468

Please show a coherent combination of all solver and CVX output and result, so we know what goes with what.

You can also try specifying a different solver.

cvx_begin
variable w2(Nt2,cluster2)
variables x2(usertotal2,1) y2(usertotal2,1)
expressions U(usertotal1,1) MSE1(cluster1,1) MMSE1(cluster1,1)
expressions W2(Nt2,Nt2,cluster2) C2(Nt2,Nt2,cluster2,user2) t2(Nt2,usertotal2) O(usertotal2,1) w22(cluster2,1) MSE2(cluster2,1) s2(usertotal2,1) wm2(Nt2,cluster2-1) MMSE2(cluster2,1)

    for l=1:cluster2
     w22(l)=pow_pos(norm(w2(:,l)),2);
     W2(:,:,l)=2*real(wStart2(:,l)*(w2(:,l)-wStart2(:,l))')+wStart2(:,l)*wStart2(:,l)';
 end
 for m=1:cluster1  
     for n=1:user1
         wm1=[w1(:,1:m-1),w1(:,m+1:cluster1)]; 
         U((m-1)*user1+n)=(pow_abs(h1(:,(m-1)*user1+n)'*w1(:,m),2)+sigma1^2*pow_pos(norm(w1(:,m)),2))*(a1(m,n)+eta1*sum(a1(m,n+1:user1))+sum(a1(m,1:n-1)))+pow_pos(norm(h1(:,(m-1)*user1+n)'*wm1),2)+sigma1^2*(sum(w11(1:m-1))+sum(w11(m+1:cluster1)))+trace(diag(f1(:,(m-1)*user1+n)')*A*diag(f1(:,(m-1)*user1+n))*sum(W2,3))+1;
         MSE1((m-1)*user1+n)=v1((m-1)*user1+n)*v1((m-1)*user1+n)'*U((m-1)*user1+n)+1-2*sqrt(a1(m,n))*real(v1((m-1)*user1+n)'*w1(:,m)'*h1(:,(m-1)*user1+n));
         MMSE1((m-1)*user1+n)=real(beta1((m-1)*user1+n))*MSE1((m-1)*user1+n);
     end
 end
 for l=1:cluster2  
     for s=1:user2
         wm2=[w2(:,1:l-1),w2(:,l+1:cluster2)]; 
         O((l-1)*user2+s)=trace(diag(f2(:,(l-1)*user2+s))*A*diag(f2(:,(l-1)*user2+s))'*W2(:,:,l))*(a2(l,s)+eta2*sum(a2(l,s+1:user2))+sum(a2(l,1:s-1)))+trace(diag(f2(:,(l-1)*user2+s))*A*diag(f2(:,(l-1)*user2+s))'*(sum(W2,3)-W2(:,:,l)))+(l==1)*(pow_pos(norm(h2(:,(l-1)*user2+s)'*w1),2)+sigma1^2*sum(w11))+1;
         MSE2((l-1)*user2+s)=v2((l-1)*user2+s)*v2((l-1)*user2+s)'*O((l-1)*user2+s)+1-2*real(sqrt(a2(l,s))*exp(-sigma2^2/2)*w2(:,l)'*f2(:,(l-1)*user2+s)*v2((l-1)*user2+s)');
         MMSE2((l-1)*user2+s)=real(beta2((l-1)*user2+s))*MSE2((l-1)*user2+s);
         aAux((l-1)*user2+s)=1+(l==1)*(pow_pos(norm(h2(:,(l-1)*user2+s)'*w1),2)+sigma1^2*sum(w11));
         C2(:,:,l,s)=diag(f2(:,(l-1)*user2+s))'*((a2(l,s)/gamma2-(eta2*sum(a2(l,s+1:user2))+sum(a2(l,1:s-1))))*W2(:,:,l)-(sum(W2,3)-W2(:,:,l)))*diag(f2(:,(l-1)*user2+s));
     end
 end

minimize( real(sum(MMSE1)) )
subject to
for l=1:cluster2
for s=1:user2
norm(Gvec(C2(:,:,l,s)’))<=(1/b2)(sqrt(b2^2+1)*real(trace(C2(:,:,l,s)*A))-aAux((l-1)*user2+s)/sqrt(b2^2+1));
end
end
cvx_end

I juss change the constraints and get the details below.

Calling SDPT3 4.0: 2100 variables, 44 equality constraints
For improved efficiency, SDPT3 is solving the dual problem.

num. of constraints = 44
dim. of sdp var = 4, num. of sdp blk = 2
dim. of socp var = 2086, num. of socp blk = 6
dim. of linear var = 8


SDPT3: Infeasible path-following algorithms


version predcorr gam expon scale_data
HKM 1 0.000 1 0
it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime

0|0.000|0.000|9.5e+04|2.5e+00|4.6e+06| 3.298811e+05 0.000000e+00| 0:0:00| chol 1 1
1|0.937|0.886|6.0e+03|2.9e-01|5.2e+05| 8.019203e+03 -2.136961e+00| 0:0:00| chol 2 2
2|0.837|0.902|9.8e+02|2.8e-02|3.9e+04|-1.185276e+04 -2.561663e-01| 0:0:01| chol 2 2
3|0.590|0.186|4.0e+02|2.3e-02|3.8e+04|-1.473058e+05 -2.933632e-01| 0:0:01| chol 2 2
4|0.003|0.001|4.0e+02|2.3e-02|5.1e+04|-5.555561e+05 -2.911286e-01| 0:0:01| chol 3 3
5|0.011|0.014|4.0e+02|2.3e-02|1.5e+05|-5.644570e+06 3.400261e-01| 0:0:01| chol 3 3
6|0.000|0.000|4.0e+02|2.3e-02|2.0e+05|-8.310498e+06 2.716511e-01| 0:0:01| chol 4 3
7|0.002|0.000|3.9e+02|2.3e-02|1.1e+06|-5.291044e+07 2.638484e-01| 0:0:01| chol 3 4
8|0.000|0.000|3.9e+02|2.3e-02|1.5e+06|-7.256483e+07 2.591101e-01| 0:0:01| chol 5 5
9|0.002|0.002|3.9e+02|2.3e-02|8.9e+06|-4.812917e+08 2.114288e-02| 0:0:01| chol
linsysolve: Schur complement matrix not positive definite
switch to LU factor. lu 6 2
10|0.014|0.002|3.8e+02|2.3e-02|3.5e+08|-2.076484e+10 -1.647082e-02| 0:0:02| lu 19 3
11|0.000|0.000|3.8e+02|2.3e-02|4.4e+08|-2.734024e+10 -8.259560e-02| 0:0:02| lu *16 3
12|0.001|0.002|3.8e+02|2.3e-02|2.2e+09|-1.520484e+11 -1.125680e-01| 0:0:02| lu *14 3
13|0.003|0.002|9.1e+02|2.2e-02|2.8e+10|-2.152618e+12 -1.168163e-01| 0:0:02| lu *13 3
14|0.000|0.000|8.8e+02|2.2e-02|4.9e+10|-3.747430e+12 -1.164397e-01| 0:0:02| lu 28 4
15|0.000|0.000|6.6e+03|2.2e-02|1.9e+11|-1.461881e+13 -1.133923e-01| 0:0:02| lu *24 6
16|0.000|0.000|4.7e+04|2.2e-02|4.3e+11|-3.350031e+13 -1.148213e-01| 0:0:02| lu *17 5
17|0.000|0.000|7.9e+04|2.2e-02|1.4e+12|-1.120745e+14 -1.129140e-01| 0:0:03| lu 20 7
18|0.000|0.000|4.2e+05|2.2e-02|1.8e+12|-1.439094e+14 -1.124282e-01| 0:0:03| lu *15 5
19|0.000|0.000|4.2e+05|2.2e-02|5.4e+12|-4.363903e+14 -1.221582e-01| 0:0:03| lu 23 7
20|0.000|0.000|1.0e+06|2.2e-02|8.1e+12|-6.545987e+14 -1.209917e-01| 0:0:03| lu 27 8
21|0.000|0.000|1.0e+06|2.2e-02|2.1e+13|-1.775462e+15 -1.246031e-01| 0:0:03| lu 20 5
22|0.001|0.000|6.7e+06|2.2e-02|1.8e+14|-1.563378e+16 -1.340795e-01| 0:0:03| lu 25 5
23|0.000|0.000|1.7e+07|2.2e-02|2.7e+14|-2.269673e+16 -1.336595e-01| 0:0:03| lu *19 4
24|0.000|0.000|1.6e+07|2.2e-02|5.1e+14|-4.440901e+16 -1.385526e-01| 0:0:03| lu *17 5
25|0.001|0.001|9.7e+07|2.2e-02|3.3e+15|-3.009359e+17 -1.375891e-01| 0:0:04| lu 21 7
26|0.000|0.000|6.9e+08|2.2e-02|5.4e+15|-4.945475e+17 -1.381716e-01| 0:0:04| lu 25 4
27|0.000|0.000|6.8e+08|2.2e-02|8.2e+15|-7.574389e+17 -1.387960e-01| 0:0:04| lu 21 6
28|0.001|0.000|5.1e+09|2.2e-02|9.4e+16|-8.959675e+18 -1.563904e-01| 0:0:04| lu 19 6
29|0.000|0.000|5.1e+09|2.2e-02|1.2e+17|-1.113560e+19 -1.563497e-01| 0:0:04| lu 30 17
30|0.000|0.000|8.9e+10|2.2e-02|1.6e+17|-1.523361e+19 -1.174405e-01| 0:0:04| lu 19 5
31|0.000|0.000|8.8e+10|2.2e-02|7.0e+17|-6.897494e+19 -1.197791e-01| 0:0:04|
sqlp stop: dual problem is suspected of being infeasible

number of iterations = 31
residual of dual infeasibility
certificate X = 1.28e-09
reldist to infeas. <= 1.59e-11
Total CPU time (secs) = 4.44
CPU time per iteration = 0.14
termination code = 2
DIMACS: 8.8e+10 0.0e+00 1.8e-01 0.0e+00 -1.0e+00 1.0e-02


Status: Infeasible
Optimal value (cvx_optval): +Inf

SDPT3 is not so good at infeasible problems. I would try Mosek or SeDuMi to see if they agree.

So should I download the Mosek or SeDuMi package? or they are included in CVX ?

SeDuMi is included with CVX. You can insrruct CVX to use it via cvx_solver. Mosek requires separate license.

thank you!
And I wondered that the case showed below was related to the initial setting? or the problem

stop: progress is too slow

number of iterations = 26
primal objective value = -1.16304491e+01
dual objective value = -6.74717895e+00
gap := trace(XZ) = 6.53e-01
relative gap = 3.37e-02
actual relative gap = -2.52e-01
rel. primal infeas (scaled problem) = 1.44e-09
rel. dual " " " = 4.87e-05
rel. primal infeas (unscaled problem) = 0.00e+00
rel. dual " " " = 0.00e+00
norm(X), norm(y), norm(Z) = 4.0e+05, 2.6e+00, 2.4e+00
norm(A), norm(b), norm© = 1.1e+01, 5.0e+00, 1.0e+00
Total CPU time (secs) = 0.36
CPU time per iteration = 0.01
termination code = -5
DIMACS: 3.6e-09 0.0e+00 5.0e-05 0.0e+00 -2.5e-01 3.4e-02


Status: Failed
Optimal value (cvx_optval): NaN

Thh solver ran into numerical difficulty. Perhaps a different solver will do better. It may be that the scaling of your problem is bad, and the solver would work better if you changed the units in your problem to make the coefficients closer to 1 in magnitude (i.e., no very large or small exponents).