Problem with CVX Optimization at High SNR Values (NaN / -Inf Results)

Hello guys, im news here…and i need help
I am working on a wireless communication optimization problem that includes a nonlinear constraint. To handle this, I use fractional programming techniques such as Dinkelbach’s method, as well as the arithmetic-geometric mean (AGM) approach to linearize the constraint.

The problem solves correctly for SNR values in the range of 50–60 dB and produces valid results. However, when the SNR increases beyond this range, the optimization sometimes returns NaN, a numeric value, or -Inf. I am not sure where the issue is coming from.

Could you please help me identify the cause of this behavior?

Here is the part of the code that represents the optimization problem, i used AGM here:

z_s1_prev = 1.5;
z_s2_prev = 100;
alfa1i_prev = 0.7;

% SCA loop
for sca_iter = 1:2
mu1 = sqrt((1 - betai) * norm(h_SRti)^2 * (1 - alfa1i_prev) * snr / z_s1_prev);
mu2 = sqrt(norm(h_SDti)^2 * (1 - alfa1i_prev) * snr / z_s1_prev);

cvx_begin
    cvx_solver MOSEK

    variable alfa1i
    variable z_s2
    variable z_s1

    maximize(0.5 * ((log(1 + z_s1) + log(1 + z_s2)) / log(2)))

    subject to
        2 * ((1 - betai) * norm(h_SRti)^2 * alfa1i * snr - 2 * z_s1) ...
            >= (mu1 * z_s1)^2 + ((1 - betai) * norm(h_SRti)^2 * (1 - alfa1i) * snr / mu1)^2;
        2 * (norm(h_SDti)^2 * alfa1i * snr - z_s1) ...
            >= (mu2 * z_s1)^2 + (norm(h_SDti)^2 * (1 - alfa1i) * snr / mu2)^2;
        gamma_Rs2 >= z_s2;
        gamma_Ds2 >= z_s2;
        0.5 <= alfa1i <= 1;
        z_s1 >= 0;
        z_s2 >= 0;
cvx_end

% Update variables
z_s1_prev = z_s1;
z_s2_prev = z_s2;
alfa1i_prev = alfa1i;

end

You should look at the solver and CVX output and optimal variable values after each iteration, and see what the resulting inputs are for the next iteration. Perhaps the optimal values, and therefore input values for the next iteration, are getting wilder and wilder with each successive iteration, until eventually, failure occurs for some reason.

You should look at the stated reason for failure. It might be that he problem is assessed infeasible, or unbounded, or the solver had numerical difficulties.

It may be that (with your starting values), you are getting 'lucky" for certain values of SNR, and not getting lucky for high values.

Thank you, Mark.

I did this using this method and I noticed that

zs1 jumps from 1e-6 to 1e+6

Then I tried another method, and there zs2 increased from 1e+4 until it reached 3e+7 and then became NaN.

Can I now conclude that the solver fails for large numbers, or should I look for another reason?

If the input numbers become very large, that could result in numerical difficulties, or failure for a variety of reasons. You should look at the solver and CVX output.

In any event, your algorithm might be diverging, as I warned is possible.

Thank you so much mark :pray: