Illegal operation: {log-concave} - {real constant}

hi, I want to solve the following problem using CVX
cvx_begin
% Declare a complex variable
variable Xi(1) complex;

    % Reformulate the constraint in a potentially convex way (verify if convex)
    expr1 = 2 * real(sqrt(PMU_Power) * Xi' * h_r2c * RIS_mat * g_p2r);
    expr2 = pow_abs(Xi, 2) * (sigma_r2 * norm(h_r2c * RIS_mat, 2)^2 + sigma_s2);

    % Define the constraint
    constraint_term = bandwidth * time_slot * (log(1 + (expr1 - expr2) / log(2))) ...
                  - sqrt(bandwidth * time_slot) * Qinv_value * log2_e;

    subject to
        constraint_term >= Eig_val;
        
    % Objective function (simplified or broken down for convexity checks)
    objective_term = (PMU_Power + PMU_Power * norm(RIS_mat * g_p2r, 2)^2 + ...
                 sigma_r2 * norm(RIS_mat, 'fro')^2) / Total_pow_max;

minimize(objective_term + ...
         ((control_cost_min/(exp(log(2)*(constraint_term- Eig_val + 1e-6)*2/states_num) -1) + control_cost_min) / Total_cost_max));

cvx_end
Xi
but I get the following error
Error using +
Disciplined convex programming error:
Illegal operation: {log-concave} - {real constant}

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

Error in check_2nd (line 165)
((control_cost_min/(exp(log(2)*(constraint_term- Eig_val + 1e-6)*2/states_num) -1) + control_cost_min) / Total_cost_max));

expr2 is convex, so constraint_term is log-concave, because its log is concave.

In the objective, a constant is subtracted from constraint_term, which violates CVX"s log-convexity (log-concavity) rules. which are documented only at Log of sigmoid function - #3 by mcg .

Anyhow, it looks like this can be rewritten making use of exp(x-y) = exp(c)*exp(-y) Then you get something like
control_cost_min*2^(-constraint_term**2/states_num)*2^(*Eig_val-1e-6)**2/states_num)*exp(1) , modified appropriately with the rest of the stuff in your objective, which are all input data. Perhaps the part I did show is not quite right. I’ll let you work out the correct details.

I think the basic thing you have is minimize(2^(pow_abs(xi, 2))), which CVX will accept. I think your actual objective winds up being that, but with various positive constants multiplying things, plus some additive terms. I think all this other stuff, winds up being irrelevant to the optimization, at least for determination of argmin. You should check the correctness of my statement, in case I didn’t read through the whole objective correctly.

image


image
image

Hi, indeed I want to solve this problem with respect to \Xi

That looks rather complicated, and I don’t even know what all the things in it are.

Nevertheless, is the problem convex? I don’t see how the left-most inequality of the 2nd constraint is convex. I don’t know exactly what that | | means here, but 1 <= it doesn’t seem like it would be convex.

Please see the standards for convexity proof described in this link.

the second constraint means that the abs(.) of all elements on the diagonal of matrix \Psi are between 1 and \eta_max. Actually these constriants are affine.

my problem is with exp(…)-1 in the denominator of
image

Actually I suppose that if the function f(x) = 1/ (exp(x) - 1) for x>0 can be solved by CVX, my problem can also be solved using CVX.

abs(x) >= 1 is nonlinear and non-convex. In order to handle this, you will need to introduce a binary variable for each element being so-constrained…

Please show us your proof of the convexity of f_2.

See @Michal_Adamaszek 's formulation for 1/(exp(x)-1) at How to express the function "1/(exp(x^2)-1)" - #2 by Michal_Adamaszek .

First of all, I truly appreciate your informative comment about the second constraint, I will fix it.

about the proof of convexity of

I have to said that we are supposed to minimize this function with respect to
image
we use Alternating Optimization to solve this problem. for the first step we fixed
image
in this situation, the inner term of logarithm, i.e.,
image
is concave with respect to
image
so the logarithm of the term is concave, as well. Thus,
image
is convex with respect to
image
with the consideration of the fact that the argument of exp(…) is always positive.

Now in the next step, we fixed
image
and check the convexity with respect to
image
In this regard, the inner term of logarithm is concave and so


is concave . Thus,

is convex w.r.t.
image
with the consideration of the fact that the argument of exp(…) is always positive. exp(…)>0
it is worth mentioning that all other parameters are constant.

I haven’t checked the details of your argument. But now you are talking about alternating optimization. That is because the stated optimization problem is not convex. What matters to CVX is whether each problem provided to it is (mixed-integer) convex, and follows its rules.

I will leave the details to you. As to whether the alternating optimization will converge to anything, let alone a global or even local optimum of the original problem …? Perhaps the paper has something to say about it.