The error message "Disciplined convex programming error: {real affine} ./ {real affine}"

Nonconvex
Aug 3, 2023
S

In the CVX framework, I have the following expression:

{R}_{{k,j}}[n] = \log_{2} \left(1 + \gamma_{0}\frac{MP_{\text{max}} - z_{r,j}[n]\Gamma_{\text{th}}}{z_{c,k}[n]}\right), \forall k,j,n,

where the slack variables are represented by z_{c,k} and z_{r,j} . The constants involved are M>0, P_\max>0, \gamma_0>0, \Gamma_{\text{th}}>0. What is the suitable CVX representation for this expression? Thank you!

######################################################
{R}{_{k,j}}[n] is jointly concave w.r.t. z_{c,k} and z_{r,j}. This can be justified as follows: We derive the Hessian matrix of {R}{_{k,j}}[n] with respect to variables z{c,k} and z_{r,j} , which is:
H_{k,j} = \frac{1}{\ln 2} \begin{bmatrix} \frac{1}{z^2_{c,k}[n]}-\frac{1}{Z^2} & \frac{k_{1}}{Z^2} \\ \frac{k_{1}}{Z^2} & \frac{-k^2_{1}}{Z^2} \end{bmatrix},

where Z = z_{c,k}[n] + k_{1}z_{r,j}[n] + k_{2}, k_{1} = -\gamma_{0}\Gamma_{\text{th}}, and k_{2} = \gamma_{0}MP_{\text{max}}. H_{k,j} is a negative definite matrix in the feasible region, as |H_{k,j}| = \frac{-k^2_{1}}{\ln 2 (z_{c,k}[n] + k_{1}z_{r,j}[n] + k_{2})^2 z^2_{c,k}[n]} \leq 0, H_{k,j}(1, 1) \leq 0, and H_{k,j}(2, 2) \leq 0. Therefore, it can be concluded that {R}_{{k,j}}[n] is jointly concave w.r.t. z_{c,k} and z_{r,j}.

M

log(1+y/x) is neither convex nor concave, regardless of sign of x or y or which is greater. So why does that not apply to your expression?

If you think I have misassessed your problem, perhaps you can rewrite your expression in the simplest form, eliminating extraneous parameters and indices to make things as simple and transparent as possible.

S
Replying to #2

Thank you for your response. To simplify, let’s say my objective function appears as \log_2(1+\frac{C-y}{x}), with C being a constant. Here, the Hessian matrix of the objective function is negative definite, which means it is jointly concave with respect to both x and y.

M

That is not correct.

Consider log(1+(1-y)/x). Its Hessian when evaluated at x = 1, y = 0.5, has one negative eigenvalue and one positive eigenvalue. The Hessian is [0.75 0.25;0.25 -0.25]. So it fails to be negative definite based on the 1st element of the diagonal. And it is actually indefinite, So log(1+(1-y)/x) is neither concave nor convex.

log2 instead of log is the same, except for multiplying everything by 1/log(2). which does not affect the sign of anything.