# HELP：How to solve this problem

#1

Hi! I’m new in CVX. I use SCA( successive convex approximation) method to solve a problem, when i run my code, the CVX run without errors, but showed the status is Infeasible and the Optimal value (cvx_optval): -Inf at last. My code is as follows:

clc;
clear all;
%%
A_r = 0.04;
half_angle = pi/4;
phi = pi/9;
psi = pi/9;
Psi = pi/3;
P_t = 2;
I_L = 0;
I_H = 12 * 10^(-3);
d_v = 3;
sigma_v = 5840 * 10^(-6) * 1.6 * 10^(-19) * 10^6;
xi = -1/log2(cos(half_angle));
g_of = 1;
rho = 1.5;
eta = 0.4;
T = rho^2/(sin(Psi)^2);
h_v = A_r*(xi+1)(cos(phi))^xiTcos(psi)/(2pi*(d_v)^2);
B_v = 10 * 10^6;
%%
sigma_r = 10^(-16);
d_r = 2;
fc = 2.4;
G_r = 18.7log10(d_r)+46.8+20log10(fc/5);
h_r = 10^(-G_r/10);
B_r = 10 * 10^6;
%%
A_e = 0.04;
d_e = 3;
sigma_e = 5840 * 10^(-6)1.610^(-19)10^6;
f = 0.75;
V_t = 25 * 10^(-3);
I_0 = 10^(-9);
h_e = A_e
(xi+1)(cos(phi))^xiTcos(psi)/(2pi*(d_e)^2);
E_t = 10^(-6);
%%
kesai = 10^(-4);
%%
t0 = 50; % give a feasible point
%%
while(1)
cvx_begin
variable alp;
variable t;
variable x;
variable y;
variable X;
maximize(t);
subject to
exp(1) * (eta * h_v * P_t)^2 * inv_pos(2 * pi * (sigma_v)^2 ) * ( power(2^t0 - 1,-1) - 2^t0 * power(2^t0 - 1,-2) * (t - t0) * log(2) ) >= exp(-2 * (x + y));
1 + ( h_r )^2 * (1 - alp) * P_t * inv_pos( (sigma_r)^2 ) >= 2^t;
log( 1 + eta * h_e * P_t * X * inv_pos( I_0 ) ) >= E_t * inv_pos( f * eta * h_e * P_t * V_t * X );
X - alp * I_L >= exp(x + y);
alp * I_H - X >= exp(x + y);
X - alp * I_H <= 0;
alp * (I_H + I_L)/2 - X <= 0;
0 <= alp <= 1;
t >= 0;
X >= 0;
cvx_end
z = t - t0;
if abs(t - t0) <= kesai
break;
else
t0 = t;
end
end

Message of CVX is as follows:

## Cones | Errors | Mov/Act | Centering Exp cone Poly cone | Status --------±--------------------------------±-------- 3/ 3 | 8.000e+00 2.619e+01 0.000e+00 | Unbounded 2/ 2 | 8.000e+00 9.410e+00 0.000e+00 | Unbounded 2/ 2 | 7.648e+00s 2.731e+00 0.000e+00 | Unbounded 1/ 1 | 1.828e+00 1.378e-01 0.000e+00 | Solved 0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Unbounded

Status: Infeasible
Optimal value (cvx_optval): -Inf
Disciplined convex programming error:
Illegal operation: {real affine} - {invalid}

ERROR - (line 21)
z = plus( x, y, true, cheat );

ERROR Untitled (line 57)
exp(1) * (eta * h_v * P_t)^2 * inv_pos(2 * pi * (sigma_v)^2 ) * ( power(2^t0 - 1,-1) - 2^t0 * power(2^t0 - 1,-2) * (t - t0) * log(2) ) >=exp(-2 * (x + y));

Thanks.

(Erling D.Andersen) #2

One hint is that something like

sigma_v = 5840 * 10^(-6) * 1.6 * 10^(-19) * 10^6;
sigma_r = 10^(-16);

shows your model is awfully scaled and you are unlikely to get any numerical software to solve your problem.