Appear "infeasible" in some channel realizations!

In mostly channel realizations, the following optimization problem can obtain one solution.
But it appears “infeasible” at the beginning in some channel realizations,

Complete program:

Initialized point

Nt = 4 , K = 4 ;

error_radius = 1*ones(K,K);

noise_power = 0.1*ones(K,1);

power_max = 10^(1/10);

epsilon = 0.01 ;

for seed_index =1:50

randn('state',seed_index);

h_bar = 1 / sqrt(2) * (randn(Nt,K,K) + i * randn(Nt,K,K));

wb = zeros(Nt,K) ;

for k=1:K

   wb(:,k) = (randn(Nt,1) + i * randn(Nt,1)) ;
  
   norm_wb(1,k) = norm(wb(:,k)) ;

   wb(:,k) = sqrt(power_max)*wb(:,k)/norm(1,k) ; % normal distribution = power_max
 
end

outloop = 0 ;

while(outloop == 0) % *Until Stopping criterion holds*

pre_sum_rate = 0 ;

  if (iteration == 0)

      s = zeros(K,K) ;

      for i = 1:K

         h = 0 ;

         s(i,i) = max(abs(h_bar(:,i,i)'*w_b(:,i)) - error_radius(i,i)*norm(w_b(:,i)),0.01) ;
         
           for j = 1:K

             if (j ~= i) 

                s(j,i) = abs(h_bar(:,j,i)'*w_b(:,j)) + error_radius(j,i)*norm(w_b(:,j)) ; 
                
                h = h + s(j,i)^2 ;
             
             end

          end

          u_old(1,i) = h + noise_power(i,1) ;

          t_old(1,i) = 1 + (s(i,i)^2)/(h + noise_power(i,1)) + epsilon ;

          pre_sum_rate = pre_sum_rate + weight(i,1)*log2(t_old(1,i)) ;

     end

  else

      pre_sum_rate = post_sum_rate ;

  end

%% CVX for updating

cvx_begin quiet

variables t(1,K) u(1,K) z(1,K-1) lambda(K,K) lambda_hat(1,K) beta1(K,K)

variable W(Nt,Nt,K) complex

variable wb(Nt,K) complex

expression f_ni(1,K)

expression Phi(Nt+1,Nt+1,K,K)

 for i = 1:K

    f_ni(1,i) = sqrt((t_old(1,i)-1)*u_old(1,i)) + sqrt((t_old(1,i)-1)/u_old(1,i))*(u(1,i)-u_old(1,i))/2 + sqrt(u_old(1,i)/(t_old(1,i)-1))*(t(1,i)-t_old(1,i))/2 ;
  
 for j=1:K
    
   if j~= i
     
     Phi(:,:,j,i) =  [eye(Nt) ; h_bar(:,j,i)']*(-W(:,:,j))*([eye(Nt) ; h_bar(:,j,i)']')+        [lambda(j,1)*eye(Nt),zeros(Nt,1) ;zeros(1,Nt),beta1(j,i)-lambda(j,i)*(error_radius(j,i)^2)] ;
     
end
   
end

end


maximize (z(1,3))

subject to 

  norm([2*z(1,1),t(1,1)-t(1,2)]') <= t(1,1)+t(1,2) ; % SOC expressions

  norm([2*z(1,2),t(1,3)-t(1,4)]') <= t(1,3)+t(1,4) ;

  norm([2*z(1,3),z(1,1)-z(1,2)]') <= z(1,1)+z(1,2) ;

  t(1,:) >= ones(1,K) + epsilon ; % t >= (1 + SINR)^1

  z(1,1) >= 0 ;

  z(1,2) >= 0 ;

  for i = 1:K

   real(h_bar(:,i,i)'*wb(:,i)) - lambda_hat(1,i)*delta_(i,i) >= f_ni(1,i) ;

   norm(wb(:,i)) <= lambda_hat(1,i) ; % SOC

   noise_power(i,1) + sum(beta1([1:i-1 i+1:K],i)) <= u(1,i) ; % slack variable

   for j=1:K

      if j ~= i  

        lambda(j,i) >= 0 ;

        Phi(:,:,j,i) == hermitian_semidefinite(Nt+1) ; % S-lemma

        [1,wb(:,j)';wb(:,j),W(:,:,j)] == hermitian_semidefinite(Nt+1) ; % Schur complement

      end

   end

   square_pos(norm(wb(:,i))) <= power_max ; % BS power constraint
  end  

cvx_end

post_sum_rate = sum(log2(t)) ;

w_b = wb ;

t_old = t ;

u_old = u ;

%% Stopping criterion

  diff = post_sum_rate - pre_sum_rate ;

    if ( diff > epsilon)

      outloop = 0 ;

    else

      outloop = 1 ;

    end

end

end

It might help if you provided the complete CVX program, including solver output (don’t use quiet mode).

Yes, that will happen sometimes. Solver engines are not exact. You will have to take that into account in your subsequent processing. Do make sure your problem is reasonably well-scaled (all constants between, say, 1e-3 and 1e+3 ideally).

And of course, try different solvers to see if one performs better than the other; and try boosting the cvx_precision setting.

All of constraints are in that range, i am trying to use cvx_precision, thank u.

I’ve nothing more to add.

If you use MOSEK then it will provide an approximate certificate for the infeasible status i.e. a Farkas certificate. Looking at how approximate it is you will get an idea about whether your problem is genuinely infeasible or it is a numerical issue.

Normally MOSEK will print out a solution summary and most likely this can also be seen in CVX. If you show me that I can tell you something about the quality of certificate.

It shows this in my windows,

Calling Mosek 7.0.0.92: 1134 variables, 254 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 7.0.0.92 (Build date: 2013-11-13 15:18:27)
Copyright © 1998-2013 MOSEK ApS, Denmark. WWW: http://mosek.com

Computer
Platform : Windows/64-X86
Cores : 2

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 254
Cones : 15
Scalar variables : 534
Matrix variables : 24
Integer variables : 0

Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries : 0 time : 0.00
Eliminator - elim’s : 0
Lin. dep. - tries : 1 time : 0.01
Lin. dep. - number : 0
Presolve terminated. Time: 0.01
Optimizer - threads : 2
Optimizer - solved problem : the primal
Optimizer - Constraints : 226
Optimizer - Cones : 15
Optimizer - Scalar variables : 208 conic : 93
Optimizer - Semi-definite variables: 24 scalarized : 1320
Factor - setup time : 0.02 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 1.51e+004 after factor : 1.61e+004
Factor - dense dim. : 0 flops : 1.92e+006
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.5e+001 1.1e+000 3.8e+001 0.00e+000 3.683919930e+001 0.000000000e+000 1.0e+000 0.08
1 6.6e+000 4.9e-001 1.7e+001 4.95e-001 1.751543237e+001 1.504680745e-001 4.5e-001 0.14
2 3.2e+000 2.3e-001 8.2e+000 7.80e-001 9.180629891e+000 5.084088922e-001 2.2e-001 0.16
3 1.9e+000 1.4e-001 4.9e+000 9.67e-001 5.782828842e+000 7.498173014e-001 1.3e-001 0.17
4 1.0e+000 7.7e-002 2.7e+000 1.05e+000 3.654274600e+000 8.697382823e-001 7.1e-002 0.19
5 4.5e-001 3.3e-002 1.2e+000 8.74e-001 2.298646046e+000 9.311634844e-001 3.1e-002 0.20
6 1.7e-001 1.2e-002 4.3e-001 2.72e-001 1.853797473e+000 9.105381885e-001 1.1e-002 0.22
7 4.3e-002 3.2e-003 1.1e-001 -4.06e-001 1.569001104e+000 7.857871193e-001 3.0e-003 0.23
8 5.2e-003 3.9e-004 1.4e-002 -8.29e-001 -1.585442662e-001 7.133890594e-002 3.6e-004 0.23
9 4.2e-004 3.1e-005 1.1e-003 -9.80e-001 -1.339867591e+001 -3.042699351e-001 2.8e-005 0.25
10 2.1e-005 1.5e-006 5.4e-005 -9.99e-001 -2.768515999e+002 -2.949484216e-001 1.4e-006 0.27
11 1.0e-006 7.7e-008 2.7e-006 -1.00e+000 -5.548115533e+003 -2.949267316e-001 7.2e-008 0.28
12 1.7e-010 8.8e-012 1.1e-010 -1.00e+000 -1.680464843e-002 -2.743668690e-010 8.2e-012 0.28
Interior-point optimizer terminated. Time: 0.28.

MOSEK DUAL INFEASIBILITY REPORT.

Problem status: The problem is dual infeasible
Optimizer terminated. Time: 0.38

Interior-point solution summary

Problem status : DUAL_INFEASIBLE

Solution status : DUAL_INFEASIBLE_CER

Primal. obj: -1.6804648429e-002 Viol. con: 1e-012 var: 0e+000 barvar: 0e+000 cones: 0e+000

Optimizer summary
Optimizer - time: 0.38
Interior-point - iterations : 12 time: 0.28
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Clean primal-dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Primal-dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00


Status: Infeasible
Optimal value (cvx_optval): -Inf

MOSEK says your problem is dual infeasible which sort of means unbounded. Well, if CVX feeds the dual problem in to MOSEK that implies the problem is primal infeasible. The certificate is not extremely good but I would trust the conclusion given all I see.

MOSEK says your problem is dual infeasible which sort of means unbounded.

May it happen in some infeasible initialized points? Due to it can work in most simulation seettings.

Since CVX feeds in the dual then your problem is primal infeasible. It is hard for me to say why. In MOSEK we have some tools that can help diagnose it but thay cannot be used from cvx I think.

If you can format the source code so it can be copy-pasted into an editor, then I can verify the MOSEK results, and see if something is wrong. I tried copy-pasting the above version, but there are syntax errors.

To do this: hit the “edit” button, paste the code in exactly as it appears in your MATLAB code. Then select the code and click the “code” button on the editor—that’s the button with the 1’s and 0’s.

i have already reformat it, thank you.

I had to modify the lines with “maximize (z(1,3))” and “cvx_end”, and then I get an error message “Undefined function or variable ‘iteration’”.

Maybe u should remove the symbol ** ?

Obviously I should, and I did, and then I get the error I mentioned. Most likely you forgot to publish all the required code - you should probably test the published code from an empty directory; a good habit is to run the exact program you publish, before asking for help.