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:
Successive approximation method to be employed.
For improved efficiency, SDPT3 is solving the dual problem.
SDPT3 will be called several times to refine the solution.
Original size: 24 variables, 5 equality constraints
5 exponentials add 40 variables, 25 equality constraintsCones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
3/ 3 | 8.000e+00 2.746e+01 0.000e+00 | Unbounded
2/ 2 | 8.000e+00 9.561e+00 0.000e+00 | Unbounded
4/ 4 | 8.000e+00 4.480e+00 0.000e+00 | Unbounded
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | SolvedStatus: Solved
Optimal value (cvx_optval): +30.0989
Successive approximation method to be employed.
For improved efficiency, SDPT3 is solving the dual problem.
SDPT3 will be called several times to refine the solution.
Original size: 24 variables, 5 equality constraints
5 exponentials add 40 variables, 25 equality constraintsCones | 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 | UnboundedStatus: 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));
I will appreciate you if I receive your advises.
Thanks.