# Please help!Status: Unbounded；cvx_optval: +Inf

Hi,

I have difficulty in running the below op problem. It gives me +Inf as the objective value!
Could anyone give me a hint on it, please?
Thank you so much in advance.

AO method is used in my problem, when update RIS phase shift(thetat_opt,thetar_opt) for given other variables, it doesn’t work.

1. This is my op probelm:

2.MY code is as follows:
function [thetat_opt,thetar_opt,flag_theta] = Generate_beamforming_theta(H_IR, H_ER, error_H_I,error_H_E,…
w_ini, v_ini, thetat_ini, thetar_ini, Gamma_IR, Gamma_ER, E_th,prob)
global M N noise_maxpower

``````cvx_solver Mosek

a = 150;
b = 0.024;
Z = 0.024;%非线性EH模型，最大直流功率设为24mW
X = exp(a*b)/(1+exp(a*b));
Y = Z/exp(a*b);
Q = b - log(Z/((E_th+Y)*X-1))/a;

W = w_ini * w_ini';
V = v_ini * v_ini';

cvx_begin
variable thetat(N,1) complex
variable ThetatN(N,N) hermitian %semidefinite
variable Dt(N,N) hermitian
variable Bt(N,N) hermitian

variable thetar(N,1) complex
variable ThetarN(N,N) hermitian %semidefinite
variable Dr(N,N) hermitian
variable Br(N,N) hermitian

variable x_1 %辅助变量x1
variable y_1 %辅助变量y1
variable x_2
variable y_2
variable x_3
variable y_3

variable belta_1
variable belta_2
variable belta_3

A = kron((thetar_ini * thetar_ini').',(W/Gamma_IR - V));
c = vec(H_IR)'* A * vec(H_IR) - noise_maxpower -belta_1;

A_wave = kron((thetat_ini * thetat_ini').',(W/Gamma_ER - V));
c_wave = vec(H_ER)'* A_wave * vec(H_ER) - noise_maxpower -belta_2;

A_jian = kron((thetat_ini * thetat_ini').',(W + V));
c_jian = vec(H_ER)'* A_jian * vec(H_ER) - Q -belta_3;

constraint_1 = error_H_I^2 * trace(A)-sqrt(2*log(1/prob))*x_1...
+log(prob)*y_1+c;
constraint_2 = norm([error_H_I^2 * vec(A);sqrt(2*error_H_I^2)*A*vec(H_IR)],2);

constraint_3 = error_H_E^2 * trace(-A_wave)-sqrt(2*log(1/prob))*x_2...
+log(prob)*y_2+c_wave;
constraint_4 = norm([error_H_E^2 * vec(A_wave);sqrt(2*error_H_E^2)*A_wave*vec(H_ER)],2);

constraint_5 = error_H_E^2 * trace(A_jian)-sqrt(2*log(1/prob))*x_3...
+log(prob)*y_3+c_jian;
constraint_6 = norm([error_H_E^2 * vec(A_jian);sqrt(2*error_H_E^2)*A_jian*vec(H_ER)],2);

constraint_7 = diag(ThetatN+ThetarN);
constraint_8 = [Dt ThetatN thetat; ThetatN' Bt thetat; thetat'  thetat' 1];
constraint_9 = [Dr ThetarN thetar; ThetarN' Br thetar; thetar'  thetar' 1];

maximize belta_1 + belta_2 + belta_3

subject to

real(constraint_1)>=0;
real(constraint_2-x_1)<=0;

real(constraint_3)>=0;
real(constraint_4-x_2)<=0;

real(constraint_5)>=0;
real(constraint_6-x_3)<=0;

constraint_7 == ones(N,1);
constraint_8 == hermitian_semidefinite(2*N+1);
constraint_9 == hermitian_semidefinite(2*N+1);
real(trace(Dt)) <= 2*real(trace(thetat_ini'*thetat))-real(trace(thetat_ini'*thetat_ini));
real(trace(Dr)) <= 2*real(trace(thetar_ini'*thetar))-real(trace(thetar_ini'*thetar_ini));
ThetatN == hermitian_semidefinite(N);
ThetarN == hermitian_semidefinite(N);

belta_1 >= 0;
belta_2 >= 0;
belta_3 >= 0;

cvx_end
cvx_status
cvx_optval
``````

% if cvx_status(1)==‘F’
% fprintf(‘cvx_status_theta = Failed’);
% pause
% end
%% 解出theta_opt并返回%%
if cvx_status(1)==‘S’ || cvx_status(3)==‘a’
flag_theta = 1;
thetat_opt = thetat;
thetar_opt = thetar;
else
flag_theta = 0;
thetat_opt = thetat_ini;
thetar_opt = thetar_ini;
end
end

1. the results:
Calling Mosek 9.1.9: 714 variables, 300 equality constraints

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 300
Cones : 0
Scalar variables : 8
Matrix variables : 4
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 1 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.03
Optimizer terminated. Time: 0.08

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -1.0000000000e+00 nrm: 1e+00 Viol. con: 0e+00 var: 0e+00 barvar: 0e+00
Optimizer summary
Optimizer - time: 0.08
Interior-point - iterations : 0 time: 0.05
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
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00

Status: Unbounded
Optimal value (cvx_optval): +Inf

The advice in https://yalmip.github.io/debuggingunbounded also applies to CVX.